Dear etckeeper developers,
Fedora 41 ships with DNF 5, and CentOS Stream and Red Hat Enterprise Linux 11 will ship with DNF 5 as well in 2027/8
Plugins need to be rewritten to keep working - including for etckeeper:
https://dnf5.readthedocs.io/en/stable/tutorial/plugins/index.html
(Python plugins are also now possible, the documentation is out of date; see e.g. https://github.com/rpm-software-management/dnf5/blob/main/libdnf5-plugins/python_plugins_loader/plugin.py)
Until then, etckeeper "works" in Fedora but requires manually committing; the automatic commit per DNF transaction no longer works.
As reported by a Fedora user: https://bugzilla.redhat.com/show_bug.cgi?id=2326283
Best regards,
-- Michel Lind
Fedora package maintainer
I'm happy to add it once someone develops a patch.
I guess it would make sense to remove the current support for DNF from etckeeper eventually?
Since dnf5 plugins have to be implemented in c++ while etckeeper plugin needs to just run
etckeeper pre-install
oretckeeper post-install
, I investigated whether one can use Actions plugin to achieve that using simple config file (without writing new glue code).And it turned out that dnf5 Actions plugin lacked a way to propagate errors, which was implemented via dnf#2023, available since dnf 5.2.11.0.
So with dnf >= 5.2.11.0 the following config file:
Will do the job. Tested on Fedora 41 with dnf5-5.2.12.0-2.fc41.x86_64:
See proposed patch in https://gitlab.com/marbu/etckeeper.branchable.com/-/commit/2a292f255be2363423a0e0a5a1169d8f6a8e3755
I noticed a problem in my proposal (when the transaction proceeds, the dnf5 assumes particular output format which
etckeeper post-install
obviously doesn't follow) and fixed it by droppingraise_error=1
from the post transaction hook (this is not necessary anyway).Updated patch in dnf5 branch here: https://gitlab.com/marbu/etckeeper.branchable.com/-/blob/dnf5/etckeeper-dnf5/etckeeper.actions?ref_type=heads