Bug#996640: powertop FTBFS: error: format not a string literal and no format arguments [-Werror=format-security]

2021-11-28 Thread Sven Joachim
Control: tags -1 + fixed-upstream

Am 16.10.2021 um 17:44 schrieb Helmut Grohne:

> Source: powertop
> Version: 2.13-2
> Severity: serious
> Tags: ftbfs
>
> powertop fails to build from source in unstable, because ncurses added
> format string annotations. A non-parallel build now ends as follows:
>
> | g++ -std=c++11 -DHAVE_CONFIG_H -I. -I..  -DLOCALEDIR=\"/usr/share/locale\"  
> -I/usr/include/libnl3  -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 
> -I/usr/include/x86_64-linux-gnu -pthread -Wdate-time -D_FORTIFY_SOURCE=2 
> -Wall -Wformat -Wshadow -fno-omit-frame-pointer -fstack-protector  
> -I/usr/include/libnl3 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 
> -I/usr/include/x86_64-linux-gnu -pthread -g -O2 
> -ffile-prefix-map=/<>=. -fstack-protector-strong -Wformat 
> -Werror=format-security -c -o powertop-display.o `test -f 'display.cpp' || 
> echo './'`display.cpp
> | display.cpp: In function ‘void show_tab(unsigned int)’:
> | display.cpp:128:26: error: format not a string literal and no format 
> arguments [-Werror=format-security]
> |   128 | mvwprintw(bottom_line, 0,0, c);
> |   | ~^
> | cc1plus: some warnings being treated as errors
> | make[4]: *** [Makefile:1107: powertop-display.o] Error 1
> | make[4]: Leaving directory '/<>/src'
> | make[3]: *** [Makefile:657: all] Error 2
> | make[3]: Leaving directory '/<>/src'
> | make[2]: *** [Makefile:461: all-recursive] Error 1
> | make[2]: Leaving directory '/<>'
> | make[1]: *** [Makefile:391: all] Error 2
> | make[1]: Leaving directory '/<>'
> | dh_auto_build: error: make -j1 returned exit code 2
> | make: *** [debian/rules:9: binary] Error 25
> | dpkg-buildpackage: error: debian/rules binary subprocess returned exit 
> status 2

The upstream git repository contains a fix for that problem:

https://github.com/fenrus75/powertop/commit/9ef1559a1582f23d599c149601c3a8e06809296c

It looks correct to me, but I have not tested it.

Cheers,
   Sven



Bug#996640: powertop FTBFS: error: format not a string literal and no format arguments [-Werror=format-security]

2021-10-16 Thread Helmut Grohne
Source: powertop
Version: 2.13-2
Severity: serious
Tags: ftbfs

powertop fails to build from source in unstable, because ncurses added
format string annotations. A non-parallel build now ends as follows:

| g++ -std=c++11 -DHAVE_CONFIG_H -I. -I..  -DLOCALEDIR=\"/usr/share/locale\"  
-I/usr/include/libnl3  -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 
-I/usr/include/x86_64-linux-gnu -pthread -Wdate-time -D_FORTIFY_SOURCE=2 -Wall 
-Wformat -Wshadow -fno-omit-frame-pointer -fstack-protector  
-I/usr/include/libnl3 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 
-I/usr/include/x86_64-linux-gnu -pthread -g -O2 
-ffile-prefix-map=/<>=. -fstack-protector-strong -Wformat 
-Werror=format-security -c -o powertop-display.o `test -f 'display.cpp' || echo 
'./'`display.cpp
| display.cpp: In function ‘void show_tab(unsigned int)’:
| display.cpp:128:26: error: format not a string literal and no format 
arguments [-Werror=format-security]
|   128 | mvwprintw(bottom_line, 0,0, c);
|   | ~^
| cc1plus: some warnings being treated as errors
| make[4]: *** [Makefile:1107: powertop-display.o] Error 1
| make[4]: Leaving directory '/<>/src'
| make[3]: *** [Makefile:657: all] Error 2
| make[3]: Leaving directory '/<>/src'
| make[2]: *** [Makefile:461: all-recursive] Error 1
| make[2]: Leaving directory '/<>'
| make[1]: *** [Makefile:391: all] Error 2
| make[1]: Leaving directory '/<>'
| dh_auto_build: error: make -j1 returned exit code 2
| make: *** [debian/rules:9: binary] Error 25
| dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 
2

Helmut