From 871faed8cddd8531bc65016bd915db69fbb4bb9794e46808c0baafb6b8d1f8b6 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sat, 9 Feb 2013 06:55:56 +0000 Subject: [PATCH] Accepting request 154934 from home:arvidjaar:branches:Base:System - os-prober-usr_lib-detection.patch - fix detection of linux distro which moved /lib to /usr/lib (e.g. Fedora) This fixes regression after grub2-mount started to be used. I think it should go in before final, at least Fedora 18 is missed without this patch. For post 12.3 I have prepared update to the current upstream which includes this fix. OBS-URL: https://build.opensuse.org/request/show/154934 OBS-URL: https://build.opensuse.org/package/show/Base:System/os-prober?expand=0&rev=19 --- os-prober-usr_lib-detection.patch | 22 ++++++++++++++++++++++ os-prober.changes | 6 ++++++ os-prober.spec | 3 +++ 3 files changed, 31 insertions(+) create mode 100644 os-prober-usr_lib-detection.patch diff --git a/os-prober-usr_lib-detection.patch b/os-prober-usr_lib-detection.patch new file mode 100644 index 0000000..5066278 --- /dev/null +++ b/os-prober-usr_lib-detection.patch @@ -0,0 +1,22 @@ +From: Andrey Borzenkov +Subject: fix detection of distributions with /lib => /usr/lib symlink +Upstream: yes + +grub-mount does not implement symbolic links, so distributions +that replaced /lib with /usr/lib were not detected. Check both +/lib and /usr/lib. Patch taken from upstream version. + +Affected is e.g. Fedora 18. +Index: os-prober/os-probes/mounted/common/90linux-distro +=================================================================== +--- os-prober.orig/os-probes/mounted/common/90linux-distro ++++ os-prober/os-probes/mounted/common/90linux-distro +@@ -13,7 +13,7 @@ type="$3" + # better. Make sure this test has a high number so that more accurate tests + # can come first. + # TODO: look for ld-linux.so on arches that have it +-if ls "$dir"/lib*/ld*.so* >/dev/null 2>/dev/null; then ++if (ls "$dir"/lib*/ld*.so* || ls "$dir"/usr/lib*/ld*.so*) >/dev/null 2>/dev/null; then + if [ -e "$dir/etc/debian_version" ]; then + short="Debian" + long="$(printf "Debian GNU/Linux (%s)\n" "$(cat "$dir/etc/debian_version")")" diff --git a/os-prober.changes b/os-prober.changes index 99a28d5..2c4b4d7 100644 --- a/os-prober.changes +++ b/os-prober.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Feb 8 15:16:13 UTC 2013 - arvidjaar@gmail.com + +- os-prober-usr_lib-detection.patch - fix detection of linux distro + which moved /lib to /usr/lib (e.g. Fedora) + ------------------------------------------------------------------- Sat Jan 19 19:12:20 UTC 2013 - arvidjaar@gmail.com diff --git a/os-prober.spec b/os-prober.spec index 939e9b2..3025cea 100644 --- a/os-prober.spec +++ b/os-prober.spec @@ -42,6 +42,8 @@ Patch3: os-prober-1.49-fix-grub2.cfg-parsing.patch Patch4: os-prober-1.49-skip-LVM2_member.patch # PATCH-FIX-OPENSUSE: Use correct name for grub2-mount 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 Requires: /bin/grep Requires: /bin/sed @@ -66,6 +68,7 @@ cp %SOURCE1 . %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 %build make %{?_smp_mflags} CC="%__cc" CFLAGS="%{optflags}"