Sophie

Sophie

distrib > Mageia > 9 > i586 > by-pkgid > 4059bfc13bd9ebd7ee31e446c4da4903 > files > 29

os-prober-1.81-2.mga9.src.rpm

# Warning, this package is synchronized with openSUSE and Fedora!

Name:           os-prober
Version:        1.81
Release:        %mkrel 2
Summary:        Probes disks on the system for installed operating systems
# For more information about licensing, see copyright file.
License:        GPLv2+ and GPL+
Group:          System/Boot and Init
Url:            https://kitenet.net/~joey/code/%{name}/
Source0:        https://ftp.debian.org/debian/pool/main/o/%{name}/%{name}_%{version}.tar.xz
# add bsd detection script Mga#18271 (r1007407 & r1008727)
Source2:        91bsd
Source3:        60ufs-test
# OpenSuSE patch: Fix spelling of SUSE aj@suse.de
Patch1:         os-prober-SUSE.patch
# OpenSuSE patch: Fix parsing of grub.cfg [bnc#796919]
Patch3:         os-prober-1.49-fix-grub2.cfg-parsing.patch
# OpenSuSE patch: Probe also unpartitioned Linux MD devices (bnc#811006)
Patch7:         os-prober-probe-MD-devices.patch
# OpenSuSE patch: Detect linux secure boot entries too (bnc#810912)
Patch8:         os-prober-linux-secure-boot.patch
# OpenSuSE patch: btrfs support from Fedora (rediffed)
Patch9:         os-prober-btrfsfix.patch
# OpenSuSE patch: difference between upstream and our previous scripts
Patch10:        os-prober-EFI-openSUSEfy.patch
# OpenSuSE patch: accept ESP on IMSM MD raid (bnc#818871)
Patch11:        os-prober-accept-ESP-on-IMSM.patch
# OpenSuSE patch: don't modprobe all file system modules and don't test mount on unknown partition (bnc#851722)
Patch12:        os-prober-dont-load-all-fs-module-and-dont-test-mount.patch
# OpenSuSE patch: fix os-prober entries for distro on btrfs root-fs not created (bnc#846003)
Patch13:       os-prober-fix-btrfs-subvol-mounted-tests.patch
# SLE patch: fix os-prober creates many unusuable entries on multipath disk (bnc#875327)
Patch14:       os-prober-skip-part-on-multipath.patch
# SLE patch: fix os-prober fails to detect other SLES12 installation (bsc#892364)
Patch17:       Improve-btrfs-handling-on-os-probing-for-grub2.patch
# SLE patch: fix os-prober mount error, no such file or directory (bsc#931955)
# OpenSuSE modification: the do_unmount has to be skipped for btrfs as it removes tmp mount point of which btrfs is making use (bsc#1024196)
Patch18:       os-prober-btrfs-absolute-subvol.patch
# OpenSuSE patch: also skip legacy grub if /boot/grub2/grub.cfg is present
Patch19:       os-prober-40grub-check-grub2.patch
# OpenSuSE patch: detect os on default subvolume in snapshot (bsc#954225)
Patch21:       os-prober-btrfs-snapshot-detection.patch
# OpenSuSE patch: os-prober update broke Linux detection (bsc#957018)
Source22:       os-prober-btrfs-always-detect-default.patch
# OpenSuSE patch: y2base runs at 100% cpu busy from beginning in installation of files to completion (bsc#953987)
Patch23:       os-prober-linux-distro-avoid-expensive-ld-file-test.patch
# OpenSuSE patch: Leap does not recognize Tumbleweed any more (bsc#997465)
Patch24:       os-prober-linux-distro-parse-os-release.patch

