Hello community,

here is the log from the commit of package powertop for openSUSE:Factory 
checked in at 2012-02-06 15:55:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/powertop (Old)
 and      /work/SRC/openSUSE:Factory/.powertop.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "powertop", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/powertop/powertop.changes        2011-09-23 
12:41:48.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.powertop.new/powertop.changes   2012-02-06 
15:55:15.000000000 +0100
@@ -1,0 +2,6 @@
+Thu Feb  2 09:11:29 UTC 2012 - [email protected]
+
+- Update to version 1.98:
+  * Major rewrite using perf interface with many new options
+  
+-------------------------------------------------------------------

Old:
----
  powertop-1.13.tar.bz2
  powertop_fix_sizof_link.patch

New:
----
  powertop-1.98-always-create-params.patch
  powertop-1.98-compile-fix.patch
  powertop-1.98-unknown-readings-fix.patch
  powertop-1.98.tar.bz2
  powertop-no-date.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ powertop.spec ++++++
--- /var/tmp/diff_new_pack.bDKoxD/_old  2012-02-06 15:55:17.000000000 +0100
+++ /var/tmp/diff_new_pack.bDKoxD/_new  2012-02-06 15:55:17.000000000 +0100
@@ -1,7 +1,7 @@
 #
-# spec file for package powertop (Version 1.13)
+# spec file for package powertop
 #
-# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# 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
@@ -18,16 +18,25 @@
 
 
 Name:           powertop
-Url:            http://www.linuxpowertop.org
+Url:            http://www.lesswatts.org
 Summary:        A Linux Tool to Find out What is Using Power on a Laptop
-Version:        1.13
+Version:        1.98
 Release:        1
 License:        GPL-2.0+
 Group:          System/Monitoring
 Source0:        %{name}-%{version}.tar.bz2
-Patch0:         powertop_fix_sizof_link.patch
 Patch1:         powertop_set_cflags_override.patch
+Patch2:         powertop-1.98-always-create-params.patch
+Patch3:         powertop-1.98-unknown-readings-fix.patch
+Patch4:         powertop-1.98-compile-fix.patch
+Patch5:         powertop-no-date.patch
+BuildRequires:  gcc-c++
 BuildRequires:  ncurses-devel
+BuildRequires:  pkg-config
+BuildRequires:  libnl-1_1-devel
+BuildRequires:  zlib-devel
+BuildRequires:  pciutils-devel
+BuildRequires:  gettext
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 AutoReqProv:    on
 
@@ -36,31 +45,39 @@
 from your system and presents an overview of how well your laptop is
 doing in terms of power savings.
 
-
-Authors:
---------
-    Arjan van de Ven <[email protected]>
-
 %prep
-%setup
-%patch0 -p1
+%setup -q
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 %build
-make CFLAGS="$RPM_OPT_FLAGS"
+make CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
 
 %install
 mkdir -p %{buildroot}/%{_bindir}
 make install DESTDIR=%{buildroot}
-%find_lang %{name}
+install -Dd %{buildroot}%{_localstatedir}/cache/powertop
+touch 
%{buildroot}%{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.powertop}
+#%find_lang %{name}
+
+%post
+# Hack for powertop not to show warnings on first start
+touch 
%{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.powertop}
 
 %clean
 rm -rf %{_buildroot}
 
-%files  -f %{name}.lang
+#%files  -f %{name}.lang
+
+%files
 %defattr(-,root,root)
-%doc COPYING
+%doc COPYING README
+%dir %{_localstatedir}/cache/powertop
+%ghost %{_localstatedir}/cache/powertop/saved_parameters.powertop
+%ghost %{_localstatedir}/cache/powertop/saved_results.powertop
 %{_bindir}/%{name}
-%{_mandir}/man*/%{name}.8.gz
 
 %changelog

++++++ powertop-1.98-always-create-params.patch ++++++
diff -up powertop-1.98/parameters/persistent.cpp.orig 
powertop-1.98/parameters/persistent.cpp
--- powertop-1.98/parameters/persistent.cpp.orig        2011-05-11 
06:48:37.000000000 +0200
+++ powertop-1.98/parameters/persistent.cpp     2011-12-02 19:48:45.056747667 
+0100
@@ -122,22 +122,23 @@ void save_parameters(const char *filenam
 
 //     printf("result size is %i, #parameters is %i \n", 
(int)past_results.size(), (int)all_parameters.parameters.size());
 
-       if (!global_power_valid())
-               return;
 
        file.open(filename, ios::out);
        if (!file) {
                cout << _("Cannot save to file ") << filename << "\n";
                return;
        }
-       
-       map<string, int>::iterator it;
 
-       for (it = param_index.begin(); it != param_index.end(); it++) {
-               int index;
-               index = it->second;
-               file << it->first << "\t" << setprecision(9) << 
all_parameters.parameters[index] << "\n";
-       }       
+       if (global_power_valid())
+       {
+               map<string, int>::iterator it;
+
+               for (it = param_index.begin(); it != param_index.end(); it++) {
+                       int index;
+                       index = it->second;
+                       file << it->first << "\t" << setprecision(9) << 
all_parameters.parameters[index] << "\n";
+               }       
+       }
        file.close();
 }
 
