Hello community,

here is the log from the commit of package powertop for openSUSE:Factory 
checked in at 2018-03-20 22:00:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/powertop (Old)
 and      /work/SRC/openSUSE:Factory/.powertop.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "powertop"

Tue Mar 20 22:00:15 2018 rev:46 rq:588630 version:2.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/powertop/powertop.changes        2017-06-16 
10:48:29.344661313 +0200
+++ /work/SRC/openSUSE:Factory/.powertop.new/powertop.changes   2018-03-20 
22:00:42.564927300 +0100
@@ -1,0 +2,17 @@
+Mon Mar 19 14:23:40 UTC 2018 - [email protected]
+
+- Remove powertop-no-date.patch: upstreamed
+
+-------------------------------------------------------------------
+Fri Dec  1 16:16:40 UTC 2017 - [email protected]
+
+- Upgrade to version 2.9
+Already mainline:
+D powertop-2.8-potential-segfaults.patch
+D powertop-no-date.patch
+
+From mainline (after 2.9):
+A powertop_cstate_fix.patch
+A powertop_libc++_fix.patch
+
+-------------------------------------------------------------------

Old:
----
  powertop-2.8-potential-segfaults.patch
  powertop-2.8.tar.gz
  powertop-no-date.patch

New:
----
  powertop-v2.9.tar.gz
  powertop_cstate_fix.patch
  powertop_libc++_fix.patch

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

Other differences:
------------------
++++++ powertop.spec ++++++
--- /var/tmp/diff_new_pack.4Pfr0U/_old  2018-03-20 22:00:43.700886401 +0100
+++ /var/tmp/diff_new_pack.4Pfr0U/_new  2018-03-20 22:00:43.704886257 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package powertop
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,18 +17,17 @@
 
 
 Name:           powertop
-Version:        2.8
+Version:        2.9
 Release:        0
 #Git-Clone:    git://github.com/fenrus75/powertop
 Summary:        A Linux Tool to Find out What is Using Power on a Laptop
 License:        GPL-2.0
 Group:          System/Monitoring
 Url:            https://01.org/powertop/
-Source0:        
https://01.org/sites/default/files/downloads/%{name}/%{name}-%{version}.tar.gz
+Source0:        
https://01.org/sites/default/files/downloads/%{name}/%{name}-v%{version}.tar.gz
 Source1:        powertop.service
-Patch0:         powertop-no-date.patch
-# PATCH-FIX-UPSTREAM powertop-2.8-potential-segfaults.patch 
[email protected] -- Fix potential segfaults.
-Patch1:         powertop-2.8-potential-segfaults.patch
+Patch1:         powertop_cstate_fix.patch
+Patch2:         powertop_libc++_fix.patch
 BuildRequires:  gcc-c++
 BuildRequires:  gettext
 BuildRequires:  ncurses-devel
@@ -50,9 +49,9 @@
 %lang_package
 
 %prep
-%setup -q
-%patch0 -p1
+%setup -qn powertop-v%{version}
 %patch1 -p1
+%patch2 -p1
 
 # Delete objects files left in tarball
 find . -name '*.o' -delete

++++++ powertop_cstate_fix.patch ++++++
commit f3f350f138912dc89abb37676f7e65fc6057ec53
Author: Gautam Paranjape <[email protected]>
Date:   Fri Jul 21 07:02:13 2017 -0700

    Some c-states exposed by the intel_idle driver are assigned
    the same line_level, which means that the most recent one
    assigned can overwrite another c-state. For example, the
    C1-SKL c-state is overwritten by the C1E-SKL c-state because
    both have a "1" in the name and are assigned the same line
    level. To fix this, check if a "sub c-state" (ex. C1E-SKL)
    is being inserted. If so, check the vector of c-states if
    a c-state with similar name (ex. C1-SKL) exists, and
    increment the line level.
    
    Signed-off-by: Gautam Paranjape <[email protected]>

diff --git a/src/cpu/abstract_cpu.cpp b/src/cpu/abstract_cpu.cpp
index bc32336..c59721c 100644
--- a/src/cpu/abstract_cpu.cpp
+++ b/src/cpu/abstract_cpu.cpp
@@ -218,6 +218,17 @@ void abstract_cpu::insert_cstate(const char *linux_name, 
const char *human_name,
                }
                if (*c >= '0' && *c <='9') {
                        state->line_level = strtoull(c, NULL, 10);
+                       if(*(c+1) != '-'){
+                               int greater_line_level = strtoull(c, NULL, 10);
+                               for(unsigned int pos = 0; pos < cstates.size(); 
pos++){
+                                       if(*c == cstates[pos]->human_name[1]){
+                                               if(*(c+1) != 
cstates[pos]->human_name[2]){
+                                                       greater_line_level = 
max(greater_line_level, cstates[pos]->line_level);
+                                                       state->line_level = 
greater_line_level + 1;
+                                               }
+                                       }
+                               }
+                       }
                        break;
                }
                c++;
++++++ powertop_libc++_fix.patch ++++++
commit b9c431aad6cc5383c9571007469eee8e64ec85a6
Author: Manoj Gupta <[email protected]>
Date:   Sat Nov 4 13:44:04 2017 -0700

    Fix powertop build with libc++.
    
    <ctime> header is not automatically included with libc++.
    Add it explicitly to make powertop build with libc++.
    
    This fixes the following errors:
    devices/gpu_rapl_device.cpp:35:14: error: use of undeclared identifier
    'time'; did you mean 'tie'?
    last_time = time(NULL);
                    ^~~~
    devices/gpu_rapl_device.cpp:45:14: error:use of undeclared identifier
    'time'; did you mean 'tie'?
    last_time = time(NULL);
                    ^~~~
    
    parameters/learn.cpp:161:10: error: use of undeclared identifier
    'time'; did you mean 'tie'?
    start =     time(NULL);
                ^~~~

diff --git a/src/lib.h b/src/lib.h
index b64bb0f..6d85eb6 100644
--- a/src/lib.h
+++ b/src/lib.h
@@ -54,7 +54,7 @@ extern const char *kernel_function(uint64_t address);
 
 
 
-
+#include <ctime>
 #include <string>
 using namespace std;
 

Reply via email to