Re: [SRU] update for powertop in 6.0.1

2012-07-02 Thread Adam D. Barratt
Hi,

On Sun, 2012-07-01 at 18:11 +0200, Salvatore Bonaccorso wrote:
 On Sun, Jul 01, 2012 at 04:41:35PM +0100, Adam D. Barratt wrote:
  On Sun, 2012-07-01 at 14:57 +0200, Salvatore Bonaccorso wrote:
   As discussed last week shortly on IRC, attached is now the debdiff
   (only changed changelog entry to reflect NMU) for powertop.
   
   (I have added win...@debian.org to recipient lists)
   
   Can I upload this?
  
  Please go ahead; thanks.
 
 Thanks, just uploaded some minutes ago.

Flagged for acceptance; thanks.

Regards,

Adam


-- 
To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1341259483.8481.10.ca...@jacala.jungle.funky-badger.org



Re: [SRU] update for powertop in 6.0.1

2012-07-01 Thread Salvatore Bonaccorso
Hi Adam

On Tue, Jun 26, 2012 at 07:31:00PM +0200, Salvatore Bonaccorso wrote:
 Hi
 
 On Fri, Apr 06, 2012 at 09:42:54PM +0100, Adam D. Barratt wrote:
  On Tue, 2011-11-22 at 21:26 +, Adam D. Barratt wrote:
   On Wed, 2011-10-19 at 18:18 +0200, Philipp Kern wrote:
On Thu, Mar 17, 2011 at 01:39:03PM +0100, Patrick Winnertz wrote:
  Impressive design.  What would happen if it skips half of the 
  config?  I
  agree that not segfaulting is incredibly better than segfaulting, 
  but like
  this the remaining bunch of lines will be silently ignored?
 I've rewritten the patch from Mel Gorman, now you'll get a printf 
 output on 
 the console if the config file is too large (and powertop will 
 abort). 
 Please have a look on the updated debdiff attached to this mail.

Bug reports are much easier to track.  Please go ahead and sorry for
the delay.
   
   Ping?
  
  Re-ping.
 
 Is there something one can help for getting this into a stable point
 release?
 
 @Release-Team: I know you will be more busy for the wheezy release
 now!

As discussed last week shortly on IRC, attached is now the debdiff
(only changed changelog entry to reflect NMU) for powertop.

(I have added win...@debian.org to recipient lists)

Can I upload this?

Regards,
Salvatore
diff -u powertop-1.11/debian/changelog powertop-1.11/debian/changelog
--- powertop-1.11/debian/changelog
+++ powertop-1.11/debian/changelog
@@ -1,3 +1,14 @@
+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
+win...@debian.org and found on debian-release mailing list.
+http://lists.debian.org/debian-release/2011/03/msg00292.html
+
+ -- Salvatore Bonaccorso car...@debian.org  Sun, 01 Jul 2012 13:12:05 +0200
+
 powertop (1.11-1) unstable; urgency=low
 
   * New upstream release
@@ -188 +198,0 @@
-
diff -u powertop-1.11/debian/patches/00list powertop-1.11/debian/patches/00list
--- powertop-1.11/debian/patches/00list
+++ powertop-1.11/debian/patches/00list
@@ -1,0 +2 @@
+increase-configlimit.dpatch
only in patch2:
unchanged:
--- 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  m...@csn.ul.ie
+##
+## 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.0 +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.0 +0100
 powertop-1.11/powertop.h	2011-03-17 13:23:35.981182381 +0100
+@@ -88,6 +88,7 @@
+ 
+ #define _(STRING)gettext(STRING)
+ 
++#define MAXCONFIGLINES 1
+ 
+ #define PT_COLOR_DEFAULT1
+ #define PT_COLOR_HEADER_BAR 2


signature.asc
Description: Digital signature


Re: [SRU] update for powertop in 6.0.1

2012-07-01 Thread Adam D. Barratt
On Sun, 2012-07-01 at 14:57 +0200, Salvatore Bonaccorso wrote:
 As discussed last week shortly on IRC, attached is now the debdiff
 (only changed changelog entry to reflect NMU) for powertop.
 
 (I have added win...@debian.org to recipient lists)
 
 Can I upload this?

Please go ahead; thanks.

Regards,

Adam


-- 
To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1341157295.3721.5.ca...@jacala.jungle.funky-badger.org



Re: [SRU] update for powertop in 6.0.1

2012-07-01 Thread Salvatore Bonaccorso
Hi Adam

On Sun, Jul 01, 2012 at 04:41:35PM +0100, Adam D. Barratt wrote:
 On Sun, 2012-07-01 at 14:57 +0200, Salvatore Bonaccorso wrote:
  As discussed last week shortly on IRC, attached is now the debdiff
  (only changed changelog entry to reflect NMU) for powertop.
  
  (I have added win...@debian.org to recipient lists)
  
  Can I upload this?
 
 Please go ahead; thanks.

Thanks, just uploaded some minutes ago.

Regards,
Salvatore


signature.asc
Description: Digital signature


Re: [SRU] update for powertop in 6.0.1

2012-06-26 Thread Salvatore Bonaccorso
Hi

On Fri, Apr 06, 2012 at 09:42:54PM +0100, Adam D. Barratt wrote:
 On Tue, 2011-11-22 at 21:26 +, Adam D. Barratt wrote:
  On Wed, 2011-10-19 at 18:18 +0200, Philipp Kern wrote:
   On Thu, Mar 17, 2011 at 01:39:03PM +0100, Patrick Winnertz wrote:
 Impressive design.  What would happen if it skips half of the 
 config?  I
 agree that not segfaulting is incredibly better than segfaulting, but 
 like
 this the remaining bunch of lines will be silently ignored?
