AUTOBUILDREQUIRES(1)
π AUTOBUILDREQUIRES(1) π
okay so bestie, this is a page from the User Contributed Perl Documentation section, and it's about a little tool called autobuildrequires that does your homework for you. no cap. π
β¨ NAME β¨
autobuildrequires β figure out the BuildRequires of an RPM build, automatically, like magic πͺ
πΈ SYNOPSIS πΈ
auto-br-rpmbuild -ba foo.spec
auto-br [build-command ...]
that's it. that's the whole vibe. π¦
π DESCRIPTION π
So Autobuildrequires looks at an RPM package build and works out which BuildRequires lines it actually needs. it's giving detective energy πβ¨
Instead of running rpmbuild like a normal person, you run this instead:
auto-br-rpmbuild -ba foo.spec
(and yes, all the usual rpmbuild flags are supported, so you don't have to unlearn anything π). The command builds your package, and then it prints out a list of BuildRequires lines that it thinks your package needs. iconic behaviour honestly π
Now β if your build command is more complicated and/or it doesn't use rpmbuild at all, then use this instead:
auto-br [build-command ...]
For example:
auto-br make
look at her go πβοΈπ¨
π§ HOW IT WORKS π§
okay this is the part where it gets lowkey genius. the basic "magic" is a C LD_PRELOAD module called auto-buildrequires-preload.c, and what it does is intercept some system calls to figure out which files the build is looking at π. those get logged to a simple text file. so it's basically a little spy camera for file access, but make it legal π΅οΈβοΈπ
Then the Perl analysis script, auto-br-analyze.pl, runs afterwards on that logfile, and it uses rpm to find out which packages those files belong to. Those get printed out as your list of BuildRequires. slay π
And a shell script, auto-br, brings the whole thing together. she's the main character holding the group project together fr fr π«Ά
π₯ EXIT STATUS π₯
This program returns 0 if it worked, or non-zero if there was an error. no in-between, bestie. π
π SEE ALSO π
go read those if you want the lore πβ¨
π AUTHORS π
Richard W.M. Jones <http://people.redhat.com/~rjones/>
we stan a legend π«Άπ
π COPYRIGHT π
Copyright (C) 2008-2015 Red Hat Inc.
and that's the whole page, bestie!! this one's from perl v5.42.0 and it was dated 2025-07-23 β so yeah, she's been around a minute and she still eats π
β¨ bye ily π¦π
π¦ where this page comes from
- fedora 43: auto-buildrequires 1.3-12.fc43 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms