# # spec file for package os-prober # # 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 # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: os-prober Version: 1.61 Release: 0 Summary: Probes disks on the system for installed operating systems License: GPL-2.0+ Group: System/Boot 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 # 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 aj@suse.de Patch1: os-prober-SUSE.patch # PATCH-FIX-OPENSUSE: Fix parsing of grub.cfg [bnc#796919] Patch3: os-prober-1.49-fix-grub2.cfg-parsing.patch # PATCH-FIX-OPENSUSE: Do not try to mount LVM2 PV [bnc#798604] 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: Probe also unpartitioned Linux MD devices (bnc#811006) Patch7: os-prober-probe-MD-devices.patch # PATCH-FIX-OPENSUSE: Detect linux secure boot entries too (bnc#810912) Patch8: os-prober-linux-secure-boot.patch # PATCH-FIX-OPENSUSE: btrfs support from Fedora (rediffed) Patch9: os-prober-btrfsfix.patch # PATCH-FIX-OPENSUSE: difference between upstream and our previous scripts Patch10: os-prober-EFI-openSUSEfy.patch Requires: /bin/grep Requires: /bin/sed Requires: /sbin/modprobe Requires: coreutils Requires: dmraid Requires: lvm2 Requires: udev Requires: util-linux %description This package detects other OSes available on a system and outputs the results in a generic machine-readable format. Support for new OSes and Linux distributions can be added easily. %prep %setup -q -n %{name}-%{version} cp %SOURCE1 . %patch0 -p1 %patch1 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %patch10 -p1 %build make %{?_smp_mflags} CC="%__cc" CFLAGS="%{optflags}" %install install -m 0755 -d %{buildroot}%{_bindir} install -m 0755 -d %{buildroot}%{_localstatedir}/lib/%{name} install -m 0755 -p os-prober linux-boot-prober %{buildroot}%{_bindir} install -m 0755 -Dp newns %{buildroot}%{_libexecdir}/newns install -m 0644 -Dp common.sh %{buildroot}%{_datadir}/%{name}/common.sh %ifarch m68k ARCH=m68k %endif %ifarch ppc ppc64 ARCH=powerpc %endif %ifarch sparc sparc64 ARCH=sparc %endif %ifarch %{ix86} x86_64 ARCH=x86 %endif for probes in os-probes os-probes/mounted os-probes/init \ linux-boot-probes linux-boot-probes/mounted; do install -m 755 -d %{buildroot}%{_libexecdir}/$probes cp -a $probes/common/* %{buildroot}%{_libexecdir}/$probes if [ -e "$probes/$ARCH" ]; then cp -a $probes/$ARCH/* %{buildroot}%{_libexecdir}/$probes fi done if [ "$ARCH" = x86 ]; then install -m 755 -p os-probes/mounted/powerpc/20macosx \ %{buildroot}%{_libexecdir}/os-probes/mounted fi %files %defattr(-,root,root,-) %doc README TODO debian/copyright debian/changelog COPYING-note.txt %{_bindir}/* %{_libexecdir}/linux-boot-probes %{_libexecdir}/newns %{_libexecdir}/os-probes %{_datadir}/%{name} %{_localstatedir}/lib/%{name} %changelog