diff options
-rw-r--r-- | PHPINFO | 3 | ||||
-rw-r--r-- | REFLECTION | 7 | ||||
-rw-r--r-- | grpc-build.patch | 4 | ||||
-rw-r--r-- | grpc-gcc14.patch | 44 | ||||
-rw-r--r-- | grpc-noatfork.patch | 11 | ||||
-rw-r--r-- | grpc-openssl.patch | 20 | ||||
-rw-r--r-- | grpc-workaround.patch | 13 | ||||
-rw-r--r-- | php-pecl-grpc.spec | 158 |
8 files changed, 147 insertions, 113 deletions
@@ -2,11 +2,10 @@ grpc grpc support => enabled -grpc module version => 1.64.0RC2 +grpc module version => 1.73.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 @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #105 grpc version 1.64.0RC2 ] { +Extension [ <persistent> extension #139 grpc version 1.73.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.73.0 } } - Classes [7] { diff --git a/grpc-build.patch b/grpc-build.patch index 6674ffe..c332626 100644 --- a/grpc-build.patch +++ b/grpc-build.patch @@ -6,9 +6,9 @@ diff -up ./config.m4.rpm ./config.m4 LIBS="-lpthread $LIBS" - CFLAGS="-std=c11 -g -O2" -- CXXFLAGS="-std=c++14 -fno-exceptions -fno-rtti -g -O2" +- CXXFLAGS="-std=c++17 -fno-exceptions -fno-rtti -g -O2" + CFLAGS="$CFLAGS -std=c11" -+ CXXFLAGS="$CXXFLAGS -std=c++14 -fno-exceptions -fno-rtti" ++ CXXFLAGS="$CXXFLAGS -std=c++17 -fno-exceptions -fno-rtti" GRPC_SHARED_LIBADD="-lpthread $GRPC_SHARED_LIBADD" PHP_REQUIRE_CXX() PHP_ADD_LIBRARY(pthread) 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 deleted file mode 100644 index 08e1432..0000000 --- a/grpc-noatfork.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up ./config.m4.noatfork ./config.m4 ---- ./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.64.0RC2\""') - 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..8a3c3d7 100644 --- a/php-pecl-grpc.spec +++ b/php-pecl-grpc.spec @@ -1,49 +1,58 @@ # remirepo spec file for php-pecl-grpc # -# Copyright (c) 2017-2024 Remi Collet -# License: CC-BY-SA-4.0 -# http://creativecommons.org/licenses/by-sa/4.0/ +# SPDX-FileCopyrightText: Copyright 2017-2025 Remi Collet +# SPDX-License-Identifier: CECILL-2.1 +# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # # 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.73.0 +#global upstream_prever RC2 %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 - -%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 +Patch2: %{pecl_name}-workaround.patch +Patch3: %{pecl_name}-openssl.patch + 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,20 +78,19 @@ 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} %patch -P0 -p1 -b .rpm -%ifarch %{arm} -%patch -P1 -p1 -b .noatfork +%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 -pushd third_party/boringssl-with-bazel/src -%patch -P2 -p1 -b .gcc14 -popd #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 +114,6 @@ extension=%{pecl_name}.so ;grpc.poll_strategy = '' ;grpc.grpc_verbosity = '' ;grpc.grpc_trace = '' -;grpc.log_filename = '' EOF @@ -115,30 +122,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 +158,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 +169,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 +186,6 @@ cd ../ZTS %files -%{!?_licensedir:%global license %%doc} %license %{sources}/LICENSE %{pecl_xmldir}/%{name}.xml @@ -209,6 +199,76 @@ cd ../ZTS %changelog +* Wed Jun 18 2025 Remi Collet <remi@remirepo.net> - 1.73.0-1 +- update to 1.73.0 + +* Tue Jun 3 2025 Remi Collet <remi@remirepo.net> - 1.73.0~RC2-1 +- update to 1.73.0RC2 + +* Tue Apr 29 2025 Remi Collet <remi@remirepo.net> - 1.72.0-1 +- update to 1.72.0 + +* Wed Apr 9 2025 Remi Collet <remi@remirepo.net> - 1.72.0~RC1-1 +- update to 1.72.0RC1 + +* Wed Mar 12 2025 Remi Collet <remi@remirepo.net> - 1.71.0-1 +- update to 1.71.0 + +* Wed Feb 26 2025 Remi Collet <remi@remirepo.net> - 1.71.0~RC2-1 +- update to 1.71.0RC2 + +* Fri Jan 31 2025 Remi Collet <remi@remirepo.net> - 1.70.0-1 +- update to 1.70.0 + +* Thu Jan 16 2025 Remi Collet <remi@remirepo.net> - 1.70.0~RC1-1 +- update to 1.70.0RC1 + +* Tue Jan 7 2025 Remi Collet <remi@remirepo.net> - 1.69.0-1 +- update to 1.69.0 + +* Tue Dec 17 2024 Remi Collet <remi@remirepo.net> - 1.69.0~RC1-1 +- update to 1.69.0RC1 +- re-license spec file to CECILL-2.1 + +* Tue Nov 19 2024 Remi Collet <remi@remirepo.net> - 1.68.0-1 +- update to 1.68.0 + +* 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 |