On May 14, 2008, at 11:26 AM, Jeff Johnson wrote:
>
> There are two URI design issues hidden in the above:
>
> 1) the RPMTAG_PKGUUID (atm, easily changed) is being generated from
> the
> concatenation of "http://rpm5.org/" and the header+payload MD5 hex
> string. I'd
> like more generality, duh.
>
In order to start fleshing out conventions (and implementations) for
generating UUIDv5 strings
from a URI string (with associated/hierarchically/organized/
sttucture) I'm going
to adopt (and extend) djb's /package hierarchy at
http://cr.yp.to/slashpackage.html
for generating URI's.
Please note "namespace", not "filesystem" , hierarchy in what
follows. Do not be confused.
Here's a concrete and explicit example:
ATM popt-1.14-1 has this header+payload MD5
$ rpm -Kv popt-1.14-1.i386.rpm
popt-1.14-1.i386.rpm:
Header V4 DSA signature: NOKEY, key ID 2039b291
Header SHA1 digest: OK
(9168777f898ed82d44693778a5cf50e17924a5e1)
MD5 digest: OK (daaa360569a683537045a45dda97171a)
and the UUIDv5 is being generated from (literally) this string
http://rpm5.org/daaa360569a683537045a45dda97171a
So I'm going to insert the string
/package/PKGID/
into the URI from which the UUIDv5 is generated, literally
http://rpm5.org/package/PKGID/daaa360569a683537045a45dda97171a
The resultant UUIDv5 will then be accessed like
rpm -qp --qf '%{pkguuid}\n' popt-1.14-1.i386.rpm
a9b858e4bdba5983aeba49eecdefe00c
(aside) Time to format the output spew so that the string actually
looks more like
what it is, a UUIDv5, todo++.
Sound like a plan?
(aside) The hierarchical goop will be done with macros and so easily
changed to whatever later. However I need to start establishing
reasonable conventions
for the namespace in order to do a proof-of-concept rpmdb recreation
using PKGUUID
as a retrieval key.
73 de Jeff
Received on Sun May 25 18:15:39 2008