summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2023-05-26 16:02:07 -0400
committerMike Gilbert <floppym@gentoo.org>2023-05-26 16:02:07 -0400
commite8f8be11a5cb38c954d54615d0a31c0378bf88f5 (patch)
treed15a8db524e1698d3eb71808dbf56228c903b61b /sys-kernel/dracut
parentsci-geosciences/gnome-maps: Version bump to 44.2 (diff)
downloadgentoo-e8f8be11a5cb38c954d54615d0a31c0378bf88f5.tar.gz
gentoo-e8f8be11a5cb38c954d54615d0a31c0378bf88f5.tar.bz2
gentoo-e8f8be11a5cb38c954d54615d0a31c0378bf88f5.zip
sys-kernel/dracut: fix uefi stub path for split-usr
Closes: https://bugs.gentoo.org/765208 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-kernel/dracut')
-rw-r--r--sys-kernel/dracut/dracut-059-r1.ebuild (renamed from sys-kernel/dracut/dracut-059.ebuild)1
-rw-r--r--sys-kernel/dracut/files/059-uefi-split-usr.patch46
2 files changed, 47 insertions, 0 deletions
diff --git a/sys-kernel/dracut/dracut-059.ebuild b/sys-kernel/dracut/dracut-059-r1.ebuild
index 20f297121ad8..5aa6cfb4a241 100644
--- a/sys-kernel/dracut/dracut-059.ebuild
+++ b/sys-kernel/dracut/dracut-059-r1.ebuild
@@ -64,6 +64,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/files/059-uefi-split-usr.patch b/sys-kernel/dracut/files/059-uefi-split-usr.patch
new file mode 100644
index 000000000000..1b1f1348a223
--- /dev/null
+++ b/sys-kernel/dracut/files/059-uefi-split-usr.patch
@@ -0,0 +1,46 @@
+https://github.com/dracutdevs/dracut/pull/2365
+
+From afb2019ddc6ffe6e59df3d3dc9929a840bd09bc8 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+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 <floppym@gentoo.org>
+---
+ dracut.sh | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/dracut.sh b/dracut.sh
+index bbb34697..9da59561 100755
+--- a/dracut.sh
++++ b/dracut.sh
+@@ -1389,6 +1389,9 @@ esac
+
+ abs_outfile=$(readlink -f "$outfile") && outfile="$abs_outfile"
+
++[[ -n $systemd_prefix ]] \
++ || systemd_prefix=$(pkg-config systemd --variable=prefix 2> /dev/null)
++
+ [[ -d $dracutsysrootdir$systemdutildir ]] \
+ || systemdutildir=$(pkg-config systemd --variable=systemdutildir 2> /dev/null)
+
+@@ -1467,7 +1470,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
+