From eeb15e69eeaba4a0752e3eee875954c5fda4dcd4 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Apr 19 2021 15:38:06 +0000 Subject: Fix removal of key system files when kdump enabled (#1936781) --- diff --git a/0001-Partially-revert-41cfdfc-to-fix-RHBZ-1936781-per-ryn.patch b/0001-Partially-revert-41cfdfc-to-fix-RHBZ-1936781-per-ryn.patch new file mode 100644 index 0000000..a706714 --- /dev/null +++ b/0001-Partially-revert-41cfdfc-to-fix-RHBZ-1936781-per-ryn.patch @@ -0,0 +1,31 @@ +From 9db78bc16fc66d1200ab032bd667809a4404c869 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Mon, 19 Apr 2021 08:33:38 -0700 +Subject: [PATCH] Partially revert 41cfdfc to fix RHBZ #1936781 per @ryncsn + +Signed-off-by: Adam Williamson +--- + dracut.sh | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 062ed6c1..71942ce1 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -2059,8 +2059,11 @@ if dracut_module_included "squash"; then + + # Remove duplicated files + for folder in "${squash_candidate[@]}"; do +- find "$initdir/$folder/" -not -type d \ +- -exec bash -c 'mv -f "$squash_dir${1#$initdir}" "$1"' -- "{}" \; ++ for file in $(find $initdir/$folder/ -not -type d); do ++ if [[ -e $squash_dir${file#$initdir} ]]; then ++ mv -f $squash_dir${file#$initdir} $file ++ fi ++ done + done + fi + +-- +2.31.1 + diff --git a/dracut.spec b/dracut.spec index 0fd54ac..3e4261e 100644 --- a/dracut.spec +++ b/dracut.spec @@ -5,7 +5,7 @@ # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config -%define dist_free_release 2 +%define dist_free_release 3 Name: dracut Version: 053 @@ -36,6 +36,9 @@ Source1: https://www.gnu.org/licenses/lgpl-2.1.txt # https://bugzilla.redhat.com/show_bug.cgi?id=1946074 # https://bugzilla.redhat.com/show_bug.cgi?id=1945596 Patch0: 0001-fix-network-manager-no-default-deps-for-nm-run.servi.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1936781#c6 +# Should fix loss of critical system files with kdump enabled +Patch1: 0001-Partially-revert-41cfdfc-to-fix-RHBZ-1936781-per-ryn.patch BuildRequires: bash BuildRequires: git-core @@ -485,6 +488,9 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install %changelog +* Mon Apr 19 2021 Adam Williamson - 053-3 +- Fix removal of key system files when kdump enabled (thanks kasong) (#1936781) + * Thu Apr 08 2021 Adam Williamson - 053-2 - Backport upstream change reported to fix boot on some encrypted LVM setups (#1946074)