New version
Resolves: rhbz#1167726 - De-fuzzified patches - Dropped man-fix patch (upstreamed) - Added powertop autotuner oneshot service
This commit is contained in:
parent
92bdbf4d82
commit
08eab09a5d
@ -1,13 +0,0 @@
|
||||
diff -up powertop-2.3/doc/powertop.8.orig powertop-2.3/doc/powertop.8
|
||||
--- powertop-2.3/doc/powertop.8.orig 2013-01-31 22:39:27.000000000 +0100
|
||||
+++ powertop-2.3/doc/powertop.8 2013-06-25 15:51:49.000000000 +0200
|
||||
@@ -46,6 +46,9 @@ sent to others to help diagnose power is
|
||||
\fB\-\-iteration[\fR=\fIiterations\fR]
|
||||
number of times to run each test.
|
||||
.TP
|
||||
+\fB\-\-workload[\fR=\fIworkload\fR]
|
||||
+file to execute for workload.
|
||||
+.TP
|
||||
\fB\-\-quiet
|
||||
suppress stderr output.
|
||||
.TP
|
||||
@ -1,8 +1,8 @@
|
||||
diff --git a/src/parameters/persistent.cpp b/src/parameters/persistent.cpp
|
||||
index 483227b..5e4a5fd 100644
|
||||
index 9a5688a..6a232cd 100644
|
||||
--- a/src/parameters/persistent.cpp
|
||||
+++ b/src/parameters/persistent.cpp
|
||||
@@ -130,9 +130,6 @@ void save_parameters(const char *filename)
|
||||
@@ -145,9 +145,6 @@ void save_parameters(const char *filename)
|
||||
|
||||
// printf("result size is %i, #parameters is %i \n", (int)past_results.size(), (int)all_parameters.parameters.size());
|
||||
|
||||
@ -12,7 +12,7 @@ index 483227b..5e4a5fd 100644
|
||||
pathname = get_param_directory(filename);
|
||||
|
||||
file.open(pathname, ios::out);
|
||||
@@ -141,12 +138,15 @@ void save_parameters(const char *filename)
|
||||
@@ -156,12 +153,15 @@ void save_parameters(const char *filename)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
diff --git a/src/tuning/bluetooth.cpp b/src/tuning/bluetooth.cpp
|
||||
index e0bdf12..01c673d 100644
|
||||
index 9be327e..52a9278 100644
|
||||
--- a/src/tuning/bluetooth.cpp
|
||||
+++ b/src/tuning/bluetooth.cpp
|
||||
@@ -46,8 +46,8 @@
|
||||
@ -13,7 +13,7 @@ index e0bdf12..01c673d 100644
|
||||
}
|
||||
|
||||
|
||||
@@ -188,9 +188,9 @@ const char *bt_tunable::toggle_script(void)
|
||||
@@ -190,9 +190,9 @@ const char *bt_tunable::toggle_script(void)
|
||||
good = good_bad();
|
||||
|
||||
if (good == TUNE_GOOD) {
|
||||
@ -55,7 +55,7 @@ index 3d36112..f3f0224 100644
|
||||
|
||||
return NULL;
|
||||
diff --git a/src/tuning/runtime.cpp b/src/tuning/runtime.cpp
|
||||
index b57d53e..3369976 100644
|
||||
index 3201fdd..6d6bb98 100644
|
||||
--- a/src/tuning/runtime.cpp
|
||||
+++ b/src/tuning/runtime.cpp
|
||||
@@ -42,6 +42,7 @@ runtime_tunable::runtime_tunable(const char *path, const char *bus, const char *
|
||||
@ -116,7 +116,7 @@ index 3372378..8f90ee2 100644
|
||||
char desc[4096];
|
||||
double score;
|
||||
diff --git a/src/tuning/tuningsysfs.cpp b/src/tuning/tuningsysfs.cpp
|
||||
index ec1ca6b..aa4ebd5 100644
|
||||
index 0859a0c..3bfe0e3 100644
|
||||
--- a/src/tuning/tuningsysfs.cpp
|
||||
+++ b/src/tuning/tuningsysfs.cpp
|
||||
@@ -43,11 +43,15 @@
|
||||
@ -152,10 +152,10 @@ index ec1ca6b..aa4ebd5 100644
|
||||
|
||||
|
||||
diff --git a/src/tuning/tuningusb.cpp b/src/tuning/tuningusb.cpp
|
||||
index 27a6dca..2750121 100644
|
||||
index d2a0c11..ec869ec 100644
|
||||
--- a/src/tuning/tuningusb.cpp
|
||||
+++ b/src/tuning/tuningusb.cpp
|
||||
@@ -40,6 +40,7 @@ usb_tunable::usb_tunable(const char *path, const char *name) : tunable("", 0.9,
|
||||
@@ -41,6 +41,7 @@ usb_tunable::usb_tunable(const char *path, const char *name) : tunable("", 0.9,
|
||||
char filename[4096];
|
||||
char vendor[2048];
|
||||
char product[2048];
|
||||
@ -163,7 +163,7 @@ index 27a6dca..2750121 100644
|
||||
string str1, str2;
|
||||
sprintf(usb_path, "%s/power/control", path);
|
||||
|
||||
@@ -72,8 +73,10 @@ usb_tunable::usb_tunable(const char *path, const char *name) : tunable("", 0.9,
|
||||
@@ -73,8 +74,10 @@ usb_tunable::usb_tunable(const char *path, const char *name) : tunable("", 0.9,
|
||||
else if (strlen(vendor))
|
||||
sprintf(desc, _("Autosuspend for USB device %s [%s]"), vendor, name);
|
||||
|
||||
@ -176,7 +176,7 @@ index 27a6dca..2750121 100644
|
||||
}
|
||||
|
||||
int usb_tunable::good_bad(void)
|
||||
@@ -107,10 +110,10 @@ const char *usb_tunable::toggle_script(void)
|
||||
@@ -108,10 +111,10 @@ const char *usb_tunable::toggle_script(void)
|
||||
good = good_bad();
|
||||
|
||||
if (good == TUNE_GOOD) {
|
||||
@ -1,21 +1,23 @@
|
||||
Name: powertop
|
||||
Version: 2.6.1
|
||||
Release: 3%{?dist}
|
||||
Version: 2.7
|
||||
Release: 1%{?dist}
|
||||
Summary: Power consumption monitor
|
||||
|
||||
Group: Applications/System
|
||||
License: GPLv2
|
||||
URL: http://01.org/powertop/
|
||||
Source0: http://01.org/powertop/sites/default/files/downloads/%{name}-%{version}.tar.gz
|
||||
Source1: powertop.service
|
||||
|
||||
# Sent upstream
|
||||
Patch0: powertop-2.3-always-create-params.patch
|
||||
# Sent upstream (http://github.com/fenrus75/powertop/pull/11)
|
||||
Patch1: powertop-2.6.1-man-fix.patch
|
||||
Patch3: powertop-2.6.1-tunable-overflow-fix.patch
|
||||
Patch0: powertop-2.7-always-create-params.patch
|
||||
Patch1: powertop-2.7-tunable-overflow-fix.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: gettext, ncurses-devel, pciutils-devel, zlib-devel, libnl3-devel
|
||||
Requires(post): coreutils
|
||||
BuildRequires: systemd
|
||||
Requires(post): systemd, coreutils
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
|
||||
%description
|
||||
PowerTOP is a tool that finds the software component(s) that make your
|
||||
@ -24,11 +26,7 @@ computer use more power than necessary while it is idle.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .always-create-params
|
||||
%patch1 -p1 -b .man-fix
|
||||
%patch3 -p1 -b .tunable-overfow-fix
|
||||
|
||||
# remove left over object files
|
||||
find . -name "*.o" -exec rm {} \;
|
||||
%patch1 -p1 -b .tunable-overfow-fix
|
||||
|
||||
%build
|
||||
%configure
|
||||
@ -41,7 +39,17 @@ install -Dd %{buildroot}%{_localstatedir}/cache/powertop
|
||||
touch %{buildroot}%{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.powertop}
|
||||
%find_lang %{name}
|
||||
|
||||
# Systemd
|
||||
install -Dpm 644 %{SOURCE1} %{buildroot}%{_unitdir}/powertop.service
|
||||
|
||||
%preun
|
||||
%systemd_preun powertop.service
|
||||
|
||||
%postun
|
||||
%systemd_postun_with_restart powertop.service
|
||||
|
||||
%post
|
||||
%systemd_post powertop.service
|
||||
# Hack for powertop not to show warnings on first start
|
||||
touch %{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.powertop}
|
||||
|
||||
@ -56,8 +64,16 @@ rm -rf %{buildroot}
|
||||
%ghost %{_localstatedir}/cache/powertop/saved_results.powertop
|
||||
%{_sbindir}/powertop
|
||||
%{_mandir}/man8/powertop.8*
|
||||
%{_unitdir}/powertop.service
|
||||
|
||||
%changelog
|
||||
* Tue Nov 25 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 2.7-1
|
||||
- New version
|
||||
Resolves: rhbz#1167726
|
||||
- De-fuzzified patches
|
||||
- Dropped man-fix patch (upstreamed)
|
||||
- Added powertop autotuner oneshot service
|
||||
|
||||
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user