Olá,
Estou preparando um NMU para o pacote tzc. Último
upload do mantenedor em 2005. Este é o quarto.
Tem dois lintian sobre hardening. Se colocar
hardening=+all no debian/rules o pacote não
constrói. Então fiz:
- bindnow. Tirei colocando no debian/rules:
export DEB_BUILD_MAINT_OPTIONS := hardening=+bindnow
- pie: Alterei o Makefile adicionando as opções:
-fPIE -pie -O2 -fstack-protector-strong -Wformat
Assim o pacote constrói sem os dois lintians. O complemento
'-O2 -fstack-protector-strong -Wformat' é porque o 'blhc' reclama.
Ele ainda reclama de '-Werror=format-security', mas se isso
for adicionado o pacote não constroi:
gcc -g -O -Wall -DINTERREALM -fPIE -pie -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c -o tzc.o tzc.c
tzc.c: In function ‘check’:
tzc.c:390:7: error: format not a string literal and no format arguments [-Werror=format-security]
com_err(__FILE__, e, s);
^
tzc.c: In function ‘warn’:
tzc.c:398:7: error: format not a string literal and no format arguments [-Werror=format-security]
com_err(__FILE__, e, s);
^
tzc.c: In function ‘send_zgram_to_one’:
tzc.c:713:33: error: format not a string literal and no format arguments [-Werror=format-security]
com_err(__FILE__, retval, bfr);
^
cc1: some warnings being treated as errors
<builtin>: recipe for target 'tzc.o' failed
Acho que 'com_err' é do pacote comerr-dev.
Tem solução ? Li isso[0], mas o arquivo é de outro
pacote.
[0] - https://fedoraproject.org/wiki/Format-Security-FAQ
O debian/rules:
#!/usr/bin/make -f
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS := hardening=+bindnow #,+pie
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
%:
dh $@
Para onde vai a 'INSTALL_PROGRAM' ? O pacote não
tem repositório, mas ela não aparece em nenhum outro
lugar.
abraços,
--
Herbert Parentes Fortes Neto (hpfn)
Attachment:
pgpXFd5oMDgwc.pgp
Description: PGP signature