Compare commits

...

10 Commits

Author SHA1 Message Date
Jerome Marchand cd1563e476 Add man page and html documentation 2023-05-18 14:07:12 +00:00
Jerome Marchand cce943d875 Rebuild with versioned json-c
Rebuild with json-c-0.14-11.el9. Earlier version of json-c had
unversioned symbols.

Resolves: rhbz#2023319
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
2021-11-22 15:54:19 +01:00
Mohan Boddu ef2371cf6c Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
Signed-off-by: Mohan Boddu <mboddu@redhat.com>
2021-08-09 21:11:09 +00:00
Qiao Zhao 2463895041 enable RHEL-9 gating for kernelshark
Resolves: rhbz#1969293

Signed-off-by: Qiao Zhao <qzhao@redhat.com>
2021-06-08 15:17:50 +08:00
Jerome Marchand 640ce012ff Build with libtracecmd{,-devel}
trace-cmd-libs has been renamed libtracecmd. It still a subpackge of
trace-cmd, but will be a standalone package at some.

Resolves: rhbz#1952414
Related: rhbz#1947392
2021-05-03 16:11:20 +02:00
Jerome Marchand cb3591e1b5 Build with trace-cmd-{devel,lib}
libtracecmd isn't available yet on c9s/el9

Related: rhbz#1947392
2021-04-22 07:43:10 +02:00
Jerome Marchand aa44ebcb89 Rebuild kernelshark with external tracing libraries
Related: rhbz#1947392
2021-04-21 16:11:29 +02:00
Mohan Boddu a757d17be2 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
Signed-off-by: Mohan Boddu <mboddu@redhat.com>
2021-04-16 00:55:28 +00:00
DistroBaker 54e90683a5 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/kernelshark.git#f9765425731a4e74ad1318b4d019e8d29d60a7bc
2021-02-04 07:50:45 +01:00
DistroBaker 557fcec28e Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/kernelshark.git#f8cc4c62a444bb70ca747759eb5708f9865d1ead
2021-01-09 02:47:28 +00:00
8 changed files with 79 additions and 193 deletions

1
.kernelshark.metadata Normal file
View File

@ -0,0 +1 @@
8a9a124001207d349582190b6236dcac2eb639cc trace-cmd-kernelshark-v1.2.tar.gz

View File

@ -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

View File

@ -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

View File

@ -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

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -1,6 +1,7 @@
Name: kernelshark
Version: 1.2
Release: 1%{?dist}
Release: 10%{?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.
# See SPDX identifier for most accurate info
@ -10,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
@ -24,12 +25,11 @@ 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: libtracecmd
BuildRequires: libtracecmd-devel
BuildRequires: xmlto
BuildRequires: make
BuildRequires: asciidoc
Requires: polkit
@ -40,11 +40,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
@ -54,10 +50,10 @@ view of its data.
MANPAGE_DOCBOOK_XSL=`rpm -ql docbook-style-xsl | grep manpages/docbook.xsl`
CFLAGS="%{optflags} -D_GNU_SOURCE" LDFLAGS="%{build_ldflags} -z muldefs" BUILD_TYPE=Release \
make -p V=9999999999 MANPAGE_DOCBOOK_XSL=$MANPAGE_DOCBOOK_XSL \
prefix=%{_prefix} libdir=%{_libdir} gui
prefix=%{_prefix} libdir=%{_libdir} gui doc_gui
%install
make libdir=%{_libdir} prefix=%{_prefix} V=1 DESTDIR=%{buildroot}/ CFLAGS="%{optflags} -D_GNU_SOURCE" LDFLAGS="%{build_ldflags} -z muldefs " BUILD_TYPE=Release install_gui
make libdir=%{_libdir} prefix=%{_prefix} V=1 DESTDIR=%{buildroot}/ CFLAGS="%{optflags} -D_GNU_SOURCE" LDFLAGS="%{build_ldflags} -z muldefs " BUILD_TYPE=Release install_gui install_doc_gui
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
@ -79,8 +75,40 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdat
%{_datadir}/icons/kernelshark/*
%{_datadir}/polkit-1/actions/org.freedesktop.kshark-record.policy
%{_metainfodir}/%{name}.appdata.xml
%docdir %{_datadir}/%{name}/html
%{_datadir}/%{name}/html/*
%{_mandir}/man1/*
%changelog
* Mon Dec 12 2022 Jerome Marchand <jmarchan@redhat.com> - 1:1.2-10
- Add html documentation and man page
* Mon Nov 22 2021 Jerome Marchand <jmarchan@redhat.com> - 1:1.2-9
- Rebuild with latest json-c
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com>
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Mon May 03 21 Jerome Marchand <jmarchan@redhat.com> - 1:1.2-7
- libtracecmd is a subpackage of trace-cmd for now
* Thu Apr 22 2021 Jerome Marchand <jmarchan@redhat.com> - 1:1.2-6
- libtracecmd is not yet available on c9s/el9
* Mon Apr 19 2021 Jerome Marchand <jmarchan@redhat.com> - 1:1.2-5
- Rebuild with external tracing libs
- Misc cleanup
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1:1.2-4
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Jan 09 2021 Zamir SUN <sztsian@gmail.coom> - 1.2-2
- Bump epoch to allow updating.
* Mon Oct 12 2020 Zamir SUN <sztsian@gmail.com> - 1.2-1
- Update to 1.2
- Uses trace event plugins from old trace-cmd dir

19
tests/scripts/run_tests.sh Executable file
View File

@ -0,0 +1,19 @@
#!/usr/bin/bash
if rpm -q --quiet kernelshark; then
:
else
sudo dnf install -y kernelshark
if [[ $? != 0 ]]; then
echo "install of kernelshark failed!"
exit 1
fi
fi
echo "kernelshark is GUI tool, just check the installation files"
if [[ ! -f /usr/bin/kernelshark ]]; then
echo "/usr/bin/kernelshark not found!"
exit 2
fi
exit 0

11
tests/tests.yml Normal file
View File

@ -0,0 +1,11 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
tests:
- simple:
dir: scripts
run: ./run_tests.sh
required_packages:
- kernelshark