Harden linking to meet annocheck requirements
The %install phase resets the flags unfortunately. That wouldn't matter, however, in this case, second "building pass" clobbers the binaries that come from the first pass. If we use the flags only in %build phase, they will take no effect. Resolves: rhbz#2037125 Signed-off-by: Michael Petlan <mpetlan@redhat.com>
This commit is contained in:
parent
da5db2aa83
commit
3b89f9d836
|
@ -5,7 +5,7 @@
|
|||
|
||||
Name: libtraceevent
|
||||
Version: 1.1.1
|
||||
Release: 7%{?dist}
|
||||
Release: 8%{?dist}
|
||||
License: LGPLv2+ and GPLv2+
|
||||
Summary: Library to parse raw trace event formats
|
||||
|
||||
|
@ -44,9 +44,14 @@ MANPAGE_DOCBOOK_XSL=`rpm -ql docbook-style-xsl | grep manpages/docbook.xsl`
|
|||
%set_build_flags
|
||||
#looks like CFLAGS is ignored when compiling plugins, but not EXTRA_CFLAGS
|
||||
export EXTRA_CFLAGS="%{optflags}"
|
||||
export LDFLAGS="-Wl,-z,now"
|
||||
%make_build prefix=%{_prefix} libdir=%{_libdir} MANPAGE_XSL=%{MANPAGE_DOCBOOK_XSL} all doc
|
||||
|
||||
%install
|
||||
%set_build_flags
|
||||
#looks like CFLAGS is ignored when compiling plugins, but not EXTRA_CFLAGS
|
||||
export EXTRA_CFLAGS="%{optflags}"
|
||||
export LDFLAGS="-Wl,-z,now"
|
||||
%make_install prefix=%{_prefix} libdir=%{_libdir} install doc-install
|
||||
rm -rf %{buildroot}/%{_libdir}/libtraceevent.a
|
||||
|
||||
|
@ -67,6 +72,10 @@ rm -rf %{buildroot}/%{_libdir}/libtraceevent.a
|
|||
%{_libdir}/pkgconfig/libtraceevent.pc
|
||||
|
||||
%changelog
|
||||
* Fri Jan 14 2022 Michael Petlan <mpetlan@redhat.com> - 1.1.1-8
|
||||
- Harden linking to meet annocheck requirements
|
||||
Related: rhbz#2037125
|
||||
|
||||
* Fri Nov 19 2021 Jerome Marchand <jmarchan@redhat.com> - 1.1.1-7
|
||||
- Fix rpminspect annocheck issue.
|
||||
|
||||
|
|
Loading…
Reference in New Issue