# FEDORA:
# improve slow os-prober (rhbz#875356)
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=694668
Patch110:        os-prober-factor-out-logger.patch
Patch111:        os-prober-factored-logger-efi-fix.patch
Patch112:        os-prober-efi-shell.patch
# More Fedora patches
Patch113:        os-prober-umount-fix.patch
Patch114:        os-prober-grepfix.patch
Patch115:        os-prober-mounted-partitions-fix.patch
Patch116:        os-prober-bootpart-name-fix.patch
Patch117:        os-prober-no-dummy-mach-kernel.patch
#Patch118:        os-prober-grub2-mount-workaround.patch
Patch119:        os-prober-arm64-win11.patch

Requires:       grep
Requires:       sed
Requires:       kmod
Requires:       btrfs-progs
Requires:       coreutils
Requires:       udev
Requires:       util-linux
Requires:       dmsetup
Recommends:     dmraid
Recommends:     lvm2

%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
%autosetup -p1

# Replace blkid with /sbin/blkid Mga#16803
/bin/sed -i 's:(blkid:(/sbin/blkid:g' common.sh
/bin/sed -i 's:pe blkid:pe /sbin/blkid:g' common.sh

find -type f -exec sed -i -e 's|usr/lib|usr/libexec|g' {} \;

sed -i -e 's|grub-probe|grub2-probe|g' os-probes/common/50mounted-tests \
    linux-boot-probes/common/50mounted-tests
sed -i -e 's|grub-mount|grub2-mount|g' os-probes/common/50mounted-tests \
     linux-boot-probes/common/50mounted-tests common.sh

%build
%set_build_flags
%make_build LDFLAGS="$LDFLAGS -fPIC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS"

%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}/os-prober/newns
install -m 0644 -Dp common.sh %{buildroot}%{_datadir}/%{name}/common.sh

# add bsd detection script Mga#18271 (r1007407 & r1008727)
mkdir -p os-probes/common/ufs
cp -a %{SOURCE2} os-probes/common/ufs/91bsd
cp -a %{SOURCE3} os-probes/common/60ufs-test

%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

ln -sf ../ufs/91bsd %{buildroot}%{_libexecdir}/os-probes/mounted/91bsd

if [ "$ARCH" = x86 ]; then
        install -m 755 -p os-probes/mounted/powerpc/20macosx \
            %{buildroot}%{_libexecdir}/os-probes/mounted
fi

