AUTOBUILDREQUIRES(1)

πŸ“¦
version 1.3 Β· 2 versions
, in fedora 43

πŸ’– 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 (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