Subject: Re: PATCH for gnome2-games-2.10.0 (and a question)
To: walt <wa1ter@myrealbox.com>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 03/26/2005 09:19:36
On Sat, 26 Mar 2005, walt wrote:

> > > Question:  I always have trouble updating patchfiles because the SHA1
> > > hashes are always wrong (for me) in 'distfinfo'.  OTOH the hash code
> > > for the source tarball is correct, so my sha1 executable seems okay.
> > > What is different about the patchfiles?
>
> > Can you show us an example?
>
> Sure.  I see it with every patch for every package.  Take gnome2-games
> just for example:
>
> This is taken from the distinfo file:
> SHA1 (gnome-games-2.10.0.tar.bz2) =
> a941d33bbb881a0ed52d95252c88d2e3f25c7e02
> RMD160 (gnome-games-2.10.0.tar.bz2) =
> dffc3f2c59451fb883e6cfc51defdcc58657d0a6
> SHA1 (patch-aa) = e74547a19267b1a39528d9556d115fff4f7cd21d
> SHA1 (patch-ac) = e54f3fecee226f78edf17dc686c6bde2a25e36fd
> SHA1 (patch-ad) = 52360026ae111850c8097d315243d040ec654fcf
>
> And this is generated by me, using digest:
> SHA1 (gnome-games-2.10.0.tar.bz2) =
> a941d33bbb881a0ed52d95252c88d2e3f25c7e02
> RMD160 (gnome-games-2.10.0.tar.bz2) =
> dffc3f2c59451fb883e6cfc51defdcc58657d0a6
> SHA1 (patch-aa) = ed05c9fbc4f431b8df2c7b00b02c61a59220491d
> SHA1 (patch-ac) = 09b88927fb5f3d5cebd8620026c73056a3447b11
> SHA1 (patch-ad) = 798d0ce64156b3e92a321a9df542421d897963fb
>
> Notice the hashes for the tarball are the same, but all are
> different for the patchfiles -- has been this way for as long
> as I've tried making patches for NetBSD.
>
> Do you see something different at your end?

This above is correct behaviour.

Use "make makepatchsum" to generate patches.

Or if you want to do it manually, remove the CVS tag from top. For
example:

rainier:/usr/pkgsrc$ sed -e '/\$NetBSD.*/d' games/gnome2-games/patches/patch-aa | digest sha1
e74547a19267b1a39528d9556d115fff4f7cd21d

We don't do the checksum for entire file, because of the CVS ID tag at
top.

 Jeremy C. Reed

 	  	 	 BSD News, BSD tutorials, BSD links
	  	 	 http://www.bsdnewsletter.com/