carapace-sh/carapace-bin / skills/dnf5
dnf5
VerifiedUse when working with dnf5 — the next-generation RPM package manager for Fedora/RHEL. Covers CLI commands and options, configuration, plugin system (dnf5 active plugins and libdnf5 passive plugins), dnf5daemon D-Bus API, execution workflow, package specs (NEVRA), modularity, caching, migration from DNF4, libdnf5 library architecture, build system, and command-line aliases. Triggers on: "dnf5", "dnf", "libdnf5", "libdnf", "dnf5daemon", "dnf5-plugins", "libdnf5-plugins", "dnf5.conf", "repoquery", "versionlock", "distro-sync", "offline upgrade", "system-upgrade", "advisory", "comps", "modulemd", "NEVRA", "installroot", "forcearch", "repo variables", "metadata_expire", "setopt", "setvar", "config-manager", "repofrompath", "releasever", "basearch", "pluginpath".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.1 KB |
| references/aliases.md | markdown | 4.6 KB |
| references/build.md | markdown | 6.1 KB |
| references/caching.md | markdown | 4.6 KB |
| references/cli.md | markdown | 8.1 KB |
| references/comps.md | markdown | 1.7 KB |
| references/configuration.md | markdown | 15.7 KB |
| references/daemon.md | markdown | 13.4 KB |
| references/filtering.md | markdown | 2.2 KB |
| references/forcearch.md | markdown | 1.5 KB |
| references/installroot.md | markdown | 2.5 KB |
| references/libdnf5.md | markdown | 7.0 KB |
| references/migration.md | markdown | 8.5 KB |
| references/modularity.md | markdown | 4.1 KB |
| references/plugins.md | markdown | 16.2 KB |
| references/repo-variables.md | markdown | 2.4 KB |
| references/specs.md | markdown | 4.2 KB |
| references/system-state.md | markdown | 2.0 KB |
| references/workflow.md | markdown | 7.5 KB |
references/modularity.md
View on GitHub# DNF5 Modularity
Modularity is an alternative way of building, organizing, and delivering packages in RPM-based distributions. DNF5 supports modulemd metadata and modular package filtering.
> **Source of truth**: <https://dnf5.readthedocs.io/en/stable/misc/modularity.7.html>. For package filtering, see [filtering.md](filtering.md).
## Definitions
| Term | Description |
|------|-------------|
| **modulemd** | Metadata documents in repository `modules` metadata. Hold module info: `Name`, `Stream`, list of packages. |
| **(non-modular) package** | Package that doesn't belong to a module. |
| **modular package** | Package belonging to a module. Listed in modulemd under `artifacts`. Has `%{modularitylabel}` RPM header set. |
| **(module) stream** | A collection of packages, a virtual repository. Identified by `Name:Stream` (e.g., `postgresql:9.6`). |
## Stream States
| State | Description |
|-------|-------------|
| **active** | RPM packages from this stream are included in the available package set. |
| **inactive** | Packages from this stream are filtered out. |
A stream is **active** if:
- Marked as **default**, OR
- Explicitly **enabled** by a user action, OR
- Satisfies dependencies of default or enabled streams.
Only **one** stream of a particular module can be active at a given point in time.
## Package Filtering
Without modules, packages with the highest version are used by default. Module streams can distribute packages with lower versions than available in OS repositories.
### How It Works
Non-modular packages are filtered out when their **name or provide** matches against a modular package name from any enabled, default, or dependent stream.
**Note**: Modular source packages will not cause non-modular binary packages to be filtered out.
## Demodularized RPMs
Contains names of RPMs excluded from package filtering for a particular module stream. When defined in the latest active module, non-modular RPMs with the same name or provide that were previously filtered out will **reappear** in the available package set.
## Hotfix Repositories
In special cases, users want to cherry-pick individual packages provided outside module streams. To make packages from a repository available regardless of modularity:
```ini
# In .repo file
module_hotfixes=true
```
Or via CLI:
```bash
dnf5 --setopt=<repo_id>.module_hotfixes=true install <package>
```
**Important**: Hotfix packages do **not override** module packages. They only become part of the available package set. It is the package `Epoch`, `Version`, and `Release` that determines if the package is the latest.
## Fail-Safe Mechanisms
### When Repositories with Module Metadata Are Unavailable
Package filtering must keep working even when module metadata is unavailable. This happens when:
- User disables a repository via `--disable-repo` or uses `--repo`
- User removes a `.repo` file from disk
- Repository is not available and has `skip_if_unavailable=true`
DNF5 keeps copies of the **latest modulemd for every active stream** and uses them if no modulemd is available for the stream.
- Copies are made any time a transaction is resolved and started (includes RPM transactions and `dnf5 module <enable|disable|reset>` operations).
- When fail-safe data is used, DNF5 shows such modules as part of `@modulefailsafe` repository.
### Orphaned Modular Packages
All packages built as part of a module have `%{modularitylabel}` RPM header set. If such a package becomes part of an RPM transaction and **cannot be associated with any available modulemd**, DNF5 prevents it from getting 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.
## Configuration
| Option | Description |
|--------|-------------|
| `module_platform_id` | Override `PLATFORM_ID` from `/etc/os-release`. Format: `$name:$stream`. |
| `module_stream_switch` | Allow switching enabled streams of a module. Default: `False`. |
## Note on Fedora 39+
Modularity support was discontinued in dnf5 starting with Fedora 39. The `module` command is conditionally compiled with `WITH_MODULEMD`.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies. | Stars: 108k | Updated | Claude CodeCodex | Verified | Install |
| meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要". | Stars: 108k | Updated | Claude CodeCodex | Verified | Install |