commit: 19ea0b44916e213359b8ff2d619f2a5d434ce646 Author: Michael Mair-Keimberger <mm1ke <AT> gentoo <DOT> org> AuthorDate: Wed Feb 18 19:54:41 2026 +0000 Commit: Michael Mair-Keimberger <mm1ke <AT> gentoo <DOT> org> CommitDate: Wed Feb 18 19:54:41 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19ea0b44
sys-kernel/dracut: remove unused patches Signed-off-by: Michael Mair-Keimberger <mm1ke <AT> gentoo.org> ...tall-new-systemd-hibernate-resume.service.patch | 21 ------- .../files/dracut-060-fix-resume-hostonly.patch | 65 ---------------------- .../dracut/files/dracut-060-grub-layout.patch | 31 ----------- .../dracut/files/dracut-060-systemd-255.patch | 26 --------- .../files/dracut-103-acct-user-group-gentoo.patch | 30 ---------- .../dracut-103-always-install-libsystemd.patch | 21 ------- .../files/dracut-103-systemd-udev-256-kmod.patch | 41 -------------- .../files/dracut-106-acct-user-group-gentoo.patch | 13 ----- .../files/dracut-106-fix-mdraid-module.patch | 17 ------ .../dracut/files/dracut-106-fix-rngd-module.patch | 14 ----- 10 files changed, 279 deletions(-) diff --git a/sys-kernel/dracut/files/dracut-059-install-new-systemd-hibernate-resume.service.patch b/sys-kernel/dracut/files/dracut-059-install-new-systemd-hibernate-resume.service.patch deleted file mode 100644 index 124bd6a99440..000000000000 --- a/sys-kernel/dracut/files/dracut-059-install-new-systemd-hibernate-resume.service.patch +++ /dev/null @@ -1,21 +0,0 @@ -From https://github.com/dracutdevs/dracut/pull/2527 -From a2fe89116db4b286fbf515f26bd1773b5e6ee8ad Mon Sep 17 00:00:00 2001 -From: Antonio Alvarez Feijoo <[email protected]> -Date: Tue, 26 Sep 2023 09:43:37 +0200 -Subject: [PATCH] fix(resume): add new systemd-hibernate-resume.service - -Since https://github.com/systemd/systemd/commit/a628d933, the generator only -does the initial validation of the system info and then enables the new -`systemd-hibernate-resume.service`. - -Fixes #2513 ---- a/modules.d/95resume/module-setup.sh -+++ b/modules.d/95resume/module-setup.sh -@@ -44,6 +44,7 @@ install() { - if dracut_module_included "systemd" && [[ -x $dracutsysrootdir$systemdutildir/systemd-hibernate-resume ]]; then - inst_multiple -o \ - "$systemdutildir"/system-generators/systemd-hibernate-resume-generator \ -+ "$systemdsystemunitdir"/systemd-hibernate-resume.service \ - "$systemdsystemunitdir"/[email protected] \ - "$systemdutildir"/systemd-hibernate-resume - return 0 diff --git a/sys-kernel/dracut/files/dracut-060-fix-resume-hostonly.patch b/sys-kernel/dracut/files/dracut-060-fix-resume-hostonly.patch deleted file mode 100644 index 3563f85293fd..000000000000 --- a/sys-kernel/dracut/files/dracut-060-fix-resume-hostonly.patch +++ /dev/null @@ -1,65 +0,0 @@ -https://bugs.gentoo.org/917000 -https://github.com/dracutdevs/dracut/pull/2494 - -From b88d0bab791bdc4ca75d13802f0391caf537650d Mon Sep 17 00:00:00 2001 -From: Andrew Ammerlaan <[email protected]> -Date: Sun, 20 Aug 2023 11:47:22 +0200 -Subject: [PATCH] fix(resume): include in hostonly mode if resume= on cmdline - -The grep introduced in commit e3a7112bef794e2f2dd741ec2c74fa9cb9117651 -does not work as intended. The resume module is always excluded in hostonly -mode. - -Made this a bit more explicit with if/else so it is more clear what is going -on. The in-line ||/&& makes the line really long and makes it more difficult -to understand what is going on. - -Bug: https://github.com/dracutdevs/dracut/issues/924 -Signed-off-by: Andrew Ammerlaan <[email protected]> ---- - modules.d/95resume/module-setup.sh | 32 +++++++++++++++++++++++------- - 1 file changed, 25 insertions(+), 7 deletions(-) - -diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh -index d255103366..2d48043827 100755 ---- a/modules.d/95resume/module-setup.sh -+++ b/modules.d/95resume/module-setup.sh -@@ -10,13 +10,31 @@ check() { - return 1 - } - -- # Only support resume if hibernation is currently on -- # and no swap is mounted on a net device -- [[ $hostonly ]] || [[ $mount_needs ]] && { -- swap_on_netdevice || [[ -f /sys/power/resume && "$(< /sys/power/resume)" == "0:0" ]] || grep -rq '^\|[[:space:]]resume=' /proc/cmdline /etc/cmdline /etc/cmdline.d /etc/kernel/cmdline /usr/lib/kernel/cmdline 2> /dev/null && return 255 -- } -- -- return 0 -+ # If hostonly check if we want to include the resume module -+ if [[ $hostonly ]] || [[ $mount_needs ]]; then -+ # Resuming won't work if swap is on a netdevice -+ swap_on_netdevice && return 255 -+ if grep -rq 'resume=' /proc/cmdline /etc/cmdline /etc/cmdline.d /etc/kernel/cmdline /usr/lib/kernel/cmdline 2> /dev/null; then -+ # hibernation support requested on kernel command line -+ return 0 -+ else -+ # resume= not set on kernel command line -+ if [[ -f /sys/power/resume ]]; then -+ if [[ "$(< /sys/power/resume)" == "0:0" ]]; then -+ # hibernation supported by the kernel, but not enabled -+ return 255 -+ else -+ # hibernation supported by the kernel and enabled -+ return 0 -+ fi -+ else -+ # resume file doesn't exist, hibernation not supported by kernel -+ return 255 -+ fi -+ fi -+ else -+ return 0 -+ fi - } - - # called by dracut diff --git a/sys-kernel/dracut/files/dracut-060-grub-layout.patch b/sys-kernel/dracut/files/dracut-060-grub-layout.patch deleted file mode 100644 index 543efa1eef47..000000000000 --- a/sys-kernel/dracut/files/dracut-060-grub-layout.patch +++ /dev/null @@ -1,31 +0,0 @@ -Ensures that the generated initrd is installed in the "new" way via the -staging area in the grub layout. This prevents accidentally creating -an UKI named initrd, and also ensures that BOOT_ROOT and -KERNEL_INSTALL_INITRD_GENERATOR are respected when the layout is set to grub. - -Downstream only since the grub layout for using grub with systemd's -kernel-install is not supported by systemd upstream and therefore this -patch is unlikely to be accepted by dracut upstream. - -diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install -index 441414ac..a98449fe 100755 ---- a/install.d/50-dracut.install -+++ b/install.d/50-dracut.install -@@ -38,6 +38,17 @@ elif [[ $KERNEL_INSTALL_LAYOUT == "bls" && -n $KERNEL_INSTALL_STAGING_AREA ]]; t - else - exit 0 - fi -+elif [[ $KERNEL_INSTALL_LAYOUT == "grub" || $KERNEL_INSTALL_LAYOUT == "compat" || $KERNEL_INSTALL_LAYOUT == "efistub" ]]; then -+ BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA" -+ if [[ -z $KERNEL_INSTALL_UKI_GENERATOR || $KERNEL_INSTALL_UKI_GENERATOR == "dracut" ]]; then -+ IMAGE="uki.efi" -+ UEFI_OPTS="--uefi" -+ elif [[ -z $KERNEL_INSTALL_INITRD_GENERATOR || $KERNEL_INSTALL_INITRD_GENERATOR == "dracut" ]]; then -+ IMAGE="initrd" -+ UEFI_OPTS="--no-uefi" -+ else -+ exit 0 -+ fi - else - # No layout information, use users --uefi/--no-uefi preference - UEFI_OPTS="" diff --git a/sys-kernel/dracut/files/dracut-060-systemd-255.patch b/sys-kernel/dracut/files/dracut-060-systemd-255.patch deleted file mode 100644 index 9d577e9504da..000000000000 --- a/sys-kernel/dracut/files/dracut-060-systemd-255.patch +++ /dev/null @@ -1,26 +0,0 @@ -https://github.com/dracutdevs/dracut/pull/2586/files -diff --git a/modules.d/01systemd-pcrphase/module-setup.sh b/modules.d/01systemd-pcrphase/module-setup.sh -index fa960a42c1..87efd0c1a6 100755 ---- a/modules.d/01systemd-pcrphase/module-setup.sh -+++ b/modules.d/01systemd-pcrphase/module-setup.sh -@@ -6,7 +6,11 @@ - check() { - - # If the binary(s) requirements are not fulfilled the module can't be installed. -- require_binaries "$systemdutildir"/systemd-pcrphase || return 1 -+ # systemd-255 renamed the binary, check for old and new location. -+ if ! require_binaries "$systemdutildir"/systemd-pcrphase && \ -+ ! require_binaries "$systemdutildir"/systemd-pcrextend; then -+ return 1 -+ fi - - # Return 255 to only include the module, if another module requires it. - return 255 -@@ -28,6 +32,7 @@ install() { - - inst_multiple -o \ - "$systemdutildir"/systemd-pcrphase \ -+ "$systemdutildir"/systemd-pcrextend \ - "$systemdsystemunitdir"/systemd-pcrphase-initrd.service \ - "$systemdsystemunitdir/systemd-pcrphase-initrd.service.d/*.conf" \ - "$systemdsystemunitdir"/initrd.target.wants/systemd-pcrphase-initrd.service diff --git a/sys-kernel/dracut/files/dracut-103-acct-user-group-gentoo.patch b/sys-kernel/dracut/files/dracut-103-acct-user-group-gentoo.patch deleted file mode 100644 index 045528bb0c45..000000000000 --- a/sys-kernel/dracut/files/dracut-103-acct-user-group-gentoo.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/dracut-init.sh b/dracut-init.sh -index 986da96b..bd47bc92 100755 ---- a/dracut-init.sh -+++ b/dracut-init.sh -@@ -711,10 +711,10 @@ inst_libdir_file() { - - # install sysusers files - inst_sysusers() { -- inst_multiple -o "$sysusers/$*" -+ inst_multiple -o "$sysusers/acct-*-$*" - - if [[ $hostonly ]]; then -- inst_multiple -H -o "$sysusersconfdir/$*" -+ inst_multiple -H -o "$sysusersconfdir/acct-*-$*" - fi - } - -diff --git a/modules.d/91tpm2-tss/module-setup.sh b/modules.d/91tpm2-tss/module-setup.sh -index 4441f552..4b5654d5 100755 ---- a/modules.d/91tpm2-tss/module-setup.sh -+++ b/modules.d/91tpm2-tss/module-setup.sh -@@ -30,7 +30,7 @@ installkernel() { - - # Install the required file(s) and directories for the module in the initramfs. - install() { -- inst_sysusers tpm2-tss.conf -+ inst_sysusers tss.conf - - inst_multiple -o \ - "$tmpfilesdir"/tpm2-tss-fapi.conf \ diff --git a/sys-kernel/dracut/files/dracut-103-always-install-libsystemd.patch b/sys-kernel/dracut/files/dracut-103-always-install-libsystemd.patch deleted file mode 100644 index f2533e14d8cd..000000000000 --- a/sys-kernel/dracut/files/dracut-103-always-install-libsystemd.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 921792f201e954de461d3b551e01b5369d666db8 Mon Sep 17 00:00:00 2001 -From: Antonio Alvarez Feijoo <[email protected]> -Date: Tue, 10 Sep 2024 15:51:46 +0200 -Subject: [PATCH] feat(systemd): always install libsystemd libraries - ---- - modules.d/00systemd/module-setup.sh | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh -index 498cd7edd..fb8a8200b 100755 ---- a/modules.d/00systemd/module-setup.sh -+++ b/modules.d/00systemd/module-setup.sh -@@ -156,5 +156,6 @@ EOF - _arch=${DRACUT_ARCH:-$(uname -m)} - inst_libdir_file \ - {"tls/$_arch/",tls/,"$_arch/",}"libgcrypt.so*" \ -- {"tls/$_arch/",tls/,"$_arch/",}"libnss_*" -+ {"tls/$_arch/",tls/,"$_arch/",}"libnss_*" \ -+ {"tls/$_arch/",tls/,"$_arch/",}"systemd/libsystemd*.so" - } diff --git a/sys-kernel/dracut/files/dracut-103-systemd-udev-256-kmod.patch b/sys-kernel/dracut/files/dracut-103-systemd-udev-256-kmod.patch deleted file mode 100644 index 7a1fc1c8daf3..000000000000 --- a/sys-kernel/dracut/files/dracut-103-systemd-udev-256-kmod.patch +++ /dev/null @@ -1,41 +0,0 @@ -From e16195f28669264227c169d45107ea95b83d8f48 Mon Sep 17 00:00:00 2001 -From: Alexander Tsoy <[email protected]> -Date: Tue, 16 Jul 2024 08:48:54 +0300 -Subject: [PATCH] fix(systemd): move installation of libkmod to udev-rules - module - -libkmod library should be installed even if systemd module is -omitted, so move its installation to udev-rules module. ---- - modules.d/00systemd/module-setup.sh | 1 - - modules.d/95udev-rules/module-setup.sh | 6 +++++- - 2 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh -index ce7bb520c..e4fb9a586 100755 ---- a/modules.d/00systemd/module-setup.sh -+++ b/modules.d/00systemd/module-setup.sh -@@ -171,6 +171,5 @@ EOF - _arch=${DRACUT_ARCH:-$(uname -m)} - inst_libdir_file \ - {"tls/$_arch/",tls/,"$_arch/",}"libgcrypt.so*" \ -- {"tls/$_arch/",tls/,"$_arch/",}"libkmod.so*" \ - {"tls/$_arch/",tls/,"$_arch/",}"libnss_*" - } -diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh -index d82ed5eb9..6078751f6 100755 ---- a/modules.d/95udev-rules/module-setup.sh -+++ b/modules.d/95udev-rules/module-setup.sh -@@ -93,7 +93,11 @@ install() { - "${udevdir}"/usb_id \ - "${udevdir}"/v4l_id - -- inst_libdir_file "libnss_files*" -+ # Install required libraries. -+ _arch=${DRACUT_ARCH:-$(uname -m)} -+ inst_libdir_file \ -+ {"tls/$_arch/",tls/,"$_arch/",}"libkmod.so*" \ -+ {"tls/$_arch/",tls/,"$_arch/",}"libnss_files*" - - # Install the hosts local user configurations if enabled. - if [[ $hostonly ]]; then diff --git a/sys-kernel/dracut/files/dracut-106-acct-user-group-gentoo.patch b/sys-kernel/dracut/files/dracut-106-acct-user-group-gentoo.patch deleted file mode 100644 index 25792a5445c0..000000000000 --- a/sys-kernel/dracut/files/dracut-106-acct-user-group-gentoo.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/modules.d/91tpm2-tss/module-setup.sh b/modules.d/91tpm2-tss/module-setup.sh -index 4441f5528..4b5654d56 100755 ---- a/modules.d/91tpm2-tss/module-setup.sh -+++ b/modules.d/91tpm2-tss/module-setup.sh -@@ -30,7 +30,7 @@ installkernel() { - - # Install the required file(s) and directories for the module in the initramfs. - install() { -- inst_sysusers tpm2-tss.conf -+ inst_sysusers tss.conf - - inst_multiple -o \ - "$tmpfilesdir"/tpm2-tss-fapi.conf \ diff --git a/sys-kernel/dracut/files/dracut-106-fix-mdraid-module.patch b/sys-kernel/dracut/files/dracut-106-fix-mdraid-module.patch deleted file mode 100644 index 3692d1fc2fd8..000000000000 --- a/sys-kernel/dracut/files/dracut-106-fix-mdraid-module.patch +++ /dev/null @@ -1,17 +0,0 @@ -https://github.com/dracut-ng/dracut-ng/pull/1250 -diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh -index 8ce5f2ee..b0ab8411 100755 ---- a/modules.d/90mdraid/module-setup.sh -+++ b/modules.d/90mdraid/module-setup.sh -@@ -46,7 +46,7 @@ cmdline() { - [[ ${host_fs_types[$dev]} != *_raid_member ]] && continue - - UUID=$( -- /sbin/mdadm --examine --export "$dev" \ -+ mdadm --examine --export "$dev" \ - | while read -r line || [[ "$line" ]]; do - [[ ${line#MD_UUID=} == "$line" ]] && continue - printf "%s" "${line#MD_UUID=} " --- -2.48.1 - diff --git a/sys-kernel/dracut/files/dracut-106-fix-rngd-module.patch b/sys-kernel/dracut/files/dracut-106-fix-rngd-module.patch deleted file mode 100644 index 8163ba28ad7d..000000000000 --- a/sys-kernel/dracut/files/dracut-106-fix-rngd-module.patch +++ /dev/null @@ -1,14 +0,0 @@ -https://github.com/dracut-ng/dracut-ng/pull/1207 -diff --git a/modules.d/06rngd/module-setup.sh b/modules.d/06rngd/module-setup.sh -index 1fcc831c4..064379242 100755 ---- a/modules.d/06rngd/module-setup.sh -+++ b/modules.d/06rngd/module-setup.sh -@@ -21,7 +21,7 @@ - check() { - # if there's no rngd binary, no go. - require_binaries rngd || return 1 -- require_binaries "${systemdsystemunitdir}/rngd.service" || return 1 -+ [[ -e "${systemdsystemunitdir}/rngd.service" ]] || return 1 - - return 0 - }
