Compare commits

...
Sign in to create a new pull request.

63 commits

Author SHA1 Message Date
Zamir SUN
2f913aa041 Bump to build and run new gating
Reolves: rhbz#2383087

Signed-off-by: Zamir SUN <sztsian@gmail.com>
2025-08-15 16:09:02 +08:00
Zamir SUN
dccdf6958c tests: Convert gating to TMT
Resolves: rhbz#2383087

Signed-off-by: Zamir SUN <sztsian@gmail.com>
2025-08-15 16:04:49 +08:00
Fedora Release Engineering
5d5457d190 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 19:29:26 +00:00
Fedora Release Engineering
b1ae37db50 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 13:12:14 +00:00
Zamir SUN
30c0df175e Update to 3.3.1 2024-10-17 12:58:11 +08:00
Fedora Release Engineering
80feb91619 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 07:47:05 +00:00
Yaakov Selkowitz
41fbce047d Rebuilt for Python 3.13 2024-06-23 13:10:24 -04:00
Yaakov Selkowitz
c7f15f7fa9 Drop unused mlocate dependency
mlocate has been retired and replaced by plocate for F41, but it does not
seem to be used at all.
2024-05-22 15:28:34 -04:00
Fedora Release Engineering
787ce0bc73 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 06:38:15 +00:00
Zamir SUN
6ed1c4cc95 Update to 3.2
Signed-off-by: Zamir SUN <sztsian@gmail.com>
2024-01-23 22:32:23 +08:00
Fedora Release Engineering
57d53f18fa Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 16:39:46 +00:00
Yaakov Selkowitz
9b1912ee9a Remove lingering kernelshark dependencies
These build dependencies were used solely for kernelshark, which has
since been split out into its own package.
2023-06-22 16:24:26 -04:00
Zamir SUN
78354bc3a4 SPDX migration
Signed-off-by: Zamir SUN <sztsian@gmail.com>
2023-06-05 21:51:59 +08:00
Zamir SUN
8fd51942fe Update to 3.1.6 2023-04-18 21:57:12 +08:00
Jerome Marchand
93cd9d216e Fix infinite loop in make
Build is stuck in an infinite loop with make 4.4. Fix it.

Also remove explicit library dependency to make fedpkg lint happy. Let
rpmbuild take care of dependencies.

Resolves: rhbz#2171770

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
2023-03-31 12:26:18 +02:00
Fedora Release Engineering
d9631ac81a Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 05:21:28 +00:00
Zamir SUN
095246ccdf Update to 3.1.4
Signed-off-by: Zamir SUN <sztsian@gmail.com>
2022-10-11 21:22:01 +08:00
Fedora Release Engineering
59a359a610 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 10:47:01 +00:00
Ziqian SUN(Zamir)
158bcbb1c7 Remove man type 3 from file lists
Signed-off-by: Ziqian SUN(Zamir) <zsun@redhat.com>
2022-04-15 18:19:44 +08:00
Ziqian SUN(Zamir)
33b7a99761 Remoe libtracecmd man pages from trace-cmd
Signed-off-by: Ziqian SUN(Zamir) <zsun@redhat.com>
2022-04-15 18:10:15 +08:00
Ziqian SUN(Zamir)
9a42b883ec Update to 3.0.3
Signed-off-by: Ziqian SUN(Zamir) <zsun@redhat.com>
2022-04-15 17:17:55 +08:00
root
14be4ebb0d Add flight recoder service
Flight recorder service, trace-cmd.service, provides a feature to
automatically start trace-cmd command at every system start-up and to
automatically reload trace-cmd command at every kernel module loading
to enable tracepoints provided by kernel modules.

Thanks to this feature, once system panic occurs, users retrieve
ftrace ring buffer from crash dump that is created by some crash dump
mechanism such as kdump and virsh dump using crash trace command [1]
and can perform failure analysis based on ftrace event logs.

Historically, this feature has been provided only in the RHEL7 and
RHEL8 versions of trace-cmd packages so far. However, with the
introduction of CentOS Stream, RHEL's development process changed and
now CentOS Stream is an upstream of RHEL and Fedora Linux is the
upstream of CentOS Stream [2], due to which, Red Hat now follows
upstream-first policy strictly and requires this feature be provided
in its upstream.

[1] https://src.fedoraproject.org/rpms/crash-trace-command
[2] https://www.redhat.com/en/topics/linux/what-is-centos-stream

Signed-off-by: KUDOH Takashi <t-kudoh@fujitsu.com>
Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
2022-03-24 15:31:34 +09:00
Zamir SUN
b489389cf9 Update to 2.9.7 and exclude i686 2022-02-18 10:33:23 +08:00
Fedora Release Engineering
f8b8a6ca89 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 03:00:03 +00:00
Fedora Release Engineering
930eae7a81 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 19:32:47 +00:00
Jerome Marchand
4e04f581a7 Remove rpath from trace-cmd 2021-04-23 15:40:32 +02:00
Zamir SUN
d67fa86091 Fix dependency libtracecmd
Resolves: RHBZ 1943919

Signed-off-by: Zamir SUN <sztsian@gmail.com>
2021-03-29 14:59:39 +08:00
Zamir SUN
a5e0e2020d Update to 2.9.2 and rename trace-cmd-libs to libtracecmd
Signed-off-by: Zamir SUN <sztsian@gmail.com>
2021-03-27 00:09:53 +08:00
Jerome Marchand
c71ae5efff Build trace-cmd with external libtraceevent and libtracefs 2021-03-24 19:05:36 +01:00
Fedora Release Engineering
4aadbf030a - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 22:13:05 +00:00
Tom Stellard
d9c050b07c Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-08 22:46:33 +00:00
Zamir SUN
afb202a066 Move all python related stuff to trace-cmd-python3
Signed-off-by: Zamir SUN <sztsian@gmail.com>
2020-12-02 14:48:39 +08:00
Zamir SUN
57b6456aa8 trace-cmd: Temporary move libtraceevent back to %{_libdir}/trace-cmd
Signed-off-by: Zamir SUN <sztsian@gmail.com>
2020-10-12 23:40:59 +08:00
Zamir SUN
3736ffb873 Remove kernelshark as it's a separate package
Signed-off-by: Zamir SUN <sztsian@gmail.com>
2020-09-29 20:25:32 +08:00
Zamir SUN
c8ecd99d26 Update to 2.9.1
Signed-off-by: Zamir SUN <sztsian@gmail.com>
2020-09-05 12:59:45 +08:00
Fedora Release Engineering
aab2fc40c0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 12:47:55 +00:00
Jeff Law
5405f65947 - TRACECMD_LIBRARY can reference things in TRACEEVENT_LIBRARY, so
link TRACEEVENT_LIBRARY after TRACECMD_LIBRARY.
2020-05-26 16:20:19 -06:00
Björn Esser
df0c0d57a6 Rebuild (json-c) 2020-04-22 00:14:32 +02:00
Zamir SUN
4d6b69d096 Fix version in changelog.
I don't think it worth a new build.

Signed-off-by: Zamir SUN <sztsian@gmail.com>
2020-02-09 12:36:01 +08:00
Zamir SUN
d8c1b05ee3 Update to 2.8.3 and workaround GCC10 multiple definition check
Signed-off-by: Zamir SUN <sztsian@gmail.com>
2020-02-08 22:19:01 +08:00
Fedora Release Engineering
040ba79130 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-31 01:57:57 +00:00
Miro Hrončok
7aedeec54e Rebuilt for Python 3.8 2019-08-19 11:07:12 +02:00
Zamir SUN
a831745389 Fix more python2 residuals.
Fixes 1738158
2019-08-07 23:04:38 +08:00
Zamir SUN
8b530dd0d5 Switch python2 plugin to python3
Signed-off-by: Zamir SUN <sztsian@gmail.com>
2019-08-03 13:41:42 +08:00
Fedora Release Engineering
904693ec7e - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-27 01:50:28 +00:00
Zamir SUN
68a5571134 Fix test case path to distingush with downstream
Signed-off-by: Zamir SUN <sztsian@gmail.com>
2019-03-04 15:21:14 +08:00
Zamir SUN
b42887569d Add test from https://upstreamfirst.fedorainfracloud.org/trace-cmd
Signed-off-by: Zamir SUN <sztsian@gmail.com>
2019-03-04 15:13:19 +08:00
Fedora Release Engineering
7bc04f19e2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-03 10:13:27 +00:00
Zamir SUN
d234639f1c Revert "Switch python plugin to build against python3"
Seems something wrong with swig. So temporary revert this patch.

This reverts commit 238fc9be9f.
2019-01-01 23:14:47 +08:00
Zamir SUN
238fc9be9f Switch python plugin to build against python3
Signed-off-by: Zamir SUN <sztsian@gmail.com>
2019-01-01 21:48:29 +08:00
Igor Gnatenko
d45c52d761 add BuildRequires: gcc
Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot
2018-07-18 11:23:39 +02:00
Fedora Release Engineering
60099b4f72 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-14 07:49:51 +00:00
Zamir SUN
a7a457b764 Add python plugin support
Signed-off-by: Zamir SUN <sztsian@gmail.com>
2018-03-02 23:28:59 +08:00
Zamir SUN
6f61bc0083 Update to 2.7
Signed-off-by: Zamir SUN <sztsian@gmail.com>
2018-03-02 22:40:45 +08:00
Florian Weimer
f331d32122 Use LDFLAGS from redhat-rpm-config 2018-02-23 16:46:18 +01:00
Fedora Release Engineering
6d5a5801e5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-09 19:22:25 +00:00
Zamir SUN
cb074fe339 Rebase to 2.6.2. 2017-11-11 10:45:05 +08:00
Fedora Release Engineering
8ba13d16b2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 09:34:10 +00:00
Fedora Release Engineering
07a41b896d - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-27 20:33:33 +00:00
Zamir SUN
3ab71153db Fix changelog date 2017-05-23 22:44:46 +08:00
Zamir SUN
994a06fb1b remove unused patch 2017-05-23 22:33:58 +08:00
Zamir SUN
dfd620c20f Rebase to 2.6.1. 2017-05-23 22:03:16 +08:00
Zamir SUN
1418c1b573 Rebase to newest upstream version to include various bug fixes. 2017-03-30 20:49:44 +08:00
15 changed files with 335 additions and 100 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

12
.gitignore vendored
View file

@ -2,3 +2,15 @@
/trace-cmd-2.1.0.tar.gz
/trace-cmd-2.2.1.tar.gz
/trace-cmd-2.6.tar.gz
/trace-cmd-2.6.1.tar.gz
/trace-cmd-v2.6.2.tar.gz
/trace-cmd-v2.7.tar.gz
/trace-cmd-v2.8.3.tar.gz
/trace-cmd-v2.9.1.tar.gz
/trace-cmd-v2.9.2.tar.gz
/trace-cmd-v2.9.7.tar.gz
/trace-cmd-v3.0.3.tar.gz
/trace-cmd-v3.1.4.tar.gz
/trace-cmd-v3.1.6.tar.gz
/trace-cmd-v3.2.tar.gz
/trace-cmd-v3.3.1.tar.gz

1
98-trace-cmd.rules Normal file
View file

@ -0,0 +1 @@
SUBSYSTEM=="module", ACTION=="add", PROGRAM="/usr/bin/systemctl is-active trace-cmd.service", PROGRAM="/usr/bin/systemctl reload trace-cmd.service"

View file

@ -1,13 +0,0 @@
diff --git a/trace-record.c b/trace-record.c
index a8d32d3..ab64418 100644
--- a/trace-record.c
+++ b/trace-record.c
@@ -3803,7 +3803,7 @@ void trace_record (int argc, char **argv)
const char *output = NULL;
const char *option;
struct event_list *event = NULL;
- struct event_list *last_event;
+ struct event_list *last_event = NULL;
struct buffer_instance *instance = &top_instance;
enum trace_type type = 0;
char *pids;

View file

@ -1,13 +0,0 @@
diff --git a/trace-snapshot.c b/trace-snapshot.c
index 9d3608c..f1036f6 100644
--- a/trace-snapshot.c
+++ b/trace-snapshot.c
@@ -42,7 +42,7 @@ static void write_file(const char *name, char *val)
n = write(fd, val, strlen(val));
if (n < 0)
- die("failed to write '%d' to %s\n", path);
+ die("failed to write to %s\n", path);
tracecmd_put_tracing_file(path);
close(fd);
}

View file

@ -1,7 +0,0 @@
[Desktop Entry]
Name=Kernelshark
Comment=Analyze data output by trace-cmd
Exec=kernelshark
Type=Application
Categories=Development;Profiling;
Icon=applications-development

View file

@ -1,2 +1 @@
19d5516fe013127e5f26c1aecf2eddd0 trace-cmd-2.2.1.tar.gz
fb5148dc8ba05b2d30a24d801ae92eeb trace-cmd-2.6.tar.gz
SHA512 (trace-cmd-v3.3.1.tar.gz) = a643efc2868d08871a7359dd0a17389685fb229f26328ee96f27a3dd94b5f3eb62009b945c14725eda1f09fa15367ffe2e2c3611d89860dcc031bbd6403cdee0

8
tests/plan.fmf Normal file
View file

@ -0,0 +1,8 @@
prepare:
how: install
package:
- trace-cmd
discover:
how: fmf
execute:
how: tmt

1
tests/sanity/PURPOSE Normal file
View file

@ -0,0 +1 @@
Basic sanity test for trace-cmd

58
tests/sanity/runtest.sh Executable file
View file

@ -0,0 +1,58 @@
#!/bin/bash
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Description: Basic sanity test for trace-cmd
# Author: Ziqian SUN (Zamir) <zsun@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc. All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include rhts environment
. /usr/bin/rhts-environment.sh
. /usr/share/beakerlib/beakerlib.sh
if ! mount | grep -q debugfs ; then
mount -t debugfs nodev /sys/kernel/debug
fi
trace-cmd reset
rlJournalStart
for TRACER in $(cat /sys/kernel/debug/tracing/available_tracers) ; do
rlPhaseStartTest "Enable ${TRACER} using trace-cmd"
rlRun "trace-cmd start -p ${TRACER}"
rlAssertEquals "Check current tracer" "$(cat /sys/kernel/debug/tracing/current_tracer)" "${TRACER}"
rlAssertEquals "Check tracing status" "$(cat /sys/kernel/debug/tracing/tracing_on)" "1"
rlRun "trace-cmd stop"
rlAssertEquals "Check tracing status" "$(cat /sys/kernel/debug/tracing/tracing_on)" "0"
rlRun "trace-cmd reset"
rlPhaseEnd
if [[ "${TRACER}" == "function" ]]; then
rlPhaseStartTest "Test trace-cmd show"
rlRun "trace-cmd start -p ${TRACER}"
rlWatchdog "trace-cmd show | grep -v '^#' > trace-cmd-show-function.log" 5 INT
rlAssertGreater "At least one line of trace data" $(cat trace-cmd-show-function.log | wc -l) 1
rlRun "trace-cmd stop"
rlRun "trace-cmd reset"
rlFileSubmit trace-cmd-show-function.log
rm -f trace-cmd-show-function.log
rlPhaseEnd
fi
done
rlJournalEnd

3
tests/sanity/sanity.fmf Normal file
View file

@ -0,0 +1,3 @@
test: bash ./runtest.sh
framework: beakerlib
duration: 15m

View file

@ -1,17 +0,0 @@
diff -up ./Makefile.orig ./Makefile
--- ./Makefile.orig 2016-08-18 00:26:57.580940826 -0400
+++ ./Makefile 2016-08-18 00:29:51.594273746 -0400
@@ -31,6 +31,13 @@ $(call allow-override,AR,$(CROSS_COMPILE
EXT = -std=gnu99
INSTALL = install
+# figure out what arch we are on and install to the right place
+ARCH = $(shell getconf LONG_BIT)
+LIBDIR_32 = lib
+LIBDIR_64 = lib64
+libdir=$(LIBDIR_$(ARCH))
+
+
# Use DESTDIR for installing into a different root directory.
# This is useful for building a package. The program will be
# installed in this directory as if it was the root directory.

4
trace-cmd.conf Normal file
View file

@ -0,0 +1,4 @@
# ftrace based flightrecorder configuration file.
# trace-cmd options
OPTS="-b 2048 -i -e block -e irq -e mce -e module -e power -e sched -e signal -e timer -e workqueue -e kvm -e net"

15
trace-cmd.service Normal file
View file

@ -0,0 +1,15 @@
[Unit]
Description=trace-cmd Flightrecorder
DefaultDependencies=no
Before=sysinit.target
[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/sysconfig/trace-cmd.conf
ExecStart=/usr/bin/trace-cmd start $OPTS
ExecStop=/usr/bin/trace-cmd reset
ExecReload=/usr/bin/trace-cmd start $OPTS
[Install]
WantedBy=multi-user.target

View file

@ -1,86 +1,269 @@
#%global checkout 20130723git07f0eee2
# git tag
%global git_commit trace-cmd-v2.6
#%%global git_commit trace-cmd-v2.6.2
#%%global git_commit 57371aaa2f469d0ba15fd85276deca7bfdd7ce36
%global srcversion 3.3.1
Name: trace-cmd
Version: 2.6
Version: %{srcversion}
Release: 4%{?dist}
License: GPLv2 and LGPLv2
License: LGPL-2.1-only AND LGPL-2.1-or-later AND GPL-2.0-only AND GPL-2.0-or-later
Summary: A user interface to Ftrace
Group: Development/Tools
URL: http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary
# Upstream does not provide tarballs.
# To generate:
# git clone git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
# cd trace-cmd
# git archive --prefix=trace-cmd-%%{version}/ -o trace-cmd-%%{version}.tar.gz %%{git_commit}
Source0: trace-cmd-%{version}.tar.gz
Source1: kernelshark.desktop
Patch1: trace-cmd-2.6-libdir.patch
Patch2: bz1386451-trace-cmd-record-crash-f-before-e.patch
Patch3: bz1389219-segmentation-fault-in-trace-snapshot.patch
ExcludeArch: %{ix86} %{arm}
URL: http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary
# If upstream does not provide tarballs, to generate:
# git clone https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git
# cd trace-cmd
# git archive --prefix=trace-cmd-%%{version}/ -o trace-cmd-v%%{version}.tar.gz %%{git_commit}
Source0: https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/trace-cmd-v%{srcversion}.tar.gz
Source1: trace-cmd.conf
Source2: trace-cmd.service
Source3: 98-trace-cmd.rules
BuildRequires: make
BuildRequires: gcc
BuildRequires: xmlto
BuildRequires: asciidoc
BuildRequires: mlocate
# needed for the GUI parts
BuildRequires: libxml2-devel
BuildRequires: gtk2-devel
BuildRequires: glib2-devel
BuildRequires: desktop-file-utils
BuildRequires: graphviz doxygen
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: libtraceevent-devel >= 1.8.0
BuildRequires: libtracefs-devel >= 1.8.0
BuildRequires: audit-libs-devel
BuildRequires: chrpath
BuildRequires: swig
BuildRequires: systemd-rpm-macros
BuildRequires: libtracecmd-devel
BuildRequires: libzstd-devel
%description
trace-cmd is a user interface to Ftrace. Instead of needing to use the
debugfs directly, trace-cmd will handle of setting of options and
tracers and will record into a data file.
%package -n kernelshark
Summary: GUI analysis for Ftrace data captured by trace-cmd
Group: Development/Tools
%package python3
Summary: Python plugin support for trace-cmd
Requires: trace-cmd%{_isa} = %{version}-%{release}
BuildRequires: python3-devel
%description -n kernelshark
Kernelshark is the GUI frontend for analyzing data produced by
'trace-cmd extract'
%description python3
Python plugin support for trace-cmd
%prep
%setup -q -n %{name}-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%autosetup -n %{name}-v%{srcversion}
cp %{SOURCE1} .
cp %{SOURCE2} .
cp %{SOURCE3} .
%build
# MANPAGE_DOCBOOK_XSL define is hack to avoid using locate
MANPAGE_DOCBOOK_XSL=`rpm -ql docbook-style-xsl | grep manpages/docbook.xsl`
make V=1 CFLAGS="%{optflags} -D_GNU_SOURCE" MANPAGE_DOCBOOK_XSL=$MANPAGE_DOCBOOK_XSL prefix=%{_prefix} all doc gui
CFLAGS="%{optflags} -D_GNU_SOURCE" LDFLAGS="%{build_ldflags}" BUILD_TYPE=Release \
make V=9999999999 MANPAGE_DOCBOOK_XSL=$MANPAGE_DOCBOOK_XSL \
prefix=%{_prefix} libdir=%{_libdir} \
PYTHON_VERS=python3 all_cmd doc
for i in python/*.py ; do
sed -i 's/env python2/python3/g' $i
done
chrpath --delete tracecmd/trace-cmd
%install
make V=1 DESTDIR=%{buildroot} prefix=%{_prefix} install install_doc 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 install_doc install_python
find %{buildroot}%{_mandir} -type f | xargs chmod u-x,g-x,o-x
find %{buildroot}%{_datadir} -type f | xargs chmod u-x,g-x,o-x
find %{buildroot}%{_libdir} -type f -iname "*.so" | xargs chmod 0755
install -dm 755 %{buildroot}/%{_datadir}/applications
install -pm 644 %{SOURCE1} %{buildroot}/%{_datadir}/applications/kernelshark.desktop
desktop-file-validate %{buildroot}/%{_datadir}/applications/kernelshark.desktop
mkdir -p -m755 %{buildroot}/%{_sysconfdir}/sysconfig/
mkdir -p -m755 %{buildroot}/%{_unitdir}/
mkdir -p -m755 %{buildroot}/%{_udevrulesdir}/
install -p -m 644 trace-cmd.conf %{buildroot}/%{_sysconfdir}/sysconfig/
install -p -m 644 trace-cmd.service %{buildroot}/%{_unitdir}/
install -p -m 644 98-trace-cmd.rules %{buildroot}/%{_udevrulesdir}/
rm -rf %{buildroot}/%{_docdir}/libtracecmd-doc
rm -rf %{buildroot}/%{_mandir}/man3/*
%preun
%systemd_preun %{name}.service
%files
%doc COPYING COPYING.LIB README
%{_bindir}/trace-cmd
%{_libdir}/%{name}
%{_mandir}/man1/*
%{_mandir}/man5/*
%files -n kernelshark
%{_bindir}/trace-view
%{_bindir}/trace-graph
%{_bindir}/kernelshark
%{_datadir}/kernelshark
%{_datadir}/applications/kernelshark.desktop
%{_mandir}/man1/%{name}*
%{_mandir}/man5/%{name}*
%{_docdir}/trace-cmd/trace-cmd*.html
%{_sysconfdir}/bash_completion.d/trace-cmd.bash
%{_sysconfdir}/sysconfig/trace-cmd.conf
%{_unitdir}/trace-cmd.service
%{_udevrulesdir}/98-trace-cmd.rules
%files python3
%doc Documentation/README.PythonPlugin
%{_libdir}/%{name}/python/
%changelog
* Fri Aug 15 2025 Zamir SUN <sztsian@gmail.com> - 3.3.1-4
- Bump to build and run new gating
- Reolves: rhbz#2383087
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Thu Oct 17 2024 Zamir SUN <sztsian@gmail.com> - 3.3.1-1
- Update to 3.3
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sun Jun 23 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 3.2-3
- Rebuilt for Python 3.13
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Jan 23 2024 Zamir SUN <sztsian@gmail.com> - 3.2
- Update to 3.2 (#2213350)
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jun 22 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 3.1.6-3
- Remove lingering kernelshark dependencies
* Mon Jun 05 2023 Zamir SUN <sztsian@gmail.com> - 3.1.6-2
- SPDX migration
* Tue Apr 18 2023 Zamir SUN <sztsian@gmail.com> - 3.1.6-1
- Update to 3.1.6
* Fri Mar 31 2023 Jerome Marchand <jmarchan@redhat.com> - 3.1.4-3
- Fix build: RHBZ#2171770
- Also remove explicit lib dependency that fedpkg lint complains about.
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Oct 11 2022 Zamir SUN <sztsian@gmail.com> - 3.1.4-1
- Update to 3.1.4
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Apr 15 2022 Zamir SUN <sztsian@gmail.com> - 3.0.3-2
- Get rid of the libtracecmd man pages
* Wed Apr 13 2022 Zamir SUN <sztsian@gmail.com> - 3.0.3-1
- Update to 3.0.3
* Fri Mar 18 2022 KUDOH Takashi <t-kudoh@fujitsu.com> - 2.9.7-2
- Add flight recoder service
* Wed Feb 16 2022 Zamir SUN <sztsian@gmail.com> - 2.9.7-1
- Update to 2.9.7
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Apr 23 2021 Jerome Marchand <jmarchan@redhat.com> - 2.9.2-3
- Build w/o rpath as per Fedora packaging guideline
* Mon Mar 29 2021 Zamir SUN <sztsian@gmail.com> - 2.9.2-2
- Fix dependency of libtracecmd
- Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1943919
* Fri Mar 26 2021 Zamir SUN <sztsian@gmail.com> - 2.9.2-1
- Update to 2.9.2
* Wed Mar 24 2021 Jerome Marchand <jmarchan@redhat.com> - 2.9.1-6
- Build with external libtraceevent and libtracefs
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Dec 02 2020 Zamir SUN <sztsian@gmail.com> - 2.9.1-4
- Move %{_libdir}/trace-cmd/python/ to trace-cmd-python3
* Mon Oct 12 2020 Zamir SUN <sztsian@gmail.com> - 2.9.1-3
- Temporary move libtraceevent back to trace-cmd/plugins to mitigate the conflicts
* Tue Sep 29 2020 Zamir SUN <sztsian@gmail.com> - 2.9.1-2
- Remove kernelsharl as it's now separate package
* Fri Aug 07 2020 Zamir SUN <sztsian@gmail.com> - 2.9.1-1
- Update to 2.9.1
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 26 2020 Jeff Law <law@redhat.com> - 2.8.3-3
- TRACECMD_LIBRARY can reference things in TRACEEVENT_LIBRARY, so
link TRACEEVENT_LIBRARY after TRACECMD_LIBRARY.
* Tue Apr 21 2020 Björn Esser <besser82@fedoraproject.org> - 2.8.3-2
- Rebuild (json-c)
* Sat Feb 08 2020 Zamir SUN <sztsian@gmail.com> - 2.8.3-1
- Update to 2.8
- Add workaround to resolve gcc 10 multiple definition of `common_type_field' problem
- Resolves 1794296
- Resolves 1727368
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.7-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7-8
- Rebuilt for Python 3.8
* Wed Aug 07 2019 Zamir SUN <sztsian@gmail.com> - 2.7-7
- Fix more python2 residuals.
- Fixes 1738158
* Sat Aug 03 2019 Zamir SUN <sztsian@gmail.com> - 2.7-6
- Switch the python plugin to python3
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Mar 02 2018 Zamir SUN <sztsian@gmail.com> - 2.7-2
- Add python plugins
* Fri Mar 02 2018 Zamir SUN <sztsian@gmail.com> - 2.7-1
- Update to 2.7
- Remove Groups tag
* Fri Feb 23 2018 Florian Weimer <fweimer@redhat.com> - 2.6.2-3
- Use LDFLAGS from redhat-rpm-config
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Nov 11 2017 Zamir SUN <zsun@fedoraproject.org> - 2.6.2-1
- Rebase to 2.6.2.
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue May 23 2017 Zamir SUN <zsun@fedoraproject.org> - 2.6.1-1
- Rebase to 2.6.1.
* Thu Mar 30 2017 Zamir SUN <zsun@fedoraproject.org> - 2.6-4.20170330git013205
- Rebase to newest upstream version to include various bug fixes.
* Mon Mar 27 2017 Zamir SUN <zsun@fedoraproject.org> - 2.6-4
- Fix bz1389219 segmentation fault in trace-cmd snapshot