summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--12117.patch40
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-grpc.spec17
3 files changed, 53 insertions, 6 deletions
diff --git a/12117.patch b/12117.patch
new file mode 100644
index 0000000..243b353
--- /dev/null
+++ b/12117.patch
@@ -0,0 +1,40 @@
+From f466b508c1d1043a96caffef59713de517de6362 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Tue, 8 Aug 2017 07:13:55 +0200
+Subject: [PATCH] Fix #12114 missing TSRMLS for zts BUILD
+
+---
+ src/php/ext/grpc/channel.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/php/ext/grpc/channel.c b/src/php/ext/grpc/channel.c
+index f1187e8722f..874e24b408d 100644
+--- a/src/php/ext/grpc/channel.c
++++ b/src/php/ext/grpc/channel.c
+@@ -158,7 +158,7 @@ void create_and_add_channel_to_persistent_list(
+ grpc_channel_args args,
+ wrapped_grpc_channel_credentials *creds,
+ char *key,
+- php_grpc_int key_len) {
++ php_grpc_int key_len TSRMLS_DC) {
+ php_grpc_zend_resource new_rsrc;
+ channel_persistent_le_t *le;
+ // this links each persistent list entry to a destructor
+@@ -293,7 +293,7 @@ PHP_METHOD(Channel, __construct) {
+ } else if (!(PHP_GRPC_PERSISTENT_LIST_FIND(&EG(persistent_list), key,
+ key_len, rsrc))) {
+ create_and_add_channel_to_persistent_list(
+- channel, target, args, creds, key, key_len);
++ channel, target, args, creds, key, key_len TSRMLS_CC);
+ } else {
+ // Found a previously stored channel in the persistent list
+ channel_persistent_le_t *le = (channel_persistent_le_t *)rsrc->ptr;
+@@ -303,7 +303,7 @@ PHP_METHOD(Channel, __construct) {
+ strcmp(creds->hashstr, le->channel->creds_hashstr) != 0)) {
+ // somehow hash collision
+ create_and_add_channel_to_persistent_list(
+- channel, target, args, creds, key, key_len);
++ channel, target, args, creds, key, key_len TSRMLS_CC);
+ } else {
+ channel->wrapper = le->channel;
+ }
diff --git a/REFLECTION b/REFLECTION
index 71c6f20..9167d2d 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #179 grpc version 1.4.1 ] {
+Extension [ <persistent> extension #182 grpc version 1.4.3 ] {
- Constants [41] {
Constant [ integer Grpc\CALL_OK ] { 0 }
diff --git a/php-pecl-grpc.spec b/php-pecl-grpc.spec
index 0b23ae5..50abdab 100644
--- a/php-pecl-grpc.spec
+++ b/php-pecl-grpc.spec
@@ -21,18 +21,22 @@
%else
%global ini_name 40-%{pecl_name}.ini
%endif
-%global upstream_version 1.4.1
+%global upstream_version 1.4.3
#global upstream_prever RC2
Summary: General RPC framework
Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: MIT
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
Source0: http://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+# https://github.com/grpc/grpc/issues/12114
+# https://github.com/grpc/grpc/pull/12117
+Patch0: 12117.patch
+
BuildRequires: %{?scl_prefix}php-devel > 5.5
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: zlib-devel
@@ -99,9 +103,7 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
-# https://github.com/grpc/grpc/issues/10842
-sed -e '/PHP_GRPC_VERSION/s/"1.4.0RC1"/"%{upstream_version}%{?upstream_prever}"/' \
- -i src/php/ext/grpc/version.h
+%patch0 -p1 -b .pr12117
# Sanity check, really often broken
extver=$(sed -n '/PHP_GRPC_VERSION/{s/.* "//;s/".*$//;p}' src/php/ext/grpc/version.h)
@@ -221,6 +223,11 @@ cd ../ZTS
%changelog
+* Tue Aug 8 2017 Remi Collet <remi@remirepo.net> - 1.4.3-1
+- Update to 1.4.3
+- add patch for ZTS build
+ from https://github.com/grpc/grpc/pull/12117
+
* Tue Jul 18 2017 Remi Collet <remi@remirepo.net> - 1.4.1-2
- rebuild for PHP 7.2.0beta1 new API