The package rpms/grpc.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/grpc.git/commit/?id=426ac1e4470ac....
Change:
+%ifarch %{arm32}
Thanks.
Full change:
============
commit 859420cde8a23a4573eeb1e46247468a79f276fb
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 22 16:57:22 2021 -0400
Remove a couple of redundant BR’s
diff --git a/grpc.spec b/grpc.spec
index 414f8a7..94402ea 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -95,8 +95,6 @@ BuildRequires: cmake(gflags)
BuildRequires: pkgconfig(protobuf)
BuildRequires: protobuf-compiler
-BuildRequires: openssl-devel
-BuildRequires: c-ares-devel
BuildRequires: pkgconfig(openssl)
BuildRequires: cmake(c-ares)
commit 119766de2890abe8a40d5210c940f3defc0e3fee
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 22 09:35:13 2021 -0400
Build the Doxygen reference manuals, and merge the python-grpcio-doc subpackage into
grpc-doc
diff --git a/grpc.spec b/grpc.spec
index b2fb087..414f8a7 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -133,6 +133,9 @@ BuildRequires: python3dist(gevent)
#
https://bugzilla.redhat.com/show_bug.cgi?id=1893533
%global _lto_cflags %{nil}
+# Reference documentation
+BuildRequires: doxygen
+
BuildRequires: ca-certificates
# For converting absolute symlinks in the buildroot to relative ones
BuildRequires: symlinks
@@ -263,8 +266,33 @@ Summary: Documentation and examples for gRPC
License: ASL 2.0
BuildArch: noarch
+Obsoletes: python-grpcio-doc < 1.26.0-13
+Provides: python-grpcio-doc = %{version}-%{release}
+Provides: python-grpcio-channelz-doc = %{version}-%{release}
+Provides: python-grpcio-health-checking-doc = %{version}-%{release}
+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.
+Documentation and examples for gRPC, including documentation for the following:
+
+ • C (core)
+ ○ API
+ ○ Internals
+ • C++
+ ○ API
+ ○ Internals
+ • Objective C
+ ○ API
+ ○ Internals
+ • Python
+ ○ grpcio
+ ○ grpcio_channelz
+ ○ grpcio_health_checking
+ ○ grpcio_reflection
+ ○ grpcio_status
+ ○ grpcio_testing
%package cpp
@@ -403,29 +431,6 @@ BuildArch: noarch
Testing utilities for gRPC Python.
-%package -n python-grpcio-doc
-License: ASL 2.0
-Summary: Documentation for Python language bindings for gRPC
-BuildArch: noarch
-
-Provides: python-grpcio-channelz-doc = %{version}-%{release}
-Provides: python-grpcio-health-checking-doc = %{version}-%{release}
-Provides: python-grpcio-reflection-doc = %{version}-%{release}
-Provides: python-grpcio-status-doc = %{version}-%{release}
-Provides: python-grpcio-testing-doc = %{version}-%{release}
-
-%description -n python-grpcio-doc
-Documentation for Python language bindings for gRPC, including the following
-packages:
-
- • grpcio
- • grpcio_channelz
- • grpcio_health_checking
- • grpcio_reflection
- • grpcio_status
- • grpcio_testing
-
-
%prep
%autosetup -p1
%if %{without cmake}
@@ -682,7 +687,11 @@ do
done
# ~~ documentation ~~
+# Doxygen (reference: C/core, C++, objc)
+./tools/doxygen/run_doxygen.sh
+# Sphinx (Python)
%{__python3} %{py_setup} %{?py_setup_args} doc
+rm -vrf doc/build/.buildinfo doc/build/.doctrees
%install
@@ -758,11 +767,9 @@ find '%{buildroot}' -type f -name 'roots.pem' |
# ~~ documentation and examples ~~
install -D -t '%{buildroot}%{_pkgdocdir}' -m 0644 -p AUTHORS *.md
-cp -rp doc examples '%{buildroot}%{_pkgdocdir}'
-
-%global pythondocdir %{_docdir}/python-grpcio
-install -d '%{buildroot}%{pythondocdir}'
-cp -rp doc/build '%{buildroot}%{pythondocdir}/html'
+cp -rp doc/ref examples '%{buildroot}%{_pkgdocdir}'
+install -d '%{buildroot}%{_pkgdocdir}/python'
+cp -rp doc/build '%{buildroot}%{_pkgdocdir}/python/html'
%check
@@ -824,10 +831,6 @@ fi
%files doc
%license LICENSE NOTICE.txt
%{_pkgdocdir}
-# Built Python documentation:
-%exclude %{_pkgdocdir}/doc/build
-# Python documentation sources:
-%exclude %{_pkgdocdir}/doc/python/sphinx
%files cpp
@@ -907,13 +910,6 @@ fi
%{python3_sitelib}/grpcio_testing-%{version}-py%{python3_version}.egg-info
-%files -n python-grpcio-doc
-%license LICENSE NOTICE.txt
-%{pythondocdir}
-%exclude %{pythondocdir}/html/.buildinfo
-%exclude %{pythondocdir}/html/.doctrees
-
-
%changelog
* Sun Mar 21 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.26.0-13
- General:
@@ -923,6 +919,7 @@ fi
* Drop explicit pkgconfig BR
* Fix the directory in which CMake installs pkgconfig files
* Improved CMake options
+ * Build the Doxygen reference manuals
- C (core) and C++ (cpp):
* Let the -devel package require cmake-filesystem
* Allow building tests with our own copy of gtest/gmock, which will become
@@ -939,7 +936,8 @@ fi
usable!
* Add %%py_provides for Fedora 32
* Drop python3dist(setuptools) BR, redundant with %%pyproject_buildrequires
- * Start running most of the tests in %%check
+ * Start running most of the Python tests in %%check
+ * Merge the python-grpcio-doc subpackage into grpc-doc
* Tue Feb 16 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.26.0-12
- C (core) and C++ (cpp):
commit 426ac1e4470ac2c219bf9ad647b293e6fd932475
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Sun Mar 21 17:53:01 2021 -0400
Start running most of the tests in %check
diff --git a/grpc.spec b/grpc.spec
index baafbe1..b2fb087 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -12,27 +12,28 @@
# The CMake build works, except grpc_cli is only built with the tests.
%bcond_with cmake
-# Note that, in this spec file,e building the tests requires using CMake.
-#
-# C/C++ tests still are not quite building correctly:
-# /usr/bin/g++ -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -std=c++11
-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
CMakeFiles/alloc_test.dir/test/core/gpr/alloc_test.cc.o -o alloc_test
-Wl,-rpath,/builddir/build/BUILD/grpc-1.26.0/x86_64-redhat-linux-gnu -ldl -lrt -lm
-lpthread libgrpc_test_util_unsecure.so.9.0.0 libgrpc_unsecure.so.9.0.0 libgpr.so.9.0.0
/usr/lib64/libz.so /usr/lib64/libcares.so.2.4.2 libaddress_sorting.so.9.0.0
libupb.so.9.0.0 -ldl -lrt -lm -lpthread && :
-# /usr/bin/ld: libgrpc_test_util_unsecure.so.9.0.0: undefined reference to
`grpc_secure_channel_create'
-# /usr/bin/ld: libgrpc_test_util_unsecure.so.9.0.0: undefined reference to
`grpc_local_credentials_create'
-# /usr/bin/ld: libgrpc_test_util_unsecure.so.9.0.0: undefined reference to
`grpc_server_credentials_release'
-# /usr/bin/ld: libgrpc_test_util_unsecure.so.9.0.0: undefined reference to
`grpc_server_credentials_set_auth_metadata_processor'
-# /usr/bin/ld: libgrpc_test_util_unsecure.so.9.0.0: undefined reference to
`grpc_channel_credentials_release'
-# /usr/bin/ld: libgrpc_test_util_unsecure.so.9.0.0: undefined reference to
`grpc_server_add_secure_http2_port'
-# /usr/bin/ld: libgrpc_test_util_unsecure.so.9.0.0: undefined reference to
`grpc_local_server_credentials_create'
-# collect2: error: ld returned 1 exit status
+# Note that, in this spec file, building the tests requires using CMake.
%bcond_with core_tests
+# A few failing Python “test_lite” tests are skipped without understanding.
+# This lets us easily re-enable them to try to work toward a fix or a useful
+# upstream bug report.
+%bcond_with unexplained_failing_python_lite_tests
+
+# 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.
+%bcond_with python_aio_tests
+
+# Several of these still fail. We should try to work toward re-enabling this.
+%bcond_with python_gevent_tests
+
Name: grpc
Version: 1.26.0
Release: 13%{?dist}
Summary: RPC library and framework
# CMakeLists.txt: gRPC_CORE_SOVERSION
-%global c_so_version 15
+%global c_so_version 9
# CMakeLists.txt: gRPC_CPP_SOVERSION
%global cpp_so_version 1
# CMakeLists.txt: gRPC_CSHARP_SOVERSION
@@ -461,8 +462,12 @@ sed -r -i
's/^([[:blank:]]*)(\$\{_gRPC_GFLAGS_LIBRARIES\})/'\
'\1\2\n\1gtest\n\1gmock/' CMakeLists.txt
%endif
-# Fix gflags CMake target name for dynamic linking:
-sed -r -i 's/\b(gflags::gflags)\b/\1_shared/g' cmake/gflags.cmake
+# Currently, the correct flags for linking against the gflags shared library
+# are silently not found. Since the gflags dependency goes away in a later
+# version of grpc, we just hack in the correct flags rather than taking the
+# time to fix it properly.
+sed -r -i 's/^([[:blank:]]*)(\$\{_gRPC_GFLAGS_LIBRARIES\})/'\
+'\1gflags_shared/' CMakeLists.txt
# Fix some of the weirdest accidentally-executable files
find . -type f -name '*.md' -perm /0111 -execdir chmod -v a-x '{}'
'+'
@@ -521,6 +526,50 @@ dos2unix \
#
https://github.com/grpc/grpc/issues/25635
sed -r -i 's|lib(/pkgconfig)|\${gRPC_INSTALL_LIBDIR}\1|' CMakeLists.txt
+%if %{without unexplained_failing_python_lite_tests}
+%ifarch %{arm32}
+# TODO figure out how to report this upstream in a useful/actionable way
+sed -r -i "s/^([[:blank:]]*)(def test_concurrent_stream_stream)\\b/\
+\\1(a)unittest.skip('May hang unexplainedly')\\n\\1\\2/" \
+ 'src/python/grpcio_tests/tests/testing/_client_test.py'
+%endif
+%if %{__isa_bits} == 32
+# These tests fail with:
+# OverflowError: Python int too large to convert to C ssize_t
+# TODO figure out how to report this upstream in a useful/actionable way
+sed -r -i \
+ "s/^([[:blank:]]*)(def test(SSLSessionCacheLRU|SessionResumption))\\b/\
+\\1(a)unittest.skip('Unexplained overflow error on 32-bit')\\n\\1\\2/" \
+ 'src/python/grpcio_tests/tests/unit/_auth_context_test.py' \
+ 'src/python/grpcio_tests/tests/unit/_session_cache_test.py'
+%endif
+
+# These will no longer be a problem on grpc 1.36:
+sed -r -i \
+ "s/^([[:blank:]]*)(class SecureServerSecureClient\(.*:)$/\
+\\1(a)unittest.skip('Unexplained hang')\\n\\1\\2/" \
+ 'src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py'
+sed -r -i \
+ "s/^([[:blank:]]*)(def test_(stream_unary|unary_stream))\\b/\
+\\1(a)unittest.skip('Unexplained hang')\\n\\1\\2/" \
+ 'src/python/grpcio_tests/tests/unit/beta/_beta_features_test.py'
+sed -r -i \
+ "s/^([[:blank:]]*)(def test(Secure(No|Client)Cert|SessionResumption))\\b/\
+\\1(a)unittest.skip('Invalid cert chain file')\\n\\1\\2/" \
+ 'src/python/grpcio_tests/tests/unit/_auth_context_test.py'
+%if %{__isa_bits} != 32
+# (otherwise this was already done above)
+sed -r -i \
+ "s/^([[:blank:]]*)(def testSSLSessionCacheLRU)\\b/\
+\\1(a)unittest.skip('Invalid cert chain file')\\n\\1\\2/" \
+ 'src/python/grpcio_tests/tests/unit/_session_cache_test.py'
+%endif
+sed -r -i \
+ "s/^([[:blank:]]*)(def test_(stream_stream|unary_unary|stub_context))\\b/\
+\\1(a)unittest.skip('Invalid cert chain file')\\n\\1\\2/" \
+ 'src/python/grpcio_tests/tests/unit/beta/_beta_features_test.py'
+%endif
+
%build
# ~~~~ C (core) and C++ (cpp) ~~~~
@@ -724,19 +773,20 @@ export FEDORA_NO_NETWORK_TESTS=1
%endif
pushd src/python/grpcio_tests
-# Currently fails with
-# ModuleNotFoundError: No module named 'grpc_channelz.v1.channelz_pb2'
-# Will look into this if it continues on the latest version.
-
-# See the implementation of the %%pytest macro, upon which our environment
-# setup is based:
-env \
- CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" \
- LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}" \
- PATH="%{buildroot}%{_bindir}:$PATH" \
-
PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}"
\
- PYTHONDONTWRITEBYTECODE=1 \
- %{__python3} %{py_setup} %{?py_setup_args} test_lite || :
+for suite in \
+ test_lite \
+ %{?with_python_aio_tests:test_aio} \
+ %{?with_python_gevent_tests:test_gevent}
+do
+ # See the implementation of the %%pytest macro, upon which our environment
+ # setup is based:
+ env CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" \
+ LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}" \
+ PATH="%{buildroot}%{_bindir}:$PATH" \
+
PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}"
\
+ PYTHONDONTWRITEBYTECODE=1 \
+ %{__python3} %{py_setup} %{?py_setup_args} "${suite}"
+done
popd
%if %{without system_gtest}
@@ -820,10 +870,6 @@ fi
%{_libdir}/lib%{name}pp_channelz.so
%{_includedir}/%{name}pp
-%if %{with cmake}
-%{_libdir}/cmake/*.cmake
-%endif
-
%files -n python3-grpcio
%license LICENSE NOTICE.txt
@@ -869,7 +915,7 @@ fi
%changelog
-* Mon Mar 15 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.26.0-13
+* Sun Mar 21 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.26.0-13
- General:
* Replace * with • in descriptions
* Use cmake() dependencies first, and pkgconfig() dependencies second, where
@@ -877,7 +923,6 @@ fi
* Drop explicit pkgconfig BR
* Fix the directory in which CMake installs pkgconfig files
* Improved CMake options
- * Fix gflags CMake target name for dynamic linking
- C (core) and C++ (cpp):
* Let the -devel package require cmake-filesystem
* Allow building tests with our own copy of gtest/gmock, which will become
@@ -894,6 +939,7 @@ fi
usable!
* Add %%py_provides for Fedora 32
* Drop python3dist(setuptools) BR, redundant with %%pyproject_buildrequires
+ * Start running most of the tests in %%check
* Tue Feb 16 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.26.0-12
- C (core) and C++ (cpp):
commit 59c4bca4dbcf3882aa62f559941305e5f830e099
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Sun Mar 21 10:39:39 2021 -0400
Drop python3dist(setuptools) BR, redundant with %pyproject_buildrequires
diff --git a/grpc.spec b/grpc.spec
index 39b62cf..baafbe1 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -120,7 +120,6 @@ export GRPC_PYTHON_ENABLE_DOCUMENTATION_BUILD='True'
}
BuildRequires: python3-devel
-BuildRequires: python3dist(setuptools)
BuildRequires: pyproject-rpm-macros
# Not automatically generated even when we set GRPC_PYTHON_BUILD_WITH_CYTHON:
BuildRequires: python3dist(cython)
@@ -894,6 +893,7 @@ fi
were not
usable!
* Add %%py_provides for Fedora 32
+ * Drop python3dist(setuptools) BR, redundant with %%pyproject_buildrequires
* Tue Feb 16 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.26.0-12
- C (core) and C++ (cpp):
commit 9ce49f9e8324041739cb9d211b46068f1e354fec
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 15 12:33:34 2021 -0400
Trivial whitespace change
diff --git a/grpc.spec b/grpc.spec
index c67a619..39b62cf 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -786,6 +786,7 @@ fi
%{_libdir}/lib%{name}++_error_details.so.%{cpp_so_version}*
%{_libdir}/lib%{name}++_reflection.so.%{cpp_so_version}*
%{_libdir}/lib%{name}++_unsecure.so.%{cpp_so_version}*
+
%{_libdir}/lib%{name}pp_channelz.so.%{cpp_so_version}*
commit 9af26a9eed1d00eb13e1bd8adec9a426074e0f5d
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 15 11:28:06 2021 -0400
Fix gflags CMake target name for dynamic linking
diff --git a/grpc.spec b/grpc.spec
index d20fa5b..c67a619 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -462,6 +462,9 @@ sed -r -i 's/^([[:blank:]]*)(\$\{_gRPC_GFLAGS_LIBRARIES\})/'\
'\1\2\n\1gtest\n\1gmock/' CMakeLists.txt
%endif
+# Fix gflags CMake target name for dynamic linking:
+sed -r -i 's/\b(gflags::gflags)\b/\1_shared/g' cmake/gflags.cmake
+
# Fix some of the weirdest accidentally-executable files
find . -type f -name '*.md' -perm /0111 -execdir chmod -v a-x '{}'
'+'
@@ -874,6 +877,7 @@ fi
* Drop explicit pkgconfig BR
* Fix the directory in which CMake installs pkgconfig files
* Improved CMake options
+ * Fix gflags CMake target name for dynamic linking
- C (core) and C++ (cpp):
* Let the -devel package require cmake-filesystem
* Allow building tests with our own copy of gtest/gmock, which will become
commit 3ac80eca71c3b6a9502c20912ed7c6a7bd9d3b8d
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 15 09:54:38 2021 -0400
Add CMake files to the files list for the -devel package
diff --git a/grpc.spec b/grpc.spec
index 280b85f..d20fa5b 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -817,6 +817,10 @@ fi
%{_libdir}/lib%{name}pp_channelz.so
%{_includedir}/%{name}pp
+%if %{with cmake}
+%{_libdir}/cmake/*.cmake
+%endif
+
%files -n python3-grpcio
%license LICENSE NOTICE.txt
@@ -876,6 +880,7 @@ fi
mandatory when we depend on abseil-cpp and switch to C++17
* Fix a link error in the core tests when using CMake
* Manually install grpc_cli (CMake)
+ * Add CMake files to the files list for the -devel package
- Python:
* Add several patches required for the tests
* BR gevent for gevent_tests
commit 5c54e1625e4f8c8c8c0c4bf0174475c1cf8a1c86
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 15 09:49:38 2021 -0400
Add %py_provides for Fedora 32
diff --git a/grpc.spec b/grpc.spec
index bc25ded..280b85f 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -320,6 +320,9 @@ Development headers and files for gRPC libraries (both C and C++).
%package -n python3-grpcio
Summary: Python language bindings for gRPC
# License: same as base package
+%if 0%{?fedora} == 32
+%py_provides python3-grpcio
+%endif
# Note that the Python package has no runtime dependency on the base C library;
# everything it needs is bundled.
@@ -332,6 +335,9 @@ Python language bindings for gRPC (HTTP/2-based RPC framework).
%package -n python3-grpcio-tools
Summary: Package for gRPC Python tools
# License: same as base package
+%if 0%{?fedora} == 32
+%py_provides python3-grpcio-tools
+%endif
%description -n python3-grpcio-tools
Package for gRPC Python tools.
@@ -341,6 +347,9 @@ Package for gRPC Python tools.
Summary: Channel Level Live Debug Information Service for gRPC
License: ASL 2.0
BuildArch: noarch
+%if 0%{?fedora} == 32
+%py_provides python3-grpcio-channelz
+%endif
%description -n python3-grpcio-channelz
Channelz is a live debug tool in gRPC Python.
@@ -350,6 +359,9 @@ Channelz is a live debug tool in gRPC Python.
Summary: Standard Health Checking Service for gRPC
License: ASL 2.0
BuildArch: noarch
+%if 0%{?fedora} == 32
+%py_provides python3-grpcio-health-checking
+%endif
%description -n python3-grpcio-health-checking
Reference package for GRPC Python health checking.
@@ -359,6 +371,9 @@ Reference package for GRPC Python health checking.
Summary: Standard Protobuf Reflection Service for gRPC
License: ASL 2.0
BuildArch: noarch
+%if 0%{?fedora} == 32
+%py_provides python3-grpcio-reflections
+%endif
%description -n python3-grpcio-reflection
Reference package for reflection in GRPC Python.
@@ -368,6 +383,9 @@ Reference package for reflection in GRPC Python.
Summary: Status proto mapping for gRPC
License: ASL 2.0
BuildArch: noarch
+%if 0%{?fedora} == 32
+%py_provides python3-grpcio-status
+%endif
%description -n python3-grpcio-status
Reference package for GRPC Python status proto mapping.
@@ -377,6 +395,9 @@ Reference package for GRPC Python status proto mapping.
Summary: Testing utilities for gRPC Python
License: ASL 2.0
BuildArch: noarch
+%if 0%{?fedora} == 32
+%py_provides python3-grpcio-testing
+%endif
%description -n python3-grpcio-testing
Testing utilities for gRPC Python.
@@ -862,6 +883,7 @@ fi
steps, without which the packages were missing generated proto modules and
were not
usable!
+ * Add %%py_provides for Fedora 32
* Tue Feb 16 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.26.0-12
- C (core) and C++ (cpp):
commit dc22a8a3e95a5f08bdca3b3e83d8e0ea5d234058
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 15 09:41:02 2021 -0400
Manually install grpc_cli (CMake)
diff --git a/grpc.spec b/grpc.spec
index 80b0cda..bc25ded 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -617,7 +617,11 @@ done
# ~~~~ C (core) and C++ (cpp) ~~~~
%if %{with cmake}
%cmake_install
-#chrpath --delete '%{buildroot}%{_bindir}/%{name}_cli'
+# For some reason, grpc_cli is not installed. Do it manually.
+install -t '%{buildroot}%{_bindir}' -p -D
'%{_vpath_builddir}/%{name}_cli'
+# grpc_cli build does not respect CMAKE_INSTALL_RPATH
+#
https://github.com/grpc/grpc/issues/25176
+chrpath --delete '%{buildroot}%{_bindir}/%{name}_cli'
%else
export STRIP=/bin/true
make install prefix='%{buildroot}%{_prefix}'
@@ -850,6 +854,7 @@ fi
* Allow building tests with our own copy of gtest/gmock, which will become
mandatory when we depend on abseil-cpp and switch to C++17
* Fix a link error in the core tests when using CMake
+ * Manually install grpc_cli (CMake)
- Python:
* Add several patches required for the tests
* BR gevent for gevent_tests
commit 91ffc303acba419a802695e2e609399c2f3974fe
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 15 09:40:24 2021 -0400
Add a comment about not installing the Python grpcio_tests package
diff --git a/grpc.spec b/grpc.spec
index c22ac29..80b0cda 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -657,6 +657,8 @@ do
%py3_install
popd >/dev/null
done
+# The grpcio_tests package should not be installed; it would provide top-level
+# packages with generic names like “tests” or “tests_aio”.
# ~~~~ Miscellaneous ~~~~
commit 7796406817bcf2622d17703f2963b3ea211ea0ac
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 15 09:39:12 2021 -0400
Fix Python package builds; packages were missing generated proto modules and were not
usable!
diff --git a/grpc-1.26.0-python-no-static-libgcc.patch
b/grpc-1.26.0-python-no-static-libgcc.patch
deleted file mode 100644
index 87784d9..0000000
--- a/grpc-1.26.0-python-no-static-libgcc.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur grpc-1.26.0-original/setup.py grpc-1.26.0/setup.py
---- grpc-1.26.0-original/setup.py 2019-12-17 20:29:27.000000000 -0500
-+++ grpc-1.26.0/setup.py 2021-01-28 13:20:22.540840537 -0500
-@@ -197,7 +197,7 @@
- ' -static-libgcc -static-libstdc++ -mcrtdll={msvcr}'
- ' -static'.format(msvcr=msvcr))
- if "linux" in sys.platform:
-- EXTRA_ENV_LINK_ARGS += ' -Wl,-wrap,memcpy -static-libgcc'
-+ EXTRA_ENV_LINK_ARGS += ' -Wl,-wrap,memcpy'
-
- EXTRA_COMPILE_ARGS = shlex.split(EXTRA_ENV_COMPILE_ARGS)
- EXTRA_LINK_ARGS = shlex.split(EXTRA_ENV_LINK_ARGS)
diff --git a/grpc-1.26.0-python-no-std-gnu99.patch
b/grpc-1.26.0-python-no-std-gnu99.patch
deleted file mode 100644
index 9a7ce1f..0000000
--- a/grpc-1.26.0-python-no-std-gnu99.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Based on remove-gnu99.patch from
-https://src.fedoraproject.org/rpms/grpc/pull-request/3; corresponds to ignored
-upstream PR
https://github.com/grpc/grpc/pull/23671. For consistency, we also
-patch a related shell script that we do not use.
-
-Using -std=gnu99 for C++ code makes GCC warn and clang error; besides, it makes
-no sense.
-
-diff -Naur grpc-1.26.0-original/setup.py grpc-1.26.0/setup.py
---- grpc-1.26.0-original/setup.py 2019-12-17 20:29:27.000000000 -0500
-+++ grpc-1.26.0/setup.py 2021-02-01 11:49:55.741613488 -0500
-@@ -179,7 +179,7 @@
- # available dynamically
- EXTRA_ENV_COMPILE_ARGS += ' /MT'
- elif "linux" in sys.platform:
-- EXTRA_ENV_COMPILE_ARGS += ' -std=gnu99 -fvisibility=hidden -fno-wrapv
-fno-exceptions'
-+ EXTRA_ENV_COMPILE_ARGS += ' -fvisibility=hidden -fno-wrapv -fno-exceptions'
- elif "darwin" in sys.platform:
- EXTRA_ENV_COMPILE_ARGS += ' -stdlib=libc++ -fvisibility=hidden -fno-wrapv
-fno-exceptions'
-
-diff -Naur grpc-1.26.0-original/tools/run_tests/helper_scripts/build_python.sh
grpc-1.26.0/tools/run_tests/helper_scripts/build_python.sh
---- grpc-1.26.0-original/tools/run_tests/helper_scripts/build_python.sh 2019-12-17
20:29:27.000000000 -0500
-+++ grpc-1.26.0/tools/run_tests/helper_scripts/build_python.sh 2021-02-01
11:49:37.059492917 -0500
-@@ -116,7 +116,7 @@
- fi
-
- ROOT=$(pwd)
--export CFLAGS="-I$ROOT/include -std=gnu99 -fno-wrapv $CFLAGS"
-+export CFLAGS="-I$ROOT/include -fno-wrapv $CFLAGS"
- export GRPC_PYTHON_BUILD_WITH_CYTHON=1
- export LANG=en_US.UTF-8
-
diff --git a/grpc.spec b/grpc.spec
index 2a3b814..c22ac29 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -149,19 +149,9 @@ Patch3: 99f8a10aec994a8957fbb6787768b444ef34d6a2.patch
# Remove grpc sources from grpc++
#
https://github.com/grpc/grpc/pull/21662
Patch4: 72351f63fd650cc7acfcd2d0307e8e8e8f777283.patch
-# Based on remove-gnu99.patch from
-#
https://src.fedoraproject.org/rpms/grpc/pull-request/3; corresponds to
-# ignored upstream PR
https://github.com/grpc/grpc/pull/23671. For consistency,
-# we also patch a related shell script that we do not use.
-#
-# Using -std=gnu99 for C++ code makes GCC warn and clang error; besides, it
-# makes no sense.
-Patch5: %{name}-1.26.0-python-no-std-gnu99.patch
# Backport upstream commit 9e0b427893b65b220faf8a31a6afdc67f6f41364 “Use !=
# with literals”
Patch6: %{name}-1.26.0-python-SyntaxWarning.patch
-# Stop adding -static-libgcc when linking Python bindings
-Patch7: %{name}-1.26.0-python-no-static-libgcc.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.
@@ -563,6 +553,18 @@ export PYTHONPATH
# ~~ grpcio ~~
%set_grpc_python_environment
+# We must set GRPC_PYTHON_CFLAGS to avoid unwanted defaults. We take the
+# upstream flags except that we remove -std=c99, which is inapplicable to the
+# C++ parts of the extension.
+#
+# We must set GRPC_PYTHON_LDFLAGS to avoid unwanted defaults. The upstream
+# flags attempt to statically link libgcc, so we do not need any of them. Since
+# we forcibly unbundle protobuf, we need to add linker flags for protobuf
+# ourselves.
+export GRPC_PYTHON_CFLAGS="-fvisibility=hidden -fno-wrapv -fno-exceptions $(
+ pkg-config --cflags protobuf
+)"
+export GRPC_PYTHON_LDFLAGS="$(pkg-config --libs protobuf)"
%py3_build
%{__python3} %{py_setup} %{?py_setup_args} install \
-O1 --skip-build --root "${PYROOT}"
@@ -578,10 +580,12 @@ do
cp -rp "../../../../src/${srcdir}" "%{name}_root/src/"
done
cp -rp '../../../../include' '%{name}_root/'
-(
- export GRPC_PYTHON_LDFLAGS='-lprotoc'
- %py3_build
-)
+# We must set GRPC_PYTHON_CFLAGS and GRPC_PYTHON_LDFLAGS again; grpcio_tools
+# does not have the same default upstream flags as grpcio does, and it needs to
+# link the protobuf compiler library.
+export GRPC_PYTHON_CFLAGS="-fno-wrapv -frtti $(pkg-config --cflags protobuf)"
+export GRPC_PYTHON_LDFLAGS="$(pkg-config --libs protobuf) -lprotoc"
+%py3_build
# Remove unwanted shebang from grpc_tools.protoc source file, which will be
# installed without an executable bit:
find . -type f -name protoc.py -execdir sed -r -i '1{/^#!/d}' '{}'
'+'
@@ -590,22 +594,21 @@ find . -type f -name protoc.py -execdir sed -r -i
'1{/^#!/d}' '{}' '+'
popd >/dev/null
# ~~ pure-python modules grpcio-* ~~
-for suffix in channelz health_checking reflection status testing
+for suffix in channelz health_checking reflection status testing tests
do
echo "----> grpcio_${suffix} <----" 1>&2
pushd "src/python/grpcio_${suffix}/" >/dev/null
+ %{__python3} %{py_setup} %{?py_setup_args} preprocess
+ if [ "${suffix}" != 'testing' ]
+ then
+ %{__python3} %{py_setup} %{?py_setup_args} build_package_protos
+ fi
%py3_build
%{__python3} %{py_setup} %{?py_setup_args} install \
-O1 --skip-build --root "${PYROOT}"
popd >/dev/null
done
-# ~~ grpcio-tests ~~
-echo '----> grpcio_tests <----'
-pushd 'src/python/grpcio_tests/' >/dev/null
-%py3_build
-popd >/dev/null
-
# ~~ documentation ~~
%{__python3} %{py_setup} %{?py_setup_args} doc
@@ -848,6 +851,10 @@ fi
- Python:
* Add several patches required for the tests
* BR gevent for gevent_tests
+ * Fix build; in particular, add missing preprocess and build_package_protos
+ steps, without which the packages were missing generated proto modules and
+ were not
+ usable!
* Tue Feb 16 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.26.0-12
- C (core) and C++ (cpp):
commit e1dddacaa890f2017545e0ce794567c3c3229e1d
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 15 09:32:03 2021 -0400
Improved CMake options
diff --git a/grpc.spec b/grpc.spec
index 7bc9e1f..2a3b814 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -516,15 +516,15 @@ sed -r -i 's|lib(/pkgconfig)|\${gRPC_INSTALL_LIBDIR}\1|'
CMakeLists.txt
# We could use either make or ninja as the backend; ninja is faster and has no
# disadvantages (except a small additional BR, given we already need Python)
%cmake \
- -GNinja \
- -DgRPC_INSTALL_BINDIR=%{_bindir} \
- -DgRPC_INSTALL_LIBDIR=%{_libdir} \
- -DgRPC_INSTALL_INCLUDEDIR=%{_includedir} \
- -DgRPC_INSTALL_CMAKEDIR=%{_libdir}/cmake/%{name} \
- -DgRPC_INSTALL_SHAREDIR=%{_datadir}/%{name} \
+ -DgRPC_INSTALL:BOOL=ON \
+ -DgRPC_INSTALL_BINDIR:PATH=%{_bindir} \
+ -DgRPC_INSTALL_LIBDIR:PATH=%{_libdir} \
+ -DgRPC_INSTALL_INCLUDEDIR:PATH=%{_includedir} \
+ -DgRPC_INSTALL_CMAKEDIR:PATH=%{_libdir}/cmake/%{name} \
+ -DgRPC_INSTALL_SHAREDIR:PATH=%{_datadir}/%{name} \
-DgRPC_BUILD_TESTS:BOOL=%{?with_core_tests:ON}%{?!with_core_tests:OFF} \
-DgRPC_BUILD_CODEGEN:BOOL=ON \
- -DgRPC_BUILD_CSHARPEXT:BOOL=ON \
+ -DgRPC_BUILD_CSHARP_EXT:BOOL=ON \
-DgRPC_BACKWARDS_COMPATIBILITY_MODE:BOOL=OFF \
-DgRPC_ZLIB_PROVIDER:STRING='package' \
-DgRPC_CARES_PROVIDER:STRING='package' \
@@ -533,7 +533,15 @@ sed -r -i 's|lib(/pkgconfig)|\${gRPC_INSTALL_LIBDIR}\1|'
CMakeLists.txt
-DgRPC_PROTOBUF_PACKAGE_TYPE:STRING='MODULE' \
-DgRPC_GFLAGS_PROVIDER:STRING='package' \
-DgRPC_BENCHMARK_PROVIDER:STRING='package' \
- -DgRPC_USE_PROTO_LITE:BOOL=OFF
+ -DgRPC_USE_PROTO_LITE:BOOL=OFF \
+ -DgRPC_BUILD_GRPC_CPP_PLUGIN:BOOL=ON \
+ -DgRPC_BUILD_GRPC_CSHARP_PLUGIN:BOOL=ON \
+ -DgRPC_BUILD_GRPC_NODE_PLUGIN:BOOL=ON \
+ -DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN:BOOL=ON \
+ -DgRPC_BUILD_GRPC_PHP_PLUGIN:BOOL=ON \
+ -DgRPC_BUILD_GRPC_PYTHON_PLUGIN:BOOL=ON \
+ -DgRPC_BUILD_GRPC_RUBY_PLUGIN:BOOL=ON \
+ -GNinja
%cmake_build
%else
%set_build_flags
@@ -831,6 +839,7 @@ fi
available
* Drop explicit pkgconfig BR
* Fix the directory in which CMake installs pkgconfig files
+ * Improved CMake options
- C (core) and C++ (cpp):
* Let the -devel package require cmake-filesystem
* Allow building tests with our own copy of gtest/gmock, which will become
commit 78adfdc8ecfc28ec63ceda143bee63c256378d5e
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 15 09:27:03 2021 -0400
Fix the directory in which CMake installs pkgconfig files
diff --git a/grpc.spec b/grpc.spec
index 92c3612..7bc9e1f 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -504,6 +504,10 @@ dos2unix \
examples/cpp/helloworld/cmake_externalproject/CMakeLists.txt
# We leave those under examples/csharp alone.
+# Fix the install path for .pc files
+#
https://github.com/grpc/grpc/issues/25635
+sed -r -i 's|lib(/pkgconfig)|\${gRPC_INSTALL_LIBDIR}\1|' CMakeLists.txt
+
%build
# ~~~~ C (core) and C++ (cpp) ~~~~
@@ -826,6 +830,7 @@ fi
* Use cmake() dependencies first, and pkgconfig() dependencies second, where
available
* Drop explicit pkgconfig BR
+ * Fix the directory in which CMake installs pkgconfig files
- C (core) and C++ (cpp):
* Let the -devel package require cmake-filesystem
* Allow building tests with our own copy of gtest/gmock, which will become
commit 934e38fa4318bcd3c7418587dcbdc7188e6da496
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 15 09:24:04 2021 -0400
Python: BR gevent for gevent tests
diff --git a/grpc.spec b/grpc.spec
index 62be3b8..92c3612 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -124,6 +124,8 @@ BuildRequires: python3dist(setuptools)
BuildRequires: pyproject-rpm-macros
# Not automatically generated even when we set GRPC_PYTHON_BUILD_WITH_CYTHON:
BuildRequires: python3dist(cython)
+# Required for “test_gevent” tests:
+BuildRequires: python3dist(gevent)
# Otherwise, we use generated BR’s.
# ~~~~ Miscellaneous ~~~~
@@ -831,6 +833,7 @@ fi
* Fix a link error in the core tests when using CMake
- Python:
* Add several patches required for the tests
+ * BR gevent for gevent_tests
* Tue Feb 16 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.26.0-12
- C (core) and C++ (cpp):
commit 53fe7078098335a6cd3aaff80735f5499b0240de
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 15 09:20:37 2021 -0400
Fix a link error in the core tests when using CMake; add several patches required for
the Python tests
diff --git a/grpc-1.26.0-core-tests-link-errors.patch
b/grpc-1.26.0-core-tests-link-errors.patch
new file mode 100644
index 0000000..48e6521
--- /dev/null
+++ b/grpc-1.26.0-core-tests-link-errors.patch
@@ -0,0 +1,11 @@
+diff -Naur grpc-1.26.0-original/CMakeLists.txt grpc-1.26.0/CMakeLists.txt
+--- grpc-1.26.0-original/CMakeLists.txt 2019-12-17 20:29:27.000000000 -0500
++++ grpc-1.26.0/CMakeLists.txt 2021-03-15 09:17:35.873493405 -0400
+@@ -2609,6 +2609,7 @@
+ ${_gRPC_ALLTARGETS_LIBRARIES}
+ gpr
+ grpc_unsecure
++ grpc
+ upb
+ )
+ if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC)
diff --git a/grpc-1.26.0-grpcio_tests-make-network-tests-skippable.patch
b/grpc-1.26.0-grpcio_tests-make-network-tests-skippable.patch
new file mode 100644
index 0000000..a9307dd
--- /dev/null
+++ b/grpc-1.26.0-grpcio_tests-make-network-tests-skippable.patch
@@ -0,0 +1,40 @@
+diff -Naur
grpc-1.26.0-original/src/python/grpcio_tests/tests/interop/_secure_intraop_test.py
grpc-1.26.0/src/python/grpcio_tests/tests/interop/_secure_intraop_test.py
+---
grpc-1.26.0-original/src/python/grpcio_tests/tests/interop/_secure_intraop_test.py 2019-12-17
20:29:27.000000000 -0500
++++ grpc-1.26.0/src/python/grpcio_tests/tests/interop/_secure_intraop_test.py 2021-03-15
10:09:54.802317262 -0400
+@@ -13,6 +13,7 @@
+ # limitations under the License.
+ """Secure client-server interoperability as a unit
test."""
+
++import os
+ import unittest
+
+ import grpc
+@@ -29,6 +30,8 @@
+ class SecureIntraopTest(_intraop_test_case.IntraopTestCase, unittest.TestCase):
+
+ def setUp(self):
++ if 'FEDORA_NO_NETWORK_TESTS' in os.environ:
++ self.skipTest('Network tests disabled')
+ self.server = test_common.test_server()
+ test_pb2_grpc.add_TestServiceServicer_to_server(service.TestService(),
+ self.server)
+diff -Naur grpc-1.26.0-original/src/python/grpcio_tests/tests/unit/_dns_resolver_test.py
grpc-1.26.0/src/python/grpcio_tests/tests/unit/_dns_resolver_test.py
+---
grpc-1.26.0-original/src/python/grpcio_tests/tests/unit/_dns_resolver_test.py 2019-12-17
20:29:27.000000000 -0500
++++ grpc-1.26.0/src/python/grpcio_tests/tests/unit/_dns_resolver_test.py 2021-03-15
10:08:08.159649736 -0400
+@@ -13,6 +13,7 @@
+ # limitations under the License.
+ """Tests for an actual dns resolution."""
+
++import os
+ import unittest
+ import logging
+ import six
+@@ -45,6 +46,8 @@
+ def tearDown(self):
+ self._server.stop(None)
+
++ @unittest.skipIf('FEDORA_NO_NETWORK_TESTS' in os.environ,
++ 'Network tests disabled')
+ def test_connect_loopback(self):
+ #
NOTE(https://github.com/grpc/grpc/issues/18422)
+ # In short, Gevent + C-Ares = Segfault. The C-Ares driver is not
diff --git a/grpc-1.26.0-python-grpcio_tests-fixture-super.patch
b/grpc-1.26.0-python-grpcio_tests-fixture-super.patch
new file mode 100644
index 0000000..ed99b1c
--- /dev/null
+++ b/grpc-1.26.0-python-grpcio_tests-fixture-super.patch
@@ -0,0 +1,23 @@
+diff -Naur
grpc-1.26.0-original/src/python/grpcio_tests/tests/health_check/_health_servicer_test.py
grpc-1.26.0/src/python/grpcio_tests/tests/health_check/_health_servicer_test.py
+---
grpc-1.26.0-original/src/python/grpcio_tests/tests/health_check/_health_servicer_test.py 2019-12-17
20:29:27.000000000 -0500
++++
grpc-1.26.0/src/python/grpcio_tests/tests/health_check/_health_servicer_test.py 2021-03-15
09:15:08.419558680 -0400
+@@ -235,8 +235,7 @@
+
+ def setUp(self):
+ self._thread_pool = thread_pool.RecordingThreadPool(max_workers=None)
+- super(HealthServicerTest, self).start_server(
+- non_blocking=True, thread_pool=self._thread_pool)
++ super().start_server(non_blocking=True, thread_pool=self._thread_pool)
+
+ def test_check_empty_service(self):
+ request = health_pb2.HealthCheckRequest()
+@@ -273,8 +272,7 @@
+ class HealthServicerBackwardsCompatibleWatchTest(BaseWatchTests.WatchTests):
+
+ def setUp(self):
+- super(HealthServicerBackwardsCompatibleWatchTest, self).start_server(
+- non_blocking=False, thread_pool=None)
++ super().start_server(non_blocking=False, thread_pool=None)
+
+
+ if __name__ == '__main__':
diff --git a/grpc-1.36.0-python-grpcio_tests-skip-compression-tests.patch
b/grpc-1.36.0-python-grpcio_tests-skip-compression-tests.patch
new file mode 100644
index 0000000..08f1892
--- /dev/null
+++ b/grpc-1.36.0-python-grpcio_tests-skip-compression-tests.patch
@@ -0,0 +1,21 @@
+diff -Naur grpc-1.36.0-original/src/python/grpcio_tests/tests/unit/_compression_test.py
grpc-1.36.0/src/python/grpcio_tests/tests/unit/_compression_test.py
+---
grpc-1.36.0-original/src/python/grpcio_tests/tests/unit/_compression_test.py 2021-02-23
16:34:43.000000000 -0500
++++ grpc-1.36.0/src/python/grpcio_tests/tests/unit/_compression_test.py 2021-03-03
09:41:03.076816980 -0500
+@@ -318,6 +318,7 @@
+ else:
+ self.assertNotCompressed(received_ratio)
+
++ @unittest.skip('Wrong compression ratio may occur; unknown cause')
+ def testDisableNextCompressionStreaming(self):
+ server_kwargs = {
+ 'compression': grpc.Compression.Deflate,
+@@ -372,6 +373,9 @@
+ def _test_compression(self):
+ self.assertConfigurationCompressed(**kwargs)
+
++ _test_compression = unittest.skip(
++ 'Wrong compression ratio may occur; unknown cause'
++ )(_test_compression)
+ return _test_compression
+
+ setattr(CompressionTest, _get_compression_test_name(**options),
diff --git a/grpc.spec b/grpc.spec
index b533605..62be3b8 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -172,6 +172,22 @@ Patch9:
%{name}-1.26.0-grpcio-tests-setup-without-grpcio-tools.patch
# In grpcio-tests, require enum34 for install only on those ancient Pythons
# that require it; we are not using such a Python!
Patch10: %{name}-1.26.0-grpcio-tests-conditionalize-enum34.patch
+# Fix errors like:
+# TypeError: super(type, obj): obj must be an instance or subtype of type
+# It is not clear why these occur.
+Patch11: %{name}-1.26.0-python-grpcio_tests-fixture-super.patch
+# Skip tests requiring non-loopback network access when the
+# FEDORA_NO_NETWORK_TESTS environment variable is set.
+Patch12: %{name}-1.26.0-grpcio_tests-make-network-tests-skippable.patch
+# Fix link errors in the core tests: the test library grpc_test_util_unsecure
+# does require the “secure” library “grpc”
+Patch13: %{name}-1.26.0-core-tests-link-errors.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.
+Patch14: %{name}-1.36.0-python-grpcio_tests-skip-compression-tests.patch
Requires: %{name}-data = %{version}-%{release}
@@ -655,6 +671,8 @@ cp -rp doc/build '%{buildroot}%{pythondocdir}/html'
%check
+export FEDORA_NO_NETWORK_TESTS=1
+
%if %{with core_tests} && %{with cmake}
%ctest
%endif
@@ -810,6 +828,9 @@ fi
* Let the -devel package require cmake-filesystem
* Allow building tests with our own copy of gtest/gmock, which will become
mandatory when we depend on abseil-cpp and switch to C++17
+ * Fix a link error in the core tests when using CMake
+- Python:
+ * Add several patches required for the tests
* Tue Feb 16 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.26.0-12
- C (core) and C++ (cpp):
commit acc3813ea128f900ed68a7e007183e97f6ffaed9
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 15 09:02:16 2021 -0400
Allow building tests with our own copy of gtest/gmock, which will become mandatory
when we depend on abseil-cpp and switch to C++17
diff --git a/.gitignore b/.gitignore
index 42300ce..3105c84 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
/grpc-1.18.0.tar.gz
/grpc-1.20.1.tar.gz
/grpc-1.26.0.tar.gz
+/release-1.10.0.tar.gz
diff --git a/grpc.spec b/grpc.spec
index eb8cd81..b533605 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -1,3 +1,14 @@
+# In gtest 1.36, we must link against the system abseil-cpp. We get linker
+# errors here if we are not using C++17.
+
+# However, gtest in Fedora uses the C++11 ABI, so we get linker errors building
+# the tests if we use C++17. We must therefore bundle a copy of gtest in the
+# source RPM rather than using the system copy. This is to be discouraged, but
+# there is no alternative in this case. It is not treated as a bundled library
+# because it is used only at build time, and is not installed.
+%global gtest_version 1.10.0
+%bcond_without system_gtest
+
# The CMake build works, except grpc_cli is only built with the tests.
%bcond_with cmake
@@ -15,7 +26,6 @@
# collect2: error: ld returned 1 exit status
%bcond_with core_tests
-
Name: grpc
Version: 1.26.0
Release: 13%{?dist}
@@ -64,6 +74,9 @@ License: ASL 2.0 and BSD
URL:
https://www.%{name}.io
%global forgeurl
https://github.com/%{name}/%{name}/
Source0: %{forgeurl}/archive/v%{version}/%{name}-%{version}.tar.gz
+# Used only at build time (not a bundled library); see notes at definition of
+# gtest_version macro for explanation and justification.
+Source1:
https://github.com/google/googletest/archive/release-%{gtest_version}.tar.gz
# ~~~~ C (core) and C++ (cpp) ~~~~
@@ -88,10 +101,12 @@ BuildRequires: cmake(c-ares)
%if %{with core_tests}
BuildRequires: cmake(benchmark)
+%if %{with system_gtest}
BuildRequires: cmake(gtest)
BuildRequires: pkgconfig(gmock)
BuildRequires: pkgconfig(libprofiler)
%endif
+%endif
# ~~~~ Python ~~~~
@@ -391,6 +406,33 @@ sed -i \
-e 's:^GTEST_LIB =.*::' Makefile
%endif
+%if %{without system_gtest}
+# Copy in the needed gtest/gmock implementations.
+%setup -q -T -D -b 1
+rm -rvf 'third_party/googletest'
+mv '../googletest-release-%{gtest_version}' 'third_party/googletest'
+%else
+# Patch CMakeLists for external gtest/gmock.
+#
+# 1. Create dummy sources, adding a typedef so the translation unit is not
+# empty, rather than removing references to these sources from
+# CMakeLists.txt. This is so that we do not end up with executables with no
+# sources, only libraries, which is a CMake error.
+# 2. Either remove references to the corresponding include directories, or
+# create the directories and leave them empty.
+# 3. “Stuff” the external library into the target_link_libraries() for each
+# test by noting that GMock/GTest/GFlags are always used together.
+for gwhat in test mock
+do
+ mkdir -p "third_party/googletest/google${gwhat}/src" \
+ "third_party/googletest/google${gwhat}/include"
+ echo "typedef int dummy_${gwhat}_type;" \
+ > "third_party/googletest/google${gwhat}/src/g${gwhat}-all.cc"
+done
+sed -r -i 's/^([[:blank:]]*)(\$\{_gRPC_GFLAGS_LIBRARIES\})/'\
+'\1\2\n\1gtest\n\1gmock/' CMakeLists.txt
+%endif
+
# Fix some of the weirdest accidentally-executable files
find . -type f -name '*.md' -perm /0111 -execdir chmod -v a-x '{}'
'+'
@@ -444,29 +486,6 @@ dos2unix \
examples/cpp/helloworld/cmake_externalproject/CMakeLists.txt
# We leave those under examples/csharp alone.
-%if %{with cmake}
-# Patch CMakeLists for external gtest/gmock.
-#
-# 1. Upstream expects single-source bundled copies, which are not distributed
-# in the tarball. Create dummy sources, adding a typedef so the translation
-# unit is not empty, rather than removing references to these sources from
-# CMakeLists.txt. This is so that we do not end up with executables with no
-# sources, only libraries, which is CMake error.
-# 2. Either remove references to the corresponding include directories, or
-# create the directories and leave them empty.
-# 3. “Stuff” the external library into the target_link_libraries() for each
-# test by noting that GMock/GTest/GFlags are always used together.
-for gwhat in test mock
-do
- mkdir -p "third_party/googletest/google${gwhat}/src" \
- "third_party/googletest/google${gwhat}/include"
- echo "typedef int dummy_${gwhat}_type;" \
- > "third_party/googletest/google${gwhat}/src/g${gwhat}-all.cc"
-done
-sed -r -i 's/^([[:blank:]]*)(\$\{_gRPC_GFLAGS_LIBRARIES\})/'\
-'\1\2\n\1gtest\n\1gmock/' CMakeLists.txt
-%endif
-
%build
# ~~~~ C (core) and C++ (cpp) ~~~~
@@ -656,6 +675,19 @@ env \
%{__python3} %{py_setup} %{?py_setup_args} test_lite || :
popd
+%if %{without system_gtest}
+# As a sanity check for our claim that gtest/gmock are not bundled, check
+# installed executables for symbols that appear to have come from gtest/gmock.
+foundgtest=0
+if find %{buildroot} -type f -perm /0111 \
+ -execdir objdump --syms --dynamic-syms --demangle '{}' '+'
2>/dev/null |
+ grep -E '[^:]testing::'
+then
+ echo 'Found traces of gtest/gmock' 1>&2
+ exit 1
+fi
+%endif
+
%files
%license LICENSE NOTICE.txt
@@ -776,6 +808,8 @@ popd
* Drop explicit pkgconfig BR
- C (core) and C++ (cpp):
* Let the -devel package require cmake-filesystem
+ * Allow building tests with our own copy of gtest/gmock, which will become
+ mandatory when we depend on abseil-cpp and switch to C++17
* Tue Feb 16 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.26.0-12
- C (core) and C++ (cpp):
diff --git a/sources b/sources
index d9a78bb..23ba531 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
SHA512 (grpc-1.26.0.tar.gz) =
4f7d067c582d0a9be7b7d4dd1e08acdbe6ff0686dfe92b5db5b7927f779410a4237acfd1c61d9f79eb2d00f86cf93cc7492fa372c1877e57c1aa23e9bb2648bb
+SHA512 (release-1.10.0.tar.gz) =
bd52abe938c3722adc2347afad52ea3a17ecc76730d8d16b065e165bc7477d762bce0997a427131866a89f1001e3f3315198204ffa5d643a9355f1f4d0d7b1a9
commit 41172ba5e1402431872bcb49163f3c15e6fa871b
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 15 08:52:18 2021 -0400
Let the -devel package require cmake-filesystem
diff --git a/grpc.spec b/grpc.spec
index ad0516e..eb8cd81 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -288,6 +288,7 @@ Summary: Development files for gRPC library
# License: same as base package
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-cpp%{?_isa} = %{version}-%{release}
+Requires: cmake-filesystem
%description devel
Development headers and files for gRPC libraries (both C and C++).
@@ -773,6 +774,8 @@ popd
* Use cmake() dependencies first, and pkgconfig() dependencies second, where
available
* Drop explicit pkgconfig BR
+- C (core) and C++ (cpp):
+ * Let the -devel package require cmake-filesystem
* Tue Feb 16 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.26.0-12
- C (core) and C++ (cpp):
commit 2d851402fe325a683ef80717c453fb2aab714ca9
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 15 08:48:06 2021 -0400
Style changes in Python environment setup
diff --git a/grpc.spec b/grpc.spec
index 6ac64b9..ad0516e 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -96,12 +96,13 @@ BuildRequires: pkgconfig(libprofiler)
# ~~~~ Python ~~~~
%global set_grpc_python_environment %{expand:
-export GRPC_PYTHON_BUILD_WITH_CYTHON=True
-export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=True
-export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=True
-export GRPC_PYTHON_BUILD_SYSTEM_CARES=True
-export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=True
-export GRPC_PYTHON_ENABLE_DOCUMENTATION_BUILD=True}
+export GRPC_PYTHON_BUILD_WITH_CYTHON='True'
+export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL='True'
+export GRPC_PYTHON_BUILD_SYSTEM_ZLIB='True'
+export GRPC_PYTHON_BUILD_SYSTEM_CARES='True'
+export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY='True'
+export GRPC_PYTHON_ENABLE_DOCUMENTATION_BUILD='True'
+}
BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)
commit 9255a1abe081f2f18c3b640c443fb38e076e69fe
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 15 08:45:43 2021 -0400
Drop explicit pkgconfig BR
diff --git a/grpc.spec b/grpc.spec
index 00b8cde..6ac64b9 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -68,7 +68,6 @@ Source0:
%{forgeurl}/archive/v%{version}/%{name}-%{version}.tar.gz
# ~~~~ C (core) and C++ (cpp) ~~~~
BuildRequires: gcc-c++
-BuildRequires: pkgconfig
%if %{with cmake}
BuildRequires: cmake
BuildRequires: ninja-build
@@ -772,6 +771,7 @@ popd
* Replace * with • in descriptions
* Use cmake() dependencies first, and pkgconfig() dependencies second, where
available
+ * Drop explicit pkgconfig BR
* Tue Feb 16 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.26.0-12
- C (core) and C++ (cpp):
commit 5ab84a2f96f6b778d45b5c4b87a9d7d33ac553c3
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 15 08:45:20 2021 -0400
Use cmake() dependencies first, and pkgconfig() dependencies second, where available
diff --git a/grpc.spec b/grpc.spec
index 8d0f0c9..00b8cde 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -77,18 +77,21 @@ BuildRequires: make
%endif
BuildRequires: chrpath
-BuildRequires: gflags-devel
-BuildRequires: protobuf-devel
+BuildRequires: pkgconfig(zlib)
+BuildRequires: cmake(gflags)
+BuildRequires: pkgconfig(protobuf)
BuildRequires: protobuf-compiler
+
BuildRequires: openssl-devel
BuildRequires: c-ares-devel
-BuildRequires: zlib-devel
+BuildRequires: pkgconfig(openssl)
+BuildRequires: cmake(c-ares)
%if %{with core_tests}
-BuildRequires: google-benchmark-devel
-BuildRequires: gtest-devel
-BuildRequires: gmock-devel
-BuildRequires: gperftools-devel
+BuildRequires: cmake(benchmark)
+BuildRequires: cmake(gtest)
+BuildRequires: pkgconfig(gmock)
+BuildRequires: pkgconfig(libprofiler)
%endif
# ~~~~ Python ~~~~
@@ -767,6 +770,8 @@ popd
* Mon Mar 15 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.26.0-13
- General:
* Replace * with • in descriptions
+ * Use cmake() dependencies first, and pkgconfig() dependencies second, where
+ available
* Tue Feb 16 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.26.0-12
- C (core) and C++ (cpp):
commit 7adc2b765620b769755bcaac32bce484b09eb178
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 15 08:37:56 2021 -0400
Move so-version macros and add comments showing where to read them from
diff --git a/grpc.spec b/grpc.spec
index 87f1724..8d0f0c9 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -21,6 +21,13 @@ Version: 1.26.0
Release: 13%{?dist}
Summary: RPC library and framework
+# CMakeLists.txt: gRPC_CORE_SOVERSION
+%global c_so_version 15
+# CMakeLists.txt: gRPC_CPP_SOVERSION
+%global cpp_so_version 1
+# CMakeLists.txt: gRPC_CSHARP_SOVERSION
+%global csharp_so_version 2
+
# The entire source is ASL 2.0 except the following:
#
# BSD:
@@ -60,9 +67,6 @@ Source0:
%{forgeurl}/archive/v%{version}/%{name}-%{version}.tar.gz
# ~~~~ C (core) and C++ (cpp) ~~~~
-%global c_so_version 9
-%global cpp_so_version 1
-
BuildRequires: gcc-c++
BuildRequires: pkgconfig
%if %{with cmake}
commit 222943799f0d974743b759024cd5bf0bb5d2df8d
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 15 08:30:31 2021 -0400
Add comment about grpc-0001-enforce-system-crypto-policies.patch upstream status
diff --git a/grpc.spec b/grpc.spec
index 71c25bd..87f1724 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -115,6 +115,8 @@ BuildRequires: symlinks
BuildRequires: dos2unix
+# Apply Fedora system crypto policies. Since this is Fedora-specific, the patch
+# is not suitable for upstream.
#
https://docs.fedoraproject.org/en-US/packaging-guidelines/CryptoPolicies/...
Patch0: %{name}-0001-enforce-system-crypto-policies.patch
# Make gRPC podspec template more robust
commit 56e498c003c173f9875678fa1fc318a1315e98f0
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Mar 15 08:35:28 2021 -0400
Replace * with • in descriptions
diff --git a/grpc.spec b/grpc.spec
index 1c18a94..71c25bd 100644
--- a/grpc.spec
+++ b/grpc.spec
@@ -18,7 +18,7 @@
Name: grpc
Version: 1.26.0
-Release: 12%{?dist}
+Release: 13%{?dist}
Summary: RPC library and framework
# The entire source is ASL 2.0 except the following:
@@ -181,16 +181,16 @@ 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
+ • 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:
- * 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
+ • 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
This package provides the shared C core library.
@@ -262,16 +262,16 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%description cli
The command line tool can do the following things:
- * Send unary rpc.
- * Attach metadata and display received metadata.
- * Handle common authentication to server.
- * Infer request/response types from server reflection result.
- * Find the request/response types from a given proto file.
- * Read proto request in text form.
- * Read request in wire form (for protobuf messages, this means serialized
+ • Send unary rpc.
+ • Attach metadata and display received metadata.
+ • Handle common authentication to server.
+ • Infer request/response types from server reflection result.
+ • Find the request/response types from a given proto file.
+ • Read proto request in text form.
+ • Read request in wire form (for protobuf messages, this means serialized
binary form).
- * Display proto response in text form.
- * Write response in wire form to a file.
+ • Display proto response in text form.
+ • Write response in wire form to a file.
%package devel
@@ -364,12 +364,12 @@ Provides: python-grpcio-testing-doc = %{version}-%{release}
Documentation for Python language bindings for gRPC, including the following
packages:
- * grpcio
- * grpcio_channelz
- * grpcio_health_checking
- * grpcio_reflection
- * grpcio_status
- * grpcio_testing
+ • grpcio
+ • grpcio_channelz
+ • grpcio_health_checking
+ • grpcio_reflection
+ • grpcio_status
+ • grpcio_testing
%prep
@@ -758,6 +758,10 @@ popd
%changelog
+* Mon Mar 15 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.26.0-13
+- General:
+ * Replace * with • in descriptions
+
* Tue Feb 16 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.26.0-12
- C (core) and C++ (cpp):
* Add CMake build support but do not enable it yet; there is still a problem