Introducing: the dnf module
When BlueBuild was created, Fedora Atomic only used rpm-ostree
to build images, install packages, and manage installed systems. rpm-ostree
is basically a mash-up of libostree
and libdnf
, which was made to handle composing OSTree images and managing OSTree-based systems, while existing in the RPM ecosystem.
However, focus slowly shifted to enabling bootable native container images based on the OCI standard, allowing the usage of standard tools such as docker
or buildah
to build images. This lessened the need for rpm-ostree
as a separate build tool for the images, since it was now just called from the OCI container build process, just like any other package manager. Additionally, the lackluster UX and potentially confusing architecture were starting to show, and for example, dependency resolution had issues not present in dnf
.
This made the Fedora project shift towards replacing rpm-ostree
with dnf5
, which would be updated to handle package management on OSTree-based systems, and bootc
, which would handle deploying the bootable container images alongside system administration tasks such as updating and switching base images. Since F41, bootc
and dnf5
have been included in all official images and are now the main way to build and manage Atomic systems, replacing rpm-ostree
.
The dnf
module
Section titled “The dnf module”For the past few months, the BlueBuild team has been working on a new module called dnf
that works as a repository and package management wrapper for dnf5
(and dnf4
if dnf5
isn’t available). The configuration structure for the module has been designed from the ground up to be intuitive and featureful. New features compared to the rpm-ostree
module are, for example, package group installation, installing packages from specific repositories, and managing COPR repositories.
The module is a part of our new batch of modules that are written in Nushell, a modern shell that is built on top of the Rust programming language. This approach makes the modules more maintainable and the source code more readable. You can read more about this change and decision process in the GitHub Issue and possibly a future blog post.
And yes, it can install Steam (this was a headache with rpm-ostree
because of dependency resolution issues).
type: dnfrepos: files: - https://negativo17.org/repos/fedora-steam.repoinstall: packages: - install-weak-deps: false packages: - steam - kernel-modules-extra
Switching from rpm-ostree
to dnf
Section titled “Switching from rpm-ostree to dnf”To switch to the dnf
module, switch the module type from rpm-ostree
to dnf
. Make sure to check out the module reference page to see how to use the new module. Below is a short list of the main differences between the two modules.
- Changes to the
repos:
section- The
rpm-ostree
module used to have arepos:
section that was a list of repo files. - The
dnf
module’srepos:
section supports adding repositories from files and COPR directly, adding repository keys, and choosing a nonfree repository (rpmfusion or negativo17). - The section
repos: files:
in thednf
module is equivalent to therepos:
section in therpm-ostree
module. - The proper way to add COPR repositories is to use the
repos: copr:
section in thednf
module.
- The
- Changes to the
install:
andremove:
sections- The
rpm-ostree
module used to haveinstall:
andremove:
sections that were lists of packages to install/remove. - The
dnf
module’sinstall:
andremove:
sections support setting flags for the package manager. - The section
install: packages:
in thednf
module is equivalent to theinstall:
section in therpm-ostree
module. - The list of packages also supports including sublists of packages to install from a specific repository or with specific flags.
- The
- Changes to the
replace:
section- While the syntax remains the same, the
replace:
section in thednf
module supports setting flags for the package manager. - The
from-repo:
parameter now takes the name of the repository to replace from, and the repository has to be added earlier in therepos:
section.
- While the syntax remains the same, the
- New sections
- The
group-install:
andgroup-remove:
sections are new to thednf
module.
- The