%global git_commit 40646dc9d677262224f2a42aad47931ce88dd553 %global git_commitdate 20220826.080807 %global git_shortcommit %%(c=%%{git_commit}; echo ${c:0:7}) %global realname kernel-shark Name: kernelshark Version: %{git_commitdate}.%{git_shortcommit} Release: 202210051753%{?dist} Epoch: 1 %global libraryname libkshark # 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 License: GPLv2 and LGPLv2 Summary: GUI analysis for Ftrace data captured by trace-cmd URL: https://kernelshark.org Source0: kernelshark-%{git_commit}.tar.gz Source1: %{name}.appdata.xml #Patch0: 2-2-kernel-shark-Treat-all-tracing-headers-as-library-headers.diff Patch0: kernel-shark-rpath.patch BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: doxygen BuildRequires: texlive-epstopdf BuildRequires: ghostscript BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: graphviz BuildRequires: libappstream-glib BuildRequires: pkgconf BuildRequires: freeglut-devel #BuildRequires: pkgconfig(glut) BuildRequires: pkgconfig(json-c) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(Qt5Core) BuildRequires: font(freesans) # So libtracecmd was miss versioned in it's # initial rpm, and versioned to match trace-cmd # so for now libtracecmd-1 to obselete and # mash around that. Remove when the versioning # is fixed #BuildRequires: libtracecmd-devel < 2 BuildRequires: libtracecmd-1-devel BuildRequires: libtraceevent-devel BuildRequires: libtracefs-devel BuildRequires: boost-devel BuildRequires: trace-cmd BuildRequires: xmlto BuildRequires: make BuildRequires: docbook-style-xsl BuildRequires: kf5-rpm-macros BuildRequires: zstd BuildRequires: libzstd BuildRequires: libzstd-devel BuildRequires: libarchive-devel Requires: polkit Requires: %{libraryname} = %{version}-%{release} Requires: libtracecmd-1 Requires: libtraceevent Requires: libtracefs %package -n %{libraryname} Summary: Library files for %{name} Requires: libtracecmd-1 Requires: libtraceevent Requires: libtracefs %package -n %{libraryname}-devel Summary: Development headers for %{name} Requires: libtracecmd-1-devel Requires: libtraceevent-devel Requires: libtracefs-devel %description KernelShark is a front end reader of trace-cmd output. "trace-cmd record" and "trace-cmd extract" create a trace.dat (trace-cmd.dat) file. kernelshark can read this file and produce a graph and list view of its data. %description -n %{libraryname} KernelShark libraries %description -n %{libraryname}-devel Development libraries for KernelShark %prep %autosetup -p1 -n %{name}-%{git_commit} %build # MANPAGE_DOCBOOK_XSL define is hack to avoid using locate # -z muldefs to workaround the enforcing multi definition check of gcc10. # and it need to be removed once upstream fixed the variable name # Do not use parallel compile because it makes compiling fail MANPAGE_DOCBOOK_XSL=`rpm -ql docbook-style-xsl | grep manpages/docbook.xsl` cd %{_builddir}/%{name}-%{git_commit}/build %cmake_kf5 \ -D_INSTALL_PREFIX=%{_prefix} \ -D_DOXYGEN_DOC=1 \ -D_LIBDIR=%{_libdir} \ ../ %cmake_build %install cd %{_builddir}/%{name}-%{git_commit}/build %cmake_install find %{buildroot}%{_datadir} -type f -exec chmod u-x,g-x,o-x {} \; find %{buildroot}%{_libdir} -type f -iname "*.so" -exec chmod 0755 {} \; sed -i '/Version/d' %{buildroot}/%{_datadir}/applications/kernelshark.desktop desktop-file-validate %{buildroot}/%{_datadir}/applications/kernelshark.desktop mkdir -p %{buildroot}%{_metainfodir}/ cp %{SOURCE1} %{buildroot}%{_metainfodir}/ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdata.xml %files %license LICENSES/LGPL-2.1 %license LICENSES/GPL-2.0 %doc README %{_bindir}/kernelshark %{_bindir}/kshark-record %{_bindir}/kshark-su-record %{_datadir}/applications/kernelshark.desktop %dir %{_datadir}/icons/kernelshark %{_datadir}/icons/kernelshark/* %{_datadir}/polkit-1/actions/org.freedesktop.kshark-record.policy %{_metainfodir}/%{name}.appdata.xml %files -n %{libraryname}-devel %{_includedir}/kernelshark/ %{_libdir}/libkshark.so %{_libdir}/pkgconfig/libkshark.pc %files -n %{libraryname} %{_libdir}/%{libraryname}*.so.* %dir %{_libdir}/kernelshark %{_libdir}/kernelshark/* %changelog * Fri Jul 16 2021 John 'Warthog9' Hawley (VMware) - 2.0-1 - Update to 2.0 - Adding libkshark independent library & devel goes here * Sat Jul 10 2021 Björn Esser - 1:1.3-2 - Rebuild for versioned symbols in json-c * Tue May 11 2021 Zamir SUN - 1.3-1 - Update to 1.3 * Mon May 10 2021 Jonathan Wakely - 1:1.2-6 - Rebuilt for removed libstdc++ symbols (#1937698) * Wed Mar 31 2021 Jonathan Wakely - 1:1.2-5 - Rebuilt for removed libstdc++ symbols (#1937698) * Wed Mar 24 2021 Jerome Marchand - 1.2-3 - Rebuild with external libtracefs and libtraceevent - Misc cleanup * Tue Jan 26 2021 Fedora Release Engineering - 1:1.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Sat Jan 09 2021 Zamir SUN - 1.2-2 - Bump epoch to allow updating. * 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