[packages/trace-cmd] - updated to 3.2; gui now in kernelshark.spec
qboosh
qboosh at pld-linux.org
Wed Sep 20 20:06:55 CEST 2023
commit 806416c38e6a67ca413ca3588261374764f04ddd
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Sep 20 19:49:05 2023 +0200
- updated to 3.2; gui now in kernelshark.spec
trace-cmd-link.patch | 22 +++++++++++
trace-cmd.spec | 102 +++++++++++++++++++++++++++++++++------------------
2 files changed, 88 insertions(+), 36 deletions(-)
---
diff --git a/trace-cmd.spec b/trace-cmd.spec
index c2b9d91..8856ef8 100644
--- a/trace-cmd.spec
+++ b/trace-cmd.spec
@@ -1,22 +1,28 @@
-# TODO:
-# - add gui (make gui)
-#
-Summary: trace-cmd - interacts with Ftrace Linux kernel internal tracer
+Summary: trace-cmd - interact with Ftrace Linux kernel internal tracer
+Summary(pl.UTF-8): trace-cmd - interakcja z Ftrace - wewnętrznym systemem śledzenia jądra Linuksa
Name: trace-cmd
-Version: 2.6
+Version: 3.2
Release: 1
-License: GPLv2 and LGPLv2.1
+License: GPL v2
Group: Development/Tools
-URL: http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary
-# git clone git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
-# git archive --prefix=trace-cmd-2.6/ -o trace-cmd-2.6.tar.gz trace-cmd-v2.6
-Source0: %{name}-%{version}.tar.gz
-# Source0-md5: de94b70d910902848e3b73da78a3c361
+Source0: https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/%{name}-v%{version}.tar.gz
+# Source0-md5: aebecc253f0991368fe8d88c20b9713c
+Patch0: %{name}-link.patch
+URL: https://www.trace-cmd.org/
BuildRequires: asciidoc
+BuildRequires: audit-libs-devel
BuildRequires: docbook-dtd45-xml
BuildRequires: docbook-style-xsl
-BuildRequires: gtk+2-devel
+BuildRequires: libtraceevent-devel >= 1.5
+BuildRequires: libtracefs-devel >= 1.6
BuildRequires: pkgconfig
+BuildRequires: python3-devel >= 1:3.2
+BuildRequires: rpmbuild(macros) >= 1.673
+BuildRequires: swig-python >= 2
+BuildRequires: zlib-devel
+BuildRequires: zstd-devel >= 1.4.0
+Requires: libtraceevent >= 1.5
+Requires: libtracefs >= 1.6
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -24,38 +30,62 @@ trace-cmd is a user interface to Ftrace. Instead of needing to use the
debugfs directly, trace-cmd will handle of setting of options and
tracers and will record into a data file.
-%package gui
-Summary: Graphical frontend for trace-cmd
-Group: X11/Development/Tools
+%description -l pl.UTF-8
+trace-cmd to interfejs użytkownika do Ftrace. Zamiast konieczności
+bezpośrednich odwołań do debugfs, trace-cmd obsługuje ustawianie opcji
+i śledzenia oraz zapisuje wyniki do plików danych.
+
+%package python
+Summary: Python plugin support for trace-cmd
+Summary(pl.UTF-8): Obsługa wtyczek trace-cmd napisanych w Pythonie
+Group: Development/Tools
Requires: %{name} = %{version}-%{release}
-%description gui
-Graphical frontend for trace-cmd.
+%description python
+Python (3.x) plugin support for trace-cmd.
+
+%description python -l pl.UTF-8
+Obsługa wtyczek trace-cmd napisanych w Pythonie (3.x).
%prep
-%setup -q
+%setup -q -n %{name}-v%{version}
+%patch0 -p1
-sed -i -e 's#MANPAGE_DOCBOOK_XSL =.*#MANPAGE_DOCBOOK_XSL = /usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl#g' Documentation/Makefile
-sed -i -e 's#$(prefix)/share/trace-cmd/#$(prefix)/%{_lib}/trace-cmd/#g' Makefile
+%{__sed} -i -e '1s,/usr/bin/env python2,%{__python},' python/event-viewer.py
%build
-%{__make} trace_plugin_dir all gui doc \
- CC="%{__cc} %{rpmcppflags} %{rpmcflags} %{rpmldflags}" \
+CFLAGS="%{rpmcflags}" \
+CPPFLAGS="%{rpmcppflags}" \
+LDFLAGS="%{rpmldflags}" \
+%{__make} all doc \
+ CC="%{__cc}" \
+ PYTHON_VERS=python3 \
V=1 \
prefix=%{_prefix} \
- libdir=%{_lib}
+ libdir_relative=%{_lib}
%install
rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins
-# prevent trace_plugin_dir from being updated
-sed -i -e 's#trace-util.o: trace_plugin_dir##g' Makefile
-sed -i -e 's#= trace_plugin_dir tc_version.h#= tc_version.h#g' Makefile
-
-%{__make} install install_gui install_doc \
+%{__make} install install_doc \
+ DESTDIR=$RPM_BUILD_ROOT \
+ BASH_COMPLETE_DIR=%{bash_compdir} \
+ PYTHON_VERS=python3 \
V=1 \
- prefix=$RPM_BUILD_ROOT%{_prefix} \
- libdir=%{_lib}
+ prefix=%{_prefix} \
+ libdir_relative=%{_lib}
+
+chmod 755 $RPM_BUILD_ROOT%{_libdir}/%{name}/python/ctracecmd.so
+
+# remove libtracecmd docs
+%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man3
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/libtracecmd-doc
+# just HTML'd manuals
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/trace-cmd
+
+# python2/pygtk script
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/python/event-viewer.py
%clean
rm -rf $RPM_BUILD_ROOT
@@ -66,12 +96,12 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/trace-cmd
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/plugins
-%attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
+%{bash_compdir}/trace-cmd.bash
%{_mandir}/man1/trace-cmd*.1*
-%{_mandir}/man5/trace-cmd*.5*
+%{_mandir}/man5/trace-cmd.dat.v*.5*
-%files gui
+%files python
%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/kernelshark
-%attr(755,root,root) %{_bindir}/trace-graph
-%attr(755,root,root) %{_bindir}/trace-view
+%dir %{_libdir}/%{name}/python
+%attr(755,root,root) %{_libdir}/%{name}/python/ctracecmd.so
+%{_libdir}/%{name}/python/tracecmd.py
diff --git a/trace-cmd-link.patch b/trace-cmd-link.patch
new file mode 100644
index 0000000..a9d3a00
--- /dev/null
+++ b/trace-cmd-link.patch
@@ -0,0 +1,22 @@
+--- trace-cmd-v3.2/Makefile.orig 2023-06-07 22:21:00.000000000 +0200
++++ trace-cmd-v3.2/Makefile 2023-09-17 22:23:20.068658108 +0200
+@@ -272,7 +272,7 @@ endif
+ export LIBTRACEFS_CFLAGS LIBTRACEFS_LDLAGS
+
+ TRACE_LIBS = -L$(LIBTRACECMD_DIR) -ltracecmd \
+- $(LIBTRACEEVENT_LDLAGS) $(LIBTRACEFS_LDLAGS)
++ $(LIBTRACEEVENT_LDLAGS) $(LIBTRACEFS_LDLAGS) $(ZLIB_LDFLAGS) $(LIBZSTD_LDFLAGS)
+
+ export LIBS TRACE_LIBS
+ export LIBTRACECMD_DIR
+--- trace-cmd-v3.2/python/ctracecmd.i.orig 2023-06-07 22:21:00.000000000 +0200
++++ trace-cmd-v3.2/python/ctracecmd.i 2023-09-17 22:31:17.736449648 +0200
+@@ -239,6 +239,8 @@ static int python_callback(struct trace_
+
+ %ignore trace_seq_vprintf;
+ %ignore vpr_stat;
++%ignore tep_plugin_kvm_get_func;
++%ignore tep_plugin_kvm_put_func;
+
+ /* SWIG can't grok these, define them to nothing */
+ #define __trace
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/trace-cmd.git/commitdiff/806416c38e6a67ca413ca3588261374764f04ddd
More information about the pld-cvs-commit
mailing list