I've rewritten the patch from Mel Gorman, now you'll get a printf 
output on 
the console if the config file is too large (and powertop will abort). 
Please have a look on the updated debdiff attached to this mail.
   
   Bug reports are much easier to track.  Please go ahead and sorry for
   the delay.
  
  Ping?
 
 Re-ping.

Is there something one can help for getting this into a stable point
release?

@Release-Team: I know you will be more busy for the wheezy release
now!

Regards,
Salvatore


signature.asc
Description: Digital signature


Re: [SRU] update for powertop in 6.0.1

2012-04-06 Thread Adam D. Barratt
On Tue, 2011-11-22 at 21:26 +, Adam D. Barratt wrote:
 On Wed, 2011-10-19 at 18:18 +0200, Philipp Kern wrote:
  On Thu, Mar 17, 2011 at 01:39:03PM +0100, Patrick Winnertz wrote:
Impressive design.  What would happen if it skips half of the config? 
 I
agree that not segfaulting is incredibly better than segfaulting, but 
like
this the remaining bunch of lines will be silently ignored?
   I've rewritten the patch from Mel Gorman, now you'll get a printf output 
   on 
   the console if the config file is too large (and powertop will abort). 
   Please have a look on the updated debdiff attached to this mail.
  
  Bug reports are much easier to track.  Please go ahead and sorry for
  the delay.
 
 Ping?

Re-ping.

Regards,

Adam


-- 
To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1333744974.24386.45.ca...@jacala.jungle.funky-badger.org



Re: [SRU] update for powertop in 6.0.1

2011-11-22 Thread Adam D. Barratt
On Wed, 2011-10-19 at 18:18 +0200, Philipp Kern wrote:
 On Thu, Mar 17, 2011 at 01:39:03PM +0100, Patrick Winnertz wrote:
   Impressive design.  What would happen if it skips half of the config?  I
   agree that not segfaulting is incredibly better than segfaulting, but like
   this the remaining bunch of lines will be silently ignored?
  I've rewritten the patch from Mel Gorman, now you'll get a printf output on 
  the console if the config file is too large (and powertop will abort). 
  Please have a look on the updated debdiff attached to this mail.
 
 Bug reports are much easier to track.  Please go ahead and sorry for
 the delay.

Ping?

Regards,

Adam


-- 
To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1321997218.16755.11.ca...@hathi.jungle.funky-badger.org



Re: [SRU] update for powertop in 6.0.1

2011-10-19 Thread Philipp Kern
On Thu, Mar 17, 2011 at 01:39:03PM +0100, Patrick Winnertz wrote:
  Impressive design.  What would happen if it skips half of the config?  I
  agree that not segfaulting is incredibly better than segfaulting, but like
  this the remaining bunch of lines will be silently ignored?
 I've rewritten the patch from Mel Gorman, now you'll get a printf output on 
 the console if the config file is too large (and powertop will abort). 
 Please have a look on the updated debdiff attached to this mail.

Bug reports are much easier to track.  Please go ahead and sorry for
the delay.

Kind regards
Philipp Kern


signature.asc
Description: Digital signature


Re: [SRU] update for powertop in 6.0.1

2011-03-17 Thread Patrick Winnertz
Hey,

 Impressive design.  What would happen if it skips half of the config?  I
 agree that not segfaulting is incredibly better than segfaulting, but like
 this the remaining bunch of lines will be silently ignored?
I've rewritten the patch from Mel Gorman, now you'll get a printf output on 
the console if the config file is too large (and powertop will abort). 
Please have a look on the updated debdiff attached to this mail.

Greetings
Winnie
diff -u powertop-1.11/debian/changelog powertop-1.11/debian/changelog
--- powertop-1.11/debian/changelog
+++ powertop-1.11/debian/changelog
@@ -1,3 +1,10 @@
+powertop (1.11-1+squeeze1) stable; urgency=low
+
+  * Fix segfault on newer kernels with large config files. 
+Thanks to Mel Gorman (Closes: #610101) 
+
+ -- Patrick Winnertz win...@debian.org  Fri, 11 Mar 2011 11:22:33 +0100
+
 powertop (1.11-1) unstable; urgency=low
 
   * New upstream release
diff -u powertop-1.11/debian/patches/00list powertop-1.11/debian/patches/00list
--- powertop-1.11/debian/patches/00list
+++ powertop-1.11/debian/patches/00list
@@ -1,0 +2 @@
+increase-configlimit.dpatch
only in patch2:
unchanged:
--- 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  m...@csn.ul.ie
+##
+## 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.0 +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.0 +0100
 powertop-1.11/powertop.h	2011-03-17 13:23:35.981182381 +0100
+@@ -88,6 +88,7 @@
+ 
+ #define _(STRING)gettext(STRING)
+ 
++#define MAXCONFIGLINES 1
+ 
+ #define PT_COLOR_DEFAULT1
+ #define PT_COLOR_HEADER_BAR 2


Re: [SRU] update for powertop in 6.0.1

2011-03-11 Thread Philipp Kern
On Fri, Mar 11, 2011 at 11:59:51AM +0100, Patrick Winnertz wrote:
 Hey,
 
 I would like to close one important bug in powertop, which affects the usage 
 on newer kernels (e.g. 2.6.37), as powertop will segfault on such kernels 
 due to too small buffer (see #610101).
 
 Please see my attached patch for powertop 1.11-1+squeeze1

Impressive design.  What would happen if it skips half of the config?  I
agree that not segfaulting is incredibly better than segfaulting, but like
this the remaining bunch of lines will be silently ignored?

Kind regards
Philipp Kern


signature.asc
Description: Digital signature