fix tuna apply example.conf failed due to kernel version >=5.13

Signed-off-by: cherry530 <707078654@qq.com>
(cherry picked from commit aada4d7b68092ea3d8ad713fae756806dec37c0a)
This commit is contained in:
cherry530 2025-01-14 15:32:48 +08:00 committed by openeuler-sync-bot
parent 000cb38639
commit 7d5651d82e

View File

@ -1,6 +1,6 @@
Name: tuna
Version: 0.19
Release: 1
Release: 2
Summary: Application tuning GUI & command line utility
License: GPLv2
URL: https://rt.wiki.kernel.org/index.php/Tuna
@ -57,6 +57,15 @@ 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/
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
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/
@ -88,6 +97,9 @@ done
%doc ChangeLog
%changelog
* Tue Jan 14 2025 xu_ping <707078654@qq.com> - 0.19-2
- fix tuna apply example.conf failed due to kernel version >=5.13
* Mon Oct 16 2023 chenyaqiang <chenyaqiang@huawei.com> - 0.19-1
- Upgrade to 0.19