Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for DNF 5 #245

Open
evan-goode opened this issue May 11, 2023 · 4 comments
Open

Prepare for DNF 5 #245

evan-goode opened this issue May 11, 2023 · 4 comments
Assignees
Labels
Enhancement Feature requests and existing code improvements Fedora WIP Work in progress

Comments

@evan-goode
Copy link

evan-goode commented May 11, 2023

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; Is this project being maintained? #242).

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

@mark-hyde
Copy link
Contributor

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

@mark-hyde mark-hyde self-assigned this May 16, 2023
@mark-hyde mark-hyde added Enhancement Feature requests and existing code improvements Fedora WIP Work in progress labels May 16, 2023
@mark-hyde
Copy link
Contributor

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.

@evan-goode
Copy link
Author

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
Copy link
Author

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+.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Feature requests and existing code improvements Fedora WIP Work in progress
Projects
None yet
Development

No branches or pull requests

2 participants