Package trace-cmd: Specfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | # SPDX-License-Identifier: GPL-2.0-only %define _unpackaged_files_terminate_build 1 %define _stripped_files_terminate_build 1 Name: trace-cmd Version: 2.9.1 Release: alt5 Summary: A front-end for Ftrace Linux kernel internal tracer License: GPL-2.0 and LGPL-2.1 Group: Development/Debug Url: https://trace-cmd.org/ Vcs: https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git # List: https://lore.kernel.org/linux-trace-devel/ # List: https://lore.kernel.org/linux-trace-users/ # Bugs: https://bugzilla.kernel.org/buglist.cgi?component=Trace-cmd%%2FKernelshark&product=Tools # # Poorly documented. # Presentation: https://lwn.net/Articles/410200/ (2010) # Article: http://wrightrocket.blogspot.com/2019/07/linux-performance-tool-trace-cmd.html Source: %name-%version.tar BuildRequires(pre): rpm-build-python3 BuildRequires: asciidoc BuildRequires: banner BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: gcc-c++ BuildRequires: libfreeglut-devel BuildRequires: libjson-c-devel BuildRequires: libXi-devel BuildRequires: libxml2-devel BuildRequires: libXmu-devel BuildRequires: polkit BuildRequires: python-devel BuildRequires: qt5-base-devel BuildRequires: swig BuildRequires: xmlto %{?!_without_check:%{?!_disable_check:BuildRequires: CUnit-devel rpm-build-vm}} %description The trace-cmd(1) command interacts with the Ftrace tracer that is built inside the Linux kernel. It interfaces with the Ftrace specific files found in the debugfs file system under the tracing directory. %package libs Summary: trace-cmd libraries Group: System/Libraries %description libs %summary. %package devel Summary: Development headers of trace-cmd-libs Group: Development/C Requires: %name-libs = %EVR %description devel %summary. %package python3 Summary: Python plugin support for trace-cmd Group: Development/Python3 Requires: %name = %EVR Provides: python3(tracecmd) %description python3 %summary. %package -n kernelshark Summary: Graphical reader for trace-cmd(1) output Group: Development/Debug Requires: trace-cmd = %EVR %description -n kernelshark KernelShark is a front end reader of trace-cmd(1) output. It reads a trace-cmd.dat(5) formatted file and produces a graph and list view of the data. %prep %setup sed -i s/not-a-git-repo/%version-%release/ scripts/utils.mk sed -i 's/import gtk/from gi.repository import Gtk as gtk/' python/*.py sed -i 's/python2/python3/' python/event-viewer.py %build export CFLAGS="%optflags -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-check" %make_build \ all doc plugins %make_build PYTHON_VERS=python3 python # Following two cannot be built with make -j: make libs %{?!_without_check:%{?!_disable_check:make test}} # Kernelshark shall have trace-cmd already built, or compilation will fail. banner gui %make_build \ prefix=%_prefix \ libdir=%_libdir \ gui %install banner install %makeinstall \ etcdir=%buildroot%_sysconfdir \ install install_doc install_libs %makeinstall \ PYTHON_VERS=python3 install_python %makeinstall \ prefix=%_prefix \ libdir=%_libdir \ DESTDIR=%buildroot/ \ install_gui # Misinstalled by install_gui. rm -rf %buildroot/usr/etc %buildroot/usr/src/tmp # error: value "1.1.0" for key "Version" in group "Desktop Entry" is not a known version sed -i '/Version/d' %buildroot/%_datadir/applications/kernelshark.desktop %check desktop-file-validate %buildroot/%_datadir/applications/kernelshark.desktop # Basic tests %buildroot%_bindir/trace-cmd | grep version %buildroot%_bindir/trace-cmd options # Internal unit tests export LD_LIBRARY_PATH=$PWD/lib/tracefs:$PWD/lib/traceevent:$PWD/lib/trace-cmd vm-run --cpu=2 ' set -xe utest/trace-utest PATH=%buildroot%_bindir:$PATH trace-cmd record -p function -l exit'*' true trace-cmd report' %files %doc COPYING COPYING.LIB DCO README %_bindir/trace-cmd %_sysconfdir/bash_completion.d/trace-cmd.bash %_man1dir/*.1* %_man5dir/*.5* %files libs %exclude %_libdir/trace-cmd/python %_libdir/trace-cmd %_libdir/traceevent %_libdir/tracefs %files devel %_includedir/trace-cmd %_includedir/traceevent %_includedir/tracefs %files python3 %doc Documentation/README.PythonPlugin %_libdir/trace-cmd/python %files -n kernelshark %_bindir/kernelshark %_bindir/kshark-record %_bindir/kshark-su-record %_libdir/kernelshark %_datadir/applications/kernelshark.desktop %_datadir/icons/kernelshark %_datadir/polkit-1/actions/org.freedesktop.kshark-record.policy %changelog * Sun Dec 06 2020 Vitaly Chikunov <vt@altlinux.org> 2.9.1-alt5 - Enable pkexec (RM#24461) in a way complatible with old cmake (for p9). * Sat Dec 05 2020 Vitaly Chikunov <vt@altlinux.org> 2.9.1-alt4 - Allow connect from pkexec'd process (RM#24461). * Fri Dec 04 2020 Vitaly Chikunov <vt@altlinux.org> 2.9.1-alt3 - Enable pkexec (RM#24461). * Sun Sep 27 2020 Vitaly Chikunov <vt@altlinux.org> 2.9.1-alt2 - Build kernelshark, libs, devel, and python3 packages. * Thu Jul 23 2020 Vitaly Chikunov <vt@altlinux.org> 2.9.1-alt1 - Update to trace-cmd-v2.9.1 (2020-07-22). * Mon Jul 20 2020 Vitaly Chikunov <vt@altlinux.org> 2.9-alt1 - Import of trace-cmd-v2.9 (2020-07-17). - Add some testing into %%check section. * Sat Sep 07 2019 Vitaly Chikunov <vt@altlinux.org> 2.8.3-alt1 - First build of trace-cmd. (Experimental). |