From fe0a859b9776848382b680c2b08514a69807ccbe Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Aug 19 2021 20:43:13 +0000 Subject: Update to grpc 1.39.1 (close RHBZ#1993554) Drop unused patch grpc-1.37.0-importlib-abc-python3.10.patch Replace grpc-1.39.0-python-grpcio_tools-use-system-protobuf.patch with a sed expression since it required constant trivial rebasing. --- diff --git a/.gitignore b/.gitignore index 7fe800e..618bf2a 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /grpc-1.37.1.tar.gz /googletest-release-1.11.0.tar.gz /grpc-1.39.0.tar.gz +/grpc-1.39.1.tar.gz diff --git a/grpc-1.37.0-importlib-abc-python3.10.patch b/grpc-1.37.0-importlib-abc-python3.10.patch deleted file mode 100644 index 37c5da7..0000000 --- a/grpc-1.37.0-importlib-abc-python3.10.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur grpc-1.37.0-original/tools/distrib/python/grpcio_tools/grpc_tools/protoc.py grpc-1.37.0/tools/distrib/python/grpcio_tools/grpc_tools/protoc.py ---- grpc-1.37.0-original/tools/distrib/python/grpcio_tools/grpc_tools/protoc.py 2021-04-06 18:48:56.000000000 -0400 -+++ grpc-1.37.0/tools/distrib/python/grpcio_tools/grpc_tools/protoc.py 2021-04-22 15:45:59.234743676 -0400 -@@ -42,6 +42,7 @@ - if sys.version_info >= (3, 5, 0): - import contextlib - import importlib -+ import importlib.abc - import importlib.machinery - import threading - diff --git a/grpc-1.39.0-python-grpcio_tools-use-system-protobuf.patch b/grpc-1.39.0-python-grpcio_tools-use-system-protobuf.patch deleted file mode 100644 index 6ac95b5..0000000 --- a/grpc-1.39.0-python-grpcio_tools-use-system-protobuf.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -Naur grpc-1.39.0-original/tools/distrib/python/grpcio_tools/protoc_lib_deps.py grpc-1.39.0/tools/distrib/python/grpcio_tools/protoc_lib_deps.py ---- grpc-1.39.0-original/tools/distrib/python/grpcio_tools/protoc_lib_deps.py 2021-07-20 18:39:39.000000000 -0400 -+++ grpc-1.39.0/tools/distrib/python/grpcio_tools/protoc_lib_deps.py 2021-07-23 14:46:07.887714469 -0400 -@@ -14,10 +14,9 @@ - # limitations under the License. - - # AUTO-GENERATED BY make_grpcio_tools.py! --CC_FILES=['google/protobuf/compiler/zip_writer.cc', 'google/protobuf/compiler/subprocess.cc', 'google/protobuf/compiler/ruby/ruby_generator.cc', 'google/protobuf/compiler/python/python_generator.cc', 'google/protobuf/compiler/plugin.pb.cc', 'google/protobuf/compiler/plugin.cc', 'google/protobuf/compiler/php/php_generator.cc', 'google/protobuf/compiler/objectivec/objectivec_primitive_field.cc', 'google/protobuf/compiler/objectivec/objectivec_oneof.cc', 'google/protobuf/compiler/objectivec/objectivec_message_field.cc', 'google/protobuf/compiler/objectivec/objectivec_message.cc', 'google/protobuf/compiler/objectivec/objectivec_map_field.cc', 'google/protobuf/compiler/objectivec/objectivec_helpers.cc', 'google/protobuf/compiler/objectivec/objectivec_generator.cc', 'google/protobuf/compiler/objectivec/objectivec_file.cc', 'google/protobuf/compiler/objectivec/objectivec_field.cc', 'google/protobuf/compiler/objectivec/objectivec_extension.cc', 'google/protobuf/compiler/objectivec/objectivec_enum_field.cc', 'google/protobuf/compiler/objectivec/objectivec_enum.cc', 'google/protobuf/compiler/js/well_known_types_embed.cc', 'google/protobuf/compiler/js/js_generator.cc', 'google/protobuf/compiler/java/java_string_field_lite.cc', 'google/protobuf/compiler/java/java_string_field.cc', 'google/protobuf/compiler/java/java_shared_code_generator.cc', 'google/protobuf/compiler/java/java_service.cc', 'google/protobuf/compiler/java/java_primitive_field_lite.cc', 'google/protobuf/compiler/java/java_primitive_field.cc', 'google/protobuf/compiler/java/java_name_resolver.cc', 'google/protobuf/compiler/java/java_message_lite.cc', 'google/protobuf/compiler/java/java_message_field_lite.cc', 'google/protobuf/compiler/java/java_message_field.cc', 'google/protobuf/compiler/java/java_message_builder_lite.cc', 'google/protobuf/compiler/java/java_message_builder.cc', 'google/protobuf/compiler/java/java_message.cc', 'google/protobuf/compiler/java/java_map_field_lite.cc', 'google/protobuf/compiler/java/java_map_field.cc', 'google/protobuf/compiler/java/java_helpers.cc', 'google/protobuf/compiler/java/java_generator_factory.cc', 'google/protobuf/compiler/java/java_generator.cc', 'google/protobuf/compiler/java/java_file.cc', 'google/protobuf/compiler/java/java_field.cc', 'google/protobuf/compiler/java/java_extension_lite.cc', 'google/protobuf/compiler/java/java_extension.cc', 'google/protobuf/compiler/java/java_enum_lite.cc', 'google/protobuf/compiler/java/java_enum_field_lite.cc', 'google/protobuf/compiler/java/java_enum_field.cc', 'google/protobuf/compiler/java/java_enum.cc', 'google/protobuf/compiler/java/java_doc_comment.cc', 'google/protobuf/compiler/java/java_context.cc', 'google/protobuf/compiler/csharp/csharp_wrapper_field.cc', 'google/protobuf/compiler/csharp/csharp_source_generator_base.cc', 'google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_message_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_reflection_class.cc', 'google/protobuf/compiler/csharp/csharp_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_message_field.cc', 'google/protobuf/compiler/csharp/csharp_message.cc', 'google/protobuf/compiler/csharp/csharp_map_field.cc', 'google/protobuf/compiler/csharp/csharp_helpers.cc', 'google/protobuf/compiler/csharp/csharp_generator.cc', 'google/protobuf/compiler/csharp/csharp_field_base.cc', 'google/protobuf/compiler/csharp/csharp_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_enum.cc', 'google/protobuf/compiler/csharp/csharp_doc_comment.cc', 'google/protobuf/compiler/cpp/cpp_string_field.cc', 'google/protobuf/compiler/cpp/cpp_service.cc', 'google/protobuf/compiler/cpp/cpp_primitive_field.cc', 'google/protobuf/compiler/cpp/cpp_padding_optimizer.cc', 'google/protobuf/compiler/cpp/cpp_message_field.cc', 'google/protobuf/compiler/cpp/cpp_message.cc', 'google/protobuf/compiler/cpp/cpp_map_field.cc', 'google/protobuf/compiler/cpp/cpp_helpers.cc', 'google/protobuf/compiler/cpp/cpp_generator.cc', 'google/protobuf/compiler/cpp/cpp_file.cc', 'google/protobuf/compiler/cpp/cpp_field.cc', 'google/protobuf/compiler/cpp/cpp_extension.cc', 'google/protobuf/compiler/cpp/cpp_enum_field.cc', 'google/protobuf/compiler/cpp/cpp_enum.cc', 'google/protobuf/compiler/command_line_interface.cc', 'google/protobuf/compiler/code_generator.cc', 'google/protobuf/wrappers.pb.cc', 'google/protobuf/wire_format.cc', 'google/protobuf/util/type_resolver_util.cc', 'google/protobuf/util/time_util.cc', 'google/protobuf/util/message_differencer.cc', 'google/protobuf/util/json_util.cc', 'google/protobuf/util/internal/utility.cc', 'google/protobuf/util/internal/type_info_test_helper.cc', 'google/protobuf/util/internal/type_info.cc', 'google/protobuf/util/internal/protostream_objectwriter.cc', 'google/protobuf/util/internal/protostream_objectsource.cc', 'google/protobuf/util/internal/proto_writer.cc', 'google/protobuf/util/internal/object_writer.cc', 'google/protobuf/util/internal/json_stream_parser.cc', 'google/protobuf/util/internal/json_objectwriter.cc', 'google/protobuf/util/internal/json_escaping.cc', 'google/protobuf/util/internal/field_mask_utility.cc', 'google/protobuf/util/internal/error_listener.cc', 'google/protobuf/util/internal/default_value_objectwriter.cc', 'google/protobuf/util/internal/datapiece.cc', 'google/protobuf/util/field_mask_util.cc', 'google/protobuf/util/field_comparator.cc', 'google/protobuf/util/delimited_message_util.cc', 'google/protobuf/unknown_field_set.cc', 'google/protobuf/type.pb.cc', 'google/protobuf/timestamp.pb.cc', 'google/protobuf/text_format.cc', 'google/protobuf/stubs/substitute.cc', 'google/protobuf/struct.pb.cc', 'google/protobuf/source_context.pb.cc', 'google/protobuf/service.cc', 'google/protobuf/reflection_ops.cc', 'google/protobuf/message.cc', 'google/protobuf/map_field.cc', 'google/protobuf/io/tokenizer.cc', 'google/protobuf/io/printer.cc', 'google/protobuf/io/gzip_stream.cc', 'google/protobuf/generated_message_table_driven.cc', 'google/protobuf/generated_message_reflection.cc', 'google/protobuf/field_mask.pb.cc', 'google/protobuf/extension_set_heavy.cc', 'google/protobuf/empty.pb.cc', 'google/protobuf/dynamic_message.cc', 'google/protobuf/duration.pb.cc', 'google/protobuf/descriptor_database.cc', 'google/protobuf/descriptor.pb.cc', 'google/protobuf/descriptor.cc', 'google/protobuf/compiler/parser.cc', 'google/protobuf/compiler/importer.cc', 'google/protobuf/api.pb.cc', 'google/protobuf/any.pb.cc', 'google/protobuf/any.cc', 'google/protobuf/wire_format_lite.cc', 'google/protobuf/stubs/time.cc', 'google/protobuf/stubs/strutil.cc', 'google/protobuf/stubs/structurally_valid.cc', 'google/protobuf/stubs/stringprintf.cc', 'google/protobuf/stubs/stringpiece.cc', 'google/protobuf/stubs/statusor.cc', 'google/protobuf/stubs/status.cc', 'google/protobuf/stubs/int128.cc', 'google/protobuf/stubs/common.cc', 'google/protobuf/stubs/bytestream.cc', 'google/protobuf/repeated_field.cc', 'google/protobuf/parse_context.cc', 'google/protobuf/message_lite.cc', 'google/protobuf/map.cc', 'google/protobuf/io/zero_copy_stream_impl_lite.cc', 'google/protobuf/io/zero_copy_stream_impl.cc', 'google/protobuf/io/zero_copy_stream.cc', 'google/protobuf/io/strtod.cc', 'google/protobuf/io/io_win32.cc', 'google/protobuf/io/coded_stream.cc', 'google/protobuf/implicit_weak_message.cc', 'google/protobuf/generated_message_util.cc', 'google/protobuf/generated_message_table_driven_lite.cc', 'google/protobuf/generated_enum_util.cc', 'google/protobuf/extension_set.cc', 'google/protobuf/arenastring.cc', 'google/protobuf/arena.cc', 'google/protobuf/any_lite.cc'] -+# Then, modified by hand to build with an external system protobuf installation. -+CC_FILES=[] - PROTO_FILES=['google/protobuf/wrappers.proto', 'google/protobuf/type.proto', 'google/protobuf/timestamp.proto', 'google/protobuf/struct.proto', 'google/protobuf/source_context.proto', 'google/protobuf/field_mask.proto', 'google/protobuf/empty.proto', 'google/protobuf/duration.proto', 'google/protobuf/descriptor.proto', 'google/protobuf/compiler/plugin.proto', 'google/protobuf/api.proto', 'google/protobuf/any.proto'] - --CC_INCLUDE='third_party/protobuf/src' --PROTO_INCLUDE='third_party/protobuf/src' -- --PROTOBUF_SUBMODULE_VERSION="436bd7880e458532901c58f4d9d1ea23fa7edd52" -+CC_INCLUDE='/usr/include' -+PROTO_INCLUDE='/usr/include' diff --git a/grpc.spec b/grpc.spec index c2f5d68..0053f1e 100644 --- a/grpc.spec +++ b/grpc.spec @@ -48,7 +48,7 @@ %endif Name: grpc -Version: 1.39.0 +Version: 1.39.1 Release: %autorelease Summary: RPC library and framework @@ -244,37 +244,33 @@ BuildRequires: dos2unix # # In fact, this may not be needed, since only testing code is patched. Patch0: %{name}-1.39.0-system-crypto-policies.patch -# Build python3-grpcio_tools against system protobuf packages instead of -# expecting a git submodule. Must also add requisite linker flags using -# GRPC_PYTHON_LDFLAGS. -Patch1: %{name}-1.39.0-python-grpcio_tools-use-system-protobuf.patch # Add an option GRPC_PYTHON_BUILD_SYSTEM_ABSL to go with the gRPC_ABSL_PROVIDER # option already provided upstream. See # https://github.com/grpc/grpc/issues/25559. -Patch2: %{name}-1.37.0-python-grpcio-use-system-abseil.patch +Patch1: %{name}-1.37.0-python-grpcio-use-system-abseil.patch # Fix errors like: # TypeError: super(type, obj): obj must be an instance or subtype of type # It is not clear why these occur. -Patch3: %{name}-1.36.4-python-grpcio_tests-fixture-super.patch +Patch2: %{name}-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. -Patch4: %{name}-1.36.4-python-grpcio_tests-make-network-tests-skippable.patch +Patch3: %{name}-1.36.4-python-grpcio_tests-make-network-tests-skippable.patch # A handful of compression tests miss the compression ratio threshold. It seems # to be inconsistent which particular combinations fail in a particular test # 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. -Patch5: %{name}-1.36.4-python-grpcio_tests-skip-compression-tests.patch +Patch4: %{name}-1.36.4-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…) -Patch6: %{name}-1.37.0-grpc_cli-do-not-link-gtest-gmock.patch +Patch5: %{name}-1.37.0-grpc_cli-do-not-link-gtest-gmock.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. -Patch7: %{name}-1.39.0-python_wrapper-path.patch +Patch6: %{name}-1.39.0-python_wrapper-path.patch # Port Python 2 scripts used in core tests to Python 3 -Patch8: %{name}-1.39.0-python2-test-scripts.patch +Patch7: %{name}-1.39.0-python2-test-scripts.patch Requires: %{name}-data = %{version}-%{release} @@ -580,6 +576,22 @@ Testing utilities for gRPC Python. %prep %autosetup -p1 +echo '===== Patching grpcio_tools for system protobuf =====' 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' + echo '===== Preparing gtest/gmock =====' 2>&1 %if %{without system_gtest} # Copy in the needed gtest/gmock implementations. diff --git a/sources b/sources index 271eb61..1d05736 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (grpc-1.39.0.tar.gz) = bf1095d03eb1eb8a803730702edd43a4d4a448f3f1370aff8688f8ea8fc3a8f29bb8399e6356a9a347c775129960632e0e3b883a3b82f4af41022786ff40df00 SHA512 (googletest-release-1.11.0.tar.gz) = 6fcc7827e4c4d95e3ae643dd65e6c4fc0e3d04e1778b84f6e06e390410fe3d18026c131d828d949d2f20dde6327d30ecee24dcd3ef919e21c91e010d149f3a28 +SHA512 (grpc-1.39.1.tar.gz) = 37a2e8d82a8920bbd04c03f31ec6ff506b30bd5fb7aaf4febc42633dab7429eefe0c313d2b56a962ff8be3f463f98417a474ba6ab5e99ab7ca8768e693c6bc1d