Skip to content

Detect unused BuildRequires #1562

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

Open
xsuchy opened this issue Mar 17, 2025 · 2 comments
Open

Detect unused BuildRequires #1562

xsuchy opened this issue Mar 17, 2025 · 2 comments

Comments

@xsuchy
Copy link
Member

xsuchy commented Mar 17, 2025

Just a heads up that there is a new project
https://github.com/mkoncek/unbreq
that detects unused buildrequires. So far it is functional prototype.

Once it is fully functional and mature we may link to that from our documentation. Or maybe even merge to this repo.

@github-project-automation github-project-automation bot moved this to Needs triage in CPT Kanban Mar 17, 2025
@nikromen nikromen moved this from Needs triage to Someday in future in CPT Kanban Mar 19, 2025
@mkoncek
Copy link

mkoncek commented Mar 21, 2025

The project just reached another milestone (replacing subprocess calls with librpm / libdnf native calls).
I added a Copr repo with the latest build: https://copr.fedorainfracloud.org/coprs/mkoncek/unbreq/.
There are still some unsolved issues:

  • chroot / nspawn handling should be done using mock's internal util helpers, i tried to use them but it didn't work for me
  • Proper isolation - this should be fixable when the plugin is packaged and available to install as a regular package during package builds:
    • fanotify binary should be installed into the buildroot and ran via chroot / nspawn so that it's filesystem visibility is limited to only buildroot
    • resolve binary should be installed into the bootstrap root and ran with chroot / nspawn with bind-mounted buildroot (used as dnf --installroot / rpm --root)

@praiskup
Copy link
Member

Nice, what an attractive topic!

The project just reached another milestone (replacing subprocess calls with librpm / libdnf native calls).

Mock moves towards the future shape where RPM/DNF is not needed on host; it would mean that you have to call librpm and libdnf from bootstrap chroot when working with build chroot.

chroot / nspawn handling should be done using mock's internal util helpers, i tried to use them but it didn't work for me

I can help with this, I bet.

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