c62eab
Name:           os-prober
c62eab
Version:        1.58
e8c52d
Release:        9%{?dist}
c62eab
Summary:        Probes disks on the system for installed operating systems
c62eab
c62eab
Group:          System Environment/Base
c62eab
# For more information about licensing, see copyright file.
c62eab
License:        GPLv2+ and GPL+
c62eab
URL:            http://kitenet.net/~joey/code/os-prober/
c62eab
Source0:        http://ftp.de.debian.org/debian/pool/main/o/os-prober/%{name}_%{version}.tar.gz
c62eab
# move newns binary outside of os-prober subdirectory, so that debuginfo
c62eab
# can be automatically generated for it
e8c52d
Patch0001: 0001-Change-filepath-to-newns.patch
e8c52d
Patch0002: 0002-Don-t-count-dummy-mach_kernel-as-MacOS-X-811412.patch
e8c52d
Patch0003: 0003-Detect-OS-installed-to-mdraid-partition-752402.patch
e8c52d
Patch0004: 0004-Yaboot-allows-spaces-in-append-825041.patch
e8c52d
Patch0005: 0005-Detect-ld.so-after-usr-move-826754.patch
e8c52d
Patch0006: 0006-Use-shell-processing-instead-of-basename-875356.patch
e8c52d
Patch0007: 0007-Add-option-for-less-logging-893997.patch
e8c52d
Patch0008: 0008-Improve-btrfs-detection-support-888341.patch
e8c52d
Patch0009: 0009-Support-detection-on-btrfs-software-raid-906847.patch
e8c52d
Patch0010: 0010-Name-lvm-boot-partitions-by-fstab-entry-893472.patch
e8c52d
Patch0011: 0011-Set-correct-boot-partition-906886.patch
e8c52d
Patch0012: 0012-Factor-out-unnecessary-logger-calls-875356.patch
e8c52d
Patch0013: 0013-Issue-with-EFI-detection-in-logger-873207.patch
e8c52d
Patch0014: 0014-Man-pages-missing-948848.patch
e8c52d
Patch0015: 0015-Properly-handle-extended-dos-partitions-1322957.patch
e8c52d
Patch0016: 0016-Windows-detection-requires-binary-grep-1322956.patch
e8c52d
Patch0017: 0017-Add-Windows-10-detection-support-1322956.patch
e8c52d
Patch0018: 0018-Suppress-non-blocking-dmraid-error-info-1198918.patch
e8c52d
Patch0019: 0019-Do-not-resolve-device-mapper-symlinks-1300262.patch
e8c52d
Patch0020: 0020-Use-POSIX-shell-syntax-1300262.patch
e8c52d
Patch0021: 0021-Fix-extended-dos-partition-regex-1322957.patch
c62eab
c62eab
Requires:       udev coreutils util-linux
c62eab
Requires:       grep /bin/sed /sbin/modprobe
c62eab
c62eab
%description
c62eab
This package detects other OSes available on a system and outputs the results
c62eab
in a generic machine-readable format. Support for new OSes and Linux
c62eab
distributions can be added easily. 
c62eab
c62eab
%prep
c62eab
%setup -q
e8c52d
%patch01 -p1
e8c52d
%patch02 -p1
e8c52d
%patch03 -p1
e8c52d
%patch04 -p1
e8c52d
%patch05 -p1
e8c52d
%patch06 -p1
e8c52d
%patch07 -p1
e8c52d
%patch08 -p1
e8c52d
%patch09 -p1
e8c52d
%patch10 -p1
e8c52d
%patch11 -p1
e8c52d
%patch12 -p1
e8c52d
%patch13 -p1
e8c52d
%patch14 -p1
e8c52d
%patch15 -p1
e8c52d
%patch16 -p1
e8c52d
%patch17 -p1
e8c52d
%patch18 -p1
e8c52d
%patch19 -p1
e8c52d
%patch20 -p1
e8c52d
%patch21 -p1
c62eab
c62eab
find -type f -exec sed -i -e 's|usr/lib|usr/libexec|g' {} \;
c62eab
sed -i -e 's|grub-probe|grub2-probe|g' os-probes/common/50mounted-tests \
c62eab
     linux-boot-probes/common/50mounted-tests
