summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PHPINFO3
-rw-r--r--REFLECTION7
-rw-r--r--grpc-gcc14.patch44
-rw-r--r--grpc-noatfork.patch2
-rw-r--r--grpc-openssl.patch20
-rw-r--r--grpc-workaround.patch13
-rw-r--r--php-pecl-grpc.spec114
7 files changed, 109 insertions, 94 deletions
diff --git a/PHPINFO b/PHPINFO
index 68ff36a..c739c59 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,11 +2,10 @@
grpc
grpc support => enabled
-grpc module version => 1.64.0RC2
+grpc module version => 1.67.0
Directive => Local Value => Master Value
grpc.enable_fork_support => 0 => 0
grpc.poll_strategy => no value => no value
grpc.grpc_verbosity => no value => no value
grpc.grpc_trace => no value => no value
-grpc.log_filename => no value => no value
diff --git a/REFLECTION b/REFLECTION
index 929caf5..12ba1d8 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #105 grpc version 1.64.0RC2 ] {
+Extension [ <persistent> extension #125 grpc version 1.67.0 ] {
- INI {
Entry [ grpc.enable_fork_support <SYSTEM> ]
@@ -13,9 +13,6 @@ Extension [ <persistent> extension #105 grpc version 1.64.0RC2 ] {
Entry [ grpc.grpc_trace <SYSTEM> ]
Current = ''
}
- Entry [ grpc.log_filename <SYSTEM> ]
- Current = ''
- }
}
- Constants [42] {
@@ -60,7 +57,7 @@ Extension [ <persistent> extension #105 grpc version 1.64.0RC2 ] {
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.64.0RC2 }
+ Constant [ string Grpc\VERSION ] { 1.67.0 }
}
- Classes [7] {
diff --git a/grpc-gcc14.patch b/grpc-gcc14.patch
deleted file mode 100644
index 1d73348..0000000
--- a/grpc-gcc14.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From c70190368c7040c37c1d655f0690bcde2b109a0d Mon Sep 17 00:00:00 2001
-From: David Benjamin <davidben@google.com>
-Date: Thu, 16 May 2024 11:00:42 -0400
-Subject: [PATCH 1/3] Don't define CRYPTO_addc_* and CRYPTO_subc_* in C++
-
-GCC does not support C11 _Generic in C++ mode.
-
-Change-Id: I974a0b04bbe4900419736044d0d8050f2b856d56
-Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/68507
-Auto-Submit: David Benjamin <davidben@google.com>
-Commit-Queue: David Benjamin <davidben@google.com>
-Reviewed-by: Adam Langley <agl@google.com>
----
- crypto/internal.h | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/crypto/internal.h b/crypto/internal.h
-index a77102d76..a45f97bcc 100644
---- a/crypto/internal.h
-+++ b/crypto/internal.h
-@@ -1174,6 +1174,11 @@ static inline uint64_t CRYPTO_rotr_u64(uint64_t value, int shift) {
-
- // Arithmetic functions.
-
-+// The most efficient versions of these functions on GCC and Clang depend on C11
-+// |_Generic|. If we ever need to call these from C++, we'll need to add a
-+// variant that uses C++ overloads instead.
-+#if !defined(__cplusplus)
-+
- // CRYPTO_addc_* returns |x + y + carry|, and sets |*out_carry| to the carry
- // bit. |carry| must be zero or one.
- #if OPENSSL_HAS_BUILTIN(__builtin_addc)
-@@ -1275,6 +1280,8 @@ static inline uint64_t CRYPTO_subc_u64(uint64_t x, uint64_t y, uint64_t borrow,
- #define CRYPTO_subc_w CRYPTO_subc_u32
- #endif
-
-+#endif // !__cplusplus
-+
-
- // FIPS functions.
-
---
-2.45.0
-
diff --git a/grpc-noatfork.patch b/grpc-noatfork.patch
index 08e1432..a0e27f9 100644
--- a/grpc-noatfork.patch
+++ b/grpc-noatfork.patch
@@ -7,5 +7,5 @@ diff -up ./config.m4.noatfork ./config.m4
-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.64.0RC2\""')
+ -DGRPC_XDS_USER_AGENT_VERSION_SUFFIX='"\"1.67.0\""')
diff --git a/grpc-openssl.patch b/grpc-openssl.patch
new file mode 100644
index 0000000..8cb1f5e
--- /dev/null
+++ b/grpc-openssl.patch
@@ -0,0 +1,20 @@
+--- ./config.m4.old 2024-08-13 12:14:53.273367368 +0200
++++ ./config.m4 2024-08-13 12:20:46.644703516 +0200
+@@ -2,7 +2,15 @@
+ [ --enable-grpc Enable grpc support])
+
+ if test "$PHP_GRPC" != "no"; then
+- dnl Write more examples of tests here...
++ PHP_ARG_WITH(openssl-dir, for OpenSSL installation prefix,
++ [ --with-openssl-dir[=DIR] Event: openssl installation prefix], yes, no)
++ PHP_SETUP_OPENSSL(GRPC_SHARED_LIBADD,
++ [
++ ], [
++ AC_MSG_ERROR([OpenSSL libraries not found.
++ Check whether openssl is on your PKG_CONFIG_PATH and the output in config.log)
++ ])
++ ])
+
+ dnl # --with-grpc -> add include path
+ PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/include)
+
diff --git a/grpc-workaround.patch b/grpc-workaround.patch
new file mode 100644
index 0000000..feaf896
--- /dev/null
+++ b/grpc-workaround.patch
@@ -0,0 +1,13 @@
+diff -up grpc-1.65.1/third_party/abseil-cpp/absl/log/internal/log_sink_set.cc.old grpc-1.65.1/third_party/abseil-cpp/absl/log/internal/log_sink_set.cc
+--- grpc-1.65.1/third_party/abseil-cpp/absl/log/internal/log_sink_set.cc.old 2024-07-17 14:08:10.982474321 +0200
++++ grpc-1.65.1/third_party/abseil-cpp/absl/log/internal/log_sink_set.cc 2024-07-17 14:12:26.562502991 +0200
+@@ -90,8 +90,7 @@ class StderrLogSink final : public LogSi
+ ~StderrLogSink() override = default;
+
+ void Send(const absl::LogEntry& entry) override {
+- if (entry.log_severity() < absl::StderrThreshold() &&
+- absl::log_internal::IsInitialized()) {
++ if (entry.log_severity() < absl::StderrThreshold()) {
+ return;
+ }
+
diff --git a/php-pecl-grpc.spec b/php-pecl-grpc.spec
index c0ac9e4..7af2422 100644
--- a/php-pecl-grpc.spec
+++ b/php-pecl-grpc.spec
@@ -7,43 +7,53 @@
# Please, preserve the changelog entries
#
-%{?scl:%scl_package php-pecl-grpc}
+%if 0%{?scl:1}
+%scl_package php-pecl-grpc
+%else
+%global _root_prefix %{_prefix}
+%endif
## TODO: not suitable for Fedora, tons of bundled libraries
## use mock with --cleanup-after
+## TODO: cleanup --with-openssl-dir, needed for PHP < 7.4
+%bcond_without openssl
+
%global pecl_name grpc
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
-%global upstream_version 1.64.0
-%global upstream_prever RC2
+%global upstream_version 1.67.0
+#global upstream_prever RC5
%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
%global _configure ../%{sources}/configure
+# Disable LTO (erratic crash during build)
+%define _lto_cflags %{nil}
Summary: General RPC framework
Name: %{?scl_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: Apache-2.0
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{sources}.tgz
Patch0: %{pecl_name}-build.patch
Patch1: %{pecl_name}-noatfork.patch
-Patch2: %{pecl_name}-gcc14.patch
+Patch2: %{pecl_name}-workaround.patch
+Patch3: %{pecl_name}-openssl.patch
-%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 >= 7.0
BuildRequires: %{?dtsprefix}gcc-c++
BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: zlib-devel
+%if %{with openssl}
+BuildRequires: openssl-devel
+%if 0%{?fedora} >= 41
+BuildRequires: openssl-devel-engine
+%endif
+%endif
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
@@ -69,7 +79,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
-i package.xml
cd %{sources}
@@ -77,12 +87,14 @@ cd %{sources}
%ifarch %{arm}
%patch -P1 -p1 -b .noatfork
%endif
-pushd third_party/boringssl-with-bazel/src
-%patch -P2 -p1 -b .gcc14
-popd
+%patch -P2 -p1 -b .nolog
+%if %{with openssl}
+%patch -P3 -p1 -b .openssl
+sed -e '/boringssl-with-bazel/d' -i config.m4
+rm -r third_party/boringssl-with-bazel
+%endif
#sed -e '/PHP_GRPC_VERSION/s/RC3/RC2/' -i src/php/ext/grpc/version.h
-
# Sanity check, really often broken
extver=$(sed -n '/PHP_GRPC_VERSION/{s/.* "//;s/".*$//;p}' src/php/ext/grpc/version.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
@@ -106,7 +118,6 @@ extension=%{pecl_name}.so
;grpc.poll_strategy = ''
;grpc.grpc_verbosity = ''
;grpc.grpc_trace = ''
-;grpc.log_filename = ''
EOF
@@ -115,30 +126,34 @@ EOF
cd %{sources}
%{__phpize}
+[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
cd ../NTS
%configure \
--enable-grpc \
+ --with-openssl-dir=%{_root_prefix} \
--with-libdir=%{_lib} \
--with-php-config=%{__phpconfig}
-make %{?_smp_mflags}
+%make_build
%if %{with_zts}
cd ../ZTS
%configure \
--enable-grpc \
+ --with-openssl-dir=%{_root_prefix} \
--with-libdir=%{_lib} \
--with-php-config=%{__ztsphpconfig}
-make %{?_smp_mflags}
+%make_build
%endif
%install
%{?dtsenable}
-make -C NTS install INSTALL_ROOT=%{buildroot}
+%make_install -C NTS
# install config file
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -147,7 +162,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
%if %{with_zts}
-make -C ZTS install INSTALL_ROOT=%{buildroot}
+%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
@@ -158,26 +173,6 @@ do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
-%if 0%{?fedora} < 24 && 0%{?rhel} < 8
-# when pear installed alone, after us
-%triggerin -- %{?scl_prefix}php-pear
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-# posttrans as pear can be installed after us
-%posttrans
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-%postun
-if [ $1 -eq 0 -a -x %{__pecl} ] ; then
- %{pecl_uninstall} %{pecl_name} >/dev/null || :
-fi
-%endif
-
-
%check
: Minimal load test for NTS extension
cd NTS
@@ -195,7 +190,6 @@ cd ../ZTS
%files
-%{!?_licensedir:%global license %%doc}
%license %{sources}/LICENSE
%{pecl_xmldir}/%{name}.xml
@@ -209,6 +203,42 @@ cd ../ZTS
%changelog
+* Thu Oct 17 2024 Remi Collet <remi@remirepo.net> - 1.67.0-1
+- update to 1.67.0
+
+* Mon Aug 26 2024 Remi Collet <remi@remirepo.net> - 1.66.0-1
+- update to 1.66.0
+
+* Mon Aug 19 2024 Remi Collet <remi@remirepo.net> - 1.66.0~RC5-1
+- update to 1.66.0RC5
+
+* Tue Aug 13 2024 Remi Collet <remi@remirepo.net> - 1.66.0~RC3-2
+- use system openssl
+
+* Tue Aug 13 2024 Remi Collet <remi@remirepo.net> - 1.66.0~RC3-1
+- update to 1.66.0RC3
+
+* Mon Jul 29 2024 Remi Collet <remi@remirepo.net> - 1.65.2-1
+- update to 1.65.2
+
+* Wed Jul 17 2024 Remi Collet <remi@remirepo.net> - 1.65.1-2
+- better fix for https://github.com/grpc/grpc/issues/37178
+ from https://github.com/abseil/abseil-cpp/pull/1718
+
+* Wed Jul 17 2024 Remi Collet <remi@remirepo.net> - 1.65.1-1
+- update to 1.65.1
+- add patch to workaround to https://github.com/grpc/grpc/issues/37178
+
+* Tue Jul 9 2024 Remi Collet <remi@remirepo.net> - 1.65.0-1
+- update to 1.65.0
+
+* Mon Jul 8 2024 Remi Collet <remi@remirepo.net> - 1.65.0~RC2-1
+- update to 1.65.0RC2
+- report https://github.com/grpc/grpc/issues/37178 unwanted log output
+
+* Mon Jun 3 2024 Remi Collet <remi@remirepo.net> - 1.64.1-1
+- update to 1.64.1
+
* Thu May 30 2024 Remi Collet <remi@remirepo.net> - 1.64.0~RC2-1
- update to 1.64.0RC2