From 06d68ed81fb9caee875b8ffaca563255015d696dc912cff511c48a1579e8626d Mon Sep 17 00:00:00 2001 From: Andrei Borzenkov Date: Mon, 26 Jan 2015 10:42:36 +0000 Subject: [PATCH] Accepting request 282818 from home:michael-chang:branches:Base:System - add os-prober-grep-for-windows-bcd-file.patch * fix os-prober misinterprets Windows 8 to be Vista (bsc#910654) OBS-URL: https://build.opensuse.org/request/show/282818 OBS-URL: https://build.opensuse.org/package/show/Base:System/os-prober?expand=0&rev=49 --- os-prober-grep-for-windows-bcd-file.patch | 31 +++++++++++++++++++++++ os-prober.changes | 6 +++++ os-prober.spec | 3 +++ 3 files changed, 40 insertions(+) create mode 100644 os-prober-grep-for-windows-bcd-file.patch diff --git a/os-prober-grep-for-windows-bcd-file.patch b/os-prober-grep-for-windows-bcd-file.patch new file mode 100644 index 0000000..77b7361 --- /dev/null +++ b/os-prober-grep-for-windows-bcd-file.patch @@ -0,0 +1,31 @@ +Index: os-prober/os-probes/mounted/x86/20microsoft +=================================================================== +--- os-prober.orig/os-probes/mounted/x86/20microsoft ++++ os-prober/os-probes/mounted/x86/20microsoft +@@ -31,19 +31,19 @@ if item_in_dir -q bootmgr "$2"; then + for boot in $(item_in_dir boot "$2"); do + bcd=$(item_in_dir bcd "$2/$boot") + if [ -n "$bcd" ]; then +- if grep -qs "W.i.n.d.o.w.s. .8" "$2/$boot/$bcd"; then ++ if grep -qs --text "W.i.n.d.o.w.s. .8" "$2/$boot/$bcd"; then + long="Windows 8 (loader)" +- elif grep -qs "W.i.n.d.o.w.s. .7" "$2/$boot/$bcd"; then ++ elif grep -qs --text "W.i.n.d.o.w.s. .7" "$2/$boot/$bcd"; then + long="Windows 7 (loader)" +- elif grep -qs "W.i.n.d.o.w.s. .V.i.s.t.a" "$2/$boot/$bcd"; then ++ elif grep -qs --text "W.i.n.d.o.w.s. .V.i.s.t.a" "$2/$boot/$bcd"; then + long="Windows Vista (loader)" +- elif grep -qs "W.i.n.d.o.w.s. .S.e.r.v.e.r. .2.0.0.8. .R.2." "$2/$boot/$bcd"; then ++ elif grep -qs --text "W.i.n.d.o.w.s. .S.e.r.v.e.r. .2.0.0.8. .R.2." "$2/$boot/$bcd"; then + long="Windows Server 2008 R2 (loader)" +- elif grep -qs "W.i.n.d.o.w.s. .S.e.r.v.e.r. .2.0.0.8." "$2/$boot/$bcd"; then ++ elif grep -qs --text "W.i.n.d.o.w.s. .S.e.r.v.e.r. .2.0.0.8." "$2/$boot/$bcd"; then + long="Windows Server 2008 (loader)" +- elif grep -qs "W.i.n.d.o.w.s. .R.e.c.o.v.e.r.y. .E.n.v.i.r.o.n.m.e.n.t" "$2/$boot/$bcd"; then ++ elif grep -qs --text "W.i.n.d.o.w.s. .R.e.c.o.v.e.r.y. .E.n.v.i.r.o.n.m.e.n.t" "$2/$boot/$bcd"; then + long="Windows Recovery Environment (loader)" +- elif grep -qs "W.i.n.d.o.w.s. .S.e.t.u.p" "$2/$boot/$bcd"; then ++ elif grep -qs --text "W.i.n.d.o.w.s. .S.e.t.u.p" "$2/$boot/$bcd"; then + long="Windows Recovery Environment (loader)" + else + long="Windows Vista (loader)" diff --git a/os-prober.changes b/os-prober.changes index 5b6a37f..b045f74 100644 --- a/os-prober.changes +++ b/os-prober.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 26 09:35:55 UTC 2015 - mchang@suse.com + +- add os-prober-grep-for-windows-bcd-file.patch + * fix os-prober misinterprets Windows 8 to be Vista (bsc#910654) + ------------------------------------------------------------------- Sun Dec 14 18:16:40 UTC 2014 - tchvatal@suse.com diff --git a/os-prober.spec b/os-prober.spec index d1ec5f5..218c820 100644 --- a/os-prober.spec +++ b/os-prober.spec @@ -54,6 +54,8 @@ Patch13: os-prober-fix-btrfs-subvol-mounted-tests.patch Patch14: os-prober-skip-part-on-multipath.patch # PATCH-FIX-SLE: fix os-prober: dmraid is called without a device list for every partition (bnc#883453) Patch15: os-prober-call-dmraid-once.patch +# PATCH-FIX-OPENSUSE: fix os-prober misinterprets Windows 8 to be Vista (bsc#910654) +Patch16: os-prober-grep-for-windows-bcd-file.patch Requires: /bin/grep Requires: /bin/sed Requires: /sbin/modprobe @@ -90,6 +92,7 @@ cp %{SOURCE1} . %patch13 -p1 %patch14 -p1 %patch15 -p1 +%patch16 -p1 find . -name \*.orig -delete %build