Hello,

The concept of rpmrepo really appeals to me. It seems like the 'Right' way to generate repo metadata. What better place to compute and discover rpm data than within the rpm package itself?

Having said that, in playing with rpmrepo, I've hit a few bumps. The current one appears to be incorrect computation of sha1sums for the <open-checksum> tags on files.

Let me explain what I mean through the following steps:

1. Create the repo data:
/usr/lib/rpm/bin/rpmrepo /repo

2. Verify the repo data was created:
ls -l /repo/repodata/
total 384
-rw-r--r-- 1 root root 318218 Aug 31 00:36 filelists.xml.gz
-rw-r--r-- 1 root root  10723 Aug 31 00:36 other.xml.gz
-rw-r--r-- 1 root root  56971 Aug 31 00:36 primary.xml.gz
-rw-r--r-- 1 root root    951 Aug 31 00:36 repomd.xml

3. View the contents of repmod.xml (Just pasting a snippet pertaining to one file):
  <data type="primary">
<checksum type="sha">35c197b4811fa143967d0e401a84a2cf3717895a</checksum>
    <timestamp>1283214970</timestamp>
<open-checksum type="sha">aeb1e6d847513d9a01bddef3076ab8dadfed6602</open-checksum>
    <location href="repodata/primary.xml.gz"/>
  </data>

4. Verify the sha1sum on one of the gzipped files (it should match checksum for primary above):
sha1sum /repo/repodata/primary.xml.gz
35c197b4811fa143967d0e401a84a2cf3717895a  /repo/repodata/primary.xml.gz

5. Decompress the file and verify sha1sum:
zcat /repo/repodata/primary.xml.gz >primary.xml && sha1sum primary.xml dbf5c20e1a7d3e55bec9563356b9794cc4be9264 primary.xml

Note that the sha1sum above does not match the <open-checksum> tag generated for that file.

Thanks,

Jeremy
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        rpm-devel@rpm5.org

Reply via email to