From 1dc07e7d5daaacc47013f1a646d81f79379176b6 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Mon, 24 Jan 2022 15:33:49 -0500 Subject: [PATCH] set path to linker script in %_package_note_file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The package-notes feature¹ creates a linker script in %{buildsubdir}. Unfortunately, %{buildsubdir} is not set in %prep, leaving us with an incorrect path to the linker script. The build then fails with: /usr/bin/ld: cannot open linker script file /builddir/build/BUILD/.package_note-git-2.35.0-0.2.rc2.fc36.3.x86_64.ld: No such file or directory Set the path to the linker script via %_package_note_file, per suggestion by Zbigniew Jędrzejewski-Szmek². References: ¹ https://fedoraproject.org/wiki/Changes/Package_information_on_ELF_objects ² https://bugzilla.redhat.com/2044028#c10 --- git.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/git.spec b/git.spec index 14f4c3b..1baa4ef 100644 --- a/git.spec +++ b/git.spec @@ -76,6 +76,9 @@ %global _hardened_build 1 %endif +# Set path to the package-notes linker script +%global _package_note_file %{_builddir}/%{name}-%{version}/.package_note-%{name}-%{version}-%{release}.%{_arch}.ld + # Define for release candidates #global rcrev .rc0 @@ -1017,6 +1020,7 @@ rmdir --ignore-fail-on-non-empty "$testdir" %changelog * Mon Jan 24 2022 Todd Zullinger - 2.35.0-1 - update to 2.35.0 +- set path to linker script in %%_package_note_file * Sat Jan 22 2022 Todd Zullinger - 2.35.0-0.2.rc2.3 - remove contrib/scalar to avoid cruft in git-core-doc