[powertop] New version
Jaroslav Škarvada
jskarvad at fedoraproject.org
Mon May 26 13:27:52 UTC 2014
commit 01a6c98ec5e132053b7e5dde76e839130acf3965
Author: Jaroslav Škarvada <jskarvad at redhat.com>
Date: Mon May 26 15:27:48 2014 +0200
New version
Resolves: rhbz#1100724
- Dropped ondemand-check patch (upstream dropped the functionality)
powertop-2.3-ondemand-check.patch | 42 -----------------
...3-man-fix.patch => powertop-2.6.1-man-fix.patch | 2 +-
...ch => powertop-2.6.1-tunable-overflow-fix.patch | 47 +-------------------
powertop.spec | 16 ++++---
sources | 2 +-
5 files changed, 12 insertions(+), 97 deletions(-)
---
diff --git a/powertop-2.3-man-fix.patch b/powertop-2.6.1-man-fix.patch
similarity index 94%
rename from powertop-2.3-man-fix.patch
rename to powertop-2.6.1-man-fix.patch
index 18ed664..741b4a2 100644
--- a/powertop-2.3-man-fix.patch
+++ b/powertop-2.6.1-man-fix.patch
@@ -9,5 +9,5 @@ diff -up powertop-2.3/doc/powertop.8.orig powertop-2.3/doc/powertop.8
+file to execute for workload.
+.TP
\fB\-\-quiet
- supress stderr output.
+ suppress stderr output.
.TP
diff --git a/powertop-2.5-tunable-overflow-fix.patch b/powertop-2.6.1-tunable-overflow-fix.patch
similarity index 80%
rename from powertop-2.5-tunable-overflow-fix.patch
rename to powertop-2.6.1-tunable-overflow-fix.patch
index 9b4628c..7e61cad 100644
--- a/powertop-2.5-tunable-overflow-fix.patch
+++ b/powertop-2.6.1-tunable-overflow-fix.patch
@@ -3,7 +3,7 @@ index e0bdf12..01c673d 100644
--- a/src/tuning/bluetooth.cpp
+++ b/src/tuning/bluetooth.cpp
@@ -46,8 +46,8 @@
- bt_tunable::bt_tunable(void) : tunable("", 1.0, "Good", "Bad", "Unknown")
+ bt_tunable::bt_tunable(void) : tunable("", 1.0, _("Good"), _("Bad"), _("Unknown"))
{
sprintf(desc, _("Bluetooth device interface status"));
- strcpy(toggle_bad, "/usr/sbin/hciconfig hci0 up &> /dev/null &");
@@ -25,51 +25,6 @@ index e0bdf12..01c673d 100644
}
-diff --git a/src/tuning/cpufreq.cpp b/src/tuning/cpufreq.cpp
-index c169e6e..f696c89 100644
---- a/src/tuning/cpufreq.cpp
-+++ b/src/tuning/cpufreq.cpp
-@@ -189,7 +189,7 @@ const char *cpufreq_tunable::toggle_script(void) {
- int good;
- good = good_bad();
-
-- strcpy(toggle_good, "/sbin/modprobe cpufreq_ondemand > /dev/null 2>&1\n");
-+ toggle_good = "/sbin/modprobe cpufreq_ondemand > /dev/null 2>&1\n";
-
- if (good == TUNE_GOOD) {
- dir = opendir("/sys/devices/system/cpu");
-@@ -202,12 +202,12 @@ const char *cpufreq_tunable::toggle_script(void) {
- sprintf(filename, "/sys/devices/system/cpu/%s/cpufreq/scaling_governor", dirent->d_name);
- if (stat(filename, &statbuf) == -1)
- continue;
-- sprintf(tmp, "echo '%s' > '%s';\n", original, filename);
-- strcat(toggle_good, tmp);
-+ snprintf(tmp, 4096, "echo '%s' > '%s';\n", original, filename);
-+ toggle_good += tmp;
- }
-
- closedir(dir);
-- return toggle_good;
-+ return toggle_good.c_str();
- }
-
- dir = opendir("/sys/devices/system/cpu");
-@@ -220,12 +220,12 @@ const char *cpufreq_tunable::toggle_script(void) {
- sprintf(filename, "/sys/devices/system/cpu/%s/cpufreq/scaling_governor", dirent->d_name);
- if (stat(filename, &statbuf) == -1)
- continue;
-- sprintf(tmp, "echo 'ondemand' > '%s';\n", filename);
-- strcat(toggle_good, tmp);
-+ snprintf(tmp, 4096, "echo 'ondemand' > '%s';\n", filename);
-+ toggle_good += tmp;
- }
-
- closedir(dir);
-- return toggle_good;
-+ return toggle_good.c_str();
- }
-
-
diff --git a/src/tuning/ethernet.cpp b/src/tuning/ethernet.cpp
index 3d36112..f3f0224 100644
--- a/src/tuning/ethernet.cpp
diff --git a/powertop.spec b/powertop.spec
index 7d21f24..a5fee97 100644
--- a/powertop.spec
+++ b/powertop.spec
@@ -1,6 +1,6 @@
Name: powertop
-Version: 2.5
-Release: 2%{?dist}
+Version: 2.6.1
+Release: 1%{?dist}
Summary: Power consumption monitor
Group: Applications/System
@@ -11,10 +11,8 @@ Source0: http://01.org/powertop/sites/default/files/downloads/%{name}-%{v
# Sent upstream
Patch0: powertop-2.3-always-create-params.patch
# Sent upstream (http://github.com/fenrus75/powertop/pull/11)
-Patch1: powertop-2.3-man-fix.patch
-# Sent upstream (http://github.com/fenrus75/powertop/pull/12)
-Patch2: powertop-2.3-ondemand-check.patch
-Patch3: powertop-2.5-tunable-overflow-fix.patch
+Patch1: powertop-2.6.1-man-fix.patch
+Patch3: powertop-2.6.1-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
@@ -27,7 +25,6 @@ computer use more power than necessary while it is idle.
%setup -q
%patch0 -p1 -b .always-create-params
%patch1 -p1 -b .man-fix
-%patch2 -p1 -b .ondemand-check
%patch3 -p1 -b .tunable-overfow-fix
# remove left over object files
@@ -61,6 +58,11 @@ rm -rf %{buildroot}
%{_mandir}/man8/powertop.8*
%changelog
+* Mon May 26 2014 Jaroslav Škarvada <jskarvad at redhat.com> - 2.6.1-1
+- New version
+ Resolves: rhbz#1100724
+- Dropped ondemand-check patch (upstream dropped the functionality)
+
* Tue Mar 25 2014 Jaroslav Škarvada <jskarvad at redhat.com> - 2.5-2
- Fixed buffer overflow in cpufreq tunables on systems with many CPUs
(by tunable-overflow-fix patch)
diff --git a/sources b/sources
index 9598d8a..335b445 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-806bbcbd44fcea1f807c9582fc1f7d3e powertop-2.5.tar.gz
+705e091fa9e79a12d16bc3cb0c688280 powertop-2.6.1.tar.gz
More information about the scm-commits
mailing list