[CentOS] Re: [users] CentOS 4.2 dag repo problem.

Mon Dec 5 19:45:49 UTC 2005
Dries Verachtert <dries at ulyssis.org>

Hello,

It would be nice if we could get a full list of packages which have a wrong 
sha1 checksum. I don't have the bandwidth for a full mirror of all of Dag's 
rpms and i also don't have shell access to such a mirror. So a small 
request for a mirror admin:

The following checks the files repodata/*.xml.gz against the sha1 sums in 
repomd.xml and checks the RPMS/*.rpm files against the sha1 sums in 
primary.xml.gz. Can you run this on the repodata files of at least the 
el4-i386 rpms? If possible: on every distro/arch combination found in Dag's 
repo :-)

example:
cd /mybigmirror/apt.sw.be/redhat/el4/en/i386/dag/
# should have the same contents as http://apt.sw.be/redhat/el4/en/i386/dag/
xsltproc repomdtoshasum.xslt repodata/repomd.xml | sha1sum -c
gunzip -c repodata/primary.xml.gz | xsltproc primarytoshasum.xslt - | sha1sum -c

Those xslt files are in attach and you probably need to add a path to those xslt files. 
They're only quick hacks but they seem to work on a couple of rpms on my pc. 
It might be interesting to capture the output of both commands, for example:
 xsltproc repomdtoshasum.xslt repodata/repomd.xml | sha1sum -c >> output.txt 2>&1 
gunzip -c repodata/primary.xml.gz | xsltproc primarytoshasum.xslt - | sha1sum -c  >> output.txt 2>&1 

Of course this is far from perfect: it doesn't check the .hdr files, apt config or 
old yum config stuff.. but it might give the list of rpm packages with a wrong
checksum so we can ask heanet to check those files.

thanks in advance!
Dries

-- 
Rpm packages for Red Hat Enterprise Linux, Fedora Core and Aurora at 
http://dries.ulyssis.org/rpm/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: primarytoshasum.xslt
Type: text/x-xslt
Size: 609 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20051205/2d2a97da/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: repomdtoshasum.xslt
Type: text/x-xslt
Size: 581 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20051205/2d2a97da/attachment-0009.bin>