summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION7
-rw-r--r--grpc-build.patch10
-rw-r--r--grpc-noatfork.patch8
-rw-r--r--php-pecl-grpc.spec187
5 files changed, 142 insertions, 72 deletions
diff --git a/PHPINFO b/PHPINFO
index cac05a0..376eff3 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,7 +2,7 @@
grpc
grpc support => enabled
-grpc module version => 1.45.0
+grpc module version => 1.63.0RC1
Directive => Local Value => Master Value
grpc.enable_fork_support => 0 => 0
diff --git a/REFLECTION b/REFLECTION
index fab6df0..cc4adad 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #120 grpc version 1.45.0 ] {
+Extension [ <persistent> extension #104 grpc version 1.63.0RC1 ] {
- INI {
Entry [ grpc.enable_fork_support <SYSTEM> ]
@@ -60,7 +60,7 @@ Extension [ <persistent> extension #120 grpc version 1.45.0 ] {
Constant [ int Grpc\CHANNEL_READY ] { 2 }
Constant [ int Grpc\CHANNEL_TRANSIENT_FAILURE ] { 3 }
Constant [ int Grpc\CHANNEL_FATAL_FAILURE ] { 4 }
- Constant [ string Grpc\VERSION ] { 1.45.0 }
+ Constant [ string Grpc\VERSION ] { 1.63.0RC1 }
}
- Classes [7] {
@@ -75,7 +75,8 @@ Extension [ <persistent> extension #120 grpc version 1.45.0 ] {
- Static methods [0] {
}
- - Properties [0] {
+ - Properties [1] {
+ Property [ protected $channel = NULL ]
}
- Methods [5] {
diff --git a/grpc-build.patch b/grpc-build.patch
index 4d15462..6674ffe 100644
--- a/grpc-build.patch
+++ b/grpc-build.patch
@@ -1,14 +1,14 @@
diff -up ./config.m4.rpm ./config.m4
---- ./config.m4.rpm 2022-03-28 08:02:01.063993366 +0200
-+++ ./config.m4 2022-03-28 08:04:44.843398916 +0200
-@@ -18,8 +18,8 @@ if test "$PHP_GRPC" != "no"; then
+--- ./config.m4.rpm 2022-07-07 07:28:31.928904255 +0200
++++ ./config.m4 2022-07-07 07:30:39.835689129 +0200
+@@ -19,8 +19,8 @@ if test "$PHP_GRPC" != "no"; then
LIBS="-lpthread $LIBS"
- CFLAGS="-std=c11 -g -O2"
-- CXXFLAGS="-std=c++11 -fno-exceptions -fno-rtti -g -O2"
+- CXXFLAGS="-std=c++14 -fno-exceptions -fno-rtti -g -O2"
+ CFLAGS="$CFLAGS -std=c11"
-+ CXXFLAGS="$CXXFLAGS -std=c++11 -fno-exceptions -fno-rtti"
++ CXXFLAGS="$CXXFLAGS -std=c++14 -fno-exceptions -fno-rtti"
GRPC_SHARED_LIBADD="-lpthread $GRPC_SHARED_LIBADD"
PHP_REQUIRE_CXX()
PHP_ADD_LIBRARY(pthread)
diff --git a/grpc-noatfork.patch b/grpc-noatfork.patch
index 1bb5a7b..eafdc91 100644
--- a/grpc-noatfork.patch
+++ b/grpc-noatfork.patch
@@ -1,11 +1,11 @@
diff -up ./config.m4.noatfork ./config.m4
---- ./config.m4.noatfork 2022-01-31 14:03:14.032856870 +0100
-+++ ./config.m4 2022-01-31 14:07:39.424150191 +0100
-@@ -1102,7 +1102,6 @@ if test "$PHP_GRPC" != "no"; then
+--- ./config.m4.noatfork 2022-07-07 07:30:58.524647576 +0200
++++ ./config.m4 2022-07-07 07:32:01.490513120 +0200
+@@ -1379,7 +1379,6 @@ if test "$PHP_GRPC" != "no"; then
, $ext_shared, , -fvisibility=hidden \
-DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN \
-D_HAS_EXCEPTIONS=0 -DNOMINMAX -DGRPC_ARES=0 \
- -DGRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK=1 \
-DGRPC_XDS_USER_AGENT_NAME_SUFFIX='"\"PHP\""' \
- -DGRPC_XDS_USER_AGENT_VERSION_SUFFIX='"\"1.45.0\""')
+ -DGRPC_XDS_USER_AGENT_VERSION_SUFFIX='"\"1.63.0RC1\""')
diff --git a/php-pecl-grpc.spec b/php-pecl-grpc.spec
index 73c38d1..4b254e5 100644
--- a/php-pecl-grpc.spec
+++ b/php-pecl-grpc.spec
@@ -1,47 +1,43 @@
# remirepo spec file for php-pecl-grpc
#
-# Copyright (c) 2017-2022 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2017-2024 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
-
-%if 0%{?scl:1}
-%global sub_prefix %{scl_prefix}
-%scl_package php-pecl-grpc
-%endif
+%{?scl:%scl_package php-pecl-grpc}
## TODO: not suitable for Fedora, tons of bundled libraries
-%global pecl_name grpc
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global ini_name 40-%{pecl_name}.ini
-%global upstream_version 1.45.0
-#global upstream_prever RC2
+%global pecl_name grpc
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%global ini_name 40-%{pecl_name}.ini
+%global upstream_version 1.63.0
+%global upstream_prever RC1
+%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
+%global _configure ../%{sources}/configure
Summary: General RPC framework
-Name: %{?sub_prefix}php-pecl-%{pecl_name}
+Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-License: ASL 2.0
+License: Apache-2.0
URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+Source0: https://pecl.php.net/get/%{sources}.tgz
Patch0: %{pecl_name}-build.patch
Patch1: %{pecl_name}-noatfork.patch
-%if 0%{?rhel} == 7 && 0%{?dtsversion} == 0
-BuildRequires: devtoolset-6-toolchain
-%global dtsversion 6
-%global dtsenable source /opt/rh/devtoolset-6/enable
-%global dtsprefix devtoolset-6-
+%if 0%{?rhel} == 7 && 0%{?dtsversion} < 7
+BuildRequires: devtoolset-7-toolchain
+%global dtsversion 7
+%global dtsenable source /opt/rh/devtoolset-7/enable
+%global dtsprefix devtoolset-7-
%endif
BuildRequires: make
-BuildRequires: %{?dtsprefix}gcc
+BuildRequires: %{?dtsprefix}gcc >= 7.0
BuildRequires: %{?dtsprefix}gcc-c++
BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-pear
@@ -49,32 +45,11 @@ BuildRequires: zlib-devel
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
-%endif
-
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-# Other third party repo stuff
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.0"
-Obsoletes: php80-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.1"
-Obsoletes: php81-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
%description
@@ -89,17 +64,16 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c
-mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-cd NTS
-%patch0 -p1 -b .rpm
+cd %{sources}
+%patch -P0 -p1 -b .rpm
%ifarch %{arm}
-%patch1 -p1 -b .noatfork
+%patch -P1 -p1 -b .noatfork
%endif
#sed -e '/PHP_GRPC_VERSION/s/RC3/RC2/' -i src/php/ext/grpc/version.h
@@ -112,9 +86,9 @@ if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
fi
cd ..
+mkdir NTS
%if %{with_zts}
-# Duplicate source tree for NTS / ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
# Create configuration file
@@ -134,22 +108,23 @@ EOF
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
%configure \
--enable-grpc \
--with-libdir=%{_lib} \
- --with-php-config=%{_bindir}/php-config
+ --with-php-config=%{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
--enable-grpc \
--with-libdir=%{_lib} \
- --with-php-config=%{_bindir}/zts-php-config
+ --with-php-config=%{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -174,7 +149,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
# Documentation
for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
+do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
@@ -203,20 +178,20 @@ fi
cd NTS
%{__php} --no-php-ini \
--define extension=modules/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
%if %{with_zts}
: Minimal load test for ZTS extension
cd ../ZTS
%{__ztsphp} --no-php-ini \
--define extension=modules/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
%endif
%files
%{!?_licensedir:%global license %%doc}
-%license NTS/LICENSE
+%license %{sources}/LICENSE
%{pecl_xmldir}/%{name}.xml
%config(noreplace) %{php_inidir}/%{ini_name}
@@ -229,6 +204,100 @@ cd ../ZTS
%changelog
+* Wed Apr 17 2024 Remi Collet <remi@remirepo.net> - 1.63.0~RC1-1
+- update to 1.63.0RC1
+
+* Thu Feb 22 2024 Remi Collet <remi@remirepo.net> - 1.62.0-1
+- update to 1.62.0
+
+* Tue Feb 20 2024 Remi Collet <remi@remirepo.net> - 1.62.0~RC1-1
+- update to 1.62.0RC1
+- report broken build using GCC 14 on Fedora 40
+ https://github.com/grpc/grpc/issues/35945
+
+* Tue Feb 6 2024 Remi Collet <remi@remirepo.net> - 1.61.0-1
+- update to 1.61.0
+
+* Fri Dec 1 2023 Remi Collet <remi@remirepo.net> - 1.60.0-1
+- update to 1.60.0
+
+* Fri Nov 17 2023 Remi Collet <remi@remirepo.net> - 1.60.0~RC1-1
+- update to 1.60.0RC1
+
+* Tue Oct 17 2023 Remi Collet <remi@remirepo.net> - 1.59.1-1
+- update to 1.59.1
+
+* Thu Sep 28 2023 Remi Collet <remi@remirepo.net> - 1.59.0~RC1-1
+- update to 1.59.0RC1
+
+* Thu Sep 7 2023 Remi Collet <remi@remirepo.net> - 1.58.0-1
+- update to 1.58.0
+
+* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 1.57.0-2
+- rebuild for PHP 8.3.0RC1
+
+* Sat Aug 19 2023 Remi Collet <remi@remirepo.net> - 1.57.0-1
+- update to 1.57.0
+- build out of sources tree
+
+* Mon Jun 19 2023 Remi Collet <remi@remirepo.net> - 1.56.0-1
+- update to 1.56.0
+
+* Mon Jun 5 2023 Remi Collet <remi@remirepo.net> - 1.56.0~RC1-1
+- update to 1.56.0RC1
+
+* Tue May 23 2023 Remi Collet <remi@remirepo.net> - 1.55.0-1
+- update to 1.55.0
+
+* Tue May 2 2023 Remi Collet <remi@remirepo.net> - 1.55.0~RC1-1
+- update to 1.55.0RC1
+
+* Tue Apr 18 2023 Remi Collet <remi@remirepo.net> - 1.54.0-1
+- update to 1.54.0
+
+* Mon Mar 27 2023 Remi Collet <remi@remirepo.net> - 1.53.0-1
+- update to 1.53.0
+
+* Tue Mar 14 2023 Remi Collet <remi@remirepo.net> - 1.53.0~RC2-1
+- update to 1.53.0RC2
+
+* Thu Mar 2 2023 Remi Collet <remi@remirepo.net> - 1.53.0~RC1-1
+- update to 1.53.0RC1
+- use GCC 7 on EL-7 with PHP <= 7.2
+
+* Mon Feb 27 2023 Remi Collet <remi@remirepo.net> - 1.52.1-1
+- update to 1.52.1
+
+* Thu Jan 26 2023 Remi Collet <remi@remirepo.net> - 1.52.0~RC1-1
+- update to 1.52.0RC1
+
+* Wed Nov 30 2022 Remi Collet <remi@remirepo.net> - 1.51.1-1
+- update to 1.51.1
+
+* Tue Oct 18 2022 Remi Collet <remi@remirepo.net> - 1.50.0-1
+- update to 1.50.0
+
+* Tue Oct 4 2022 Remi Collet <remi@remirepo.net> - 1.50.0~RC1-1
+- update to 1.50.0RC1
+
+* Wed Sep 21 2022 Remi Collet <remi@remirepo.net> - 1.49.0-1
+- update to 1.49.0
+
+* Wed Sep 7 2022 Remi Collet <remi@remirepo.net> - 1.48.1-1
+- update to 1.48.1
+
+* Thu Jul 21 2022 Remi Collet <remi@remirepo.net> - 1.48.0-1
+- update to 1.48.0
+
+* Thu Jul 7 2022 Remi Collet <remi@remirepo.net> - 1.47.0-1
+- update to 1.47.0
+
+* Thu May 26 2022 Remi Collet <remi@remirepo.net> - 1.46.3-1
+- update to 1.46.3
+
+* Wed May 25 2022 Remi Collet <remi@remirepo.net> - 1.46.1-1
+- update to 1.46.1
+
* Mon Mar 28 2022 Remi Collet <remi@remirepo.net> - 1.45.0-1
- update to 1.45.0