Re: How to add checksums for all files to dpkg
On Wed, 6 Nov 1996, Bruce Perens wrote:
> Checksums for all files in a package can be generated at package-build
> time without the need to make serious modifications to dpkg.
> Add this to dpkg-buildpackage (or even to debian/rules):
>
> echo "generating checksums."
> (cd debian/tmp;md5sum `find . -type f -print`)>md5sum
> mv md5sum debian/tmp/DEBIAN/md5sum
[snip]
I've found more convenient to add it into dpkg-gencontrol; the patch
follows (NB invocking 'dpkg-gencontrol -S' turns this feature off.)
I'd like very much to see this patch (or another one adding this feature)
included in the next version of dpkg-dev. This would give another unique
feature to the Debian distrib. : Have a damage-control program.
--- dpkg-gencontrol.old Fri Nov 8 20:42:11 1996
+++ dpkg-gencontrol Fri Nov 8 21:33:52 1996
@@ -37,6 +37,7 @@
-D<field>=<value> override or add a field and value
-U<field> remove a field
-V<name>=<value> set a substitution variable
+ -S don't compute md5 cheksums
-T<varlistfile> read variables here, not
debian/substvars
-h print this message
";
@@ -78,6 +79,8 @@
$remove{$1}= 1;
} elsif (m/^-V(\w[-:0-9A-Za-z]*)[=:]/) {
$substvar{$1}= $';
+ } elsif (m/-S/) {
+ $nomd5 = 1 ;
} elsif (m/^-T/) {
$varlistfile= $';
} elsif (m/^-h$/) {
@@ -228,9 +231,15 @@
open(STDOUT,"> $cf.new") ||
&syserr("cannot open new output control file \`$cf.new'");
}
+
&outputclose;
if (!$stdout) {
rename("$cf.new","$cf") || &syserr("cannot install output control
file \`$cf'");
+}
+
+if ( ! $nomd5 ) {
+system("(cd $packagebuilddir ; md5sum `find . -path './DEBIAN' -prune -o
-type f -print`) > md5sum") ;
+rename "md5sum", "$packagebuilddir/DEBIAN/md5sum" ;
}
sub spfileslistvalue {
-----------------------------END------------------------
--
- ** Linux ** +-------------------+ ** WAW ** -
- vincent@debian.org | RENARDIAS Vincent | vincent@waw.com -
- Debian/GNU Linux +-------------------+ http://www.waw.com/ -
- http://www.debian.org/ | WAW (33) 4 91 81 21 45 -
- | Luminy (33) 4 91 82 85 32 -
---------------------------------------------------------------------------
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com
Reply to: