AUTOBUILDREQUIRES
NAME
autobuildrequires − Work out the BuildRequires of an RPM build automatically
SYNOPSIS
auto−br−rpmbuild −ba foo.spec
auto−br [build−command ...]
DESCRIPTION
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/>
AUTHORS
Richard W.M. Jones <http://people.redhat.com/~rjones/>
COPYRIGHT
Copyright (C) 2008−2015 Red Hat Inc.