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

Verify repodata integrity #1591

Open
mattiaverga opened this issue Jan 9, 2023 · 3 comments
Open

Verify repodata integrity #1591

mattiaverga opened this issue Jan 9, 2023 · 3 comments

Comments

@mattiaverga
Copy link

Is there a way to verify the sanity of repodata for a given repository without running dnf and see if it fails?
Bodhi (the fedora package delivery system) uses a dirty hack to verify the repodata for repositories it composes:
https://github.com/fedora-infra/bodhi/blob/481df02300f94ca72ad7ce2ce32d543211ca823d/bodhi-server/bodhi/server/util.py#L272-L390

I'd like to avoid running dnf commands in a subprocess and verify the repodata within Python. Does libdnf has an appropriate method?

@dralley
Copy link

dralley commented Jan 11, 2023

Define "verify the sanity"? I have a tool that runs some checks, I don't know if those checks overlap with what you're looking for.

https://copr.fedorainfracloud.org/coprs/dalley/rpmrepo/
https://github.com/dralley/rpmrepo

@mattiaverga
Copy link
Author

Basically, I'd like to replace the lines where dnf is called in a subprocess to verify if the repository is usable.

@dralley
Copy link

dralley commented Jan 12, 2023

So.. does that just mean the metadata checksums are correct and that the data is parse-able, or that semantically there are no issues like missing dependencies? I see some stuff in there for making sure all updateinfo have IDs.

DNF generally lets a lot of problems slide without complaining, e.g. rpm-software-management/createrepo_c#325 (comment)

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