summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Levine <plevine457@gmail.com>2021-10-07 21:25:58 -0400
committerBen Kohler <bkohler@gentoo.org>2021-10-08 06:12:17 -0500
commit45a0db318d24761296ad6c369202f1c1d07e3443 (patch)
tree7d51774a26be118bab7f036153dacbbacbfb4431 /sys-boot/os-prober
parentsys-boot/os-prober: replace os-prober-1.78-btrfsfix.patch (diff)
downloadgentoo-45a0db318d24761296ad6c369202f1c1d07e3443.tar.gz
gentoo-45a0db318d24761296ad6c369202f1c1d07e3443.tar.bz2
gentoo-45a0db318d24761296ad6c369202f1c1d07e3443.zip
sys-boot/os-prober: use the name in fstab for devmapper partitions
For /dev/mapper/gentoo linked to /dev/dm-1, use "gentoo" instead of "dm-1" as the patition name. Package-Manager: Portage-3.0.26, Repoman-3.0.3 Signed-off-by: Peter Levine <plevine457@gmail.com> Signed-off-by: Ben Kohler <bkohler@gentoo.org>
Diffstat (limited to 'sys-boot/os-prober')
-rw-r--r--sys-boot/os-prober/files/os-prober-1.79-use-fstab-name.patch34
-rw-r--r--sys-boot/os-prober/os-prober-9999.ebuild1
2 files changed, 35 insertions, 0 deletions
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
new file mode 100644
index 000000000000..e38d85a77feb
--- /dev/null
+++ b/sys-boot/os-prober/files/os-prober-1.79-use-fstab-name.patch
@@ -0,0 +1,34 @@
+For symlinks to partions in fstab, returns the partition name from fstab instead
+of the name of its resolved destination, eg., for /dev/mapper/mylvmvol in fstab,
+linked to /dev/dm-2, return "mylvmvol" instead of "dm-2".
+
+Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699839
+ https://bugzilla.redhat.com/show_bug.cgi?id=893472
+
+--- a/common.sh
++++ b/common.sh
+@@ -269,7 +269,7 @@ linux_mount_boot () {
+ if [ "$bindfrom" != "$tmpmnt/boot" ]; then
+ if mount --bind "$bindfrom" "$tmpmnt/boot"; then
+ mounted=1
+- bootpart="$1"
++ bootpart="$tmppart"
+ else
+ debug "failed to bind-mount $bindfrom onto $tmpmnt/boot"
+ fi
+@@ -277,6 +277,15 @@ linux_mount_boot () {
+ fi
+ if [ "$mounted" ]; then
+ :
++ elif [ -e "$tmppart" ]; then
++ bootpart="$tmppart"
++ boottomnt="$tmppart"
++ elif [ -e "$tmpmnt/$tmppart" ]; then
++ bootpart="$tmppart"
++ boottomnt="$tmpmnt/$tmppart"
++ elif [ -e "/target/$tmppart" ]; then
++ bootpart="$tmppart"
++ boottomnt="/target/$tmppart"
+ elif [ -e "$1" ]; then
+ bootpart="$1"
+ boottomnt="$1"
diff --git a/sys-boot/os-prober/os-prober-9999.ebuild b/sys-boot/os-prober/os-prober-9999.ebuild
index 5bd9e3b714c2..392bf0805664 100644
--- a/sys-boot/os-prober/os-prober-9999.ebuild
+++ b/sys-boot/os-prober/os-prober-9999.ebuild
@@ -28,6 +28,7 @@ QA_MULTILIB_PATHS="usr/lib/os-prober/.*"
PATCHES=(
"${FILESDIR}"/${PN}-1.79-mdraid-detection.patch
"${FILESDIR}"/${PN}-1.79-btrfs-subvolume-detection.patch
+ "${FILESDIR}"/${PN}-1.79-use-fstab-name.patch
)
DOC_CONTENTS="