Bug 2209412 - supermin, supermin-devel: prepare for DNF 5, don't depend on `dnf`
Summary: supermin, supermin-devel: prepare for DNF 5, don't depend on `dnf`
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: supermin
Version: rawhide
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2166026
TreeView+ depends on / blocked
 
Reported: 2023-05-23 19:43 UTC by Evan Goode
Modified: 2023-05-31 11:49 UTC (History)
1 user (show)

Fixed In Version: supermin-5.3.3-6.fc39
Clone Of:
Environment:
Last Closed: 2023-05-30 09:52:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Evan Goode 2023-05-23 19:43:03 UTC
Prepare for DNF 5, don't depend on `dnf`

(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 supermin 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/dnf-nightly/, and documentation is available here: https://dnf5.readthedocs.io/en/latest/.
- Alternatively, or in the meantime, change the supermin and supermin-devel packages 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 supermin and supermin-devel packages will break as long as they still depend on the `dnf` package.

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


Reproducible: Always

Comment 1 Richard W.M. Jones 2023-05-24 08:55:17 UTC
I don't get it - the COPR has dnf 4 (and all the Rawhide builds failed), not dnf 5 or dnf5.

Comment 2 Richard W.M. Jones 2023-05-24 09:08:17 UTC
Will the new binary always be called "dnf5"?  Or is it going to be called "dnf"?
The program has different behaviour, eg. does not support the -v option, so
this matters since if we just see a "dnf" program we will need to check which
version it is.

Comment 3 Evan Goode 2023-05-26 21:06:36 UTC
> I don't get it - the COPR has dnf 4 (and all the Rawhide builds failed), not dnf 5 or dnf5.

Sorry about that, I included the wrong link, here is the correct COPR: https://copr.fedorainfracloud.org/coprs/rpmsoftwaremanagement/dnf5-unstable/

> Will the new binary always be called "dnf5"?  Or is it going to be called "dnf"?

We intend to have "dnf" refer to DNF 5 going forward, and the preferred way to call DNF 5 will be /usr/bin/dnf rather than /usr/bin/dnf5. But /usr/bin/dnf5 will always be around to call DNF 5 explicitly to differentiate it from DNF 4.

And yes, DNF 5 is not fully backwards-compatible. To support both DNF 4 and DNF 5 at the same time, my suggestion is to change your spec file to conditionally depend on python3-dnf for versions of Fedora <= 38, and depend on dnf5 in newer versions:

```
%if 0%{?fedora} <= 38
Requires: python3-dnf
%else
Requires: dnf5
%endif
```

Then at runtime, call /usr/bin/dnf5 if it exists, and if not, fall back to the old DNF 4 at /usr/bin/dnf-3.

Comment 4 Jaroslav Mracek 2023-05-29 08:38:46 UTC
Richard if you discover anything that blocks you with DNF5 adoption, please don't hesitate to open the issue on our upstream - https://github.com/rpm-software-management/dnf5/issues.

Comment 5 Richard W.M. Jones 2023-05-30 08:05:17 UTC
I filed these bugs for missing features:

https://github.com/rpm-software-management/dnf5/issues/580
https://github.com/rpm-software-management/dnf5/issues/581

Comment 7 Richard W.M. Jones 2023-05-30 08:19:48 UTC
What about this:
BuildRequires: dnf-plugins-core                                                 

Should it be changed (eg. "dnf5-plugins-core") or removed?

Comment 8 Richard W.M. Jones 2023-05-30 08:23:08 UTC
So dnf5-plugins exists, apparently containing the sub-commands "builddep", "copr"
and "repoclosure" (we only need "dnf download").

dnf5 seems to contain the dnf download command.

So my guess is removing this line is the right thing.

Comment 9 Fedora Update System 2023-05-30 09:51:14 UTC
FEDORA-2023-d1afba9ba3 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-d1afba9ba3

Comment 10 Fedora Update System 2023-05-30 09:52:39 UTC
FEDORA-2023-d1afba9ba3 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Evan Goode 2023-05-30 18:34:47 UTC
Correct, yes the download command is part of dnf5 now, not dnf5-plugins.

Comment 12 Richard W.M. Jones 2023-05-31 11:49:36 UTC
This change causes the following problem:

https://bugzilla.redhat.com/show_bug.cgi?id=2211386


Note You need to log in before you can comment on or make changes to this bug.