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

recurring problems with mirrors

	Hi everyone,

	(Please no response via the list, I don't subscribe to it)

	You may or may not be aware that not all debian mirrors
are faithfull copies of the original site. I've just had a truly
annoying problem with the mirror at 

	One package in there is incorrect: 

MD5 (./binary-i386/misc/eject_1.5-1.deb) = b1cd5063c13be0b6cc0a6dca5ca8cd75

	Md5 should have been
Package: eject
MD5sum: 157924e6a01b756b7dbea05a01aabed9


	This is not the first time that I've seen packages mirrored 
	There are a number of issues in there:

1) It is a waste of a lot of people's time to let mirroring software
do that sort of things.
2) If someone tries to install debian with ONE faulty package
like this, it just fails miserably. This shouldn't be the case. If one
package is faulty, big deal: do without it as far as possible
3) the MD5 signatures are here for everyone to use, how about 
a small shell script that checks the integrity of a distribution:

# Checks the integrity of a DEBIAN distribution
# run this script at the top level of a distribution
# (where the Packages file resides)

echo "Checking a DEBIAN distribution"
echo "Hugues Talbot  3 Feb 1998"
echo ""

# stage 1: get the md5 signatures of all the files in the 
# distribution
echo "Stage 1"
find . -type f -exec md5 {} \; > alist.md5
#restricts to the debian packages
egrep "\.deb" alist.md5 > unsorted.md5

# stage 2: get the signatures only
echo "Stage 2"
awk '{print $4}' unsorted.md5 > allsigs.md5

# stage 3: do a diff with the official md5 signatures
echo "Stage 3"
cat /dev/null > faultysigs.md5
for sigs in `cat allsigs.md5`
        line=`grep $sigs Packages` 
        if [ "$line" = "" ]; then
                # echo $sigs
                echo $sigs >> faultysigs.md5

if [ "`cat faultysigs.md5`" = "" ] ; then
        echo "DEBIAN distribution intact!"
        echo "Faulty DEBIAN distribution!"
        echo "The following packages are damaged/incorrect:"
        for sigs in `cat faultysigs.md5` ; do
                grep $sigs unsorted.md5


	This is slow but gets the job done. Someone can certainly
cook up some equivalent fast solution.

	Cheers, and thanks for DEBIAN!

  ___Hugues Talbot, CSIRO Mathematical & Information Sciences___
 /            Down under, Locked Bag 17, North Ryde  NSW  2113  \
|    ,-_|\                Ph: 61 2 9325 3224 Fax: 61 2 9325 3200 |
|   /     \               (Building E6B, Macquarie University)   |
|   \_,-._* <- There      E-mail: hugues.talbot@cmis.csiro.au    |
|        ,                WWW: http://www.dms.csiro.au/~talbot   |
+---------- Hiroshima 45, Chernobyl 86, Windows 95. -------------+

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: