summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2024-03-20 10:17:53 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2024-04-12 11:59:40 +0200
commit10a852359e0374ed3f03d8a7216780db0fdf141b (patch)
treeb11ba5a8d9f2bd40b3196ab2e174f1037871cf75
parenta42a024758c781b1416183f49a3121a708d3eed3 (diff)
downloadaports-10a852359e0374ed3f03d8a7216780db0fdf141b.zip
community/grpc: upgrade to 1.62.1
-rw-r--r--community/grpc/APKBUILD14
-rw-r--r--community/grpc/cython3.patch172
-rw-r--r--community/grpc/ruby-use-shared-libs.patch36
3 files changed, 198 insertions, 24 deletions
diff --git a/community/grpc/APKBUILD b/community/grpc/APKBUILD
index e43171933b1..85996b285de 100644
--- a/community/grpc/APKBUILD
+++ b/community/grpc/APKBUILD
@@ -2,7 +2,7 @@
# Contributor: wener <wenermail@gmail.com>
# Maintainer: wener <wenermail@gmail.com>
pkgname=grpc
-pkgver=1.59.3
+pkgver=1.62.1
pkgrel=0
pkgdesc="The C based gRPC"
url="https://grpc.io/"
@@ -60,7 +60,11 @@ subpackages="
libgrpc:lib
libgrpc_authorization_provider:lib
libgrpc_unsecure:lib
- libupb:lib
+ libupb_base_lib:lib
+ libupb_json_lib:lib
+ libupb_mem_lib:lib
+ libupb_message_lib:lib
+ libupb_textformat_lib:lib
"
_googletest_rev=0e402173c97aea7a00749e825b194bfede4f2e45
@@ -73,6 +77,7 @@ source="https://github.com/grpc/grpc/archive/v$pkgver/grpc-v$pkgver.tar.gz
ruby-use-shared-libs.patch
ruby-use-system-certs.patch
makefile-use-system-abseil.patch
+ cython3.patch
"
options="net !check" # sometimes hang indefinitely on builders
@@ -264,12 +269,13 @@ lib() {
}
sha512sums="
-54344a124a16e979b30c8141a44be3a98e18d457a1b7d6c6eed3ee70b70cc2a5dbeab5d227d49de4480aa921fc947643252a5c80e9052138fc45c5f86ed18d5c grpc-v1.59.3.tar.gz
+3224ad2617c18156f90c54c1ebf1f2015e405a6f12546e8709e0c905f52508c9f1a13b4d5a6cc7a35abf58b429985b5b504c9062f50c0d3d6aa163180a61047a grpc-v1.62.1.tar.gz
5c5eaf6ff9f3c1bca025b7ef0234ba97232ba85b43e6354a92f49b7208f5c47581ebaf18bf58618498e5d264f2620c2b6676e81bb0f7df77112b96ba271ececf googletest-0e402173c97aea7a00749e825b194bfede4f2e45.tar.gz
7fa146ce86ddd4f160bb1ca9ff01cb7aca6b2b8c9aa50e4fa6b84504b9117b104be0d1e31ccb452d846549dfe1e9012ceccfcdc1f2357ed567621d71fb8b08c5 01-chttp2-maybe-uninitialized.patch
6702e39c6a3c065fe4ff5ae48898057135c09bf6851e35fc958cf95ee5d77e9dd34e8c34d978efe60682384e46c4c4b2e51156d546b06a0eb1feed89adcc024b find-dependency.patch
4ea72d2acd8bee9c9022a4412aa0af0477faca7b0810d14decb3ad5d4da044247f51189512323bfee855b9b260a7f82b812310391451e5d8ee718297800d7a73 ruby-fix-protoc-path.patch
-7123bf1bbc48ceb303ce1e9820ea45a06dabd25e20e3c1c116ef68e629e80f229cf20314c415d74f0c5c1725f23a00b446656e0cffba3dcd3cc766ae29d8fb2f ruby-use-shared-libs.patch
+68af4751ff99e98f9e794ba01e2ec64b2f91c326a8db785be1126472cd1f1771908e38615c7ddd16d1d475ac399e07dab8962c6e921b27cd4c4257ee9236ad74 ruby-use-shared-libs.patch
631af4b9ac29c1ebabb2c88394ea2993e36cec1beda38195e1587dbd9d3c8c9eef75a17d2326d3cd2e682de551401216075ba08fdc501c098b8092d718ded381 ruby-use-system-certs.patch
89e260934da83eb45fa6b73884cba1b1c30f99c0eb883a726e2d36ee4788246f4c6fa1b201077038af956bcb58e625f83bedba4f186c711785ec240373ce4fc5 makefile-use-system-abseil.patch
+896d2771fbb726db97efc7a76687a8fddfae18b0492977fc1f7cec4002803f7aed29e8276c94c6b60a06ecfe3ee7795d4ec3f8f90031dd3eda32d3e23dc9c98c cython3.patch
"
diff --git a/community/grpc/cython3.patch b/community/grpc/cython3.patch
new file mode 100644
index 00000000000..9068927d0b2
--- /dev/null
+++ b/community/grpc/cython3.patch
@@ -0,0 +1,172 @@
+From b3277bac1585ddee88a170b0a95c260d909cce9c Mon Sep 17 00:00:00 2001
+From: Atri Bhattacharya <A.Bhattacharya@uliege.be>
+Date: Sat, 24 Feb 2024 04:06:08 +0530
+Subject: [PATCH] [python] Cython 3 compatibility: declare functions noexcept.
+
+In Cython 3, cdef functions that really will not raise exceptions must
+be declared as `noexcept`. Fixed by this commit.
+
+Update requirements to `cython >= 3.0` in requirements*.txt and
+setup.py.
+
+Fixes issue #33918.
+---
+ requirements.bazel.txt | 2 +-
+ requirements.txt | 2 +-
+ setup.py | 2 +-
+ .../grpcio/grpc/_cython/_cygrpc/aio/callback_common.pxd.pxi | 2 +-
+ .../grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi | 2 +-
+ src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi | 2 +-
+ src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pxd.pxi | 6 +++---
+ src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pyx.pxi | 6 +++---
+ src/python/grpcio/grpc/_cython/_cygrpc/vtable.pyx.pxi | 6 +++---
+ 9 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/requirements.bazel.txt b/requirements.bazel.txt
+index f46432cc88891..905c092ce4c33 100644
+--- a/requirements.bazel.txt
++++ b/requirements.bazel.txt
+@@ -1,6 +1,6 @@
+ # GRPC Python setup requirements
+ coverage==4.5.4
+-cython==0.29.21
++cython==3.0.0
+ protobuf>=3.5.0.post1, < 4.0dev
+ wheel==0.38.1
+ oauth2client==4.1.0
+diff --git a/requirements.txt b/requirements.txt
+index 05390850559f1..56169434b1b78 100644
+--- a/requirements.txt
++++ b/requirements.txt
+@@ -1,5 +1,5 @@
+ # GRPC Python setup requirements
+ coverage>=4.0
+-cython>=0.29.8,<3.0.0rc1
++cython>=3.0.0
+ protobuf>=4.21.3,<5.0dev
+ wheel>=0.29
+diff --git a/setup.py b/setup.py
+index 2ce5fef422316..8b4ce5c16736a 100644
+--- a/setup.py
++++ b/setup.py
+@@ -539,7 +539,7 @@ def cython_extensions_and_necessity():
+ sys.stderr.write(
+ "We could not find Cython. Setup may take 10-20 minutes.\n"
+ )
+- SETUP_REQUIRES += ("cython>=0.23,<3.0.0rc1",)
++ SETUP_REQUIRES += ("cython>=3.0.0",)
+
+ COMMAND_CLASS = {
+ "doc": commands.SphinxDocumentation,
+diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pxd.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pxd.pxi
+index e54e5107547c1..26edbdb917b10 100644
+--- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pxd.pxi
++++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pxd.pxi
+@@ -48,7 +48,7 @@ cdef class CallbackWrapper:
+ @staticmethod
+ cdef void functor_run(
+ grpc_completion_queue_functor* functor,
+- int succeed)
++ int succeed) noexcept
+
+ cdef grpc_completion_queue_functor *c_functor(self)
+
+diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi
+index 14a0098fc2041..2b0df0e5ce7f7 100644
+--- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi
++++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi
+@@ -50,7 +50,7 @@ cdef class CallbackWrapper:
+ @staticmethod
+ cdef void functor_run(
+ grpc_completion_queue_functor* functor,
+- int success):
++ int success) noexcept:
+ cdef CallbackContext *context = <CallbackContext *>functor
+ cdef object waiter = <object>context.waiter
+ if not waiter.cancelled():
+diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
+index 74a3f16d72dbb..600c0f304e067 100644
+--- a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
++++ b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
+@@ -316,7 +316,7 @@ def server_credentials_ssl_dynamic_cert_config(initial_cert_config,
+ return credentials
+
+ cdef grpc_ssl_certificate_config_reload_status _server_cert_config_fetcher_wrapper(
+- void* user_data, grpc_ssl_server_certificate_config **config) with gil:
++ void* user_data, grpc_ssl_server_certificate_config **config) noexcept with gil:
+ # This is a credentials.ServerCertificateConfig
+ cdef ServerCertificateConfig cert_config = None
+ if not user_data:
+diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pxd.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pxd.pxi
+index 13a02434787ba..b300883abae81 100644
+--- a/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pxd.pxi
++++ b/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pxd.pxi
+@@ -12,10 +12,10 @@
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+
+-cdef void __prefork() nogil
++cdef void __prefork() noexcept nogil
+
+
+-cdef void __postfork_parent() nogil
++cdef void __postfork_parent() noexcept nogil
+
+
+-cdef void __postfork_child() nogil
+\ No newline at end of file
++cdef void __postfork_child() noexcept nogil
+diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pyx.pxi
+index 565f483b2ae00..d901cfddf4321 100644
+--- a/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pyx.pxi
++++ b/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pyx.pxi
+@@ -35,7 +35,7 @@ _GRPC_ENABLE_FORK_SUPPORT = (
+
+ _fork_handler_failed = False
+
+-cdef void __prefork() nogil:
++cdef void __prefork() noexcept nogil:
+ with gil:
+ global _fork_handler_failed
+ _fork_handler_failed = False
+@@ -49,14 +49,14 @@ cdef void __prefork() nogil:
+ _fork_handler_failed = True
+
+
+-cdef void __postfork_parent() nogil:
++cdef void __postfork_parent() noexcept nogil:
+ with gil:
+ with _fork_state.fork_in_progress_condition:
+ _fork_state.fork_in_progress = False
+ _fork_state.fork_in_progress_condition.notify_all()
+
+
+-cdef void __postfork_child() nogil:
++cdef void __postfork_child() noexcept nogil:
+ with gil:
+ try:
+ if _fork_handler_failed:
+diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/vtable.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/vtable.pyx.pxi
+index da4b81bd97e65..f59410073b736 100644
+--- a/src/python/grpcio/grpc/_cython/_cygrpc/vtable.pyx.pxi
++++ b/src/python/grpcio/grpc/_cython/_cygrpc/vtable.pyx.pxi
+@@ -13,16 +13,16 @@
+ # limitations under the License.
+
+ # TODO(https://github.com/grpc/grpc/issues/15662): Reform this.
+-cdef void* _copy_pointer(void* pointer):
++cdef void* _copy_pointer(void* pointer) noexcept:
+ return pointer
+
+
+ # TODO(https://github.com/grpc/grpc/issues/15662): Reform this.
+-cdef void _destroy_pointer(void* pointer):
++cdef void _destroy_pointer(void* pointer) noexcept:
+ pass
+
+
+-cdef int _compare_pointer(void* first_pointer, void* second_pointer):
++cdef int _compare_pointer(void* first_pointer, void* second_pointer) noexcept:
+ if first_pointer < second_pointer:
+ return -1
+ elif first_pointer > second_pointer:
diff --git a/community/grpc/ruby-use-shared-libs.patch b/community/grpc/ruby-use-shared-libs.patch
index 736869a2815..26fa69ca696 100644
--- a/community/grpc/ruby-use-shared-libs.patch
+++ b/community/grpc/ruby-use-shared-libs.patch
@@ -1,3 +1,4 @@
+From b388f87cc4b115c62b64bd6be92c21a1d4e54841 Mon Sep 17 00:00:00 2001
From: Jakub Jirutka <jakub@jirutka.cz>
Date: Wed, 24 Aug 2022 21:20:22 +0200
Subject: [PATCH] Link with shared libraries, don't embed anything
@@ -5,12 +6,15 @@ Subject: [PATCH] Link with shared libraries, don't embed anything
- Don't statically link openssl, zlib and cares.
- Don't build and statically link libgrpc, link shared libgrpc.
- Don't statically link libgcc and libstdc++.
+---
+ src/ruby/ext/grpc/extconf.rb | 28 +++++-----------------------
+ 1 file changed, 5 insertions(+), 23 deletions(-)
diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb
-index 98a8876..808ecfe 100644
+index 502793d919..2bc4e22c6a 100644
--- a/src/ruby/ext/grpc/extconf.rb
+++ b/src/ruby/ext/grpc/extconf.rb
-@@ -69,11 +69,11 @@ if apple_toolchain && !cross_compiling
+@@ -96,11 +96,11 @@ if apple_toolchain && !cross_compiling
end
# Don't embed on TruffleRuby (constant-time crypto is unsafe with Sulong, slow build times)
@@ -25,7 +29,7 @@ index 98a8876..808ecfe 100644
ENV['ARCH_FLAGS'] = RbConfig::CONFIG['ARCH_FLAG']
if apple_toolchain && !cross_compiling
-@@ -97,32 +97,7 @@
+@@ -124,21 +124,7 @@ ENV['BUILDDIR'] = output_dir
strip_tool = RbConfig::CONFIG['STRIP']
strip_tool += ' -x' if apple_toolchain
@@ -43,32 +47,21 @@ index 98a8876..808ecfe 100644
- puts "Building grpc native library: #{cmd}"
- system(cmd)
- exit 1 unless $? == 0
--
-- if grpc_config == 'opt'
-- rm_obj_cmd = "rm -rf #{File.join(output_dir, 'objs')}"
-- puts "Removing grpc object files: #{rm_obj_cmd}"
-- system(rm_obj_cmd)
-- exit 1 unless $? == 0
-- strip_cmd = "#{strip_tool} #{grpc_lib_dir}/*.a"
-- puts "Stripping grpc native library: #{strip_cmd}"
-- system(strip_cmd)
-- exit 1 unless $? == 0
-- end
-end
+$LDFLAGS << ' -L' + ENV.fetch('TOPDIR', '.')
- $CFLAGS << ' -DGRPC_RUBY_WINDOWS_UCRT' if windows_ucrt
- $CFLAGS << ' -I' + File.join(grpc_root, 'include')
-@@ -118,7 +103,7 @@ ext_export_file += '-truffleruby' if RUBY_ENGINE == 'truffleruby'
- $LDFLAGS << ' -Wl,--version-script="' + ext_export_file + '.gcc"' if linux
- $LDFLAGS << ' -Wl,-exported_symbols_list,"' + ext_export_file + '.clang"' if apple_toolchain
+ # C-core built, generate Makefile for ruby extension
+ $LDFLAGS = maybe_remove_strip_all_linker_flag($LDFLAGS)
+@@ -182,7 +168,7 @@ if apple_toolchain
+ $LDFLAGS << ' -Wl,-exported_symbols_list,"' + ext_export_file + '.clang"'
+ end
-$LDFLAGS << ' ' + File.join(grpc_lib_dir, 'libgrpc.a') unless windows
+$LDFLAGS << ' -Wl,-wrap,memcpy -lgrpc' unless windows
if grpc_config == 'gcov'
$CFLAGS << ' -O0 -fprofile-arcs -ftest-coverage'
$LDFLAGS << ' -fprofile-arcs -ftest-coverage -rdynamic'
-@@ -129,10 +114,6 @@ if grpc_config == 'dbg'
+@@ -193,10 +179,6 @@ if grpc_config == 'dbg'
end
$LDFLAGS << ' -Wl,-wrap,memcpy' if linux
@@ -79,3 +72,6 @@ index 98a8876..808ecfe 100644
$LDFLAGS << ' -static' if windows
$CFLAGS << ' -std=c11 '
+--
+2.44.0
+