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

Closed
1 task done
jelly opened this issue Apr 4, 2024 · 3 comments · Fixed by #20492
Closed
1 task done

dnf5 compatibility tracking issue #20260

jelly opened this issue Apr 4, 2024 · 3 comments · Fixed by #20492
Assignees

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.

jelly added a commit to jelly/cockpit that referenced this issue May 14, 2024
DNF 5 changed the systemd timers for dnf-automatic, this commit does not
make Cockpit compatible with the new timers and configuration but
unbreaks the current TF rawhide tests.

Related: cockpit-project#20260
@jelly
Copy link
Member Author

jelly commented May 14, 2024

It seems dnf5 now is the default in rawhide and there no longer is an alias to dnf-automatic-install.timer. I've adjusted our tests in a PR so rawhide tests no longer fail.

jelly added a commit to jelly/cockpit that referenced this issue May 15, 2024
Cockpit is not yet compatible with the new DNF 5 automatic plugin.

Related: cockpit-project#20260
jelly added a commit to jelly/cockpit that referenced this issue May 15, 2024
DNF 5 changed the systemd timers for dnf-automatic, this commit does not
make Cockpit compatible with the new timers and configuration but
unbreaks the current TF rawhide tests.

Related: cockpit-project#20260
jelly added a commit to jelly/cockpit that referenced this issue May 15, 2024
Cockpit is not yet compatible with the new DNF 5 automatic plugin.

Related: cockpit-project#20260
mvollmer pushed a commit that referenced this issue May 16, 2024
DNF 5 changed the systemd timers for dnf-automatic, this commit does not
make Cockpit compatible with the new timers and configuration but
unbreaks the current TF rawhide tests.

Related: #20260
mvollmer pushed a commit that referenced this issue May 16, 2024
Cockpit is not yet compatible with the new DNF 5 automatic plugin.

Related: #20260
martinpitt added a commit to martinpitt/cockpit that referenced this issue May 21, 2024
Split DnfImpl into the old Dnf4Impl and a new Dnf5Impl. The behaviour is
too different to handle them in the same class: With dnf4 we are
enabling the *-install.timer and have an existing config file, while
dnf5 only has a single timer and controls everything else in the config
file. Also, there is no default config file with dnf5, so we need a
different approach for parsing/updating it.

Fixes cockpit-project#20260
martinpitt added a commit to martinpitt/cockpit that referenced this issue May 21, 2024
Split DnfImpl into the old Dnf4Impl and a new Dnf5Impl. The behaviour is
too different to handle them in the same class: With dnf4 we are
enabling the *-install.timer and have an existing config file, while
dnf5 only has a single timer and controls everything else in the config
file. Also, there is no default config file with dnf5, so we need a
different approach for parsing/updating it.

Fixes cockpit-project#20260
martinpitt added a commit to martinpitt/cockpit that referenced this issue May 21, 2024
Split DnfImpl into the old Dnf4Impl and a new Dnf5Impl. The behaviour is
too different to handle them in the same class: With dnf4 we are
enabling the *-install.timer and have an existing config file, while
dnf5 only has a single timer and controls everything else in the config
file. Also, there is no default config file with dnf5, so we need a
different approach for parsing/updating it.

Fixes cockpit-project#20260
mvollmer pushed a commit that referenced this issue May 22, 2024
Split DnfImpl into the old Dnf4Impl and a new Dnf5Impl. The behaviour is
too different to handle them in the same class: With dnf4 we are
enabling the *-install.timer and have an existing config file, while
dnf5 only has a single timer and controls everything else in the config
file. Also, there is no default config file with dnf5, so we need a
different approach for parsing/updating it.

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

Successfully merging a pull request may close this issue.

3 participants