Revert "Disable package notes"

This reverts commit de34555b2b.

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2022-08-10 09:42:48 +03:00
parent de34555b2b
commit f8158ac2c4
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB
2 changed files with 9 additions and 8 deletions

11
macros
View File

@ -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)
}

View File

@ -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 <davidlt@rivosinc.com> - 226-1.4.riscv64
- Disable package notes
* Thu Aug 05 2022 David Abdurachmanov <davidlt@rivosinc.com> - 226-1.3.riscv64
- Remove gcc-plugin-annobin support (doesn't exist in GCC 11)