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

dnf5 compatibility tracking issue #20260

Open
1 task
jelly opened this issue Apr 4, 2024 · 2 comments
Open
1 task

dnf5 compatibility tracking issue #20260

jelly opened this issue Apr 4, 2024 · 2 comments
Assignees
Labels

Comments

@jelly
Copy link
Member

jelly commented Apr 4, 2024

There is a Fedora 41 proposal to switch to dnf5 this impacts PackageKit and dnf-automatic. See this proposal.

Impact:

@jelly jelly changed the title dnf5 dnf5 compatibility tracking issue Apr 4, 2024
@AdamWill
Copy link
Contributor

Note, the update now exists in Bodhi for testing - https://bodhi.fedoraproject.org/updates/FEDORA-2024-8a41ea93a2 . The openQA tests show that cockpit still pulls in the dnf4 dnf-automatic rather than the dnf5 dnf-plugin-automatic.

@martinpitt martinpitt self-assigned this May 6, 2024
@martinpitt
Copy link
Member

I did an initial manual test for this. On our rawhide image:

dnf remove -y dnf-automatic
dnf5 install -y dnf5-plugin-automatic

This became structurally easier, there is now just one dnf5-automatic.timer (plus dnf-automatic.timer alias), no -*install variant any more. However, now I'm a bit lost -- https://dnf5.readthedocs.io/en/latest/changes.html says "Different configuration file locations and some changes in format", but the manpage still talks about /etc/dnf/automatic.conf. However, dnf5-plugin-automatic does not ship any config file, nor does any other package (find /etc/dnf/ -name '*auto*'), and the dnf-automatic-notifyonly.timer reference and "Some other timer units are provided" are clearly obsolete.

When I simulate a timer event with systemctl start dnf5-automatic, it merely download available updates (according to the journal). When I create a config according to the manpage:

# cat /etc/dnf/automatic.conf
[commands]
apply_updates = True

it still only uploads, so it doesn't really look at that file.

$ strace -e trace=file /usr/bin/dnf5 automatic
[...]
newfstatat(AT_FDCWD, "/etc/dnf/dnf5-plugins/automatic.conf", 0x7ffee3c912d0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/share/dnf5/dnf5-plugins/automatic.conf", 0x7ffee3c912d0, 0) = -1 ENOENT (No such file or directory)

Aha! I moved the file to that place. When I run dnf5 automatic now, it installs packages.

I also tried to add "reboot = when-needed". My currently available updates include the kernel, and it correctly schedules a reboot after updates.

I filed https://bugzilla.redhat.com/show_bug.cgi?id=2279257 about the outdated manpage, and https://bugzilla.redhat.com/show_bug.cgi?id=2279258 about the missing config file. In the latter I also asked how exactly Cockpit is supposed to enable auto-upgrades with dnf5. I'll let the dnf team respond to that first before changing our code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants