b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | From: Thijs Kinkhorst <thijs@debian.org> |
| 2 | Date: Mon, 2 Dec 2019 22:18:43 +0100 |
| 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/phpdbg/phpdbg.c | 4 +--- |
| 12 | 6 files changed, 10 insertions(+), 22 deletions(-) |
| 13 | |
| 14 | --- a/ext/standard/info.c |
| 15 | +++ b/ext/standard/info.c |
| 16 | @@ -803,7 +803,6 @@ PHPAPI ZEND_COLD void php_print_info(int |
| 17 | php_info_print_box_end(); |
| 18 | php_info_print_table_start(); |
| 19 | php_info_print_table_row(2, "System", ZSTR_VAL(php_uname)); |
| 20 | - php_info_print_table_row(2, "Build Date", __DATE__ " " __TIME__); |
| 21 | #ifdef COMPILER |
| 22 | php_info_print_table_row(2, "Compiler", COMPILER); |
| 23 | #endif |
| 24 | --- a/sapi/apache2handler/config.m4 |
| 25 | +++ b/sapi/apache2handler/config.m4 |
| 26 | @@ -64,18 +64,9 @@ if test "$PHP_APXS2" != "no"; then |
| 27 | fi |
| 28 | |
| 29 | APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR` |
| 30 | - if test -z `$APXS -q SYSCONFDIR`; then |
| 31 | - INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ |
| 32 | - $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ |
| 33 | - -i -n php7" |
| 34 | - else |
| 35 | - APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR` |
| 36 | - INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ |
| 37 | - \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \ |
| 38 | - $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ |
| 39 | - -S SYSCONFDIR='$APXS_SYSCONFDIR' \ |
| 40 | - -i -a -n php7" |
| 41 | - fi |
| 42 | + INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ |
| 43 | + $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ |
| 44 | + -i -n php7" |
| 45 | |
| 46 | case $host_alias in |
| 47 | *aix*) |
| 48 | --- a/sapi/cgi/cgi_main.c |
| 49 | +++ b/sapi/cgi/cgi_main.c |
| 50 | @@ -2401,9 +2401,9 @@ parent_loop_end: |
| 51 | SG(headers_sent) = 1; |
| 52 | SG(request_info).no_headers = 1; |
| 53 | #if ZEND_DEBUG |
| 54 | - php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); |
| 55 | + php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); |
| 56 | #else |
| 57 | - php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); |
| 58 | + php_printf("PHP %s (%s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); |
| 59 | #endif |
| 60 | php_request_shutdown((void *) 0); |
| 61 | fcgi_shutdown(); |
| 62 | --- a/sapi/cli/php_cli.c |
| 63 | +++ b/sapi/cli/php_cli.c |
| 64 | @@ -648,8 +648,8 @@ static int do_cli(int argc, char **argv) |
| 65 | goto out; |
| 66 | |
| 67 | case 'v': /* show php version & quit */ |
| 68 | - php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) The PHP Group\n%s", |
| 69 | - PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__, |
| 70 | + php_printf("PHP %s (%s) ( %s)\nCopyright (c) The PHP Group\n%s", |
| 71 | + PHP_VERSION, cli_sapi_module.name, |
| 72 | #if ZTS |
| 73 | "ZTS " |
| 74 | #else |
| 75 | --- a/sapi/fpm/fpm/fpm_main.c |
| 76 | +++ b/sapi/fpm/fpm/fpm_main.c |
| 77 | @@ -1718,9 +1718,9 @@ int main(int argc, char *argv[]) |
| 78 | SG(request_info).no_headers = 1; |
| 79 | |
| 80 | #if ZEND_DEBUG |
| 81 | - php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); |
| 82 | + php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); |
| 83 | #else |
| 84 | - php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); |
| 85 | + php_printf("PHP %s (%s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); |
| 86 | #endif |
| 87 | php_request_shutdown((void *) 0); |
| 88 | fcgi_shutdown(); |
| 89 | --- a/sapi/phpdbg/phpdbg.c |
| 90 | +++ b/sapi/phpdbg/phpdbg.c |
| 91 | @@ -1697,10 +1697,8 @@ phpdbg_main: |
| 92 | phpdbg_do_help_cmd(exec); |
| 93 | } else if (show_version) { |
| 94 | phpdbg_out( |
| 95 | - "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) The PHP Group\n%s", |
| 96 | + "phpdbg %s\nPHP %s, Copyright (c) The PHP Group\n%s", |
| 97 | PHPDBG_VERSION, |
| 98 | - __DATE__, |
| 99 | - __TIME__, |
| 100 | PHP_VERSION, |
| 101 | get_zend_version() |
| 102 | ); |