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

Re: debian archive integrity check tool?



There are two separate issues: archive integrity and mirror integrity.
The first is a ftp-master-only issue. The mirror integrity is best
verified by checking the md5sums in indices/md5sums.gz.

Here's what I use (sent to this list on 27 May 2007):

 zcat indices/md5sum.gz | md5sum -c > /some/path/md5sum-output 2> /dev/null

You can send stderr to a file if you want but it's not necessary.

Some *hours* later (for a full mirror)...

 grep -v ': OK$' /some/path/md5sum-output

should give you

/some/path/md5sum-output:Archive_Maintenance_In_Progress: FAILED open or read
/some/path/md5sum-output:indices/md5sums.gz: FAILED

if your mirror is correct.

I also check that all the files in the tree are in md5sums (the
converse is already done by md5sum, which flags non-existent files).
The only ones that aren't should be those in project/trace. Use this:

 find \! -type d \! -type l | sed -e 's:./::' | sort > /some/path/debian-files
 zcat indices/md5sums.gz | awk '{print $2}' | sort > /some/path/debian-md5sum

then

 join -v1 /some/path/debian-files /some/path/debian-md5sum

points out the intruders.



Reply to: