dracut-057-70.git20240819

Resolves: RHEL-26114,RHEL-35890,RHEL-53114
This commit is contained in:
Pavel Valena 2024-08-19 11:11:36 +02:00
parent 0f33f8ca64
commit 912a29239b
4 changed files with 111 additions and 1 deletions

25
0067.patch Normal file
View File

@ -0,0 +1,25 @@
From f194130f4f15d2c8159fb8adee76bb53ee5b82f5 Mon Sep 17 00:00:00 2001
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Date: Mon, 18 Jul 2022 11:03:32 +0200
Subject: [PATCH] fix(systemd): set right permissions for the machine-id file
(cherry picked from commit 455dbb585583bd2e1d40ebb61c335a2ad6dff053)
Resolves: RHEL-53114
---
modules.d/00systemd/module-setup.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
index 27d2180d..38393855 100755
--- a/modules.d/00systemd/module-setup.sh
+++ b/modules.d/00systemd/module-setup.sh
@@ -194,6 +194,7 @@ install() {
if ! [[ -e "$initdir/etc/machine-id" ]]; then
: > "$initdir/etc/machine-id"
+ chmod 444 "$initdir/etc/machine-id"
fi
# install adm user/group for journald

35
0068.patch Normal file
View File

@ -0,0 +1,35 @@
From b925190ab3b040c67fb217e0f135c0b92f056402 Mon Sep 17 00:00:00 2001
From: Pavel Valena <pvalena@redhat.com>
Date: Fri, 16 Aug 2024 20:40:15 +0200
Subject: [PATCH] feat(lsinitrd.sh): look for initrd in /usr/lib/modules/
Introduce new path for lsinitrd.sh to look into:
/usr/lib/modules/$kver/initramfs.img
Which is valid on all ostree-based systems, and also other image based
systems with pre-generated initramfs.
Ref: https://issues.redhat.com/browse/RHEL-35890
(cherry picked from commit 7c7cdd9317c21b19a0393f5d28d1acb7ee3ff027 from PR#582)
Resolves: RHEL-35890
---
lsinitrd.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lsinitrd.sh b/lsinitrd.sh
index 39be169d..d05453ce 100755
--- a/lsinitrd.sh
+++ b/lsinitrd.sh
@@ -133,6 +133,8 @@ else
image="/lib/modules/${KERNEL_VERSION}/initrd"
elif [[ -f /boot/initramfs-${KERNEL_VERSION}.img ]]; then
image="/boot/initramfs-${KERNEL_VERSION}.img"
+ elif [[ -f /usr/lib/modules/${KERNEL_VERSION}/initramfs.img ]]; then
+ image="/usr/lib/modules/${KERNEL_VERSION}/initramfs.img"
elif [[ $MACHINE_ID ]] \
&& mountpoint -q /efi; then
image="/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"

42
0069.patch Normal file
View File

@ -0,0 +1,42 @@
From 097d4bdb20443c1c5a86cc617ac2ab0c24193d75 Mon Sep 17 00:00:00 2001
From: Pavel Valena <pvalena@redhat.com>
Date: Sat, 17 Aug 2024 01:43:50 +0200
Subject: [PATCH] feat(dracut-init.sh): give --force-add precedence over --omit
This gives precedence of force_add_dracutmodules to omit_dracutmodules,
as there is not other way to override omit_dracutmodules list, and users
would expect it to be overriden from command line.
Ref: https://github.com/dracut-ng/dracut-ng/pull/569
This way, `--add` retains it behaviour, and `--force-add` gains additional
functionality in non-hostonly mode. The module may still be skipped
if the module check returns 1, but it should throw error (as I'd expect
for `--force-add`).
Ref: https://issues.redhat.com/browse/RHEL-26114
(cherry picked from commit a669346f48cbb3278c51ba5e95b1b91f9bfdee0a)
Resolves: RHEL-26114
---
dracut-init.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dracut-init.sh b/dracut-init.sh
index fe1b1426..27abb07b 100644
--- a/dracut-init.sh
+++ b/dracut-init.sh
@@ -921,8 +921,10 @@ check_module() {
[[ $2 ]] || mods_checked_as_dep+=" $_mod "
if [[ " $omit_dracutmodules " == *\ $_mod\ * ]]; then
- ddebug "dracut module '$_mod' will not be installed, because it's in the list to be omitted!"
- return 1
+ if [[ " $force_add_dracutmodules " != *\ $_mod\ * ]]; then
+ ddebug "Module '$_mod' will not be installed, because it's in the list to be omitted!"
+ return 1
+ fi
fi
if [[ " $dracutmodules $add_dracutmodules $force_add_dracutmodules" == *\ $_mod\ * ]]; then

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 67.git20240812
%define dist_free_release 70.git20240819
Name: dracut
Version: 057
@ -95,6 +95,9 @@ Patch63: 0063.patch
Patch64: 0064.patch
Patch65: 0065.patch
Patch66: 0066.patch
Patch67: 0067.patch
Patch68: 0068.patch
Patch69: 0069.patch
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
@ -547,6 +550,11 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
%{_prefix}/lib/kernel/install.d/51-dracut-rescue.install
%changelog
* Mon Aug 19 2024 Pavel Valena <pvalena@redhat.com> - 057-70.git20240819
- fix(systemd): set right permissions for the machine-id file
- feat(lsinitrd.sh): look for initrd in /usr/lib/modules/
- feat(dracut-init.sh): give --force-add precedence over --omit
* Mon Aug 12 2024 Pavel Valena <pvalena@redhat.com> - 057-67.git20240812
- feat(systemd): install systemd-executor
- test: use -device instead of -watchdog to remove qemu