[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RFS: new powertop version



Dear Patrick Winnertz, dear mentors,

since over 100 days there is a wishlist bug (#695892) for packaging
a new powertop version open and in this bug, there is an nmudiff for
version 2.2. Since the most recent powertop version is now 2.3, I
packaged the new version, which closes several bug, and am asking
hereby for a sponser of the new package. It can be found under [0], a
diff of the debian folder between the two versions is attached.

There are two new lintian warnings:
W: powertop source: outdated-autotools-helper-file config.guess
2012-02-10
W: powertop source: outdated-autotools-helper-file config.sub 2012-02-10
But I do not know, what the best way, with cdbs as build system, would
be to get rid of these warnings, so I just ignored them but if you have
an idea, tell me and I fix the warnings.


With best regards,
Julian Wollrath

[0] http://rbw.goe.net/jw/debian/pool/powertop/
diff -upNr powertop-2.0/debian/changelog powertop/debian/changelog
--- powertop-2.0/debian/changelog	2013-04-21 01:51:55.000000000 +0200
+++ powertop/debian/changelog	2013-06-06 18:59:44.451565647 +0200
@@ -1,3 +1,17 @@
+powertop (2.3-0.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * New upstream version. (Closes: #681380, #682388, #698549, #670115,
+    #685607, #695892, #695893, #705993)
+  * Fix watch file (Closes: #695891).
+  * Add postrm script to remove /var/cache/powertop when purging (Closes:
+    #680510).
+  * Add debug package (Closes: #679579).
+  * Drop not needed patches.
+  * Bump standards version to 3.9.4.
+
+ -- Julian Wollrath <jwollrath@web.de>  Thu, 06 Jun 2013 17:46:37 +0200
+
 powertop (2.0-0.3) unstable; urgency=high
 
   * Non-maintainer upload.
diff -upNr powertop-2.0/debian/control powertop/debian/control
--- powertop-2.0/debian/control	2012-06-26 01:01:00.000000000 +0200
+++ powertop/debian/control	2013-06-06 18:25:39.328640270 +0200
@@ -4,7 +4,7 @@ Priority: extra
 Maintainer: Patrick Winnertz <winnie@debian.org>
 Uploaders: Jose Luis Rivas <ghostbar38@gmail.com>
 Build-Depends: cdbs, debhelper (>= 9), libncurses5-dev, libncursesw5-dev, libnl-3-dev, libnl-genl-3-dev, libpci-dev, pkg-config
-Standards-Version: 3.9.3
+Standards-Version: 3.9.4
 Homepage: https://01.org/powertop/
 
 Package: powertop
@@ -24,3 +24,24 @@ Description: Linux tool to find out what
  information from the kernel into one convenient screen so that you can
  see how well your system is doing, and which components are the
  biggest problem.
+
+Package: powertop-dbg
+Architecture: any
+Section: debug
+Priority: extra
+Depends: powertop (=${binary:Version}), ${misc:Depends}
+Description: debugging symbols for powertop
+ PowerTOP is a Linux tool that finds the software component(s) that
+ make your laptop use more power than necessary while it is idle. As of
+ Linux kernel version 2.6.21, the kernel no longer has a fixed 1000Hz
+ timer tick. This will (in theory) give a huge power savings because
+ the CPU stays in low power mode for longer periods of time during
+ system idle.
+ .
+ However... there are many things that can ruin the party, both inside
+ the kernel and in userspace. PowerTOP combines various sources of
+ information from the kernel into one convenient screen so that you can
+ see how well your system is doing, and which components are the
+ biggest problem.
+ .
+ This package contains the debugging symbols for powertop.
diff -upNr powertop-2.0/debian/patches/0001-csstoh.sh-shell-script-fixes-cross-compiling-issues.patch powertop/debian/patches/0001-csstoh.sh-shell-script-fixes-cross-compiling-issues.patch
--- powertop-2.0/debian/patches/0001-csstoh.sh-shell-script-fixes-cross-compiling-issues.patch	1970-01-01 01:00:00.000000000 +0100
+++ powertop/debian/patches/0001-csstoh.sh-shell-script-fixes-cross-compiling-issues.patch	2013-06-06 18:59:44.316565652 +0200
@@ -0,0 +1,81 @@
+From: Thomas Waldecker <thomas.waldecker@tqs.de>
+Date: Fri, 30 Nov 2012 13:46:27 +0100
+Subject: csstoh.sh shell script fixes cross compiling issues
+
+Added the csstoh.sh shell script from Igor Zhbanov found here:
+http://lists.01.org/pipermail/powertop/2012-July/000151.html
+also patched the Makefile.am to use the csstoh.sh script.
+The compiled csstoh binary doesn't work for cross compiling,
+however Igors Patch never got applied upstream.
+
+Conflicts:
+	src/Makefile.am
+---
+ src/Makefile.am |  3 ++-
+ src/csstoh.sh   | 45 +++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 47 insertions(+), 1 deletion(-)
+ create mode 100755 src/csstoh.sh
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 398b8a7..a53d942 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -46,5 +46,6 @@ AM_LDFLAGS = $(LIBS) $(NCURSES_LIBS) $(PCIUTILS_LIBS) $(LIBNL_LIBS) $(LIBZ_LIBS)
+ BUILT_SOURCES = css.h
+ CLEANFILES = css.h
+ css.h: powertop.css
+-	$(SHELL) ./csstoh.sh powertop.css css.h
++	chmod +x ./csstoh.sh
++	./csstoh.sh "$(srcdir)"/powertop.css css.h
+ 
+diff --git a/src/csstoh.sh b/src/csstoh.sh
+new file mode 100755
+index 0000000..5918d12
+--- /dev/null
++++ b/src/csstoh.sh
+@@ -0,0 +1,45 @@
++#!/bin/bash
++#
++# This program file is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License as published by the
++# Free Software Foundation; version 2 of the License.
++#
++# This program is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++# for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program in a file named COPYING; if not, write to the
++# Free Software Foundation, Inc,
++# 51 Franklin Street, Fifth Floor,
++# Boston, MA 02110-1301 USA
++# or just google for it.
++#
++# Written by Igor Zhbanov<i.zhbanov at samsung.com>
++
++
++if [ $# -lt 2 ]; then
++	echo "Usage: csstoh.sh cssfile header.h"
++	exit 1
++fi
++
++if [ ! -r $1 ]; then
++	echo "Can't find file $1"
++	exit 1
++fi
++
++if ! echo -n>$2; then
++	echo "Can't open file $2 for writing."
++	exit 1
++fi
++
++echo "#ifndef __INCLUDE_GUARD_CCS_H">>  $2
++echo "#define __INCLUDE_GUARD_CCS_H">>  $2
++echo>>  $2
++echo "const char css[] = ">>  $2
++
++sed -r 's/^(.*)$/\t\"\1\\n\"/' $1>>  $2
++
++echo ";">>  $2
++echo "#endif">>  $2
diff -upNr powertop-2.0/debian/patches/0002-csstoh-shell-script-for-cross-compiling.patch powertop/debian/patches/0002-csstoh-shell-script-for-cross-compiling.patch
--- powertop-2.0/debian/patches/0002-csstoh-shell-script-for-cross-compiling.patch	1970-01-01 01:00:00.000000000 +0100
+++ powertop/debian/patches/0002-csstoh-shell-script-for-cross-compiling.patch	2013-06-06 18:59:44.317565652 +0200
@@ -0,0 +1,71 @@
+From: Thomas Waldecker <thomas.waldecker@gmail.com>
+Date: Tue, 5 Feb 2013 09:36:49 +0100
+Subject: csstoh shell-script for cross-compiling
+
+Updated the shellscript with changes made by Igor posted in mailing list
+https://lists.01.org/pipermail/powertop/2012-July/000165.html
+
+Signed-off-by: Thomas Waldecker <thomas.waldecker@gmail.com>
+---
+ src/Makefile.am |  3 +--
+ src/csstoh.sh   | 21 ++++++++++-----------
+ 2 files changed, 11 insertions(+), 13 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index a53d942..398b8a7 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -46,6 +46,5 @@ AM_LDFLAGS = $(LIBS) $(NCURSES_LIBS) $(PCIUTILS_LIBS) $(LIBNL_LIBS) $(LIBZ_LIBS)
+ BUILT_SOURCES = css.h
+ CLEANFILES = css.h
+ css.h: powertop.css
+-	chmod +x ./csstoh.sh
+-	./csstoh.sh "$(srcdir)"/powertop.css css.h
++	$(SHELL) ./csstoh.sh powertop.css css.h
+ 
+diff --git a/src/csstoh.sh b/src/csstoh.sh
+index 5918d12..9d4100b 100755
+--- a/src/csstoh.sh
++++ b/src/csstoh.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # This program file is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU General Public License as published by the
+@@ -16,8 +16,7 @@
+ # Boston, MA 02110-1301 USA
+ # or just google for it.
+ #
+-# Written by Igor Zhbanov<i.zhbanov at samsung.com>
+-
++# Written by Igor Zhbanov <i.zhbanov at samsung.com>
+ 
+ if [ $# -lt 2 ]; then
+ 	echo "Usage: csstoh.sh cssfile header.h"
+@@ -29,17 +28,17 @@ if [ ! -r $1 ]; then
+ 	exit 1
+ fi
+ 
+-if ! echo -n>$2; then
++if ! echo -n >$2; then
+ 	echo "Can't open file $2 for writing."
+ 	exit 1
+ fi
+ 
+-echo "#ifndef __INCLUDE_GUARD_CCS_H">>  $2
+-echo "#define __INCLUDE_GUARD_CCS_H">>  $2
+-echo>>  $2
+-echo "const char css[] = ">>  $2
++echo "#ifndef __INCLUDE_GUARD_CCS_H" >> $2
++echo "#define __INCLUDE_GUARD_CCS_H" >> $2
++echo >> $2
++echo "const char css[] = " >> $2
+ 
+-sed -r 's/^(.*)$/\t\"\1\\n\"/' $1>>  $2
++sed -r 's/^(.*)$/\t\"\1\\n\"/' $1 >> $2
+ 
+-echo ";">>  $2
+-echo "#endif">>  $2
++echo ";" >> $2
++echo "#endif" >> $2
diff -upNr powertop-2.0/debian/patches/long-process-names-nullterm.patch powertop/debian/patches/long-process-names-nullterm.patch
--- powertop-2.0/debian/patches/long-process-names-nullterm.patch	2013-04-21 01:37:22.000000000 +0200
+++ powertop/debian/patches/long-process-names-nullterm.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,26 +0,0 @@
-Description: null-terminate long names of processes, otherwise a crash
- can occur
-Author: Mikko Rapeli <mikko.rapeli@iki.fi>
-Bug-Debian: http://bugs.debian.org/682388
-Forwarded: not-needed
-Last-Update: 20130421
-
---- powertop-2.0.orig/src/process/process.cpp
-+++ powertop-2.0/src/process/process.cpp
-@@ -86,7 +86,7 @@
- 
- process::process(const char *_comm, int _pid, int _tid) : power_consumer()
- {
--	char line[4096];
-+	char line[4097];
- 	ifstream file;
- 
- 	strcpy(comm, _comm);
-@@ -103,6 +103,7 @@
- 		file.open(line);
- 		while (file) {
- 			file.getline(line, 4096);
-+			line[4096] = '\0';
- 			if (strstr(line, "Tgid")) {
- 				char *c;
- 				c = strchr(line, ':');
diff -upNr powertop-2.0/debian/patches/series powertop/debian/patches/series
--- powertop-2.0/debian/patches/series	2013-04-21 01:34:30.000000000 +0200
+++ powertop/debian/patches/series	2013-06-06 18:59:44.317565652 +0200
@@ -1 +1,2 @@
-long-process-names-nullterm.patch
+0001-csstoh.sh-shell-script-fixes-cross-compiling-issues.patch
+0002-csstoh-shell-script-for-cross-compiling.patch
diff -upNr powertop-2.0/debian/postrm powertop/debian/postrm
--- powertop-2.0/debian/postrm	1970-01-01 01:00:00.000000000 +0100
+++ powertop/debian/postrm	2013-06-06 18:25:39.328640270 +0200
@@ -0,0 +1,15 @@
+#!/bin/sh
+#DEBHELPER#
+# Abort if any command returns an error value
+set -e
+
+case "$1" in
+	purge)
+		# This package has previously been removed and is now having
+		# its configuration purged from the system.
+		:
+		rm -rf /var/cache/powertop
+		;;
+esac
+
+exit 0
diff -upNr powertop-2.0/debian/powertop.8 powertop/debian/powertop.8
--- powertop-2.0/debian/powertop.8	2012-06-12 16:35:14.000000000 +0200
+++ powertop/debian/powertop.8	1970-01-01 01:00:00.000000000 +0100
@@ -1,59 +0,0 @@
-.TH POWERTOP 8 "June 1, 2012" "Linux" "powertop manual"
-.SH NAME
-powertop \- a power consumption and power management diagnosis tool.
-.SH SYNOPSIS
-.B powertop
-.RB [
-.IR options
-.RB ]
-.SH DESCRIPTION
-.P
-\fBpowertop\fP is a program that helps to diagnose various issues with power consumption
-and power management. It also has an interactive mode allowing one to
-experiment with various power management settings. When invoking powertop
-without arguments powertop starts in interactive mode.
-.SH OPTIONS
-.TP
-\fB\-\-csv[\fR=\fIFILENAME\fR]
-generate a CSV report. If a filename is not specified then the
-default name "powertop.csv" is used. The CSV report can be
-used for reporting and data analysis.
-.TP
-\fB\-\-calibrate
-runs powertop in calibration mode. When running on battery, powertop
-can track power consumption as well as system activity. When there
-are enough measurements, powertop can start to report power estimates. One
-can get more accurate estimates by using this option to enable a
-calibration cycle. This will cycle through various display levesl and USB
-device activities and workloads.
-.TP
-\fB\-\-debug
- run in "debug" mode.
-.TP
-\fB\-\-extech\fR=\fIdevnode\fR
-use the Extech Power Analyzer for measurements. This allows one to
-specify the serial device node of the serial to USB adaptor connecting to
-the Extech Power Analyzer, for example /dev/ttyUSB0.
-.TP
-\fB\-\-help
- show the help message.
-.TP
-\fB\-\-html[\fR=\fIFILENAME\fR]
-generate an HTML report. If a filename is not specified then the
-default name "powertop.html" is used. The HTML report can be
-sent to others to help diagnose power issues.
-.TP
-\fB\-\-iteration[\fR=\fIiterations\fR]
-number of times to run each test.
-.TP
-\fB\-\-time[\fR=\fIseconds\fR]
-generate a report for a specified number of seconds.
-.TP
-\fB\-\-version
-print version information and exit.
-.SH BUGS
-Send bug reports to <powertop@lists.01.org>
-.SH SEE ALSO
-The program is more fully described at https://01.org/powertop
-.SH AUTHOR
-powertop was written by Arjan van de Ven <arjan@linux.intel.com>, and is currently maintained by Chris E Ferron <chris.e.ferron@linux.intel.com>.
diff -upNr powertop-2.0/debian/powertop.manpages powertop/debian/powertop.manpages
--- powertop-2.0/debian/powertop.manpages	2012-06-12 16:34:35.000000000 +0200
+++ powertop/debian/powertop.manpages	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-debian/powertop.8
diff -upNr powertop-2.0/debian/watch powertop/debian/watch
--- powertop-2.0/debian/watch	2012-05-28 18:33:25.000000000 +0200
+++ powertop/debian/watch	2013-06-06 18:25:39.329640270 +0200
@@ -1,2 +1,2 @@
 version=3
-https://01.org/powertop/downloads https://01.org/powertop/sites/default/files/downloads/powertop-([\d\.]*).tar.bz2
+https://01.org/powertop/downloads https://01.org/powertop/sites/default/files/downloads/powertop-([\d\.]*).tar.gz

Reply to: