diff options
author | 2024-11-09 15:31:31 +0100 | |
---|---|---|
committer | 2024-11-09 15:31:31 +0100 | |
commit | 6fb3d4afd50ab9a7054258e6bb78ea8364b8801a (patch) | |
tree | e4435b7d74410d67231734b210765088290a3dd4 /sys-kernel | |
parent | app-emacs/spacemacs-theme: bump to 0.3_p20241101 (diff) | |
download | gentoo-6fb3d4afd50ab9a7054258e6bb78ea8364b8801a.tar.gz gentoo-6fb3d4afd50ab9a7054258e6bb78ea8364b8801a.tar.bz2 gentoo-6fb3d4afd50ab9a7054258e6bb78ea8364b8801a.zip |
sys-kernel/dracut: backport fix for checking kmods
Signed-off-by: Nowa Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'sys-kernel')
-rw-r--r-- | sys-kernel/dracut/dracut-105-r2.ebuild (renamed from sys-kernel/dracut/dracut-105-r1.ebuild) | 2 | ||||
-rw-r--r-- | sys-kernel/dracut/files/dracut-105-fix-check_kernel_module.patch | 28 |
2 files changed, 30 insertions, 0 deletions
diff --git a/sys-kernel/dracut/dracut-105-r1.ebuild b/sys-kernel/dracut/dracut-105-r2.ebuild index 70692cd367a4..743a246869b9 100644 --- a/sys-kernel/dracut/dracut-105-r1.ebuild +++ b/sys-kernel/dracut/dracut-105-r2.ebuild @@ -101,6 +101,8 @@ PATCHES=( "${FILESDIR}"/${PN}-103-acct-user-group-gentoo.patch # https://github.com/dracut-ng/dracut-ng/pull/834 "${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 ) src_configure() { diff --git a/sys-kernel/dracut/files/dracut-105-fix-check_kernel_module.patch b/sys-kernel/dracut/files/dracut-105-fix-check_kernel_module.patch new file mode 100644 index 000000000000..e1fc7924c303 --- /dev/null +++ b/sys-kernel/dracut/files/dracut-105-fix-check_kernel_module.patch @@ -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 |