trace-cmd/trace-cmd.spec

154 lines
5.0 KiB
RPMSpec
Raw Permalink Normal View History

2020-10-29 19:30:03 +08:00
Name: trace-cmd
Version: 3.2
Release: 2
2020-10-29 19:30:03 +08:00
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
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
2019-12-14 21:40:24 +08:00
%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
2019-12-14 21:40:24 +08:00
%prep
%autosetup -n %{name}-v%{version} -p1
cp %{SOURCE1} .
cp %{SOURCE2} .
cp %{SOURCE3} .
2019-12-14 21:40:24 +08:00
%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
2019-12-14 21:40:24 +08:00
%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/*
2019-12-14 21:40:24 +08:00
%preun
%systemd_preun %{name}.service
2019-12-14 21:40:24 +08:00
%files
%doc COPYING COPYING.LIB README
2019-12-14 21:40:24 +08:00
%{_bindir}/trace-cmd
%{_mandir}/man1/%{name}*
%{_mandir}/man5/%{name}*
%{_docdir}/trace-cmd/trace-cmd*.html
2019-12-14 21:40:24 +08:00
%{_sysconfdir}/bash_completion.d/trace-cmd.bash
%{_sysconfdir}/sysconfig/trace-cmd.conf
%{_unitdir}/trace-cmd.service
%{_udevrulesdir}/98-trace-cmd.rules
2019-12-14 21:40:24 +08:00
%files help
%{_mandir}/man1/*
%{_mandir}/man5/*
%files python3
%doc Documentation/README.PythonPlugin
%{_libdir}/%{name}/python/
2019-12-14 21:40:24 +08:00
%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
* Tue Dec 06 2022 yaoxin <yaoxin30@h-partners.com> - 2.9.2-3
- Add /sbin/ldconfig to post and postun
2022-07-30 17:54:23 +08:00
* Sat Jul 30 2022 caodongxia <caodongxia@h-hpartners.com> - 2.9.2-2
- Del rpath in some binaries.
* Tue Jan 18 2022 houyingchao <houyingchao@huawei.com> - 2.9.2-1
- Upgrade to 2.9.2 version
* Fri Jul 30 2021 Guoxiaoqi <guoxiaoqi2@huawei.com> - 2.7-6
2021-07-30 14:48:22 +08:00
- Fix build with gcc-10
2020-10-29 19:30:03 +08:00
* Wed Oct 28 2020 Anan Fu <fuanan3@huawei.com> - 2.7-5
- disable python2
2019-12-14 21:40:24 +08:00
* Wed Nov 20 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.7-4
- Package init