From 922c49de2f55682e77477413ff3e785fe0d3358b1424bae29108429a18a33e0b Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Mon, 26 Aug 2013 02:23:39 +0000 Subject: [PATCH] Accepting request 196124 from home:arvidjaar:branches:Base:System - add os-prober-accept-ESP-on-IMSM.patch * accept EFI partition on IMSM MD array (bnc#818871) * fix DOS partition table detection OBS-URL: https://build.opensuse.org/request/show/196124 OBS-URL: https://build.opensuse.org/package/show/Base:System/os-prober?expand=0&rev=29 --- os-prober-accept-ESP-on-IMSM.patch | 42 ++++++++++++++++++++++++++++++ os-prober.changes | 6 +++++ os-prober.spec | 3 +++ 3 files changed, 51 insertions(+) create mode 100644 os-prober-accept-ESP-on-IMSM.patch diff --git a/os-prober-accept-ESP-on-IMSM.patch b/os-prober-accept-ESP-on-IMSM.patch new file mode 100644 index 0000000..4a388cc --- /dev/null +++ b/os-prober-accept-ESP-on-IMSM.patch @@ -0,0 +1,42 @@ +Index: os-prober-1.61/os-probes/mounted/x86/05efi +=================================================================== +--- os-prober-1.61.orig/os-probes/mounted/x86/05efi ++++ os-prober-1.61/os-probes/mounted/x86/05efi +@@ -28,20 +28,31 @@ if type udevadm > /dev/null 2>&1; then + fi + + if type udevinfo > /dev/null 2>&1; then +- # Skip virtual devices ++ eval "$(udevinfo -q property -n "$partition" | grep -E '^(MD_CONTAINER|ID_PART_ENTRY_(TYPE|SCHEME))=')" ++ debug "$partition container is '$MD_CONTAINER'" ++ ++ # Skip virtual devices unless they are known SW-RAID + if udevinfo -q path -n $partition | grep -q /virtual/; then +- debug "$1 is virtual device: exiting" +- exit 1 ++ # Check for Intel Matrix array ++ if [ -n "$MD_CONTAINER" ]; then ++ eval "$(udevinfo -q property -n "$MD_CONTAINER" | grep -E '^MD_METADATA=')" ++ debug "$MD_CONTAINER metadata is '$MD_METADATA'" ++ fi ++ if [ "$MD_METADATA" = imsm ]; then ++ debug "$partition is on IMSM array" ++ else ++ debug "$1 is virtual device: exiting" ++ exit 1 ++ fi + fi + +- eval "$(udevinfo -q property -n "$partition" | grep -E '^ID_PART_ENTRY_(TYPE|SCHEME)=')" + debug "$partition partition scheme is $ID_PART_ENTRY_SCHEME" + debug "$partition partition type is $ID_PART_ENTRY_TYPE" + + if [ -z "$ID_PART_ENTRY_TYPE" -o -z "$ID_PART_ENTRY_SCHEME" -o \ +- \( "$ID_PART_ENTRY_SCHEME" != gpt -a "$ID_PART_ENTRY_SCHEME" != msdos \) -o \ ++ \( "$ID_PART_ENTRY_SCHEME" != gpt -a "$ID_PART_ENTRY_SCHEME" != dos \) -o \ + \( "$ID_PART_ENTRY_SCHEME" = gpt -a "$ID_PART_ENTRY_TYPE" != c12a7328-f81f-11d2-ba4b-00a0c93ec93b \) -o \ +- \( "$ID_PART_ENTRY_SCHEME" = msdos -a "$ID_PART_ENTRY_TYPE" != 0xef \) ]; then ++ \( "$ID_PART_ENTRY_SCHEME" = dos -a "$ID_PART_ENTRY_TYPE" != 0xef \) ]; then + debug "$partition is not a ESP partition: exiting" + exit 1 + fi diff --git a/os-prober.changes b/os-prober.changes index 7f823d2..e74b8f0 100644 --- a/os-prober.changes +++ b/os-prober.changes @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Sun Aug 18 18:54:20 UTC 2013 - arvidjaar@gmail.com + +- add os-prober-accept-ESP-on-IMSM.patch + * accept EFI partition on IMSM MD array (bnc#818871) + * fix DOS partition table detection + Fri May 31 10:26:48 UTC 2013 - arvidjaar@gmail.com - update to os-prober 1.61. Highlights: diff --git a/os-prober.spec b/os-prober.spec index 7f28cbe..3822ecb 100644 --- a/os-prober.spec +++ b/os-prober.spec @@ -45,6 +45,8 @@ Patch8: os-prober-linux-secure-boot.patch Patch9: os-prober-btrfsfix.patch # PATCH-FIX-OPENSUSE: difference between upstream and our previous scripts Patch10: os-prober-EFI-openSUSEfy.patch +# PATCH-FIX-OPENSUSE: accept ESP on IMSM MD raid (bnc#818871) +Patch11: os-prober-accept-ESP-on-IMSM.patch Requires: /bin/grep Requires: /bin/sed @@ -72,6 +74,7 @@ cp %SOURCE1 . %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 %build make %{?_smp_mflags} CC="%__cc" CFLAGS="%{optflags}"