Hello community,

here is the log from the commit of package cpupower for openSUSE:Factory 
checked in at 2011-12-25 17:33:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cpupower (Old)
 and      /work/SRC/openSUSE:Factory/.cpupower.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

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

Changes:
--------
--- /work/SRC/openSUSE:Factory/cpupower/cpupower.changes        2011-12-15 
16:05:37.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.cpupower.new/cpupower.changes   2011-12-25 
17:33:46.000000000 +0100
@@ -1,0 +2,21 @@
+Wed Dec 21 10:03:28 UTC 2011 - [email protected]
+
+- Add cpupower_export_tarball_from_git.sh as source file.
+
+-------------------------------------------------------------------
+Tue Dec 20 13:22:00 UTC 2011 - [email protected]
+
+- Add idle-info manpage
+- Fix two bugs: memleak in idle-info and wrong idle state count
+
+-------------------------------------------------------------------
+Thu Dec 15 10:58:25 UTC 2011 - [email protected]
+
+- Update to 3.2-rc5 version (not much changed, includes the
+  use-manpage-on-help patch -> removed it)
+- Change licence from GPL-2.0+ to GPL-2.0 to fit the kernel
+  licence where sources are coming from
+- Provide a tiny script to quickly export and tar sources from
+  the git repo
+
+-------------------------------------------------------------------

Old:
----
  cpupower-2.6.39.tar.bz2
  cpupower-use-manpage-on-help-command.patch

New:
----
  cpupower-3.2.rc5.tar.bz2
  cpupower_export_tarball_from_git.sh
  cpupower_fix_manpages.patch
  cpupower_fix_memleak.patch
  cpupower_fix_poll_idle_state.patch

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

Other differences:
------------------
++++++ cpupower.spec ++++++
--- /var/tmp/diff_new_pack.2PRw8t/_old  2011-12-25 17:33:47.000000000 +0100
+++ /var/tmp/diff_new_pack.2PRw8t/_new  2011-12-25 17:33:47.000000000 +0100
@@ -16,23 +16,28 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+
+
 Name:           cpupower
 Url:            
http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils.html
 # Use this as version when things are in mainline kernel
 %define version %(rpm -q --qf '%{VERSION}' kernel-source)
-Version:        2.6.39
+Version:        3.2.rc5
 Release:        0
 Summary:        Tools to determine and set CPU Power related Settings
-License:        GPL-2.0+
+License:        GPL-2.0
 Group:          System/Base
 Source:         %{name}-%{version}.tar.bz2
-Patch0:         cpupower-use-manpage-on-help-command.patch
+Source1:        cpupower_export_tarball_from_git.sh
+Patch1:         cpupower_fix_manpages.patch
+Patch2:         cpupower_fix_poll_idle_state.patch
+Patch3:         cpupower_fix_memleak.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  gettext-tools
 BuildRequires:  pciutils
 BuildRequires:  pciutils-devel
-Obsoletes:      cpufrequtils
-Provides:       cpufrequtils
+Obsoletes:      cpufrequtils < %version
+Provides:       cpufrequtils = %version
 
 %description
 This tool is to make access to the Linux kernel's processor power subsystems
@@ -58,8 +63,8 @@
 %package bench
 Summary:        CPU frequency micro benchmark
 Group:          System/Benchmark
-Obsoletes:      cpufrequtils-bench
-Provides:       cpufrequtils-bench
+Obsoletes:      cpufrequtils-bench < %version
+Provides:       cpufrequtils-bench = %version
 
 %description bench
 Helps to test the condition of a given kernel cpufreq
@@ -70,7 +75,9 @@
 
 %prep
 %setup -q
-%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
 # This package failed when testing with -Wl,-as-needed being default.

++++++ cpupower_export_tarball_from_git.sh ++++++
#!/bin/bash

# Author: Thomas Renninger <[email protected]>
# This code is covered and distributed under
# the General Public Licence v2

function usage(){
    echo "$(basename $0) [ git_tag ]"
    echo
    echo "git_tag   must be a valid kernel git tag, for example v3.1"
    echo "          if git_tag is not passed HEAD will be used which"
    echo "          may produce a package incompatible tarball name"
    echo "          BEST ALWAYS PASS AN EXISTING TAG"
    echo "          cpupower got introduced in 3.1-rc1"
    echo
    echo "export GIT_DIR= environment variable if the git repo is not the 
current directory"
    echo "For example: GIT_DIR=/path_to_git_repo/.git"
}

