Compare commits
No commits in common. "f86e6442a145b88d48cc4e3dc24cf7e68b654bdf" and "9990706047b7736d52be8c08e5e7e5cfb10ee92f" have entirely different histories.
f86e6442a1
...
9990706047
@ -1,28 +0,0 @@
|
||||
From 2ba15130fae66e19d4d75ab28ef448b0206235c4 Mon Sep 17 00:00:00 2001
|
||||
From: Yaakov Selkowitz <yselkowi@redhat.com>
|
||||
Date: Sun, 23 Jun 2024 13:04:28 -0400
|
||||
Subject: [PATCH] trace-cmd library: fix compatibility with Python 3.13
|
||||
|
||||
PyEval_CallObject was deprecated in Python 3.9 and removed from 3.13.
|
||||
|
||||
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
|
||||
---
|
||||
python/ctracecmd.i | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/python/ctracecmd.i b/python/ctracecmd.i
|
||||
index 6d0179e3..8757cbe4 100644
|
||||
--- a/python/ctracecmd.i
|
||||
+++ b/python/ctracecmd.i
|
||||
@@ -214,7 +214,7 @@ static int python_callback(struct trace_seq *s,
|
||||
SWIG_NewPointerObj(SWIG_as_voidptr(event),
|
||||
SWIGTYPE_p_tep_event, 0));
|
||||
|
||||
- result = PyEval_CallObject(context, arglist);
|
||||
+ result = PyObject_CallObject(context, arglist);
|
||||
Py_XDECREF(arglist);
|
||||
if (result && result != Py_None) {
|
||||
if (!PyInt_Check(result)) {
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@ -1 +0,0 @@
|
||||
SUBSYSTEM=="module", ACTION=="add", PROGRAM="/usr/bin/systemctl is-active trace-cmd.service", PROGRAM="/usr/bin/systemctl reload trace-cmd.service"
|
||||
41
backport-trace-cmd-report-Fix-typos-in-error-messages.patch
Normal file
41
backport-trace-cmd-report-Fix-typos-in-error-messages.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From 9fd5f8ecd0bb98b6fdcfe75118b535f613226b9f Mon Sep 17 00:00:00 2001
|
||||
From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
|
||||
Date: Tue, 14 Sep 2021 16:12:13 +0300
|
||||
Subject: [PATCH] trace-cmd report: Fix typos in error messages
|
||||
|
||||
Fixed typos in "trace-cmd report" messages that report reading and
|
||||
parsing errors.
|
||||
|
||||
Link: https://lore.kernel.org/linux-trace-devel/20210914131232.3964615-3-tz.stoyanov@gmail.com
|
||||
|
||||
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
|
||||
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
||||
---
|
||||
tracecmd/trace-read.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tracecmd/trace-read.c b/tracecmd/trace-read.c
|
||||
index 6f43c1d2..31724b09 100644
|
||||
--- a/tracecmd/trace-read.c
|
||||
+++ b/tracecmd/trace-read.c
|
||||
@@ -1290,7 +1290,7 @@ static void read_data_info(struct list_head *handle_list, enum output_type otype
|
||||
die("error in reading buffer instance");
|
||||
new_handle = tracecmd_buffer_instance_handle(handles->handle, i);
|
||||
if (!new_handle) {
|
||||
- warning("could not retreive handle %s", name);
|
||||
+ warning("could not retrieve handle %s", name);
|
||||
continue;
|
||||
}
|
||||
add_handle(new_handle, name);
|
||||
@@ -1324,7 +1324,7 @@ static void read_data_info(struct list_head *handle_list, enum output_type otype
|
||||
if (last_record) {
|
||||
int cpu = last_record->cpu;
|
||||
if (cpu >= last_handle->cpus)
|
||||
- die("cpu %d creater than %d\n", cpu, last_handle->cpus);
|
||||
+ die("cpu %d greater than %d\n", cpu, last_handle->cpus);
|
||||
if (tscheck &&
|
||||
last_handle->last_timestamp[cpu] > last_record->ts) {
|
||||
errno = 0;
|
||||
--
|
||||
2.33.0
|
||||
|
||||
BIN
trace-cmd-v2.9.2.tar.gz
Normal file
BIN
trace-cmd-v2.9.2.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
@ -1,4 +0,0 @@
|
||||
# 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"
|
||||
@ -1,15 +0,0 @@
|
||||
[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
|
||||
142
trace-cmd.spec
142
trace-cmd.spec
@ -1,136 +1,72 @@
|
||||
Name: trace-cmd
|
||||
Version: 3.2
|
||||
Release: 2
|
||||
Version: 2.9.2
|
||||
Release: 4
|
||||
Summary: A front-end for Ftrace
|
||||
License: GPLv2 and LGPLv2
|
||||
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%{version}.tar.gz
|
||||
Source1: trace-cmd.conf
|
||||
Source2: trace-cmd.service
|
||||
Source3: 98-trace-cmd.rules
|
||||
Patch0: 0001-python313.patch
|
||||
Source0: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git/snapshot/%{name}-v%{version}.tar.gz
|
||||
Source1: kernelshark.desktop
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc
|
||||
BuildRequires: xmlto
|
||||
BuildRequires: asciidoc
|
||||
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: libtracecmd-devel
|
||||
BuildRequires: libzstd-devel
|
||||
BuildRequires: python3-devel
|
||||
Requires: libtraceevent
|
||||
Patch0001: backport-trace-cmd-report-Fix-typos-in-error-messages.patch
|
||||
|
||||
BuildRequires: gcc xmlto asciidoc mlocate libxml2-devel chrpath
|
||||
BuildRequires: gtk2-devel glib2-devel desktop-file-utils libtraceevent-devel
|
||||
Provides: kernelshark
|
||||
Obsoletes: kernelshark
|
||||
%description
|
||||
This package is a user-space front-end command-line tool for Ftrace.
|
||||
|
||||
%package_help
|
||||
|
||||
%package python3
|
||||
Summary: Python plugin support for trace-cmd
|
||||
Requires: trace-cmd = %{version}-%{release}
|
||||
|
||||
%description python3
|
||||
Python plugin support for trace-cmd
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-v%{version} -p1
|
||||
cp %{SOURCE1} .
|
||||
cp %{SOURCE2} .
|
||||
cp %{SOURCE3} .
|
||||
|
||||
%build
|
||||
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
|
||||
for i in python/*.py ; do
|
||||
sed -i 's/env python2/python3/g' $i
|
||||
done
|
||||
chrpath --delete tracecmd/trace-cmd
|
||||
make V=1 MANPAGE_DOCBOOK_XSL=$MANPAGE_DOCBOOK_XSL prefix=%{_prefix} all doc
|
||||
|
||||
%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
|
||||
mkdir -p %{buildroot}/%{_libdir}/trace-cmd/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
|
||||
mkdir -p %{buildroot}/%{_libdir}
|
||||
find %{buildroot}%{_libdir} -type f -name "*.so" -print0 | xargs -0 -r chmod 0755
|
||||
chmod -R 0755 %{buildroot}/%{_libdir}/trace-cmd/python
|
||||
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/*
|
||||
make V=1 DESTDIR=$RPM_BUILD_ROOT/ prefix=%{_prefix} install install_doc
|
||||
find $RPM_BUILD_ROOT%{_mandir} -type f | xargs chmod u-x,g-x,o-x
|
||||
find $RPM_BUILD_ROOT%{_datadir} -type f | xargs chmod u-x,g-x,o-x
|
||||
install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/applications
|
||||
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_datadir}/applications/kernelshark.desktop
|
||||
desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/kernelshark.desktop
|
||||
|
||||
chrpath -d $RPM_BUILD_ROOT%{_bindir}/trace-cmd
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
|
||||
echo "%{_bindir}/%{name}" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||
|
||||
%pre
|
||||
|
||||
%preun
|
||||
%systemd_preun %{name}.service
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
|
||||
%files
|
||||
%doc COPYING COPYING.LIB README
|
||||
%defattr(-,root,root)
|
||||
%license COPYING COPYING.LIB
|
||||
%doc README
|
||||
%{_bindir}/trace-cmd
|
||||
%{_mandir}/man1/%{name}*
|
||||
%{_mandir}/man5/%{name}*
|
||||
%{_docdir}/trace-cmd/trace-cmd*.html
|
||||
%{_datadir}/applications/kernelshark.desktop
|
||||
%{_sysconfdir}/bash_completion.d/trace-cmd.bash
|
||||
%{_sysconfdir}/sysconfig/trace-cmd.conf
|
||||
%{_unitdir}/trace-cmd.service
|
||||
%{_udevrulesdir}/98-trace-cmd.rules
|
||||
%{_docdir}/libtracecmd-doc/libtracecmd-files.html
|
||||
%{_docdir}/libtracecmd-doc/libtracecmd-instances.html
|
||||
%{_docdir}/libtracecmd-doc/libtracecmd-peer.html
|
||||
%{_docdir}/libtracecmd-doc/libtracecmd-record.html
|
||||
%{_docdir}/libtracecmd-doc/libtracecmd.html
|
||||
%config(noreplace) /etc/ld.so.conf.d/*
|
||||
|
||||
%files help
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man3/*
|
||||
%{_mandir}/man5/*
|
||||
|
||||
%files python3
|
||||
%doc Documentation/README.PythonPlugin
|
||||
%{_libdir}/%{name}/python/
|
||||
|
||||
%changelog
|
||||
* Fri Nov 08 2024 wangkai <13474090681@163.com> - 3.2-2
|
||||
- Fix uninstall trace-cmd error and service start fail
|
||||
|
||||
* Tue Oct 22 2024 shafeipaozi <sunbo.oerv@isrc.iscas.ac.cn> - 3.2-1
|
||||
- update to 3.2
|
||||
|
||||
* Tue Dec 26 2023 meiyang666 <wangmeiyang@xfusion.com> - 2.9.2-12
|
||||
- Fix spec file
|
||||
|
||||
* Tue Dec 26 2023 meiyang666 <wangmeiyang@xfusion.com> - 2.9.2-11
|
||||
- trace-cmd record: Set sleep_time to zero at end of recording
|
||||
|
||||
* Tue Dec 26 2023 meiyang666 <wangmeiyang@xfusion.com> - 2.9.2-10
|
||||
- trace-cmd stream: Set default sleep time to half a second
|
||||
|
||||
* Mon Jan 09 2023 Bolehu <heyaohua@xfusion.com> - 2.9.2-9
|
||||
- Fix broken profile command
|
||||
|
||||
* Sat Jan 07 2023 Bolehu <heyaohua@xfusion.com> - 2.9.2-8
|
||||
- Changing default install path of plugins
|
||||
|
||||
* Sat Jan 07 2023 Bolehu <heyaohua@xfusion.com> - 2.9.2-7
|
||||
- Remove unneeded multiply in events timestamp reading
|
||||
|
||||
* Fri Jan 06 2023 Bolehu <heyaohua@xfusion.com> - 2.9.2-6
|
||||
- trace-cmd library: Fixed a memory leak on input handler close
|
||||
|
||||
* Fri Jan 06 2023 Bolehu <heyaohua@xfusion.com> - 2.9.2-5
|
||||
- trace-cmd library: Fix version string memory leak
|
||||
|
||||
* Fri Jan 06 2023 Bolehu <heyaohua@xfusion.com> - 2.9.2-4
|
||||
- trace-cmd report: Fix typos in error messages
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user