Skip to content

mkoncek/unbreq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unbreq

Detector of unused BuildRequires of RPM builds.

Building

Build the project:

$ make all

Either install or install symlink of the Python plugin and the executable file watcher:

# make install
# make install-link

To uninstall:

# make uninstall

Usage

Note
This project is in a very early stage.

This project is currently implemented as a mock plugin. The native part uses fanotify to watch filesystem accesses.

To run it, install it and then enable it from the command line:

mock --enable-plugin=unbreq

In logs you should see messages like:

INFO: enabled unbreq plugin

If Unbreq detects an unneeded BuildRequire it prints a message like:

Unbreq plugin: the following BuildRequires were not used: ${packages}

TODO

  • FAN_MARK_MOUNT

    fanotify_mark should be able to work with this parameter instead of FAN_MARK_FILESYSTEM. For this to work, the mock build needs to happen inside a bind-mounted directory. If implemented, we avoid monitoring all the filesystem activity and can completely avoid any filtering.

  • ❏ Robust mock root binding

    We need to query dnf because of potentially complex BuildRequires expressions. Ideally exactly the binary from the bootstrap root using chroot. However, the dnf needs to use the build chroot as the --installroot so it needs to have access outside of its chroot. Currently this is done via mount --bind which needs to be unmmounted when the plugin is finished. This is fragile and can leave mounted volume if the process is interrupted.

  • libdnf

    We are currently invoking dnf to query needed information. It may be possible to use libdnf directly.

About

Detector of unused BuildRequires

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published