aboutsummaryrefslogtreecommitdiff
path: root/lang/php7
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2017-12-06 23:54:01 +0100
committerAlexander Couzens <lynxis@fe80.eu>2017-12-14 19:00:11 +0100
commit5dbbb1ba113244ba984bc9f1560511a3e0d39951 (patch)
tree5e8f2d48c85d39ab78e93003555ca23904e5a960 /lang/php7
parentf3d0d51e9697cfb5dddaf22a9083357de7c11e8b (diff)
php7: remove build timestamp
Build timestamp prevents reproducible builds [0]. [0] https://reproducible-builds.org/docs/timestamps/ Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Diffstat (limited to 'lang/php7')
-rw-r--r--lang/php7/Makefile2
-rw-r--r--lang/php7/patches/0050-remove-build-timestamps.patch32
2 files changed, 33 insertions, 1 deletions
diff --git a/lang/php7/Makefile b/lang/php7/Makefile
index fe259628d..f50f55404 100644
--- a/lang/php7/Makefile
+++ b/lang/php7/Makefile
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=php
PKG_VERSION:=7.1.12
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
diff --git a/lang/php7/patches/0050-remove-build-timestamps.patch b/lang/php7/patches/0050-remove-build-timestamps.patch
new file mode 100644
index 000000000..fa901704c
--- /dev/null
+++ b/lang/php7/patches/0050-remove-build-timestamps.patch
@@ -0,0 +1,32 @@
+Index: php-7.1.12/ext/opcache/ZendAccelerator.c
+===================================================================
+--- php-7.1.12.orig/ext/opcache/ZendAccelerator.c
++++ php-7.1.12/ext/opcache/ZendAccelerator.c
+@@ -2604,11 +2604,6 @@ static void accel_gen_system_id(void)
+ PHP_MD5Update(&context, PHP_VERSION, sizeof(PHP_VERSION)-1);
+ PHP_MD5Update(&context, ZEND_EXTENSION_BUILD_ID, sizeof(ZEND_EXTENSION_BUILD_ID)-1);
+ PHP_MD5Update(&context, ZEND_BIN_ID, sizeof(ZEND_BIN_ID)-1);
+- if (strstr(PHP_VERSION, "-dev") != 0) {
+- /* Development versions may be changed from build to build */
+- PHP_MD5Update(&context, __DATE__, sizeof(__DATE__)-1);
+- PHP_MD5Update(&context, __TIME__, sizeof(__TIME__)-1);
+- }
+ PHP_MD5Final(digest, &context);
+ for (i = 0; i < 16; i++) {
+ c = digest[i] >> 4;
+Index: php-7.1.12/sapi/litespeed/lsapi_main.c
+===================================================================
+--- php-7.1.12.orig/sapi/litespeed/lsapi_main.c
++++ php-7.1.12/sapi/litespeed/lsapi_main.c
+@@ -1036,9 +1036,9 @@ static int cli_main( int argc, char * ar
+ case 'v':
+ if (php_request_startup() != FAILURE) {
+ #if ZEND_DEBUG
+- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
++ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
+ #else
+- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
++ php_printf("PHP %s (%s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
+ #endif
+ #ifdef PHP_OUTPUT_NEWAPI
+ php_output_end_all();