From 9f2cdc9ab43b642e714c3caca18fee0a4b9a059a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 16 Aug 2022 15:21:46 +0200 Subject: [PATCH] Switch to --package-metadata also with lld --- changelog | 57 +++++++++++++++++++++++++++++++++++++++ macros.package-notes-srpm | 6 ++--- package-notes.spec | 5 ++-- 3 files changed, 62 insertions(+), 6 deletions(-) create mode 100644 changelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..5545385 --- /dev/null +++ b/changelog @@ -0,0 +1,57 @@ +* Tue Aug 16 2022 Zbigniew Jędrzejewski-Szmek - 0.5-3 +- Switch to --package-metadata also with lld (#2051597) + +* Tue Aug 09 2022 Luca Boccassi - 0.5-1 +- Switch to --package-metadata (#2055863, #2083878, #2099999, #2059858, #2055458) + +* Sat Aug 06 2022 Tom Stellard - 0.4-17 +- Add CI test + +* Fri Jul 22 2022 Fedora Release Engineering - 0.4-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Mar 26 2022 Luca Boccassi - 0.4-15 +- Fix wrong binary fields on big endian + +* Tue Jan 25 2022 Zbigniew Jędrzejewski-Szmek - 0.4-14 +- Disable notes when clang toolchain is used on arm + +* Mon Jan 24 2022 Zbigniew Jędrzejewski-Szmek - 0.4-13 +- Disable notes with linkers other than bfd + +* Mon Jan 24 2022 Zbigniew Jędrzejewski-Szmek - 0.4-12 +- Add --insert-after param to the note generation script + +* Sat Jan 22 2022 Zbigniew Jędrzejewski-Szmek - 0.4-11 +- Add %%_package_note_linker and document everything (rhbz#2043178, + rhbz#2043368) + +* Sat Jan 22 2022 Zbigniew Jędrzejewski-Szmek - 0.4-10 +- Allow unsetting %%_package_note_readonly to drop the READONLY attribute + +* Fri Jan 21 2022 Zbigniew Jędrzejewski-Szmek - 0.4-9 +- Use %%{buildsubdir} in %%_package_note_file if defined + +* Fri Jan 21 2022 Zbigniew Jędrzejewski-Szmek - 0.4-8 +- Also voidify the macros if we're on a noarch build + +* Fri Jan 21 2022 Zbigniew Jędrzejewski-Szmek - 0.4-7 +- Use $RPM_PACKAGE_VERSION variable to refer to the package version + +* Fri Jan 21 2022 Zbigniew Jędrzejewski-Szmek - 0.4-6 +- Make _generate_package_note_file always recreate the file + +* Fri Jan 21 2022 Zbigniew Jędrzejewski-Szmek - 0.4-5 +- Conditionalize all macros on %%_package_note_file being defined + +* Thu Jan 20 2022 Fedora Release Engineering - 0.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jan 14 2022 Zbigniew Jędrzejewski-Szmek - 0.4-3 +- Rename srpm macros file + +* Fri Jan 14 2022 Zbigniew Jędrzejewski-Szmek - 0.4-2 +- Add package-notes-srpm-macros subpackage to configure rpm builds + +* Tue Nov 16 2021 Zbigniew Jędrzejewski-Szmek - 0.4-1 +- Version 0.4 diff --git a/macros.package-notes-srpm b/macros.package-notes-srpm index 4fe0355..e4ef9d8 100644 --- a/macros.package-notes-srpm +++ b/macros.package-notes-srpm @@ -9,9 +9,7 @@ # # %undefine _package_note_flags # -# Which linker will be used? This should be either "bfd", "gold", or "mold". -# Unfortunately "lld" does not support the --package-metadata flag so the note -# insertion is disabled when using it. +# Which linker will be used? This should be either "bfd", "gold", "mold", or "lld". # # (The default linker for clang on armv7hl is lld.) %_package_note_linker %["%_target_cpu" == "armv7hl" && "%{toolchain}" == "clang" ? "lld" : "bfd"] @@ -21,7 +19,7 @@ %_generate_package_note_file %{nil} # Overall status: 1 if looks like we can insert the note, 0 otherwise -%_package_note_status %[0%{?_package_note_file:1} && 0%{?name:1} && "%_target_cpu" != "noarch" && "%_package_note_linker" != "lld" ? 1 : 0] +%_package_note_status %[0%{?_package_note_file:1} && 0%{?name:1} && "%_target_cpu" != "noarch" && 1 : 0] # The linker flags to be passed to the compiler to insert the notes section will # be created by the spec file, to avoid issues with quoting and escaping across diff --git a/package-notes.spec b/package-notes.spec index 4f8f912..dd0b59d 100644 --- a/package-notes.spec +++ b/package-notes.spec @@ -19,9 +19,10 @@ for. Summary: %{summary} Obsoletes: package-notes < 0.5 # Those are minimum versions that implement --package-metadata -Conflicts: binutils < 2.38-23 -Conflicts: binutils-gold < 2.38-23 +Conflicts: binutils < 2.37-34 +Conflicts: binutils-gold < 2.37-34 Conflicts: mold < 1.3.0 +Conflicts: lld < 14.0.5-4 %description srpm-macros RPM macros to insert a section with an ELF note with a JSON payload that