#31 update to 1.60.0
Opened 5 months ago by spot. Modified 3 months ago
rpms/ spot/grpc rawhide  into  rawhide

file modified
+3
@@ -39,3 +39,6 @@ 

  /grpc-1.48.2.tar.gz

  /grpc-1.48.3.tar.gz

  /grpc-1.48.4.tar.gz

+ /grpc-1.60.0.tar.gz

+ /data-plane-api-9d6ffa70677c4dbf23f6ed569676206c4e2edff4.tar.gz

+ /xds-e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7.tar.gz

@@ -49,7 +49,7 @@ 

  index 23de3a0..52071f5 100644

  --- a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi

  +++ b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi

- @@ -314,7 +314,7 @@ def server_credentials_ssl_dynamic_cert_config(initial_cert_config,

+ @@ -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(
@@ -58,39 +58,11 @@ 

     # 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 a925bdd..5e97a6d 100644

- --- a/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pxd.pxi

- +++ b/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pxd.pxi

- @@ -15,15 +15,15 @@

-  

-  cdef extern from "pthread.h" nogil:

-      int pthread_atfork(

- -        void (*prepare)() nogil,

- -        void (*parent)() nogil,

- -        void (*child)() nogil)

- +        void (*prepare)() noexcept nogil,

- +        void (*parent)() noexcept nogil,

- +        void (*child)() noexcept nogil) noexcept

-  

-  

- -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

- \ No newline at end of file

  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 53657e8..d4d1cff 100644

  --- a/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pyx.pxi

  +++ b/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pyx.pxi

- @@ -34,7 +34,7 @@ _GRPC_ENABLE_FORK_SUPPORT = (

+ @@ -35,7 +35,7 @@ _GRPC_ENABLE_FORK_SUPPORT = (

   

   _fork_handler_failed = False

   
@@ -99,7 +71,7 @@ 

       with gil:

           global _fork_handler_failed

           _fork_handler_failed = False

- @@ -48,14 +48,14 @@ cdef void __prefork() nogil:

+ @@ -49,14 +49,14 @@ cdef void __prefork() nogil:

               _fork_handler_failed = True

   

   
@@ -140,6 +112,25 @@ 

     if first_pointer < second_pointer:

       return -1

     elif first_pointer > second_pointer:

- -- 

+ 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 a925bdd..5e97a6d 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

+ \ No newline at end of file

+ --

  2.41.0

- 

@@ -1,117 +0,0 @@ 

- From a133d644138b6018b5df2bcb4bba07211a9ac5b7 Mon Sep 17 00:00:00 2001

- From: "Benjamin A. Beasley" <code@musicinmybrain.net>

- Date: Wed, 17 Jan 2024 21:43:39 -0500

- Subject: [PATCH 1/3] Add some missing #includes for absl/strings/str_cat.h

- 

- Partial backport of a giant IWYU commit:

- 

- https://github.com/grpc/grpc/commit/8174a75079bc00aec4f80e3cd9f91a7042073ca8

- 

- Needed for abseil-cpp-20240116.rc1 compatibility.

- ---

-  test/core/address_utils/sockaddr_utils_test.cc | 1 +

-  test/core/channel/call_finalization_test.cc    | 1 +

-  test/core/json/json_test.cc                    | 1 +

-  3 files changed, 3 insertions(+)

- 

- diff --git a/test/core/address_utils/sockaddr_utils_test.cc b/test/core/address_utils/sockaddr_utils_test.cc

- index 3ecb5a7f82..e071d94e41 100644

- --- a/test/core/address_utils/sockaddr_utils_test.cc

- +++ b/test/core/address_utils/sockaddr_utils_test.cc

- @@ -24,6 +24,7 @@

-  #include <sys/un.h>

-  #endif

-  

- +#include "absl/strings/str_cat.h"

-  #include <gtest/gtest.h>

-  

-  #include <grpc/grpc.h>

- diff --git a/test/core/channel/call_finalization_test.cc b/test/core/channel/call_finalization_test.cc

- index 61d92c5f56..0ff7a00cff 100644

- --- a/test/core/channel/call_finalization_test.cc

- +++ b/test/core/channel/call_finalization_test.cc

- @@ -14,6 +14,7 @@

-  

-  #include "src/core/lib/channel/call_finalization.h"

-  

- +#include "absl/strings/str_cat.h"

-  #include <gtest/gtest.h>

-  

-  #include "src/core/lib/resource_quota/resource_quota.h"

- diff --git a/test/core/json/json_test.cc b/test/core/json/json_test.cc

- index 232caca9ba..ff26b7ee75 100644

- --- a/test/core/json/json_test.cc

- +++ b/test/core/json/json_test.cc

- @@ -20,6 +20,7 @@

-  

-  #include <string.h>

-  

- +#include "absl/strings/str_cat.h"

-  #include <gmock/gmock.h>

-  #include <gtest/gtest.h>

-  

- -- 

- 2.43.0

- 

- 

- From 9f2762981680094d97a6092e76c8b94309df9512 Mon Sep 17 00:00:00 2001

- From: Esun Kim <veblush@google.com>

- Date: Thu, 14 Sep 2023 17:25:41 -0700

- Subject: [PATCH 2/3] [Fix] Added missing #include (#34359)

- 

- One more missing #include

- ---

-  test/core/tsi/crl_ssl_transport_security_test.cc | 2 ++

-  1 file changed, 2 insertions(+)

- 

- diff --git a/test/core/tsi/crl_ssl_transport_security_test.cc b/test/core/tsi/crl_ssl_transport_security_test.cc

- index 5e4dc1b57e..dd33173abf 100644

- --- a/test/core/tsi/crl_ssl_transport_security_test.cc

- +++ b/test/core/tsi/crl_ssl_transport_security_test.cc

- @@ -19,6 +19,8 @@

-  #include <gmock/gmock.h>

-  #include <gtest/gtest.h>

-  

- +#include "absl/strings/str_cat.h"

- +

-  #include <grpc/grpc.h>

-  #include <grpc/support/alloc.h>

-  #include <grpc/support/log.h>

- -- 

- 2.43.0

- 

- 

- From 8a53ca0b02de4074763ec970c85ab9594d99532c Mon Sep 17 00:00:00 2001

- From: "Benjamin A. Beasley" <code@musicinmybrain.net>

- Date: Thu, 18 Jan 2024 08:07:10 -0500

- Subject: [PATCH 3/3] Add abseil includes in test/cpp/end2end/xds/xds_server.h

- MIME-Version: 1.0

- Content-Type: text/plain; charset=UTF-8

- Content-Transfer-Encoding: 8bit

- 

- This follows the IWYU “philosophy,” but the necessary includes were

- found and added manually.

- 

- Needed for compatibility with abseil-cpp 20240116.rc1.

- ---

-  test/cpp/end2end/xds/xds_server.h | 4 ++++

-  1 file changed, 4 insertions(+)

- 

- diff --git a/test/cpp/end2end/xds/xds_server.h b/test/cpp/end2end/xds/xds_server.h

- index 066629b101..4499af1a8d 100644

- --- a/test/cpp/end2end/xds/xds_server.h

- +++ b/test/cpp/end2end/xds/xds_server.h

- @@ -26,6 +26,10 @@

-  #include <gmock/gmock.h>

-  #include <gtest/gtest.h>

-  

- +#include "absl/status/status.h"

- +#include "absl/strings/numbers.h"

- +#include "absl/strings/string_view.h"

- +#include "absl/time/time.h"

-  #include "absl/types/optional.h"

-  

-  #include <grpc/support/log.h>

- -- 

- 2.43.0

- 

@@ -0,0 +1,55 @@ 

+ From b9a86a453bb84c5dc63d3f6ef6c926924f0962c4 Mon Sep 17 00:00:00 2001

+ From: "Benjamin A. Beasley" <code@musicinmybrain.net>

+ Date: Fri, 14 Jul 2023 01:19:54 -0400

+ Subject: [PATCH] Use the system OpenSSL profile

+ 

+ https://docs.fedoraproject.org/en-US/packaging-guidelines/CryptoPolicies/#_cc_applications

+ ---

+  src/objective-c/tests/CronetTests/CronetUnitTests.mm | 2 +-

+  test/core/handshake/client_ssl.cc                    | 4 +---

+  test/core/handshake/server_ssl_common.cc             | 4 +---

+  3 files changed, 3 insertions(+), 7 deletions(-)

+ 

+ diff --git a/src/objective-c/tests/CronetTests/CronetUnitTests.mm b/src/objective-c/tests/CronetTests/CronetUnitTests.mm

+ index fa56f44200..c45882e005 100644

+ --- a/src/objective-c/tests/CronetTests/CronetUnitTests.mm

+ +++ b/src/objective-c/tests/CronetTests/CronetUnitTests.mm

+ @@ -108,7 +108,7 @@ void init_ctx(SSL_CTX *ctx) {

+    BIO_free(pem);

+  

+    // Select cipher suite

+ -  SSL_CTX_set_cipher_list(ctx, "ECDHE-RSA-AES128-GCM-SHA256");

+ +  SSL_CTX_set_cipher_list(ctx, "PROFILE=SYSTEM");

+  

+    // Select ALPN protocol

+    SSL_CTX_set_alpn_select_cb(ctx, alpn_cb, NULL);

+ diff --git a/test/core/handshake/client_ssl.cc b/test/core/handshake/client_ssl.cc

+ index 69f14d1721..90ea453092 100644

+ --- a/test/core/handshake/client_ssl.cc

+ +++ b/test/core/handshake/client_ssl.cc

+ @@ -237,9 +237,7 @@ static void server_thread(void* arg) {

+  

+    // Set the cipher list to match the one expressed in

+    // src/core/tsi/ssl_transport_security.cc.

+ -  const char* cipher_list =

+ -      "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-"

+ -      "SHA384:ECDHE-RSA-AES256-GCM-SHA384";

+ +  const char* cipher_list = "PROFILE=SYSTEM";

+    if (!SSL_CTX_set_cipher_list(ctx, cipher_list)) {

+      ERR_print_errors_fp(stderr);

+      grpc_core::Crash("Couldn't set server cipher list.");

+ diff --git a/test/core/handshake/server_ssl_common.cc b/test/core/handshake/server_ssl_common.cc

+ index e29bf9f828..691a6e1fa6 100644

+ --- a/test/core/handshake/server_ssl_common.cc

+ +++ b/test/core/handshake/server_ssl_common.cc

+ @@ -218,9 +218,7 @@ bool server_ssl_test(const char* alpn_list[], unsigned int alpn_list_len,

+  

+    // Set the cipher list to match the one expressed in

+    // src/core/tsi/ssl_transport_security.c.

+ -  const char* cipher_list =

+ -      "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-"

+ -      "SHA384:ECDHE-RSA-AES256-GCM-SHA384";

+ +  const char* cipher_list = "PROFILE=SYSTEM";

+    if (!SSL_CTX_set_cipher_list(ctx, cipher_list)) {

+      ERR_print_errors_fp(stderr);

+      grpc_core::Crash("Couldn't set server cipher list.");

@@ -0,0 +1,43 @@ 

+ diff -up grpc-1.60.0/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py.311 grpc-1.60.0/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py

+ --- grpc-1.60.0/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py.311	2023-12-05 10:13:18.333966654 -0500

+ +++ grpc-1.60.0/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py	2023-12-05 10:13:04.482771008 -0500

+ @@ -304,6 +304,7 @@ class ChannelzServicerTest(unittest.Test

+                  gsc_resp.subchannel.data.calls_failed,

+              )

+  

+ +    @unittest.skipIf(sys.version_info >= (3, 11), "Fails on 3.11")

+      def test_server_basic(self):

+          self._pairs = _generate_channel_server_pairs(1)

+          resp = self._channelz_stub.GetServers(

+ @@ -311,6 +312,7 @@ class ChannelzServicerTest(unittest.Test

+          )

+          self.assertEqual(len(resp.server), 1)

+  

+ +    @unittest.skipIf(sys.version_info >= (3, 11), "Fails on 3.11")

+      def test_get_one_server(self):

+          self._pairs = _generate_channel_server_pairs(1)

+          gss_resp = self._channelz_stub.GetServers(

+ @@ -326,6 +328,7 @@ class ChannelzServicerTest(unittest.Test

+              gss_resp.server[0].ref.server_id, gs_resp.server.ref.server_id

+          )

+  

+ +    @unittest.skipIf(sys.version_info >= (3, 11), "Fails on 3.11")

+      def test_server_call(self):

+          self._pairs = _generate_channel_server_pairs(1)

+          k_success = 23

+ @@ -470,6 +473,7 @@ class ChannelzServicerTest(unittest.Test

+              gs_resp.socket.data.messages_received, test_constants.STREAM_LENGTH

+          )

+  

+ +    @unittest.skipIf(sys.version_info >= (3, 11), "Fails on 3.11")

+      def test_server_sockets(self):

+          self._pairs = _generate_channel_server_pairs(1)

+          self._send_successful_unary_unary(0)

+ @@ -491,6 +495,7 @@ class ChannelzServicerTest(unittest.Test

+          # If the RPC call failed, it will raise a grpc.RpcError

+          # So, if there is no exception raised, considered pass

+  

+ +    @unittest.skipIf(sys.version_info >= (3, 11), "Fails on 3.11")

+      def test_server_listen_sockets(self):

+          self._pairs = _generate_channel_server_pairs(1)

+  

@@ -0,0 +1,21 @@ 

+ From b362db140235c65ef7ac7a6e70899cc68a9e1fab Mon Sep 17 00:00:00 2001

+ From: "Benjamin A. Beasley" <code@musicinmybrain.net>

+ Date: Fri, 14 Jul 2023 01:33:09 -0400

+ Subject: [PATCH] Skip hanging DynamicStubTest

+ 

+ ---

+  src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py | 1 +

+  1 file changed, 1 insertion(+)

+ 

+ diff --git a/src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py b/src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py

+ index 7f95188b91..723940bf67 100644

+ --- a/src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py

+ +++ b/src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py

+ @@ -136,6 +136,7 @@ def _test_grpc_tools_unimportable():

+      os.name == "nt" or "darwin" in sys.platform,

+      "Windows and MacOS multiprocessing unsupported",

+  )

+ +@unittest.skip("Tests hang; possibly related to upstream issue #25368?")

+  class DynamicStubTest(unittest.TestCase):

+      def test_sunny_day(self):

+          _run_in_subprocess(_test_sunny_day)

@@ -0,0 +1,12 @@ 

+ diff -up grpc-1.60.0/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc.fixtest grpc-1.60.0/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc

+ --- grpc-1.60.0/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc.fixtest	2023-12-08 17:28:04.404501542 -0500

+ +++ grpc-1.60.0/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc	2023-12-08 17:28:45.318099150 -0500

+ @@ -261,7 +261,7 @@ TEST_F(RbacServiceConfigParsingTest, Bad

+    EXPECT_EQ(service_config.status().message(),

+              "errors validating service config: ["

+              "field:methodConfig[0].rbacPolicy[0].rules.action "

+ -            "error:is not a number; "

+ +            "errors:[is not a number; unknown action]; "

+              "field:methodConfig[0].rbacPolicy[0].rules.policies "

+              "error:is not an object]")

+        << service_config.status();

@@ -0,0 +1,19 @@ 

+ diff -up grpc-1.60.0/src/python/grpcio_tests/tests/unit/_compression_test.py.skip grpc-1.60.0/src/python/grpcio_tests/tests/unit/_compression_test.py

+ --- grpc-1.60.0/src/python/grpcio_tests/tests/unit/_compression_test.py.skip	2023-12-05 09:58:01.330061117 -0500

+ +++ grpc-1.60.0/src/python/grpcio_tests/tests/unit/_compression_test.py	2023-12-05 09:58:52.310778202 -0500

+ @@ -359,6 +359,7 @@ class CompressionTest(unittest.TestCase)

+              _REQUEST,

+          )

+  

+ +    @unittest.skip('Wrong compression ratio may occur; unknown cause')

+      def testDisableNextCompressionStreaming(self):

+          server_kwargs = {

+              "compression": grpc.Compression.Deflate,

+ @@ -436,6 +437,7 @@ def _test_options():

+  for options in _test_options():

+  

+      def test_compression(**kwargs):

+ +        @unittest.skip('Wrong compression ratio may occur; unknown cause')

+          def _test_compression(self):

+              self.assertConfigurationCompressed(**kwargs)

+  

The added file is too large to be shown here, see it at: grpc-1.60.0-system-gtest.patch
file modified
+307 -200
@@ -15,7 +15,7 @@ 

  %global gtest_commit 0e402173c97aea7a00749e825b194bfede4f2e45

  #global gtest_version 1.11.0

  #global gtest_dir googletest-release-#{gtest_version}

- %bcond system_gtest        0

+ %bcond system_gtest        1

  

  # =====

  
@@ -44,7 +44,7 @@ 

  # it is unlikely to every be successfully packaged under the Fedora packaging

  # guidelines. Note that the URL is a read-only mirror based on

  # https://github.com/envoyproxy/envoy, with different commit hashes.

- %global envoy_api_commit 9c42588c956220b48eb3099d186487c2f04d32ec

+ %global envoy_api_commit 9d6ffa70677c4dbf23f6ed569676206c4e2edff4

  %global envoy_api_url https://github.com/envoyproxy/data-plane-api

  %global envoy_api_dir data-plane-api-%{envoy_api_commit}

  
@@ -56,7 +56,7 @@ 

  %global opencensus_proto_url https://github.com/census-instrumentation/opencensus-proto

  %global opencensus_proto_dir opencensus-proto-%{opencensus_proto_version}

  

- %global xds_commit cb28da3451f158a947dfc45090fe92b07b243bc1

+ %global xds_commit e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7

  %global xds_url https://github.com/cncf/xds

  %global xds_dir xds-%{xds_commit}

  
@@ -116,19 +116,19 @@ 

  # documentation. Instead, we have just dropped all documentation.

  

  Name:           grpc

- Version:        1.48.4

+ Version:        1.60.0

  Release:        %autorelease

- Summary:        RPC library and framework

+ Summary:        High performance, open source universal RPC framework

  

  %global srcversion %(echo '%{version}' | sed -r 's/~rc/-pre/')

  %global pyversion %(echo '%{version}' | tr -d '~')

  

  # CMakeLists.txt: gRPC_CORE_SOVERSION

- %global c_so_version 26

+ %global c_so_version 37

  # CMakeLists.txt: gRPC_CPP_SOVERSION

  # See https://github.com/abseil/abseil-cpp/issues/950#issuecomment-843169602

  # regarding unusual C++ SOVERSION style (not a single number).

- %global cpp_so_version 1.48

+ %global cpp_so_version 1.60

  

  # The entire source is Apache-2.0 except the following:

  #
@@ -140,15 +140,14 @@ 

  #     * Potentially linked into any compiled subpackage (but not pure-Python

  #       subpackages, etc.)

  # BSD-3-Clause:

- #   - third_party/upb/, except third_party/upb/third_party/lunit/ and

- #     third_party/upb/third_party/utf8_range/

+ #   - third_party/upb/, except third_party/upb/third_party/lunit/

  #     * Potentially linked into any compiled subpackage (but not pure-Python

  #       subpackages, etc.)

  #   - third_party/address_sorting/

  #     * Potentially linked into any compiled subpackage (but not pure-Python

  #       subpackages, etc.)

  # MIT:

- #   - third_party/upb/third_party/utf8_range

+ #   - third_party/utf8_range

  #     * Potentially linked into any compiled subpackage (but not pure-Python

  #       subpackages, etc.)

  #
@@ -212,6 +211,7 @@ 

  BuildRequires:  cmake(gflags)

  BuildRequires:  pkgconfig(protobuf)

  BuildRequires:  protobuf-compiler

+ BuildRequires:  pkgconfig(protobuf-lite)

  BuildRequires:  pkgconfig(re2)

  BuildRequires:  pkgconfig(openssl)

  BuildRequires:  cmake(c-ares)
@@ -219,6 +219,7 @@ 

  # Sets XXH_INCLUDE_ALL, which means xxhash is used as a header-only library

  BuildRequires:  pkgconfig(libxxhash)

  BuildRequires:  xxhash-static

+ BuildRequires:  pkgconfig(libsystemd)

  

  %if %{with core_tests}

  BuildRequires:  cmake(benchmark)
@@ -255,15 +256,6 @@ 

  # (tools/distrib/python/grpcio_tools/setup.py)

  BuildRequires: python3dist(cython) > 0.23

  

- # grpcio (setup.py) install_requires:

- # grpcio_tests (src/python/grpcio_tests/setup.py) install_requires:

- #   futures>=2.2.0; python_version<'3.2'

- 

- # grpcio (setup.py) install_requires:

- # grpcio_tests (src/python/grpcio_tests/setup.py) install_requires:

- #   enum34>=1.0.4; python_version<'3.4'

- 

- # grpcio_csds (src/python/grpcio_csds/setup.py) install_requires:

  # grpcio_channelz (src/python/grpcio_channelz/setup.py) install_requires:

  # grpcio_health_checking (src/python/grpcio_health_checking/setup.py)

  #     install_requires:
@@ -271,8 +263,9 @@ 

  # grpcio_status (src/python/grpcio_status/setup.py) install_requires:

  # grpcio_testing (src/python/grpcio_testing/setup.py) install_requires:

  # grpcio_tests (src/python/grpcio_tests/setup.py) install_requires:

+ #   * This technically has protobuf>=4.21.6rc1,!=4.22.0.*

  # grpcio_tools (tools/distrib/python/grpcio_tools/setup.py) install_requires:

- BuildRequires:  python3dist(protobuf) >= 3.12.0

+ BuildRequires:  python3dist(protobuf) >= 4.21.6

  

  # grpcio_status (src/python/grpcio_status/setup.py) install_requires:

  BuildRequires:  python3dist(googleapis-common-protos) >= 1.5.5
@@ -281,7 +274,10 @@ 

  # depends on all of the other Python packages—which are satisfied within this

  # package.

  #

- # Similarly, grpcio_admin depends on grpcio_channelz and grpcio_csds.

+ # Similarly, grpcio_admin depends on grpcio_channelz and grpcio_csds (but we do

+ # not package either grpcio_admin or grpc_csds because they depend on the

+ # problematic xds-protos; see the note above the corresponding Obsoletes later

+ # in this spec file).

  

  # grpcio_tests (src/python/grpcio_tests/setup.py) install_requires:

  BuildRequires:  python3dist(coverage) >= 4.0
@@ -295,6 +291,11 @@ 

  # grpcio_tests (src/python/grpcio_tests/setup.py) install_requires:

  BuildRequires:  python3dist(requests) >= 2.14.2

  

+ # dns_server.py imports

+ BuildRequires:  python3dist(twisted)

+ BuildRequires:  python3dist(service-identity)

+ BuildRequires:  python3dist(pyyaml)

+ 

  %if %{with python_gevent_tests}

  # Required for “test_gevent” tests:

  BuildRequires:  python3dist(gevent)
@@ -322,11 +323,11 @@ 

  # https://docs.fedoraproject.org/en-US/packaging-guidelines/CryptoPolicies/#_cc_applications

  #

  # In fact, this may not be needed, since only testing code is patched.

- Patch:          grpc-1.39.0-system-crypto-policies.patch

+ Patch:          grpc-1.56.1-Use-the-system-OpenSSL-profile.patch

  # Fix errors like:

  #   TypeError: super(type, obj): obj must be an instance or subtype of type

  # It is not clear why these occur.

- Patch:          grpc-1.36.4-python-grpcio_tests-fixture-super.patch

+ # Patch:          grpc-1.36.4-python-grpcio_tests-fixture-super.patch

  # Skip tests requiring non-loopback network access when the

  # FEDORA_NO_NETWORK_TESTS environment variable is set.

  Patch:          grpc-1.40.0-python-grpcio_tests-make-network-tests-skippable.patch
@@ -335,11 +336,11 @@ 

  # 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

  # welcome.

- Patch:          grpc-1.48.0-python-grpcio_tests-skip-compression-tests.patch

+ Patch:          grpc-1.60.0-python-grpcio_tests-skip-compression-tests.patch

  # 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

  # (libgrpc++_test_config.so…)

- Patch:          grpc-1.37.0-grpc_cli-do-not-link-gtest-gmock.patch

+ # Patch:          grpc-1.56.1-Do-not-link-gtest-gmock-from-grpc_cli.patch

  # Fix confusion about path to python_wrapper.sh in httpcli/httpscli tests. I

  # suppose that the unpatched code must be correct for how upstream runs the

  # tests, somehow.
@@ -354,71 +355,14 @@ 

  #

  # TODO: Attempt to reproduce this outside the RPM build environment and submit

  # a useful/actionable upstream bug report.

- Patch:          grpc-1.46.3-ChannelzServicerTest-python3.11-regressions.patch

+ Patch:          grpc-1.60.0-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

- # Use CMake variables for paths in pkg-config files

- #

- # Use @gRPC_INSTALL_LIBDIR@ for libdir; this fixes an incorrect

- # -L/usr/lib on multilib Linux systems where that is the 32-bit library

- # path and the correct path is /usr/lib64.

- #

- # Use @gRPC_INSTALL_INCLUDEDIR@ for consistency.

- #

- # See also:

- # https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/

- #   thread/P2N35UMQVEXPILAF47RQB53MWRV2GM3J/

- #

- # https://github.com/grpc/grpc/pull/31671

- Patch:          %{forgeurl}/pull/31671.patch

- # [Test] Use ssl.SSLContext.wrap_socket, not ssl.wrap_socket

- #

- # The latter emits a DeprecationWarning since Python 3.10 and is removed

- # in Python 3.12.

- #

- # https://github.com/grpc/grpc/pull/33492

- #

- # Backported to 1.48.4.

- Patch:          grpc-1.48.4-wrap_socket.patch

- # [Test] Do not use importlib find_module API, removed in Python 3.12

- # https://github.com/grpc/grpc/pull/33506

- #

- # Backported to 1.48.4.

- Patch:          grpc-1.48.4-find_module.patch

- # Backport several #include directives

- # These were included in https://github.com/grpc/grpc/pull/30952

- #

- # [Fix] Added missing #include (#34359)

- # See: https://github.com/grpc/grpc/pull/34359

- #

- # Add abseil includes in test/cpp/end2end/xds/xds_server.h

- # Downstream-only because the current release, 1.60.0, builds without changes.

- #

- # Together, these fix compatibility with abseil-cpp-20240116.rc1.

- Patch:          grpc-1.48.4-abseil-cpp-includes.patch

- 

- # [http2] Dont drop connections on metadata limit exceeded (#32309)

- #

- # * [http] Dont drop connections on metadata limit exceeded

- #

- # * remove bad test

- #

- # * Automated change: Fix sanity tests

- # https://github.com/grpc/grpc/commit/29d8beee0ac2555773b2a2dda5601c74a95d6c10

- # https://github.com/grpc/grpc/pull/32309

- #

- # Fixes CVE-2023-32732

- # https://nvd.nist.gov/vuln/detail/CVE-2023-32732

- # CVE-2023-32732 grpc: denial of service [fedora-all]

- # https://bugzilla.redhat.com/show_bug.cgi?id=2214470

- #

- # Backported to 1.48.4.

- Patch:          0001-http2-Dont-drop-connections-on-metadata-limit-exceed.patch

+ Patch:          grpc-1.60.0-Skip-hanging-DynamicStubTest.patch

  # [Python] Specify noexcept for cdef functions (#34242)

  #

  # This is needed to build grpc with Cython 3.
@@ -429,7 +373,14 @@ 

  Patch:          0001-Specify-noexcept-for-cdef-functions.patch

  # [Python] Do not call PyEval_InitThreads

  # https://github.com/grpc/grpc/pull/34857

- Patch:          %{forgeurl}/pull/34857.patch

+ # Patch:          %%{forgeurl}/pull/34857.patch

+ 

+ # Use system gtest

+ Patch:		grpc-1.60.0-system-gtest.patch

+ 

+ # Fix RbacServiceConfigParsingTest.BadActionAndPolicyType test

+ # so that it uses the latest output string for its testing

+ Patch:          grpc-1.60.0-fix-test-string-RbacServiceConfigParsingTest.BadActionAndPolicyType.patch

  

  Requires:       grpc-data = %{version}-%{release}

  
@@ -446,7 +397,10 @@ 

  # Note also that libupb is installed in the system-wide linker path, which will

  # be a problem if upb is ever packaged separately. We will cross that bridge if

  # we get there.

- Provides:       bundled(upb)

+ #

+ # According to https://github.com/grpc/grpc/pull/32914, this is upb 23.0.

+ %global upb_version 23.0

+ Provides:       bundled(upb) = %{upb_version}

  # The bundled upb itself bundles https://github.com/cyb70289/utf8; we follow

  # upstream in styling this as “utf8_range”. It cannot reasonably be unbundled

  # because the original code is not structured for distribution as a library (it
@@ -461,26 +415,12 @@ 

  #   getaddrinfo.c, but Android’s getaddrinfo.c was used as a guide or example

  #   of a way to implement the RFC 6724 spec when this was written.

  

- %description

- gRPC is a modern open source high performance RPC framework that can run in any

- environment. It can efficiently connect services in and across data centers

- with pluggable support for load balancing, tracing, health checking and

- authentication. It is also applicable in last mile of distributed computing to

- connect devices, mobile applications and browsers to backend services.

- 

- The main usage scenarios:

- 

-   • Efficiently connecting polyglot services in microservices style

-     architecture

-   • Connecting mobile devices, browser clients to backend services

-   • Generating efficient client libraries

- 

- Core Features that make it awesome:

+ %global common_description %{expand:

+ gRPC is a modern, open source, high-performance remote procedure call (RPC)

+ framework that can run anywhere. gRPC enables client and server applications to

+ communicate transparently, and simplifies the building of connected systems.}

  

-   • Idiomatic client libraries in 10 languages

-   • Highly efficient on wire and with a simple service definition framework

-   • Bi-directional streaming with http/2 based transport

-   • Pluggable auth, tracing, load balancing and health checking

+ %description %{common_description}

  

  This package provides the shared C core library.

  
@@ -492,9 +432,10 @@ 

  

  Requires:       ca-certificates

  

- %description data

- Common data for gRPC bindings: currently, this contains only a symbolic link to

- the system shared TLS certificates.

+ %description data %{common_description}

+ 

+ This package provides common data for gRPC bindings: currently, this contains

+ only a symbolic link to the system shared TLS certificates.

  

  

  %package doc
@@ -512,30 +453,11 @@ 

  Provides:       python-grpcio-status-doc = %{version}-%{release}

  Provides:       python-grpcio-testing-doc = %{version}-%{release}

  

- %description doc

- Documentation and examples for gRPC, including Markdown documentation sources

- for the following:

- 

-   • C (core)

-     ○ API

-     ○ Internals

-   • C++

-     ○ API

-     ○ Internals

-   • Objective C

-     ○ API

-     ○ Internals

-   • Python

-     ○ grpcio

-     ○ grpcio_admin

-     ○ grpcio_csds

-     ○ grpcio_channelz

-     ○ grpcio_health_checking

-     ○ grpcio_reflection

-     ○ grpcio_status

-     ○ grpcio_testing

- 

- For rendered HTML documentation, please see https://grpc.io/docs/.

+ %description doc %{common_description}

+ 

+ This package provides examples and documentation sources (but not rendered

+ documentation) for gRPC. For rendered HTML documentation, please see

+ https://grpc.io/docs/.

  

  

  %package cpp
@@ -545,11 +467,12 @@ 

  Requires:       grpc%{?_isa} = %{version}-%{release}

  Requires:       grpc-cpp%{?_isa} = %{version}-%{release}

  

- Provides:       bundled(upb)

+ Provides:       bundled(upb) = %{upb_version}

  Provides:       bundled(utf8_range)

  

- %description cpp

- C++ language bindings for gRPC.

+ %description cpp %{common_description}

+ 

+ This package provides C++ language bindings for gRPC.

  

  

  %package plugins
@@ -560,12 +483,13 @@ 

  Requires:       grpc-cpp%{?_isa} = %{version}-%{release}

  Requires:       protobuf-compiler

  

- Provides:       bundled(upb)

+ Provides:       bundled(upb) = %{upb_version}

  Provides:       bundled(utf8_range)

  

- %description plugins

- Plugins to the protocol buffers compiler to generate gRPC sources.

+ %description plugins %{common_description}

  

+ This package provides plugins to the protocol buffers compiler to generate gRPC

+ sources.

  

  %package cli

  Summary:        Command-line tool for gRPC
@@ -574,10 +498,11 @@ 

  Requires:       grpc%{?_isa} = %{version}-%{release}

  Requires:       grpc-cpp%{?_isa} = %{version}-%{release}

  

- Provides:       bundled(upb)

+ Provides:       bundled(upb) = %{upb_version}

  Provides:       bundled(utf8_range)

  

- %description cli

+ %description cli %{common_description}

+ 

  The command line tool can do the following things:

  

    • Send unary rpc.
@@ -614,9 +539,13 @@ 

  Requires:       cmake(c-ares)

  # grpc.pc has -lz

  Requires:       pkgconfig(zlib)

+ # gRPCTargets.cmake links libsystemd.so

+ Requires:       pkgconfig(libsystemd)

+ 

+ %description devel %{common_description}

  

- %description devel

- Development headers and files for gRPC libraries (both C and C++).

+ This package provides development headers and files for gRPC libraries (both C

+ and C++).

  

  

  %package -n python3-grpcio
@@ -629,7 +558,7 @@ 

  # to do so.

  Requires:       grpc-data = %{version}-%{release}

  

- Provides:       bundled(upb)

+ Provides:       bundled(upb) = %{upb_version}

  Provides:       bundled(utf8_range)

  

  # We no longer package these because they require python3dist(xds-protos),
@@ -648,8 +577,10 @@ 

  # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_provides_for_importable_modules

  %py_provides python3-grpc

  

- %description -n python3-grpcio

- Python language bindings for gRPC (HTTP/2-based RPC framework).

+ %description -n python3-grpcio %{common_description}

+ 

+ This package provides Python language bindings for gRPC (HTTP/2-based RPC

+ framework).

  

  

  %global grpcio_egg %{python3_sitearch}/grpcio-%{pyversion}-py%{python3_version}.egg-info
@@ -660,14 +591,15 @@ 

  Summary:       Package for gRPC Python tools

  # License:        same as base package

  

- Provides:       bundled(upb)

+ Provides:       bundled(upb) = %{upb_version}

  Provides:       bundled(utf8_range)

  

  # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_provides_for_importable_modules

  %py_provides python3-grpc-tools

  

- %description -n python3-grpcio-tools

- Package for gRPC Python tools.

+ %description -n python3-grpcio-tools %{common_description}

+ 

+ This package provides gRPC Python tools.

  

  

  %package -n python3-grpcio-channelz
@@ -679,9 +611,7 @@ 

  # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_provides_for_importable_modules

  %py_provides python3-grpc-channelz

  

- %description -n python3-grpcio-channelz

- gRPC Python Channelz package

- ============================

+ %description -n python3-grpcio-channelz %{common_description}

  

  Channelz is a live debug tool in gRPC Python.

  
@@ -695,11 +625,9 @@ 

  # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_provides_for_importable_modules

  %py_provides python3-grpc-health

  

- %description -n python3-grpcio-health-checking

- gRPC Python Health Checking

- ===========================

+ %description -n python3-grpcio-health-checking %{common_description}

  

- Reference package for GRPC Python health checking.

+ This is the reference package for gRPC Python health checking.

  

  

  %package -n python3-grpcio-reflection
@@ -711,11 +639,8 @@ 

  # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_provides_for_importable_modules

  %py_provides python3-grpc-reflection

  

- %description -n python3-grpcio-reflection

- gRPC Python Reflection package

- ==============================

- 

- Reference package for reflection in GRPC Python.

+ %description -n python3-grpcio-reflection %{common_description}

+ This is the reference package for reflection in gRPC Python.

  

  

  %package -n python3-grpcio-status
@@ -727,11 +652,9 @@ 

  # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_provides_for_importable_modules

  %py_provides python3-grpc-status

  

- %description -n python3-grpcio-status

- gRPC Python Status Proto

- ===========================

+ %description -n python3-grpcio-status %{common_description}

  

- Reference package for GRPC Python status proto mapping.

+ This is the reference package for gRPC Python status proto mapping.

  

  

  %package -n python3-grpcio-testing
@@ -743,33 +666,41 @@ 

  # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_provides_for_importable_modules

  %py_provides python3-grpc-testing

  

- %description -n python3-grpcio-testing

- gRPC Python Testing Package

- ===========================

+ %description -n python3-grpcio-testing %{common_description}

  

- Testing utilities for gRPC Python.

+ This package provides testing utilities for gRPC Python.

  

  

  %prep

  %autosetup -p1 -n grpc-%{srcversion}

  

- cp -p third_party/upb/third_party/utf8_range/LICENSE LICENSE-utf8_range

+ cp -p third_party/utf8_range/LICENSE LICENSE-utf8_range

  

- echo '===== Patching grpcio_tools for system protobuf =====' 2>&1

+ echo '===== Patching grpcio_tools for system protobuf/abseil-cpp =====' 2>&1

  # Build python3-grpcio_tools against system protobuf packages instead of

  # expecting a git submodule. Must also add requisite linker flags using

  # GRPC_PYTHON_LDFLAGS. This was formerly done by

  # grpc-VERSION-python-grpcio_tools-use-system-protobuf.patch, but it had to be

  # tediously but trivially rebased every patch release as the CC_FILES list

  # changed, so we automated the patch.

- sed -r -i \

-     -e "s/^(# AUTO-GENERATED .*)/\\1\\n\

- # Then, modified by hand to build with an external system protobuf\

- # installation./" \

-     -e 's/^(CC_FILES=\[).*(\])/\1\2/' \

-     -e "s@^((CC|PROTO)_INCLUDE=')[^']+'@\1%{_includedir}'@" \

-     -e '/^PROTOBUF_SUBMODULE_VERSION=/d' \

-     'tools/distrib/python/grpcio_tools/protoc_lib_deps.py'

+ cat >> 'tools/distrib/python/grpcio_tools/protoc_lib_deps.py' <<'EOF'

+ 

+ # Downstream patch: override or modify values so that we do not depend on

+ # bundled files for system libraries.

+ 

+ del PROTOBUF_SUBMODULE_VERSION

+ PROTO_INCLUDE="%{_includedir}"

+ 

+ _unbundle_libs = {"abseil-cpp", "protobuf"}

+ _unbundle_prefixes = {f"third_party/{lib}" for lib in _unbundle_libs}

+ 

+ def _ok_prefix(path):

+     return not any(map(path.startswith, _unbundle_prefixes))

+ 

+ CC_FILES = list(filter(_ok_prefix, CC_FILES))

+ CC_INCLUDES = list(filter(_ok_prefix, CC_INCLUDES))

+ EOF

+ 

  

  echo '===== Preparing gtest/gmock =====' 2>&1

  %if %{without system_gtest}
@@ -778,6 +709,9 @@ 

  rm -rvf 'third_party/googletest'

  mv '../%{gtest_dir}' 'third_party/googletest'

  %else

+ 

+ 

+ %if 0

  # Patch CMakeLists for external gtest/gmock.

  #

  #  1. Create dummy sources, adding a typedef so the translation unit is not
@@ -799,6 +733,8 @@ 

  '\1\2\n\1gtest\n\1gmock/' CMakeLists.txt

  %endif

  

+ %endif

+ 

  # Extract the source tarballs needed for their .proto files, which upstream

  # expects to download at build time.

  %setup -q -T -D -b 2 -n grpc-%{srcversion}
@@ -890,6 +826,96 @@ 

      tools/run_tests/artifacts/artifact_targets.py \

      tools/distrib/python/grpcio_tools/setup.py

  

+ # Fix:

+ #   cc1plus: fatal error: third_party/utf8_range/utf8_validity.cc: No such file

+ #   or directory

+ # This is new from 1.48.4 to 1.56.1, and it might be an upstream build system

+ # bug, but we have to build the package so differently from upstream, and the

+ # build system is so messy with so much indirection, that it’s hard to track

+ # down exactly what we should report or how it should be fixed properly. For

+ # now, we just work around it with a symlink.

+ ln -s ../../../../third_party/ tools/distrib/python/grpcio_tools/third_party

+ 

+ 

+ echo '===== Adding any neccessary Python test skips =====' 2>&1

+ # This appears to be merely a representation discrepancy. We haven’t been able

+ # to track it down to a particular change (e.g. dependency version update). It

+ # appears in F38 as well, if the necessary abseil-cpp and protobuf packages are

+ # built. Since we don’t understand this well enough to report it upstream

+ # usefully, we just skip it downstream for now. Assistance welcome.

+ #

+ # Sample difference:

+ #

+ # -  '  "channelz._channelz_servicer_test.ChannelzServicerTest",\n'

+ # ?   ^^^                                                     ^ ---

+ # +  'tests.channelz._channelz_servicer_test.ChannelzServicerTest',

+ # ?   ^^^^^^                                                     ^

+ from='^([[:blank:]]+)(def testTestsJsonUpToDate\()'

+ skip='@unittest.skip("JSON representations differ; cause not ascertained")'

+ sed -r -i "s/${from}/\\1${skip}\\n\\1\\2/" \

+     src/python/grpcio_tests/tests/_sanity/_sanity_test.py

+ # With abseil-cpp-20240116.0:

+ # [mutex.cc : 1418] RAW: Potential Mutex deadlock:

+ # …

+ # [mutex.cc : 1428] RAW: Acquiring absl::Mutex 0x556a1fa3d0e0 while holding

+ # 0x556a1fa4bdc0 0x7f55cc003530; a cycle in the historical lock ordering graph

+ # has been observed

+ #

+ # In TestLeak:test_leak_with_single_shot_rpcs.

+ #

+ # Since this is the only test in the case, we can’t just skip it with a

+ # decorator or unittest explodes with a KeyError. Since this is the only test

+ # case in the module, we remove the entire module.

+ rm src/python/grpcio_tests/tests_py3_only/unit/_leak_test.py

+ %ifarch aarch64 s390x x86_64

+ # With abseil-cpp-20240116.0 on s390x or x86_64 (output from s390x):

+ #

+ # Running       tests_py3_only.unit._simple_stubs_test.SimpleStubsTest.test_total_channels_enforced

+ # [mutex.cc : 1418] RAW: Potential Mutex deadlock:

+ # 	@ 0x3ffacc8c7f0 absl::lts_20240116::Mutex::Lock()

+ # …

+ # [mutex.cc : 1428] RAW: Acquiring absl::Mutex 0x2aa274724d0 while holding  0x2aa2748aa90 0x2aa27463910; a cycle in the historical lock ordering graph has been observed

+ # …

+ # [mutex.cc : 1454] RAW: dying due to potential deadlock

+ #

+ # This failure is flaky. It’s unclear whether s390x is the only affected

+ # architecture or whether this is the only affected test.

+ #

+ # from='^([[:blank:]]+)(def test_total_channels_enforced\()'

+ # skip='@unittest.skip("Deadlock \/ lock ordering graph cycle")'

+ # sed -r -i "s/${from}/\\1${skip}\\n\\1\\2/" \

+ #     src/python/grpcio_tests/tests_py3_only/unit/_simple_stubs_test.py

+ #

+ # -----

+ #

+ # With abseil-cpp-20240116.0 on aarch64:

+ #

+ # Running       tests_py3_only.unit._simple_stubs_test.SimpleStubsTest.test_stream_stream

+ # /builddir/build/BUILD/grpc-1.60.0/src/python/grpcio_tests/tests_py3_only/unit/_simple_stubs_test.py:293: ExperimentalApiWarning: 'stream_stream' is an experimental API. It is subject to change or removal between minor releases. Proceed with caution.

+ #   for response in grpc.experimental.stream_stream(

+ # [mutex.cc : 1418] RAW: Potential Mutex deadlock:

+ # 	@ 0x21ffff84f96a38

+ # …

+ # [mutex.cc : 1428] RAW: Acquiring absl::Mutex 0xaaaadadf77a0 while holding  0xaaaadae500b0; a cycle in the historical lock ordering graph has been observed

+ # …

+ # [mutex.cc : 1454] RAW: dying due to potential deadlock

+ #

+ # This failure is flaky. It’s unclear whether aarch64 is the only affected

+ # architecture or whether this is the only affected test.

+ #

+ # from='^([[:blank:]]+)(def test_stream_stream\()'

+ # skip='@unittest.skip("Deadlock \/ lock ordering graph cycle")'

+ # sed -r -i "s/${from}/\\1${skip}\\n\\1\\2/" \

+ #     src/python/grpcio_tests/tests_py3_only/unit/_simple_stubs_test.py

+ #

+ # -----

+ #

+ # Even skipping a single test with a decorator causes unittest to explode with

+ # a KeyError, which is very strange. We just remove the entire test module on

+ # these architectures.

+ rm src/python/grpcio_tests/tests_py3_only/unit/_simple_stubs_test.py

+ %endif

+ 

  

  %build

  # ~~~~ C (core) and C++ (cpp) ~~~~
@@ -934,6 +960,9 @@ 

      -DgRPC_BUILD_GRPC_PHP_PLUGIN:BOOL=ON \

      -DgRPC_BUILD_GRPC_PYTHON_PLUGIN:BOOL=ON \

      -DgRPC_BUILD_GRPC_RUBY_PLUGIN:BOOL=ON \

+ %if %{with system_gtest}

+     -DgRPC_USE_EXTERNAL_GOOGLETEST:BOOL=ON \

+ %endif

      -GNinja

  %cmake_build

  # ~~~~ Python ~~~~
@@ -1000,6 +1029,15 @@ 

      -O1 --skip-build --root "${PYROOT}" --prefix %{_prefix}

  popd >/dev/null

  

+ # ~~ xds_protos ~~

+ echo '===== Building Python xds_protos package =====' 2>&1

+ pushd "tools/distrib/python/xds_protos" >/dev/null

+ %py3_build

+ %{__python3} %{py_setup} %{?py_setup_args} install \

+       -O1 --skip-build --root "${PYROOT}" --prefix %{_prefix}

+ popd >/dev/null

+ 

+ 

  echo '===== Building pure-Python packages =====' 1>&2

  for suffix in channelz health_checking reflection status testing tests

  do
@@ -1159,6 +1197,9 @@ 

  # Seems to require privilege:

  flaky_network

  

+ # No idea why this one is failing, but it definitely is everywhere.

+ no_logging

+ 

  %ifarch s390x

  # Unexplained:

  #
@@ -1345,6 +1386,82 @@ 

  alts_zero_copy_grpc_protector

  %endif

  

+ %ifarch s390x

+ # https://github.com/grpc/grpc/issues/35350

+ # Unexplained, except that this is clearly an endianness issue:

+ #

+ # [ RUN      ] BufferListTest.TestLongPendingAckForSomeTracedBuffers

+ # /builddir/build/BUILD/grpc-1.56.2/test/core/event_engine/posix/traced_buffer_list_test.cc:266: Failure

+ # Expected equality of these values:

+ #   (__atomic_load_n((&verifier_called[i]), 2))

+ #     Which is: 4294967296

+ #   static_cast<gpr_atm>(1)

+ #     Which is: 1

+ # [  FAILED  ] BufferListTest.TestLongPendingAckForSomeTracedBuffers (0 ms)

+ #

+ # Confirmed in 1.56.2 2022-09-20

+ buffer_list

+ traced_buffer_list

+ %endif

+ 

+ %ifarch x86_64

+ # Unexplained, possibly flaky:

+ #

+ # [       OK ] CoreEnd2endTest.CancelAfterInvoke5/Chttp2FullstackLocalUds (103 ms)

+ # [ RUN      ] CoreEnd2endTest.CancelAfterInvoke5/Chttp2FullstackNoRetry

+ # E0205 23:12:04.513997016   61661 cq_verifier.cc:362]                   Verify tag(1)-✅ for 10000ms

+ # E0205 23:12:04.514440029   61661 cq_verifier.cc:362]                   Verify tag(-1)-🤷 for 10000ms

+ # timeout: sending signal TERM to command ‘redhat-linux-build/cancel_after_invoke_test’

+ # *** SIGTERM received at time=1707178067 on cpu 0 ***

+ # PC: @     0x7f8e78213623  (unknown)  clock_nanosleep@@GLIBC_2.17

+ #     @     0x7f8e77e307ee         80  (unknown)

+ #     @     0x7f8e78172710  1897319136  (unknown)

+ #     @     0x7f8e7821f3c7         16  nanosleep

+ #     @     0x7f8e786021f4        144  AbslInternalSleepFor_lts_20240116

+ #     @     0x56300e82c569         64  grpc_event_engine::experimental::WaitForSingleOwner()

+ #     @     0x56300e829052         64  absl::lts_20240116::internal_any_invocable::LocalInvoker<>()

+ #     @     0x56300e81a988         96  grpc_core::CoreEnd2endTest::TearDown()

+ #     @     0x7f8e78ff8a8a         96  (unknown)

+ #     @     0x7f8e78fe3735        128  testing::TestInfo::Run()

+ #     @     0x7f8e78fe393f         96  testing::TestSuite::Run()

+ #     @     0x7f8e78ff0170        208  testing::internal::UnitTestImpl::RunAllTests()

+ #     @     0x7f8e78feed40        160  testing::UnitTest::Run()

+ #     @     0x56300e7ed0dd        912  main

+ #     @     0x7f8e7815c088        160  __libc_start_call_main

+ #     @     0x7f8e7815c14b         96  __libc_start_main@GLIBC_2.2.5

+ #     @     0x56300e7eeb05  (unknown)  _start

+ #

+ # Confirmed in 1.60.0 2024-02-05 (seen on x86_64 only):

+ cancel_after_invoke

+ # Unexplained, possibly flaky:

+ #

+ # [ RUN      ] CoreEnd2endTest.CancelWithStatus3/Chttp2SimplSslFullstackTls12

+ # E0207 05:39:53.271444926   69303 cq_verifier.cc:362]                   Verify tag(1)-✅ for 10000ms

+ # E0207 05:39:53.271645133   69303 cq_verifier.cc:362]                   Verify tag(-1)-🤷 for 10000ms

+ # timeout: sending signal TERM to command ‘redhat-linux-build/cancel_with_status_test’

+ # *** SIGTERM received at time=1707287989 on cpu 0 ***

+ # PC: @     0x7f4c5c0cd623  (unknown)  clock_nanosleep@@GLIBC_2.17

+ #     @     0x7f4c5bcea7ee         80  (unknown)

+ #     @     0x7f4c5c02c710  (unknown)  (unknown)

+ #     @     0x7f4c5c0d93c7         16  nanosleep

+ #     @     0x7f4c5c4bc1f4        144  AbslInternalSleepFor_lts_20240116

+ #     @     0x55bb9eaaadb9         64  grpc_event_engine::experimental::WaitForSingleOwner()

+ #     @     0x55bb9eaa9552         64  absl::lts_20240116::internal_any_invocable::LocalInvoker<>()

+ #     @     0x55bb9ea9c6f8         96  grpc_core::CoreEnd2endTest::TearDown()

+ #     @     0x7f4c5ceb2a8a         96  (unknown)

+ #     @     0x7f4c5ce9d735        128  testing::TestInfo::Run()

+ #     @     0x7f4c5ce9d93f         96  testing::TestSuite::Run()

+ #     @     0x7f4c5ceaa170        208  testing::internal::UnitTestImpl::RunAllTests()

+ #     @     0x7f4c5cea8d40        160  testing::UnitTest::Run()

+ #     @     0x55bb9ea6f07d        912  main

+ #     @     0x7f4c5c016088        160  __libc_start_call_main

+ #     @     0x7f4c5c01614b         96  __libc_start_main@GLIBC_2.2.5

+ #     @     0x55bb9ea70875  (unknown)  _start

+ #

+ # Confirmed in 1.60.0 2024-02-06 (seen on x86_64 only):

+ cancel_with_status

+ %endif

+ 

  # Unexplained, flaky:

  #

  # (hangs indefinitely, timeout triggered)
@@ -1438,27 +1555,6 @@ 

  grpc_tool

  %endif

  

- %ifarch s390x

- # Unexplained:

- #

- # *** SIGABRT received at time=1663181750 on cpu 2 ***

- # PC: @      0x3ffaec9cf2a  (unknown)  __pthread_kill_implementation

- #     @      0x3ffaeb82560  (unknown)  (unknown)

- #     @      0x3ffaeb82802  (unknown)  (unknown)

- #     @      0x3ffaf37e490  (unknown)  (unknown)

- #     @      0x3ffaec9cf2a  (unknown)  __pthread_kill_implementation

- #     @      0x3ffaec49d20  (unknown)  gsignal

- #     @      0x3ffaec2b364  (unknown)  abort

- #     @      0x2aa1be8145e  (unknown)  verification_test()

- #     @      0x2aa1be811e8  (unknown)  main

- #     @      0x3ffaec2b618  (unknown)  __libc_start_call_main

- #     @      0x3ffaec2b700  (unknown)  __libc_start_main@GLIBC_2.2

- #     @      0x2aa1be81270  (unknown)  (unknown)

- #

- # Confirmed in 1.48.1 2022-09-14

- murmur_hash

- %endif

- 

  %ifarch x86_64 aarch64

  # Unexplained:

  #
@@ -1582,8 +1678,8 @@ 

  %endif

  

  pushd src/python/grpcio_tests

+ # disabled test_lite because it wants admin and csds and xds_protos, see Obsolete comment

  for suite in \

-     test_lite \

      %{?with_python_aio_tests:test_aio} \

      %{?with_python_gevent_tests:test_gevent} \

      test_py3_only
@@ -1620,6 +1716,10 @@ 

  %{_libdir}/libgrpc.so.%{c_so_version}{,.*}

  %{_libdir}/libgrpc_unsecure.so.%{c_so_version}{,.*}

  %{_libdir}/libupb.so.%{c_so_version}{,.*}

+ %{_libdir}/libupb_collections_lib.so.%{c_so_version}{,.*}

+ %{_libdir}/libupb_json_lib.so.%{c_so_version}{,.*}

+ %{_libdir}/libupb_textformat_lib.so.%{c_so_version}{,.*}

+ %{_libdir}/libutf8_range_lib.so.%{c_so_version}{,.*}

  

  

  %files data
@@ -1649,6 +1749,7 @@ 

  %{_libdir}/libgrpc++_error_details.so.%{cpp_so_version}{,.*}

  %{_libdir}/libgrpc++_reflection.so.%{cpp_so_version}{,.*}

  %{_libdir}/libgrpc++_unsecure.so.%{cpp_so_version}{,.*}

+ %{_libdir}/libgrpc_authorization_provider.so.%{cpp_so_version}{,.*}

  %{_libdir}/libgrpc_plugin_support.so.%{cpp_so_version}{,.*}

  

  %{_libdir}/libgrpcpp_channelz.so.%{cpp_so_version}{,.*}
@@ -1674,8 +1775,14 @@ 

  %{_libdir}/libaddress_sorting.so

  %{_libdir}/libgpr.so

  %{_libdir}/libgrpc.so

+ %{_libdir}/libgrpc_authorization_provider.so

  %{_libdir}/libgrpc_unsecure.so

  %{_libdir}/libupb.so

+ %{_libdir}/libupb_collections_lib.so

+ %{_libdir}/libupb_json_lib.so

+ %{_libdir}/libupb_textformat_lib.so

+ %{_libdir}/libutf8_range_lib.so

+ 

  %{_includedir}/grpc/

  %{_libdir}/pkgconfig/gpr.pc

  %{_libdir}/pkgconfig/grpc.pc

file modified
+3 -3
@@ -1,6 +1,6 @@ 

- SHA512 (grpc-1.48.4.tar.gz) = 6eaed258e50ecc98f85ac83927b7feaecd0734b481dac6b0468a4f938af24fa08a7ca40e5548bf7bff6b3246fb25e74dee6ca97103dfd5ca8f41978d3448233a

  SHA512 (googletest-0e402173c97aea7a00749e825b194bfede4f2e45.tar.gz) = 5c5eaf6ff9f3c1bca025b7ef0234ba97232ba85b43e6354a92f49b7208f5c47581ebaf18bf58618498e5d264f2620c2b6676e81bb0f7df77112b96ba271ececf

- SHA512 (data-plane-api-9c42588c956220b48eb3099d186487c2f04d32ec.tar.gz) = 9b1ceff5d018e70b36e02aa1b583f5495b0eb92506055bf6913d2e7ef401d3602cba8723efbc178ee31fdef9aba510fc2284612ebe22a24b5b4a703f07099897

  SHA512 (googleapis-2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz) = cdeefae807df7097174b4bb28c0900b06a68d424c00ebba4ff5add260c9c651351d5e429bfc5de42f95ebb75dadec313f7bd3991c2fa476c9104f9ea656acad4

  SHA512 (opencensus-proto-0.3.0.tar.gz) = 39231a495dfdccfc8267d1e6af2ac624feea611a8691c10ec570de2194b352e4a9c3b0ce1606414fb98e5d77c66873bed4a9e56512efa12b267b8a91e0c5851e

- SHA512 (xds-cb28da3451f158a947dfc45090fe92b07b243bc1.tar.gz) = eb5878764503872c18b8750b20e2c2e2224e73d9601197752cea7e1e4171899474ad4f39aacc80d6c1b57a50b2161d39f219df64ffb250d045af482dae01ea79

+ SHA512 (grpc-1.60.0.tar.gz) = 91c2406ed4198509ac0d5360b3da6898fa4f40f459eb6fff541faa44cc238eed98fd7489e7ef7a80a6f4a318bc5b9130eaa0ba1beaa358d1c074fc82825648ff

+ SHA512 (data-plane-api-9d6ffa70677c4dbf23f6ed569676206c4e2edff4.tar.gz) = 1b63ed7dbfeb5fec12cc6f6e4a3588eb4806f63a2149bbdcc3272591db802df4895be0b010011ab6f6817397bf36744a3831d6c242486314abebfa2f01ed9236

+ SHA512 (xds-e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7.tar.gz) = 7b5a61ce32ccb73a3c6459c2b6b1af45362456e6082743f2bc88152f8021797996ac82fd9220b5144ed17a5742511a5b5ecf2c85e59633f6dcf13ed66f97d7d5

This updates grpc to 1.60.0. It is intended to be complimentary to my PR for protobuf to bring it current: https://src.fedoraproject.org/rpms/protobuf/pull-request/26

I included the fixes from the earlier PR to update grpc.

This builds against the current protobuf, and most packages should rebuild against this pairing without any changes (or very minor patches). I have a copr here (https://copr.fedorainfracloud.org/coprs/spot/cura/) which has these packages built against all current Fedora arches. ppc64le sometimes times out on the tests, but this is ephemeral, it will succeed on retry.

New grpc (and new protobuf) are necessary to update cura in Fedora.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/d99f360325ea4fa99bee583d4020eafb

So you managed to get a current grpc working with a 3.x protobuf, even though it “requires” v4 (e.g. 25.x)? I’m thrilled with that, if it’s viable. Moving to 25.1 would be better, but also probably harder.

I’ll audit this when I have a little time, but at a glance it looks like you’ve taken the time to understand and work through the details.

You’ve probably already looked at the comments in https://src.fedoraproject.org/rpms/protobuf/pull-request/25 regarding the potential impact; due to the many bindings and code generation via protoc, impact checking is a bit messier than for normal libraries.

I’m not expecting to have a lot of time in the next few days, but please let me know how else I can help you with this effort.

My protobuf PR moves it to 3.25.1, which I think is the same as 4.25.1, they just tagged both on the same commit upstream.

Agree on the impact, this is something we should do in a sidetag and as a Fedora Feature, but I don't want to wait too much longer, it's not going to magically get easier. :)

My protobuf PR moves it to 3.25.1, which I think is the same as 4.25.1, they just tagged both on the same commit upstream.

As far as I can tell from my phone, I agree, which surprises me and makes protobuf versioning even more confusing than I thought.

Anyway, I appreciate that you’re willing and able to lead this work, and I’ll do whatever I can to facilitate it.

This looks really good overall. I’m working on local mock builds and starting COPR builds in https://copr.fedorainfracloud.org/coprs/music/protobuf-grpc/.

it looks like you’ve done the hardest parts of the upgrade correctly, which is no trivial task.

There are a few things I would like to investigate, building on top of your work here:

  • Identify and remove any stale patches hanging around in dist-git; I noticed 0001-http2-Dont-drop-connections-on-metadata-limit-exceed.patch.
  • Compare against https://src.fedoraproject.org/rpms/grpc/pull-request/28 to look for any useful minutiae from that PR that perhaps didn’t make it over to this one.
  • Remove “comment” conditionals (%if 0) and commented-out patches.
  • See if any newly-added patches are upstreamable and submit PR’s
  • See if there’s a way to avoid a gnarly rebase of grpc-1.60.0-system-gtest.patch on every release.
  • Skim upstream source diffs between 1.56.2 and 1.60.0
  • Double-check for new licenses and new bundled libraries

While I hope I can work through these refinements before all the other pieces are in place to merge https://src.fedoraproject.org/rpms/protobuf/pull-request/26, this PR looks OK to merge as-is if needed.

rebased onto 11122f9

4 months ago

After a couple of git misfires, I’ve successfully rebased this on rawhide.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/dadc4d65aa484d5ca080a11479890cc4

rebased onto 5c85023

4 months ago

Rebased on rawhide, post-mass-rebuild.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/13b2c5f184bb42b2975163e01421e95c

rebased onto cb0d7da

3 months ago

Rebased on rawhide, and added a test skip that’s needed for abseil-cpp-20240116.0. (Is it sufficient? We’ll see!)

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/93483a0e60064b77bce0a3c9a5121015

rebased onto 2449188

3 months ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/33b6be70450a422ea41c913a0f0ba7bc

rebased onto 619b8de

3 months ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/820dffbd8490465990cd5e124d009ded

rebased onto 48a74ef

3 months ago

COPR impact testing showed that packages that depend on grpc via CMake link libsystemd.so, so grpc-devel needed to add a dependency on pkgconfig(libsystemd).

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/a848212cafb0433e85506b7a9f1b852d

rebased onto c551a9e

3 months ago

I don’t love the flaky mutex deadlocks that have started appearing in some of the Python tests with abseil-cpp-20240116.0, but I am not sure I have anything useful enough to report upstream, especially before I get grpc updated again to the current 1.61.1, and I’m certainly not debugging locking issues myself, so I guess I’ll just keep an eye on them for now…

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/00381eff7ac248d7afc24fcd21b00aff