0041-Add-patch-to-remove-build-timestamps-from-generated-.patch 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. 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. diff --git a/ext/standard/info.c b/ext/standard/info.c
  13. index e74d6b4..883fbdf 100644
  14. --- a/ext/standard/info.c
  15. +++ b/ext/standard/info.c
  16. @@ -865,7 +865,6 @@ PHPAPI void php_print_info(int flag)
  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. diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4
  25. index f286b1a..fba92b8 100644
  26. --- a/sapi/apache2handler/config.m4
  27. +++ b/sapi/apache2handler/config.m4
  28. @@ -59,18 +59,9 @@ if test "$PHP_APXS2" != "no"; then
  29. APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APR_CFLAGS $APU_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
  30. APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
  31. - if test -z `$APXS -q SYSCONFDIR`; then
  32. - INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
  33. - $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
  34. - -i -n php7"
  35. - else
  36. - APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR`
  37. - INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
  38. - \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \
  39. - $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
  40. - -S SYSCONFDIR='$APXS_SYSCONFDIR' \
  41. - -i -a -n php7"
  42. - fi
  43. + INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
  44. + $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
  45. + -i -n php7"
  46. case $host_alias in
  47. *aix*)
  48. diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
  49. index 0b6deb1..bb9014a 100644
  50. --- a/sapi/cgi/cgi_main.c
  51. +++ b/sapi/cgi/cgi_main.c
  52. @@ -2342,9 +2342,9 @@ consult the installation file that came with this distribution, or visit \n\
  53. SG(request_info).no_headers = 1;
  54. }
  55. #if ZEND_DEBUG
  56. - 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());
  57. + php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
  58. #else
  59. - 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());
  60. + php_printf("PHP %s (%s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
  61. #endif
  62. php_request_shutdown((void *) 0);
  63. fcgi_shutdown();
  64. diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
  65. index dc92045..bb28364 100644
  66. --- a/sapi/cli/php_cli.c
  67. +++ b/sapi/cli/php_cli.c
  68. @@ -690,8 +690,8 @@ static int do_cli(int argc, char **argv) /* {{{ */
  69. goto out;
  70. case 'v': /* show php version & quit */
  71. - php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) 1997-2017 The PHP Group\n%s",
  72. - PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__,
  73. + php_printf("PHP %s (%s) ( %s)\nCopyright (c) 1997-2017 The PHP Group\n%s",
  74. + PHP_VERSION, cli_sapi_module.name,
  75. #if ZTS
  76. "ZTS "
  77. #else
  78. diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
  79. index 6768113..545c52e 100644
  80. --- a/sapi/fpm/fpm/fpm_main.c
  81. +++ b/sapi/fpm/fpm/fpm_main.c
  82. @@ -1756,9 +1756,9 @@ int main(int argc, char *argv[])
  83. SG(request_info).no_headers = 1;
  84. #if ZEND_DEBUG
  85. - 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());
  86. + php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
  87. #else
  88. - 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());
  89. + php_printf("PHP %s (%s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
  90. #endif
  91. php_request_shutdown((void *) 0);
  92. fcgi_shutdown();
  93. diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
  94. index b47c7c8..ab94bba 100644
  95. --- a/sapi/phpdbg/phpdbg.c
  96. +++ b/sapi/phpdbg/phpdbg.c
  97. @@ -1699,10 +1699,8 @@ phpdbg_main:
  98. phpdbg_do_help_cmd(exec);
  99. } else if (show_version) {
  100. phpdbg_out(
  101. - "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) 1997-2017 The PHP Group\n%s",
  102. + "phpdbg %s\nPHP %s, Copyright (c) 1997-2017 The PHP Group\n%s",
  103. PHPDBG_VERSION,
  104. - __DATE__,
  105. - __TIME__,
  106. PHP_VERSION,
  107. get_zend_version()
  108. );