if [ $# -eq 1 ];then
    if [ "$1" = "-h" ] || [ "$1" == "--help" ];then
        usage
        exit 0
    fi
    GIT_TAG="$1"
    echo "Exporting cpupower from kernel version $GIT_TAG"
    # convert - to . as package versions do not allow -
    VERSION="${GIT_TAG/-/.}"
    # remove leading v
    VERSION="-${VERSION#v}"
else
    GIT_TAG="HEAD"
    VERSION=""
fi

# Tried to do this with one git archive command, but
# --remote= param seem not to be configured for kernel.org gits

# set -x
DIR=`mktemp -d`
pushd "$DIR"
git archive --format=tar $GIT_TAG tools/power/cpupower |tar -x
mv tools/power/cpupower cpupower${VERSION}
tar -cvjf cpupower${VERSION}.tar.bz2 cpupower${VERSION}
popd
mv "$DIR/cpupower${VERSION}".tar.bz2 .
rm -rf "$DIR"
# set +x
echo cpupower${VERSION}.tar.bz2++++++ cpupower_fix_manpages.patch ++++++
cpupower: Unify cpupower-frequency-* manpages

cpupower-frequency-* manpages slightly differed from the others.
  - Use uppercase letters in the title
  - Show cpupower Manual in the header
  - Remove Mattia from left down corner of the manpage, he is already
    listed as author
  - Remove --help, prints this message -> not needed

Signed-off-by: Thomas Renninger <[email protected]>
CC: [email protected]
CC: [email protected]
CC: [email protected]

---
 tools/power/cpupower/man/cpupower-frequency-info.1 |    4 +---
 tools/power/cpupower/man/cpupower-frequency-set.1  |    4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/man/cpupower-frequency-info.1 b/man/cpupower-frequency-info.1
index bb60a8d..4a1918e 100644
--- a/man/cpupower-frequency-info.1
+++ b/man/cpupower-frequency-info.1
@@ -1,4 +1,4 @@
-.TH "cpupower-frequency-info" "1" "0.1" "Mattia Dongili" ""
+.TH "CPUPOWER\-FREQUENCY\-INFO" "1" "0.1" "" "cpupower Manual"
 .SH "NAME"
 .LP 
 cpupower frequency\-info \- Utility to retrieve cpufreq kernel information
@@ -50,8 +50,6 @@ Prints out information like provided by the /proc/cpufreq 
interface in 2.4. and
 \fB\-m\fR \fB\-\-human\fR
 human\-readable output for the \-f, \-w, \-s and \-y parameters.
 .TP  
-\fB\-h\fR \fB\-\-help\fR
-Prints out the help screen.
 .SH "REMARKS"
 .LP 
 By default only values of core zero are displayed. How to display settings of
diff --git a/man/cpupower-frequency-set.1 b/man/cpupower-frequency-set.1
index 685f469..3eacc8d 100644
--- a/man/cpupower-frequency-set.1
+++ b/man/cpupower-frequency-set.1
@@ -1,4 +1,4 @@
-.TH "cpupower-freqency-set" "1" "0.1" "Mattia Dongili" ""
+.TH "CPUPOWER\-FREQUENCY\-SET" "1" "0.1" "" "cpupower Manual"
 .SH "NAME"
 .LP 
 cpupower frequency\-set \- A small tool which allows to modify cpufreq 
settings.
@@ -26,8 +26,6 @@ specific frequency to be set. Requires userspace governor to 
be available and lo
 \fB\-r\fR \fB\-\-related\fR
 modify all hardware-related CPUs at the same time
 .TP 
-\fB\-h\fR \fB\-\-help\fR
-Prints out the help screen.
 .SH "REMARKS"
 .LP 
 By default values are applied on all cores. How to modify single core
++++++ cpupower_fix_memleak.patch ++++++
cpupower: Remove unneeded code and by that fix a memleak

Looks like some not needed debug code slipped in.
Also this code:
tmp = sysfs_get_idlestate_name(cpu, idlestates - 1);
performs a strdup and the mem was not freed again.
-> delete it.

Signed-off-by: Thomas Renninger <[email protected]>
CC: [email protected]
CC: [email protected]

---
 tools/power/cpupower/utils/cpuidle-info.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/utils/cpuidle-info.c b/utils/cpuidle-info.c
index e076beb..8145af5 100644
--- a/utils/cpuidle-info.c
+++ b/utils/cpuidle-info.c
@@ -35,13 +35,6 @@ static void cpuidle_cpu_output(unsigned int cpu, int verbose)
                printf(_("CPU %u: Can't read idle state info\n"), cpu);
                return;
        }
-       tmp = sysfs_get_idlestate_name(cpu, idlestates - 1);
-       if (!tmp) {
-               printf(_("Could not determine max idle state %u\n"),
-                      idlestates - 1);
-               return;
-       }
-
        printf(_("Number of idle states: %d\n"), idlestates);
        printf(_("Available idle states:"));
        for (idlestate = 0; idlestate < idlestates; idlestate++) {
++++++ cpupower_fix_poll_idle_state.patch ++++++
cpupower: Fix number of idle states

The number of idle states was wrong.
The POLL idle state (on X86) was missed out:
Number of idle states: 4
Available idle states: C1-NHM C3-NHM C6-NHM

While the POLL is not a real idle state, its
statistics should still be shown. It's now also
explained in a detailed manpage.
This should fix a bug of missing the first idle
state on other archs.

Signed-off-by: Thomas Renninger <[email protected]>
CC: [email protected]
CC: [email protected]

---
 a/utils/cpuidle-info.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/utils/cpuidle-info.c b/utils/cpuidle-info.c
index b028267..e076beb 100644
--- a/utils/cpuidle-info.c
+++ b/utils/cpuidle-info.c
@@ -43,9 +43,8 @@ static void cpuidle_cpu_output(unsigned int cpu, int verbose)
        }
 
        printf(_("Number of idle states: %d\n"), idlestates);
-
        printf(_("Available idle states:"));
-       for (idlestate = 1; idlestate < idlestates; idlestate++) {
+       for (idlestate = 0; idlestate < idlestates; idlestate++) {
                tmp = sysfs_get_idlestate_name(cpu, idlestate);
                if (!tmp)
                        continue;
@@ -57,7 +56,7 @@ static void cpuidle_cpu_output(unsigned int cpu, int verbose)
        if (!verbose)
                return;
 
-       for (idlestate = 1; idlestate < idlestates; idlestate++) {
+       for (idlestate = 0; idlestate < idlestates; idlestate++) {
                tmp = sysfs_get_idlestate_name(cpu, idlestate);
                if (!tmp)
                        continue;
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to