[Reproducible-commits] [dpkg] 77/90: scripts/t: Get the reference build flags from dpkg-buildflags.pl

Jérémy Bobbio lunar at moszumanska.debian.org
Sat Aug 29 18:26:19 UTC 2015


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch pu/reproducible_builds
in repository dpkg.

commit bec92eed801f0f3c36ea40d4a80ab84078889eb7
Author: Guillem Jover <guillem at debian.org>
Date:   Thu Aug 6 02:05:37 2015 +0200

    scripts/t: Get the reference build flags from dpkg-buildflags.pl
    
    The build flags might change depending on the architecture, so instead of
    hardcoding them, retrieve them from the source's tree dpkg-buildflags.pl.
    
    Closes: #794694
---
 debian/changelog           |  4 ++++
 scripts/t/mk.t             |  4 ++++
 scripts/t/mk/buildflags.mk | 18 +++++++++---------
 3 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 96ada21..25b4764 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,10 @@ dpkg (1.18.3) UNRELEASED; urgency=low
     - Only warn on invalid week days instead of aborting in
       Dpkg::Changelog::Entry::Debian. Regression introduced in dpkg 1.18.2.
       Reported by Jakub Wilk <jwilk at debian.org>.
+  * Test suite:
+    - Get the reference build flags from dpkg-buildflags.pl, instead of
+      hardcoding them, which might not match depending on the architecture.
+      Closes: #794694
 
   [ Updated programs translations ]
   * Catalan (Jordi Mallach).
diff --git a/scripts/t/mk.t b/scripts/t/mk.t
index eee46c1..6be5a01 100644
--- a/scripts/t/mk.t
+++ b/scripts/t/mk.t
@@ -66,6 +66,10 @@ test_makefile('architecture.mk');
 $ENV{$_} = $arch{$_} foreach keys %arch;
 test_makefile('architecture.mk');
 
+my %buildflag = cmd_get_vars("$srcdir/dpkg-buildflags.pl");
+
+delete $ENV{$_} foreach keys %buildflag;
+$ENV{"TEST_$_"} = $buildflag{$_} foreach keys %buildflag;
 test_makefile('buildflags.mk');
 
 test_makefile('pkg-info.mk');
diff --git a/scripts/t/mk/buildflags.mk b/scripts/t/mk/buildflags.mk
index 3035303..feed5e3 100644
--- a/scripts/t/mk/buildflags.mk
+++ b/scripts/t/mk/buildflags.mk
@@ -3,12 +3,12 @@ DEB_CPPFLAGS_MAINT_APPEND = -DTEST_MK=test
 include $(srcdir)/mk/buildflags.mk
 
 test:
-	test "$(CFLAGS)" = "-g -O2 -fstack-protector-strong -Wformat -Werror=format-security"
-	test "$(CPPFLAGS)" = "-D_FORTIFY_SOURCE=2 -DTEST_MK=test"
-	test "$(CXXFLAGS)" = "-g -O2 -fstack-protector-strong -Wformat -Werror=format-security"
-	test "$(FCFLAGS)" = "-g -O2 -fstack-protector-strong"
-	test "$(FFLAGS)" = "-g -O2 -fstack-protector-strong"
-	test "$(GCJFLAGS)" = "-g -O2 -fstack-protector-strong"
-	test "$(LDFLAGS)" = "-Wl,-z,relro"
-	test "$(OBJCFLAGS)" = "-g -O2 -fstack-protector-strong -Wformat -Werror=format-security"
-	test "$(OBJCXXFLAGS)" = "-g -O2 -fstack-protector-strong -Wformat -Werror=format-security"
+	test "$(CFLAGS)" = "$(TEST_CFLAGS)"
+	test "$(CPPFLAGS)" = "$(TEST_CPPFLAGS) -DTEST_MK=test"
+	test "$(CXXFLAGS)" = "$(TEST_CXXFLAGS)"
+	test "$(FCFLAGS)" = "$(TEST_FCFLAGS)"
+	test "$(FFLAGS)" = "$(TEST_FFLAGS)"
+	test "$(GCJFLAGS)" = "$(TEST_GCJFLAGS)"
+	test "$(LDFLAGS)" = "$(TEST_LDFLAGS)"
+	test "$(OBJCFLAGS)" = "$(TEST_OBJCFLAGS)"
+	test "$(OBJCXXFLAGS)" = "$(TEST_OBJCXXFLAGS)"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list