c62eab
c62eab
%build
c62eab
make %{?_smp_mflags} CFLAGS="%{optflags}"
c62eab
c62eab
%install
c62eab
install -m 0755 -d %{buildroot}%{_bindir}
c62eab
install -m 0755 -d %{buildroot}%{_var}/lib/%{name}
c0b357
install -d 0755 -d %{buildroot}%{_mandir}/man1/
c62eab
c62eab
install -m 0755 -p os-prober linux-boot-prober %{buildroot}%{_bindir}
c62eab
install -m 0755 -Dp newns %{buildroot}%{_libexecdir}/newns
c62eab
install -m 0644 -Dp common.sh %{buildroot}%{_datadir}/%{name}/common.sh
c0b357
install -m 0644 -Dp *.1 %{buildroot}%{_mandir}/man1/
c62eab
c62eab
%ifarch m68k
c62eab
ARCH=m68k
c62eab
%endif
c62eab
%ifarch ppc ppc64
c62eab
ARCH=powerpc
c62eab
%endif
c62eab
%ifarch sparc sparc64
c62eab
ARCH=sparc
c62eab
%endif
c62eab
%ifarch %{ix86} x86_64
c62eab
ARCH=x86
c62eab
%endif
c62eab
c62eab
for probes in os-probes os-probes/mounted os-probes/init \
c62eab
              linux-boot-probes linux-boot-probes/mounted; do
c62eab
        install -m 755 -d %{buildroot}%{_libexecdir}/$probes 
