From f8158ac2c4567e08bad29c81f3e9623769bdb34b Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Wed, 10 Aug 2022 09:42:48 +0300 Subject: [PATCH] Revert "Disable package notes" This reverts commit de34555b2bd4487772463d9d62e3b2fd9da54ba4. Signed-off-by: David Abdurachmanov --- macros | 11 +++++++---- redhat-rpm-config.spec | 6 ++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/macros b/macros index e61eeb7..d10fa49 100644 --- a/macros +++ b/macros @@ -74,7 +74,7 @@ # the flags, while intended for ld, are still passed through the gcc # compiler driver. At the beginning of %%build, the environment # variable RPM_LD_FLAGS to this value. -%build_ldflags -Wl,-z,relro %{_ld_as_needed_flags} %{_ld_symbols_flags} %{_hardened_ldflags} %{_annotation_ldflags} %[ "%{toolchain}" == "clang" ? "%{?_clang_extra_ldflags}" : "" ] %{_build_id_flags} +%build_ldflags -Wl,-z,relro %{_ld_as_needed_flags} %{_ld_symbols_flags} %{_hardened_ldflags} %{_annotation_ldflags} %[ "%{toolchain}" == "clang" ? "%{?_clang_extra_ldflags}" : "" ] %{_build_id_flags} %{?_package_note_flags} # Expands to shell code to set the compiler/linker environment # variables CFLAGS, CXXFLAGS, FFLAGS, FCFLAGS, LDFLAGS if they have @@ -96,10 +96,12 @@ # Use "%undefine _auto_set_build_flags" to disable" %_auto_set_build_flags 1 %__spec_build_pre %{___build_pre} \ - %{?_auto_set_build_flags:%{set_build_flags}} + %{?_auto_set_build_flags:%{set_build_flags}} \ + %{?_generate_package_note_file} %__spec_check_pre %{___build_pre} \ - %{?_auto_set_build_flags:%{set_build_flags}} + %{?_auto_set_build_flags:%{set_build_flags}} \ + %{?_generate_package_note_file} # Internal-only. Do not use. Expand a variable and strip the flags # not suitable to extension builders. @@ -108,7 +110,8 @@ local name = rpm.expand("%{1}") local value = " " .. rpm.expand("%{build_" .. name .. "}") local specs_pattern = "%s+-specs=[^%s]+" local lto_flags_pattern = rpm.expand("%{?_lto_cflags}"):gsub("[%-%.]", "%%%1") -local result = value:gsub(specs_pattern, " "):gsub(lto_flags_pattern, "") +local package_note_flags_pattern = "%-Wl,%S*package_note%S*" +local result = value:gsub(specs_pattern, " "):gsub(lto_flags_pattern, ""):gsub(package_note_flags_pattern, "") print(result) } diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index cadca3a..989551c 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -9,7 +9,7 @@ Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config Version: %{baserelease} -Release: 1.4.riscv64%{?dist} +Release: 1.3.riscv64%{?dist} # No version specified. License: GPL+ URL: https://src.fedoraproject.org/rpms/redhat-rpm-config @@ -100,6 +100,7 @@ Requires: python-srpm-macros >= 3.10-6 Requires: qt5-srpm-macros Requires: rust-srpm-macros Requires: rpmautospec-rpm-macros +Requires: package-notes-srpm-macros %if ! 0%{?rhel} Requires: fpc-srpm-macros @@ -194,9 +195,6 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua %doc buildflags.md %changelog -* Thu Aug 05 2022 David Abdurachmanov - 226-1.4.riscv64 -- Disable package notes - * Thu Aug 05 2022 David Abdurachmanov - 226-1.3.riscv64 - Remove gcc-plugin-annobin support (doesn't exist in GCC 11)