DNF4.MODULARITY(7)

πŸ“¦
version 4.23.0 Β· 5 versions
, in opensuse-leap 16.0

πŸ’… DNF4.MODULARITY(7) β€” like, the whole modularity situation, explained

okay so bestie, this is the manual page dnf4.modularity from the DNF manual (section 7, for the record) and it's literally all about Modularity in DNF. Buckle up πŸŽ€

So modularity is a whole new way of building, organizing and delivering packages. For more details see: https://docs.pagure.org/modularity/


✨ DEFINITIONS ✨

🌸 modulemd

Every repository can contain modules metadata with modulemd documents. These documents hold metadata about modules such as Name, Stream or list of packages. (yes, that's it, that's the whole vibe)

πŸ¦‹ (non-modular) package

A package that doesn't belong to a module. free agent. no module, no problem.

πŸ’œ modular package

A package that belongs to a module. It is listed in modulemd under the artifacts section. Modular packages can be also identified by having %{modularitylabel} RPM header set. iykyk πŸ‘‘

🌈 (module) stream

Stream is a collection of packages, a virtual repository. It is identified with Name and Stream from modulemd separated with colon, for example "postgresql:9.6". it's giving ✨named collection✨

Module streams can be active or inactive. active means the RPM packages from this stream are included in the set of available packages. Packages from inactive streams are filtered out. Streams are active either if marked as default or if they are explicitly enabled by a user action. Streams that satisfy dependencies of default or enabled streams are also considered active. Only one stream of a particular module can be active at a given point in time. one stream at a time, no cap, that's the rule πŸ”₯


🧚 PACKAGE FILTERING

Without modules, packages with the highest version are used by default. simple. iconic.

Module streams can distribute packages with lower versions than available in the repositories available to the operating system. To make such packages available for installs and upgrades, the non-modular packages are filtered out when their name or provide matches against a modular package name from any enabled, default, or dependent stream. Modular source packages will not cause non-modular binary packages to be filtered out. ok this part is important, don't @ me πŸ’€

πŸ“ Demodularized rpms

Contains names of RPMs excluded from package filtering for particular module stream. When defined in the latest active module, non-modular RPMs with the same name or provide which were previously filtered out will reappear. it's giving resurrection moment πŸ¦‹βœ¨


πŸ”₯ HOTFIX REPOSITORIES

In special cases, a user wants to cherry-pick individual packages provided outside module streams and make them available on along with packages from the active streams. Under normal circumstances, such packages are filtered out or rejected from getting on the system by Fail-safe mechanisms. To make the system use packages from a repository regardless of their modularity, specify module_hotfixes=true in the .repo file. This protects the repository from package filtering.

bestie pls note πŸ‘‘ the hotfix packages do not override module packages, they only become part of available package set. It's the package Epoch, Version and Release what determines if the the package is the latest.

πŸ’€ FAIL-SAFE MECHANISMS

πŸ™ˆ Repositories with module metadata are unavailable

When a repository with module metadata is unavailable, package filtering must keep working. Non-modular RPMs must remain unavailable and must never get on the system. that's the whole point, fr fr.

This happens when:

  • user disables a repository via --disablerepo or uses --repoid
  • user removes a .repo file from disk
  • repository is not available and has skip_if_unavailable=true

DNF keeps copies of the latest modulemd for every active stream and uses them if there's no modulemd available for the stream. This keeps package filtering working correctly. lowkey genius honestly πŸ’…

The copies are made any time a transaction is resolved and started. That includes RPM transactions as well as any dnf module <enable|disable|reset> operations.

When the fail-safe data is used, dnf show such modules as part of @modulefailsafe repository. cute little label for it 🌸

🌺 Orphaned modular packages

All packages that are built as a part of a module have %{modularitylabel} RPM header set. If such package becomes part of RPM transaction and cannot be associated with any available modulemd, DNF prevents from getting it on the system (package is available, but cannot be installed, upgraded, etc.). Packages from Hotfix repositories or Commandline repository are not affected by Fail-safe mechanisms. so if ur package is vibing in hotfix land it's fine, but otherwise it's a no 🫢


πŸ‘‘ AUTHOR

See AUTHORS in DNF source distribution.

2012-2020, Red Hat, Licensed under GPLv2+


and that's the whole page bestie πŸ’– this was version 4.23.0, dated Mar 19, 2025, manual DNF4.MODULARITY(7) β€” slay, go modular responsibly βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from