Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: metadata in filelists.xml (e.g. hash digest, username, groupname, modes) #281

Open
wfrisch opened this issue Aug 18, 2021 · 4 comments

Comments

@wfrisch
Copy link

wfrisch commented Aug 18, 2021

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.

@wfrisch
Copy link
Author

wfrisch commented Aug 18, 2021

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.

@wfrisch wfrisch changed the title Extend filelists.xml with metadata (hash digest, username, groupname, modes) Enhancement: Metadata in filelists.xml (hash digest, username, groupname, modes) Aug 18, 2021
@dralley
Copy link
Contributor

dralley commented Aug 18, 2021

What use cases do you have in mind?

@wfrisch
Copy link
Author

wfrisch commented Aug 19, 2021

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.

@wfrisch wfrisch changed the title Enhancement: Metadata in filelists.xml (hash digest, username, groupname, modes) RFE: metadata in filelists.xml (e.g. hash digest, username, groupname, modes) Sep 6, 2021
@kontura
Copy link
Contributor

kontura commented Feb 28, 2023

It might be of interest that recently there was a new switch added: --filelists-ext that generates filelists with file hashes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants