Date: Thu, 11 Apr 2019 04:37:42 +0000 (UTC) From: Mikhail Teterin <mi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r498636 - in head/devel/tcl-trf: . files Message-ID: <201904110437.x3B4bgmn007512@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mi Date: Thu Apr 11 04:37:41 2019 New Revision: 498636 URL: https://svnweb.freebsd.org/changeset/ports/498636 Log: The below-mentioned PR identified a problem, which should've been caught by the test-harness -- but was not, because the harness was not used correctly (for 10 years). Provide a new harness and fix the reported problem as well as another one -- with MD2 digests -- identified by the now-functioning test-suit. Bump PORTREVISION... PR: 237132 Reported by: Vadim Zborovsky Added: head/devel/tcl-trf/files/alltests.tcl (contents, props changed) Modified: head/devel/tcl-trf/Makefile head/devel/tcl-trf/files/patch-md2 head/devel/tcl-trf/files/patch-zlib Modified: head/devel/tcl-trf/Makefile ============================================================================== --- head/devel/tcl-trf/Makefile Thu Apr 11 04:31:50 2019 (r498635) +++ head/devel/tcl-trf/Makefile Thu Apr 11 04:37:41 2019 (r498636) @@ -3,7 +3,7 @@ PORTNAME= Trf PORTVERSION= 2.1.4 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel tcl MASTER_SITES= SF/tcltrf/tcltrf/${PORTVERSION} PKGNAMEPREFIX= tcl- @@ -41,7 +41,8 @@ do-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/Trf/libTrf${PORTVERSION}.so do-test: - cd ${WRKSRC}/tests && ${SETENV} TCLLIBPATH="${WRKSRC}" ${TCLSH} all + cd ${WRKSRC} && ${SETENV} TCLLIBPATH="${WRKSRC}" ${TCLSH} \ + ${FILESDIR}/alltests.tcl PLIST_SUB+= TCL_DVER=${TCL_VER:C/\.//} VER=${PORTVERSION} Added: head/devel/tcl-trf/files/alltests.tcl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/tcl-trf/files/alltests.tcl Thu Apr 11 04:37:41 2019 (r498636) @@ -0,0 +1,24 @@ +package require tcltest + +source test.setup + +namespace import ::tcltest::* + +foreach c {hasZlib hasSSL hasBz} { + testConstraint $c 1 +} + +proc defblock {name hexdata} { + upvar $name x + + regsub -all { *} $hexdata {} hexdata + regsub -all "\n" $hexdata {} hexdata + # single long hex string now + + set x $hexdata +} + +configure -singleproc true -verbose bel + +testsDirectory tests +runAllTests Modified: head/devel/tcl-trf/files/patch-md2 ============================================================================== --- head/devel/tcl-trf/files/patch-md2 Thu Apr 11 04:31:50 2019 (r498635) +++ head/devel/tcl-trf/files/patch-md2 Thu Apr 11 04:37:41 2019 (r498636) @@ -8,12 +8,7 @@ +#include "md2d.h" /* -@@ -38,18 +39,8 @@ - */ - --#define DIGEST_SIZE (MD2_DIGEST_LENGTH) -+#define DIGEST_SIZE (20) - #define CTX_TYPE MD2_CTX +@@ -42,14 +43,4 @@ /* - * Declarations of internal procedures. Modified: head/devel/tcl-trf/files/patch-zlib ============================================================================== --- head/devel/tcl-trf/files/patch-zlib Thu Apr 11 04:31:50 2019 (r498635) +++ head/devel/tcl-trf/files/patch-zlib Thu Apr 11 04:37:41 2019 (r498636) @@ -94,36 +94,47 @@ -} - --- generic/crc_zlib.c 2009-06-18 00:54:43.000000000 -0400 -+++ generic/crc_zlib.c 2018-10-21 00:42:01.795595000 -0400 ++++ generic/crc_zlib.c 2019-04-11 00:09:21.075344000 -0400 @@ -29,4 +29,5 @@ #include "transformInt.h" +#include <zlib.h> /* -@@ -46,8 +47,5 @@ +@@ -39,5 +40,5 @@ + #define DIGEST_SIZE 4 /* byte == 32 bit */ +-#define CTX_TYPE uLong ++#define CTX_TYPE uint32_t + + /* +@@ -46,8 +47,6 @@ + static void MDcrcz_Start _ANSI_ARGS_ ((VOID* context)); -static void MDcrcz_Update _ANSI_ARGS_ ((VOID* context, unsigned int character)); -static void MDcrcz_UpdateBuf _ANSI_ARGS_ ((VOID* context, unsigned char* buffer, int bufLen)); -static void MDcrcz_Final _ANSI_ARGS_ ((VOID* context, VOID* digest)); -static int MDcrcz_Check _ANSI_ARGS_ ((Tcl_Interp* interp)); ++static void MDcrcz_UpdateBuf _ANSI_ARGS_ ((VOID* context, unsigned char* buffer, size_t bufLen)); +static void MDcrcz_Final _ANSI_ARGS_ ((VOID* digest, VOID *context)); /* -@@ -60,8 +58,8 @@ +@@ -60,11 +59,11 @@ DIGEST_SIZE, MDcrcz_Start, - MDcrcz_Update, -- MDcrcz_UpdateBuf, + NULL, -+ (Trf_MDUpdateBuf *)crc32, + MDcrcz_UpdateBuf, MDcrcz_Final, - MDcrcz_Check + NULL }; -@@ -118,66 +116,5 @@ +-#define CRC (*((uLong*) context)) ++#define CRC (*((CTX_TYPE *) context)) + + /* +@@ -118,36 +117,5 @@ /* call md specific initialization here */ - CRC = zf.zcrc32 (0L, Z_NULL, 0); @@ -158,47 +169,36 @@ - unsigned char buf = character; - - CRC = zf.zcrc32 (CRC, &buf, 1); --} -- --/* -- *------------------------------------------------------* -- * -- * MDcrcz_UpdateBuf -- -- * -- * ------------------------------------------------* -- * Update the internal state of the message digest -- * generator for a character buffer. -- * ------------------------------------------------* -- * -- * Sideeffects: -- * As of the called procedure. -- * -- * Result: -- * None. -- * -- *------------------------------------------------------* -- */ -- --static void --MDcrcz_UpdateBuf (context, buffer, bufLen) --VOID* context; --unsigned char* buffer; ++ CRC = crc32(0L, Z_NULL, 0); + } + +@@ -175,9 +143,9 @@ + VOID* context; + unsigned char* buffer; -int bufLen; --{ -- /* call md specific update here */ -- ++size_t bufLen; + { + /* call md specific update here */ + - CRC = zf.zcrc32 (CRC, buffer, bufLen); -+ CRC = crc32(0L, Z_NULL, 0); ++ CRC = crc32 (CRC, buffer, bufLen); } -@@ -202,5 +139,5 @@ +@@ -202,5 +170,5 @@ static void -MDcrcz_Final (context, digest) +MDcrcz_Final (digest, context) VOID* context; VOID* digest; -@@ -217,28 +154,2 @@ +@@ -208,5 +176,5 @@ + /* call md specific finalization here */ + +- uLong crc = CRC; ++ CTX_TYPE crc = CRC; + char* out = (char*) digest; + +@@ -217,28 +185,2 @@ out [0] = (char) ((crc >> 0) & 0xff); } -
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904110437.x3B4bgmn007512>