auter icon indicating copy to clipboard operation
auter copied to clipboard

Prepare for DNF 5

Open evan-goode opened this issue 1 year ago • 4 comments

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 Auter currently depends on DNF 4, Auter 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. The command-line interface isn't changing a whole lot between DNF 4 and DNF 5, so in Auter's case, this option may not be too difficult. 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/.
  • Change the auter 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 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.
  • Remove the package from Fedora if it is no longer being maintained (although it seems like it is; https://github.com/rackerlabs/auter/issues/242).

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

evan-goode avatar May 11 '23 21:05 evan-goode

Thanks for the heads up Evan, I think we'll have a look at what is required to work with dnf5

mark-hyde avatar May 12 '23 13:05 mark-hyde

It seems that dnf5 does not yet implement the --downloadonly option for 'upgrade' which is used to download the packages during the prep phase.

I can see that there is a new 'download' command, but don't yet see a way to download just the packages which would be updated during a 'dnf upgrade' (after dependency resolution has taken place).

Since the ability to run --prep at (roughly) the same time across all devices in an estate, and then --apply those packages at different points in the future is key to auters functionality we're going to need (ideally) for the downloadonly option to be added to dnf5, or try to find a workaround involving the functionality already available.

mark-hyde avatar May 16 '23 10:05 mark-hyde

Hi, as you may be aware, the switch to DNF 5 has been postponed, likely to Fedora 41. In Fedora 39, the dnf command will be provided by the dnf package, and DNF 5 will not be installed by default.

In the meantime, we have set up a testing COPR repository that provides a version of DNF 5 that obsoletes DNF 4. It can be used to test software in an environment similar to the future release of Fedora (whichever that will be) when DNF 5 replaces DNF 4:

sudo dnf-3 copr enable rpmsoftwaremanagement/dnf5-testing

Enabling the COPR and upgrading your system should replace DNF 4 (the dnf package) with DNF 5 (dnf5), and /usr/bin/dnf will point to DNF 5.

evan-goode avatar Aug 15 '23 21:08 evan-goode

Just a heads-up, 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+.

evan-goode avatar Feb 08 '24 22:02 evan-goode