From f5f9525db26f32b9f3a259b67f07d85f312a12b1 Mon Sep 17 00:00:00 2001 From: Hedayat Vatankhah Date: Wed, 19 Jun 2013 01:44:55 +0430 Subject: [PATCH] Fix a bug in EFI detection because of redirecting result output --- os-prober-factored-logger-efi-fix.patch | 15 +++++++++++++++ os-prober.spec | 8 +++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 os-prober-factored-logger-efi-fix.patch diff --git a/os-prober-factored-logger-efi-fix.patch b/os-prober-factored-logger-efi-fix.patch new file mode 100644 index 0000000..4168a47 --- /dev/null +++ b/os-prober-factored-logger-efi-fix.patch @@ -0,0 +1,15 @@ +diff -up os-prober-1.58/os-probes/mounted/x86/05efi.factor-out-logger-efi-fix os-prober-1.58/os-probes/mounted/x86/05efi +--- os-prober-1.58/os-probes/mounted/x86/05efi.factor-out-logger-efi-fix 2013-04-25 04:23:06.000000000 +0430 ++++ os-prober-1.58/os-probes/mounted/x86/05efi 2013-06-19 01:42:05.428750558 +0430 +@@ -58,7 +58,11 @@ ret=1 + for test in /usr/lib/os-probes/mounted/efi/*; do + debug "running subtest $test" + if [ -f "$test" ] && [ -x "$test" ]; then ++ # we need results of subtest in stdout ++ orig_fd_res=$fd_result ++ export fd_result=1 + entry=$("$test" "$mpoint/$efi") ++ export fd_result=$orig_fd_res + if [ -n "$entry" ]; then + debug "bootloader $entry found by subtest $test" + ret=0 diff --git a/os-prober.spec b/os-prober.spec index 6fb2298..8bdb356 100644 --- a/os-prober.spec +++ b/os-prober.spec @@ -1,6 +1,6 @@ Name: os-prober Version: 1.58 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Probes disks on the system for installed operating systems Group: System Environment/Base @@ -22,6 +22,8 @@ Patch7: os-prober-btrfsfix.patch Patch8: os-prober-bootpart-name-fix.patch Patch9: os-prober-mounted-partitions-fix.patch Patch10: os-prober-factor-out-logger.patch +# To be sent upstream +Patch11: os-prober-factored-logger-efi-fix.patch Requires: udev coreutils util-linux Requires: grep /bin/sed /sbin/modprobe @@ -44,6 +46,7 @@ distributions can be added easily. %patch8 -p1 -b .bootpart-name-fix %patch9 -p1 -b .mounted-partitions-fix %patch10 -p1 -b .factor-out-logger +%patch11 -p1 -b .factor-out-logger-efi-fix 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 \ @@ -94,6 +97,9 @@ fi %{_var}/lib/%{name} %changelog +* Tue Jun 18 2013 Hedayat Vatankhah - 1.58-2 +- Fix a bug in EFI detection because of redirecting result output + * Sun May 05 2013 Hedayat Vatankhah - 1.58-1 - Update to upstream version 1.58, with UEFI support