Compare commits

..

26 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
13 changed files with 148 additions and 169 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

6
.gitignore vendored
View file

@ -8,3 +8,9 @@
/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,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 +1 @@
SHA512 (trace-cmd-v2.9.2.tar.gz) = ddb32446a5185ee6414f297de1d48fe39a7141c833a608fd3977dd0efd496bf18b59ea5d064316e7deb86c1cd82f33dcea4c0c145bb31b2473e85593f4d0d461
SHA512 (trace-cmd-v3.3.1.tar.gz) = a643efc2868d08871a7359dd0a17389685fb229f26328ee96f27a3dd94b5f3eb62009b945c14725eda1f09fa15367ffe2e2c3611d89860dcc031bbd6403cdee0

View file

@ -1,44 +0,0 @@
About
Trace-cmd tests according to the CI wiki specifically the standard test interface in the [spec](https://fedoraproject.org/wiki/Changes/InvokingTests).
The playbook includes Tier1 level test cases that have been tested in classic contexts and is passing reliably.
The following steps are used to execute the tests using the standard test interface:
Test environment
Make sure you have installed packages from the spec
`# dnf install ansible python2-dnf libselinux-python standard-test-roles ansible python2-dnf libselinux-python standard-test-roles`
Run tests for Classic
~~~~
# export TEST_SUBJECTS=
# sudo ansible-playbook --tags=classic tests.yml
~~~~
Snip of the example test run for Classic tests:
> TASK [standard-test-beakerlib : Run beakerlib tests] *****************************************************************************************************************************************
>
> changed: [localhost] => (item=sanity)
>
> TASK [standard-test-beakerlib : Make the master tests summary log artifact] ******************************************************************************************************************
>
> changed: [localhost] => (item=sanity)
>
> TASK [standard-test-beakerlib : Check the results] *******************************************************************************************************************************************
>
> changed: [localhost]
>
> TASK [standard-test-beakerlib : include_role] ************************************************************************************************************************************************
>
> TASK [str-common : Pull out the logs from test environment to test runner] *******************************************************************************************************************
>
> changed: [localhost]
>
> PLAY RECAP ***********************************************************************************************************************************************************************************
>
> localhost : ok=27 changed=16 unreachable=0 failed=0
>

8
tests/plan.fmf Normal file
View file

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

View file

@ -1,59 +0,0 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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/>.
#
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export PACKAGE_NAME=trace-cmd
export TEST=/kernel/general/ftrace/tools/trace-cmd/upstream
export TESTVERSION=0.1
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build:
chmod a+x runtest.sh
clean:
rm -fr *~ tests-*.rpm
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Ziqian SUN (Zamir) <zsun@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Basic sanity test for trace-cmd" >> $(METADATA)
@echo "TestTime: 30m" >> $(METADATA)
@echo "RunFor: trace-cmd" >> $(METADATA)
@echo "Requires: @development" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv3" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
rhts-lint $(METADATA)

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

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

View file

@ -1,11 +0,0 @@
- hosts: localhost
tags:
- classic
roles:
- role: standard-test-beakerlib
tests:
- sanity
required_packages:
- kernel
- trace-cmd

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

@ -2,16 +2,15 @@
#%%global git_commit trace-cmd-v2.6.2
#%%global git_commit 57371aaa2f469d0ba15fd85276deca7bfdd7ce36
%global srcversion 2.9.2
%global srcversion 3.3.1
Name: trace-cmd
Version: %{srcversion}
Release: 2%{?dist}
License: GPLv2 and LGPLv2
Release: 4%{?dist}
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
Requires: libtracecmd
Requires: libtracefs
Requires: libtraceevent
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:
@ -19,20 +18,25 @@ URL: http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary
# 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
BuildRequires: graphviz doxygen
BuildRequires: libxml2-devel
BuildRequires: gcc-c++
BuildRequires: desktop-file-utils
BuildRequires: cmake
BuildRequires: qt5-qtbase-devel
BuildRequires: freeglut-devel
BuildRequires: json-c-devel
BuildRequires: libtraceevent-devel
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
@ -42,75 +46,133 @@ tracers and will record into a data file.
%package python3
Summary: Python plugin support for trace-cmd
Requires: trace-cmd%{_isa} = %{version}-%{release}
BuildRequires: swig
BuildRequires: python3-devel
%description python3
Python plugin support for trace-cmd
%package -n libtracecmd
Summary: Libraries of trace-cmd
Version: 0
%description -n libtracecmd
The libtracecmd library
%package -n libtracecmd-devel
Summary: Development files for libtracecmd
Version: 0
Requires: libtracecmd%{_isa} = %{version}-%{release}
%description -n libtracecmd-devel
Development files of the libtracecmd library
%prep
%autosetup -n %{name}-v%{srcversion}
cp %{SOURCE1} .
cp %{SOURCE2} .
cp %{SOURCE3} .
%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
MANPAGE_DOCBOOK_XSL=`rpm -ql docbook-style-xsl | grep manpages/docbook.xsl`
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 libtracecmd.so
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 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 install_libs
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
mkdir -p %{buildroot}/%{_sysconfdir}
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
%{_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/
%files -n libtracecmd
%doc COPYING COPYING.LIB README
%{_libdir}/libtracecmd.so.0
%{_libdir}/libtracecmd.so.0.0.1
%{_docdir}/libtracecmd-doc
%{_mandir}/man3/libtracecmd*
%{_mandir}/man3/tracecmd*
%files -n libtracecmd-devel
%{_libdir}/pkgconfig/libtracecmd.pc
%{_libdir}/libtracecmd.so
%{_includedir}/trace-cmd
%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