[lintian] 01/01: t: Build tests with hardening=+all by default
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 44a99b2289492e91f026fa365f6d444c772c658c
Author: Niels Thykier <niels@thykier.net>
Date: Fri Jan 22 18:38:52 2016 +0000
t: Build tests with hardening=+all by default
Signed-off-by: Niels Thykier <niels@thykier.net>
---
t/templates/tests/pedantic/debian/rules | 2 +-
t/templates/tests/skel/debian/rules | 2 +-
t/tests/binaries-general/debian/Makefile | 9 ++++++---
t/tests/binaries-general/debian/debian/rules | 2 +-
t/tests/binaries-golang/debian/Makefile | 4 +++-
.../binaries-missing-depends-on-numpy-abi/debian/debian/rules | 2 +-
6 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/t/templates/tests/pedantic/debian/rules b/t/templates/tests/pedantic/debian/rules
index 53d3e78..4411cbf 100755
--- a/t/templates/tests/pedantic/debian/rules
+++ b/t/templates/tests/pedantic/debian/rules
@@ -1,6 +1,6 @@
#!/usr/bin/make -f
-export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
%:
dh $@
diff --git a/t/templates/tests/skel/debian/rules b/t/templates/tests/skel/debian/rules
index c1e39fb..b8b1ea0 100755
--- a/t/templates/tests/skel/debian/rules
+++ b/t/templates/tests/skel/debian/rules
@@ -1,6 +1,6 @@
#!/usr/bin/make -f
-export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
%:
dh $@
diff --git a/t/tests/binaries-general/debian/Makefile b/t/tests/binaries-general/debian/Makefile
index 486ff4c..387c368 100644
--- a/t/tests/binaries-general/debian/Makefile
+++ b/t/tests/binaries-general/debian/Makefile
@@ -1,11 +1,14 @@
+NOPIE_CFLAGS = $(filter-out -fPIE,$(CFLAGS))
+NOPIE_LDFLAGS = $(filter-out -fPIE -pie,$(LDFLAGS))
COMPILE:= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
+COMPILE_NOPIE:= $(CC) $(NOPIE_CFLAGS) $(CPPFLAGS) $(NOPIE_LDFLAGS)
# extract from readelf
GETBUILDID:=./getbuildid
all:
# rpath not matching any of the exceptions to the rpath checks
# - with profiling enabled.
- $(COMPILE) -o basic basic.c -pg -Wl,--rpath,/usr/local/lib
+ $(COMPILE_NOPIE) -o basic basic.c -pg -Wl,--rpath,/usr/local/lib
# rpath shipped in the package, but one of {/usr}?/lib
$(COMPILE) -o basiclibrpath basic.c -Wl,--rpath,/usr/lib
# non-special rpath shipped in the package
@@ -13,9 +16,9 @@ all:
# special rpath shipped in the package, multiple paths
$(COMPILE) -o basicshippedrpathmore basic.c -Wl,--rpath,/usr/lib/binaries-general:/usr/lib/binaries-general/bar
# static version of basic for debugging checks
- $(COMPILE) -static -o basic.static basic.c
+ $(COMPILE_NOPIE) -static -o basic.static basic.c
# static executable to trigger ocaml check
- $(COMPILE) -o ocaml-exec ocaml.c
+ $(COMPILE_NOPIE) -o ocaml-exec ocaml.c
# version with debug
$(COMPILE) -o basicdebug -g3 -Wl,--build-id basic.c
diff --git a/t/tests/binaries-general/debian/debian/rules b/t/tests/binaries-general/debian/debian/rules
index 22fb496..d23f8c7 100644
--- a/t/tests/binaries-general/debian/debian/rules
+++ b/t/tests/binaries-general/debian/debian/rules
@@ -1,6 +1,6 @@
#!/usr/bin/make -f
-export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
%:
dh $@
diff --git a/t/tests/binaries-golang/debian/Makefile b/t/tests/binaries-golang/debian/Makefile
index a489edd..f04b342 100644
--- a/t/tests/binaries-golang/debian/Makefile
+++ b/t/tests/binaries-golang/debian/Makefile
@@ -1,4 +1,6 @@
-COMPILE:= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
+NOPIE_CFLAGS = $(filter-out -fPIE,$(CFLAGS))
+NOPIE_LDFLAGS = $(filter-out -fPIE -pie,$(LDFLAGS))
+COMPILE:= $(CC) $(NOPIE_CFLAGS) $(CPPFLAGS) $(NOPIE_LDFLAGS)
all:
# static version
diff --git a/t/tests/binaries-missing-depends-on-numpy-abi/debian/debian/rules b/t/tests/binaries-missing-depends-on-numpy-abi/debian/debian/rules
index ab6901d..742b575 100644
--- a/t/tests/binaries-missing-depends-on-numpy-abi/debian/debian/rules
+++ b/t/tests/binaries-missing-depends-on-numpy-abi/debian/debian/rules
@@ -1,6 +1,6 @@
#!/usr/bin/make -f
-export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie
%:
dh $@
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: