Rebuild kernelshark with external libtracefs and libtraceevent
This commit is contained in:
parent
f976542573
commit
105c05daa6
@ -1,32 +0,0 @@
|
||||
From afa8362e1b11a892a27e436d13616c7851f6e6d5 Mon Sep 17 00:00:00 2001
|
||||
From: Zamir SUN <sztsian@gmail.com>
|
||||
Date: Thu, 24 Sep 2020 21:13:12 +0800
|
||||
Subject: [PATCH] kernel-shark: Fix dependency (symbol resolving) issue
|
||||
|
||||
Backport of
|
||||
https://lore.kernel.org/linux-trace-devel/20200916065007.9755-4-y.karadz@gmail.com/raw
|
||||
|
||||
Signed-off-by: Zamir SUN <sztsian@gmail.com>
|
||||
---
|
||||
kernel-shark/src/CMakeLists.txt | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/kernel-shark/src/CMakeLists.txt b/kernel-shark/src/CMakeLists.txt
|
||||
index e20a030..7b47b92 100644
|
||||
--- a/kernel-shark/src/CMakeLists.txt
|
||||
+++ b/kernel-shark/src/CMakeLists.txt
|
||||
@@ -7,8 +7,9 @@ add_library(kshark SHARED libkshark.c
|
||||
libkshark-configio.c
|
||||
libkshark-collection.c)
|
||||
|
||||
-target_link_libraries(kshark ${TRACEEVENT_LIBRARY}
|
||||
- ${TRACECMD_LIBRARY}
|
||||
+target_link_libraries(kshark ${TRACECMD_LIBRARY}
|
||||
+ ${TRACEFS_LIBRARY}
|
||||
+ ${TRACEEVENT_LIBRARY}
|
||||
${JSONC_LIBRARY}
|
||||
${CMAKE_DL_LIBS})
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,49 +0,0 @@
|
||||
From b90d567d467778eb7d9142788cc7061b9cdff7fa Mon Sep 17 00:00:00 2001
|
||||
From: Zamir SUN <sztsian@gmail.com>
|
||||
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 <sztsian@gmail.com>
|
||||
---
|
||||
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
|
||||
|
@ -1,98 +0,0 @@
|
||||
From 64adcc34f992e87500e96d8f692ce8b6b339cc9a Mon Sep 17 00:00:00 2001
|
||||
From: "Ziqian SUN (Zamir)" <sztsian@gmail.com>
|
||||
Date: Fri, 21 Feb 2020 21:57:13 +0800
|
||||
Subject: KernelShark: Inherit libdir from Makefile
|
||||
|
||||
The trace-cmd makefile supports install lib into a different name like
|
||||
lib64. Now this patch implemented the same in kernel-shark.
|
||||
|
||||
Link: http://lore.kernel.org/linux-trace-devel/20200221135713.323958-1-sztsian@gmail.com
|
||||
|
||||
Reviewed-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
|
||||
Signed-off-by: Ziqian SUN (Zamir) <sztsian@gmail.com>
|
||||
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
||||
---
|
||||
Makefile | 2 +-
|
||||
kernel-shark/CMakeLists.txt | 8 ++++++--
|
||||
kernel-shark/src/CMakeLists.txt | 6 +++---
|
||||
3 files changed, 10 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index a3facaa..2f9620e 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -297,7 +297,7 @@ CMAKE_COMMAND = /usr/bin/cmake
|
||||
BUILD_TYPE ?= RelWithDebInfo
|
||||
|
||||
$(kshark-dir)/build/Makefile: $(kshark-dir)/CMakeLists.txt
|
||||
- $(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -D_INSTALL_PREFIX=$(prefix) ..
|
||||
+ $(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -D_INSTALL_PREFIX=$(prefix) -D_LIBDIR=$(libdir) ..
|
||||
|
||||
gui: force $(CMD_TARGETS) $(kshark-dir)/build/Makefile
|
||||
$(Q)$(MAKE) $(S) -C $(kshark-dir)/build
|
||||
diff --git a/kernel-shark/CMakeLists.txt b/kernel-shark/CMakeLists.txt
|
||||
index 8786b83..1c9ac2e 100644
|
||||
--- a/kernel-shark/CMakeLists.txt
|
||||
+++ b/kernel-shark/CMakeLists.txt
|
||||
@@ -17,6 +17,10 @@ if (NOT _INSTALL_PREFIX)
|
||||
set(_INSTALL_PREFIX "/usr/local")
|
||||
endif (NOT _INSTALL_PREFIX)
|
||||
|
||||
+if (NOT _LIBDIR)
|
||||
+ set(_LIBDIR "${_INSTALL_PREFIX}/lib")
|
||||
+endif (NOT _LIBDIR)
|
||||
+
|
||||
include(${KS_DIR}/build/FindTraceCmd.cmake)
|
||||
include(${KS_DIR}/build/FindJSONC.cmake)
|
||||
|
||||
@@ -54,14 +58,14 @@ if (NOT CMAKE_CXX_FLAGS_PACKAGE)
|
||||
set(CMAKE_CXX_FLAGS_PACKAGE "-O3")
|
||||
endif (NOT CMAKE_CXX_FLAGS_PACKAGE)
|
||||
|
||||
-set(KS_PLUGIN_INSTALL_PREFIX ${_INSTALL_PREFIX}/lib/${KS_APP_NAME}/plugins/)
|
||||
+set(KS_PLUGIN_INSTALL_PREFIX ${_LIBDIR}/${KS_APP_NAME}/plugins/)
|
||||
|
||||
set(KS_ICON KS_icon_shark.svg)
|
||||
set(KS_ICON_FIN KS_icon_fin.svg)
|
||||
set(KS_LOGO KS_logo_symbol.svg)
|
||||
set(KS_LOGO_LABEL KS_logo_horizontal.svg)
|
||||
|
||||
-set(CMAKE_INSTALL_RPATH "${_INSTALL_PREFIX}/lib/${KS_APP_NAME}/")
|
||||
+set(CMAKE_INSTALL_RPATH "${_LIBDIR}/${KS_APP_NAME}/")
|
||||
|
||||
if (CMAKE_BUILD_TYPE MATCHES Package)
|
||||
|
||||
diff --git a/kernel-shark/src/CMakeLists.txt b/kernel-shark/src/CMakeLists.txt
|
||||
index 33b5db8..9666b18 100644
|
||||
--- a/kernel-shark/src/CMakeLists.txt
|
||||
+++ b/kernel-shark/src/CMakeLists.txt
|
||||
@@ -15,7 +15,7 @@ target_link_libraries(kshark ${TRACEEVENT_LIBRARY}
|
||||
|
||||
set_target_properties(kshark PROPERTIES SUFFIX ".so.${KS_VERSION_STRING}")
|
||||
|
||||
-install(TARGETS kshark LIBRARY DESTINATION ${_INSTALL_PREFIX}/lib/${KS_APP_NAME})
|
||||
+install(TARGETS kshark LIBRARY DESTINATION ${_LIBDIR}/${KS_APP_NAME})
|
||||
|
||||
if (OPENGL_FOUND AND GLUT_FOUND)
|
||||
|
||||
@@ -29,7 +29,7 @@ if (OPENGL_FOUND AND GLUT_FOUND)
|
||||
|
||||
set_target_properties(kshark-plot PROPERTIES SUFFIX ".so.${KS_VERSION_STRING}")
|
||||
|
||||
- install(TARGETS kshark-plot LIBRARY DESTINATION ${_INSTALL_PREFIX}/lib/${KS_APP_NAME})
|
||||
+ install(TARGETS kshark-plot LIBRARY DESTINATION ${_LIBDIR}/${KS_APP_NAME})
|
||||
|
||||
endif (OPENGL_FOUND AND GLUT_FOUND)
|
||||
|
||||
@@ -85,7 +85,7 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
|
||||
|
||||
install(TARGETS ${KS_APP_NAME} kshark-record kshark-gui
|
||||
RUNTIME DESTINATION ${_INSTALL_PREFIX}/bin/
|
||||
- LIBRARY DESTINATION ${_INSTALL_PREFIX}/lib/${KS_APP_NAME}/)
|
||||
+ LIBRARY DESTINATION ${_LIBDIR}/${KS_APP_NAME}/)
|
||||
|
||||
install(FILES "${KS_DIR}/${KS_APP_NAME}.desktop"
|
||||
DESTINATION ${_INSTALL_PREFIX}/share/applications/)
|
||||
--
|
||||
cgit 1.2.3-1.el7
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: kernelshark
|
||||
Version: 1.2
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Epoch: 1
|
||||
|
||||
# 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.
|
||||
@ -11,8 +11,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: 0001-Do-not-install-trace-cmd-when-only-building-kernelsh.patch
|
||||
|
||||
Patch0: 0001-kernelshark-Temporary-move-libtraceevent-back-to-_li.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: doxygen
|
||||
@ -25,11 +25,8 @@ BuildRequires: pkgconfig(glut)
|
||||
BuildRequires: pkgconfig(json-c)
|
||||
BuildRequires: pkgconfig(libxml-2.0)
|
||||
BuildRequires: pkgconfig(Qt5Core)
|
||||
# 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: trace-cmd-devel >= 2.9.1-6
|
||||
BuildRequires: trace-cmd-libs >= 2.9.1-6
|
||||
BuildRequires: xmlto
|
||||
BuildRequires: make
|
||||
Requires: polkit
|
||||
@ -42,11 +39,7 @@ file. kernelshark can read this file and produce a graph and list
|
||||
view of its data.
|
||||
|
||||
%prep
|
||||
%setup -q -n trace-cmd-%{name}-v%{version}
|
||||
%patch0 -p1
|
||||
#%patch1 -p1
|
||||
#%patch2 -p1
|
||||
#%patch3 -p1
|
||||
%autosetup -n trace-cmd-%{name}-v%{version}
|
||||
|
||||
%build
|
||||
# MANPAGE_DOCBOOK_XSL define is hack to avoid using locate
|
||||
@ -83,6 +76,10 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdat
|
||||
%{_metainfodir}/%{name}.appdata.xml
|
||||
|
||||
%changelog
|
||||
* Wed Mar 24 2021 Jerome Marchand <jmarchan@redhat.com> - 1.2-3
|
||||
- Rebuild with external libtracefs and libtraceevent
|
||||
- Misc cleanup
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user