Re: CVS access problem
Hans-Peter Jansen <[email protected]>
| Newsgroups | gmane.linux.rpm.metadata |
|---|---|
| Message-ID | <[email protected]> |
Am Mittwoch, 28. Juni 2006 17:37 schrieb Jeff Johnson:
> Hint:
>
> RPMTAG_PKGID (i.e. the header+payload MD5, aka RPMTAG_SIGMD5) is
> universally available
> in *.rpm packages, and (unlike the *.rpm file md5sum that was once
> used by repo-md) is invariant
> to signing events.
>
> For package tracking/hashing purposes, whether md5 collisions can be
> generated Simply Does Not Matter.
>
> If you must track headers differently than packages, then the header
> SHA1 can be computed on
> the fly for the few remaining ancient rpm-3.0.x produced packages
> that are encountered.
>
> I have no idea why the patch below is looking at RSAHEADER/DSAHEADER/
> SIGPGP/SIGGPG tags,
> what is needed is a strong guarantee of uniqueness for an identifier,
> and that is RPMTAG_PKGID
> (aka RPMTAG_SIGMD5).
>
> All dutifully delivered to this list way back when, and now
> regurgitated again again again.
Hrmpf, and where's the patch, then?
Since somebody has to clean up the dirt, here it is:
--- dumpMetadata.py.orig 2006-06-28 18:36:58.011494280 +0200
+++ dumpMetadata.py 2006-06-28 18:43:01.102379457 +0200
@@ -569,8 +569,11 @@ class RpmMetaData:
"""
if not self.options['cache']:
return getChecksum(self.options['sumtype'], fo)
-
- csumtag = '%s-%s' % (self.hdr['name'] , self.hdr[rpm.RPMTAG_SHA1HEADER])
+
+ key = "".join([hex(ord(x))[2:].zfill(2)
+ for x in tuple(self.hdr[rpm.RPMTAG_SIGMD5])])
+
+ csumtag = '%s-%s' % (self.hdr['name'] , key)
csumfile = '%s/%s' % (self.options['cachedir'], csumtag)
if os.path.exists(csumfile) and self.mtime <= os.stat(csumfile)[8]:
csumo = open(csumfile, 'r')
--- ChangeLog.orig 2006-06-28 18:36:49.815022961 +0200
+++ ChangeLog 2006-06-28 18:42:50.698780867 +0200
@@ -1,3 +1,9 @@
+2006-06-28 17:03 [email protected]
+
+ * dumpMetadata.py:
+ use a more robust rpm header signature retrieval method for
+ cache files, as recommended by Jeff Johnson.
+
2006-06-15 11:39 lmacken
* ChangeLog, genpkgmetadata.py, docs/createrepo.8: 2006-06-15 11:40
Seth, for your convenience, it's also attached.. Without this, e.g.
VMwareWorkstation rpms will get the None cache file chksum tag, which
defeats its purpose. On the downside, it requires to rebuild the whole
repocache.
Cheers,
Pete
_______________________________________________
Rpm-metadata mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/rpm-metadata
createrepo-nohdrid-take4.diff
(text/x-diff, 1.1 KB)
--- dumpMetadata.py.orig 2006-06-28 18:36:58.011494280 +0200
+++ dumpMetadata.py 2006-06-28 18:43:01.102379457 +0200
@@ -569,8 +569,11 @@ class RpmMetaData:
"""
if not self.options['cache']:
return getChecksum(self.options['sumtype'], fo)
-
- csumtag = '%s-%s' % (self.hdr['name'] , self.hdr[rpm.RPMTAG_SHA1HEADER])
+
+ key = "".join([hex(ord(x))[2:].zfill(2)
+ for x in tuple(self.hdr[rpm.RPMTAG_SIGMD5])])
+
+ csumtag = '%s-%s' % (self.hdr['name'] , key)
csumfile = '%s/%s' % (self.options['cachedir'], csumtag)
if os.path.exists(csumfile) and self.mtime <= os.stat(csumfile)[8]:
csumo = open(csumfile, 'r')
--- ChangeLog.orig 2006-06-28 18:36:49.815022961 +0200
+++ ChangeLog 2006-06-28 18:42:50.698780867 +0200
@@ -1,3 +1,9 @@
+2006-06-28 17:03 [email protected]
+
+ * dumpMetadata.py:
+ use a more robust rpm header signature retrieval method for
+ cache files, as recommended by Jeff Johnson
+
2006-06-15 11:39 lmacken
* ChangeLog, genpkgmetadata.py, docs/createrepo.8: 2006-06-15 11:40