Bug 2209405

Summary: Prepare for DNF 5, don't depend on `dnf`
Product: [Fedora] Fedora Reporter: Evan Goode <egoode>
Component: rbmAssignee: Petr Pisar <ppisar>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: ppisar
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rbm-0.4^20240215git10c6b24-2.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-06-18 10:36:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2166026    

Description Evan Goode 2023-05-23 19:26:01 UTC
(I'm filing issues with all the packages that currently depend on `dnf`.)

DNF 5 is a new package manager that will replace DNF 4 in Fedora 39+:  Starting in Fedora 39, the `dnf` command will be provided by the `dnf5` package rather than the `dnf` package, and `dnf5` will obsolete `dnf`. Since rbm currently depends on DNF 4, it should choose one of the following strategies to avoid breaking the Fedora upgrade:

- Add support for DNF 5, and depend on the `dnf5` package in Fedora 39+ instead of `dnf`. Builds of DNF 5 are available in this COPR repository: https://copr.fedorainfracloud.org/coprs/rpmsoftwaremanagement/dnf5-unstable/, and documentation is available here: https://dnf5.readthedocs.io/en/latest/.
- Alternatively, or in the meantime, change the rbm package to depend on `python3-dnf` instead of `dnf`, and call the `dnf-3` binary instead of `dnf`. The old DNF 4 command will still be available in the distribution, but only as `dnf-3` (the binary is called `dnf-3`  rather than `dnf4` for historical reasons; it is the "Python 3 version" of DNF). The first option is preferred to this one; it is not recommended to modify installed software using both DNF 4 and DNF 5 on the same system.
- Or, if this package is no longer being maintained, consider removing it from Fedora.

At some point, this project should adopt DNF 5, but the immediate issue is removing the dependency on `dnf`. We are planning to replace DNF with DNF5 in Fedora Rawhide very soon, by 2023-06-01, and the rbm package will break as long as it still depends on the `dnf` package.

For more information about the switch to DNF 5, see https://fedoraproject.org/wiki/Changes/ReplaceDnfWithDnf5.


Reproducible: Always

Comment 1 Petr Pisar 2023-07-28 14:09:11 UTC
This change was reverted in rbm-0.4^20230626git37c204c-3.fc39 because DNF5 is not yet ready.
This request will be revisited in Fedora 41.

Comment 2 Fedora Release Engineering 2023-08-16 08:07:41 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 3 Evan Goode 2024-02-08 23:10:25 UTC
The Fedora 41 development cycle is beginning, and we are planning to obsolete DNF 4 by DNF 5 in Fedora Rawhide within the next few weeks. Again, libdnf is not going away, and the old DNF 4 command will still be available as `/usr/bin/dnf-3`, but `/usr/bin/dnf` will be DNF 5, which has a slightly different command-line interface. Packages should no longer depend on the `dnf` package in Fedora 41+.

Comment 4 Petr Pisar 2024-02-15 12:55:44 UTC
I will implement this change once dnf5 starts providing /usr/bin/dnf. My package executes that program.