diff options
-rw-r--r-- | 48d54026ef6e448bc91949b279103a313a5b053f.patch | 31 | ||||
-rw-r--r-- | PHPINFO | 11 | ||||
-rw-r--r-- | REFLECTION | 2 | ||||
-rw-r--r-- | c3f9d604adc77bc16601cebd0aabecaf21fb563b.patch | 33 | ||||
-rw-r--r-- | php-pecl-zookeeper.spec | 9 |
5 files changed, 84 insertions, 2 deletions
diff --git a/48d54026ef6e448bc91949b279103a313a5b053f.patch b/48d54026ef6e448bc91949b279103a313a5b053f.patch new file mode 100644 index 0000000..64654e4 --- /dev/null +++ b/48d54026ef6e448bc91949b279103a313a5b053f.patch @@ -0,0 +1,31 @@ +From 48d54026ef6e448bc91949b279103a313a5b053f Mon Sep 17 00:00:00 2001 +From: Timandes White <timands@gmail.com> +Date: Thu, 19 Jul 2018 10:12:23 +0800 +Subject: [PATCH] Try to fix 'undefined symbol: zoo_wgetconfig' (#22) + +--- + config.m4 | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/config.m4 b/config.m4 +index d7fed5a..5465685 100644 +--- a/config.m4 ++++ b/config.m4 +@@ -106,9 +106,15 @@ if test "$PHP_ZOOKEEPER" != "no"; then + AC_DEFINE(HAVE_PTHREAD,1,[ ]) + ]) + +- AC_DEFINE(THREADED,1,[Must define this constant after zookeeper-3.5.0 to use multi-threaded library]) ++ ZOO_MINOR_VERSION=$(cat ${PHP_LIBZOOKEEPER_INCDIR}/zookeeper/zookeeper_version.h |grep ZOO_MINOR_VERSION|awk '{print $3}') ++ PHP_ZOOKEEPER_CONFIG_FILES="" ++ if test ${ZOO_MINOR_VERSION} -eq 5; then ++ PHP_ZOOKEEPER_CONFIG_FILES="php_zookeeper_config_class.c" ++ AC_DEFINE(THREADED,1,[Must define this constant after zookeeper-3.5.0 to use multi-threaded library]) ++ fi ++ + PHP_SUBST(ZOOKEEPER_SHARED_LIBADD) +- PHP_NEW_EXTENSION(zookeeper, php_zookeeper.c zoo_lock.c $SESSION_EXTRA_FILES php_zookeeper_exceptions.c php_zookeeper_config_class.c php_zookeeper_stat.c php_zookeeper_callback.c php_zookeeper_log.c, $ext_shared,,$SESSION_INCLUDES) ++ PHP_NEW_EXTENSION(zookeeper, php_zookeeper.c zoo_lock.c $SESSION_EXTRA_FILES php_zookeeper_exceptions.c ${PHP_ZOOKEEPER_CONFIG_FILES} php_zookeeper_stat.c php_zookeeper_callback.c php_zookeeper_log.c, $ext_shared,,$SESSION_INCLUDES) + + fi + @@ -0,0 +1,11 @@ + +zookeeper + +zookeeper support => enabled +version => 0.6.1 +libzookeeper version => 3.4.9 + +Directive => Local Value => Master Value +zookeeper.recv_timeout => 10000 => 10000 +zookeeper.session_lock => 1 => 1 +zookeeper.sess_lock_wait => 150000 => 150000 @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #178 zookeeper version 0.5.0 ] { +Extension [ <persistent> extension #179 zookeeper version 0.6.1 ] { - INI { Entry [ zookeeper.recv_timeout <ALL> ] diff --git a/c3f9d604adc77bc16601cebd0aabecaf21fb563b.patch b/c3f9d604adc77bc16601cebd0aabecaf21fb563b.patch new file mode 100644 index 0000000..bedc8be --- /dev/null +++ b/c3f9d604adc77bc16601cebd0aabecaf21fb563b.patch @@ -0,0 +1,33 @@ +From c3f9d604adc77bc16601cebd0aabecaf21fb563b Mon Sep 17 00:00:00 2001 +From: Timandes White <timands@gmail.com> +Date: Thu, 19 Jul 2018 11:07:12 +0800 +Subject: [PATCH] Fix path of zookeeper_version.h in config.m4 + +--- + config.m4 | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/config.m4 b/config.m4 +index 5465685..7191109 100644 +--- a/config.m4 ++++ b/config.m4 +@@ -106,13 +106,17 @@ if test "$PHP_ZOOKEEPER" != "no"; then + AC_DEFINE(HAVE_PTHREAD,1,[ ]) + ]) + +- ZOO_MINOR_VERSION=$(cat ${PHP_LIBZOOKEEPER_INCDIR}/zookeeper/zookeeper_version.h |grep ZOO_MINOR_VERSION|awk '{print $3}') ++ AC_MSG_CHECKING([whether ZooKeeper Config is enabled]) ++ ZOO_MINOR_VERSION=$(cat ${PHP_LIBZOOKEEPER_INCDIR}/zookeeper_version.h |grep ZOO_MINOR_VERSION|awk '{print $3}') + PHP_ZOOKEEPER_CONFIG_FILES="" + if test ${ZOO_MINOR_VERSION} -eq 5; then + PHP_ZOOKEEPER_CONFIG_FILES="php_zookeeper_config_class.c" +- AC_DEFINE(THREADED,1,[Must define this constant after zookeeper-3.5.0 to use multi-threaded library]) ++ AC_MSG_RESULT([enabled]) ++ else ++ AC_MSG_RESULT([disabled]) + fi + ++ AC_DEFINE(THREADED,1,[Must define this constant after zookeeper-3.5.0 to use multi-threaded library]) + PHP_SUBST(ZOOKEEPER_SHARED_LIBADD) + PHP_NEW_EXTENSION(zookeeper, php_zookeeper.c zoo_lock.c $SESSION_EXTRA_FILES php_zookeeper_exceptions.c ${PHP_ZOOKEEPER_CONFIG_FILES} php_zookeeper_stat.c php_zookeeper_callback.c php_zookeeper_log.c, $ext_shared,,$SESSION_INCLUDES) + diff --git a/php-pecl-zookeeper.spec b/php-pecl-zookeeper.spec index 6d54939..8f3611a 100644 --- a/php-pecl-zookeeper.spec +++ b/php-pecl-zookeeper.spec @@ -28,6 +28,9 @@ Group: Development/Languages URL: http://github.com/andreiz/php-zookeeper Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Patch0: https://github.com/php-zookeeper/php-zookeeper/commit/48d54026ef6e448bc91949b279103a313a5b053f.patch +Patch1: https://github.com/php-zookeeper/php-zookeeper/commit/c3f9d604adc77bc16601cebd0aabecaf21fb563b.patch + BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel > 7 BuildRequires: %{?scl_prefix}php-pear @@ -85,6 +88,9 @@ mv %{pecl_name}-%{version} NTS %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} cd NTS +%patch0 -p1 -b .up1 +%patch1 -p1 -b .up2 + # Sanity check, really often broken extver=$(sed -n '/#define PHP_ZOOKEEPER_VERSION/{s/.* "//;s/".*$//;p}' php_zookeeper.h) if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then @@ -207,9 +213,10 @@ cd ../ZTS %changelog -* Sun Jul 15 2018 Remi Collet <remi@remirepo.net> - 0.6.1-1 +* Fri Jul 20 2018 Remi Collet <remi@remirepo.net> - 0.6.1-1 - update to 0.6.1 - raise dependency on PHP 7 +- add upstream patches for libzookeeper < 3.5 * Wed Jun 27 2018 Remi Collet <remi@remirepo.net> - 0.6.0-1 - update to 0.6.0 |