From cefdf7e92e0532e8abff8e76a84a66204c3040cb Mon Sep 17 00:00:00 2001
From: Remi Collet <fedora@famillecollet.com>
Date: Sun, 27 Dec 2015 09:24:00 +0100
Subject: PHP 7.0.2RC1

---
 failed.txt            |  6 ++--
 php-7.0.0-libdb.patch | 88 ------------------------------------------------
 php-7.0.2-libdb.patch | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++
 php.spec              |  9 ++---
 4 files changed, 99 insertions(+), 96 deletions(-)
 delete mode 100644 php-7.0.0-libdb.patch
 create mode 100644 php-7.0.2-libdb.patch

diff --git a/failed.txt b/failed.txt
index 1942377..f13ba44 100644
--- a/failed.txt
+++ b/failed.txt
@@ -1,16 +1,14 @@
-===== 7.0.1 (2015-12-17)
+===== 7.0.2RC1 (2015-12-24)
 
 $ grep -r 'Tests failed' /var/lib/mock/scl70*/build.log
 
-/var/lib/mock/scl70el6x/build.log:Tests failed    :    3 (  0.0%) (  0.0%)
+/var/lib/mock/scl70el6x/build.log:Tests failed    :    2 (  0.0%) (  0.0%)
 /var/lib/mock/scl70el7x/build.log:Tests failed    :    2 (  0.0%) (  0.0%)
 /var/lib/mock/scl70fc20x/build.log:Tests failed    :    2 (  0.0%) (  0.0%)
 /var/lib/mock/scl70fc21x/build.log:Tests failed    :    0 (  0.0%) (  0.0%
 /var/lib/mock/scl70fc22x/build.log:Tests failed    :    0 (  0.0%) (  0.0%)
 /var/lib/mock/scl70fc23x/build.log:Tests failed    :    1 (  0.0%) (  0.0%)
 
-el6x
-    Test session_set_save_handler() function : test lazy_write [ext/session/tests/session_set_save_handler_variation6.phpt]
 el6x, el7x, fc20x
     Bug #33414 [2] (Comprehensive list of incorrect days returned after strotime() / date() tests) [ext/date/tests/bug33414-2.phpt]
     strtotime() function (64 bit) [ext/date/tests/strtotime3-64bit.phpt]
diff --git a/php-7.0.0-libdb.patch b/php-7.0.0-libdb.patch
deleted file mode 100644
index 4578cf9..0000000
--- a/php-7.0.0-libdb.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-diff -up php-7.0.0beta1/ext/dba/config.m4.libdb php-7.0.0beta1/ext/dba/config.m4
---- php-7.0.0beta1/ext/dba/config.m4.libdb	2015-07-08 02:24:59.252022638 +0200
-+++ php-7.0.0beta1/ext/dba/config.m4	2015-07-08 07:00:16.834403233 +0200
-@@ -312,57 +312,13 @@ if test "$PHP_DB4" != "no"; then
-   dbdp4="/usr/local/BerkeleyDB.4."
-   dbdp5="/usr/local/BerkeleyDB.5."
-   for i in $PHP_DB4 ${dbdp5}1 ${dbdp5}0 ${dbdp4}8 ${dbdp4}7 ${dbdp4}6 ${dbdp4}5 ${dbdp4}4 ${dbdp4}3 ${dbdp4}2 ${dbdp4}1 ${dbdp}0 /usr/local /usr; do
--    if test -f "$i/db5/db.h"; then
--      THIS_PREFIX=$i
--      THIS_INCLUDE=$i/db5/db.h
--      break
--    elif test -f "$i/db4/db.h"; then
--      THIS_PREFIX=$i
--      THIS_INCLUDE=$i/db4/db.h
--      break
--    elif test -f "$i/include/db5.1/db.h"; then
--      THIS_PREFIX=$i
--      THIS_INCLUDE=$i/include/db5.1/db.h
--      break
--    elif test -f "$i/include/db5.0/db.h"; then
--      THIS_PREFIX=$i
--      THIS_INCLUDE=$i/include/db5.0/db.h
--      break
--    elif test -f "$i/include/db4.8/db.h"; then
--      THIS_PREFIX=$i
--      THIS_INCLUDE=$i/include/db4.8/db.h
--      break
--    elif test -f "$i/include/db4.7/db.h"; then
--      THIS_PREFIX=$i
--      THIS_INCLUDE=$i/include/db4.7/db.h
--      break
--    elif test -f "$i/include/db4.6/db.h"; then
--      THIS_PREFIX=$i
--      THIS_INCLUDE=$i/include/db4.6/db.h
--      break
--    elif test -f "$i/include/db4.5/db.h"; then
--      THIS_PREFIX=$i
--      THIS_INCLUDE=$i/include/db4.5/db.h
--      break
--    elif test -f "$i/include/db4/db.h"; then
--      THIS_PREFIX=$i
--      THIS_INCLUDE=$i/include/db4/db.h
--      break
--    elif test -f "$i/include/db/db4.h"; then
--      THIS_PREFIX=$i
--      THIS_INCLUDE=$i/include/db/db4.h
--      break
--    elif test -f "$i/include/db4.h"; then
--      THIS_PREFIX=$i
--      THIS_INCLUDE=$i/include/db4.h
--      break
--    elif test -f "$i/include/db.h"; then
-+    if test -f "$i/include/db.h"; then
-       THIS_PREFIX=$i
-       THIS_INCLUDE=$i/include/db.h
-       break
-     fi
-   done
--  PHP_DBA_DB_CHECK(4, db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
-+  PHP_DBA_DB_CHECK(4, db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
- fi
- PHP_DBA_STD_RESULT(db4,Berkeley DB4)
- 
-diff -up php-7.0.0beta1/ext/dba/dba.c.libdb php-7.0.0beta1/ext/dba/dba.c
---- php-7.0.0beta1/ext/dba/dba.c.libdb	2015-07-08 02:24:59.119020904 +0200
-+++ php-7.0.0beta1/ext/dba/dba.c	2015-07-08 07:01:43.158767655 +0200
-@@ -52,6 +52,10 @@
- #include "php_qdbm.h"
- #include "php_tcadb.h"
- 
-+#ifdef DB4_INCLUDE_FILE
-+#include DB4_INCLUDE_FILE
-+#endif
-+
- /* {{{ arginfo */
- ZEND_BEGIN_ARG_INFO_EX(arginfo_dba_popen, 0, 0, 2)
- 	ZEND_ARG_INFO(0, path)
-@@ -545,6 +549,10 @@ PHP_MINFO_FUNCTION(dba)
- 
- 	php_info_print_table_start();
-  	php_info_print_table_row(2, "DBA support", "enabled");
-+#ifdef DB_VERSION_STRING
-+ 	php_info_print_table_row(2, "libdb header version", DB_VERSION_STRING);
-+ 	php_info_print_table_row(2, "libdb library version", db_version(NULL, NULL, NULL));
-+#endif
- 	if (handlers.s) {
- 		smart_str_0(&handlers);
- 		php_info_print_table_row(2, "Supported handlers", ZSTR_VAL(handlers.s));
diff --git a/php-7.0.2-libdb.patch b/php-7.0.2-libdb.patch
new file mode 100644
index 0000000..f9bff95
--- /dev/null
+++ b/php-7.0.2-libdb.patch
@@ -0,0 +1,92 @@
+diff -up php-7.0.2RC1/ext/dba/config.m4.libdb php-7.0.2RC1/ext/dba/config.m4
+--- php-7.0.2RC1/ext/dba/config.m4.libdb	2015-12-27 07:54:48.669923462 +0100
++++ php-7.0.2RC1/ext/dba/config.m4	2015-12-27 07:55:03.607947034 +0100
+@@ -312,61 +312,13 @@ if test "$PHP_DB4" != "no"; then
+   dbdp4="/usr/local/BerkeleyDB.4."
+   dbdp5="/usr/local/BerkeleyDB.5."
+   for i in $PHP_DB4 ${dbdp5}1 ${dbdp5}0 ${dbdp4}8 ${dbdp4}7 ${dbdp4}6 ${dbdp4}5 ${dbdp4}4 ${dbdp4}3 ${dbdp4}2 ${dbdp4}1 ${dbdp}0 /usr/local /usr; do
+-    if test -f "$i/db5/db.h"; then
+-      THIS_PREFIX=$i
+-      THIS_INCLUDE=$i/db5/db.h
+-      break
+-    elif test -f "$i/db4/db.h"; then
+-      THIS_PREFIX=$i
+-      THIS_INCLUDE=$i/db4/db.h
+-      break
+-    elif test -f "$i/include/db5.3/db.h"; then
+-      THIS_PREFIX=$i
+-      THIS_INCLUDE=$i/include/db5.3/db.h
+-      break
+-    elif test -f "$i/include/db5.1/db.h"; then
+-      THIS_PREFIX=$i
+-      THIS_INCLUDE=$i/include/db5.1/db.h
+-      break
+-    elif test -f "$i/include/db5.0/db.h"; then
+-      THIS_PREFIX=$i
+-      THIS_INCLUDE=$i/include/db5.0/db.h
+-      break
+-    elif test -f "$i/include/db4.8/db.h"; then
+-      THIS_PREFIX=$i
+-      THIS_INCLUDE=$i/include/db4.8/db.h
+-      break
+-    elif test -f "$i/include/db4.7/db.h"; then
+-      THIS_PREFIX=$i
+-      THIS_INCLUDE=$i/include/db4.7/db.h
+-      break
+-    elif test -f "$i/include/db4.6/db.h"; then
+-      THIS_PREFIX=$i
+-      THIS_INCLUDE=$i/include/db4.6/db.h
+-      break
+-    elif test -f "$i/include/db4.5/db.h"; then
+-      THIS_PREFIX=$i
+-      THIS_INCLUDE=$i/include/db4.5/db.h
+-      break
+-    elif test -f "$i/include/db4/db.h"; then
+-      THIS_PREFIX=$i
+-      THIS_INCLUDE=$i/include/db4/db.h
+-      break
+-    elif test -f "$i/include/db/db4.h"; then
+-      THIS_PREFIX=$i
+-      THIS_INCLUDE=$i/include/db/db4.h
+-      break
+-    elif test -f "$i/include/db4.h"; then
+-      THIS_PREFIX=$i
+-      THIS_INCLUDE=$i/include/db4.h
+-      break
+-    elif test -f "$i/include/db.h"; then
++    if test -f "$i/include/db.h"; then
+       THIS_PREFIX=$i
+       THIS_INCLUDE=$i/include/db.h
+       break
+     fi
+   done
+-  PHP_DBA_DB_CHECK(4, db-5.3 db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
++  PHP_DBA_DB_CHECK(4, db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
+ fi
+ PHP_DBA_STD_RESULT(db4,Berkeley DB4)
+ 
+diff -up php-7.0.2RC1/ext/dba/dba.c.libdb php-7.0.2RC1/ext/dba/dba.c
+--- php-7.0.2RC1/ext/dba/dba.c.libdb	2015-12-22 16:19:29.000000000 +0100
++++ php-7.0.2RC1/ext/dba/dba.c	2015-12-27 07:52:30.381638216 +0100
+@@ -52,6 +52,10 @@
+ #include "php_qdbm.h"
+ #include "php_tcadb.h"
+ 
++#ifdef DB4_INCLUDE_FILE
++#include DB4_INCLUDE_FILE
++#endif
++
+ /* {{{ arginfo */
+ ZEND_BEGIN_ARG_INFO_EX(arginfo_dba_popen, 0, 0, 2)
+ 	ZEND_ARG_INFO(0, path)
+@@ -552,6 +556,10 @@ PHP_MINFO_FUNCTION(dba)
+ 
+ 	php_info_print_table_start();
+  	php_info_print_table_row(2, "DBA support", "enabled");
++#ifdef DB_VERSION_STRING
++ 	php_info_print_table_row(2, "libdb header version", DB_VERSION_STRING);
++ 	php_info_print_table_row(2, "libdb library version", db_version(NULL, NULL, NULL));
++#endif
+ 	if (handlers.s) {
+ 		smart_str_0(&handlers);
+ 		php_info_print_table_row(2, "Supported handlers", ZSTR_VAL(handlers.s));
diff --git a/php.spec b/php.spec
index b613ca6..7444d1e 100644
--- a/php.spec
+++ b/php.spec
@@ -125,13 +125,13 @@
 %global db_devel  libdb-devel
 %endif
 
-#global rcver        RC1
+%global rcver        RC1
 %global rpmrel       1
 
 
 Summary: PHP scripting language for creating dynamic web sites
 Name: %{?scl_prefix}php
-Version: 7.0.1
+Version: 7.0.2
 %if 0%{?rcver:1}
 Release: 0.%{rpmrel}.%{rcver}%{?dist}
 %else
@@ -169,7 +169,7 @@ Source52: 20-oci8.ini
 Patch5: php-7.0.0-includedir.patch
 Patch6: php-5.6.3-embed.patch
 Patch7: php-5.3.0-recode.patch
-Patch8: php-7.0.0-libdb.patch
+Patch8: php-7.0.2-libdb.patch
 Patch9: php-5.5.30-curl.patch
 
 # Fixes for extension modules
@@ -1817,7 +1817,8 @@ fi
 
 
 %changelog
-* Thu Dec 17 2015 Remi Collet <remi@fedoraproject.org> 7.0.1-1.1
+* Sun Dec 27 2015 Remi Collet <remi@fedoraproject.org> 7.0.2-0.1.0RC1
+- Update to 7.0.2RC1
 - opcache: build with --disable-huge-code-pages on EL-6
 
 * Wed Dec 16 2015 Remi Collet <remi@fedoraproject.org> 7.0.1-1
-- 
cgit