From 4e41db8536ef6d190485b47e2c76e28010d92692 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Jul 23 2023 13:53:33 +0000 Subject: WIP: Update to 1.56.2 (fix RHBZ#2170404, fix RHBZ#2214466, fix RHBZ#2214474) --- diff --git a/.gitignore b/.gitignore index 609811f..e7a0632 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,7 @@ /grpc-1.48.2.tar.gz /grpc-1.48.3.tar.gz /grpc-1.48.4.tar.gz +/grpc-1.56.1.tar.gz +/data-plane-api-68d4315167352ffac71f149a43b8088397d3f33d.tar.gz +/xds-e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7.tar.gz +/grpc-1.56.2.tar.gz diff --git a/0001-http2-Dont-drop-connections-on-metadata-limit-exceed.patch b/0001-http2-Dont-drop-connections-on-metadata-limit-exceed.patch deleted file mode 100644 index b1e5cc1..0000000 --- a/0001-http2-Dont-drop-connections-on-metadata-limit-exceed.patch +++ /dev/null @@ -1,695 +0,0 @@ -From 9f01fd62c356c05d14abbaebfcedf0b387d1cb96 Mon Sep 17 00:00:00 2001 -From: Craig Tiller -Date: Tue, 7 Feb 2023 08:27:04 -0800 -Subject: [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 - ---------- - -Co-authored-by: ctiller ---- - CMakeLists.txt | 38 --- - build_autogenerated.yaml | 13 - - .../chttp2/transport/hpack_parser.cc | 11 +- - .../ext/transport/chttp2/transport/internal.h | 2 - - .../ext/transport/chttp2/transport/parsing.cc | 6 +- - test/core/bad_client/generate_tests.bzl | 1 - - test/core/bad_client/tests/large_metadata.cc | 108 --------- - .../bad_client/tests/large_metadata.headers | 106 -------- - test/core/end2end/tests/large_metadata.cc | 226 +++++++++--------- - tools/run_tests/generated/tests.json | 24 -- - 10 files changed, 126 insertions(+), 409 deletions(-) - delete mode 100644 test/core/bad_client/tests/large_metadata.cc - delete mode 100644 test/core/bad_client/tests/large_metadata.headers - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1ecaea8eb7..661ce2c511 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1078,7 +1078,6 @@ if(gRPC_BUILD_TESTS) - add_dependencies(buildtests_cxx istio_echo_server_test) - add_dependencies(buildtests_cxx join_test) - add_dependencies(buildtests_cxx json_test) -- add_dependencies(buildtests_cxx large_metadata_bad_client_test) - add_dependencies(buildtests_cxx latch_test) - add_dependencies(buildtests_cxx lb_get_cpu_stats_test) - add_dependencies(buildtests_cxx lb_load_data_store_test) -@@ -12796,43 +12795,6 @@ target_link_libraries(json_test - ) - - --endif() --if(gRPC_BUILD_TESTS) -- --add_executable(large_metadata_bad_client_test -- test/core/bad_client/bad_client.cc -- test/core/bad_client/tests/large_metadata.cc -- test/core/end2end/cq_verifier.cc -- third_party/googletest/googletest/src/gtest-all.cc -- third_party/googletest/googlemock/src/gmock-all.cc --) -- --target_include_directories(large_metadata_bad_client_test -- PRIVATE -- ${CMAKE_CURRENT_SOURCE_DIR} -- ${CMAKE_CURRENT_SOURCE_DIR}/include -- ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} -- ${_gRPC_RE2_INCLUDE_DIR} -- ${_gRPC_SSL_INCLUDE_DIR} -- ${_gRPC_UPB_GENERATED_DIR} -- ${_gRPC_UPB_GRPC_GENERATED_DIR} -- ${_gRPC_UPB_INCLUDE_DIR} -- ${_gRPC_XXHASH_INCLUDE_DIR} -- ${_gRPC_ZLIB_INCLUDE_DIR} -- third_party/googletest/googletest/include -- third_party/googletest/googletest -- third_party/googletest/googlemock/include -- third_party/googletest/googlemock -- ${_gRPC_PROTO_GENS_DIR} --) -- --target_link_libraries(large_metadata_bad_client_test -- ${_gRPC_PROTOBUF_LIBRARIES} -- ${_gRPC_ALLTARGETS_LIBRARIES} -- grpc_test_util --) -- -- - endif() - if(gRPC_BUILD_TESTS) - -diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml -index 941a095cd1..9c2fbaf2b8 100644 ---- a/build_autogenerated.yaml -+++ b/build_autogenerated.yaml -@@ -6683,19 +6683,6 @@ targets: - deps: - - grpc_test_util - uses_polling: false --- name: large_metadata_bad_client_test -- gtest: true -- build: test -- language: c++ -- headers: -- - test/core/bad_client/bad_client.h -- - test/core/end2end/cq_verifier.h -- src: -- - test/core/bad_client/bad_client.cc -- - test/core/bad_client/tests/large_metadata.cc -- - test/core/end2end/cq_verifier.cc -- deps: -- - grpc_test_util - - name: latch_test - gtest: true - build: test -diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.cc b/src/core/ext/transport/chttp2/transport/hpack_parser.cc -index 5354338cba..314707b59e 100644 ---- a/src/core/ext/transport/chttp2/transport/hpack_parser.cc -+++ b/src/core/ext/transport/chttp2/transport/hpack_parser.cc -@@ -1218,12 +1218,17 @@ class HPackParser::Parser { - "). GRPC_ARG_MAX_METADATA_SIZE can be set to increase this limit.", - *frame_length_, metadata_size_limit_); - if (metadata_buffer_ != nullptr) metadata_buffer_->Clear(); -+ // StreamId is used as a signal to skip this stream but keep the connection -+ // alive - return input_->MaybeSetErrorAndReturn( - [] { - return grpc_error_set_int( -- GRPC_ERROR_CREATE_FROM_STATIC_STRING( -- "received initial metadata size exceeds limit"), -- GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_RESOURCE_EXHAUSTED); -+ grpc_error_set_int( -+ GRPC_ERROR_CREATE_FROM_STATIC_STRING( -+ "received initial metadata size exceeds limit"), -+ GRPC_ERROR_INT_GRPC_STATUS, -+ GRPC_STATUS_RESOURCE_EXHAUSTED), -+ GRPC_ERROR_INT_STREAM_ID, 0); - }, - false); - } -diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h -index 4af3c4ec9d..e01cff72c1 100644 ---- a/src/core/ext/transport/chttp2/transport/internal.h -+++ b/src/core/ext/transport/chttp2/transport/internal.h -@@ -541,8 +541,6 @@ struct grpc_chttp2_stream { - - grpc_core::Timestamp deadline = grpc_core::Timestamp::InfFuture(); - -- /** saw some stream level error */ -- grpc_error_handle forced_close_error = GRPC_ERROR_NONE; - /** how many header frames have we received? */ - uint8_t header_frames_received = 0; - /** number of bytes received - reset at end of parse thread execution */ -diff --git a/src/core/ext/transport/chttp2/transport/parsing.cc b/src/core/ext/transport/chttp2/transport/parsing.cc -index 6a45381e54..48dddc9313 100644 ---- a/src/core/ext/transport/chttp2/transport/parsing.cc -+++ b/src/core/ext/transport/chttp2/transport/parsing.cc -@@ -22,6 +22,7 @@ - #include - - #include -+#include - - #include "absl/base/attributes.h" - #include "absl/status/status.h" -@@ -675,10 +676,7 @@ static grpc_error_handle parse_frame_slice(grpc_chttp2_transport* t, - } - grpc_chttp2_parsing_become_skip_parser(t); - if (s) { -- s->forced_close_error = err; -- grpc_chttp2_add_rst_stream_to_next_write(t, t->incoming_stream_id, -- GRPC_HTTP2_PROTOCOL_ERROR, -- &s->stats.outgoing); -+ grpc_chttp2_cancel_stream(t, s, std::exchange(err, absl::OkStatus())); - } else { - GRPC_ERROR_UNREF(err); - } -diff --git a/test/core/bad_client/generate_tests.bzl b/test/core/bad_client/generate_tests.bzl -index 85aafed655..6100d142d6 100755 ---- a/test/core/bad_client/generate_tests.bzl -+++ b/test/core/bad_client/generate_tests.bzl -@@ -29,7 +29,6 @@ BAD_CLIENT_TESTS = { - "headers": test_options(), - "initial_settings_frame": test_options(), - "head_of_line_blocking": test_options(), -- "large_metadata": test_options(), - "out_of_bounds": test_options(), - "server_registered_method": test_options(), - "simple_request": test_options(), -diff --git a/test/core/bad_client/tests/large_metadata.cc b/test/core/bad_client/tests/large_metadata.cc -deleted file mode 100644 -index 9423dc3f6d..0000000000 ---- a/test/core/bad_client/tests/large_metadata.cc -+++ /dev/null -@@ -1,108 +0,0 @@ --/* -- * -- * Copyright 2015 gRPC authors. -- * -- * Licensed under the Apache License, Version 2.0 (the "License"); -- * you may not use this file except in compliance with the License. -- * You may obtain a copy of the License at -- * -- * http://www.apache.org/licenses/LICENSE-2.0 -- * -- * Unless required by applicable law or agreed to in writing, software -- * distributed under the License is distributed on an "AS IS" BASIS, -- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- * See the License for the specific language governing permissions and -- * limitations under the License. -- * -- */ -- --#include -- --#include "absl/strings/str_format.h" --#include "absl/strings/str_join.h" -- --#include --#include -- --#include "src/core/lib/gpr/string.h" --#include "src/core/lib/surface/server.h" --#include "test/core/bad_client/bad_client.h" --#include "test/core/end2end/cq_verifier.h" -- --// The large-metadata headers that we're adding for this test are not --// actually appended to this in a single string, since the string would --// be longer than the C99 string literal limit. Instead, we dynamically --// construct it by adding the large headers one at a time. -- --/* headers: generated from large_metadata.headers in this directory */ --#define PFX_TOO_MUCH_METADATA_FROM_CLIENT_REQUEST \ -- "\x00\x00\x00\x04\x01\x00\x00\x00\x00" \ -- "\x00" \ -- "5{\x01\x05\x00\x00\x00\x01" \ -- "\x10\x05:path\x08/foo/bar" \ -- "\x10\x07:scheme\x04http" \ -- "\x10\x07:method\x04POST" \ -- "\x10\x0a:authority\x09localhost" \ -- "\x10\x0c" \ -- "content-type\x10" \ -- "application/grpc" \ -- "\x10\x14grpc-accept-encoding\x15identity,deflate,gzip" \ -- "\x10\x02te\x08trailers" \ -- "\x10\x0auser-agent\"bad-client grpc-c/0.12.0.0 (linux)" -- --// Each large-metadata header is constructed from these start and end --// strings, with a two-digit number in between. --#define PFX_TOO_MUCH_METADATA_FROM_CLIENT_HEADER_START_STR "\x10\x0duser-header" --#define PFX_TOO_MUCH_METADATA_FROM_CLIENT_HEADER_END_STR \ -- "~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ -- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -- --// The size of each large-metadata header string. --#define PFX_TOO_MUCH_METADATA_FROM_CLIENT_HEADER_SIZE \ -- ((sizeof(PFX_TOO_MUCH_METADATA_FROM_CLIENT_HEADER_START_STR) - 1) + 2 + \ -- (sizeof(PFX_TOO_MUCH_METADATA_FROM_CLIENT_HEADER_END_STR) - 1)) -- --// The number of headers we're adding and the total size of the client --// payload. --#define NUM_HEADERS 46 --#define TOO_MUCH_METADATA_FROM_CLIENT_REQUEST_SIZE \ -- ((sizeof(PFX_TOO_MUCH_METADATA_FROM_CLIENT_REQUEST) - 1) + \ -- (NUM_HEADERS * PFX_TOO_MUCH_METADATA_FROM_CLIENT_HEADER_SIZE) + 1) -- --static void verifier_fails(grpc_server* server, grpc_completion_queue* cq, -- void* /*registered_method*/) { -- while (grpc_core::Server::FromC(server)->HasOpenConnections()) { -- GPR_ASSERT(grpc_completion_queue_next( -- cq, grpc_timeout_milliseconds_to_deadline(20), nullptr) -- .type == GRPC_QUEUE_TIMEOUT); -- } --} -- --int main(int argc, char** argv) { -- int i; -- grpc_init(); -- grpc::testing::TestEnvironment env(&argc, argv); -- -- // Test sending more metadata than the server will accept. -- std::vector headers; -- for (i = 0; i < NUM_HEADERS; ++i) { -- headers.push_back(absl::StrFormat( -- "%s%02d%s", PFX_TOO_MUCH_METADATA_FROM_CLIENT_HEADER_START_STR, i, -- PFX_TOO_MUCH_METADATA_FROM_CLIENT_HEADER_END_STR)); -- } -- std::string client_headers = absl::StrJoin(headers, ""); -- char client_payload[TOO_MUCH_METADATA_FROM_CLIENT_REQUEST_SIZE] = -- PFX_TOO_MUCH_METADATA_FROM_CLIENT_REQUEST; -- memcpy(client_payload + sizeof(PFX_TOO_MUCH_METADATA_FROM_CLIENT_REQUEST) - 1, -- client_headers.data(), client_headers.size()); -- grpc_bad_client_arg args[2]; -- args[0] = connection_preface_arg; -- args[1].client_validator = rst_stream_client_validator; -- args[1].client_payload = client_payload; -- args[1].client_payload_length = sizeof(client_payload) - 1; -- -- grpc_run_bad_client_test(verifier_fails, args, 2, 0); -- -- grpc_shutdown(); -- return 0; --} -diff --git a/test/core/bad_client/tests/large_metadata.headers b/test/core/bad_client/tests/large_metadata.headers -deleted file mode 100644 -index 75de3ef100..0000000000 ---- a/test/core/bad_client/tests/large_metadata.headers -+++ /dev/null -@@ -1,106 +0,0 @@ --# headers used in simple_request.c --# use tools/codegen/core/gen_header_frame.py --set_end_stream to generate --# the binary strings contained in the source code --:path: /foo/bar --:scheme: http --:method: POST --:authority: localhost --content-type: application/grpc --grpc-accept-encoding: identity,deflate,gzip --te: trailers --user-agent: bad-client grpc-c/0.12.0.0 (linux) --user-header00: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa --user-header01: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa --user-header02: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa --user-header03: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa --user-header04: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa --user-header05: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa --user-header92: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa --user-header93: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa --user-header94: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -diff --git a/test/core/end2end/tests/large_metadata.cc b/test/core/end2end/tests/large_metadata.cc -index 72cf519899..08cd20cb4f 100644 ---- a/test/core/end2end/tests/large_metadata.cc -+++ b/test/core/end2end/tests/large_metadata.cc -@@ -247,10 +247,6 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) { - // Server responds with metadata larger than what the client accepts. - static void test_request_with_bad_large_metadata_response( - grpc_end2end_test_config config) { -- grpc_call* c; -- grpc_call* s; -- grpc_metadata meta; -- const size_t large_size = 64 * 1024; - grpc_arg arg; - arg.type = GRPC_ARG_INTEGER; - arg.key = const_cast(GRPC_ARG_MAX_METADATA_SIZE); -@@ -259,115 +255,125 @@ static void test_request_with_bad_large_metadata_response( - grpc_end2end_test_fixture f = begin_test( - config, "test_request_with_bad_large_metadata_response", &args, &args); - cq_verifier* cqv = cq_verifier_create(f.cq); -- grpc_op ops[6]; -- grpc_op* op; -- grpc_metadata_array initial_metadata_recv; -- grpc_metadata_array trailing_metadata_recv; -- grpc_metadata_array request_metadata_recv; -- grpc_call_details call_details; -- grpc_status_code status; -- grpc_call_error error; -- grpc_slice details; -- int was_cancelled = 2; -- -- gpr_timespec deadline = five_seconds_from_now(); -- c = grpc_channel_create_call(f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, -- grpc_slice_from_static_string("/foo"), nullptr, -- deadline, nullptr); -- GPR_ASSERT(c); -- -- meta.key = grpc_slice_from_static_string("key"); -- meta.value = grpc_slice_malloc(large_size); -- memset(GRPC_SLICE_START_PTR(meta.value), 'a', large_size); -- -- grpc_metadata_array_init(&initial_metadata_recv); -- grpc_metadata_array_init(&trailing_metadata_recv); -- grpc_metadata_array_init(&request_metadata_recv); -- grpc_call_details_init(&call_details); -- -- memset(ops, 0, sizeof(ops)); -- // Client: send request. -- op = ops; -- op->op = GRPC_OP_SEND_INITIAL_METADATA; -- op->data.send_initial_metadata.count = 0; -- op->flags = 0; -- op->reserved = nullptr; -- op++; -- op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; -- op->flags = 0; -- op->reserved = nullptr; -- op++; -- op->op = GRPC_OP_RECV_INITIAL_METADATA; -- op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; -- op->flags = 0; -- op->reserved = nullptr; -- op++; -- op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; -- op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; -- op->data.recv_status_on_client.status = &status; -- op->data.recv_status_on_client.status_details = &details; -- op->flags = 0; -- op->reserved = nullptr; -- op++; -- error = grpc_call_start_batch(c, ops, static_cast(op - ops), tag(1), -- nullptr); -- GPR_ASSERT(GRPC_CALL_OK == error); -- -- error = -- grpc_server_request_call(f.server, &s, &call_details, -- &request_metadata_recv, f.cq, f.cq, tag(101)); -- GPR_ASSERT(GRPC_CALL_OK == error); -- -- CQ_EXPECT_COMPLETION(cqv, tag(101), 1); -- cq_verify(cqv); -- -- memset(ops, 0, sizeof(ops)); -- // Server: send large initial metadata -- op = ops; -- op->op = GRPC_OP_SEND_INITIAL_METADATA; -- op->data.send_initial_metadata.count = 1; -- op->data.send_initial_metadata.metadata = &meta; -- op->flags = 0; -- op->reserved = nullptr; -- op++; -- op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; -- op->data.recv_close_on_server.cancelled = &was_cancelled; -- op->flags = 0; -- op->reserved = nullptr; -- op++; -- op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; -- op->data.send_status_from_server.trailing_metadata_count = 0; -- op->data.send_status_from_server.status = GRPC_STATUS_OK; -- grpc_slice status_details = grpc_slice_from_static_string("xyz"); -- op->data.send_status_from_server.status_details = &status_details; -- op->flags = 0; -- op->reserved = nullptr; -- op++; -- error = grpc_call_start_batch(s, ops, static_cast(op - ops), tag(102), -- nullptr); -- GPR_ASSERT(GRPC_CALL_OK == error); -- CQ_EXPECT_COMPLETION(cqv, tag(102), 1); -- CQ_EXPECT_COMPLETION(cqv, tag(1), 1); -- cq_verify(cqv); -- -- GPR_ASSERT(status == GRPC_STATUS_RESOURCE_EXHAUSTED); -- GPR_ASSERT(0 == grpc_slice_str_cmp( -- details, "received initial metadata size exceeds limit")); -- GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/foo")); -- -- grpc_slice_unref(details); -- grpc_metadata_array_destroy(&initial_metadata_recv); -- grpc_metadata_array_destroy(&trailing_metadata_recv); -- grpc_metadata_array_destroy(&request_metadata_recv); -- grpc_call_details_destroy(&call_details); -- -- grpc_call_unref(c); -- grpc_call_unref(s); - -+ for (int i = 0; i < 10; i++) { -+ grpc_call* c; -+ grpc_call* s; -+ grpc_metadata meta; -+ const size_t large_size = 64 * 1024; -+ grpc_op ops[6]; -+ grpc_op* op; -+ grpc_metadata_array initial_metadata_recv; -+ grpc_metadata_array trailing_metadata_recv; -+ grpc_metadata_array request_metadata_recv; -+ grpc_call_details call_details; -+ grpc_status_code status; -+ grpc_call_error error; -+ grpc_slice details; -+ int was_cancelled = 2; -+ -+ gpr_timespec deadline = five_seconds_from_now(); -+ c = grpc_channel_create_call(f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, -+ f.cq, grpc_slice_from_static_string("/foo"), -+ nullptr, deadline, nullptr); -+ GPR_ASSERT(c); -+ -+ meta.key = grpc_slice_from_static_string("key"); -+ meta.value = grpc_slice_malloc(large_size); -+ memset(GRPC_SLICE_START_PTR(meta.value), 'a', large_size); -+ -+ grpc_metadata_array_init(&initial_metadata_recv); -+ grpc_metadata_array_init(&trailing_metadata_recv); -+ grpc_metadata_array_init(&request_metadata_recv); -+ grpc_call_details_init(&call_details); -+ -+ memset(ops, 0, sizeof(ops)); -+ // Client: send request. -+ op = ops; -+ op->op = GRPC_OP_SEND_INITIAL_METADATA; -+ op->data.send_initial_metadata.count = 0; -+ op->flags = 0; -+ op->reserved = nullptr; -+ op++; -+ op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; -+ op->flags = 0; -+ op->reserved = nullptr; -+ op++; -+ op->op = GRPC_OP_RECV_INITIAL_METADATA; -+ op->data.recv_initial_metadata.recv_initial_metadata = -+ &initial_metadata_recv; -+ op->flags = 0; -+ op->reserved = nullptr; -+ op++; -+ op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; -+ op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; -+ op->data.recv_status_on_client.status = &status; -+ op->data.recv_status_on_client.status_details = &details; -+ op->flags = 0; -+ op->reserved = nullptr; -+ op++; -+ error = grpc_call_start_batch(c, ops, static_cast(op - ops), tag(1), -+ nullptr); -+ GPR_ASSERT(GRPC_CALL_OK == error); -+ -+ error = -+ grpc_server_request_call(f.server, &s, &call_details, -+ &request_metadata_recv, f.cq, f.cq, tag(101)); -+ GPR_ASSERT(GRPC_CALL_OK == error); -+ -+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1); -+ cq_verify(cqv); -+ -+ memset(ops, 0, sizeof(ops)); -+ // Server: send large initial metadata -+ op = ops; -+ op->op = GRPC_OP_SEND_INITIAL_METADATA; -+ op->data.send_initial_metadata.count = 1; -+ op->data.send_initial_metadata.metadata = &meta; -+ op->flags = 0; -+ op->reserved = nullptr; -+ op++; -+ op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; -+ op->data.recv_close_on_server.cancelled = &was_cancelled; -+ op->flags = 0; -+ op->reserved = nullptr; -+ op++; -+ op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; -+ op->data.send_status_from_server.trailing_metadata_count = 0; -+ op->data.send_status_from_server.status = GRPC_STATUS_OK; -+ grpc_slice status_details = grpc_slice_from_static_string("xyz"); -+ op->data.send_status_from_server.status_details = &status_details; -+ op->flags = 0; -+ op->reserved = nullptr; -+ op++; -+ error = grpc_call_start_batch(s, ops, static_cast(op - ops), -+ tag(102), nullptr); -+ GPR_ASSERT(GRPC_CALL_OK == error); -+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1); -+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1); -+ cq_verify(cqv); -+ -+ GPR_ASSERT(status == GRPC_STATUS_RESOURCE_EXHAUSTED); -+ const char* expected_error = "received initial metadata size exceeds limit"; -+ grpc_slice actual_error = -+ grpc_slice_split_head(&details, strlen(expected_error)); -+ GPR_ASSERT(0 == grpc_slice_str_cmp(actual_error, expected_error)); -+ GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/foo")); -+ -+ grpc_slice_unref(actual_error); -+ grpc_slice_unref(details); -+ grpc_metadata_array_destroy(&initial_metadata_recv); -+ grpc_metadata_array_destroy(&trailing_metadata_recv); -+ grpc_metadata_array_destroy(&request_metadata_recv); -+ grpc_call_details_destroy(&call_details); -+ -+ grpc_call_unref(c); -+ grpc_call_unref(s); -+ -+ grpc_slice_unref(meta.value); -+ } - cq_verifier_destroy(cqv); - -- grpc_slice_unref(meta.value); -- - end_test(&f); - config.tear_down_data(&f); - } -diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json -index 9f21710575..0cf8b37e76 100644 ---- a/tools/run_tests/generated/tests.json -+++ b/tools/run_tests/generated/tests.json -@@ -5087,30 +5087,6 @@ - ], - "uses_polling": false - }, -- { -- "args": [], -- "benchmark": false, -- "ci_platforms": [ -- "linux", -- "mac", -- "posix", -- "windows" -- ], -- "cpu_cost": 1.0, -- "exclude_configs": [], -- "exclude_iomgrs": [], -- "flaky": false, -- "gtest": true, -- "language": "c++", -- "name": "large_metadata_bad_client_test", -- "platforms": [ -- "linux", -- "mac", -- "posix", -- "windows" -- ], -- "uses_polling": true -- }, - { - "args": [], - "benchmark": false, --- -2.41.0 - diff --git a/31671.patch b/31671.patch deleted file mode 100644 index 1d85e39..0000000 --- a/31671.patch +++ /dev/null @@ -1,28 +0,0 @@ -From beb3d7c392c22517c5a91e2f13558bee379abb2a Mon Sep 17 00:00:00 2001 -From: "Benjamin A. Beasley" -Date: Wed, 16 Nov 2022 09:00:21 -0500 -Subject: [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. ---- - cmake/pkg-config-template.pc.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/cmake/pkg-config-template.pc.in b/cmake/pkg-config-template.pc.in -index d56154bb3a53..5a56b4f88530 100644 ---- a/cmake/pkg-config-template.pc.in -+++ b/cmake/pkg-config-template.pc.in -@@ -1,7 +1,7 @@ - prefix=@CMAKE_INSTALL_PREFIX@ - exec_prefix=${prefix} --includedir=${prefix}/include --libdir=${exec_prefix}/lib -+includedir=${prefix}/@gRPC_INSTALL_INCLUDEDIR@ -+libdir=${exec_prefix}/@gRPC_INSTALL_LIBDIR@ - - Name: @PC_NAME@ - Description: @PC_DESCRIPTION@ diff --git a/grpc-1.37.0-grpc_cli-do-not-link-gtest-gmock.patch b/grpc-1.37.0-grpc_cli-do-not-link-gtest-gmock.patch deleted file mode 100644 index 70b0abc..0000000 --- a/grpc-1.37.0-grpc_cli-do-not-link-gtest-gmock.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff -Naur grpc-1.37.1-original/CMakeLists.txt grpc-1.37.1/CMakeLists.txt ---- grpc-1.37.1-original/CMakeLists.txt 2021-04-27 18:01:25.000000000 -0400 -+++ grpc-1.37.1/CMakeLists.txt 2021-05-04 11:00:04.934427672 -0400 -@@ -3294,10 +3294,6 @@ - ${_gRPC_UPB_INCLUDE_DIR} - ${_gRPC_XXHASH_INCLUDE_DIR} - ${_gRPC_ZLIB_INCLUDE_DIR} -- third_party/googletest/googletest/include -- third_party/googletest/googletest -- third_party/googletest/googlemock/include -- third_party/googletest/googlemock - ${_gRPC_PROTO_GENS_DIR} - ) - target_link_libraries(grpc++_test_config -@@ -10669,7 +10665,6 @@ - - - endif() --if(gRPC_BUILD_TESTS) - - add_executable(grpc_cli - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.pb.cc -@@ -10683,8 +10678,6 @@ - test/cpp/util/proto_file_parser.cc - test/cpp/util/proto_reflection_descriptor_database.cc - test/cpp/util/service_describer.cc -- third_party/googletest/googletest/src/gtest-all.cc -- third_party/googletest/googlemock/src/gmock-all.cc - ) - - target_include_directories(grpc_cli -@@ -10699,10 +10692,6 @@ - ${_gRPC_UPB_INCLUDE_DIR} - ${_gRPC_XXHASH_INCLUDE_DIR} - ${_gRPC_ZLIB_INCLUDE_DIR} -- third_party/googletest/googletest/include -- third_party/googletest/googletest -- third_party/googletest/googlemock/include -- third_party/googletest/googlemock - ${_gRPC_PROTO_GENS_DIR} - ) - -@@ -10715,7 +10704,6 @@ - ) - - --endif() - if(gRPC_BUILD_CODEGEN AND gRPC_BUILD_GRPC_CPP_PLUGIN) - - add_executable(grpc_cpp_plugin diff --git a/grpc-1.39.0-system-crypto-policies.patch b/grpc-1.39.0-system-crypto-policies.patch deleted file mode 100644 index f6db782..0000000 --- a/grpc-1.39.0-system-crypto-policies.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -Naur grpc-1.39.0-original/src/objective-c/tests/CronetTests/CronetUnitTests.mm grpc-1.39.0/src/objective-c/tests/CronetTests/CronetUnitTests.mm ---- grpc-1.39.0-original/src/objective-c/tests/CronetTests/CronetUnitTests.mm 2021-07-20 18:39:39.000000000 -0400 -+++ grpc-1.39.0/src/objective-c/tests/CronetTests/CronetUnitTests.mm 2021-07-23 14:42:11.649278304 -0400 -@@ -103,7 +103,7 @@ - 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 -Naur grpc-1.39.0-original/test/core/handshake/client_ssl.cc grpc-1.39.0/test/core/handshake/client_ssl.cc ---- grpc-1.39.0-original/test/core/handshake/client_ssl.cc 2021-07-20 18:39:39.000000000 -0400 -+++ grpc-1.39.0/test/core/handshake/client_ssl.cc 2021-07-23 14:41:27.549570232 -0400 -@@ -220,9 +220,7 @@ - - // 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); - gpr_log(GPR_ERROR, "Couldn't set server cipher list."); -diff -Naur grpc-1.39.0-original/test/core/handshake/server_ssl_common.cc grpc-1.39.0/test/core/handshake/server_ssl_common.cc ---- grpc-1.39.0-original/test/core/handshake/server_ssl_common.cc 2021-07-20 18:39:39.000000000 -0400 -+++ grpc-1.39.0/test/core/handshake/server_ssl_common.cc 2021-07-23 14:41:14.369657480 -0400 -@@ -204,9 +204,7 @@ - - // 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); - gpr_log(GPR_ERROR, "Couldn't set server cipher list."); diff --git a/grpc-1.48.0-python-grpcio_tests-DynamicStubTest-hang.patch b/grpc-1.48.0-python-grpcio_tests-DynamicStubTest-hang.patch deleted file mode 100644 index beae2e4..0000000 --- a/grpc-1.48.0-python-grpcio_tests-DynamicStubTest-hang.patch +++ /dev/null @@ -1,11 +0,0 @@ -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): diff --git a/grpc-1.48.4-find_module.patch b/grpc-1.48.4-find_module.patch deleted file mode 100644 index f925d54..0000000 --- a/grpc-1.48.4-find_module.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 01d7101b39dd9049ae3cb9c30195b42ed9c76579 Mon Sep 17 00:00:00 2001 -From: "Benjamin A. Beasley" -Date: Tue, 20 Jun 2023 11:36:40 -0400 -Subject: [PATCH 1/2] Do not use importlib find_module API - -This API was removed in Python 3.12 -(https://github.com/python/cpython/issues/98040). - -Fixes Python 3.12 support in grpcio tests. ---- - src/python/grpcio_tests/tests/_loader.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/python/grpcio_tests/tests/_loader.py b/src/python/grpcio_tests/tests/_loader.py -index 80c107aa8e..c497a9aabd 100644 ---- a/src/python/grpcio_tests/tests/_loader.py -+++ b/src/python/grpcio_tests/tests/_loader.py -@@ -71,7 +71,9 @@ class Loader(object): - """ - for importer, module_name, is_package in ( - pkgutil.walk_packages(package_paths)): -- module = importer.find_module(module_name).load_module(module_name) -+ spec = importer.find_spec(module_name) -+ module = importlib.util.module_from_spec(spec) -+ spec.loader.exec_module(module) - self.visit_module(module) - - def visit_module(self, module): --- -2.40.1 - - -From a7191f6781674340740896d5a284ab856e596b2e Mon Sep 17 00:00:00 2001 -From: "Benjamin A. Beasley" -Date: Tue, 20 Jun 2023 12:38:23 -0400 -Subject: [PATCH 2/2] More importlib find_module migration - -Do not use importlib find_module API in bazel/_gevent_test_main.py - -This API was removed in Python 3.12 -(https://github.com/python/cpython/issues/98040). ---- - bazel/_gevent_test_main.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/bazel/_gevent_test_main.py b/bazel/_gevent_test_main.py -index f7936daaf0..bec31a911b 100644 ---- a/bazel/_gevent_test_main.py -+++ b/bazel/_gevent_test_main.py -@@ -42,6 +42,7 @@ import unittest - import sys - import os - import pkgutil -+import importlib - - def trace_callback(event, args): - if event in ("switch", "throw"): -@@ -73,7 +74,9 @@ class SingleLoader(object): - tests = [] - for importer, module_name, is_package in pkgutil.walk_packages([os.path.dirname(os.path.relpath(__file__))]): - if pattern in module_name: -- module = importer.find_module(module_name).load_module(module_name) -+ spec = importer.find_spec(module_name) -+ module = importlib.util.module_from_spec(spec) -+ spec.loader.exec_module(module) - tests.append(loader.loadTestsFromModule(module)) - if len(tests) != 1: - raise AssertionError("Expected only 1 test module. Found {}".format(tests)) --- -2.40.1 - diff --git a/grpc-1.56.1-Do-not-link-gtest-gmock-from-grpc_cli.patch b/grpc-1.56.1-Do-not-link-gtest-gmock-from-grpc_cli.patch new file mode 100644 index 0000000..f177486 --- /dev/null +++ b/grpc-1.56.1-Do-not-link-gtest-gmock-from-grpc_cli.patch @@ -0,0 +1,63 @@ +From dadacdf2a013c6dadd0c4115679cf178ed53928b Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Fri, 14 Jul 2023 01:29:53 -0400 +Subject: [PATCH] Do not link gtest/gmock from grpc_cli + +--- + CMakeLists.txt | 12 ------------ + 1 file changed, 12 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 768ee229a5..37aa351066 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3867,10 +3867,6 @@ target_include_directories(grpc++_test_config + ${_gRPC_UPB_INCLUDE_DIR} + ${_gRPC_XXHASH_INCLUDE_DIR} + ${_gRPC_ZLIB_INCLUDE_DIR} +- third_party/googletest/googletest/include +- third_party/googletest/googletest +- third_party/googletest/googlemock/include +- third_party/googletest/googlemock + ${_gRPC_PROTO_GENS_DIR} + ) + target_link_libraries(grpc++_test_config +@@ -12265,7 +12261,6 @@ target_link_libraries(grpc_byte_buffer_reader_test + + + endif() +-if(gRPC_BUILD_TESTS) + + add_executable(grpc_cli + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.pb.cc +@@ -12279,8 +12274,6 @@ add_executable(grpc_cli + test/cpp/util/proto_file_parser.cc + test/cpp/util/proto_reflection_descriptor_database.cc + test/cpp/util/service_describer.cc +- third_party/googletest/googletest/src/gtest-all.cc +- third_party/googletest/googlemock/src/gmock-all.cc + ) + target_compile_features(grpc_cli PUBLIC cxx_std_14) + target_include_directories(grpc_cli +@@ -12295,10 +12288,6 @@ target_include_directories(grpc_cli + ${_gRPC_UPB_INCLUDE_DIR} + ${_gRPC_XXHASH_INCLUDE_DIR} + ${_gRPC_ZLIB_INCLUDE_DIR} +- third_party/googletest/googletest/include +- third_party/googletest/googletest +- third_party/googletest/googlemock/include +- third_party/googletest/googlemock + ${_gRPC_PROTO_GENS_DIR} + ) + +@@ -12312,7 +12301,6 @@ target_link_libraries(grpc_cli + ) + + +-endif() + if(gRPC_BUILD_TESTS) + + add_executable(grpc_completion_queue_test +-- +2.41.0 + diff --git a/grpc-1.56.1-Skip-hanging-DynamicStubTest.patch b/grpc-1.56.1-Skip-hanging-DynamicStubTest.patch new file mode 100644 index 0000000..bd94aa2 --- /dev/null +++ b/grpc-1.56.1-Skip-hanging-DynamicStubTest.patch @@ -0,0 +1,24 @@ +From b362db140235c65ef7ac7a6e70899cc68a9e1fab Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +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 +@@ -126,6 +126,7 @@ def _test_grpc_tools_unimportable(): + # when they do not come from the "__main__" module, so this test passes + # if run directly on Windows, but not if started by the test runner. + @unittest.skipIf(os.name == "nt", "Windows multiprocessing unsupported") ++@unittest.skip("Tests hang; possibly related to upstream issue #25368?") + class DynamicStubTest(unittest.TestCase): + + def test_sunny_day(self): +-- +2.41.0 + diff --git a/grpc-1.56.1-Use-the-system-OpenSSL-profile.patch b/grpc-1.56.1-Use-the-system-OpenSSL-profile.patch new file mode 100644 index 0000000..fd3a9e4 --- /dev/null +++ b/grpc-1.56.1-Use-the-system-OpenSSL-profile.patch @@ -0,0 +1,58 @@ +From b9a86a453bb84c5dc63d3f6ef6c926924f0962c4 Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +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."); +-- +2.41.0 + diff --git a/grpc-1.56.2-find_module.patch b/grpc-1.56.2-find_module.patch new file mode 100644 index 0000000..5eb1ee0 --- /dev/null +++ b/grpc-1.56.2-find_module.patch @@ -0,0 +1,76 @@ +From 01df4bd0a756577a3ca1d8e33bcaf8670c8358ba Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Tue, 20 Jun 2023 11:36:40 -0400 +Subject: [PATCH 1/2] Do not use importlib find_module API + +This API was removed in Python 3.12 +(https://github.com/python/cpython/issues/98040). + +Fixes Python 3.12 support in grpcio tests. +--- + src/python/grpcio_tests/tests/_loader.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/python/grpcio_tests/tests/_loader.py b/src/python/grpcio_tests/tests/_loader.py +index ef5cfaee36..5713bec5bd 100644 +--- a/src/python/grpcio_tests/tests/_loader.py ++++ b/src/python/grpcio_tests/tests/_loader.py +@@ -100,12 +100,13 @@ class Loader(object): + _relativize_to_sys_path(package_path)) + for importer, module_name, is_package in (pkgutil.walk_packages( + [package_path], prefix)): +- found_module = importer.find_module(module_name) + module = None + if module_name in sys.modules: + module = sys.modules[module_name] + else: +- module = found_module.load_module(module_name) ++ spec = importer.find_spec(module_name) ++ module = importlib.util.module_from_spec(spec) ++ spec.loader.exec_module(module) + self.visit_module(module) + + def visit_module(self, module): +-- +2.41.0 + + +From 77682caefff14530ff3d8e494261ab8a0d04ce7c Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Tue, 20 Jun 2023 12:38:23 -0400 +Subject: [PATCH 2/2] More importlib find_module migration + +Do not use importlib find_module API in bazel/_gevent_test_main.py + +This API was removed in Python 3.12 +(https://github.com/python/cpython/issues/98040). +--- + bazel/_gevent_test_main.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/bazel/_gevent_test_main.py b/bazel/_gevent_test_main.py +index f7936daaf0..bec31a911b 100644 +--- a/bazel/_gevent_test_main.py ++++ b/bazel/_gevent_test_main.py +@@ -42,6 +42,7 @@ import unittest + import sys + import os + import pkgutil ++import importlib + + def trace_callback(event, args): + if event in ("switch", "throw"): +@@ -73,7 +74,9 @@ class SingleLoader(object): + tests = [] + for importer, module_name, is_package in pkgutil.walk_packages([os.path.dirname(os.path.relpath(__file__))]): + if pattern in module_name: +- module = importer.find_module(module_name).load_module(module_name) ++ spec = importer.find_spec(module_name) ++ module = importlib.util.module_from_spec(spec) ++ spec.loader.exec_module(module) + tests.append(loader.loadTestsFromModule(module)) + if len(tests) != 1: + raise AssertionError("Expected only 1 test module. Found {}".format(tests)) +-- +2.41.0 + diff --git a/grpc.spec b/grpc.spec index 0c39ec6..cd03778 100644 --- a/grpc.spec +++ b/grpc.spec @@ -11,8 +11,8 @@ # We take measures to verify this in %%check. As long as we are using our own # copy, we use the exact same version as upstream. %global gtest_url https://github.com/google/googletest -%global gtest_dir googletest-%{gtest_commit} %global gtest_commit 0e402173c97aea7a00749e825b194bfede4f2e45 +%global gtest_dir googletest-%{gtest_commit} #global gtest_version 1.11.0 #global gtest_dir googletest-release-#{gtest_version} %bcond system_gtest 0 @@ -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 68d4315167352ffac71f149a43b8088397d3f33d %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} @@ -68,7 +68,9 @@ %bcond core_tests 1 # A great many of these tests (over 20%) fail. Any help in understanding these -# well enough to fix them or report them upstream is welcome. +# well enough to fix them or report them upstream is welcome. The failures are +# all of the form: +# RuntimeError: Event loop is closed %bcond python_aio_tests 0 %ifnarch s390x @@ -116,19 +118,19 @@ # documentation. Instead, we have just dropped all documentation. Name: grpc -Version: 1.48.4 +Version: 1.56.2 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 33 # 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.56 # The entire source is Apache-2.0 except the following: # @@ -140,15 +142,14 @@ Summary: RPC library and framework # * 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 +213,8 @@ BuildRequires: pkgconfig(zlib) BuildRequires: cmake(gflags) BuildRequires: pkgconfig(protobuf) BuildRequires: protobuf-compiler +# https://src.fedoraproject.org/rpms/protobuf/pull-request/25#comment-149926 +BuildRequires: pkgconfig(protobuf-lite) BuildRequires: pkgconfig(re2) BuildRequires: pkgconfig(openssl) BuildRequires: cmake(c-ares) @@ -219,6 +222,7 @@ BuildRequires: abseil-cpp-devel # 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) @@ -276,15 +280,6 @@ BuildRequires: python3dist(six) >= 1.10 # https://github.com/cython/cython/issues/5305 BuildRequires: ((python3dist(cython) > 0.23) with (python3dist(cython) < 3~~)) -# 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: @@ -292,8 +287,9 @@ BuildRequires: ((python3dist(cython) > 0.23) with (python3dist(cython) < 3~~)) # 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 @@ -302,7 +298,10 @@ BuildRequires: python3dist(googleapis-common-protos) >= 1.5.5 # 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 @@ -342,8 +341,8 @@ BuildRequires: hardlink # is not suitable for upstream. # 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 +# In fact, this may not truly be needed, since only testing code is patched. +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. @@ -360,7 +359,7 @@ Patch: grpc-1.48.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. @@ -382,21 +381,7 @@ Patch: grpc-1.46.3-ChannelzServicerTest-python3.11-regressions.patch # [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 +Patch: grpc-1.56.1-Skip-hanging-DynamicStubTest.patch # [Test] Use ssl.SSLContext.wrap_socket, not ssl.wrap_socket # # The latter emits a DeprecationWarning since Python 3.10 and is removed @@ -409,26 +394,8 @@ 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 - -# [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 +# Backported to 1.56.2. +Patch: grpc-1.56.2-find_module.patch Requires: grpc-data = %{version}-%{release} @@ -445,7 +412,10 @@ Requires: grpc-data = %{version}-%{release} # 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 @@ -460,26 +430,12 @@ Provides: bundled(utf8_range) # 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. @@ -491,9 +447,10 @@ BuildArch: noarch 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 @@ -511,30 +468,11 @@ Provides: python-grpcio-reflection-doc = %{version}-%{release} 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 @@ -544,11 +482,12 @@ Summary: C++ language bindings for gRPC 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 @@ -559,11 +498,13 @@ Requires: grpc%{?_isa} = %{version}-%{release} 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 @@ -573,10 +514,11 @@ Summary: Command-line tool for gRPC 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,8 +556,10 @@ Requires: cmake(c-ares) # grpc.pc has -lz Requires: pkgconfig(zlib) -%description devel -Development headers and files for gRPC libraries (both C and C++). +%description devel %{common_description} + +This package provides development headers and files for gRPC libraries (both C +and C++). %package -n python3-grpcio @@ -628,7 +572,7 @@ Summary: Python language bindings for gRPC # 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), @@ -647,8 +591,10 @@ Obsoletes: python3-grpcio-csds < 1.48.4-7 # 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 @@ -659,14 +605,15 @@ Python language bindings for gRPC (HTTP/2-based RPC framework). 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 @@ -678,9 +625,7 @@ BuildArch: noarch # 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. @@ -694,11 +639,9 @@ BuildArch: noarch # 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 @@ -710,11 +653,9 @@ BuildArch: noarch # 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 -============================== +%description -n python3-grpcio-reflection %{common_description} -Reference package for reflection in GRPC Python. +This is the reference package for reflection in gRPC Python. %package -n python3-grpcio-status @@ -726,11 +667,9 @@ BuildArch: noarch # 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 @@ -742,33 +681,41 @@ BuildArch: noarch # 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} @@ -889,6 +836,35 @@ sed -r -i 's/(std=c\+\+)14/\1%{cpp_std}/g' \ 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 + %build # ~~~~ C (core) and C++ (cpp) ~~~~ @@ -1437,25 +1413,97 @@ goaway_server grpc_tool %endif -%ifarch s390x +%ifarch x86_64 ppc64le aarch64 s390x +# Unexplained +# +# [ RUN ] H2SslCert/H2SslCertTest.SimpleRequestBodyUseEngine/0 +# E0717 03:35:01.229978927 133003 ssl_transport_security.cc:604] Cannot find engine +# E0717 03:35:01.230006528 133003 ssl_transport_security.cc:780] Invalid private key. +# E0717 03:35:01.230027347 133003 ssl_security_connector.cc:271] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. +# E0717 03:35:01.230134489 133003 chttp2_server.cc:1060] UNKNOWN:Unable to create secure server with credentials of type Ssl {file:"/builddir/build/BUILD/grpc-1.56.2/src/core/ext/transport/chttp2/server/chttp2_server.cc", file_line:1047, created_time:"2023-07-17T03:35:01.230047595+00:00"} +# E0717 03:35:01.230141903 133003 secure_fixture.h:58] ASSERTION FAILED: grpc_server_add_http2_port(server, localaddr_.c_str(), creds) +# *** SIGABRT received at time=1689564901 on cpu 1 *** +# PC: @ 0x7fe778a74824 (unknown) __pthread_kill_implementation +# @ 0x7fe77890d7b0 80 (unknown) +# @ 0x7fe778a229a0 (unknown) (unknown) +# @ 0x7fe778a228ee 32 gsignal +# @ 0x7fe778a0a8ff 192 abort +# @ 0x7fe779008ffc 96 grpc_core::Crash() +# @ 0x7fe779006bd4 192 gpr_assertion_failed +# @ 0x55cc5b095d77 896 grpc::testing::simple_request_body() +# @ 0x55cc5b0d7597 96 testing::internal::HandleExceptionsInMethodIfSupported<>() +# @ 0x55cc5b0b96b7 32 testing::Test::Run() +# @ 0x55cc5b0b98fd 64 testing::TestInfo::Run() +# @ 0x55cc5b0b9a82 80 testing::TestSuite::Run() +# @ 0x55cc5b0cd66f 208 testing::internal::UnitTestImpl::RunAllTests() +# @ 0x55cc5b0d7c7f 96 testing::internal::HandleExceptionsInMethodIfSupported<>() +# @ 0x55cc5b0b9ce5 112 testing::UnitTest::Run() +# @ 0x55cc5b089694 480 main +# @ 0x7fe778a0c14a 160 __libc_start_call_main +# @ 0x7fe778a0c20b 96 __libc_start_main@GLIBC_2.2.5 +# @ 0x55cc5b08a7a5 (unknown) _start +# +# Confirmed in 1.56.2 2022-09-14 +h2_ssl_cert +%endif + +%ifarch x86_64 aarch64 ppc64le # 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) +# [ RUN ] FrameProtectorUtil/FlowTest.ClientMessageToServerCanBeProtectedAndUnprotectedSuccessfully/0 +# /builddir/build/BUILD/grpc-1.56.2/test/core/tsi/ssl_transport_security_utils_test.cc:255: Failure +# Expected equality of these values: +# DoHandshake(&client_ssl, &server_ssl) +# Which is: INTERNAL: Server error:1 +# absl::OkStatus() +# Which is: OK +# *** SIGSEGV received at time=1689606437 on cpu 8 *** +# PC: @ 0x21 (unknown) (unknown) +# @ 0x7f5c16e8d7b0 80 (unknown) +# @ 0x7f5c1583e9a0 (unknown) (unknown) +# @ 0x55616f1f5a59 32 grpc_core::testing::FlowTest::TearDown() +# @ 0x55616f238a17 96 testing::internal::HandleExceptionsInMethodIfSupported<>() +# @ 0x55616f21a8ad 64 testing::TestInfo::Run() +# @ 0x55616f21aa32 80 testing::TestSuite::Run() +# @ 0x55616f22e61f 208 testing::internal::UnitTestImpl::RunAllTests() +# @ 0x55616f2390ff 96 testing::internal::HandleExceptionsInMethodIfSupported<>() +# @ 0x55616f21ac95 112 testing::UnitTest::Run() +# @ 0x55616f1f1229 80 main +# @ 0x7f5c1582814a 160 __libc_start_call_main +# @ 0x7f5c1582820b 96 __libc_start_main@GLIBC_2.2.5 +# @ 0x55616f1f1b05 (unknown) _start +# +# Confirmed in 1.56.2 2022-09-17 +ssl_credentials +%endif + +%ifarch x86_64 aarch64 ppc64le s390x +# Unexplained: # -# Confirmed in 1.48.1 2022-09-14 -murmur_hash +# /builddir/build/BUILD/grpc-1.56.2/test/core/tsi/ssl_transport_security_utils_test.cc:255: Failure +# Expected equality of these values: +# DoHandshake(&client_ssl, &server_ssl) +# Which is: INTERNAL: Server error:1 +# absl::OkStatus() +# Which is: OK +# *** SIGSEGV received at time=1689602265 on cpu 8 *** +# PC: @ 0x21 (unknown) (unknown) +# @ 0x7f3d9d4917b0 80 (unknown) +# @ 0x7f3d9be3e9a0 (unknown) (unknown) +# @ 0x56285faf2a59 32 grpc_core::testing::FlowTest::TearDown() +# @ 0x56285fb35a17 96 testing::internal::HandleExceptionsInMethodIfSupported<>() +# @ 0x56285fb178ad 64 testing::TestInfo::Run() +# @ 0x56285fb17a32 80 testing::TestSuite::Run() +# @ 0x56285fb2b61f 208 testing::internal::UnitTestImpl::RunAllTests() +# @ 0x56285fb360ff 96 testing::internal::HandleExceptionsInMethodIfSupported<>() +# @ 0x56285fb17c95 112 testing::UnitTest::Run() +# @ 0x56285faee229 80 main +# @ 0x7f3d9be2814a 160 __libc_start_call_main +# @ 0x7f3d9be2820b 96 __libc_start_main@GLIBC_2.2.5 +# @ 0x56285faeeb05 (unknown) _start +# +# Confirmed in 1.56.2 2022-09-17 +ssl_transport_security_utils %endif %ifarch x86_64 aarch64 @@ -1537,6 +1585,22 @@ test_core_security_credentials tls_key_export %endif +%ifarch s390x +# 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(1) +# Which is: 1 +# [ FAILED ] BufferListTest.TestLongPendingAckForSomeTracedBuffers (0 ms) +# +# Confirmed in 1.56.2 2022-09-20 +traced_buffer_list +%endif + EOF } | xargs -r chmod -v a-x @@ -1653,6 +1717,7 @@ fi %{_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}{,.*} @@ -1678,6 +1743,7 @@ fi %{_libdir}/libaddress_sorting.so %{_libdir}/libgpr.so %{_libdir}/libgrpc.so +%{_libdir}/libgrpc_authorization_provider.so %{_libdir}/libgrpc_unsecure.so %{_libdir}/libupb.so %{_includedir}/grpc/ diff --git a/sources b/sources index ed8038e..6557776 100644 --- a/sources +++ b/sources @@ -1,6 +1,6 @@ -SHA512 (grpc-1.48.4.tar.gz) = 6eaed258e50ecc98f85ac83927b7feaecd0734b481dac6b0468a4f938af24fa08a7ca40e5548bf7bff6b3246fb25e74dee6ca97103dfd5ca8f41978d3448233a +SHA512 (grpc-1.56.2.tar.gz) = bb4be3b8a128566581b7ea69d1faa6d08a28624656c2f4afdd8bb8fa804e362b7d8f2bb6c52789081b48f299ddffe18e1795c8dce9b9bc304a5e6d3a4274b11e SHA512 (googletest-0e402173c97aea7a00749e825b194bfede4f2e45.tar.gz) = 5c5eaf6ff9f3c1bca025b7ef0234ba97232ba85b43e6354a92f49b7208f5c47581ebaf18bf58618498e5d264f2620c2b6676e81bb0f7df77112b96ba271ececf -SHA512 (data-plane-api-9c42588c956220b48eb3099d186487c2f04d32ec.tar.gz) = 9b1ceff5d018e70b36e02aa1b583f5495b0eb92506055bf6913d2e7ef401d3602cba8723efbc178ee31fdef9aba510fc2284612ebe22a24b5b4a703f07099897 +SHA512 (data-plane-api-68d4315167352ffac71f149a43b8088397d3f33d.tar.gz) = fb6c7f0bd9747731f2fafaaba5bad98f424a9d996a5238da11b5ce5109a3fa8c2bd29338d56698f2c9518a27608182c21d8d59fddebe8723565689ca41575789 SHA512 (googleapis-2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz) = cdeefae807df7097174b4bb28c0900b06a68d424c00ebba4ff5add260c9c651351d5e429bfc5de42f95ebb75dadec313f7bd3991c2fa476c9104f9ea656acad4 SHA512 (opencensus-proto-0.3.0.tar.gz) = 39231a495dfdccfc8267d1e6af2ac624feea611a8691c10ec570de2194b352e4a9c3b0ce1606414fb98e5d77c66873bed4a9e56512efa12b267b8a91e0c5851e -SHA512 (xds-cb28da3451f158a947dfc45090fe92b07b243bc1.tar.gz) = eb5878764503872c18b8750b20e2c2e2224e73d9601197752cea7e1e4171899474ad4f39aacc80d6c1b57a50b2161d39f219df64ffb250d045af482dae01ea79 +SHA512 (xds-e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7.tar.gz) = 7b5a61ce32ccb73a3c6459c2b6b1af45362456e6082743f2bc88152f8021797996ac82fd9220b5144ed17a5742511a5b5ecf2c85e59633f6dcf13ed66f97d7d5