From be331d6a56dee9af361c7a520c8dd9ec895ea873 Mon Sep 17 00:00:00 2001 From: Michael Petlan Date: Fri, 14 Jan 2022 17:58:40 +0100 Subject: [PATCH] Add the flags to %install section too In this package, build runs twice. Once in %build phase, once again in the %install phase. Although in the %install phase, make should be happy with the results obtained in the previous phase and don't do anything, it obviously happens that the bits are rebuilt. Not always, but often. Since the env variables are reset in next phase, binaries built in %install phase (without flags) might clobber the original ones and cause an annocheck fail. Let's make sure that the flags are always set. Related: rhbz#2038853 Signed-off-by: Michael Petlan --- libtracefs.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libtracefs.spec b/libtracefs.spec index 3c93248..35185ca 100644 --- a/libtracefs.spec +++ b/libtracefs.spec @@ -11,7 +11,7 @@ Name: libtracefs Version: 1.0.2 -Release: 6%{?dist} +Release: 7%{?dist} License: LGPLv2+ and GPLv2+ Summary: Library for access kernel tracefs @@ -50,6 +50,8 @@ export GCCLDFLAGS="-Wl,-z,now" %make_build prefix=%{_prefix} libdir=%{_libdir} all %install +%set_build_flags +export GCCLDFLAGS="-Wl,-z,now" %make_install prefix=%{_prefix} libdir=%{_libdir} rm -rf %{buildroot}/%{_libdir}/libtracefs.a @@ -65,6 +67,10 @@ rm -rf %{buildroot}/%{_libdir}/libtracefs.a %{_libdir}/%{name}.so %changelog +* Fri Jan 14 2022 Michael Petlan - 1.0.2-7 +- Harden library linking; add the flags to install section too + Related: rhbz#2038853 + * Wed Jan 12 2022 Michael Petlan - 1.0.2-6 - Harden library linking Related: rhbz#2038853