From 88e47722badce39d0ac907633b6455047a29cf95 Mon Sep 17 00:00:00 2001 From: Zamir SUN Date: Wed, 14 Oct 2020 21:16:17 +0800 Subject: [PATCH] Use libtraceevent from the old path of trace-cmd Signed-off-by: Zamir SUN --- .gitignore | 1 + ...orary-move-libtraceevent-back-to-_li.patch | 49 +++++++++++++++++++ kernelshark.spec | 26 +++++----- sources | 2 +- 4 files changed, 66 insertions(+), 12 deletions(-) create mode 100644 0001-kernelshark-Temporary-move-libtraceevent-back-to-_li.patch diff --git a/.gitignore b/.gitignore index 98a739d..9b5c093 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /trace-cmd-kernelshark-v1.1.tar.gz +/trace-cmd-kernelshark-v1.2.tar.gz diff --git a/0001-kernelshark-Temporary-move-libtraceevent-back-to-_li.patch b/0001-kernelshark-Temporary-move-libtraceevent-back-to-_li.patch new file mode 100644 index 0000000..dc38f02 --- /dev/null +++ b/0001-kernelshark-Temporary-move-libtraceevent-back-to-_li.patch @@ -0,0 +1,49 @@ +From b90d567d467778eb7d9142788cc7061b9cdff7fa Mon Sep 17 00:00:00 2001 +From: Zamir SUN +Date: Mon, 12 Oct 2020 21:52:09 +0800 +Subject: [PATCH] kernelshark: Temporary move libtraceevent back to + %{_libdir}/trace-cmd + +Signed-off-by: Zamir SUN +--- + Makefile | 4 ++-- + kernel-shark/CMakeLists.txt | 1 + + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index b034042..a02d1c2 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)" +@@ -407,7 +407,7 @@ install: install_cmd + @echo "Note: to install the gui, type \"make install_gui\"" + @echo " to install man pages, type \"make install_doc\"" + +-install_gui: install_cmd gui ++install_gui: gui + $(Q)$(MAKE) $(S) -C $(kshark-dir)/build install + + install_libs: libs +diff --git a/kernel-shark/CMakeLists.txt b/kernel-shark/CMakeLists.txt +index c95249e..213f777 100644 +--- a/kernel-shark/CMakeLists.txt ++++ b/kernel-shark/CMakeLists.txt +@@ -79,6 +79,7 @@ endif (CMAKE_BUILD_TYPE MATCHES Package) + + include_directories(${KS_DIR}/src/ + ${KS_DIR}/build/src/ ++ ${TRACEEVENT_LIBRARY} + ${JSONC_INCLUDE_DIR} + ${TRACECMD_INCLUDE_DIR} + ${TRACEFS_INCLUDE_DIR}) +-- +2.26.2 + diff --git a/kernelshark.spec b/kernelshark.spec index 0b15e26..a5485e5 100644 --- a/kernelshark.spec +++ b/kernelshark.spec @@ -1,5 +1,5 @@ Name: kernelshark -Version: 1.1 +Version: 1.2 Release: 1%{?dist} # As of 1.1, only kernelshark.cpp, kshark-record.cpp and examples are GPL-2.0. The rest of kernel-shark is LGPL-2.1. @@ -10,12 +10,8 @@ Summary: GUI analysis for Ftrace data captured by trace-cmd URL: https://kernelshark.org Source0: https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/trace-cmd-kernelshark-v%{version}.tar.gz Source1: %{name}.appdata.xml -# Patch0: https://lore.kernel.org/linux-trace-devel/20200916065007.9755-4-y.karadz@gmail.com/ -Patch0: 0001-kernel-shark-Fix-dependency-symbol-resolving-issue.patch -# Patch1: Fedora only as of Sep 26, 2020. To be submitted in bulks to upstream later. -Patch1: 0001-Do-not-install-trace-cmd-when-only-building-kernelsh.patch -# Apply patch 2 to inherit libdir from Makefile, see https://lore.kernel.org/linux-trace-devel/20200221135713.323958-1-sztsian@gmail.com/ -Patch2: 64adcc34f992e87500e96d8f692ce8b6b339cc9a.patch + +Patch0: 0001-kernelshark-Temporary-move-libtraceevent-back-to-_li.patch BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: doxygen @@ -28,8 +24,11 @@ BuildRequires: pkgconfig(glut) BuildRequires: pkgconfig(json-c) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(Qt5Core) -BuildRequires: trace-cmd-devel -BuildRequires: trace-cmd-libs +# Force dependency release < 20 so that when libtraceevent is out we can force an update by bumping trace-cmd version. +BuildRequires: trace-cmd-devel >= 2.9.1-3 +BuildRequires: trace-cmd-devel < 2.9.1-20 +BuildRequires: trace-cmd-libs >= 2.9.1-3 +BuildRequires: trace-cmd-libs < 2.9.1-20 BuildRequires: xmlto Requires: polkit @@ -43,8 +42,9 @@ view of its data. %prep %setup -q -n trace-cmd-%{name}-v%{version} %patch0 -p1 -%patch1 -p1 -%patch2 -p1 +#%patch1 -p1 +#%patch2 -p1 +#%patch3 -p1 %build # MANPAGE_DOCBOOK_XSL define is hack to avoid using locate @@ -81,6 +81,10 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdat %{_metainfodir}/%{name}.appdata.xml %changelog +* Mon Oct 12 2020 Zamir SUN - 1.2-1 +- Update to 1.2 +- Uses trace event plugins from old trace-cmd dir + * Thu Sep 24 2020 Zamir SUN - 1.1-1 - Package kernelshark in a standalone package with 1.1 diff --git a/sources b/sources index a3df5fe..4ff05fc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (trace-cmd-kernelshark-v1.1.tar.gz) = b26ad1d07018682194d74fc1f39471d2bb3fe135974333157cc884a858c1146f2e42b49d74d5e654f1b8f018811e3e648780ac08a3e93d03e2a07f0a115a38dd +SHA512 (trace-cmd-kernelshark-v1.2.tar.gz) = 059ac0ced71fa00de34c30ece433430f1e2fc36acb1b3a3f15cb84ce74d7a4f115e4ee8fbf9a256d5a731050aee02823a90a024dca4b4f6a17061652b871b935