Skip to content

mkoncek/unbreq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unbreq — Detector of unused BuildRequires of RPM builds.

Building

This project requires librpm.

To compile, simply run:

make all

Usage

Note
This project is in a very early stage.

In order to use it from mock builds:

  1. build the project

    make -j8
  2. place the compiled library and the program somewhere into the buildroot (for example into /usr/local/lib64)

    cp -t /var/lib/mock/fedora-rawhide-x86_64/root/usr/local/lib64 target/*
  3. edit the .spec file

    1. use LD_PRELOAD immediately after the %setup of %prep, the %build and the %check (if present) build step

      %prep
      %setup -q ...
      export LD_PRELOAD="/usr/local/lib64/libunbreq.so:${LD_PRELOAD}"
      ...
      
      %build
      export LD_PRELOAD="/usr/local/lib64/libunbreq.so:${LD_PRELOAD}"
      ...
      
      %check
      export LD_PRELOAD="/usr/local/lib64/libunbreq.so:${LD_PRELOAD}"
      ...
    2. at the end of the %check step, manually execute the compiled program

      %check
      ...
      /usr/local/lib64/resolve
  4. after building, you can see the output, for example:

    ...
    [INFO] Installation successful
    ...
    + /usr/local/lib64/resolve
    warning: BuildRequires asciidoc is not needed
    ...

TODO

Transitive Requires of BuildRequires.

About

Detector of unused BuildRequires

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published