++++++ powertop-1.98-compile-fix.patch ++++++
diff -up powertop-1.98/devices/alsa.cpp.orig powertop-1.98/devices/alsa.cpp
--- powertop-1.98/devices/alsa.cpp.orig 2011-05-11 06:48:37.000000000 +0200
+++ powertop-1.98/devices/alsa.cpp      2012-01-11 16:19:53.365786704 +0100
@@ -28,6 +28,7 @@
 #include <stdio.h>
 #include <sys/types.h>
 #include <dirent.h>
+#include <unistd.h>
 
 
 using namespace std;
diff -up powertop-1.98/devices/device.cpp.orig powertop-1.98/devices/device.cpp
--- powertop-1.98/devices/device.cpp.orig       2011-05-11 06:48:37.000000000 
+0200
+++ powertop-1.98/devices/device.cpp    2012-01-11 16:13:38.284981557 +0100
@@ -29,6 +29,7 @@
 #include <stdio.h>
 #include <limits.h>
 #include <stdlib.h>
+#include <unistd.h>
 
 using namespace std;
 
diff -up powertop-1.98/html.cpp.orig powertop-1.98/html.cpp
--- powertop-1.98/html.cpp.orig 2011-05-11 06:48:37.000000000 +0200
+++ powertop-1.98/html.cpp      2012-01-11 16:06:58.714989836 +0100
@@ -29,6 +29,7 @@
 #include <utility>
 #include <iostream>
 #include <fstream>
+#include <unistd.h>
 
 #include "css.h"
 #include "lib.h"
diff -up powertop-1.98/devices/i915-gpu.cpp.orig 
powertop-1.98/devices/i915-gpu.cpp
--- powertop-1.98/devices/i915-gpu.cpp.orig     2011-05-11 06:48:37.000000000 
+0200
+++ powertop-1.98/devices/i915-gpu.cpp  2012-01-11 16:21:46.958008197 +0100
@@ -28,6 +28,7 @@
 #include <stdio.h>
 #include <sys/types.h>
 #include <dirent.h>
+#include <unistd.h>
 
 
 using namespace std;
diff -up powertop-1.98/cpu/intel_cpus.cpp.orig powertop-1.98/cpu/intel_cpus.cpp
--- powertop-1.98/cpu/intel_cpus.cpp.orig       2011-05-11 06:48:37.000000000 
+0200
+++ powertop-1.98/cpu/intel_cpus.cpp    2012-01-11 16:11:55.784740852 +0100
@@ -34,6 +34,7 @@
 #include <sys/time.h>
 #include <string.h>
 #include <errno.h>
+#include <unistd.h>
 
 #include "../lib.h"
 #include "../parameters/parameters.h"
diff -up powertop-1.98/main.cpp.orig powertop-1.98/main.cpp
--- powertop-1.98/main.cpp.orig 2011-05-11 06:48:37.000000000 +0200
+++ powertop-1.98/main.cpp      2012-01-11 16:00:06.445806979 +0100
@@ -33,6 +33,7 @@
 #include <time.h>
 #include <sys/stat.h>
 #include <getopt.h>
+#include <unistd.h>
 
 #include "cpu/cpu.h"
 #include "process/process.h"
diff -up powertop-1.98/devices/network.cpp.orig 
powertop-1.98/devices/network.cpp
--- powertop-1.98/devices/network.cpp.orig      2011-05-11 06:48:37.000000000 
+0200
+++ powertop-1.98/devices/network.cpp   2012-01-11 16:23:18.176178890 +0100
@@ -33,6 +33,7 @@
 #include <dirent.h>
 #include <libgen.h>
 #include <stdlib.h>
+#include <unistd.h>
 
 #include <linux/ethtool.h>
 
diff -up powertop-1.98/devices/rfkill.cpp.orig powertop-1.98/devices/rfkill.cpp
--- powertop-1.98/devices/rfkill.cpp.orig       2011-05-11 06:48:37.000000000 
+0200
+++ powertop-1.98/devices/rfkill.cpp    2012-01-11 16:15:46.003268813 +0100
@@ -29,6 +29,7 @@
 #include <sys/types.h>
 #include <dirent.h>
 #include <libgen.h>
+#include <unistd.h>
 
 
 using namespace std;
diff -up powertop-1.98/devices/thinkpad-fan.cpp.orig 
powertop-1.98/devices/thinkpad-fan.cpp
--- powertop-1.98/devices/thinkpad-fan.cpp.orig 2011-05-11 06:48:37.000000000 
+0200
+++ powertop-1.98/devices/thinkpad-fan.cpp      2012-01-11 16:25:27.550410318 
+0100
@@ -29,6 +29,7 @@
 #include <sys/types.h>
 #include <dirent.h>
 #include <math.h>
+#include <unistd.h>
 
 #include "../lib.h"
 
