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

use rpm2archive #2458

Open
cgwalters opened this issue Jan 18, 2021 · 2 comments
Open

use rpm2archive #2458

cgwalters opened this issue Jan 18, 2021 · 2 comments

Comments

@cgwalters
Copy link
Member

Let's use /usr/bin/rpm2archive in our importer. Among other things it's maintained by the RPM team.

TODO:

  • patch it to support not compressing (e.g. just output tar)
  • Run this unprivileged
  • Add direct support for accepting a file descriptor instead of a file so it can be used in a pipe
  • Also fork off GPG verification? Maybe as the same process, e.g. rpm2archive --keyring-fd <fd> --import-fd <fd>
@cgwalters
Copy link
Member Author

One thing we could consider here too is using a Rust RPM parser as a "pre-sanitizer" that validates the GPG signature etc. And perhaps we pass the whole thing off again to rpm2archive if that succeeds. Or, we could optimistically extract at least large files from the parsed data into e.g. O_TMPFILE objects ready to link into the ostree repo, plus one more memfd holding all the smaller files?

@DemiMarie
Copy link

DemiMarie commented May 17, 2021

One thing we could consider here too is using a Rust RPM parser as a "pre-sanitizer" that validates the GPG signature etc.

Is rpmcanon (part of https://github.com/QubesOS/qubes-rpm-oxide) enough for this? It’s part of Qubes OS and is used in production. (Disclaimer: I wrote rpmcanon.)

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

2 participants