Bug 2209411

Summary: Prepare for DNF 5, don't depend on `dnf`
Product: [Fedora] Fedora Reporter: Evan Goode <egoode>
Component: subscription-managerAssignee: Pino Toscano <ptoscano>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: bkearney, csnyder, jhnidek, ptoscano, redakkan, wpoteat
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-02 16:12:09 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:38:46 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 owned by the `dnf5` package rather than the `dnf` package, and `dnf5` will obsolete `dnf`. Since subscription-manager currently depends on `dnf`, it should choose one of the following strategies to avoid breaking the approaching Fedora upgrade and maintain compatibility with future versions of Fedora:
- Add support for DNF 5 and depend on the `libdnf5` or `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 subscription-manager package to depend on `python3-dnf` instead of `dnf`. The Python API and /usr/bin/dnf-3 have always been provided by `python3-dnf`, while `dnf` provides the symlink from /usr/bin/dnf to /usr/bin/dnf-3. Once `dnf` is obsoleted, 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 was originally the Python 3 version of DNF).

subscription-manager should eventually be rewritten as a DNF 5 plugin, but the immediate issue is dropping the dependency on `dnf`. We are planning to replace DNF with DNF 5 in Fedora Rawhide very soon, in the next couple weeks, and the `subscription-manager` 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 Evan Goode 2023-05-23 19:40:18 UTC
I filed a separate bug for the libdnf-plugin-subscription-manager package, sorry for any confusion: https://bugzilla.redhat.com/show_bug.cgi?id=2209387

Comment 2 Pino Toscano 2023-08-02 16:12:09 UTC
Uploaded to Rawhide:

https://bodhi.fedoraproject.org/updates/FEDORA-2023-849c7e74a2