%files
%doc README TODO debian/changelog
%license debian/copyright
%{_bindir}/*
%{_libexecdir}/*
%{_datadir}/%{name}
%{_localstatedir}/lib/%{name}


%changelog
* Fri Jan 20 2023 tv <tv> 1.81-2.mga9
+ Revision: 1934482
- Fix inheritance of environment build flags

* Mon Dec 12 2022 tv <tv> 1.81-1.mga9
+ Revision: 1921072
- Update to 1.81 with better support for latest OSes
- Add support for detecting EFI shell binary (shell.efi), closes rhbz#2101953
- Add support for Win 11 on ARM 64 systems

* Tue Mar 15 2022 umeabot <umeabot> 1.77-2.mga9
+ Revision: 1792639
- Mageia 9 Mass Rebuild
+ tv <tv>
- fix license tag
- use %%set_build_flags
- use our link flags
- no need for a separate COPYING-note.txt rephrasing changelog

* Sun Feb 16 2020 tv <tv> 1.77-1.mga8
+ Revision: 1529865
- 1.77
- rediff patches

* Fri Feb 14 2020 umeabot <umeabot> 1.74-5.mga8
+ Revision: 1515740
- Mageia 8 Mass Rebuild

* Sun Sep 23 2018 umeabot <umeabot> 1.74-4.mga7
+ Revision: 1300071
- Mageia 7 Mass Rebuild

* Wed Mar 01 2017 ngompa <ngompa> 1.74-3.mga6
+ Revision: 1088314
- Sync updated patches from openSUSE to fix mga#20359
- Upstream change entry - Michael Chang <mchang@suse.com>:
  ◦ Fix btrfs 1.74 regression in detection btrfs, the do_unmount has to be
    skipped for btrfs as it removes tmp mount point of which btrfs is making
    use (bsc#1024196)

* Thu Feb 23 2017 ngompa <ngompa> 1.74-2.mga6
+ Revision: 1087465
- Sync with OpenSUSE and Fedora, re-enable all patches and add more from Fedora

* Mon Feb 06 2017 barjac <barjac> 1.74-1.mga6
+ Revision: 1085056
- new version 1.74
- removed (commented) patches that fail to apply
- as there are many upstream bug fixes

* Sat Dec 24 2016 barjac <barjac> 1.71-12.mga6
+ Revision: 1076678
- sync more Fedora patches
+ tv <tv>
- remove useless find -delete (uneeded since switching to %%autopatch/setup)
- simplify using %%autosetup

* Thu Oct 13 2016 barjac <barjac> 1.71-11.mga6
+ Revision: 1060661
- simplify symlink

* Tue May 31 2016 tv <tv> 1.71-10.mga6
+ Revision: 1019531
- submit to core/release (mga#18538)

* Mon May 30 2016 tv <tv> 1.71-9.mga6
+ Revision: 1019398
- readd the FC patches that were wrongly removed and that greatly improve speed
  so that it passes under 10mn (mga#16010, mga#18538, rhbz#875356)

* Tue May 24 2016 barjac <barjac> 1.71-8.mga6
+ Revision: 1018160
- submit to core

* Fri May 20 2016 barjac <barjac> 1.71-7.mga6
+ Revision: 1017254
- sync patches with OpenSuSE to fix Mga#18469
- Drop all Fedora patches
- Fix Mga#14467 broken by dropped patch at rev 1006385
- Added new Requires/Recommends for OpenSuSE patches
- Drop patch for Mga#16803 and add scriptlet in spec to do the same job
- Use %%make_build and %%autopatch

* Mon May 02 2016 barjac <barjac> 1.71-6.mga6
+ Revision: 1008727
- add 60ufs-test for bsd detection
- make 91bsd executable
- update 91bsd to work wuth 60ufs-test
- remove more patch backups that were being skipped
- Thanks to Elmar Stellnberger for the BSD detection scripts

* Sun May 01 2016 barjac <barjac> 1.71-5.mga6
+ Revision: 1008394
- make 91bsd executable

* Thu Apr 28 2016 barjac <barjac> 1.71-4.mga6
+ Revision: 1007407
- add bsd detection script Mga#18271
- remove already deleted file exclusions

* Tue Apr 26 2016 tv <tv> 1.71-3.mga6
+ Revision: 1006385
- use %%autosetup
- sync patches with FC
- make clean which patches are Mga's & which are FC's
- disable patch for mga#16803 as FC seems to have a similar fix

* Sun Apr 03 2016 barjac <barjac> 1.71-2.mga6
+ Revision: 997996
- fix typo in os-prober-1.65-mga-btrfs-50mounted_90linux-distro.patch
- fixes Mga# 18115 - grub2 os-prober detects other Mageia installations with release of installed system

* Tue Feb 02 2016 barjac <barjac> 1.71-1.mga6
+ Revision: 931898
- new version 1.71

* Wed Dec 09 2015 barjac <barjac> 1.70-1.mga6
+ Revision: 909224
- new version 1.70
-removed patch merged upstream

* Fri Sep 25 2015 barjac <barjac> 1.65-10.mga6
+ Revision: 883615
- fix Mga#16803 (give blkid full path)

* Sat May 09 2015 barjac <barjac> 1.65-9.mga5
+ Revision: 821545
- s/grub-/grub2-/ in various places
- see Mga#15857 comment #18

* Wed Apr 08 2015 tv <tv> 1.65-8.mga5
+ Revision: 819883
- fix dmesg spamming due to checking extended partitions (mga#9832)
+ barjac <barjac>
- remove patch backups

* Mon Apr 06 2015 barjac <barjac> 1.65-6.mga5
+ Revision: 819739
+ rebuild (emptylog)

* Mon Apr 06 2015 barjac <barjac> 1.65-5.mga5
+ Revision: 819735
- fixed missing os in menu (SuSE on btrfs) Mga#15209
- fixed over-long menu item for Mageia on btrfs

* Tue Mar 31 2015 ennael <ennael> 1.65-4.mga5
+ Revision: 819448
- bump release to go to core/release

* Wed Mar 25 2015 barjac <barjac> 1.65-3.mga5
+ Revision: 819245
- Improved patch for btrfs
- fixes Mga#15564 - (duplicate entries in boot menu for btrfs systems)

* Wed Mar 18 2015 tmb <tmb> 1.65-2.mga5
+ Revision: 818852
+ rebuild (emptylog)

* Wed Mar 18 2015 barjac <barjac> 1.65-1.mga5
+ Revision: 818762
- update to version 1.65
- sync patches with Fedora

* Sun Nov 16 2014 barjac <barjac> 1.64-7.mga5
+ Revision: 797378
- tidy btrfs detection patch, white space and debug message

* Tue Nov 11 2014 barjac <barjac> 1.64-6.mga5
+ Revision: 796516
- remove stray mount command left from debugging

* Tue Nov 11 2014 barjac <barjac> 1.64-5.mga5
+ Revision: 796512
- patch to fix detection of btrfs installations mga#14467

* Thu Nov 06 2014 barjac <barjac> 1.64-4.mga5
+ Revision: 795950
- requires btrfs-progs mga#14467

* Wed Oct 15 2014 umeabot <umeabot> 1.64-3.mga5
+ Revision: 742257
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 1.64-2.mga5
+ Revision: 683275
- Mageia 5 Mass Rebuild

* Tue Sep 09 2014 barjac <barjac> 1.64-1.mga5
+ Revision: 674303
- new version 1.64

* Sat Oct 19 2013 umeabot <umeabot> 1.63-2.mga4
+ Revision: 532860
- Mageia 4 Mass Rebuild

* Fri Aug 23 2013 barjac <barjac> 1.63-1.mga4
+ Revision: 469896
- new version 1.63

* Mon Jun 03 2013 barjac <barjac> 1.61-1.mga4
+ Revision: 436294
- new version 1.61

* Fri May 03 2013 barjac <barjac> 1.57-6.mga3
+ Revision: 412154
- added 3 recent fedora patches

* Tue Feb 19 2013 barjac <barjac> 1.57-5.mga3
+ Revision: 399268
- use upstream tarball instead of git
- remove script for tarball creation
- Add Fedora patch to fix mdraid
- Add Fedora patch for yaboot parse issue
- Add Fedora patch for usrmove
- Add Fedora remove-basename patch
- Add Fedora disable-debug-test patch
- Add Fedora btrfs fix patch
- use %%apply_patches

* Sat Feb 16 2013 barjac <barjac> 1.57-4.mga3
+ Revision: 398641
- patch - add Mageia to 90linux-distro

* Sun Jan 20 2013 barjac <barjac> 1.57-3.mga3
+ Revision: 390294
- update group

* Sun Jan 13 2013 umeabot <umeabot> 1.57-2.mga3
+ Revision: 362212
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Mon Jan 07 2013 barjac <barjac> 1.57-1.mga3
+ Revision: 341370
- new version 1.57

* Fri Dec 07 2012 tv <tv> 1.56-3.mga3
+ Revision: 327818
- kill gratuitous requires, no need to bloat every install with lvm2 & dmraid
  which are pulled automatically by installer if needed

* Sun Sep 30 2012 barjac <barjac> 1.56-2.mga3
+ Revision: 300617
- Changed group in line with new policy

* Mon Sep 17 2012 barjac <barjac> 1.56-1.mga3
+ Revision: 295625
- New version 1.56

* Sun Jul 08 2012 barjac <barjac> 1.54-1.mga3
+ Revision: 268796
- new version 1.54

* Mon May 28 2012 barjac <barjac> 1.53-1.mga3
+ Revision: 247638
- imported package os-prober