forked from rpm-software-management/rpm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix FA_TOUCH'ed files getting removed on failed update
On install/update, most files are laid down with a temporary suffix and if the update fails, removing those at the end of the loop is the right thing to do. However FA_TOUCH'ed files were already there, we only update their metadata, and we better not remove them! AFAICS this all versions since rpm >= 4.14 in one way or the other. If %_minimize_writes is enabled then it affects way more than just unmodified config files. The test is a simplified version of pam update failing in the original report. Fixes: RHEL-54386
- Loading branch information
Showing
3 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Name: pamupdate | ||
Version: 1.0 | ||
Release: %{rel} | ||
Group: Testing | ||
License: Public domain | ||
Summary: Test config behavior on update failure | ||
BuildArch: noarch | ||
|
||
%description | ||
%{summary} | ||
|
||
%install | ||
mkdir -p ${RPM_BUILD_ROOT}/etc | ||
echo AAAA > ${RPM_BUILD_ROOT}/etc/my.conf | ||
echo BBBB > ${RPM_BUILD_ROOT}/etc/your.conf | ||
mkdir -p ${RPM_BUILD_ROOT}/var/run/faillock | ||
|
||
%files | ||
%config /etc/my.conf | ||
%config /etc/your.conf | ||
%dir /var/run/faillock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters