Update to grpc 1.48.0 (bootstrap build)

This commit is contained in:
Benjamin A. Beasley 2022-08-14 09:25:46 -04:00
parent 4859f7d8c8
commit a830b8813b
8 changed files with 59 additions and 132 deletions

2
.gitignore vendored
View File

@ -33,3 +33,5 @@
/opencensus-proto-0.3.0.tar.gz /opencensus-proto-0.3.0.tar.gz
/xds-cb28da3451f158a947dfc45090fe92b07b243bc1.tar.gz /xds-cb28da3451f158a947dfc45090fe92b07b243bc1.tar.gz
/grpc-1.47.1.tar.gz /grpc-1.47.1.tar.gz
/grpc-1.48.0.tar.gz
/data-plane-api-9c42588c956220b48eb3099d186487c2f04d32ec.tar.gz

View File

@ -1,50 +0,0 @@
From 4138f4bc0347e090431d2476610cbbcaf1397f41 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Fri, 27 May 2022 14:41:08 -0400
Subject: [PATCH 1/2] Use gRPC_INSTALL_LIBDIR for pkgconfig files
Fixes #25635.
If grpc libraries are installed in <prefix>/lib64, then .pc files should
be installed in <prefix>/lib64/pkgconfig. Before this commit, they were
always installed in <prefix>/lib/pkgconfig.
---
templates/CMakeLists.txt.template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template
index 9096d9125965..ee3e1782533b 100644
--- a/templates/CMakeLists.txt.template
+++ b/templates/CMakeLists.txt.template
@@ -850,7 +850,7 @@
"<%text>${output_filepath}</%text>"
@ONLY)
install(FILES "<%text>${output_filepath}</%text>"
- DESTINATION "lib/pkgconfig/")
+ DESTINATION "<%text>${gRPC_INSTALL_LIBDIR}/pkgconfig</%text>")
endfunction()
# gpr .pc file
From 07a8e936c86b3852ebd14f6fccba53fdffb07a63 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Fri, 27 May 2022 14:45:52 -0400
Subject: [PATCH 2/2] Re-generate projects
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e7aa97e9fcff..76c9ef0eede9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19820,7 +19820,7 @@ function(generate_pkgconfig name description version requires
"${output_filepath}"
@ONLY)
install(FILES "${output_filepath}"
- DESTINATION "lib/pkgconfig/")
+ DESTINATION "${gRPC_INSTALL_LIBDIR}/pkgconfig")
endfunction()
# gpr .pc file

View File

