From owner-svn-ports-head@freebsd.org Thu Apr 11 04:37:43 2019 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 812D7157853B; Thu, 11 Apr 2019 04:37:43 +0000 (UTC) (envelope-from mi@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D64D74523; Thu, 11 Apr 2019 04:37:43 +0000 (UTC) (envelope-from mi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D6CB51FE; Thu, 11 Apr 2019 04:37:43 +0000 (UTC) (envelope-from mi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3B4bg1Q007516; Thu, 11 Apr 2019 04:37:42 GMT (envelope-from mi@FreeBSD.org) Received: (from mi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3B4bgmn007512; Thu, 11 Apr 2019 04:37:42 GMT (envelope-from mi@FreeBSD.org) Message-Id: <201904110437.x3B4bgmn007512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mi set sender to mi@FreeBSD.org using -f From: Mikhail Teterin Date: Thu, 11 Apr 2019 04:37:42 +0000 (UTC) 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 X-SVN-Group: ports-head X-SVN-Commit-Author: mi X-SVN-Commit-Paths: in head/devel/tcl-trf: . files X-SVN-Commit-Revision: 498636 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1D64D74523 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2019 04:37:43 -0000 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 /* -@@ -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); } -