7639e567209e8eb850feefd8544ad8a19814c84b
[feed/packages.git] / lang / php7 / patches / 0041-Add-patch-to-remove-build-timestamps-from-generated-.patch
1 From: Thijs Kinkhorst <thijs@debian.org>
2 Date: Wed, 15 Jun 2016 09:18:03 +0200
3 Subject: Add patch to remove build timestamps from generated binaries.
4
5 ---
6 ext/standard/info.c | 1 -
7 sapi/apache2handler/config.m4 | 15 +++------------
8 sapi/cgi/cgi_main.c | 4 ++--
9 sapi/cli/php_cli.c | 4 ++--
10 sapi/fpm/fpm/fpm_main.c | 4 ++--
11 sapi/litespeed/lsapi_main.c | 4 ++--
12 sapi/phpdbg/phpdbg.c | 4 +---
13 7 files changed, 12 insertions(+), 24 deletions(-)
14
15 diff --git a/ext/standard/info.c b/ext/standard/info.c
16 index e6eaac3..024e5c9 100644
17 --- a/ext/standard/info.c
18 +++ b/ext/standard/info.c
19 @@ -863,7 +863,6 @@ PHPAPI void php_print_info(int flag)
20 php_info_print_box_end();
21 php_info_print_table_start();
22 php_info_print_table_row(2, "System", ZSTR_VAL(php_uname));
23 - php_info_print_table_row(2, "Build Date", __DATE__ " " __TIME__);
24 #ifdef COMPILER
25 php_info_print_table_row(2, "Compiler", COMPILER);
26 #endif
27 diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4
28 index f286b1a..fba92b8 100644
29 --- a/sapi/apache2handler/config.m4
30 +++ b/sapi/apache2handler/config.m4
31 @@ -59,18 +59,9 @@ if test "$PHP_APXS2" != "no"; then
32 APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APR_CFLAGS $APU_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
33
34 APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
35 - if test -z `$APXS -q SYSCONFDIR`; then
36 - INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
37 - $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
38 - -i -n php7"
39 - else
40 - APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR`
41 - INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
42 - \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \
43 - $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
44 - -S SYSCONFDIR='$APXS_SYSCONFDIR' \
45 - -i -a -n php7"
46 - fi
47 + INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
48 + $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
49 + -i -n php7"
50
51 case $host_alias in
52 *aix*)
53 diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
54 index 8983b53..589e299 100644
55 --- a/sapi/cgi/cgi_main.c
56 +++ b/sapi/cgi/cgi_main.c
57 @@ -2216,9 +2216,9 @@ consult the installation file that came with this distribution, or visit \n\
58 SG(request_info).no_headers = 1;
59 }
60 #if ZEND_DEBUG
61 - php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
62 + php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
63 #else
64 - php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
65 + php_printf("PHP %s (%s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
66 #endif
67 php_request_shutdown((void *) 0);
68 fcgi_shutdown();
69 diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
70 index 978c8b3..3ee61a4 100644
71 --- a/sapi/cli/php_cli.c
72 +++ b/sapi/cli/php_cli.c
73 @@ -682,8 +682,8 @@ static int do_cli(int argc, char **argv) /* {{{ */
74 goto out;
75
76 case 'v': /* show php version & quit */
77 - php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) 1997-2016 The PHP Group\n%s",
78 - PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__,
79 + php_printf("PHP %s (%s) ( %s)\nCopyright (c) 1997-2016 The PHP Group\n%s",
80 + PHP_VERSION, cli_sapi_module.name,
81 #if ZTS
82 "ZTS "
83 #else
84 diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
85 index 5adeb63..5e60255 100644
86 --- a/sapi/fpm/fpm/fpm_main.c
87 +++ b/sapi/fpm/fpm/fpm_main.c
88 @@ -1757,9 +1757,9 @@ int main(int argc, char *argv[])
89 SG(request_info).no_headers = 1;
90
91 #if ZEND_DEBUG
92 - php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
93 + php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
94 #else
95 - php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
96 + php_printf("PHP %s (%s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
97 #endif
98 php_request_shutdown((void *) 0);
99 fcgi_shutdown();
100 diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c
101 index b0ea105..4feb8f3 100644
102 --- a/sapi/litespeed/lsapi_main.c
103 +++ b/sapi/litespeed/lsapi_main.c
104 @@ -811,9 +811,9 @@ static int cli_main( int argc, char * argv[] )
105 case 'v':
106 if (php_request_startup() != FAILURE) {
107 #if ZEND_DEBUG
108 - php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
109 + php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
110 #else
111 - php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
112 + php_printf("PHP %s (%s)\nCopyright (c) 1997-2016 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
113 #endif
114 #ifdef PHP_OUTPUT_NEWAPI
115 php_output_end_all();
116 diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
117 index 68a164c..82565d8 100644
118 --- a/sapi/phpdbg/phpdbg.c
119 +++ b/sapi/phpdbg/phpdbg.c
120 @@ -1520,10 +1520,8 @@ phpdbg_main:
121 sapi_startup(phpdbg);
122 phpdbg->startup(phpdbg);
123 printf(
124 - "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) 1997-2016 The PHP Group\n%s",
125 + "phpdbg %s\nPHP %s, Copyright (c) 1997-2016 The PHP Group\n%s",
126 PHPDBG_VERSION,
127 - __DATE__,
128 - __TIME__,
129 PHP_VERSION,
130 get_zend_version()
131 );