Bug#929510: apache2-dev: make the build more reproducible

Helmut Grohne helmut at subdivi.de
Sat May 25 08:52:52 BST 2019


Package: apache2-dev
Version: 2.4.38-3
Tags: patch

I was looking into apache2-dev, because it cannot satisfy foreign
architecture dependencies. While doing so, I noticed that it is not
reproducible. I'm submitting a partial fix here. It is to be understood
as an incremental improvement.

A major reason for not being reproducible is
/usr/share/apache2/build/config.nice. It's a convenience script to later
configure apache in the same way. Fortunately, nothing uses this file.
To verify that, I rebuilt all build-rdeps of apache2-dev and I only
encountered one failure: #929506. We can simply drop the file.

I also noticed that config_vars.mk embeds AWK=mawk or AWK=gawk. That can
be easily canonicalized to AWK=awk.

After this patch, I see two issues:
 * config_vars.mk embeds -fdebug-prefix-map. (reproducible)
 * config_vars.mk is architecture-dependent and installed to /usr/share
   (fhs violation).

Please just close this bug after applying the patch despite those other
issues.

Helmut
-------------- next part --------------
diff --minimal -Nru apache2-2.4.38/debian/apache2-dev.install apache2-2.4.38/debian/apache2-dev.install
--- apache2-2.4.38/debian/apache2-dev.install	2019-04-02 21:55:20.000000000 +0200
+++ apache2-2.4.38/debian/apache2-dev.install	2019-05-25 08:43:23.000000000 +0200
@@ -1,6 +1,7 @@
 /usr/bin/apxs
 /usr/include/apache2
-/usr/share/apache2/build
+/usr/share/apache2/build/*.sh
+/usr/share/apache2/build/*.mk
 debian/debhelper/apache2.pm		/usr/share/perl5/Debian/Debhelper/Sequence/
 debian/debhelper/dh_apache2		/usr/bin
 debian/debhelper/postinst-apache2	/usr/share/debhelper/autoscripts/
diff --minimal -Nru apache2-2.4.38/debian/changelog apache2-2.4.38/debian/changelog
--- apache2-2.4.38/debian/changelog	2019-04-07 20:15:40.000000000 +0200
+++ apache2-2.4.38/debian/changelog	2019-05-25 08:43:27.000000000 +0200
@@ -1,3 +1,11 @@
+apache2 (2.4.38-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Do not install /usr/share/apache2/build/config.nice. (Closes: #-1)
+  * Make config_vars.mk reproducible wrt. AWK.
+
+ -- Helmut Grohne <helmut at subdivi.de>  Sat, 25 May 2019 08:43:27 +0200
+
 apache2 (2.4.38-3) unstable; urgency=high
 
   [ Marc Deslauriers ]
diff --minimal -Nru apache2-2.4.38/debian/rules apache2-2.4.38/debian/rules
--- apache2-2.4.38/debian/rules	2019-04-02 21:55:20.000000000 +0200
+++ apache2-2.4.38/debian/rules	2019-05-25 08:43:27.000000000 +0200
@@ -103,6 +103,7 @@
 
 override_dh_auto_configure: configure-stamp
 configure-stamp: prebuild-checks-stamp support/suexec-custom.c
+	AWK=awk \
 	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
 		--enable-layout=Debian --enable-so --with-program-name=apache2 \
 		--enable-suexec --with-suexec-caller=www-data \


More information about the Reproducible-builds mailing list