1 |
commit: 45a0db318d24761296ad6c369202f1c1d07e3443 |
2 |
Author: Peter Levine <plevine457 <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Oct 8 01:25:58 2021 +0000 |
4 |
Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 8 11:12:17 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45a0db31 |
7 |
|
8 |
sys-boot/os-prober: use the name in fstab for devmapper partitions |
9 |
|
10 |
For /dev/mapper/gentoo linked to /dev/dm-1, use "gentoo" instead of |
11 |
"dm-1" as the patition name. |
12 |
|
13 |
Package-Manager: Portage-3.0.26, Repoman-3.0.3 |
14 |
Signed-off-by: Peter Levine <plevine457 <AT> gmail.com> |
15 |
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org> |
16 |
|
17 |
.../files/os-prober-1.79-use-fstab-name.patch | 34 ++++++++++++++++++++++ |
18 |
sys-boot/os-prober/os-prober-9999.ebuild | 1 + |
19 |
2 files changed, 35 insertions(+) |
20 |
|
21 |
diff --git a/sys-boot/os-prober/files/os-prober-1.79-use-fstab-name.patch b/sys-boot/os-prober/files/os-prober-1.79-use-fstab-name.patch |
22 |
new file mode 100644 |
23 |
index 00000000000..e38d85a77fe |
24 |
--- /dev/null |
25 |
+++ b/sys-boot/os-prober/files/os-prober-1.79-use-fstab-name.patch |
26 |
@@ -0,0 +1,34 @@ |
27 |
+For symlinks to partions in fstab, returns the partition name from fstab instead |
28 |
+of the name of its resolved destination, eg., for /dev/mapper/mylvmvol in fstab, |
29 |
+linked to /dev/dm-2, return "mylvmvol" instead of "dm-2". |
30 |
+ |
31 |
+Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699839 |
32 |
+ https://bugzilla.redhat.com/show_bug.cgi?id=893472 |
33 |
+ |
34 |
+--- a/common.sh |
35 |
++++ b/common.sh |
36 |
+@@ -269,7 +269,7 @@ linux_mount_boot () { |
37 |
+ if [ "$bindfrom" != "$tmpmnt/boot" ]; then |
38 |
+ if mount --bind "$bindfrom" "$tmpmnt/boot"; then |
39 |
+ mounted=1 |
40 |
+- bootpart="$1" |
41 |
++ bootpart="$tmppart" |
42 |
+ else |
43 |
+ debug "failed to bind-mount $bindfrom onto $tmpmnt/boot" |
44 |
+ fi |
45 |
+@@ -277,6 +277,15 @@ linux_mount_boot () { |
46 |
+ fi |
47 |
+ if [ "$mounted" ]; then |
48 |
+ : |
49 |
++ elif [ -e "$tmppart" ]; then |
50 |
++ bootpart="$tmppart" |
51 |
++ boottomnt="$tmppart" |
52 |
++ elif [ -e "$tmpmnt/$tmppart" ]; then |
53 |
++ bootpart="$tmppart" |
54 |
++ boottomnt="$tmpmnt/$tmppart" |
55 |
++ elif [ -e "/target/$tmppart" ]; then |
56 |
++ bootpart="$tmppart" |
57 |
++ boottomnt="/target/$tmppart" |
58 |
+ elif [ -e "$1" ]; then |
59 |
+ bootpart="$1" |
60 |
+ boottomnt="$1" |
61 |
|
62 |
diff --git a/sys-boot/os-prober/os-prober-9999.ebuild b/sys-boot/os-prober/os-prober-9999.ebuild |
63 |
index 5bd9e3b714c..392bf080566 100644 |
64 |
--- a/sys-boot/os-prober/os-prober-9999.ebuild |
65 |
+++ b/sys-boot/os-prober/os-prober-9999.ebuild |
66 |
@@ -28,6 +28,7 @@ QA_MULTILIB_PATHS="usr/lib/os-prober/.*" |
67 |
PATCHES=( |
68 |
"${FILESDIR}"/${PN}-1.79-mdraid-detection.patch |
69 |
"${FILESDIR}"/${PN}-1.79-btrfs-subvolume-detection.patch |
70 |
+ "${FILESDIR}"/${PN}-1.79-use-fstab-name.patch |
71 |
) |
72 |
|
73 |
DOC_CONTENTS=" |