Bug 2326283
Summary: | etckeeper stop committing on dnf package install/remove | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jonathan GASNIER <samael+redhat> |
Component: | etckeeper | Assignee: | Thomas Moschny <thomas.moschny> |
Status: | NEW --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 41 | CC: | alberto, martin.bukatovic, michel, philippe, thomas.moschny, twegener |
Target Milestone: | --- | Keywords: | Upgrades |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | Type: | --- | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 2328105 |
Description
Jonathan GASNIER
2024-11-14 15:16:43 UTC
This is due to Fedora switching to dnf5 for Fedora 41 - the etckeeper dnf plugin is not ported yet. It just came up in the ELN meeting (we're discussing what porting work is needed to make everything DNF5 compatible for the upcoming CentOS Stream 11 / RHEL 11) so I'll get a tracking bug created for Fedora to drive this. Reported upstream: https://etckeeper.branchable.com/forum/RFE:_please_add_support_for_DNF_5/ I tried to use Actions plugin[1] to run etckeeper via pre and post installation hooks like this: ``` # cat /etc/dnf/libdnf5-plugins/actions.d/etckeeper.actions pre_transaction::::etckeeper pre-install post_transaction::::etckeeper post-install ``` It seems to work, but but when `etckeeper pre-install` fails (with non zero return code), there is no way propagate this error to prevent dnf to continue and start the transaction. This is a problem eg. when you use AVOID_COMMIT_BEFORE_INSTALL=1. So if you use AVOID_COMMIT_BEFORE_INSTALL=0, you can try that etckeeper.actions approach as a workaround until there is a proper libdnf5 plugin. When I have a minimal working libdnf5 plugin, I will share it here. That said, I'm also considering reaching out to the maintainers of the actions plugin, as if they will be ok with extending error handling, etckeeper dnf5 integration could be implemented in a simple 2 line config file which the upstream could easily accept. [1] https://dnf5.readthedocs.io/en/latest/libdnf5_plugins/actions.8.html (In reply to Martin B. from comment #3) > reaching out to the maintainers of the actions > plugin, as if they will be ok with extending error handling, etckeeper dnf5 > integration could be implemented in a simple 2 line config file which the > upstream could easily accept. https://github.com/rpm-software-management/dnf5/issues/2023 With https://github.com/rpm-software-management/dnf5/issues/2023 implemented (since dnf5 5.2.11.0, Actions plugin version 1.4), it's possible to create a proper etckeeper plugin using Actions plugin config file. I'm proposing it upstream here: https://etckeeper.branchable.com/forum/RFE:_please_add_support_for_DNF_5/#comment-1b321f85ebaa5a57fa04a00c50c8f63e When it will reach fedora, we will need to create a new subpackage etckeeper-dnf5 which will provide etckeeper.actions file as /etc/dnf/libdnf5-plugins/actions.d/etckeeper.actions |