mariner 3.0 grpc upgrade (#8400)
Co-authored-by: CBL-Mariner Servicing Account <cblmargh@microsoft.com>
This commit is contained in:
Родитель
d8adaf7126
Коммит
97558a2bb5
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"Signatures": {
|
||||
"grpc-1.42.0.tar.gz": "b2f2620c762427bfeeef96a68c1924319f384e877bc0e084487601e4cc6e434c",
|
||||
"grpc-1.42.0-submodules.tar.gz":"89adc6d52d4b75c9b623749106460d8be8f88524b5f8ea26b7fba3d69f1a8f32"
|
||||
}
|
||||
}
|
||||
"Signatures": {
|
||||
"grpc-1.62.0-submodules.tar.gz": "dba5605f82b99f65f7109644cbd0b92936f29f5308d2565c9cc6cfde27e215d0",
|
||||
"grpc-1.62.0.tar.gz": "f40bde4ce2f31760f65dc49a2f50876f59077026494e67dccf23992548b1b04f"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Summary: Open source remote procedure call (RPC) framework
|
||||
Name: grpc
|
||||
Version: 1.42.0
|
||||
Release: 7%{?dist}
|
||||
Version: 1.62.0
|
||||
Release: 1%{?dist}
|
||||
License: ASL 2.0
|
||||
Vendor: Microsoft Corporation
|
||||
Distribution: Azure Linux
|
||||
|
@ -9,31 +9,33 @@ Group: Applications/System
|
|||
URL: https://www.grpc.io
|
||||
Source0: https://github.com/grpc/grpc/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: %{name}-%{version}-submodules.tar.gz
|
||||
Patch0: grpcio-cython3.patch
|
||||
BuildRequires: abseil-cpp-devel
|
||||
BuildRequires: build-essential
|
||||
BuildRequires: c-ares-devel
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc
|
||||
BuildRequires: git
|
||||
BuildRequires: protobuf-devel
|
||||
BuildRequires: re2-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
BuildRequires: ninja-build
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: protobuf-devel
|
||||
BuildRequires: protobuf-static
|
||||
BuildRequires: re2-devel
|
||||
BuildRequires: systemd-devel
|
||||
BuildRequires: zlib-devel
|
||||
Requires: abseil-cpp
|
||||
Requires: c-ares
|
||||
Requires: openssl
|
||||
Requires: protobuf
|
||||
Requires: systemd
|
||||
Requires: zlib
|
||||
|
||||
# Python
|
||||
BuildRequires: build-essential
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-Cython
|
||||
BuildRequires: python3-six
|
||||
BuildRequires: python3-wheel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-protobuf
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-Cython
|
||||
BuildRequires: python3-six
|
||||
BuildRequires: python3-wheel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-protobuf
|
||||
|
||||
%description
|
||||
gRPC is a modern, open source, high-performance remote procedure call (RPC) framework that can run anywhere. It enables client and server applications to communicate transparently, and simplifies the building of connected systems.
|
||||
|
@ -52,7 +54,6 @@ Summary: Plugins files for grpc
|
|||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: protobuf
|
||||
|
||||
|
||||
%description plugins
|
||||
The grpc-plugins package contains the grpc plugins.
|
||||
|
||||
|
@ -65,52 +66,69 @@ Requires: python3-six
|
|||
%description -n python3-grpcio
|
||||
Python language bindings for gRPC.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%setup -T -D -a 1
|
||||
%patch 0 -p1
|
||||
|
||||
# remove third party code taken from installed packages (build requires)
|
||||
rm -r %{_builddir}/%{name}-%{version}/third_party/abseil-cpp
|
||||
rm -r %{_builddir}/%{name}-%{version}/third_party/boringssl-with-bazel
|
||||
rm -r %{_builddir}/%{name}-%{version}/third_party/cares
|
||||
rm -r %{_builddir}/%{name}-%{version}/third_party/protobuf
|
||||
rm -r %{_builddir}/%{name}-%{version}/third_party/re2
|
||||
rm -r %{_builddir}/%{name}-%{version}/third_party/zlib
|
||||
|
||||
%build
|
||||
# Updating used C++ version to be compatible with the build dependencies.
|
||||
# Without this fix 'grpc' compiles with C++11 against 'abseil-cpp' headers,
|
||||
# which generate a different set of APIs than the ones provided by the BR 'abseil-cpp'.
|
||||
# Set C++ version to use to be compatible with the one used the build dependencies.
|
||||
# This is specifically necessary to link against abseil-cpp (build will fail otherwise).
|
||||
CXX_VERSION=$(c++ -dM -E -x c++ /dev/null | grep -oP "(?<=__cplusplus \d{2})\d{2}")
|
||||
|
||||
# !!!!! DO NOT USE CMAKE or python RPM MACROS !!!!!
|
||||
# !!!!! this will block build !!!!!
|
||||
|
||||
mkdir -p cmake/build
|
||||
pushd cmake/build
|
||||
%cmake ../.. -GNinja \
|
||||
-DgRPC_INSTALL=ON \
|
||||
cmake ../.. -GNinja \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_CXX_STANDARD=$CXX_VERSION \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
|
||||
-DgRPC_ABSL_PROVIDER:STRING='package' \
|
||||
-DgRPC_CARES_PROVIDER:STRING='package' \
|
||||
-DgRPC_PROTOBUF_PROVIDER:STRING='package' \
|
||||
-DgRPC_RE2_PROVIDER:STRING='package' \
|
||||
-DgRPC_SSL_PROVIDER:STRING='package' \
|
||||
-DgRPC_ZLIB_PROVIDER:STRING='package'
|
||||
%cmake_build
|
||||
-DgRPC_INSTALL=ON \
|
||||
-DgRPC_BUILD_TESTS=OFF \
|
||||
-DgRPC_ABSL_PROVIDER:STRING=package \
|
||||
-DgRPC_CARES_PROVIDER:STRING=package \
|
||||
-DgRPC_PROTOBUF_PROVIDER:STRING=package \
|
||||
-DgRPC_RE2_PROVIDER:STRING=package \
|
||||
-DgRPC_SSL_PROVIDER:STRING=package \
|
||||
-DgRPC_ZLIB_PROVIDER:STRING=package
|
||||
|
||||
# limit parallel build to avoid resource shortage while building
|
||||
NB_CORE_TO_USE=$(($(nproc) / 2))
|
||||
if [[ $NB_CORE_TO_USE -eq 0 ]]; then
|
||||
NB_CORE_TO_USE=1
|
||||
fi
|
||||
cmake --build . -j$NB_CORE_TO_USE
|
||||
|
||||
popd
|
||||
#uncommenting below line causes the whole build to get stuck in aarch64 machine
|
||||
#py3_build
|
||||
|
||||
%install
|
||||
pushd cmake/build
|
||||
%cmake_install
|
||||
DESTDIR="%{buildroot}" cmake --install .
|
||||
popd
|
||||
|
||||
#python
|
||||
export GRPC_PYTHON_BUILD_WITH_CYTHON=True
|
||||
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=True
|
||||
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=True
|
||||
export GRPC_PYTHON_BUILD_SYSTEM_CARES=True
|
||||
export GRPC_PYTHON_BUILD_SYSTEM_RE2=True
|
||||
export GRPC_PYTHON_BUILD_SYSTEM_ABSL=True
|
||||
#uncommenting below line causes the whole build to get stuck in aarch64 machine
|
||||
#py3_install
|
||||
#using macros causes build to get stuck forever
|
||||
%{__python3} setup.py install -O1 --root %{buildroot}
|
||||
# grpcio (see comments above about not using python RPM macros and C++ version)
|
||||
CXX_VERSION=$(c++ -dM -E -x c++ /dev/null | grep -oP "(?<=__cplusplus \d{2})\d{2}")
|
||||
|
||||
export GRPC_BUILD_WITH_BORING_SSL_ASM=false
|
||||
export GRPC_PYTHON_BUILD_SYSTEM_ABSL=true
|
||||
export GRPC_PYTHON_BUILD_SYSTEM_CARES=true
|
||||
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=true
|
||||
export GRPC_PYTHON_BUILD_SYSTEM_RE2=true
|
||||
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=true
|
||||
export GRPC_PYTHON_BUILD_WITH_CYTHON=true
|
||||
export GRPC_PYTHON_CFLAGS="%{optflags} -std=c++$CXX_VERSION"
|
||||
%{__python3} setup.py install --root %{buildroot}
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
|
@ -121,18 +139,7 @@ export GRPC_PYTHON_BUILD_SYSTEM_ABSL=True
|
|||
%{_includedir}/grpc
|
||||
%{_includedir}/grpc++
|
||||
%{_includedir}/grpcpp
|
||||
%{_libdir}/libaddress_sorting.so
|
||||
%{_libdir}/libgpr.so
|
||||
%{_libdir}/libgrpc++.so
|
||||
%{_libdir}/libgrpc++_alts.so
|
||||
%{_libdir}/libgrpc++_error_details.so
|
||||
%{_libdir}/libgrpc++_reflection.so
|
||||
%{_libdir}/libgrpc++_unsecure.so
|
||||
%{_libdir}/libgrpc.so
|
||||
%{_libdir}/libgrpc_plugin_support.so
|
||||
%{_libdir}/libgrpc_unsecure.so
|
||||
%{_libdir}/libgrpcpp_channelz.so
|
||||
%{_libdir}/libupb.so
|
||||
%{_libdir}/*.so
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
%{_libdir}/cmake/*
|
||||
|
||||
|
@ -140,14 +147,16 @@ export GRPC_PYTHON_BUILD_SYSTEM_ABSL=True
|
|||
%license LICENSE
|
||||
%{_bindir}/grpc_*_plugin
|
||||
|
||||
|
||||
%files -n python3-grpcio
|
||||
%license LICENSE
|
||||
%{python3_sitearch}/grpc
|
||||
%{python3_sitearch}/grpcio-%{version}-py%{python3_version}.egg-info
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Mar 07 2024 Nicolas Guibourge <nicolasg@microsoft.com> - 1.62.0-1
|
||||
- Upgrade to 1.62.0
|
||||
- Import 'grpcio-cython3.patch' from OpenSUSE
|
||||
|
||||
* Thu Oct 19 2023 Dan Streetman <ddstreet@ieee.org> - 1.42.0-7
|
||||
- Bump release to rebuild with updated version of Go.
|
||||
|
||||
|
|
|
@ -0,0 +1,112 @@
|
|||
Index: grpcio-1.62.0/src/python/grpcio/grpc/_cython/_cygrpc/vtable.pyx.pxi
|
||||
===================================================================
|
||||
--- grpcio-1.62.0.orig/src/python/grpcio/grpc/_cython/_cygrpc/vtable.pyx.pxi
|
||||
+++ grpcio-1.62.0/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:
|
||||
Index: grpcio-1.62.0/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
|
||||
===================================================================
|
||||
--- grpcio-1.62.0.orig/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
|
||||
+++ grpcio-1.62.0/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
|
||||
@@ -316,7 +316,7 @@ def server_credentials_ssl_dynamic_cert_
|
||||
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:
|
||||
Index: grpcio-1.62.0/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi
|
||||
===================================================================
|
||||
--- grpcio-1.62.0.orig/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi
|
||||
+++ grpcio-1.62.0/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():
|
||||
Index: grpcio-1.62.0/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pxd.pxi
|
||||
===================================================================
|
||||
--- grpcio-1.62.0.orig/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pxd.pxi
|
||||
+++ grpcio-1.62.0/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)
|
||||
|
||||
Index: grpcio-1.62.0/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pyx.pxi
|
||||
===================================================================
|
||||
--- grpcio-1.62.0.orig/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pyx.pxi
|
||||
+++ grpcio-1.62.0/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:
|
||||
Index: grpcio-1.62.0/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pxd.pxi
|
||||
===================================================================
|
||||
--- grpcio-1.62.0.orig/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pxd.pxi
|
||||
+++ grpcio-1.62.0/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
|
|
@ -4850,8 +4850,8 @@
|
|||
"type": "other",
|
||||
"other": {
|
||||
"name": "grpc",
|
||||
"version": "1.42.0",
|
||||
"downloadUrl": "https://github.com/grpc/grpc/archive/v1.42.0/grpc-1.42.0.tar.gz"
|
||||
"version": "1.62.0",
|
||||
"downloadUrl": "https://github.com/grpc/grpc/archive/v1.62.0/grpc-1.62.0.tar.gz"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче