diff --git a/sys-kernel/dracut/dracut-059.ebuild b/sys-kernel/dracut/dracut-059-r2.ebuild similarity index 99% rename from sys-kernel/dracut/dracut-059.ebuild rename to sys-kernel/dracut/dracut-059-r2.ebuild index 831fb1c..d296809 100644 --- a/sys-kernel/dracut/dracut-059.ebuild +++ b/sys-kernel/dracut/dracut-059-r2.ebuild @@ -65,6 +65,7 @@ QA_MULTILIB_PATHS="usr/lib/dracut/.*" PATCHES=( "${FILESDIR}"/gentoo-ldconfig-paths-r1.patch "${FILESDIR}"/gentoo-network-r1.patch + "${FILESDIR}"/059-uefi-split-usr.patch ) src_configure() { diff --git a/sys-kernel/dracut/dracut-9999.ebuild b/sys-kernel/dracut/dracut-9999.ebuild index 831fb1c..4b0f1c8 100644 --- a/sys-kernel/dracut/dracut-9999.ebuild +++ b/sys-kernel/dracut/dracut-9999.ebuild @@ -167,7 +167,7 @@ pkg_postinst() { optfeature "Support NFS" net-fs/nfs-utils net-nds/rpcbind optfeature \ "Install ssh and scp along with config files and specified keys" \ - net-misc/openssh + virtual/openssh optfeature "Enable logging with rsyslog" app-admin/rsyslog optfeature \ "Enable rngd service to help generating entropy early during boot" \ diff --git a/sys-kernel/dracut/files/059-uefi-split-usr.patch b/sys-kernel/dracut/files/059-uefi-split-usr.patch new file mode 100644 index 0000000..8adb880 --- /dev/null +++ b/sys-kernel/dracut/files/059-uefi-split-usr.patch @@ -0,0 +1,48 @@ +https://github.com/dracutdevs/dracut/pull/2365 + +From 3462e0ac6f3562a5247bbeda2dc41eaf4e4ebf5e Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +Date: Fri, 26 May 2023 15:56:45 -0400 +Subject: [PATCH] Fix path to UEFI stub on split-usr systems + +systemd always installs the UEFI stub in ${prefix}/lib/systemd/boot/efi. + +On split-usr systems, systemdutildir is ${rootprefix}/lib/systemd, which +makes dracut look in the wrong place. + +Instead, grab 'prefix' from systemd.pc and store it in 'systemd_prefix'. + +Bug: https://bugs.gentoo.org/765208 +Signed-off-by: Mike Gilbert +--- + dracut.sh | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index bbb34697..52a83061 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1389,6 +1389,11 @@ esac + + abs_outfile=$(readlink -f "$outfile") && outfile="$abs_outfile" + ++[[ -n $systemd_prefix ]] \ ++ || systemd_prefix=$(pkg-config systemd --variable=prefix 2> /dev/null) ++ ++[[ -n $systemd_prefix ]] || systemd_prefix=/usr ++ + [[ -d $dracutsysrootdir$systemdutildir ]] \ + || systemdutildir=$(pkg-config systemd --variable=systemdutildir 2> /dev/null) + +@@ -1467,7 +1472,7 @@ if [[ ! $print_cmdline ]]; then + esac + + if ! [[ -s $uefi_stub ]]; then +- uefi_stub="$dracutsysrootdir${systemdutildir}/boot/efi/linux${EFI_MACHINE_TYPE_NAME}.efi.stub" ++ uefi_stub="$dracutsysrootdir${systemd_prefix}/lib/systemd/boot/efi/linux${EFI_MACHINE_TYPE_NAME}.efi.stub" + fi + + if ! [[ -s $uefi_stub ]]; then +-- +2.40.1 +