[sys-kernel/dracut] sync

This commit is contained in:
Robert Förster 2024-11-10 04:09:32 +01:00
parent b7aa1f2e70
commit 1da9e36a1a
3 changed files with 61 additions and 0 deletions

View File

@ -103,6 +103,10 @@ PATCHES=(
"${FILESDIR}"/${PN}-103-acct-user-group-gentoo.patch "${FILESDIR}"/${PN}-103-acct-user-group-gentoo.patch
# https://github.com/dracut-ng/dracut-ng/pull/834 # https://github.com/dracut-ng/dracut-ng/pull/834
"${FILESDIR}"/${PN}-105-ensure-abs-args-for-objcopy.patch "${FILESDIR}"/${PN}-105-ensure-abs-args-for-objcopy.patch
# https://github.com/dracut-ng/dracut-ng/pull/904
"${FILESDIR}"/${PN}-105-fix-check_kernel_module.patch
# https://github.com/dracut-ng/dracut-ng/pull/921
"${FILESDIR}"/dracut-105-systemd-cryptsetup.patch
) )
src_configure() { src_configure() {

View File

@ -0,0 +1,28 @@
From b90eda4b431af23d1101f1ea68b656929c6a82b2 Mon Sep 17 00:00:00 2001
From: Nowa Ammerlaan <andrewammerlaan@gentoo.org>
Date: Fri, 8 Nov 2024 20:01:54 +0100
Subject: [PATCH] fix(dracut-functions.sh): check for modules in --kmoddir, not
in --sysroot
Modules are installed from the directory specified by --kmoddir, but currently
the check_kernel_module() function is checking for the module in
--sysroot/lib/modules. This is notably not the same when kernels packages are
being built inside some docker container. We should check for the modules
existence in the directory we are actually going to install it from.
---
dracut-functions.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 865c31290..245c69cb6 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -761,7 +761,7 @@ check_kernel_config() {
# 0 if the kernel module is either built-in or available
# 1 if the kernel module is not enabled
check_kernel_module() {
- modprobe -d "$dracutsysrootdir" -S "$kernel" --dry-run "$1" &> /dev/null || return 1
+ modprobe -d "$drivers_dir/../../" -S "$kernel" --dry-run "$1" &> /dev/null || return 1
}
# get_cpu_vendor

View File

@ -0,0 +1,29 @@
https://github.com/dracut-ng/dracut-ng/pull/921
https://bugs.gentoo.org/943035
From 2d4b550c71cc79ac7a3f18afc09d8263963d5de2 Mon Sep 17 00:00:00 2001
From: Jo Zzsi <jozzsicsataban@gmail.com>
Date: Sat, 9 Nov 2024 14:06:57 -0500
Subject: [PATCH] fix(dracut-systemd): check systemd-cryptsetup before
including
---
modules.d/98dracut-systemd/module-setup.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules.d/98dracut-systemd/module-setup.sh b/modules.d/98dracut-systemd/module-setup.sh
index 0438e40f0..f2502cd78 100755
--- a/modules.d/98dracut-systemd/module-setup.sh
+++ b/modules.d/98dracut-systemd/module-setup.sh
@@ -19,7 +19,10 @@ depends() {
# systemd-cryptsetup is mandatory dependency
# see https://github.com/dracut-ng/dracut-ng/issues/563
if dracut_module_included "crypt"; then
- deps+=" systemd-cryptsetup"
+ module_check systemd-cryptsetup > /dev/null 2>&1
+ if [[ $? == 255 ]]; then
+ deps+=" systemd-cryptsetup"
+ fi
fi
echo "$deps"