manatools / dnfdragora

dnfdragora is a dnf frontend based on libyui abstraction
GNU General Public License v3.0
136 stars 41 forks source link

Prepare for DNF 5 #214

Open evan-goode opened 1 year ago

evan-goode commented 1 year ago

(I'm filing issues with all the packages that currently depend on dnf)

Starting in Fedora 39, the dnf command will be provided by the dnf5 package rather than the dnf package, and dnf5 will obsolete dnf. The old DNF 4 Python API will still be provided by python3-dnf, as well as the DNF 4 command, as /usr/bin/dnf-3.

To avoid breaking the Fedora upgrade, dnfdragora should switch to depending on python3-dnf rather than dnf.

And since /usr/bin/dnf will soon point to DNF 5, which has a slightly different command-line interface, any use of the /usr/bin/dnf binary should be replaced with calls to /usr/bin/dnf-3.

At some point, this project should consider a rewrite to adopt libdnf5, but the immediate issue is removing the dependency on dnf.

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

Conan-Kudo commented 1 year ago

With dnf5, there's a new dnfdaemon implementation provided by dnf5daemon-server. dnfdragora would need to switch to that.

alh61 commented 1 year ago

Fedora Rawhide (aka F39) switched to DNF5 now, resulting in Dnfdragora just opening and closing the main window again.

anaselli commented 1 year ago

will see if i can work on it. But i need to work on a fedora virtual machine first...

evan-goode commented 1 year ago

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 be DNF 5.

anaselli commented 1 year ago

Thanks for the news, since I'm not a daily Fedora user I was not aware of that.

Conan-Kudo commented 11 months ago

@evan-goode Is there a Python client for the dnfdaemon implementation included in DNF 5 that we can use to migrate dnfdragora to?

evan-goode commented 11 months ago

AFAIK no, we just have the C++ dnf5daemon client at the moment.

anaselli commented 10 months ago

Could you please point me to dnfdaemon api and the c++ client source code?

anaselli commented 10 months ago

Ok API should be here

Conan-Kudo commented 10 months ago

Looks like the group tag was missing in the dnf5daemon API, so I submitted a pull request to add it: https://github.com/rpm-software-management/dnf5/pull/1122

Conan-Kudo commented 10 months ago

This is in progress in the master branch right now.

evan-goode commented 9 months ago

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

anaselli commented 9 months ago

Well our master is moved to dnf5daemon for the most, i need to fix some signals code and all should be in iirc.

Anyway in my opinion dnf5daemon is not good (or let's say mature) enough to move to it. I had some crashes here and there because of requests lasting too long, and some old dnf 4 daemon features missing, especially to understand when a transaction ends.

anaselli commented 9 months ago

See for instance:

keithbowes commented 3 months ago

And since /usr/bin/dnf will soon point to DNF 5

I hope this is just for RedHat. I say let RedHat users be the guinea pigs and let those of us on other distros wait until the flood of bug reports that are introduced by the switch are fixed. (It's my understanding that dnfdragora is a Mageia thing that just happens to also be available on RedHat, not the other way around.)

anaselli commented 3 months ago

dnfdragora is not a Mageia thing, i just developed it there as a mageia user and contributor. Unfortunately I'm quite busy for my daily job so i cannot work to it as i wanted to. I'm always open to contributors, so that door is not close. Most of the above bugs should be closed or at least mitigated, and what is on git is usable but requires work to cut old functions that are not implemented in dnfdaemon yet and testing/fixing to make dnfdragora ready for production. Volunteers?