From 0e7560730a62c18c57844c38ce60d58c74ff64b18aa376b67256b3f6ed84daec Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Mon, 3 Aug 2015 03:05:51 +0000 Subject: [PATCH] Accepting request 320020 from home:arvidjaar:grub2-next - add os-prober-40grub-check-grub2.patch * also skip legacy grub if /boot/grub2/grub.cfg is present, not only /boot/grub/grub.cfg OBS-URL: https://build.opensuse.org/request/show/320020 OBS-URL: https://build.opensuse.org/package/show/Base:System/os-prober?expand=0&rev=58 --- os-prober-40grub-check-grub2.patch | 19 +++++++++++++++++++ os-prober.changes | 7 +++++++ os-prober.spec | 5 ++++- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 os-prober-40grub-check-grub2.patch diff --git a/os-prober-40grub-check-grub2.patch b/os-prober-40grub-check-grub2.patch new file mode 100644 index 0000000..b554ce3 --- /dev/null +++ b/os-prober-40grub-check-grub2.patch @@ -0,0 +1,19 @@ +From: Andrei Borzenkov +Subject: Also skip legacy grub if grub2 is found + +Check for grub.cfg also in /boot/grub2, not only in /boot/grub. +Index: os-prober/linux-boot-probes/mounted/x86/40grub +=================================================================== +--- os-prober.orig/linux-boot-probes/mounted/x86/40grub ++++ os-prober/linux-boot-probes/mounted/x86/40grub +@@ -95,7 +95,9 @@ fi + + if [ "$grubconf" ] && \ + ([ ! -e "$mpoint/boot/grub/grub.cfg" ] || \ +- [ "$mpoint/boot/grub/$grubconf" -nt "$mpoint/boot/grub/grub.cfg" ]); then ++ [ "$mpoint/boot/grub/$grubconf" -nt "$mpoint/boot/grub/grub.cfg" ]) && \ ++ ([ ! -e "$mpoint/boot/grub2/grub.cfg" ] || \ ++ [ "$mpoint/boot/grub/$grubconf" -nt "$mpoint/boot/grub2/grub.cfg" ]); then + debug "parsing $grubconf" + parse_grub_menu "$mpoint" "$partition" "$bootpart" < "$mpoint/boot/grub/$grubconf" + fi diff --git a/os-prober.changes b/os-prober.changes index e61ba46..8cb067b 100644 --- a/os-prober.changes +++ b/os-prober.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sun Aug 2 15:14:55 UTC 2015 - arvidjaar@gmail.com + +- add os-prober-40grub-check-grub2.patch + * also skip legacy grub if /boot/grub2/grub.cfg is present, not only + /boot/grub/grub.cfg + ------------------------------------------------------------------- Thu Jun 18 10:24:05 UTC 2015 - mchang@suse.com diff --git a/os-prober.spec b/os-prober.spec index bba6b43..749c504 100644 --- a/os-prober.spec +++ b/os-prober.spec @@ -1,7 +1,7 @@ # # spec file for package os-prober # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -60,6 +60,8 @@ Patch16: os-prober-grep-for-windows-bcd-file.patch Patch17: Improve-btrfs-handling-on-os-probing-for-grub2.patch # PATCH-FIX-SLE: fix os-prober mount error, no such file or directory (bsc#931955) Patch18: os-prober-btrfs-absolute-subvol.patch +# PATCH-FIX-OPENSUSE: also skip legacy grub if /boot/grub2/grub.cfg is present +Patch19: os-prober-40grub-check-grub2.patch Requires: /bin/grep Requires: /bin/sed Requires: /sbin/modprobe @@ -99,6 +101,7 @@ cp %{SOURCE1} . %patch16 -p1 %patch17 -p1 %patch18 -p1 +%patch19 -p1 find . -name \*.orig -delete %build