RFE: metadata in filelists.xml (e.g. hash digest, username, groupname, modes)
It would be useful to have optional metadata within the <file> elements of filelists.xml:
- hash digest (currently SHA-256)
- username, groupname
- size
- modes
All of these properties are present in RPM headers and could be included at very low run-time cost. A package in filelists.xml could look like this:
<package pkgid="dddf30051617f2afcd92909b153badac6e820a742db2996fd74d2c203c75ee58" name="zchunk" arch="x86_64" checksum_type="sha256">
<version epoch="0" ver="1.1.16" rel="1.1"/>
<file type="dir" mode="40755" user="root" group="root">/usr/share/doc/packages/zchunk</file>
<file size="15184" digest="1226b22b7f3018ca8872506cbafff4476e24f77263fec5574cb1474b5b6bf6ec" mode="100755" user="root" group="root">/usr/bin/unzck</file>
<file size="19400" digest="c280cdcd68b045cfd1480c8ee85e2bb667462bed0fde1169c939e4bdd6769390" mode="100755" user="root" group="root">/usr/bin/zck</file>
</package>
The new behavior should be enabled by a command-line option, e.g. --verbose-filelists, in order not to bloat the XML for users who do not need the additional metadata.
Implementation: https://github.com/wfrisch/createrepo_c/tree/verbose-filelists
I also added a new command-line option --verbose-filelists, but it's not wired up to anything yet.
Please let me know what you think.
What use cases do you have in mind?
What use cases do you have in mind?
Individual file hash digests allow the user to monitor individual files within an entire repository. For instance, I'd like to monitor changes in systemd unit files or udev rules.
Permissions issues can be detected with the attributes mode, user and group.
File size is not very important for me personally and I could do without it.
It might be of interest that recently there was a new switch added: --filelists-ext that generates filelists with file hashes.