commit:     950d4e63db2de0bef9a49de1c29e424dcdc4bdeb
Author:     Nowa Ammerlaan <nowa <AT> gentoo <DOT> org>
AuthorDate: Sun May 18 09:52:02 2025 +0000
Commit:     Nowa Ammerlaan <nowa <AT> gentoo <DOT> org>
CommitDate: Sun May 18 10:27:29 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=950d4e63

sys-kernel/dracut: backport regression fix 1322

Signed-off-by: Nowa Ammerlaan <nowa <AT> gentoo.org>

 sys-kernel/dracut/dracut-107.ebuild                |  2 ++
 .../dracut-107-hostonly-regression-fix-1322.patch  | 22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/sys-kernel/dracut/dracut-107.ebuild 
b/sys-kernel/dracut/dracut-107.ebuild
index 624115e9cc84..415b8f5798ac 100644
--- a/sys-kernel/dracut/dracut-107.ebuild
+++ b/sys-kernel/dracut/dracut-107.ebuild
@@ -100,6 +100,8 @@ PATCHES=(
        "${FILESDIR}"/gentoo-ldconfig-paths-r1.patch
        # Gentoo specific acct-user and acct-group conf adjustments
        "${FILESDIR}"/${PN}-106-acct-user-group-gentoo.patch
+       # https://github.com/dracut-ng/dracut-ng/pull/1322
+       "${FILESDIR}"/${PN}-107-hostonly-regression-fix-1322.patch
 )
 
 pkg_setup() {

diff --git 
a/sys-kernel/dracut/files/dracut-107-hostonly-regression-fix-1322.patch 
b/sys-kernel/dracut/files/dracut-107-hostonly-regression-fix-1322.patch
new file mode 100644
index 000000000000..a8134df240da
--- /dev/null
+++ b/sys-kernel/dracut/files/dracut-107-hostonly-regression-fix-1322.patch
@@ -0,0 +1,22 @@
+https://github.com/dracut-ng/dracut-ng/pull/1322
+diff --git a/modules.d/90kernel-modules/module-setup.sh 
b/modules.d/90kernel-modules/module-setup.sh
+index 840c4fd8a..df362ceff 100755
+--- a/modules.d/90kernel-modules/module-setup.sh
++++ b/modules.d/90kernel-modules/module-setup.sh
+@@ -122,11 +122,11 @@ installkernel() {
+ 
+         # if not on strict hostonly mode, install all known filesystems,
+         # if the required list is not set via the filesystems variable
+-        if [[ $hostonly_mode != "strict" ]]; then
+-            if [[ -z $filesystems ]]; then
+-                dracut_instmods -o -P 
".*/(kernel/fs/nfs|kernel/fs/nfsd|kernel/fs/lockd)/.*" '=fs'
+-            fi
+-        elif [[ "${host_fs_types[*]}" ]]; then
++        if [[ $hostonly_mode != "strict" ]] && [[ -z $filesystems ]]; then
++            dracut_instmods -o -P 
".*/(kernel/fs/nfs|kernel/fs/nfsd|kernel/fs/lockd)/.*" '=fs'
++        fi
++
++        if [[ $hostonly ]] && [[ "${host_fs_types[*]}" ]]; then
+             hostonly='' instmods "${host_fs_types[@]}"
+         fi
+ 

Reply via email to