Build trace-cmd with external libtraceevent and libtracefs
This commit is contained in:
parent
4aadbf030a
commit
c71ae5efff
@ -0,0 +1,47 @@
|
|||||||
|
From 168d010bf251b7679645fd34e8551f2cf333fcf5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jerome Marchand <jmarchan@redhat.com>
|
||||||
|
Date: Wed, 24 Mar 2021 14:32:26 +0100
|
||||||
|
Subject: [PATCH] Don't build or install libtraceevent and libtracefs
|
||||||
|
|
||||||
|
---
|
||||||
|
Makefile | 10 ++++++++--
|
||||||
|
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index b034042..7b16546 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -321,7 +321,7 @@ $(LIBTRACEEVENT_STATIC): force $(obj)/lib/traceevent/plugins/trace_python_dir \
|
||||||
|
$(LIBTRACECMD_STATIC): force
|
||||||
|
$(Q)$(MAKE) -C $(src)/lib/trace-cmd $@
|
||||||
|
|
||||||
|
-$(LIBTRACECMD_SHARED): force $(LIBTRACEEVENT_SHARED)
|
||||||
|
+$(LIBTRACECMD_SHARED): force
|
||||||
|
$(Q)$(MAKE) -C $(src)/lib/trace-cmd $@
|
||||||
|
|
||||||
|
$(LIBTRACEFS_STATIC): force
|
||||||
|
@@ -392,7 +392,7 @@ install_plugins_traceevent: force
|
||||||
|
install_plugins_tracecmd: force
|
||||||
|
$(Q)$(MAKE) -C $(src)/lib/trace-cmd/plugins install_plugins
|
||||||
|
|
||||||
|
-install_plugins: install_plugins_traceevent install_plugins_tracecmd
|
||||||
|
+install_plugins: install_plugins_tracecmd
|
||||||
|
|
||||||
|
install_python: force
|
||||||
|
$(Q)$(MAKE) -C $(src)/python $@
|
||||||
|
@@ -410,6 +410,12 @@ install: install_cmd
|
||||||
|
install_gui: install_cmd gui
|
||||||
|
$(Q)$(MAKE) $(S) -C $(kshark-dir)/build install
|
||||||
|
|
||||||
|
+install_libtracecmd:
|
||||||
|
+ $(Q)$(call do_install,$(LIBTRACECMD_SHARED),$(libdir_SQ)/trace-cmd)
|
||||||
|
+ $(Q)$(call do_install,$(src)/include/trace-cmd/trace-cmd.h,$(includedir_SQ)/trace-cmd)
|
||||||
|
+ $(Q)$(call do_install,$(src)/include/trace-cmd/trace-filter-hash.h,$(includedir_SQ)/trace-cmd)
|
||||||
|
+ $(Q)$(call do_install_ld,$(TRACE_LD_FILE),$(LD_SO_CONF_DIR),$(libdir_SQ)/trace-cmd)
|
||||||
|
+
|
||||||
|
install_libs: libs
|
||||||
|
$(Q)$(call do_install,$(LIBTRACECMD_SHARED),$(libdir_SQ)/trace-cmd)
|
||||||
|
$(Q)$(call do_install,$(LIBTRACEEVENT_SHARED),$(libdir_SQ)/traceevent)
|
||||||
|
--
|
||||||
|
2.30.2
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
From be4884c74355e0b84552e95a5ea2a4a808693acb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Zamir SUN <sztsian@gmail.com>
|
|
||||||
Date: Mon, 12 Oct 2020 21:05:29 +0800
|
|
||||||
Subject: [PATCH] trace-cmd: Temporary move libtraceevent back to
|
|
||||||
%{_libdir}/trace-cmd
|
|
||||||
|
|
||||||
Signed-off-by: Zamir SUN <sztsian@gmail.com>
|
|
||||||
---
|
|
||||||
Makefile | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
|
||||||
index b034042..fc0de09 100644
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -68,7 +68,7 @@ plugin_tracecmd_dir = $(libdir)/trace-cmd/plugins
|
|
||||||
python_dir ?= $(libdir)/traceevent/python
|
|
||||||
var_dir = $(HOME)/.trace-cmd/
|
|
||||||
else
|
|
||||||
-plugin_traceevent_dir = $(libdir)/traceevent/plugins
|
|
||||||
+plugin_traceevent_dir = $(libdir)/trace-cmd/plugins
|
|
||||||
python_dir ?= $(libdir)/trace-cmd/python
|
|
||||||
PLUGIN_DIR_TRACEEVENT = -DPLUGIN_TRACEEVENT_DIR="$(plugin_traceevent_dir)"
|
|
||||||
PLUGIN_DIR_TRACECMD = -DPLUGIN_TRACECMD_DIR="$(plugin_tracecmd_dir)"
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -4,11 +4,12 @@
|
|||||||
|
|
||||||
Name: trace-cmd
|
Name: trace-cmd
|
||||||
Version: 2.9.1
|
Version: 2.9.1
|
||||||
# Note: After libtraceevent separated, remember to bump release to more than 20 to force a kernelshark update
|
Release: 6%{?dist}
|
||||||
Release: 5%{?dist}
|
|
||||||
License: GPLv2 and LGPLv2
|
License: GPLv2 and LGPLv2
|
||||||
Summary: A user interface to Ftrace
|
Summary: A user interface to Ftrace
|
||||||
Requires: trace-cmd-libs%{_isa} = %{version}-%{release}
|
Requires: trace-cmd-libs%{_isa} = %{version}-%{release}
|
||||||
|
Requires: libtracefs
|
||||||
|
Requires: libtraceevent
|
||||||
|
|
||||||
URL: http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary
|
URL: http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary
|
||||||
# If upstream does not provide tarballs, to generate:
|
# If upstream does not provide tarballs, to generate:
|
||||||
@ -16,7 +17,7 @@ URL: http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary
|
|||||||
# cd trace-cmd
|
# cd trace-cmd
|
||||||
# git archive --prefix=trace-cmd-%%{version}/ -o trace-cmd-v%%{version}.tar.gz %%{git_commit}
|
# 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%{version}.tar.gz
|
Source0: https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/trace-cmd-v%{version}.tar.gz
|
||||||
Patch0: 0001-trace-cmd-Temporary-move-libtraceevent-back-to-_libd.patch
|
Patch0: 0001-Don-t-build-or-install-libtraceevent-and-libtracefs.patch
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: xmlto
|
BuildRequires: xmlto
|
||||||
@ -30,6 +31,7 @@ BuildRequires: cmake
|
|||||||
BuildRequires: qt5-qtbase-devel
|
BuildRequires: qt5-qtbase-devel
|
||||||
BuildRequires: freeglut-devel
|
BuildRequires: freeglut-devel
|
||||||
BuildRequires: json-c-devel
|
BuildRequires: json-c-devel
|
||||||
|
BuildRequires: libtraceevent-devel
|
||||||
|
|
||||||
%description
|
%description
|
||||||
trace-cmd is a user interface to Ftrace. Instead of needing to use the
|
trace-cmd is a user interface to Ftrace. Instead of needing to use the
|
||||||
@ -59,8 +61,7 @@ Requires: trace-cmd-libs%{_isa} = %{version}-%{release}
|
|||||||
Development headers of trace-cmd-libs
|
Development headers of trace-cmd-libs
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-v%{version}
|
%autosetup -n %{name}-v%{version}
|
||||||
%patch0 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# MANPAGE_DOCBOOK_XSL define is hack to avoid using locate
|
# MANPAGE_DOCBOOK_XSL define is hack to avoid using locate
|
||||||
@ -70,13 +71,13 @@ MANPAGE_DOCBOOK_XSL=`rpm -ql docbook-style-xsl | grep manpages/docbook.xsl`
|
|||||||
CFLAGS="%{optflags} -D_GNU_SOURCE" LDFLAGS="%{build_ldflags}" BUILD_TYPE=Release \
|
CFLAGS="%{optflags} -D_GNU_SOURCE" LDFLAGS="%{build_ldflags}" BUILD_TYPE=Release \
|
||||||
make V=9999999999 MANPAGE_DOCBOOK_XSL=$MANPAGE_DOCBOOK_XSL \
|
make V=9999999999 MANPAGE_DOCBOOK_XSL=$MANPAGE_DOCBOOK_XSL \
|
||||||
prefix=%{_prefix} libdir=%{_libdir} \
|
prefix=%{_prefix} libdir=%{_libdir} \
|
||||||
PYTHON_VERS=python3 all doc plugins libs
|
PYTHON_VERS=python3 all_cmd doc libtracecmd.so
|
||||||
for i in python/*.py ; do
|
for i in python/*.py ; do
|
||||||
sed -i 's/env python2/python3/g' $i
|
sed -i 's/env python2/python3/g' $i
|
||||||
done
|
done
|
||||||
|
|
||||||
%install
|
%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 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_libtracecmd
|
||||||
find %{buildroot}%{_mandir} -type f | xargs chmod u-x,g-x,o-x
|
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}%{_datadir} -type f | xargs chmod u-x,g-x,o-x
|
||||||
find %{buildroot}%{_libdir} -type f -iname "*.so" | xargs chmod 0755
|
find %{buildroot}%{_libdir} -type f -iname "*.so" | xargs chmod 0755
|
||||||
@ -98,20 +99,16 @@ mv %{buildroot}/usr/etc/bash_completion.d %{buildroot}/%{_sysconfdir}/bash_compl
|
|||||||
|
|
||||||
%files libs
|
%files libs
|
||||||
%dir %{_libdir}/%{name}
|
%dir %{_libdir}/%{name}
|
||||||
%dir %{_libdir}/traceevent
|
|
||||||
%dir %{_libdir}/tracefs
|
|
||||||
%dir %{_libdir}/trace-cmd
|
%dir %{_libdir}/trace-cmd
|
||||||
%{_libdir}/trace-cmd/libtracecmd.so
|
%{_libdir}/trace-cmd/libtracecmd.so
|
||||||
%{_libdir}/trace-cmd/plugins
|
|
||||||
%{_libdir}/traceevent/
|
|
||||||
%{_libdir}/tracefs/
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{_includedir}/trace-cmd
|
%{_includedir}/trace-cmd
|
||||||
%{_includedir}/traceevent
|
|
||||||
%{_includedir}/tracefs
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Mar 24 2021 Jerome Marchand <jmarchan@redhat.com> - 2.9.1-6
|
||||||
|
- Build with external libtraceevent and libtracefs
|
||||||
|
|
||||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.1-5
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.1-5
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user