From 297685c8fd38fa7282cf59384c487c569a67c38a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 20 Mar 2019 10:33:00 +0100 Subject: [PATCH] revert upstream change for extension test suite --- php-upstream.patch | 49 ++++++++++++++++++++++++++++++++++++++++++++++ php.spec | 7 ++++++- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 php-upstream.patch diff --git a/php-upstream.patch b/php-upstream.patch new file mode 100644 index 0000000..a3dfdc0 --- /dev/null +++ b/php-upstream.patch @@ -0,0 +1,49 @@ +From 3ead67239419632eecb83f0f101ead2021ee6c14 Mon Sep 17 00:00:00 2001 +From: Ralf Habacker +Date: Fri, 1 Mar 2019 22:32:01 +0100 +Subject: [PATCH] Fix #77609: Tests from mailparse extension fails + +Add installed php extensions to temporary created ini file + +In php extensions configured with phpize, a temporarily generated +php.ini is used for testing, but currently contains no installed +PHP extensions, which is required by the mailparse extension, +for example. + +Installed extensions must be added with their absolute path, +because the extension_dir parameter is already occupied. + +See https://bugs.php.net/bug.php?id=77609 +--- + Makefile.global | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/Makefile.global b/Makefile.global +index 5728060e3cb6..377cae179fd5 100644 +--- a/Makefile.global ++++ b/Makefile.global +@@ -83,20 +83,21 @@ PHP_TEST_SHARED_EXTENSIONS = ` \ + . $$i; $(top_srcdir)/build/shtool echo -n -- " -d $(ZEND_EXT_TYPE)=$(top_builddir)/modules/$$dlname"; \ + done; \ + fi` +-PHP_DEPRECATED_DIRECTIVES_REGEX = '^(magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*=' ++PHP_FILTERED_DIRECTIVES_REGEX = '^(magic_quotes_(gpc|runtime|sybase)?|zend_extension(_debug)?(_ts)?)[\t\ ]*=' ++PHP_EXTENSION_PATH_FIX_REGEX = "/^extension *= *[^/]/s,extension *= *,extension=$(EXTENSION_DIR)/,g" + + test: all + @if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \ + INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \ + if test "$$INI_FILE"; then \ +- $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \ ++ $(EGREP) -h -v $(PHP_FILTERED_DIRECTIVES_REGEX) "$$INI_FILE" | $(SED) $(PHP_EXTENSION_PATH_FIX_REGEX) > $(top_builddir)/tmp-php.ini; \ + else \ + echo > $(top_builddir)/tmp-php.ini; \ + fi; \ + INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \ + if test "$$INI_SCANNED_PATH"; then \ + INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \ +- $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \ ++ $(EGREP) -h -v $(PHP_FILTERED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini | $(SED) $(PHP_EXTENSION_PATH_FIX_REGEX) >> $(top_builddir)/tmp-php.ini; \ + fi; \ + TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \ + TEST_PHP_SRCDIR=$(top_srcdir) \ diff --git a/php.spec b/php.spec index 53ff701..48fe0c4 100644 --- a/php.spec +++ b/php.spec @@ -64,7 +64,7 @@ Summary: PHP scripting language for creating dynamic web sites Name: php Version: %{upver}%{?rcver:~%{rcver}} -Release: 1%{?dist} +Release: 2%{?dist} # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD @@ -111,6 +111,7 @@ Patch46: php-7.2.4-fixheader.patch Patch47: php-5.6.3-phpinfo.patch # Upstream fixes (100+) +Patch100: php-upstream.patch # Security fixes (200+) @@ -712,6 +713,7 @@ low-level PHP extension for the libsodium cryptographic library. %patch47 -p1 -b .phpinfo # upstream patches +%patch100 -p1 -R -b .up # security patches @@ -1556,6 +1558,9 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || : %changelog +* Wed Mar 20 2019 Remi Collet - 7.3.4~RC1-2 +- revert upstream change for extension test suite + * Tue Mar 19 2019 Remi Collet - 7.3.4~RC1-1 - update to 7.3.4RC1