You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
4.2 KiB

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