From bbf80c8d797f36146be4c4e2862c3eb513925512 Mon Sep 17 00:00:00 2001 From: Hedayat Vatankhah Date: Sat, 25 Oct 2014 19:45:44 +0330 Subject: [PATCH] Fix parsing grub2's initrd/linux variations, rhbz #1108344 --- os-prober-grub2-parsefix.patch | 22 ++++++++++++++++++++++ os-prober.spec | 7 ++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 os-prober-grub2-parsefix.patch diff --git a/os-prober-grub2-parsefix.patch b/os-prober-grub2-parsefix.patch new file mode 100644 index 0000000..0ef8bda --- /dev/null +++ b/os-prober-grub2-parsefix.patch @@ -0,0 +1,22 @@ +Index: os-prober-1.58/linux-boot-probes/mounted/common/40grub2 +=================================================================== +--- os-prober-1.58.orig/linux-boot-probes/mounted/common/40grub2 ++++ os-prober-1.58/linux-boot-probes/mounted/common/40grub2 +@@ -77,7 +77,7 @@ parse_grub_menu () { + ignore_item=1 + fi + ;; +- linux) ++ linux*) + # Hack alert: sed off any (hdn,n) but + # assume the kernel is on the same + # partition. +@@ -90,7 +90,7 @@ parse_grub_menu () { + kernel="/boot$kernel" + fi + ;; +- initrd) ++ initrd*) + initrd="$(echo "$2" | sed 's/(.*)//')" + # Initrd same. + if [ "$partition" != "$bootpart" ]; then diff --git a/os-prober.spec b/os-prober.spec index 1a7f7b2..fd0e990 100644 --- a/os-prober.spec +++ b/os-prober.spec @@ -1,6 +1,6 @@ Name: os-prober Version: 1.58 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Probes disks on the system for installed operating systems Group: System Environment/Base @@ -25,6 +25,7 @@ Patch10: os-prober-factor-out-logger.patch # To be sent upstream Patch11: os-prober-factored-logger-efi-fix.patch Patch12: os-prober-umount-fix.patch +Patch13: os-prober-grub2-parsefix.patch Requires: udev coreutils util-linux Requires: grep /bin/sed /sbin/modprobe @@ -49,6 +50,7 @@ distributions can be added easily. %patch10 -p1 -b .factor-out-logger %patch11 -p1 -b .factor-out-logger-efi-fix %patch12 -p1 -b .umount-fix +%patch13 -p1 -b .grub2-parsefix find -type f -exec sed -i -e 's|usr/lib|usr/libexec|g' {} \; sed -i -e 's|grub-probe|grub2-probe|g' os-probes/common/50mounted-tests \ @@ -99,6 +101,9 @@ fi %{_var}/lib/%{name} %changelog +* Sat Oct 25 2014 Hedayat Vatankhah - 1.58-11 +- Fix parsing grub2's initrd/linux variations, rhbz #1108344 + * Mon Sep 08 2014 Peter Jones - 1.58-10 - Make os-prober output include partitions for UEFI chainloads. Resolves: rhbz#873207