Bug#972958: pipemeter FTBFS: error: format not a string literal and no format arguments

2020-12-30 Thread Logan Rosen
Package: pipemeter
Version: 1.1.4-1
Followup-For: Bug #972958
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu hirsute ubuntu-patch
X-Debbugs-Cc: lo...@ubuntu.com
Control: tags -1 patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

  * d/p/format-security-error.patch: Fix format-security error by using fputs
instead of fprintf.
  * d/p/fix-make-install.patch: Fix issues with make install by using DESTDIR
and adjusting install arguments.

Thanks for considering the patch.

Logan

-- System Information:
Debian Release: bullseye/sid
  APT prefers groovy-updates
  APT policy: (500, 'groovy-updates'), (500, 'groovy-security'), (500, 
'groovy'), (100, 'groovy-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.8.0-33-generic (SMP w/8 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru pipemeter-1.1.4/debian/patches/fix-make-install.patch 
pipemeter-1.1.4/debian/patches/fix-make-install.patch
--- pipemeter-1.1.4/debian/patches/fix-make-install.patch   1969-12-31 
19:00:00.0 -0500
+++ pipemeter-1.1.4/debian/patches/fix-make-install.patch   2020-12-31 
00:13:00.0 -0500
@@ -0,0 +1,13 @@
+--- a/Makefile.in
 b/Makefile.in
+@@ -24,8 +24,8 @@
+   
+ 
+ install: pipemeter pipemeter.1
+-  install -p pipemeter $(PREFIX)/bin
+-  install -p pipemeter.1 $(PREFIX)/man/man1
++  install -Dp -t $(DESTDIR)$(PREFIX)/bin pipemeter
++  install -Dp -t $(DESTDIR)$(PREFIX)/man/man1 pipemeter.1
+ 
+ dist: pipemeter
+   sh pkgpipemeter.sh
diff -Nru pipemeter-1.1.4/debian/patches/format-security-error.patch 
pipemeter-1.1.4/debian/patches/format-security-error.patch
--- pipemeter-1.1.4/debian/patches/format-security-error.patch  1969-12-31 
19:00:00.0 -0500
+++ pipemeter-1.1.4/debian/patches/format-security-error.patch  2020-12-31 
00:12:44.0 -0500
@@ -0,0 +1,29 @@
+--- a/pipemeter.c
 b/pipemeter.c
+@@ -397,7 +397,7 @@
+ fprintf(stderr,"\n");
+ exit(1);
+   } else {
+-fprintf(stderr,trailer);
++fputs(trailer,stderr);
+   }
+ }
+  
+@@ -487,7 +487,7 @@
+   }
+ 
+   strncpy(progressbar+1,progressfill,progress);
+-  fprintf(stderr, progressbar);
++  fputs(progressbar,stderr);
+   fprintf(stderr," %s/s",buf2);
+   formatbytes(buf2,bytes);
+   fprintf(stderr," %s",buf2);
+@@ -497,7 +497,7 @@
+ fprintf(stderr,"\n");
+ exit(0);
+   } else {
+-fprintf(stderr,trailer);
++fputs(trailer,stderr);
+   }
+ }
+ 
diff -Nru pipemeter-1.1.4/debian/patches/series 
pipemeter-1.1.4/debian/patches/series
--- pipemeter-1.1.4/debian/patches/series   1969-12-31 19:00:00.0 
-0500
+++ pipemeter-1.1.4/debian/patches/series   2020-12-31 00:13:00.0 
-0500
@@ -0,0 +1,2 @@
+format-security-error.patch
+fix-make-install.patch


Bug#972958: pipemeter FTBFS: error: format not a string literal and no format arguments

2020-10-26 Thread Adrian Bunk
Source: pipemeter
Version: 1.1.4-1
Severity: serious
Tags: ftbfs

https://buildd.debian.org/status/package.php?p=pipemeter&suite=sid

...
   dh_auto_build -a
make -j4
make[1]: Entering directory '/<>'
gcc -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 
-DHAVE_CONFIG_H pipemeter.c -o pipemeter -Wl,-z,relro
pipemeter.c: In function ‘show_just_rate’:
pipemeter.c:400:5: error: format not a string literal and no format arguments 
[-Werror=format-security]
  400 | fprintf(stderr,trailer);
  | ^~~
pipemeter.c: In function ‘show_progress’:
pipemeter.c:490:3: error: format not a string literal and no format arguments 
[-Werror=format-security]
  490 |   fprintf(stderr, progressbar);
  |   ^~~
pipemeter.c:500:5: error: format not a string literal and no format arguments 
[-Werror=format-security]
  500 | fprintf(stderr,trailer);
  | ^~~
pipemeter.c: In function ‘parseopts’:
pipemeter.c:577:22: warning: cast from pointer to integer of different size 
[-Wpointer-to-int-cast]
  577 |   while(listdone=(int)fgets(listline,MAX_LINE,listfile)) {
  |  ^
cc1: some warnings being treated as errors
make[1]: *** [Makefile:10: pipemeter] Error 1