Your company here — click to reach over 10,000 unique daily visitors

autobuildrequires - Man Page

Work out the BuildRequires of an RPM build automatically


  auto-br-rpmbuild -ba foo.spec

  auto-br [build-command ...]


Autobuildrequires analyzes an RPM package build to find out what BuildRequires lines it needs.

Instead of using rpmbuild, use this command:

 auto-br-rpmbuild -ba foo.spec

(all the usual rpmbuild flags are supported).  The command will build your package and then output a list of BuildRequires lines that it thinks your package needs.

If your build command is more complex and/or doesn't use rpmbuild, then use:

 auto-br [build-command ...]

For example:

 auto-br make

How It Works

The basic "magic" is a C LD_PRELOAD module, auto-buildrequires-preload.c, which intercepts some system calls to determine which files the build is looking at.  Those get logged to a simple text file.

The Perl analysis script, auto-br-analyze.pl, runs afterwards on the logfile, and uses rpm to find out which packages those files belong to.  Those are printed out as the list of BuildRequires.

A shell script, auto-br, brings the whole thing together.

Exit Status

This program returns 0 if successful, or non-zero if there was an error.

See Also

rpmbuild(8), <http://www.rpm.org/max-rpm/>


Richard W.M. Jones <http://people.redhat.com/~rjones/>

Referenced By

The man pages auto-br(1) and auto-br-rpmbuild(1) are aliases of autobuildrequires(1).

2024-01-22 perl v5.38.2 User Contributed Perl Documentation