diff --git a/os-prober-linux-distro-parse-os-release.patch b/os-prober-linux-distro-parse-os-release.patch new file mode 100644 index 0000000..93dbd8b --- /dev/null +++ b/os-prober-linux-distro-parse-os-release.patch @@ -0,0 +1,14 @@ +Index: os-prober-1.70/os-probes/mounted/common/90linux-distro +=================================================================== +--- os-prober-1.70.orig/os-probes/mounted/common/90linux-distro ++++ os-prober-1.70/os-probes/mounted/common/90linux-distro +@@ -117,6 +117,9 @@ elif [ -e "$dir/etc/lfs-release" ]; then + elif [ -e "$dir/etc/meego-release" ]; then + short="MeeGo" + long="$(head -1 "$dir/etc/meego-release")" ++elif [ -e "$dir/etc/os-release" ]; then ++ short=$(sed -n "/^NAME=/{s@\"\(.*\)\"@\1@;t 1;s@'\(.*\)'@\1@;: 1;s@^[^=]\+=@@;p;b}" $dir/etc/os-release) ++ long="$short $(sed -n "/^VERSION=/{s@\"\(.*\)\"@\1@;t 1;s@'\(.*\)'@\1@;: 1;s@^[^=]\+=@@;p;b}" $dir/etc/os-release)" + # This test is inaccurate, but given separate / and /boot partitions and the + # fact that only some architectures have ld-linux.so, I can't see anything + # better. Make sure this test has a high number so that more accurate tests diff --git a/os-prober.changes b/os-prober.changes index e595c5f..743c93e 100644 --- a/os-prober.changes +++ b/os-prober.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 14 04:46:42 UTC 2016 - mchang@suse.com + +- Parse /etc/os-release for openSUSE Tumbleweed (bsc#997465) + * os-prober-linux-distro-parse-os-release.patch + ------------------------------------------------------------------- Thu Dec 17 10:14:04 UTC 2015 - mchang@suse.com diff --git a/os-prober.spec b/os-prober.spec index fc1f00a..7938965 100644 --- a/os-prober.spec +++ b/os-prober.spec @@ -1,7 +1,7 @@ # # spec file for package os-prober # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 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 @@ -66,6 +66,8 @@ Patch21: os-prober-btrfs-snapshot-detection.patch Patch22: os-prober-btrfs-always-detect-default.patch # PATCH-FIX-OPENSUSE: y2base runs at 100% cpu busy from beginning in installation of files to completion (bsc#953987) Patch23: os-prober-linux-distro-avoid-expensive-ld-file-test.patch +# PATCH-FIX-OPENSUSE: Leap does not recognize Tumbleweed any more (bsc#997465) +Patch24: os-prober-linux-distro-parse-os-release.patch Requires: /bin/grep Requires: /bin/sed Requires: /sbin/modprobe @@ -108,6 +110,7 @@ cp %{SOURCE1} . %patch21 -p1 %patch22 -p1 %patch23 -p1 +%patch24 -p1 find . -name \*.orig -delete %build