DNF5-BUILDDEP(8)
π DNF5-BUILDDEP(8) β like, the builddep command, bestie
okay so real talk: this is dnf5-builddep, straight out of the dnf5 manual (section 8, for the sysadmin girlies). it's the page that tells you how to make dnf go get all the stuff you need to build an RPM. buckle up π
β¨ NAME β¨
dnf5-builddep β the Builddep Command. that's her. that's the whole name.
πΈ SYNOPSIS πΈ
dnf5 builddep [options] [<package>...]
π¦ DESCRIPTION π¦
Install missing dependencies for building an RPM package. that's it, that's the vibe β you point at a package or a spec file, and she goes and fetches every little build requirement so your build doesn't flop π
β οΈ Warning, and I need you to actually read this one: build dependencies in a source package (i.e. src.rpm) might be different than you would expect, because the dependencies were evaluated according to the macros set on the package build host. so likeβ¦ somebody else's machine decided these, not yours. don't come for me about it π
β οΈ Warning number two: because build dependency information is only available in source packages, thednf5 builddepcommand ignoresenabled=0on the source repositories matching the naming convention<#repo-names-label>. yes, it just barges in. no cap. π
π OPTIONS π
-D "macro expr",--define="macro expr"β define a rpm macro. you're setting the value"expr"to the macro"macro"when parsing spec files. heads up: this does not apply for source rpm files π--with=OPTION,--without=OPTIONβ enable or disable conditional buildOPTIONwhen parsing spec files. also does not apply for source rpm files. iykyk π--allowerasingβ allow removing of installed packages to resolve any potential dependency problems. sometimes you gotta let her go βοΈ--skip-unavailableβ allow skipping packages that are not possible to downgrade. all remaining packages will be downgraded.--allow-downgradeβ enable downgrade of dependencies when resolving the requested operation. going backwards, on purpose, slay--no-allow-downgradeβ disable downgrade of dependencies when resolving the requested operation. the opposite of the above, iconically--from-repo=REPO_ID,...β packages (or their provides) explicitly specified on the command line will only be looked up in the specified repositories. these repositories are automatically enabled. repository enabling and disabling still applies. dependencies of these packages will be resolved from any enabled repository. very "these specific ones only, but her friends can come too" energy π«Ά--from-vendor=VENDOR,...β list of vendors separated by commas or spaces. globs are supported (e.g.--from-vendor='Fedora\ project, vendorA, vendorB*, vendorC'). packages (or their provides) explicitly specified on the command line will only be looked up from the specified vendors. the vendor change check is bypassed for these packages. the vendor is ignored, or vendor change policies (ifallow_vendor_change=0) will still be used for packages that satisfy dependencies. lowkey a lot, but we move π§--specβ treat command line arguments following this option as spec files. yes, following β order matters, bestie β--srpmβ treat command line arguments following this option as source rpms. same deal, order matters π--offlineβ store the transaction to be performed offline. see the offline command<#offline-command-ref-label>, anddnf5-offline(8)π΄--transientβ applicable only on bootc (bootable containers) systems. perform transactions using a transient overlay which will be lost on the next reboot. see also the persistence<#persistence-options-label>configuration option. it's giving "here for a good time, not a long time" π--store=PATHβ store the current transaction in a directory at the specifiedPATHinstead of running it. the stored transaction can be performed by the replay command<#replay-command-ref-label>,dnf5-replay(8). note that repository ids in the stored transaction are mangled to@stored_transaction(repo_id)β this is required because during replaying the stored repositories are recreated and they might collide with already present repositories (this doesn't apply to the special@Systemrepository). tldr: she renames things so they don't fight π
π ARGUMENTS π
<package>β either a path to a.src.rpm,.nosrc.rpmor.specfile, or a package available in a repository. your pick, main character π
π₯ EXAMPLES π₯
dnf builddep foobar.spec
install the needed build requirements, defined in the foobar.spec file.
dnf builddep foobar-1.0-1.src.rpm
install the needed build requirements, defined in the foobar-1.0-1.src.rpm file.
dnf builddep foobar-1.0-1
look up foobar-1.0-1 in enabled repositories and install build requirements for its source rpm.
dnf builddep -D 'scl python27' python-foobar.spec
install the needed build requirements for the python27 SCL version of python-foobar.
dnf builddep --without=selinux foobar.spec
install the needed build requirements except those for optional SELinux support.
π AUTHOR π
see AUTHORS.md in the dnf5 source distribution. the whole squad is credited there π«Ά
π COPYRIGHT π
contributors to the dnf5 project. that's the team, and they ate β¨
and that's the page!! this whole thing came from the dnf5 source, version dnf5, dated Oct 17, 2026 β so if you're reading this in the future, hiii, hope your build deps resolved ππΈ
periodt. π
π¦ where this page comes from
- arch rolling: dnf5 5.4.6.0-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms