Use the correct alternatives

Resolves: #2209148
This commit is contained in:
Marek Polacek 2023-05-22 17:22:32 -04:00
parent f2871776ca
commit aba99ef14b

View File

@ -9,7 +9,7 @@ BuildRequires: scl-utils-build
Summary: A GNU collection of binary utilities Summary: A GNU collection of binary utilities
Name: %{?scl_prefix}binutils Name: %{?scl_prefix}binutils
Version: 2.40 Version: 2.40
Release: 7%{?dist} Release: 8%{?dist}
License: GPLv3+ License: GPLv3+
URL: https://sourceware.org/binutils URL: https://sourceware.org/binutils
@ -344,8 +344,8 @@ BuildRequires: dejagnu, zlib-static, glibc-static, sharutils, bc, libstdc++
BuildRequires: elfutils-debuginfod-client-devel BuildRequires: elfutils-debuginfod-client-devel
%endif %endif
Requires(post): %{_sbindir}/alternatives Requires(post): alternatives
Requires(preun): %{_sbindir}/alternatives Requires(preun): alternatives
# We also need rm. # We also need rm.
Requires(post): coreutils Requires(post): coreutils
@ -1104,11 +1104,11 @@ export QA_RPATHS=0x0003
%post %post
%__rm -f %{_bindir}/ld %__rm -f %{_bindir}/ld
%{_sbindir}/alternatives --install %{_bindir}/ld ld \ %{_root_sbindir}/alternatives --install %{_bindir}/ld ld \
%{_bindir}/ld.bfd %{ld_bfd_priority} %{_bindir}/ld.bfd %{ld_bfd_priority}
%if %{with gold} %if %{with gold}
%{_sbindir}/alternatives --install %{_bindir}/ld ld \ %{_root_sbindir}/alternatives --install %{_bindir}/ld ld \
%{_bindir}/ld.gold %{ld_gold_priority} %{_bindir}/ld.gold %{ld_gold_priority}
%endif %endif
@ -1123,11 +1123,11 @@ exit 0
%preun %preun
if [ $1 = 0 ]; then if [ $1 = 0 ]; then
%{_sbindir}/alternatives --remove ld %{_bindir}/ld.bfd %{_root_sbindir}/alternatives --remove ld %{_bindir}/ld.bfd
fi fi
%if %{with gold} %if %{with gold}
if [ $1 = 0 ]; then if [ $1 = 0 ]; then
%{_sbindir}/alternatives --remove ld %{_bindir}/ld.gold %{_root_sbindir}/alternatives --remove ld %{_bindir}/ld.gold
fi fi
%endif %endif
@ -1262,6 +1262,9 @@ exit 0
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
%changelog %changelog
* Mon May 22 2023 Marek Polacek <polacek@redhat.com> - 2.40-8
- Spec File: Use the correct alternatives. (#2209148)
* Mon Apr 17 2023 Nick Clifton <nickc@redhat.com> - 2.40-7 * Mon Apr 17 2023 Nick Clifton <nickc@redhat.com> - 2.40-7
- Spec File: Fix typo. (#2186396) - Spec File: Fix typo. (#2186396)
- BFD library: Fix illegal memory access when loading corrupt symbol version info. (#2186579) - BFD library: Fix illegal memory access when loading corrupt symbol version info. (#2186579)