Gentoo Archives: gentoo-commits

From: Ben Kohler <bkohler@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-boot/os-prober/files/, sys-boot/os-prober/
Date: Fri, 08 Oct 2021 11:12:42
Message-Id: 1633691543.fdcd2c6597c04b0c2b24e1966b6d6380f5fa32bb.bkohler@gentoo
1 commit: fdcd2c6597c04b0c2b24e1966b6d6380f5fa32bb
2 Author: Peter Levine <plevine457 <AT> gmail <DOT> com>
3 AuthorDate: Fri Oct 8 02:15:06 2021 +0000
4 Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 8 11:12:23 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fdcd2c65
7
8 sys-boot/os-prober: fix handling of multiple initrd paths
9
10 Backport of upstream fix for handling multiple initrd paths like those
11 needed for Majaro installations. Still requires changes in grub from
12 https://savannah.gnu.org/bugs/index.php?47681, if and when it gets merged
13 upstream.
14
15 Package-Manager: Portage-3.0.26, Repoman-3.0.3
16 Signed-off-by: Peter Levine <plevine457 <AT> gmail.com>
17 Closes: https://github.com/gentoo/gentoo/pull/22513
18 Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>
19
20 ...-prober-1.79-handle-multiple-initrd-paths.patch | 35 ++++++++++++++++++++++
21 sys-boot/os-prober/os-prober-1.79.ebuild | 1 +
22 2 files changed, 36 insertions(+)
23
24 diff --git a/sys-boot/os-prober/files/os-prober-1.79-handle-multiple-initrd-paths.patch b/sys-boot/os-prober/files/os-prober-1.79-handle-multiple-initrd-paths.patch
25 new file mode 100644
26 index 00000000000..0b477c17c36
27 --- /dev/null
28 +++ b/sys-boot/os-prober/files/os-prober-1.79-handle-multiple-initrd-paths.patch
29 @@ -0,0 +1,35 @@
30 +Backport handling of multiple initrd paths, like those needed by Manjaro
31 +installations. Note, it still requires resolution of
32 +https://savannah.gnu.org/bugs/index.php?47681 on grub's end.
33 +
34 +Commit: https://salsa.debian.org/installer-team/os-prober/-/commit/53b920e106f13acf87ef8a275161e20f94feeb8a
35 +
36 +--- a/linux-boot-probes/mounted/common/40grub2
37 ++++ b/linux-boot-probes/mounted/common/40grub2
38 +@@ -78,11 +78,21 @@
39 + fi
40 + ;;
41 + initrd)
42 +- initrd="$(echo "$2" | sed 's/(.*)//')"
43 +- # Initrd same.
44 +- if [ "$partition" != "$bootpart" ]; then
45 +- initrd="/boot$initrd"
46 +- fi
47 ++ shift
48 ++ initrd=""
49 ++ for initrd_path in "$@"; do
50 ++ # sed hack, as above
51 ++ initrd_path="$(echo "$initrd_path" | sed 's/(.*)//')"
52 ++ # Initrd same.
53 ++ if [ "$partition" != "$bootpart" ]; then
54 ++ initrd_path="/boot$initrd_path"
55 ++ fi
56 ++ if [ -z "$initrd" ]; then
57 ++ initrd="$initrd_path"
58 ++ else
59 ++ initrd="$initrd $initrd_path"
60 ++ fi
61 ++ done
62 + ;;
63 + "}")
64 + entry_result
65
66 diff --git a/sys-boot/os-prober/os-prober-1.79.ebuild b/sys-boot/os-prober/os-prober-1.79.ebuild
67 index c854d403e4f..811ad1fef51 100644
68 --- a/sys-boot/os-prober/os-prober-1.79.ebuild
69 +++ b/sys-boot/os-prober/os-prober-1.79.ebuild
70 @@ -27,6 +27,7 @@ QA_MULTILIB_PATHS="usr/lib/os-prober/.*"
71
72 PATCHES=(
73 "${FILESDIR}"/${PN}-1.79-mdraid-detection.patch
74 + "${FILESDIR}"/${PN}-1.79-handle-multiple-initrd-paths.patch
75 "${FILESDIR}"/${PN}-1.79-btrfs-subvolume-detection.patch
76 "${FILESDIR}"/${PN}-1.79-use-fstab-name.patch
77 "${FILESDIR}"/${PN}-1.79-mounted-boot-partition-fix.patch