Accepting request 139769 from home:avli

laptop-mode-tools doesn't support systemd. Tuned is an alternative whose works fine with systemd, developped by redhat

OBS-URL: https://build.opensuse.org/request/show/139769
OBS-URL: https://build.opensuse.org/package/show/Base:System/tuned?expand=0&rev=1
This commit is contained in:
Andreas Jaeger 2012-10-30 13:29:21 +00:00 committed by Git OBS Bridge
commit 82f6f347b4
8 changed files with 227 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,25 @@
--- a/dbus.conf 2012-08-16 17:42:23.000000000 +0200
+++ b/dbus.conf 2012-10-04 17:26:18.164945059 +0200
@@ -7,22 +7,15 @@
-->
<busconfig>
-
<policy user="root">
<allow own="com.redhat.tuned"/>
<allow send_destination="com.redhat.tuned" />
- <allow receive_sender="com.redhat.tuned" />
</policy>
<policy context="default">
<deny send_destination="com.redhat.tuned"/>
-
<allow send_destination="com.redhat.tuned" send_interface="org.freedesktop.DBus.Introspectable" />
-
<allow send_destination="com.redhat.tuned" send_interface="com.redhat.tuned.control" send_member="active_profile" />
<allow send_destination="com.redhat.tuned" send_interface="com.redhat.tuned.control" send_member="status" />
-
- <allow receive_sender="com.redhat.com" />
</policy>
-
</busconfig>

View File

@ -0,0 +1,13 @@
--- a/Makefile 2012-10-10 23:25:44.000000000 +0200
+++ b/Makefile 2012-10-30 12:52:03.786235413 +0100
@@ -62,8 +62,8 @@
# runtime directory
mkdir -p $(DESTDIR)/var/run/tuned
- mkdir -p $(DESTDIR)/etc/tmpfiles.d
- install -m 0644 tuned.tmpfiles $(DESTDIR)/etc/tmpfiles.d/tuned.conf
+ mkdir -p $(DESTDIR)/usr/lib/tmpfiles.d
+ install -m 0644 tuned.tmpfiles $(DESTDIR)/usr/lib/tmpfiles.d/tuned.conf
# systemd units
mkdir -p $(DESTDIR)$(UNITDIR)

3
tuned-2.0.2.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2de39523ec91ba023ab32df029c5fb7a7b0c5bf224e680b8dc064ce22ab70f81
size 60782

2
tuned-rpmlintrc Normal file
View File

@ -0,0 +1,2 @@
# In attempt of inclusion of authorized dbus service
setBadness('suse-dbus-unauthorized-service', 0)

26
tuned.changes Normal file
View File

@ -0,0 +1,26 @@
-------------------------------------------------------------------
Tue Oct 30 12:18:07 UTC 2012 - p.drouand@gmail.com
- Add %py_compiles macro for bitcompile .py files
- Add fix-new-systemd-tmpfiles.d-path.patch to fix tmpfiles.d
directory
-------------------------------------------------------------------
Tue Oct 30 10:58:53 UTC 2012 - p.drouand@gmail.com
- Update to 2.0.2 version:
* No changelog available
- Remove compat-profiles: no versions < 2.0 have been provided
-------------------------------------------------------------------
Thu Oct 4 15:36:11 UTC 2012 - p.drouand@gmail.com
- Some changes to be more "Suse-like":
* add systemd suse macro
- Add a patch to fix allow receive
-------------------------------------------------------------------
Fri Sep 28 16:07:57 UTC 2012 - p.drouand@gmail.com
- Initial release of tuned

134
tuned.spec Normal file
View File

@ -0,0 +1,134 @@
#
# spec file for package tuned
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: tuned
Version: 2.0.2
Release: 0
Summary: A dynamic adaptive system tuning daemon
URL: https://fedorahosted.org/tuned/
Group: System/Base
License: GPL-2.0
# The source for this package was pulled from upstream git. Use the
# following commands to get the corresponding tarball:
# git clone git://git.fedorahosted.org/git/tuned.git
# cd tuned
# git checkout v%%{version}
# make archive
Source: tuned-%{version}.tar.bz2
Source99: tuned-rpmlintrc
# PATCH-FIX-OPENSUSE fix-allow-receive_sender-default.patch <allow receive_sender="com.redhat.com"/> allow receive_* is normally
# not needed as that is the default --<p.drouand@gmail.com>
Patch0: fix-allow-receive_sender-default.patch
# PATCH-FIX-OPENSUSE fix-new-systemd-tmpfiles.d-path.patch Fix tmpfiles.d systemd path from /etc/tmpdfiles.d to /usr/lib/tmpfiles.d to be
# compatible with new systemd --<p.drouand@gmail.com>
Patch1: fix-new-systemd-tmpfiles.d-path.patch
BuildRequires: systemd
BuildRequires: python
Requires: python-decorator
Requires: dbus-python
Requires: pygobject2
%{?systemd_requires}
BuildArch: noarch
%description
The tuned package contains a daemon that tunes system settings dynamically.
It does so by monitoring the usage of several system components periodically.
Based on that information components will then be put into lower or higher
power saving modes to adapt to the current usage. Currently only ethernet
network and ATA harddisk devices are implemented.
%package utils
Summary: Disk and net statistic monitoring systemtap scripts
Requires: %{name} = %{version}-%{release}
Requires: systemtap
%description utils
The tuned-utils package contains several systemtap scripts to allow detailed
manual monitoring of the system. Instead of the typical IO/sec it collects
minimal, maximal and average time between operations to be able to
identify applications that behave power inefficient (many small operations
instead of fewer large ones).
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
#The tuned daemon is written in pure Python. Nothing requires to be built.
%install
make install DESTDIR=%{buildroot}
%py_compile %{buildroot}
%pre
%service_add_pre %{name}.service
%post
%service_add_post %{name}.service
%preun
%service_del_preun %{name}.service
%postun
%service_del_postun %{name}.service
%files
%defattr(-,root,root,-)
%dir /usr/share/doc/tuned-%{version}
%doc /usr/share/doc/tuned-%{version}/AUTHORS
%doc /usr/share/doc/tuned-%{version}/COPYING
%doc /usr/share/doc/tuned-%{version}/README
%doc /usr/share/doc/tuned-%{version}/TIPS.txt
%config %{_sysconfdir}/bash_completion.d
%{python_sitelib}/tuned
%{_sbindir}/tuned
%{_sbindir}/tuned-adm
%exclude %{_prefix}/lib/tuned/default
%exclude %{_prefix}/lib/tuned/desktop-powersave
%exclude %{_prefix}/lib/tuned/laptop-ac-powersave
%exclude %{_prefix}/lib/tuned/server-powersave
%exclude %{_prefix}/lib/tuned/laptop-battery-powersave
%exclude %{_prefix}/lib/tuned/enterprise-storage
%exclude %{_prefix}/lib/tuned/spindown-disk
%{_prefix}/lib/tuned
%config(noreplace) %{_sysconfdir}/tuned/active_profile
%{_prefix}/lib/tmpfiles.d
%config %{_sysconfdir}/dbus-1/system.d/com.redhat.tuned.conf
%{_unitdir}/tuned.service
%dir %{_localstatedir}/log/tuned
%ghost %{_localstatedir}/run/tuned
%dir /etc/tuned
%{_mandir}/man5/tuned*
%{_mandir}/man8/tuned*
%files utils
%defattr(-,root,root,-)
%dir /usr/share/doc/tuned-%{version}
%doc /usr/share/doc/tuned-%{version}/README.utils
%doc /usr/share/doc/tuned-%{version}/README.scomes
%{_sbindir}/varnetload
%{_sbindir}/netdevstat
%{_sbindir}/diskdevstat
%{_sbindir}/scomes
%{_bindir}/powertop2tuned
%{_mandir}/man8/varnetload.*
%{_mandir}/man8/netdevstat.*
%{_mandir}/man8/diskdevstat.*
%{_mandir}/man8/scomes.*
%changelog