Add already upstream patch to change dracut-initramfs-restore to hopefully not break oz/composes

This commit is contained in:
Kevin Fenzi 2022-04-19 16:12:23 -07:00
parent 937971c7d1
commit ce8caeca15
2 changed files with 42 additions and 1 deletions

34
1755.patch Normal file
View File

@ -0,0 +1,34 @@
From e488704701b73d05384cf38a017c055b95317b34 Mon Sep 17 00:00:00 2001
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
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

View File

@ -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 <kevin@scrye.com> - 056-2
- Add already upstream patch to change dracut-initramfs-restore to hopefully not break oz/composes
* Thu Mar 03 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 056-1
- Update to 056