Source: apache2 Version: 2.4.41-1 Severity: wishlist Tags: patch User: reproducible-builds@lists.alioth.debian.org Usertags: buildpath environment X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org The CXXFLAGS variable was not getting cleaned in debian/clean_config_vars, which meant that while -fdebug-prefix-map was cleaned from CFLAGS, it was still present in CXXFLAGS. Additionally, support for -ffile-prefix-map was added to GCC and dpkg and is used in the tests.reproducible-builds.org infrastructure when testing unstable and experimental. The attached patch fixes both issues, and I believe should result in apache2 being reproducible again in Debian. Thanks for maintaining apache2! live well, vagrant
From 6ef03f7cce3b45999a81485e9bfa178971115d60 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian <vagrant@reproducible-builds.org> Date: Sun, 12 Jan 2020 18:04:01 -0800 Subject: [PATCH 2/2] Also clean CXXFLAGS and -ffile-prefix-map. --- debian/clean_config_vars | 6 ++++-- debian/rules | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/clean_config_vars b/debian/clean_config_vars index f88ab3ca..90867080 100755 --- a/debian/clean_config_vars +++ b/debian/clean_config_vars @@ -6,6 +6,7 @@ my %FLAGS = { 'CFLAGS' => $ARGV[0], 'CPPFLAGS' => $ARGV[1], 'LDDFLAGS' => $ARGV[2], + 'CXXFLAGS' => $ARGV[3], }; @@ -22,7 +23,8 @@ sub clean_and_deduplicate $return_flags .= "$flag " unless $flag =~ m/PLATFORM/ || $flag =~ m/-DBUILD_DATETIME/ || - $flag =~ m/-fdebug-prefix-map/; + $flag =~ m/-fdebug-prefix-map/ || + $flag =~ m/-ffile-prefix-map/; } return $return_flags; } @@ -36,7 +38,7 @@ open(TMP_CONFIG_VARS, ">", "tmp_config_vars.mk") || die("tmp_config_vars.mk: $1" while(my $line = <CONFIG_VARS>) { chomp $line; - unless ($line =~ m/(^|_)(LD|CPP|C)FLAGS/) + unless ($line =~ m/(^|_)(LD|CPP|C|CXX)FLAGS/) { print TMP_CONFIG_VARS "$line\n"; } diff --git a/debian/rules b/debian/rules index 508dde96..954da288 100755 --- a/debian/rules +++ b/debian/rules @@ -74,7 +74,7 @@ clean-config-vars-stamp: debian/tmp/usr/share/apache2/build/config_vars.mk debia # Clean up config_vars.mk so that flags that are only intended for the # compilation of apache2 itself are not used by apxs for compiling # modules. - perl ./debian/clean_config_vars '$(AP2_CFLAGS)' '$(AP2_CPPFLAGS)' '$(AP2_LDFLAGS)' + perl ./debian/clean_config_vars '$(AP2_CFLAGS)' '$(AP2_CPPFLAGS)' '$(AP2_LDFLAGS)' '$(CXXFLAGS)' touch $@ %: %.in -- 2.20.1
Attachment:
signature.asc
Description: PGP signature