[Rpm-maint] [rpm-software-management/rpm] Adding header tag formats to generate UUIDS (#269)

Jeff Johnson notifications at github.com
Thu Jul 20 19:11:00 UTC 2017

UUID's provide a common format for identification and database retrieval.

The attached patch adds a header tag format to RPM queries.

- UUIDv1 time stamps (for events like build/install times):
$ ./rpm -q --qf '%{buildtime:uuidv1}\n' bash
- UUIDv3 namespace identifiers based on MD5 (like package/header digests)
$ ./rpm -q --qf '%{sigmd5:uuidv3}\n' bash
- UUIDv4 random nonces (overkill because random, but added for completeness)
$ ./rpm -q --qf '%{sigmd5:uuidv4}\n' bash
- UUIDv5 namespace identifiers based on SHA1 (like package/header digests)
$ ./rpm -q --qf '%{sigmd5:uuidv5}\n' bash

The UUIDv3/UUIDv5 name spaces can be configured through optional macros (defaults below)
    %_uuid_auth    http://rpm.org
    %_uuid_path    /packages

For reference, the actual text used for, say, Sha1header, in a namespace UUID looks like
Essentially a prefix (to make the namespace unique) of %_uuid_auth and %_uuid_path followed by a tag name and a tag value.

UUID's will be the starting point for a RPM+LMDB implementation used as header retrieval keys.

You will need the acinclude.m4 file from issue #257 to use the patch below. Adding the hires timestamps from issue #197 would improve the UUIDv1 granularity (not implemented).

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20170720/9e504a9c/attachment-0001.html>

More information about the Rpm-maint mailing list