Hello community, here is the log from the commit of package os-prober for openSUSE:Factory checked in at 2013-01-07 17:30:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/os-prober (Old) and /work/SRC/openSUSE:Factory/.os-prober.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "os-prober", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/os-prober/os-prober.changes 2012-01-04 07:25:44.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.os-prober.new/os-prober.changes 2013-01-07 17:30:20.000000000 +0100 @@ -1,0 +2,9 @@ +Fri Jan 4 11:18:01 UTC 2013 - [email protected] + +- add support for chainloading another UEFI bootloader (bnc#775610) + * 05efi - top level driver to search ESP + * efi-20microsoft - support Microsoft UEFI bootloader + * efi-10elilo - support ELILO UEFI bootloader (Agnelo de la Crotche) +- skip legacy Microsoft bootloader on UEFI (bnc#775610) + +------------------------------------------------------------------- New: ---- 05efi efi-10elilo efi-20microsoft os-prober-skip-MS-legacy-on-UEFI.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ os-prober.spec ++++++ --- /var/tmp/diff_new_pack.ejG8cw/_old 2013-01-07 17:30:21.000000000 +0100 +++ /var/tmp/diff_new_pack.ejG8cw/_new 2013-01-07 17:30:21.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package os-prober # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,6 @@ # - Name: os-prober Version: 1.49 Release: 0 @@ -27,11 +26,16 @@ Url: http://kitenet.net/~joey/code/os-prober/ Source0: http://ftp.de.debian.org/debian/pool/main/o/os-prober/%{name}_%{version}.tar.gz Source1: COPYING-note.txt +Source2: 05efi +Source3: efi-20microsoft +Source4: efi-10elilo # move newns binary outside of os-prober subdirectory, so that debuginfo # can be automatically generated for it Patch0: os-prober-newnsdirfix.patch # PATCH-FIX-OPENSUSE: Fix spelling of SUSE [email protected] Patch1: os-prober-SUSE.patch +# PATCH-FIX-OPENSUSE: Skip legacy Microsoft bootloader on UEFI [bnc#775610] +Patch2: os-prober-skip-MS-legacy-on-UEFI.patch Requires: /bin/grep Requires: /bin/sed @@ -52,6 +56,7 @@ cp %SOURCE1 . %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build make %{?_smp_mflags} CC="%__cc" CFLAGS="%{optflags}" @@ -88,6 +93,12 @@ if [ "$ARCH" = x86 ]; then install -m 755 -p os-probes/mounted/powerpc/20macosx \ %{buildroot}%{_libexecdir}/os-probes/mounted + install -m 755 -p %SOURCE2 %{buildroot}%{_libexecdir}/os-probes/mounted + install -m 755 -d %{buildroot}%{_libexecdir}/os-probes/mounted/efi + install -m 755 -p %SOURCE3 \ + %{buildroot}%{_libexecdir}/os-probes/mounted/efi/20microsoft + install -m 755 -p %SOURCE4 \ + %{buildroot}%{_libexecdir}/os-probes/mounted/efi/10elilo fi %files ++++++ 05efi ++++++ #!/bin/sh # Detects all UEFI bootloaders on EFI System Partition . /usr/share/os-prober/common.sh partition="$1" mpoint="$2" type="$3" # This file is for UEFI platform only if [ ! -d /sys/firmware/efi ]; then debug "Not on UEFI platform" exit 1 fi # Weed out stuff that doesn't apply to us case "$type" in vfat) debug "$1 is a FAT32 partition" ;; msdos) debug "$1 is a FAT16 partition" ;; *) debug "$1 is $type partition: exiting"; exit 1 ;; esac if type udevadm > /dev/null 2>&1; then udevinfo () { udevadm info "$@" } fi if type udevinfo > /dev/null 2>&1; then # Skip virtual devices if udevinfo -q path -n $partition | grep -q /virtual/; then debug "$1 is virtual device: exiting" exit 1 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_TYPE" != c12a7328-f81f-11d2-ba4b-00a0c93ec93b \) -o \ \( "$ID_PART_ENTRY_SCHEME" = msdos -a "$ID_PART_ENTRY_TYPE" != 0xef \) ]; then debug "$partition is not a ESP partition: exiting" exit 1 fi else debug "udevinfo and udevadm missing - cannot check partition type" fi efi=$(item_in_dir efi "$mpoint") if [ -z "$efi" ]; then debug "$mpoint does not have /EFI directory: exiting" exit 1 fi ret=1 for test in /usr/lib/os-probes/mounted/efi/*; do debug "running subtest $test" if [ -f "$test" ] && [ -x "$test" ]; then entry=$("$test" "$mpoint/$efi") if [ -n "$entry" ]; then debug "bootloader $entry found by subtest $test" ret=0 result "${partition}@/$efi/${entry}:efi" fi fi done exit $ret ++++++ efi-10elilo ++++++ #!/bin/sh # Detects ELILO bootloader on a EFI System Partition . /usr/share/os-prober/common.sh efi="$1" found= elilo=`find $1 -name "elilo.efi"` if [ -n "$elilo" ]; then bdir=`dirname $elilo` bdir=`basename $bdir` vendor=$(echo $bdir | sed 's|SuSE|SUSE|') long="${vendor} ELILO Boot Manager" short="ELILO" path=${bdir}/elilo.efi found=true fi if [ -n "$found" ]; then label="$(count_next_label "$short")" result "${path}:${long}:${label}" fi exit 0 ++++++ efi-20microsoft ++++++ #!/bin/sh # Detects Microsoft bootloader on a EFI System Partition . /usr/share/os-prober/common.sh efi="$1" found= for microsoft in $(item_in_dir microsoft "$efi"); do for boot in $(item_in_dir boot "$efi/$microsoft"); do bcd=$(item_in_dir bcd "$efi/$microsoft/$boot") bootmgfw=$(item_in_dir bootmgfw.efi "$efi/$microsoft/$boot") if [ -n "$bcd" -a -n "$bootmgfw" ]; then long="Windows Boot Manager" short=Windows path="$microsoft/$boot/$bootmgfw" found=true break fi done done if [ -n "$found" ]; then label="$(count_next_label "$short")" result "${path}:${long}:${label}" fi exit 0 ++++++ os-prober-skip-MS-legacy-on-UEFI.patch ++++++ From: Andrey Borzenkov <[email protected]> Date: Fri Jan 4 09:46:56 UTC 2013 Subject: skip legacy Microsoft bootloader on UEFI system References: bnc#775610 Patch-Mainline: no Sometimes Windows installs both legacy BIOS and UEFI bootloaders. Attempt to chainload legacy bootloader on UEFI system fails. Skip adding legacy bootloader in this case. TODO: this probably should be implemented as runtime check. But it does the right thing in majority of cases. If mixed legacy/UEFI boot will be used frequently, it can be revisited. Index: os-prober/os-probes/mounted/x86/20microsoft =================================================================== --- os-prober.orig/os-probes/mounted/x86/20microsoft +++ os-prober/os-probes/mounted/x86/20microsoft @@ -7,6 +7,12 @@ partition="$1" mpoint="$2" type="$3" +# This script looks for legacy BIOS bootloaders only. Skip if running UEFI +if [ -d /sys/firmware/efi ]; then + debug "Skipping legacy bootloaders on UEFI system" + exit 1 +fi + # Weed out stuff that doesn't apply to us case "$type" in ntfs|ntfs-3g) debug "$1 is a NTFS partition" ;; -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