c62eab
        cp -a $probes/common/* %{buildroot}%{_libexecdir}/$probes
c62eab
        if [ -e "$probes/$ARCH" ]; then 
c62eab
                cp -a $probes/$ARCH/* %{buildroot}%{_libexecdir}/$probes 
c62eab
        fi
c62eab
done
c62eab
if [ "$ARCH" = x86 ]; then
c62eab
        install -m 755 -p os-probes/mounted/powerpc/20macosx \
c62eab
            %{buildroot}%{_libexecdir}/os-probes/mounted
c62eab
fi
c62eab
c62eab
%files
c62eab
%doc README TODO debian/copyright debian/changelog
c62eab
%{_bindir}/*
c62eab
%{_datadir}/%{name}
c0b357
%{_libexecdir}/*
c0b357
%{_mandir}/man1/*
c62eab
%{_var}/lib/%{name}
c62eab
c62eab
%changelog
e8c52d
* Wed Sep 14 2016 rmarshall@redhat.com - 1.58-9
e8c52d
- Fix regular expression that missed a corner case when detecting
e8c52d
  extended dos partitions.
e8c52d
  Resolves: rhbz#1322957
e8c52d
e8c52d
* Wed Jul 06 2016 rmarshall@redhat.com - 1.58-8
e8c52d
- Resolve some coverity concerns with how the previous patch detected
e8c52d
  whether or not a partition was a device mapper device.
e8c52d
  Related: rhbz#1300262
e8c52d
e8c52d
* Tue Jul 05 2016 rmarshall@redhat.com - 1.58-7
e8c52d
- Do not resolve device mapper links when generating stanzas
e8c52d
  for bootloader.
e8c52d
  Resolves: rhbz#1300262
e8c52d
e8c52d
* Wed May 04 2016 rmarshall@redhat.com - 1.58-6
e8c52d
- Adding handling to skip probing extended dos partitions
e8c52d
  Resolves: rhbz#1322957
e8c52d
- Improve Windows detection for dual boot and support Windows 10
e8c52d
  Resolves: rhbz#1322956
e8c52d
- Suppress non-blocking dmraid sector size warning message
e8c52d
  Resolves: rhbz#1198918
e8c52d
c0b357
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.58-5
c0b357
- Mass rebuild 2014-01-24
c0b357
c0b357
* Mon Jan 20 2014 Peter Jones <pjones@redhat.com> - 1.58-4
c0b357
- Add man pages.
c0b357
  Resolves: rhbz#948848
c0b357
c0b357
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.58-3
c0b357
- Mass rebuild 2013-12-27
c0b357
c62eab
* Tue Jun 18 2013 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.58-2
c62eab
- Fix a bug in EFI detection because of redirecting result output
c62eab
c62eab
* Sun May 05 2013 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.58-1
c62eab
- Update to upstream version 1.58, with UEFI support
c62eab
c62eab
* Sat Feb 02 2013 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.57-2
c62eab
- Fix a bug in recent btrfs patch when an extended partition is examined. 
c62eab
  (H.J. Lu) (bug #906847)
c62eab
- Fix naming of /boot partitions according to their fstab entry (bug #893472)
c62eab
- Don't generate .btrfsfix files which will be included in final rpm
c62eab
- Fix wrong boot partition set by linux-boot-prober when / and /boot are
c62eab
  mounted (bug #906886)
c62eab
- Factor out 'logger', so that it is run once and logs are piped to it (John
c62eab
  Reiser) (bug #875356)
c62eab
c62eab
* Tue Jan 22 2013 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.57-1
c62eab
- Update to 1.57 (#890409)
c62eab
- Use shell string processing rather than 'basename' (#875356)
c62eab
- Make it possible to disable logging debug messages by assigning a value to
c62eab
  OS_PROBER_DISABLE_DEBUG environment variable (Gene Czarcinski) (#893997).
c62eab
- Detect multi btrfs pools/volumes (Gene Czarcinski) (#888341)
c62eab
c62eab
* Thu Oct 11 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.56-1
c62eab
- Update to 1.56 with a bug fix and applied one of my patches
c62eab
c62eab
* Mon Aug 27 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.55-1
c62eab
- Update to new upstream version: 1.55
c62eab
c62eab
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.53-4
c62eab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
c62eab
c62eab
* Sat Jun 02 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.53-3
c62eab
- Consider usrmoved distribtions in fallback linux detector (bug #826754)
c62eab
- Remove patch backup files from final rpm package (by not creating a backup!)
c62eab
c62eab
* Fri May 25 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.53-2
c62eab
- Add support for OSes installed on Linux mdraid partitions, bug #752402
c62eab
- Add Fedora's grub2 config path, fixes generating menu entries for other
c62eab
  installed Fedora's
c62eab
- Fixed bug in parsing yaboot.conf: accept spaces around '=' for append, 
c62eab
  bug #825041
c62eab
c62eab
* Fri May 11 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.53-1
c62eab
- Updated to 1.53 for a bugfix
c62eab
- Fixed directory name in upstream tarbal
c62eab
c62eab
* Thu May 10 2012 Peter Jones <pjones@redhat.com> - 1.52-3
c62eab
- Don't detect our Mac boot blocks as OS X.
c62eab
  Resolves: rhbz#811412
c62eab
c62eab
* Sun Apr 29 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.52-2
c62eab
- use correct directory name for setup
c62eab
c62eab
* Sun Apr 29 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.52-1
c62eab
- Updated to 1.52, supports win 8
c62eab
c62eab
* Wed Mar 28 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.51-1
c62eab
- Update to latest upstream version, 1.51
c62eab
c62eab
* Sat Jan 21 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.48-3
c62eab
- Remove dmraid and lvm2 dependency. bug #770393
c62eab
c62eab
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.48-2
c62eab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
c62eab
c62eab
* Mon Jul 25 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.48-1
c62eab
- Updated to 1.48 release
c62eab
c62eab
* Thu May 19 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.47-1
c62eab
- Updated to the new upstream version 1.47
c62eab
c62eab
* Wed May 04 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.46-2
c62eab
- Removed obsolete parts (build tag, defattr, etc)
c62eab
- Added a patch to move newns outside of os-prober subdirectory
c62eab
- Added required utilities as package requires
c62eab
c62eab
* Sat Apr 30 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.46-1
c62eab
- Updated to 1.46 release
c62eab
c62eab
* Tue Feb 22 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.42-2
c62eab
- Remove executable permission from common.sh
c62eab
c62eab
* Thu Feb 17 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.42-1
c62eab
- Initial version