From a5e0e2020d6fb7503ce07eb62272d57965133860 Mon Sep 17 00:00:00 2001 From: Zamir SUN Date: Sat, 27 Mar 2021 00:09:53 +0800 Subject: [PATCH] Update to 2.9.2 and rename trace-cmd-libs to libtracecmd Signed-off-by: Zamir SUN --- .gitignore | 1 + ...install-libtraceevent-and-libtracefs.patch | 47 ----------------- sources | 2 +- trace-cmd.spec | 52 +++++++++++-------- 4 files changed, 32 insertions(+), 70 deletions(-) delete mode 100644 0001-Don-t-build-or-install-libtraceevent-and-libtracefs.patch diff --git a/.gitignore b/.gitignore index 54281d9..7712876 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /trace-cmd-v2.7.tar.gz /trace-cmd-v2.8.3.tar.gz /trace-cmd-v2.9.1.tar.gz +/trace-cmd-v2.9.2.tar.gz diff --git a/0001-Don-t-build-or-install-libtraceevent-and-libtracefs.patch b/0001-Don-t-build-or-install-libtraceevent-and-libtracefs.patch deleted file mode 100644 index b4bdf4f..0000000 --- a/0001-Don-t-build-or-install-libtraceevent-and-libtracefs.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 168d010bf251b7679645fd34e8551f2cf333fcf5 Mon Sep 17 00:00:00 2001 -From: Jerome Marchand -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 - diff --git a/sources b/sources index b7957ec..795af90 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (trace-cmd-v2.9.1.tar.gz) = 186bfdd8ff1e88e9e6d3ae87b123f049892deaaa8d6a42944b6f8abee6b828946b88774029aa96daf4423a3dfc01b42835508f44f636dd02579ef9a8ef425131 +SHA512 (trace-cmd-v2.9.2.tar.gz) = ddb32446a5185ee6414f297de1d48fe39a7141c833a608fd3977dd0efd496bf18b59ea5d064316e7deb86c1cd82f33dcea4c0c145bb31b2473e85593f4d0d461 diff --git a/trace-cmd.spec b/trace-cmd.spec index 71f7865..f534183 100644 --- a/trace-cmd.spec +++ b/trace-cmd.spec @@ -2,9 +2,11 @@ #%%global git_commit trace-cmd-v2.6.2 #%%global git_commit 57371aaa2f469d0ba15fd85276deca7bfdd7ce36 +%global srcversion 2.9.2 + Name: trace-cmd -Version: 2.9.1 -Release: 6%{?dist} +Version: %{srcversion} +Release: 1%{?dist} License: GPLv2 and LGPLv2 Summary: A user interface to Ftrace Requires: trace-cmd-libs%{_isa} = %{version}-%{release} @@ -16,8 +18,7 @@ URL: http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary # git clone https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git # cd trace-cmd # 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 -Patch0: 0001-Don-t-build-or-install-libtraceevent-and-libtracefs.patch +Source0: https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/trace-cmd-v%{srcversion}.tar.gz BuildRequires: make BuildRequires: gcc BuildRequires: xmlto @@ -47,21 +48,23 @@ BuildRequires: python3-devel %description python3 Python plugin support for trace-cmd -%package libs +%package -n libtracecmd Summary: Libraries of trace-cmd +Version: 0 -%description libs -Libraries of trace-cmd +%description -n libtracecmd +The libtracecmd library -%package devel -Summary: Development headers of trace-cmd-libs -Requires: trace-cmd-libs%{_isa} = %{version}-%{release} +%package -n libtracecmd-devel +Summary: Development files for libtracecmd +Version: 0 +Requires: libtracecmd%{_isa} = %{version}-%{release} -%description devel -Development headers of trace-cmd-libs +%description -n libtracecmd-devel +Development files of the libtracecmd library %prep -%autosetup -n %{name}-v%{version} +%autosetup -n %{name}-v%{srcversion} %build # MANPAGE_DOCBOOK_XSL define is hack to avoid using locate @@ -77,14 +80,11 @@ for i in python/*.py ; do done %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_libtracecmd +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 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 -#sed -i '/Version/d' %{buildroot}/%{_datadir}/applications/kernelshark.desktop -#desktop-file-validate %{buildroot}/%{_datadir}/applications/kernelshark.desktop mkdir -p %{buildroot}/%{_sysconfdir} -mv %{buildroot}/usr/etc/bash_completion.d %{buildroot}/%{_sysconfdir}/bash_completion.d %files %doc COPYING COPYING.LIB README @@ -97,15 +97,23 @@ mv %{buildroot}/usr/etc/bash_completion.d %{buildroot}/%{_sysconfdir}/bash_compl %doc Documentation/README.PythonPlugin %{_libdir}/%{name}/python/ -%files libs -%dir %{_libdir}/%{name} -%dir %{_libdir}/trace-cmd -%{_libdir}/trace-cmd/libtracecmd.so +%files -n libtracecmd +%doc COPYING COPYING.LIB README +%{_libdir}/libtracecmd.so.0 +%{_libdir}/libtracecmd.so.0.0.1 +%{_docdir}/libtracecmd-doc +%{_mandir}/man3/libtracecmd* +%{_mandir}/man3/tracecmd* -%files devel +%files -n libtracecmd-devel +%{_libdir}/pkgconfig/libtracecmd.pc +%{_libdir}/libtracecmd.so %{_includedir}/trace-cmd %changelog +* Fri Mar 26 2021 2020 Zamir SUN - 2.9.2-1 +- Update to 2.9.2 + * Wed Mar 24 2021 Jerome Marchand - 2.9.1-6 - Build with external libtraceevent and libtracefs