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