03b69a
Name:           os-prober
03b69a
Version:        1.74
366adb
Release:        9%{?dist}
03b69a
Summary:        Probes disks on the system for installed operating systems
03b69a
03b69a
Group:          System Environment/Base
03b69a
# For more information about licensing, see copyright file.
03b69a
License:        GPLv2+ and GPL+
03b69a
URL:            http://kitenet.net/~joey/code/os-prober/
03b69a
Source0:        http://ftp.us.debian.org/debian/pool/main/o/os-prober/%{name}_%{version}.tar.xz
03b69a
Patch0:         os-prober-no-dummy-mach-kernel.patch
03b69a
# Sent upstream
03b69a
Patch1:         os-prober-mdraidfix.patch
03b69a
Patch2:         os-prober-btrfsfix.patch
03b69a
Patch3:         os-prober-bootpart-name-fix.patch
03b69a
Patch4:         os-prober-mounted-partitions-fix.patch
03b69a
Patch5:         os-prober-factor-out-logger.patch
03b69a
# To be sent upstream
03b69a
Patch6:         os-prober-factored-logger-efi-fix.patch
03b69a
Patch7:         os-prober-umount-fix.patch
03b69a
Patch8:         os-prober-grub2-parsefix.patch
03b69a
Patch9:         os-prober-grepfix.patch
03b69a
Patch10:        os-prober-gentoo-fix.patch
03b69a
03b69a
Requires:       udev coreutils util-linux
03b69a
Requires:       grep /bin/sed /sbin/modprobe
03b69a
Requires:       device-mapper
03b69a
03b69a
BuildRequires:  gcc git
03b69a
03b69a
%description
03b69a
This package detects other OSes available on a system and outputs the results
03b69a
in a generic machine-readable format. Support for new OSes and Linux
03b69a
distributions can be added easily. 
03b69a
03b69a
%prep
03b69a
%autosetup -n %{name} -S git
03b69a
03b69a
find -type f -exec sed -i -e 's|usr/lib|usr/libexec|g' {} \;
03b69a
sed -i -e 's|grub-probe|grub2-probe|g' os-probes/common/50mounted-tests \
03b69a
     linux-boot-probes/common/50mounted-tests
03b69a
03b69a
%build
366adb
%make_build CFLAGS="%{optflags}" LDFLAGS="%{build_ldflags}"
03b69a
03b69a
%install
03b69a
install -m 0755 -d %{buildroot}%{_bindir}
03b69a
install -m 0755 -d %{buildroot}%{_var}/lib/%{name}
03b69a
03b69a
install -m 0755 -p os-prober linux-boot-prober %{buildroot}%{_bindir}
03b69a
install -m 0755 -Dp newns %{buildroot}%{_libexecdir}/os-prober/newns
03b69a
install -m 0644 -Dp common.sh %{buildroot}%{_datadir}/%{name}/common.sh
03b69a
03b69a
%ifarch m68k
03b69a
ARCH=m68k
03b69a
%endif
03b69a
%ifarch ppc ppc64
03b69a
ARCH=powerpc
03b69a
%endif
03b69a
%ifarch sparc sparc64
03b69a
ARCH=sparc
03b69a
%endif
03b69a
%ifarch %{ix86} x86_64
03b69a
ARCH=x86
03b69a
%endif
03b69a
03b69a
for probes in os-probes os-probes/mounted os-probes/init \
03b69a
              linux-boot-probes linux-boot-probes/mounted; do
03b69a
        install -m 755 -d %{buildroot}%{_libexecdir}/$probes 
