From 49fbbfd7538639a2f96f5faacf25591b3edd5613 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 7 May 2015 15:58:11 +0200 Subject: php70-php: fix tests --- php-5.6.0-oldpcre.patch | 39 --------------------------------------- php-7.0.0-oldpcre.patch | 20 ++++++++++++++++++++ php.spec | 10 ++++++---- 3 files changed, 26 insertions(+), 43 deletions(-) delete mode 100644 php-5.6.0-oldpcre.patch create mode 100644 php-7.0.0-oldpcre.patch diff --git a/php-5.6.0-oldpcre.patch b/php-5.6.0-oldpcre.patch deleted file mode 100644 index df6edb2..0000000 --- a/php-5.6.0-oldpcre.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -up ./ext/pcre/tests/bug37911.phpt.pcre834 ./ext/pcre/tests/bug37911.phpt ---- ./ext/pcre/tests/bug37911.phpt.pcre834 2014-03-26 14:10:18.285452752 +0100 -+++ ./ext/pcre/tests/bug37911.phpt 2014-03-26 14:10:40.028526763 +0100 -@@ -37,5 +37,5 @@ array(3) { - string(4) "blub" - } - --Warning: preg_replace_callback(): Compilation failed: group name must start with a non-digit at offset %d in %sbug37911.php on line %d -+Warning: preg_replace_callback(): Numeric named subpatterns are not allowed in %sbug37911.php on line %d - NULL -diff -up ./ext/pcre/tests/grep2.phpt.pcre834 ./ext/pcre/tests/grep2.phpt ---- ./ext/pcre/tests/grep2.phpt.pcre834 2014-03-26 14:08:26.583072531 +0100 -+++ ./ext/pcre/tests/grep2.phpt 2014-03-26 14:09:09.345218089 +0100 -@@ -40,12 +40,6 @@ array(1) { - string(1) "1" - } - bool(true) --array(3) { -- [5]=> -- string(1) "a" -- ["xyz"]=> -- string(2) "q6" -- [6]=> -- string(3) "h20" -+array(0) { - } --bool(false) -+bool(true) -diff -up ./ext/pcre/tests/match_flags3.phpt.pcre834 ./ext/pcre/tests/match_flags3.phpt ---- ./ext/pcre/tests/match_flags3.phpt.pcre834 2014-03-26 14:06:48.792739665 +0100 -+++ ./ext/pcre/tests/match_flags3.phpt 2014-03-26 14:07:31.820886128 +0100 -@@ -42,5 +42,5 @@ array(1) { - } - } - --Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset %d in %smatch_flags3.php on line %d -+Warning: preg_match(): Numeric named subpatterns are not allowed in %smatch_flags3.php on line %d - bool(false) -diff -up ./ext/standard/tests/strings/setlocale_variation2.phpt.pcre834 ./ext/standard/tests/strings/setlocale_variation2.phpt diff --git a/php-7.0.0-oldpcre.patch b/php-7.0.0-oldpcre.patch new file mode 100644 index 0000000..19f8064 --- /dev/null +++ b/php-7.0.0-oldpcre.patch @@ -0,0 +1,20 @@ +diff -up ./ext/pcre/tests/bug37911.phpt.pcre834 ./ext/pcre/tests/bug37911.phpt +--- ./ext/pcre/tests/bug37911.phpt.pcre834 2014-03-26 14:10:18.285452752 +0100 ++++ ./ext/pcre/tests/bug37911.phpt 2014-03-26 14:10:40.028526763 +0100 +@@ -37,5 +37,5 @@ array(3) { + string(4) "blub" + } + +-Warning: preg_replace_callback(): Compilation failed: group name must start with a non-digit at offset %d in %sbug37911.php on line %d ++Warning: preg_replace_callback(): Numeric named subpatterns are not allowed in %sbug37911.php on line %d + NULL +diff -up ./ext/pcre/tests/match_flags3.phpt.pcre834 ./ext/pcre/tests/match_flags3.phpt +--- ./ext/pcre/tests/match_flags3.phpt.pcre834 2014-03-26 14:06:48.792739665 +0100 ++++ ./ext/pcre/tests/match_flags3.phpt 2014-03-26 14:07:31.820886128 +0100 +@@ -42,5 +42,5 @@ array(1) { + } + } + +-Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset %d in %smatch_flags3.php on line %d ++Warning: preg_match(): Numeric named subpatterns are not allowed in %smatch_flags3.php on line %d + bool(false) diff --git a/php.spec b/php.spec index 28d4f39..f27fd61 100644 --- a/php.spec +++ b/php.spec @@ -125,7 +125,7 @@ %global db_devel libdb-devel %endif -%global gh_commit dd0b602381fad375d8f29a97f25f099be7c9db35 +%global gh_commit 62b1293e3df520d104c678bc520b413386b628c5 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_date 20150507 %global gh_owner php @@ -198,7 +198,7 @@ Patch91: php-5.6.3-oci8conf.patch # Factory is droped from system tzdata Patch300: php-5.6.3-datetests.patch # Revert changes for pcre < 8.34 -Patch301: php-5.6.0-oldpcre.patch +Patch301: php-7.0.0-oldpcre.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -908,10 +908,10 @@ support for JavaScript Object Notation (JSON) to PHP. # Fixes for tests %patch300 -p1 -b .datetests %if %{with_libpcre} -%if 0%{?fedora} < 21 +if ! pkg-config libpcre --atleast-version 8.34 ; then # Only apply when system libpcre < 8.34 %patch301 -p1 -b .pcre834 -%endif +fi %endif # Prevent %%doc confusion over LICENSE files @@ -943,6 +943,8 @@ rm ext/date/tests/timezone_version_get.phpt rm ext/date/tests/timezone_version_get_basic1.phpt # fails sometime rm ext/sockets/tests/mcast_ipv?_recv.phpt +# Should be skipped but fails sometime +rm ext/standard/tests/file/file_get_contents_error001.phpt # cause stack exhausion rm Zend/tests/bug54268.phpt rm Zend/tests/bug68412.phpt -- cgit