tuna/tuna.spec

114 lines
4.1 KiB
RPMSpec
Raw Permalink Normal View History

2020-03-06 18:41:03 +08:00
Name: tuna
2023-10-23 16:46:07 +08:00
Version: 0.19
Release: 3
2020-03-06 18:41:03 +08:00
Summary: Application tuning GUI & command line utility
License: GPLv2
URL: https://rt.wiki.kernel.org/index.php/Tuna
Source: https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.xz
2023-10-23 16:46:07 +08:00
2020-03-06 18:41:03 +08:00
BuildArch: noarch
2020-09-11 19:56:31 +08:00
BuildRequires: python3-devel gettext
Requires: python3-ethtool python3-gobject-base python3-linux-procfs >= 0.6 python3-schedutils >= 0.6
2020-03-06 18:41:03 +08:00
%description
Provides interface to change the scheduler and IRQ tunables across the CPU
and below per thread/IRQ level. Allows the CPU to be isolated for specific
applications and drag and drop threads and interrupts to the CPU.
You can complete the operation on the CPU socket to understand the CPU topology.
Can be used as a command line utility without installing a GUI library.
%package -n oscilloscope
Summary: Generic graphical signal plotting tool
2020-09-11 19:56:31 +08:00
Requires: python3-matplotlib-gtk3 python3-numpy python3-cairocffi
Requires: gobject-introspection
2020-03-06 18:41:03 +08:00
Requires: tuna = %{version}-%{release}
%description -n oscilloscope
Plot stream of values read from standard input on the screen,
along with statistics and histograms.
Allows instant viewing of how signal generators (e.g. loop tests,
signaltests or even pings) react when using tuna or regular
chrt & taskket to change their scheduling strategy or real-time priorities.
%package help
Summary: doc for %{name}
%description help
Man manual document for tuna
%prep
%autosetup -p1 -n %{name}-%{version}
%build
2020-09-11 19:56:31 +08:00
%py3_build
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" tuna/
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" tuna-cmd.py
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" oscilloscope-cmd.py
2020-03-06 18:41:03 +08:00
%install
2020-09-11 19:56:31 +08:00
rm -rf %{buildroot}
%py3_install
mkdir -p %{buildroot}/%{_sysconfdir}/tuna/
mkdir -p %{buildroot}/{%{_bindir},%{_datadir}/tuna/help/kthreads,%{_mandir}/man8}
mkdir -p %{buildroot}/%{_datadir}/polkit-1/actions/
2020-03-06 18:41:03 +08:00
install -p -m644 tuna/tuna_gui.glade %{buildroot}/%{_datadir}/tuna/
install -p -m755 tuna-cmd.py %{buildroot}/%{_bindir}/tuna
install -p -m755 oscilloscope-cmd.py %{buildroot}/%{_bindir}/oscilloscope
install -p -m644 help/kthreads/* %{buildroot}/%{_datadir}/tuna/help/kthreads/
2020-09-11 19:56:31 +08:00
install -p -m644 docs/tuna.8 %{buildroot}/%{_mandir}/man8/
#kernel version >= 5.13 Move SCHED_DEBUG sysctl to debugfs
#https://github.com/torvalds/linux/commit/8a99b6833c884fa0e7919030d93fecedc69fc625
sed -i '/kernel.sched_latency_ns/d' etc/tuna/example.conf
sed -i '/kernel.sched_min_granularity_ns/d' etc/tuna/example.conf
sed -i '/kernel.sched_nr_migrate/d' etc/tuna/example.conf
sed -i '/kernel.sched_tunable_scaling/d' etc/tuna/example.conf
sed -i '/kernel.sched_wakeup_granularity_ns/d' etc/tuna/example.conf
sed -i '/kernel.sched_migration_cost_ns/d' etc/tuna/example.conf
2020-09-11 19:56:31 +08:00
install -p -m644 etc/tuna/example.conf %{buildroot}/%{_sysconfdir}/tuna/
install -p -m644 etc/tuna.conf %{buildroot}/%{_sysconfdir}/
install -p -m644 org.tuna.policy %{buildroot}/%{_datadir}/polkit-1/actions/
2020-03-06 18:41:03 +08:00
for lng in `cat po/LINGUAS`; do
po=po/"$lng.po"
install -d %{buildroot}/%{_datadir}/locale/${lng}/LC_MESSAGES
msgfmt $po -o %{buildroot}/%{_datadir}/locale/${lng}/LC_MESSAGES/%{name}.mo
done
%find_lang tuna
%files -f tuna.lang
%defattr(-,root,root,-)
2020-09-11 19:56:31 +08:00
%{python3_sitelib}/*.egg-info
2020-03-06 18:41:03 +08:00
%{_bindir}/tuna
%{_datadir}/tuna/
2020-09-11 19:56:31 +08:00
%{python3_sitelib}/tuna/
2020-03-06 18:41:03 +08:00
%{_sysconfdir}/{tuna.conf,tuna/*}
%{_datadir}/polkit-1/actions/org.tuna.policy
%files -n oscilloscope
%defattr(-,root,root,-)
%{_bindir}/oscilloscope
%doc docs/{oscilloscope+tuna.html,oscilloscope+tuna.pdf}
%files help
%{_mandir}/man8/tuna.8*
%doc ChangeLog
%changelog
* Thu Mar 27 2025 zhangjinqiang <jinqiang.oerv@isrc.iscas.ac.cn> - 0.19-3
- Requires add python3-gobject-base
* Tue Jan 14 2025 xu_ping <707078654@qq.com> - 0.19-2
- fix tuna apply example.conf failed due to kernel version >=5.13
2023-10-23 16:46:07 +08:00
* Mon Oct 16 2023 chenyaqiang <chenyaqiang@huawei.com> - 0.19-1
- Upgrade to 0.19
2020-09-11 19:56:31 +08:00
* Fri Sep 11 2020 maminjie <maminjie1@huawei.com> - 0.14.1-1
- Upgrade to 0.14.1
2020-03-06 18:41:03 +08:00
* Thu Mar 5 2020 dingyiming <dingyiming3@huawei.com> - 0.13.1-7
- Package init