From 4ea10b76e13df7a2cc9f50995ec35befe7a2a9c1 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Aug 08 2022 20:35:29 +0000 Subject: Adjust build flags to allow the new implementation using --package-metadata --- diff --git a/0001-Adjust-build-flags-to-allow-the-new-implementation-u.patch b/0001-Adjust-build-flags-to-allow-the-new-implementation-u.patch new file mode 100644 index 0000000..b907252 --- /dev/null +++ b/0001-Adjust-build-flags-to-allow-the-new-implementation-u.patch @@ -0,0 +1,26 @@ +From cbf80996c70475088be9613778ea7cb282e3a8c3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 8 Aug 2022 17:43:46 +0200 +Subject: [PATCH] Adjust build flags to allow the new implementation using + --package-metadata + +C.f. https://src.fedoraproject.org/rpms/package-notes/pull-request/4. +This version should be compatible with both the old and new definitions +in package-notes-srpm-macros. +--- + data/macros.rust | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/data/macros.rust b/data/macros.rust +index efa46a3212..b8ea742ec0 100644 +--- a/data/macros.rust ++++ b/data/macros.rust +@@ -12,7 +12,7 @@ + -Ccodegen-units=%rustflags_codegen_units + -Clink-arg=-Wl,-z,relro + -Clink-arg=-Wl,-z,now +- %{?_package_note_file:-Clink-arg=-Wl,-dT,%{_package_note_file}} ++ %[0%{?_package_note_status} ? "-Clink-arg=%_package_note_flags" : ""] + --cap-lints=warn + } + diff --git a/rust-packaging.spec b/rust-packaging.spec index 99caef9..07b7279 100644 --- a/rust-packaging.spec +++ b/rust-packaging.spec @@ -16,6 +16,8 @@ Patch: https://pagure.io/fedora-rust/rust2rpm/c/f0d04b0.patch # upstream patch to fix generation of specs without a manual patch Patch: https://pagure.io/fedora-rust/rust2rpm/c/55998b3.patch +Patch: 0001-Adjust-build-flags-to-allow-the-new-implementation-u.patch + ExclusiveArch: %{rust_arches} BuildRequires: python3-devel