[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How to add checksums for all files to dpkg

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

This will be installed in /var/lib/dpkg/info/<package>.md5sum by
dpkg. You can leave the rest of the task to someone else, as it
does not involve dpkg.

Anyone can write a script that runs something like this:

	(cd /;md5sum -c /var/lib/dpkg/info/*.md5sum)

That script can do special processing for conffiles - it can read
/var/lib/dpkg/info/*.conffiles for a list of files to exclude, or it
can read /var/lib/dpkg/status for the dpkg-maintained "Conffiles:"

It is a nice feature to be able to run a damage-control program that
tells you what parts of your system have been changed. This is nice
from a security standpoint as well, if Linux viruses ever happen.
Something that runs "dpkg -S for damaged files and and says "try
reinstalling the following packages:" would be useful. Running md5sum
on an entire system might take all day, I guess, but it's still



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: