Subject: Re: PATCH for gnome2-games-2.10.0 (and a question)
To: walt <wa1ter@myrealbox.com>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: tech-pkg
Date: 03/26/2005 18:19:45
On Sat, 2005-03-26 at 08:39 -0800, walt wrote:
> > 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.

This is because you are creating the sums in an incorrect way.

pkgsrc strips the first line of the patch files, the one containing the
$NetBSD$ tag, and then applies the digest algorithm.  This is to avoid
changes in the digest after committing the files.

The correct way to generate the checksums is to run 'make makepatchsum'
(or 'make mps' for short) inside the package directory.

-- 
Julio M. Merino Vidal <jmmv84@gmail.com>
http://www.livejournal.com/users/jmmv/
The NetBSD Project - http://www.NetBSD.org/