diff -up powertop-1.98/devices/thinkpad-light.cpp.orig 
powertop-1.98/devices/thinkpad-light.cpp
--- powertop-1.98/devices/thinkpad-light.cpp.orig       2012-01-11 
16:27:38.000000000 +0100
+++ powertop-1.98/devices/thinkpad-light.cpp    2012-01-11 16:27:50.995652724 
+0100
@@ -29,6 +29,7 @@
 #include <sys/types.h>
 #include <dirent.h>
 #include <math.h>
+#include <unistd.h>
 
 #include "../lib.h"
 
++++++ powertop-1.98-unknown-readings-fix.patch ++++++
diff -up powertop-1.98/measurement/acpi.cpp.orig 
powertop-1.98/measurement/acpi.cpp
--- powertop-1.98/measurement/acpi.cpp.orig     2011-05-11 06:48:37.000000000 
+0200
+++ powertop-1.98/measurement/acpi.cpp  2012-01-10 18:31:21.093799991 +0100
@@ -108,8 +108,13 @@ void acpi_power_meter::measure(void)
                        while (*c == ' ') c++;
                        _capacity = strtoull(c, NULL, 10);
                        c = strchr(c, ' ');
-                       c++;
-                       strcpy(capacity_units, c);
+                       if (c) {
+                               c++;
+                               strcpy(capacity_units, c);
+                       } else {
+                               _capacity = 0;
+                               strcpy(capacity_units, "Unknown");
+                       }
                }
                if (strstr(line, "present voltage:")) {
                        c = strchr(line, ':');
@@ -117,8 +122,13 @@ void acpi_power_meter::measure(void)
                        while (*c == ' ') c++;
                        _voltage = strtoull(c, NULL, 10);
                        c = strchr(c, ' ');
-                       c++;
-                       strcpy(voltage_units, c);
+                       if (c) {
+                               c++;
+                               strcpy(voltage_units, c);
+                       } else {
+                               _voltage = 0;
+                               strcpy(voltage_units, "Unknown");
+                       }
                }
        }
        file.close();
++++++ powertop-1.13.tar.bz2 -> powertop-1.98.tar.bz2 ++++++
++++ 37385 lines of diff (skipped)

++++++ powertop-no-date.patch ++++++
Index: powertop-1.98/main.cpp
===================================================================
--- powertop-1.98.orig/main.cpp
+++ powertop-1.98/main.cpp
@@ -71,7 +71,7 @@ static const struct option long_options[
 
 static void print_version()
 {
-       printf(_("Powertop version" POWERTOP_VERSION ", compiled on "__DATE__ 
"\n"));
+       printf(_("Powertop version" POWERTOP_VERSION "\n"));
 }
 
 static void print_usage()
++++++ powertop_set_cflags_override.patch ++++++
--- /var/tmp/diff_new_pack.bDKoxD/_old  2012-02-06 15:55:18.000000000 +0100
+++ /var/tmp/diff_new_pack.bDKoxD/_new  2012-02-06 15:55:18.000000000 +0100
@@ -1,17 +1,25 @@
----
- Makefile |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: powertop-1.13/Makefile
+Index: powertop-1.98/Makefile
 ===================================================================
---- powertop-1.13.orig/Makefile
-+++ powertop-1.13/Makefile
-@@ -7,7 +7,7 @@ WARNFLAGS=-Wall -Wshadow -W -Wformat -Wi
- CFLAGS?=-O1 -g ${WARNFLAGS}
- CC?=gcc
+--- powertop-1.98.orig/Makefile
++++ powertop-1.98/Makefile
+@@ -2,9 +2,9 @@ all: powertop  po/powertop.pot
  
--CFLAGS+=-D VERSION=\"$(VERSION)\"
-+override CFLAGS+=-D VERSION=\"$(VERSION)\"
+ VERSION := 1.98
  
- # 
- # The w in -lncursesw is not a typo; it is the wide-character version
+-CFLAGS += -Wall -O2 -g -fno-omit-frame-pointer -fstack-protector -Wshadow 
-Wformat -D_FORTIFY_SOURCE=2
++override CFLAGS += -Wall -O2 -g -fno-omit-frame-pointer -fstack-protector 
-Wshadow -Wformat -D_FORTIFY_SOURCE=2
+ CPPFLAGS += -Wall -O2 -g -fno-omit-frame-pointer
+-CXXFLAGS += -Wall -O2 -g -fno-omit-frame-pointer -fstack-protector -Wshadow 
-Wformat -D_FORTIFY_SOURCE=2
++override CXXFLAGS += -Wall -O2 -g -fno-omit-frame-pointer -fstack-protector 
-Wshadow -Wformat -D_FORTIFY_SOURCE=2
+ PKG_CONFIG ?= pkg-config
+ 
+ OBJS := lib.o main.o display.o html.o devlist.o
+@@ -90,7 +90,7 @@ css.h: csstoh powertop.css
+ %.o: %.cpp lib.h css.h Makefile
+       @echo "  CC  $<"
+       @[ -x /usr/bin/cppcheck ] && /usr/bin/cppcheck -q $< || :
+-      @$(CC) $(CFLAGS) -c -o $@ $<
++      $(CC) $(CFLAGS) -c -o $@ $<
+ 
+ 
+ uptrans:

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to