Fix rpminspect gating failures
Two rpminspect gating test fails: runpath and annocheck. The first one is fixed by running chrpath. The second by not ignoring LDFLAGS when building the shared libs. Related: rhbz#1978504 Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
This commit is contained in:
parent
04def3daa9
commit
dfb3f05c20
@ -0,0 +1,28 @@
|
||||
From 31385f8933f00ddecfd4a00a578d7936186f75da Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Marchand <jmarchan@redhat.com>
|
||||
Date: Thu, 11 Nov 2021 18:22:09 +0100
|
||||
Subject: [PATCH] utils.mk: don't ignore LDFLAGS when linking the shared libs
|
||||
|
||||
do_compile_shared_library should't ignore LDFLAGS. That makes it
|
||||
difficult for packager to follow their distribution packaging
|
||||
guidelines.
|
||||
---
|
||||
scripts/utils.mk | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/scripts/utils.mk b/scripts/utils.mk
|
||||
index ae8c9e77..4a594a9c 100644
|
||||
--- a/scripts/utils.mk
|
||||
+++ b/scripts/utils.mk
|
||||
@@ -72,7 +72,7 @@ do_build_static_lib = \
|
||||
|
||||
do_compile_shared_library = \
|
||||
($(print_shared_lib_compile) \
|
||||
- $(CC) --shared $^ '-Wl,-soname,$(@F),-rpath=$$ORIGIN' -o $@ $(LIBS))
|
||||
+ $(CC) --shared $^ '-Wl,-soname,$(@F),-rpath=$$ORIGIN' -o $@ $(LDFLAGS) $(LIBS))
|
||||
|
||||
do_compile_plugin_obj = \
|
||||
($(print_plugin_obj_compile) \
|
||||
--
|
||||
2.31.1
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
Name: trace-cmd
|
||||
Version: %{srcversion}
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
License: GPLv2 and LGPLv2
|
||||
Summary: A user interface to Ftrace
|
||||
Requires: libtracecmd
|
||||
@ -20,6 +20,7 @@ URL: http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary
|
||||
# git archive --prefix=trace-cmd-%%{version}/ -o trace-cmd-v%%{version}.tar.gz %%{git_commit}
|
||||
Source0: https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/trace-cmd-v%{srcversion}.tar.gz
|
||||
Patch0: trace-cmd-Fix-broken-profile-command.patch
|
||||
Patch1: trace-cmd-utils.mk-don-t-ignore-LDFLAGS-when-linking-the-share.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc
|
||||
@ -35,6 +36,8 @@ BuildRequires: qt5-qtbase-devel
|
||||
BuildRequires: freeglut-devel
|
||||
BuildRequires: json-c-devel
|
||||
BuildRequires: libtraceevent-devel
|
||||
BuildRequires: libtracefs-devel
|
||||
BuildRequires: chrpath
|
||||
|
||||
%description
|
||||
trace-cmd is a user interface to Ftrace. Instead of needing to use the
|
||||
@ -69,20 +72,23 @@ Development files of the libtracecmd library
|
||||
%autosetup -p1 -n %{name}-v%{srcversion}
|
||||
|
||||
%build
|
||||
%set_build_flags
|
||||
export CFLAGS="%{optflags} -D_GNU_SOURCE"
|
||||
export BUILD_TYPE="Release"
|
||||
|
||||
# MANPAGE_DOCBOOK_XSL define is hack to avoid using locate
|
||||
# -z muldefs to workaround the enforcing multi definition check of gcc10.
|
||||
# and it need to be removed once upstream fixed the variable name
|
||||
MANPAGE_DOCBOOK_XSL=`rpm -ql docbook-style-xsl | grep manpages/docbook.xsl`
|
||||
CFLAGS="%{optflags} -D_GNU_SOURCE" LDFLAGS="%{build_ldflags}" BUILD_TYPE=Release \
|
||||
make V=9999999999 MANPAGE_DOCBOOK_XSL=$MANPAGE_DOCBOOK_XSL \
|
||||
make V=1 MANPAGE_DOCBOOK_XSL=$MANPAGE_DOCBOOK_XSL \
|
||||
prefix=%{_prefix} libdir=%{_libdir} \
|
||||
PYTHON_VERS=python3 all_cmd doc libtracecmd.so
|
||||
PYTHON_VERS=python3 all_cmd doc libs
|
||||
for i in python/*.py ; do
|
||||
sed -i 's/env python2/python3/g' $i
|
||||
done
|
||||
chrpath --delete tracecmd/trace-cmd
|
||||
|
||||
%install
|
||||
make libdir=%{_libdir} prefix=%{_prefix} V=1 DESTDIR=%{buildroot}/ CFLAGS="%{optflags} -D_GNU_SOURCE" LDFLAGS="%{build_ldflags} -z muldefs " BUILD_TYPE=Release install install_doc install_python install_libs
|
||||
make V=1 libdir=%{_libdir} prefix=%{_prefix} DESTDIR=%{buildroot}/ \
|
||||
install install_doc install_python install_libs
|
||||
find %{buildroot}%{_mandir} -type f | xargs chmod u-x,g-x,o-x
|
||||
find %{buildroot}%{_datadir} -type f | xargs chmod u-x,g-x,o-x
|
||||
find %{buildroot}%{_libdir} -type f -iname "*.so" | xargs chmod 0755
|
||||
@ -113,6 +119,10 @@ mkdir -p %{buildroot}/%{_sysconfdir}
|
||||
%{_includedir}/trace-cmd
|
||||
|
||||
%changelog
|
||||
* Thu Nov 11 2021 Jerome Marchand <jmarchan@redhat.com> - 2.9.2-7
|
||||
- Fix rpminspect gating failures (runpath and annocheck)
|
||||
- Specfile cleanups
|
||||
|
||||
* Thu Nov 11 2021 Jerome Marchand <jmarchan@redhat.com> - 2.9.2-6
|
||||
- Fix trace-cmd profile
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user