public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/binutils] rawhide: Fix problems with the Post stage for cross binutils  (FC-4896)
@ 2026-10-14 10:47 Nick Clifton
  0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 2026-10-14 10:47 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/binutils
Branch : rawhide
Commit : 83cac516b28779a5021c18b8b07a28a058726b2b
Author : Nick Clifton <nickc@redhat.com>
Date   : 2026-10-14T11:46:38+01:00
Stats  : +31/-12 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/binutils/c/83cac516b28779a5021c18b8b07a28a058726b2b?branch=rawhide

Log:
Fix problems with the Post stage for cross binutils  (FC-4896)

---
diff --git a/binutils.spec b/binutils.spec
index e208664..7570fdc 100644
--- a/binutils.spec
+++ b/binutils.spec
@@ -7,7 +7,7 @@ Name: binutils%{?_with_debug:-debug}
 # The variable %%{source} (see below) should be set to indicate which of these
 # origins is being used.
 Version: 2.47.50
-Release: 17%{?dist}
+Release: 18%{?dist}
 License: GPL-3.0-or-later AND (GPL-3.0-or-later WITH Bison-exception-2.2) AND (LGPL-2.0-or-later WITH GCC-exception-2.0) AND BSD-3-Clause AND GFDL-1.3-or-later AND GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-2.0-or-later
 URL: https://sourceware.org/binutils
 
@@ -1447,6 +1447,7 @@ exit 0
 %if %{with crossbuilds}
 # Create symlinks mapping cross binutils pathnames created by
 # this package with those created by the cross-binutils packge.
+# But only do this if those file have not already been created.
 
 # FIXME: It would be nice if the following commands could be put into
 # a single function and called with an argument indicating the target
@@ -1457,15 +1458,15 @@ exit 0
 %post -n cross-binutils-aarch64
 # Link /usr/<target>-redhat-linux to /usr/<target>-linux-gnu
 if ! [ -d %{_prefix}/aarch64-%{linux_system} ] ; then
-  ln -s %{_prefix}/aarch64-%{redhat_system} %{_prefix}/aarch64-%{linux_system}
+  ln -s %{_prefix}/aarch64-%{redhat_system} %{_prefix}/aarch64-%{linux_system} ;
 fi
 
 # Link /usr/bin/<target>-redhat-linux-<exec>
 # to   /usr/bin/<target>-linux-gnu-<exec>
 pushd %{_bindir} > /dev/null
 for x in aarch64-%{redhat_system}-*; do
-    if ! [ -x ${x/%{redhat_system}/%{linux_system}} ] ; then
-	ln -s $x ${x/%{redhat_system}/%{linux_system}};
+    if ! [ -a    ${x/%{redhat_system}/%{linux_system}} ] ; then
+	ln -s $x ${x/%{redhat_system}/%{linux_system}} ;
     fi
 done
 popd > /dev/null
@@ -1473,32 +1474,44 @@ exit 0
 
 %post -n cross-binutils-ppc64le
 # The non-standard naming is a "feature" of the cross-binutils package.
-ln -s %{_prefix}/ppc64le-%{redhat_system}  %{_prefix}/powerpc64le-%{linux_system}
+if ! [ -d %{_prefix}/powerpc64le-%{linux_system} ] ; then
+    ln -s %{_prefix}/ppc64le-%{redhat_system} %{_prefix}/powerpc64le-%{linux_system} ;
+fi
 
 pushd %{_bindir} > /dev/null
 for x in ppc64le-%{redhat_system}-*; do
-    ln -s $x ${x/ppc64le-%{redhat_system}}/powerpc64le-%{linux_system}}
+    if ! [ -a    ${x/ppc64le-%{redhat_system}/powerpc64le-%{linux_system}} ] ; then
+	ln -s $x ${x/ppc64le-%{redhat_system}/powerpc64le-%{linux_system}} ;
+    fi
 done
 popd > /dev/null
 exit 0
 
 %post -n cross-binutils-s390x
-ln -s %{_prefix}/s390x-%{redhat_system}  %{_prefix}/s390x-%{linux_system}
+if ! [ -d %{_prefix}/s390x-%{linux_system} ] ; then
+    ln -s %{_prefix}/s390x-%{redhat_system} %{_prefix}/s390x-%{linux_system} ;
+fi
 
 pushd %{_bindir} > /dev/null
 for x in s390x-%{redhat_system}-*; do
-    ln -s $x ${x/%{redhat_system}/%{linux_system}};
+    if ! [ -a    ${x/%{redhat_system}/%{linux_system}} ] ; then
+	ln -s $x ${x/%{redhat_system}/%{linux_system}} ;
+    fi
 done
 popd > /dev/null
 exit 0
 
 %ifarch %{ix86}
 %post -n cross-binutils-i686
-ln -s %{_prefix}/i686-%{redhat_system}  %{_prefix}/i686-%{linux_system}
+if ! [ -d %{_prefix}/i686-%{linux_system} ] ; then
+    ln -s %{_prefix}/i686-%{redhat_system} %{_prefix}/i686-%{linux_system} ;
+fi
 
 pushd %{_bindir} > /dev/null
 for x in i686-%{redhat_system}-*; do
-    ln -s $x ${x/%{redhat_system}/%{linux_system}};
+    if ! [ -a    ${x/%{redhat_system}/%{linux_system}} ] ; then
+	ln -s $x ${x/%{redhat_system}/%{linux_system}} ;
+    fi
 done
 popd > /dev/null
 exit 0
@@ -1506,11 +1519,15 @@ exit 0
 %else
 
 %post -n cross-binutils-x86_64
-ln -s %{_prefix}/x86_64-%{redhat_system}  %{_prefix}/x86_64-%{linux_system}
+if ! [ -d %{_prefix}/x86_64-%{linux_system} ] ; then
+    ln -s %{_prefix}/x86_64-%{redhat_system} %{_prefix}/x86_64-%{linux_system} ;
+fi
 
 pushd %{_bindir} > /dev/null
 for x in x86_64-%{redhat_system}-*; do
-    ln -s $x ${x/%{redhat_system}/%{linux_system}};
+    if ! [ -a    ${x/%{redhat_system}/%{linux_system}} ] ; then
+	ln -s $x ${x/%{redhat_system}/%{linux_system}} ;
+    fi
 done
 popd > /dev/null
 exit 0
@@ -1775,6 +1792,8 @@ exit 0
 
 #----------------------------------------------------------------------------
 %changelog
+* Wed Oct 14 2026 Nick Clifton <nickc@redhat.com> - 2.47.50-18
+- Fix problems with the Post stage for cross binutils.
 
 * Wed Oct 14 2026 Sun Haiyong <sunhaiyong@zdbr.net> - 2.47.50-17
 - Disable gold for loongarch64.

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-14 10:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-14 10:47 [rpms/binutils] rawhide: Fix problems with the Post stage for cross binutils (FC-4896) Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox