From 0ff790800129d27d16c32fb45556d6d48068d76f4bfe0275165278b878854915 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 27 Feb 2018 10:24:15 +0000 Subject: [PATCH] Accepting request 580144 from home:michael-chang:branches:Base:System - Use blkid to bailout udevinfo for db not imported in chroot environment (bsc#1076779) * os-prober-05efi-blkid.patch OBS-URL: https://build.opensuse.org/request/show/580144 OBS-URL: https://build.opensuse.org/package/show/Base:System/os-prober?expand=0&rev=81 --- os-prober-05efi-blkid.patch | 18 ++++++++++++++++++ os-prober.changes | 7 +++++++ os-prober.spec | 3 +++ 3 files changed, 28 insertions(+) create mode 100644 os-prober-05efi-blkid.patch diff --git a/os-prober-05efi-blkid.patch b/os-prober-05efi-blkid.patch new file mode 100644 index 0000000..5bfe591 --- /dev/null +++ b/os-prober-05efi-blkid.patch @@ -0,0 +1,18 @@ +Index: os-prober/os-probes/mounted/x86/05efi +=================================================================== +--- os-prober.orig/os-probes/mounted/x86/05efi ++++ os-prober/os-probes/mounted/x86/05efi +@@ -46,6 +46,13 @@ if type udevinfo > /dev/null 2>&1; then + fi + fi + ++ # udev may not work in chroot as its db may not be there, bailout that by blkid (bsc#1076779) ++ if [ -z "$ID_PART_ENTRY_TYPE" -a -z "$ID_PART_ENTRY_SCHEME" ] && ++ type blkid > /dev/null 2>&1; then ++ debug "fallback to blkid" ++ eval "$(blkid -p -o udev "$partition" | grep -E '^(ID_PART_ENTRY_(TYPE|SCHEME))=')" ++ fi ++ + debug "$partition partition scheme is $ID_PART_ENTRY_SCHEME" + debug "$partition partition type is $ID_PART_ENTRY_TYPE" + diff --git a/os-prober.changes b/os-prober.changes index 41964a1..0f8223b 100644 --- a/os-prober.changes +++ b/os-prober.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Feb 26 07:34:02 UTC 2018 - mchang@suse.com + +- Use blkid to bailout udevinfo for db not imported in chroot + environment (bsc#1076779) + * os-prober-05efi-blkid.patch + ------------------------------------------------------------------- Fri Feb 23 04:40:59 UTC 2018 - mchang@suse.com diff --git a/os-prober.spec b/os-prober.spec index 1c6da15..74bffaa 100644 --- a/os-prober.spec +++ b/os-prober.spec @@ -64,6 +64,8 @@ Patch22: os-prober-btrfs-always-detect-default.patch 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 +# PATCH-FIX-OPENSUSE: Windows 10 is not listed in the grub menu (bsc#1076779) +Patch25: os-prober-05efi-blkid.patch Requires: /bin/grep Requires: /bin/sed Requires: /sbin/modprobe @@ -106,6 +108,7 @@ cp %{SOURCE1} . %patch22 -p1 %patch23 -p1 %patch24 -p1 +%patch25 -p1 find . -name \*.orig -delete %build