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, the dnf5 builddep command ignores enabled=0 on 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 build OPTION when 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 (if allow_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>, and dnf5-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 specified PATH instead 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 @System repository). tldr: she renames things so they don't fight πŸ“

πŸŽ€ ARGUMENTS πŸŽ€

  • <package> β€” either a path to a .src.rpm, .nosrc.rpm or .spec file, 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 🫢


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