Subject: Re: CVS commit: pkgsrc/mk
To: Johnny C. Lam <jlam@netbsd.org>
From: Julio M. Merino Vidal <jmmv@NetBSD.org>
List: pkgsrc-changes
Date: 08/15/2007 12:26:10
On Tue, Aug 14, 2007 at 09:25:10PM +0000, Johnny C. Lam wrote:
> 
> Module Name:	pkgsrc
> Committed By:	jlam
> Date:		Tue Aug 14 21:25:10 UTC 2007
> 
> Modified Files:
> 	pkgsrc/mk/checksum: checksum
> 	pkgsrc/mk/patch: patch.mk
> 
> Log Message:
> Teach the pkgsrc/mk/checksum/checksum script how to verify patches by
> first stripping them of NetBSD RCS ID tags.  Use the checksum script
> in the patch module to verify patch checksums instead of hand-coding
> a miniature version of the checksum script in the do-pkgsrc-patches
> target.

This breaks the build of devel/patch, as now the checksum stage thinks
that its distfile is a patch, and computes the checksum incorrectly.

I've worked around it with the following patch, but it's begging for
trouble if patch even changes its distfile format...

Index: checksum
===================================================================
RCS file: /cvsroot/pkgsrc/mk/checksum/checksum,v
retrieving revision 1.11
diff -u -p -r1.11 checksum
--- checksum	14 Aug 2007 21:25:09 -0000	1.11
+++ checksum	15 Aug 2007 12:22:06 -0000
@@ -175,6 +175,9 @@ fi
 			exit 128
 		fi
 		case $file in
+		patch-*.tar|*/patch-*.tar)
+			checksum=`${DIGEST} $d_alg < $file`
+			;;
 		patch-*|*/patch-*)
 			checksum=`${SED} -e '/[$]NetBSD.*/d' $file | ${DIGEST} $d_alg`
 			;;

-- 
Julio M. Merino Vidal <jmmv@NetBSD.org>