@ -1,30 +0,0 @@
From 56fd184b8db962a95574142aa2a8cf80df51bf6b Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Wed, 8 Jun 2022 17:03:51 -0400
Subject: [PATCH] =?UTF-8?q?Replace=20deprecated=20Python=20=E2=80=9Cinspec?=
=?UTF-8?q?t.getargspec=E2=80=9D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This has been deprecated since Python 3.0 and is removed in Python 3.11.
We can use “inspect.getfullargspec” instead.
Fixes #29962.
---
src/python/grpcio/grpc/_auth.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/python/grpcio/grpc/_auth.py b/src/python/grpcio/grpc/_auth.py
index 2d38320afff6..67113ceb5867 100644
--- a/src/python/grpcio/grpc/_auth.py
+++ b/src/python/grpcio/grpc/_auth.py
@@ -30,7 +30,7 @@ def __init__(self, credentials):
self._credentials = credentials
# Hack to determine if these are JWT creds and we need to pass
# additional_claims when getting a token
- self._is_jwt = 'additional_claims' in inspect.getargspec( # pylint: disable=deprecated-method
+ self._is_jwt = 'additional_claims' in inspect.getfullargspec(
credentials.get_access_token).args
def __call__(self, context, callback):

View File

@ -1,21 +0,0 @@
diff -Naur grpc-1.36.4-original/src/python/grpcio_tests/tests/unit/_compression_test.py grpc-1.36.4/src/python/grpcio_tests/tests/unit/_compression_test.py
--- grpc-1.36.4-original/src/python/grpcio_tests/tests/unit/_compression_test.py 2021-03-17 15:59:05.000000000 -0400
+++ grpc-1.36.4/src/python/grpcio_tests/tests/unit/_compression_test.py 2021-03-22 16:46:55.555358822 -0400
@@ -318,6 +318,7 @@
else:
self.assertNotCompressed(received_ratio)
+ @unittest.skip('Wrong compression ratio may occur; unknown cause')
def testDisableNextCompressionStreaming(self):
server_kwargs = {
'compression': grpc.Compression.Deflate,
@@ -372,6 +373,9 @@
def _test_compression(self):
self.assertConfigurationCompressed(**kwargs)
+ _test_compression = unittest.skip(
+ 'Wrong compression ratio may occur; unknown cause'
+ )(_test_compression)
return _test_compression
setattr(CompressionTest, _get_compression_test_name(**options),

View File

@ -0,0 +1,11 @@
diff -Naur grpc-1.48.0-original/src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py grpc-1.48.0/src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py
--- grpc-1.48.0-original/src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py 2022-07-18 20:40:04.000000000 -0400
+++ grpc-1.48.0/src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py 2022-08-14 15:41:01.208719432 -0400
@@ -128,6 +128,7 @@
@unittest.skipIf(os.name == "nt", "Windows multiprocessing unsupported")
@unittest.skipIf(test_common.running_under_gevent(),
"Import paths do not work with gevent runner.")
+@unittest.skip("Tests hang; possibly related to upstream issue #25368?")
class DynamicStubTest(unittest.TestCase):
def test_sunny_day(self):

View File

@ -0,0 +1,19 @@
diff -Naur grpc-1.48.0-original/src/python/grpcio_tests/tests/unit/_compression_test.py grpc-1.48.0/src/python/grpcio_tests/tests/unit/_compression_test.py
--- grpc-1.48.0-original/src/python/grpcio_tests/tests/unit/_compression_test.py 2022-07-18 20:40:04.000000000 -0400
+++ grpc-1.48.0/src/python/grpcio_tests/tests/unit/_compression_test.py 2022-08-14 11:07:13.780565137 -0400
@@ -298,6 +298,7 @@
multicallable_kwargs, server_kwargs,
server_handler, _REQUEST)
+ @unittest.skip('Wrong compression ratio may occur; unknown cause')
def testDisableNextCompressionStreaming(self):
server_kwargs = {
'compression': grpc.Compression.Deflate,
@@ -349,6 +350,7 @@
def test_compression(**kwargs):
+ @unittest.skip('Wrong compression ratio may occur; unknown cause')
def _test_compression(self):
self.assertConfigurationCompressed(**kwargs)

View File

@ -44,7 +44,7 @@
# it is unlikely to every be successfully packaged under the Fedora packaging # it is unlikely to every be successfully packaged under the Fedora packaging
# guidelines. Note that the URL is a read-only mirror based on # guidelines. Note that the URL is a read-only mirror based on
# https://github.com/envoyproxy/envoy, with different commit hashes. # https://github.com/envoyproxy/envoy, with different commit hashes.
%global envoy_api_commit df3b1ab2773147f292c4f175f790c35448328161 %global envoy_api_commit 9c42588c956220b48eb3099d186487c2f04d32ec
%global envoy_api_url https://github.com/envoyproxy/data-plane-api %global envoy_api_url https://github.com/envoyproxy/data-plane-api
%global envoy_api_dir data-plane-api-%{envoy_api_commit} %global envoy_api_dir data-plane-api-%{envoy_api_commit}
@ -67,7 +67,7 @@
# the proto compilers in this package; the consequence is that we cannot build # the proto compilers in this package; the consequence is that we cannot build
# the python3-grpcio-admin or python3-grpcio-csds subpackages until after # the python3-grpcio-admin or python3-grpcio-csds subpackages until after
# bootstrapping. # bootstrapping.
%bcond_with bootstrap %bcond_without bootstrap
# This must be enabled to get grpc_cli, which is apparently considered part of # This must be enabled to get grpc_cli, which is apparently considered part of
# the tests by upstream. This is mentioned in # the tests by upstream. This is mentioned in
@ -79,7 +79,18 @@
%bcond_with python_aio_tests %bcond_with python_aio_tests
%ifnarch s390x %ifnarch s390x
%bcond_without python_gevent_tests # There are currently a significant number of failures like:
#
# Exception serializing message!
# Traceback (most recent call last):
# File "/builddir/build/BUILDROOT/grpc-1.48.0-2.fc38~bootstrap.x86_64/usr/lib64/python3.11/site-packages/grpc/_common.py", line 86, in _transform
# return transformer(message)
# ^^^^^^^^^^^^^^^^^^^^
# File "/usr/lib/python3.11/site-packages/google/protobuf/internal/python_message.py", line 1082, in SerializeToString
# if not self.IsInitialized():
# ^^^^^^^^^^^^^^^^^^
# AttributeError: 'NoneType' object has no attribute 'IsInitialized'
%bcond_with python_gevent_tests
%else %else
# A significant number of Python tests pass in test_lite but fail in # A significant number of Python tests pass in test_lite but fail in
# test_gevent, mostly by dumping core without a traceback. Since it is tedious # test_gevent, mostly by dumping core without a traceback. Since it is tedious
@ -112,7 +123,7 @@
# documentation. Instead, we have just dropped all documentation. # documentation. Instead, we have just dropped all documentation.
Name: grpc Name: grpc
Version: 1.47.1 Version: 1.48.0
Release: %autorelease Release: %autorelease
Summary: RPC library and framework Summary: RPC library and framework
@ -120,11 +131,11 @@ Summary: RPC library and framework
%global pyversion %(echo '%{version}' | tr -d '~') %global pyversion %(echo '%{version}' | tr -d '~')
# CMakeLists.txt: gRPC_CORE_SOVERSION # CMakeLists.txt: gRPC_CORE_SOVERSION
%global c_so_version 25 %global c_so_version 26
# CMakeLists.txt: gRPC_CPP_SOVERSION # CMakeLists.txt: gRPC_CPP_SOVERSION
# See https://github.com/abseil/abseil-cpp/issues/950#issuecomment-843169602 # See https://github.com/abseil/abseil-cpp/issues/950#issuecomment-843169602
# regarding unusual C++ SOVERSION style (not a single number). # regarding unusual C++ SOVERSION style (not a single number).
%global cpp_so_version 1.47 %global cpp_so_version 1.48
# The entire source is Apache-2.0 except the following: # The entire source is Apache-2.0 except the following:
# #
@ -327,7 +338,7 @@ Patch: grpc-1.40.0-python-grpcio_tests-make-network-tests-skippable.pat
# run. It is not clear that this is a real problem. Any help in understanding # run. It is not clear that this is a real problem. Any help in understanding
# the actual cause well enough to fix this or usefully report it upstream is # the actual cause well enough to fix this or usefully report it upstream is
# welcome. # welcome.
Patch: grpc-1.36.4-python-grpcio_tests-skip-compression-tests.patch Patch: grpc-1.48.0-python-grpcio_tests-skip-compression-tests.patch
# The upstream requirement to link gtest/gmock from grpc_cli is spurious. # The upstream requirement to link gtest/gmock from grpc_cli is spurious.
# Remove it. We still have to build the core tests and link a test library # Remove it. We still have to build the core tests and link a test library
# (libgrpc++_test_config.so…) # (libgrpc++_test_config.so…)
@ -336,28 +347,6 @@ Patch: grpc-1.37.0-grpc_cli-do-not-link-gtest-gmock.patch
# suppose that the unpatched code must be correct for how upstream runs the # suppose that the unpatched code must be correct for how upstream runs the
# tests, somehow. # tests, somehow.
Patch: grpc-1.45.0-python_wrapper-path.patch Patch: grpc-1.45.0-python_wrapper-path.patch
# Use gRPC_INSTALL_LIBDIR for pkgconfig files
# https://github.com/grpc/grpc/pull/29826
#
# Fixes:
#
# Should install pkgconfig files under gRPC_INSTALL_LIBDIR
# https://github.com/grpc/grpc/issues/25635
Patch: %{forgeurl}/pull/29826.patch
# Replace deprecated Python “inspect.getargspec”
# https://github.com/grpc/grpc/pull/29963
#
# Fixes:
#
# Uses deprecated “inspect.getargspec”, removed in Python 3.11
# https://github.com/grpc/grpc/issues/29962
#
# Partially fixes:
#
# grpc fails to build with Python 3.11: AttributeError: module 'inspect' has no
# attribute 'getargspec'
# https://bugzilla.redhat.com/show_bug.cgi?id=2095027
Patch: %{forgeurl}/pull/29963.patch
# Skip failing ChannelzServicerTest tests on Python 3.11 # Skip failing ChannelzServicerTest tests on Python 3.11
# #
# Partially works around: # Partially works around:
@ -369,6 +358,13 @@ Patch: %{forgeurl}/pull/29963.patch
# TODO: Attempt to reproduce this outside the RPM build environment and submit # TODO: Attempt to reproduce this outside the RPM build environment and submit
# a useful/actionable upstream bug report. # a useful/actionable upstream bug report.
Patch: grpc-1.46.3-ChannelzServicerTest-python3.11-regressions.patch Patch: grpc-1.46.3-ChannelzServicerTest-python3.11-regressions.patch
# Running Python “test_lite”, in grpcio_tests,
# unit._dynamic_stubs_test.DynamicStubTest.test_grpc_tools_unimportable hangs.
# This may be related to:
# [FLAKE] DynamicStubTest timeout under gevent macOS
# https://github.com/grpc/grpc/issues/25368
# The patch simply skips the test.
Patch: grpc-1.48.0-python-grpcio_tests-DynamicStubTest-hang.patch
Requires: grpc-data = %{version}-%{release} Requires: grpc-data = %{version}-%{release}

View File

@ -1,6 +1,6 @@
SHA512 (grpc-1.47.1.tar.gz) = 4b7affab165137f8c9453cd162b9862227901ea86de77eb57489663e009a077c581c71104dc8e3910618c7ec786836243d4ad80aa52c0912c951881cba5bc70a SHA512 (grpc-1.48.0.tar.gz) = 558c659b325eb2f64f6caf78c0701eaaf3d9ae35f6d25ccd69b8995d5b82b98ca1a7ef9f497a0a1dab5914d2328c044c108373152426a15045d0c978b27f3503
SHA512 (googletest-0e402173c97aea7a00749e825b194bfede4f2e45.tar.gz) = 5c5eaf6ff9f3c1bca025b7ef0234ba97232ba85b43e6354a92f49b7208f5c47581ebaf18bf58618498e5d264f2620c2b6676e81bb0f7df77112b96ba271ececf SHA512 (googletest-0e402173c97aea7a00749e825b194bfede4f2e45.tar.gz) = 5c5eaf6ff9f3c1bca025b7ef0234ba97232ba85b43e6354a92f49b7208f5c47581ebaf18bf58618498e5d264f2620c2b6676e81bb0f7df77112b96ba271ececf
SHA512 (data-plane-api-df3b1ab2773147f292c4f175f790c35448328161.tar.gz) = 4225ab6e4d2fb24d18934edbfbc4104c1ffbdd24f800929aff49a2ff196f2c2bb44d80927383807c1076eafd0a507d83d75e8a751a58674a72b16f552d12b646 SHA512 (data-plane-api-9c42588c956220b48eb3099d186487c2f04d32ec.tar.gz) = 9b1ceff5d018e70b36e02aa1b583f5495b0eb92506055bf6913d2e7ef401d3602cba8723efbc178ee31fdef9aba510fc2284612ebe22a24b5b4a703f07099897
SHA512 (googleapis-2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz) = cdeefae807df7097174b4bb28c0900b06a68d424c00ebba4ff5add260c9c651351d5e429bfc5de42f95ebb75dadec313f7bd3991c2fa476c9104f9ea656acad4 SHA512 (googleapis-2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz) = cdeefae807df7097174b4bb28c0900b06a68d424c00ebba4ff5add260c9c651351d5e429bfc5de42f95ebb75dadec313f7bd3991c2fa476c9104f9ea656acad4
SHA512 (opencensus-proto-0.3.0.tar.gz) = 39231a495dfdccfc8267d1e6af2ac624feea611a8691c10ec570de2194b352e4a9c3b0ce1606414fb98e5d77c66873bed4a9e56512efa12b267b8a91e0c5851e SHA512 (opencensus-proto-0.3.0.tar.gz) = 39231a495dfdccfc8267d1e6af2ac624feea611a8691c10ec570de2194b352e4a9c3b0ce1606414fb98e5d77c66873bed4a9e56512efa12b267b8a91e0c5851e
SHA512 (xds-cb28da3451f158a947dfc45090fe92b07b243bc1.tar.gz) = eb5878764503872c18b8750b20e2c2e2224e73d9601197752cea7e1e4171899474ad4f39aacc80d6c1b57a50b2161d39f219df64ffb250d045af482dae01ea79 SHA512 (xds-cb28da3451f158a947dfc45090fe92b07b243bc1.tar.gz) = eb5878764503872c18b8750b20e2c2e2224e73d9601197752cea7e1e4171899474ad4f39aacc80d6c1b57a50b2161d39f219df64ffb250d045af482dae01ea79