November 20, 2024

Fedora 41 -- DNF automatic problems

A little over 2 weeks ago I upgraded to Fedora 41.

I noticed updates piling up and not getting installed. This implies that DNF automatic is not running properly.

I try installing the "dnf-automatic" package -- it is installed, as it should be.

Fedora 41 introduced dnf5 to replace dnf. In fact "dnf" is now a symbolic link to "dnf5" in /usr/bin.

I take a look at /etc/dnf/automatic.conf. The file is there as it should be without any hanky panky with dnf renaming it or anything.

I try this:

systemctl status dnf-automatic
○ dnf5-automatic.service - dnf5 automatic
     Loaded: loaded (/usr/lib/systemd/system/dnf5-automatic.service; static)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf, 50-keep-warm.conf
     Active: inactive (dead)
 TriggeredBy: ● dnf5-automatic.timer
That is not good. You used to start the service via:
systemctl enable dnf-automatic.timer
systemctl start dnf-automatic.timer
We have a new fancy dnf5 now, so they felt a need to rename this, so:
systemctl enable dnf5-automatic.timer
systemctl start dnf5-automatic.timer
This does not seem to get it done, so this is suggested:
systemctl enable --now dnf-automatic-install
But it just fails -- that service does not exist.

A plugin has replaced it

What you now want is this:
dnf5-plugin-automatic
I try installing it and it is already installed.

They say there should be a file:

/etc/dnf/dnf5-plugins/automatic.conf
There is no such file (no doubt the root of my problem), although the directory exists.

No documentation, so try things

su
cd /etc/dnf/dnf5-plugins
cp ../automatic.conf .
systemctl restart dnf5-automatic.timer
That seems to have done it. Maybe. No it has not, after a week, the updates are just piling up and nothing automatic is happening. See below.
systemctl status dnf5-automatic.timer
● dnf5-automatic.timer - dnf-automatic timer
     Loaded: loaded (/usr/lib/systemd/system/dnf5-automatic.timer; disabled; pr>
     Active: active (waiting) since Wed 2024-11-20 23:02:17 MST; 8s ago
 Invocation: fcc63f55f78d4d61bc38df4bd3d26d18
    Trigger: Thu 2024-11-21 06:52:16 MST; 7h left
   Triggers: ● dnf5-automatic.service
I am surprised that the syntax of the file has not changed and errors reported.

Nuke it all and start over

It is December 1, 2024 -- updates are piling up and nothing automatic is happening.
su
cd /etc/dnf
mv automatic.conf tt_automatic.BAK
dnf remove dnf5-plugin-automatic
dnf install dnf5-plugin-automatic
systemctl start dnf5-automatic.timer
systemctl status dnf5-automatic.timer
I finish this and there is no conf file I can find. At the end of the install, it does say:
Complete!ng trigger-install scriptlet: systemd-0:256.8-1.fc41.x86_6486_64
I dig around and find this tidbit:
The configuration is now read from /etc/dnf/dnf5-plugins/automatic.conf.
If this file does not exist, then the distribution configuration file
from /usr/share/dnf5/dnf5-plugins/automatic.conf is used.
Sure enough, this file exists. I could copy it to /etc/dnf, but I will just edit this instead as follows. I change only this line from no to yes:
apply_updates = yes

One last thing

This seems absolutely critical:
systemctl enable dnf5-automatic.timer
Why don't they document all this?
Have any comments? Questions? Drop me a line!

Adventures in Computing / tom@mmto.org