Bug 2383751
| Summary: | etckeeper-dnf5 doesn't stop transaction when /etc is not clean | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Martin B. <martin.bukatovic> |
| Component: | etckeeper | Assignee: | Thomas Moschny <thomas.moschny> |
| Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 42 | CC: | alberto, thomas.moschny |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | --- | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2026-06-08 18:00:28 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Martin B.
2025-07-27 12:34:42 UTC
Let's ask dnf5 developers first before we decide how to handle this properly. I initiated the discussion upstream: https://github.com/rpm-software-management/dnf5/discussions/2366 Thinking about it again, errors are swallowed not by the fact that we add `log.INFO=` per se, but doing it in a pipe.
Therefore, adding "set -o pipefail" should help.
The proposal for /etc/dnf/libdnf5-plugins/actions.d/etckeeper.actions would therefore be:
# to be placed in /etc/dnf/libdnf5-plugins/actions.d
# requires dnf5 5.2.11.0 or later
pre_transaction:::raise_error=1:/usr/bin/sh -c set\ -o\ pipefail\;\ /usr/bin/etckeeper\ pre-install\ \|\ /usr/bin/sed\ -e\ 's/^/log.INFO=/'
post_transaction::::/usr/bin/sh -c DNF_PID=${pid}\ /usr/bin/etckeeper\ post-install\ \|\ /usr/bin/sed\ -e\ 's/^/log.INFO=/'
(also taking into account changes proposed in bug 2387561 and bug 2383375)
Or, after looking at https://dnf5.readthedocs.io/en/latest/dnf5_workflow.html, the goal_resolved hook should be even better. This message is a reminder that Fedora Linux 42 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 42 on 2026-05-13. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '42'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 42 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed. Fedora Linux 42 entered end-of-life (EOL) status on 2026-05-27. Fedora Linux 42 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed. |