summaryrefslogtreecommitdiff
path: root/net/apache
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2017-11-17 03:39:53 +0100
committerAlexander Couzens <lynxis@fe80.eu>2017-11-17 12:17:03 +0100
commitf06b980befaf0ed64241bb32c1a0543fbc8ed688 (patch)
tree504f478f9006cb60f41bfbb00cb10c25d21798e9 /net/apache
parenta2de0d04b4be837f8da171af367e65d3e7b4d7cf (diff)
apache: fix reproducible builds
Remove build timestamp [0] and correct sorting [1]. Thanks to debian for the patch. [0] https://reproducible-builds.org/docs/timestamps/ [1] https://reproducible-builds.org/docs/stable-inputs/ Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Diffstat (limited to 'net/apache')
-rw-r--r--net/apache/Makefile2
-rw-r--r--net/apache/patches/010-reproducible-builds.patch44
2 files changed, 45 insertions, 1 deletions
diff --git a/net/apache/Makefile b/net/apache/Makefile
index 6763c4a0e..9b1338346 100644
--- a/net/apache/Makefile
+++ b/net/apache/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=apache
PKG_VERSION:=2.4.28
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_NAME:=httpd
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=Apache License
diff --git a/net/apache/patches/010-reproducible-builds.patch b/net/apache/patches/010-reproducible-builds.patch
new file mode 100644
index 000000000..7a5324b62
--- /dev/null
+++ b/net/apache/patches/010-reproducible-builds.patch
@@ -0,0 +1,44 @@
+Description: Make builds reproducible
+ Don't use __DATE__ __TIME__. Use changelog date instead.
+ Sort exported symbols.
+Author: Jean-Michel Vourgère <nirgal@debian.org>
+Forwarded: no
+Last-Update: 2015-08-11
+
+Index: apache2/server/buildmark.c
+===================================================================
+--- apache2.orig/server/buildmark.c
++++ apache2/server/buildmark.c
+@@ -17,11 +17,7 @@
+ #include "ap_config.h"
+ #include "httpd.h"
+
+-#if defined(__DATE__) && defined(__TIME__)
+-static const char server_built[] = __DATE__ " " __TIME__;
+-#else
+-static const char server_built[] = "unknown";
+-#endif
++static const char server_built[] = "";
+
+ AP_DECLARE(const char *) ap_get_server_built()
+ {
+Index: apache2/server/Makefile.in
+===================================================================
+--- apache2.orig/server/Makefile.in
++++ apache2/server/Makefile.in
+@@ -1,3 +1,4 @@
++export LC_ALL = C
+
+ CLEAN_TARGETS = gen_test_char test_char.h \
+ ApacheCoreOS2.def httpd.exp export_files \
+@@ -80,8 +81,8 @@ httpd.exp: exports.c export_vars.h
+ @echo "#! ." > $@
+ @echo "* This file was AUTOGENERATED at build time." >> $@
+ @echo "* Please do not edit by hand." >> $@
+- $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | grep -v apr_ | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
+- $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep -v apr_ | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@
++ $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | grep -v apr_ | sed -e 's/^.*[)]\(.*\);$$/\1/' | sort >> $@
++ $(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep -v apr_ | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' | sort >> $@
+
+
+ # developer stuff