Skip to content

mkoncek/unbreq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unbreq

Detector of unused BuildRequires of RPM builds.

Important

This project has been merged into the upstream mock project. Further development will happen there.

Requirements

This tool depends on the mount options of the mock chroot file system.

  • noatime - The tool will not work.

  • relatime - The tool works but spends some time overwriting file access times before the build.

  • strictatime - Works best.

Usage

To run it, install the Python script into the system mock plugin directory. Then enable it upon mock execution via a flag:

mock --enable-plugin=unbreq ...

In logs you should see messages like:

INFO: enabled unbreq plugin(prebuild)

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

WARNING: unbreq plugin: the following BuildRequires were not used:
...

Configuration

The mock plugin reads these mock configuration fields for config_opts:

['plugin_conf']['unbreq_opts']['exclude_accessed_files'] : List[String]

A list of regular expressions which are used to ignore file accesses of certain files.

Example: xmvn always reads all files inside /usr/share/maven-metadata/, the exclusion filter ^/usr/share/maven-metadata/ excludes these files from the listing.

The command line syntax is: --plugin-option='unbreq:exclude_accessed_files=[${python_regexes…​}]'

About

Detector of unused BuildRequires

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages