From 5f1f8cb2d4f6a636bf366be0b22ec9e88aef2844d7a71dcb581481bef703e35c Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Mon, 25 Mar 2013 08:05:48 +0000 Subject: [PATCH] Accepting request 160858 from home:arvidjaar:branches:Base:System resubmit with patch mentioned in changes. OBS-URL: https://build.opensuse.org/request/show/160858 OBS-URL: https://build.opensuse.org/package/show/Base:System/os-prober?expand=0&rev=23 --- os-prober-probe-MD-devices.patch | 26 ++++++++++++++++++++++++++ os-prober.changes | 6 ++++++ os-prober.spec | 3 +++ 3 files changed, 35 insertions(+) create mode 100644 os-prober-probe-MD-devices.patch diff --git a/os-prober-probe-MD-devices.patch b/os-prober-probe-MD-devices.patch new file mode 100644 index 0000000..cd8a6b8 --- /dev/null +++ b/os-prober-probe-MD-devices.patch @@ -0,0 +1,26 @@ +Index: os-prober/os-prober +=================================================================== +--- os-prober.orig/os-prober ++++ os-prober/os-prober +@@ -39,6 +39,11 @@ partitions () { + fi + done + ++ # Add Linux MD unpartioned devices. Linux MD partitions are already covered above ++ [ -f /proc/mdstat ] && grep '^md' /proc/mdstat | while read md line; do ++ [ -e "/dev/$md" ] && echo "/dev/$md" ++ done ++ + # Add Serial ATA RAID devices + if type dmraid >/dev/null 2>&1 && \ + dmraid -s -c >/dev/null 2>&1; then +@@ -79,7 +84,8 @@ parse_proc_mdstat () { + udevadm info "$@" + } + fi +- while read line; do ++ # Only add MD slaves to the list ++ while read md line; do + for word in $line; do + dev="${word%%[*}" + # TODO: factor this out to something in di-utils if diff --git a/os-prober.changes b/os-prober.changes index a299d15..a436e12 100644 --- a/os-prober.changes +++ b/os-prober.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 22 17:29:32 UTC 2013 - arvidjaar@gmail.com + +- add os-prober-probe-MD-devices.patch (bnc#811006) + * probe also Linux MD devices + ------------------------------------------------------------------- Sun Mar 3 16:06:32 UTC 2013 - arvidjaar@gmail.com diff --git a/os-prober.spec b/os-prober.spec index 3025cea..5c3118b 100644 --- a/os-prober.spec +++ b/os-prober.spec @@ -44,6 +44,8 @@ Patch4: os-prober-1.49-skip-LVM2_member.patch Patch5: os-prober-1.49-grub2-mount.patch # PATCH-FIX-OPENSUSE: Detect distributions which moved /lib to /usr/lib Patch6: os-prober-usr_lib-detection.patch +# PATCH-FIX-OPENSUSE: Probe also unpartitioned Linux MD devices (bnc#811006) +Patch7: os-prober-probe-MD-devices.patch Requires: /bin/grep Requires: /bin/sed @@ -69,6 +71,7 @@ cp %SOURCE1 . %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 %build make %{?_smp_mflags} CC="%__cc" CFLAGS="%{optflags}"