03b69a
        cp -a $probes/common/* %{buildroot}%{_libexecdir}/$probes
03b69a
        if [ -e "$probes/$ARCH" ]; then 
03b69a
                cp -a $probes/$ARCH/* %{buildroot}%{_libexecdir}/$probes 
03b69a
        fi
03b69a
done
03b69a
if [ "$ARCH" = x86 ]; then
03b69a
        install -m 755 -p os-probes/mounted/powerpc/20macosx \
03b69a
            %{buildroot}%{_libexecdir}/os-probes/mounted
03b69a
fi
03b69a
03b69a
%files
03b69a
%doc README TODO debian/changelog
03b69a
%license debian/copyright
03b69a
%{_bindir}/*
03b69a
%{_libexecdir}/*
03b69a
%{_datadir}/%{name}
03b69a
%{_var}/lib/%{name}
03b69a
03b69a
%changelog
366adb
* Tue Jun 22 2021 Javier Martinez Canillas <javierm@redhat.com> - 1.74-9
366adb
- Another build but with a gating.yaml to allow leaving gating
366adb
  Resolves: rhbz#1624158
366adb
366adb
* Mon Jun 21 2021 Javier Martinez Canillas <javierm@redhat.com> - 1.74-8
366adb
- Bump NVR to allow building
366adb
  Resolves: rhbz#1624158
366adb
366adb
* Thu Jul 25 2019 Peter Jones <pjones@redhat.com> - 1.74-7
366adb
- Make gcc use -Wl,-z,now -Wl,-z,relro -pie.  Dunno why the default didn't
366adb
  pick this up.
366adb
  Resolves: rhbz#1624158
366adb
03b69a
* Sun Feb 18 2018 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.74-6
03b69a
- Add gcc build dependency
03b69a
03b69a
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.74-5
03b69a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
03b69a
03b69a
* Fri Dec 29 2017 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.74-4
03b69a
- Fix a path problem in btrfsfix.patch, fixes #1529616
03b69a
03b69a
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.74-3
03b69a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
03b69a
03b69a
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.74-2
03b69a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
03b69a
03b69a
* Mon Mar 27 2017 Neal Gompa <ngompa13@gmail.com> - 1.74-1
03b69a
- Update to upstream version 1.74
03b69a
- Drop merged patches
03b69a
- Rediff remaining patches
03b69a
- Move newns to /usr/libexec/os-prober (debuginfo generation works)
03b69a
- Mark copyright file as license file
03b69a
03b69a
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.71-2
03b69a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
03b69a
03b69a
* Fri Mar 04 2016 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.71-1
03b69a
- Update to upstream version 1.71
03b69a
- Use git based autosetup for applying patches
03b69a
03b69a
* Mon Feb 15 2016 Peter Jones <pjones@redhat.com> - 1.70-3
03b69a
- Don't keep backups with 'patch -b'; they wind up in the ouput package.
03b69a
03b69a
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.70-2
03b69a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
03b69a
03b69a
* Fri Nov 13 2015 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.70-1
03b69a
- Update to upstream version 1.70, fixes #1275641
03b69a
- Fix bug #1236358 - os-prober duplicates grub entries for read/write btrfs
03b69a
  subvolumes, thanks to Helmut Horvath
03b69a
- Fix bug #1236649 - os-prober does not detect os on btrfs partition without
03b69a
  any subvolume
03b69a
03b69a
* Tue Oct 20 2015 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.68-1
03b69a
- Update to upstream version 1.68, bug #1267779
03b69a
- Support a case where a kernel named vmlinuz/x is used under Gentoo, bug #1223237
03b69a
03b69a
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.65-3
03b69a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
03b69a
03b69a
* Tue Dec 23 2014 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.65-2
03b69a
- Fix using grep for searching binary files, fixes #1172405. Thanks Paul Eggert
03b69a
  for initial patch fixing grep usage in 83haiku
03b69a
03b69a
* Sun Dec 07 2014 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.65-1
03b69a
- Using latest upstream version tarball to be consistent with upstream
03b69a
  versioning
03b69a
03b69a
* Sat Oct 25 2014 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.58-11
03b69a
- Fix parsing grub2's initrd/linux variations, rhbz #1108344
03b69a
03b69a
* Mon Sep 08 2014 Peter Jones <pjones@redhat.com> - 1.58-10
03b69a
- Make os-prober output include partitions for UEFI chainloads.
03b69a
  Resolves: rhbz#873207
03b69a
03b69a
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.58-9
03b69a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
03b69a
03b69a
* Sun Jul 06 2014 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.58-8
03b69a
- Fix bug in counting LVM LVs which their name contains 'btrfs' as btrfs volumes
03b69a
03b69a
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.58-7
03b69a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
03b69a
03b69a
* Tue May 06 2014 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.58-6
03b69a
- Fix separate /usr partitions for usrmove distros (bug #1044760)
03b69a
- Fix umount error when directory is temporarily busy (bug #903906)
03b69a
03b69a
* Thu Apr 24 2014 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.58-5
03b69a
- Fixed bug #982009: fix btrfs support
03b69a
- Suppress some more debug messages when debug messages are disabled
03b69a
03b69a
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.58-4
03b69a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
03b69a
03b69a
* Tue Jul 02 2013 Adam Williamson <awilliam@redhat.com> - 1.58-3
03b69a
- revert factored-logger-efi-fix.patch until grub2 is updated to match
03b69a
03b69a
* Tue Jun 18 2013 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.58-2
03b69a
- Fix a bug in EFI detection because of redirecting result output
03b69a
03b69a
* Sun May 05 2013 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.58-1
03b69a
- Update to upstream version 1.58, with UEFI support
03b69a
03b69a
* Sat Feb 02 2013 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.57-2
03b69a
- Fix a bug in recent btrfs patch when an extended partition is examined. 
03b69a
  (H.J. Lu) (bug #906847)
03b69a
- Fix naming of /boot partitions according to their fstab entry (bug #893472)
03b69a
- Don't generate .btrfsfix files which will be included in final rpm
03b69a
- Fix wrong boot partition set by linux-boot-prober when / and /boot are
03b69a
  mounted (bug #906886)
03b69a
- Factor out 'logger', so that it is run once and logs are piped to it (John
03b69a
  Reiser) (bug #875356)
03b69a
03b69a
* Tue Jan 22 2013 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.57-1
03b69a
- Update to 1.57 (#890409)
03b69a
- Use shell string processing rather than 'basename' (#875356)
03b69a
- Make it possible to disable logging debug messages by assigning a value to
03b69a
  OS_PROBER_DISABLE_DEBUG environment variable (Gene Czarcinski) (#893997).
03b69a
- Detect multi btrfs pools/volumes (Gene Czarcinski) (#888341)
03b69a
03b69a
* Thu Oct 11 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.56-1
03b69a
- Update to 1.56 with a bug fix and applied one of my patches
03b69a
03b69a
* Mon Aug 27 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.55-1
03b69a
- Update to new upstream version: 1.55
03b69a
03b69a
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.53-4
03b69a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
03b69a
03b69a
* Sat Jun 02 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.53-3
03b69a
- Consider usrmoved distribtions in fallback linux detector (bug #826754)
03b69a
- Remove patch backup files from final rpm package (by not creating a backup!)
03b69a
03b69a
* Fri May 25 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.53-2
03b69a
- Add support for OSes installed on Linux mdraid partitions, bug #752402
03b69a
- Add Fedora's grub2 config path, fixes generating menu entries for other
03b69a
  installed Fedora's
03b69a
- Fixed bug in parsing yaboot.conf: accept spaces around '=' for append, 
03b69a
  bug #825041
03b69a
03b69a
* Fri May 11 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.53-1
03b69a
- Updated to 1.53 for a bugfix
03b69a
- Fixed directory name in upstream tarbal
03b69a
03b69a
* Thu May 10 2012 Peter Jones <pjones@redhat.com> - 1.52-3
03b69a
- Don't detect our Mac boot blocks as OS X.
03b69a
  Resolves: rhbz#811412
03b69a
03b69a
* Sun Apr 29 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.52-2
03b69a
- use correct directory name for setup
03b69a
03b69a
* Sun Apr 29 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.52-1
03b69a
- Updated to 1.52, supports win 8
03b69a
03b69a
* Wed Mar 28 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.51-1
03b69a
- Update to latest upstream version, 1.51
03b69a
03b69a
* Sat Jan 21 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.48-3
03b69a
- Remove dmraid and lvm2 dependency. bug #770393
03b69a
03b69a
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.48-2
03b69a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
03b69a
03b69a
* Mon Jul 25 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.48-1
03b69a
- Updated to 1.48 release
03b69a
03b69a
* Thu May 19 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.47-1
03b69a
- Updated to the new upstream version 1.47
03b69a
03b69a
* Wed May 04 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.46-2
03b69a
- Removed obsolete parts (build tag, defattr, etc)
03b69a
- Added a patch to move newns outside of os-prober subdirectory
03b69a
- Added required utilities as package requires
03b69a
03b69a
* Sat Apr 30 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.46-1
03b69a
- Updated to 1.46 release
03b69a
03b69a
* Tue Feb 22 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.42-2
03b69a
- Remove executable permission from common.sh
03b69a
03b69a
* Thu Feb 17 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.42-1
03b69a
- Initial version