From ce8caeca15fb889d81d80e587f2230ff00accb49 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Apr 19 2022 23:12:23 +0000 Subject: Add already upstream patch to change dracut-initramfs-restore to hopefully not break oz/composes --- diff --git a/1755.patch b/1755.patch new file mode 100644 index 0000000..d1624de --- /dev/null +++ b/1755.patch @@ -0,0 +1,34 @@ +From e488704701b73d05384cf38a017c055b95317b34 Mon Sep 17 00:00:00 2001 +From: Antonio Alvarez Feijoo +Date: Fri, 18 Mar 2022 15:42:42 +0100 +Subject: [PATCH] fix(dracut-initramfs-restore.sh): unpack uncompressed initrd + as last option + +Attempting to unpack the initrd assuming it is uncompressed when +it is delays the shutdown process by several seconds. This must +be the last check. +--- + dracut-initramfs-restore.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh +index 3c70b42c3..2efd798c5 100644 +--- a/dracut-initramfs-restore.sh ++++ b/dracut-initramfs-restore.sh +@@ -51,13 +51,13 @@ fi + + cd /run/initramfs + +-if $SKIP "$IMG" | cpio -id --no-absolute-filenames --quiet > /dev/null \ +- || $SKIP "$IMG" | zcat | cpio -id --no-absolute-filenames --quiet > /dev/null \ ++if $SKIP "$IMG" | zcat | cpio -id --no-absolute-filenames --quiet > /dev/null \ + || $SKIP "$IMG" | bzcat | cpio -id --no-absolute-filenames --quiet > /dev/null \ + || $SKIP "$IMG" | xzcat | cpio -id --no-absolute-filenames --quiet > /dev/null \ + || $SKIP "$IMG" | lz4 -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null \ + || $SKIP "$IMG" | lzop -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null \ +- || $SKIP "$IMG" | zstd -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null; then ++ || $SKIP "$IMG" | zstd -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null \ ++ || $SKIP "$IMG" | cpio -id --no-absolute-filenames --quiet > /dev/null; then + rm -f -- .need_shutdown + else + # something failed, so we clean up diff --git a/dracut.spec b/dracut.spec index 18f9acc..8b3cc8e 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 1 +%define dist_free_release 2 Name: dracut Version: 056 @@ -36,6 +36,10 @@ Source1: https://www.gnu.org/licenses/lgpl-2.1.txt # for debugging) - workaround for RHBZ #1964879 / upstream #1521, to # be removed when that is properly fixed Patch0: 0001-Never-enable-the-bluetooth-module-by-default-1521.patch +# Add upstream patch to change order of initramfs decompression to +# hopefully avoid compose failures due to oz trying to convert +# garbage output to utf-8 +Patch1: https://patch-diff.githubusercontent.com/raw/dracutdevs/dracut/pull/1755.patch BuildRequires: bash BuildRequires: git-core @@ -495,6 +499,9 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install %changelog +* Tue Apr 19 2022 Kevin Fenzi - 056-2 +- Add already upstream patch to change dracut-initramfs-restore to hopefully not break oz/composes + * Thu Mar 03 2022 Peter Robinson - 056-1 - Update to 056