--- powertop-1.11.orig/debian/copyright +++ powertop-1.11/debian/copyright @@ -0,0 +1,33 @@ +This package was debianized by Petter Reinholdtsen on +Sat May 12 23:22:21 CEST 2007. + +It was downloaded from http://www.linuxpowertop.org/download/ + +Upstream Author: + + Arjan van de Ven + +Copyright: + + Copyright (C) 2007 Intel Corporation + +License: + + This package 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 package 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 package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL-2'. + +The Debian packaging is (C) 2007, Petter Reinholdtsen and +is licensed under the GPL, see above. --- powertop-1.11.orig/debian/watch +++ powertop-1.11/debian/watch @@ -0,0 +1,8 @@ +# watch control file for uscan. Run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +http://www.lesswatts.org/projects/powertop/download/powertop-(.*)\.tar\.gz --- powertop-1.11.orig/debian/control +++ powertop-1.11/debian/control @@ -0,0 +1,26 @@ +Source: powertop +Section: utils +Priority: optional +Maintainer: Patrick Winnertz +Uploaders: Jose Luis Rivas +Build-Depends: cdbs, debhelper (>= 5), libncursesw5-dev, libncurses5-dev, dpatch +Standards-Version: 3.7.3 +Homepage: http://www.linuxpowertop.org + +Package: powertop +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Suggests: cpufrequtils, laptop-mode-tools +Description: Linux tool to find out what is using power on a laptop + 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. --- powertop-1.11.orig/debian/changelog +++ powertop-1.11/debian/changelog @@ -0,0 +1,198 @@ +powertop (1.11-1+squeeze1) stable; urgency=low + + * Non-maintainer upload. + * Fix segfault on newer kernels with large config files. + Thanks to Mel Gorman (Closes: #610101) + NMU upload prepared with debdiff created by Patrick Winnertz + and found on debian-release mailing list. + http://lists.debian.org/debian-release/2011/03/msg00292.html + + -- Salvatore Bonaccorso Sun, 01 Jul 2012 13:12:05 +0200 + +powertop (1.11-1) unstable; urgency=low + + * New upstream release + + reports now correct wattage (at least for me) (Closes: #497929) + * Add patch in order to remove bashism in output (Closes: #509811) + * Removed patches as they are now applied upstream: + + patches/fix-eof.dpatch + + patches/add-support-for-charge_now.dpatch + + patches/fix-suggest-usb-autosuspend.dpatch + + patches/fix-hal-disable-polling.dpatch + + + -- Patrick Winnertz Tue, 13 Jan 2009 00:02:01 +0100 + +powertop (1.10-2) unstable; urgency=high + + * Support batteries that do not report energy_now, by reading change_now. + (Closes: #486873, #495638, #495348) + + -- Patrick Winnertz Mon, 01 Sep 2008 20:31:51 +0200 + +powertop (1.10-1) unstable; urgency=low + + * New upstream version (Closes: #486510) + - changed from proc to sys interface (Closes: #462796, #483603) + * Build a PO template on package build (Closes: #471852) + * spell Linux correctly: Linux (control file) + * powertop now quits if it get a EOF (Closes: 458984) + * Updated watch file (Closes: #486509) + * Removed usb patch, source has changed completely. hopefully it was fixed + by upstream. + + -- Patrick Winnertz Mon, 16 Jun 2008 23:55:10 +0200 + +powertop (1.9-2) unstable; urgency=low + + * Changed my maintainer address + * Bumped Standards-Version to 3.7.3. + * Instead of using /dev/scd0 as disk drive use /dev/cdrom for + hal-disable-polling (Created patch fix-hal-disable-polling.dpatch) + (Closes: #443594) + * This time fix really the usb autosuspend issue. (Closes: #444817) + * Add a Homepage field to control. + + -- Patrick Winnertz Sun, 16 Dec 2007 23:33:32 +0100 + +powertop (1.9-1) unstable; urgency=low + + * Packaging new upstream release. (Closes: #451370) + * Fix the wrong implementation of usb autosuspend (Closes: #444817) + + -- Patrick Winnertz Thu, 22 Nov 2007 13:17:38 +0100 + +powertop (1.8-1) unstable; urgency=low + + * Packaging new upstream release. + * Correct the dependency to laptop-mode-tools. (Closes: #438616) + * Correct the command line syntax of hal-disable-polling (Closes: #435882) + * Allow powertop to build on all archs since some informations are still + there (wakeup counts). + + -- Patrick Winnertz Mon, 20 Aug 2007 22:23:53 +0200 + +powertop (1.7~svn-r227-3) unstable; urgency=low + + * debian/control: + + Changed the `arch" field to: `i386 amd64 ia64'. (Closes: #435972) + * debian/copyright: + + Fixed the license related issue, updated to just GPL2 including the + license address to `/usr/share/common-licenses/GPL-2'. (Closes: #436367) + + -- Jose Luis Rivas Thu, 16 Aug 2007 23:01:09 -0400 + +powertop (1.7~svn-r227-2) unstable; urgency=low + + * Thanks to Krzysztof Burghardt for the new package release, but + remove him as co-maintainer, as he is none after all + + -- Patrick Winnertz Fri, 13 Jul 2007 20:39:21 +0200 + +powertop (1.7~svn-r227-1) unstable; urgency=low + + * New co-maintainer + * New upstream (closes: #429305, #430035, #427345) + * Moved binary to /usr/sbin as it need to be run by root (closes: #427548) + * debian/copyright: + + changed a bit to fulfill standard look + + -- Krzysztof Burghardt Sat, 23 Jun 2007 20:30:02 +0200 + +powertop (1.5-2) unstable; urgency=low + + * debian/control: + + Two leading spaces for Homepage (Closes: #426606) + * debian/changelog: + + Fixed typo on "Cooperation" now "Corporation" (Closes: #426605) + + -- Jose Luis Rivas Wed, 30 May 2007 08:46:08 -0400 + +powertop (1.5-1) unstable; urgency=low + + * New upstream release available (Closes: #426507) + * Adding Build-Depends: libncursesw5-dev since powertop fails to build without it. + * Modified debian/copyright: + - added (c) 2007 Intel Corporation + - powertop is licensed under GPL v2 (added v2) + + -- Patrick Winnertz Tue, 29 May 2007 13:43:06 +0200 + +powertop (1.4-2) unstable; urgency=low + + [ Jose Luis Rivas ] + * debian/control: + + Fixed the Homepage field (Closes: #426205) + + Modified the uploader name to "Jose Luis Rivas" + + [ Patrick Winnertz ] + * Fixed FTBFS, by depending on libncurses5-dev (Closes: #426235) + * Uses $(CURDIR) instead of `pwd` in rules. + * Upload sponsored by Petter Reinholdtsen + + -- Patrick Winnertz Sun, 27 May 2007 17:59:38 +0200 + +powertop (1.4-1) unstable; urgency=low + + * New upstream release + * Now powertop uses the full width of a terminal. (Fixed by upstream) + (Closes: #423735) + * Changed the destdir in debian/rules so that the locale files are installed correctly + to debian/powertop/usr/share/locale/: + - DESTDIR=debian/powertop --> DESTDIR=`pwd`/debian/powertop + * Upload sponsored by Petter Reinholdtsen + + -- Patrick Winnertz Sat, 26 May 2007 17:24:27 +0200 + +powertop (1.3-1) unstable; urgency=low + + * New upstream release (Closes: #425498) + * Suggests cpufrequtils (Closes: #423986) + * Clean up debian/rules: + - removes simple-patchsys.mk since it not used + - remove the installation of the manpage since we now use debian/manpages + ( Thanks to Jose ) + + -- Patrick Winnertz Fri, 25 May 2007 16:48:52 +0200 + +powertop (1.2-1) unstable; urgency=low + + * New upstream release available. + * Took the package from pere, and added me as Maintainer and Jose Luis + Rivas Contreras into the Uploader field. + * Removed the manpage from the debian-dir since it is now upstream and adjusted + the install command in debian/rules. + * Removed the makefile patch, since it is now upstream + + -- Patrick Winnertz Wed, 16 May 2007 12:35:58 +0200 + +powertop (1.1-3) unstable; urgency=low + + * Add watch file written by Ralf Meyer for Ubuntu. Removed + most of the examples. + + -- Petter Reinholdtsen Mon, 14 May 2007 08:08:24 +0200 + +powertop (1.1-2) unstable; urgency=low + + * Add powertop(1) manual page. Written by Carlo + Segre. (Closes: #423607) + + -- Petter Reinholdtsen Sun, 13 May 2007 21:13:00 +0200 + +powertop (1.1-1) unstable; urgency=low + + * New upstream release. + * Rewrite debian/rules to use cdbs and simple-patchsys. + * Change section from x11 to utils. It make more sense + for this tool. + * Rewrite 10_makefile.patch as most of the changes are + included upstream. + + -- Petter Reinholdtsen Sun, 13 May 2007 12:10:15 +0200 + +powertop (1.0-1) unstable; urgency=low + + * Initial release (Closes: #423504) + + -- Petter Reinholdtsen Sat, 12 May 2007 23:13:05 +0200 --- powertop-1.11.orig/debian/rules +++ powertop-1.11/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/class/makefile.mk +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/dpatch.mk + +DEB_MAKE_INSTALL_TARGET = install BINDIR=/usr/sbin DESTDIR=`pwd`/debian/powertop + +common-post-build-arch:: + make uptrans || true --- powertop-1.11.orig/debian/manpages +++ powertop-1.11/debian/manpages @@ -0,0 +1 @@ +powertop.1 --- powertop-1.11.orig/debian/compat +++ powertop-1.11/debian/compat @@ -0,0 +1 @@ +5 --- powertop-1.11.orig/debian/patches/remove-bashism.dpatch +++ powertop-1.11/debian/patches/remove-bashism.dpatch @@ -0,0 +1,33 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## remove-bashism.dpatch by Patrick Winnertz +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: remove some bashisms in the output + +@DPATCH@ +diff --git a/cpufreq.c b/cpufreq.c +index ab84dc4..a291fdf 100644 +--- a/cpufreq.c ++++ b/cpufreq.c +@@ -39,7 +39,7 @@ static void activate_ondemand(void) + FILE *file; + char filename[PATH_MAX]; + +- system("/sbin/modprobe cpufreq_ondemand &> /dev/null"); ++ system("/sbin/modprobe cpufreq_ondemand > /dev/null 2>&1"); + + + dir = opendir("/sys/devices/system/cpu"); +diff --git a/powertop.c b/powertop.c +index fc605ec..4d18de8 100644 +--- a/powertop.c ++++ b/powertop.c +@@ -798,7 +798,7 @@ int main(int argc, char **argv) + if (!dump) + ticktime = 5.0; + +- system("/sbin/modprobe cpufreq_stats &> /dev/null"); ++ system("/sbin/modprobe cpufreq_stats > /dev/null 2>&1"); + read_data(&start_usage[0], &start_duration[0]); + + --- powertop-1.11.orig/debian/patches/00list +++ powertop-1.11/debian/patches/00list @@ -0,0 +1,2 @@ +remove-bashism.dpatch +increase-configlimit.dpatch --- powertop-1.11.orig/debian/patches/increase-configlimit.dpatch +++ powertop-1.11/debian/patches/increase-configlimit.dpatch @@ -0,0 +1,59 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## increase-configlimit.patch.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' powertop-1.11~/config.c powertop-1.11/config.c +--- powertop-1.11~/config.c 2011-03-11 19:06:28.000000000 +0100 ++++ powertop-1.11/config.c 2011-03-17 13:23:23.969122826 +0100 +@@ -33,9 +33,14 @@ + #include "powertop.h" + + /* static arrays are not nice programming.. but they're easy */ +-static char configlines[5000][100]; ++static char configlines[MAXCONFIGLINES][100]; + static int configcount; + ++static void cleanup_curses_w_errormsg(void) { ++ endwin(); ++ printf(_("Your kernel config exceeds the limit of %i lines, aborting!\n"),MAXCONFIGLINES); ++} ++ + static void read_kernel_config(void) + { + FILE *file; +@@ -49,6 +54,10 @@ + char line[100]; + if (fgets(line, 100, file) == NULL) + break; ++ if (configcount >= MAXCONFIGLINES) { ++ atexit(cleanup_curses_w_errormsg); ++ exit(EXIT_FAILURE); ++ } + strcpy(configlines[configcount++], line); + } + pclose(file); +@@ -77,6 +86,10 @@ + char line[100]; + if (fgets(line, 100, file) == NULL) + break; ++ if (configcount >= MAXCONFIGLINES) { ++ atexit(cleanup_curses_w_errormsg); ++ exit(EXIT_FAILURE); ++ } + strcpy(configlines[configcount++], line); + } + fclose(file); +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' powertop-1.11~/powertop.h powertop-1.11/powertop.h +--- powertop-1.11~/powertop.h 2008-12-30 19:52:54.000000000 +0100 ++++ powertop-1.11/powertop.h 2011-03-17 13:23:35.981182381 +0100 +@@ -88,6 +88,7 @@ + + #define _(STRING) gettext(STRING) + ++#define MAXCONFIGLINES 10000 + + #define PT_COLOR_DEFAULT 1 + #define PT_COLOR_HEADER_BAR 2