Control: tags 777808 + patch
Control: tags 777808 + pending

Dear maintainer,

I've prepared an NMU for bwm-ng (versioned as 0.6-3.2) and
uploaded it to DELAYED/5. Please feel free to tell me if I
should delay it longer.

Regards.

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer -  https://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Ben Weaver: Voice In The Wilderness
diff -Nru bwm-ng-0.6/debian/changelog bwm-ng-0.6/debian/changelog
--- bwm-ng-0.6/debian/changelog	2012-05-06 15:09:08.000000000 +0200
+++ bwm-ng-0.6/debian/changelog	2015-07-19 19:01:20.000000000 +0200
@@ -1,3 +1,17 @@
+bwm-ng (0.6-3.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix "ftbfs with GCC-5": adopt changes from Ubuntu:
+    - Fix causes of "warning: format not a string literal and no format
+      arguments" in src/output.c which were causing a strange message of
+      'cc1: error: unrecognized command line option "-Wno-long-double"'
+    - Check return value of fgets in src/input/proc_diskstats.c which
+      led to the same error as above.
+    Additionally add "-std=gnu89" to CFLAGS in debian/rules.
+    (Closes: #777808)
+
+ -- gregor herrmann <[email protected]>  Sun, 19 Jul 2015 19:01:18 +0200
+
 bwm-ng (0.6-3.1) unstable; urgency=low
 
   * Non-maintainer upload; ACKed by the maintainer.
diff -Nru bwm-ng-0.6/debian/patches/01_not_a_string_literal.patch bwm-ng-0.6/debian/patches/01_not_a_string_literal.patch
--- bwm-ng-0.6/debian/patches/01_not_a_string_literal.patch	1970-01-01 01:00:00.000000000 +0100
+++ bwm-ng-0.6/debian/patches/01_not_a_string_literal.patch	2015-07-19 18:50:12.000000000 +0200
@@ -0,0 +1,44 @@
+Description: Fix causes of "warning: format not a string literal and no format arguments" in src/output.c which were causing a strange message of 'cc1: error: unrecognized command line option "-Wno-long-double". Check return value of fgets in src/input/proc_diskstats.c which led to the same error as above.
+Author: James Westby <[email protected]>
+
+--- bwm-ng-0.6.orig/src/output.c
++++ bwm-ng-0.6/src/output.c
+@@ -223,8 +223,8 @@ int print_header(int option) {
+ 		        fprintf(tmp_out_file,"<title>bwm-ng stats</title>\n</head>\n<body>\n");
+ 			}
+ 	        fprintf(tmp_out_file,"<div class=\"bwm-ng-header\">bwm-ng bwm-ng v" VERSION " (refresh %is); input: ",html_refresh);
+-            fprintf(tmp_out_file,input2str());
+-            fprintf(tmp_out_file,show_all_if2str());
++            fprintf(tmp_out_file,"%s", input2str());
++            fprintf(tmp_out_file,"%s", show_all_if2str());
+ 	        fprintf(tmp_out_file,"</div><table class=\"bwm-ng-output\">");
+ 			fprintf(tmp_out_file,"<tr class=\"bwm-ng-head\"><td class=\"bwm-ng-name\">Interface</td><td>Rx</td><td>Tx</td><td>Total</td></tr>");
+ 			break;
+@@ -234,7 +234,7 @@ int print_header(int option) {
+ 			if (output_method==PLAIN_OUT && ansi_output) printf("\033[1;2H");
+ 	        printf("bwm-ng v" VERSION " (delay %2.3fs); ",(float)delay/1000);
+ 			if (output_method==PLAIN_OUT) printf("press 'ctrl-c' to end this%s",(ansi_output ? "\033[2;2H" : "")); else printf("input: ");
+-            printf(input2str());
++            printf("%s", input2str());
+             printf("%s\n",show_all_if2str());
+ 			if (output_method==PLAIN_OUT) {
+ 				if (ansi_output)
+--- bwm-ng-0.6.orig/src/input/proc_diskstats.c
++++ bwm-ng-0.6/src/input/proc_diskstats.c
+@@ -85,8 +85,14 @@ void get_disk_stats_proc (char verbose)
+ 			diskstats_works = 1;
+ 		} else {
+ 			/* skip first two lines in /proc/partitions */
+-			fgets(buffer,MAX_LINE_BUFFER,f);
+-			fgets(buffer,MAX_LINE_BUFFER,f);
++			if (fgets(buffer,MAX_LINE_BUFFER,f) &&
++					fgets(buffer,MAX_LINE_BUFFER,f)) {
++						/* read correctly */
++						;
++			} else {
++				/* error or EOF while reading file, either way we can't continue */
++				deinit(1, "reading %s failed, or file was too short: %s\n", PROC_PARTITIONS_FILE, strerror(errno));
++			}
+ 		}
+ 	}
+ 
diff -Nru bwm-ng-0.6/debian/patches/series bwm-ng-0.6/debian/patches/series
--- bwm-ng-0.6/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ bwm-ng-0.6/debian/patches/series	2015-07-19 18:50:12.000000000 +0200
@@ -0,0 +1 @@
+01_not_a_string_literal.patch
diff -Nru bwm-ng-0.6/debian/rules bwm-ng-0.6/debian/rules
--- bwm-ng-0.6/debian/rules	2012-04-29 08:12:27.000000000 +0200
+++ bwm-ng-0.6/debian/rules	2015-07-19 18:55:03.000000000 +0200
@@ -7,7 +7,7 @@
 
 
 
-CFLAGS = -Wall -g
+CFLAGS = -Wall -g -std=gnu89
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 	CFLAGS += -O0

Attachment: signature.asc
Description: Digital Signature

Reply via email to