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
c60fd500-bc0a-11e7-804e-003048b801de
```
- UUIDv3 namespace identifiers based on MD5 (like package/header digests)
```
$ ./rpm -q --qf '%{sigmd5:uuidv3}\n' bash
c24fd63e-14c4-32d1-84f5-168a1f2908db
```
- UUIDv4 random nonces (overkill because random, but added for completeness)
```
$ ./rpm -q --qf '%{sigmd5:uuidv4}\n' bash
b7a15d96-c4cd-4e41-8598-6463375cb39f
```
- UUIDv5 namespace identifiers based on SHA1 (like package/header digests)
```
$ ./rpm -q --qf '%{sigmd5:uuidv5}\n' bash
9292a557-f445-5f36-9b79-8e79a6efaaa2
```

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
```
    http://rpm.org/packages/Sha1header/XXXXXXXXXXXXXXXXXXXXXXXX
```
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:
https://github.com/rpm-software-management/rpm/issues/269
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to