From 27265e211d553ce85828aec4826b76871f179689c6ab26261802700b1f04df9f Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 2 Oct 2019 22:19:38 +0000 Subject: [PATCH] - Update to release 1.23.1 OBS-URL: https://build.opensuse.org/package/show/devel:tools/grpc?expand=0&rev=48 --- gettid.patch | 54 +++++++++++++++++++++++++++++++++++++++++++ grpc.changes | 11 +++++++++ grpc.spec | 62 ++++++++++++++++++++++++++++++++++++-------------- v1.23.0.tar.gz | 3 --- v1.23.1.tar.gz | 3 +++ 5 files changed, 113 insertions(+), 20 deletions(-) create mode 100644 gettid.patch delete mode 100644 v1.23.0.tar.gz create mode 100644 v1.23.1.tar.gz diff --git a/gettid.patch b/gettid.patch new file mode 100644 index 0000000..9b29e0e --- /dev/null +++ b/gettid.patch @@ -0,0 +1,54 @@ +From: Jan Engelhardt +Date: 2019-10-02 20:41:05.480291530 +0200 + +Avoid collision with glibc's gettid. + +--- + src/core/lib/gpr/log_linux.cc | 4 ++-- + src/core/lib/iomgr/ev_epollex_linux.cc | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +Index: grpc-1.23.1/src/core/lib/gpr/log_linux.cc +=================================================================== +--- grpc-1.23.1.orig/src/core/lib/gpr/log_linux.cc ++++ grpc-1.23.1/src/core/lib/gpr/log_linux.cc +@@ -40,7 +40,7 @@ + #include + #include + +-static long gettid(void) { return syscall(__NR_gettid); } ++static long my_gettid(void) { return syscall(__NR_gettid); } + + void gpr_log(const char* file, int line, gpr_log_severity severity, + const char* format, ...) { +@@ -70,7 +70,7 @@ void gpr_default_log(gpr_log_func_args* + gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME); + struct tm tm; + static __thread long tid = 0; +- if (tid == 0) tid = gettid(); ++ if (tid == 0) tid = my_gettid(); + + timer = static_cast(now.tv_sec); + final_slash = strrchr(args->file, '/'); +Index: grpc-1.23.1/src/core/lib/iomgr/ev_epollex_linux.cc +=================================================================== +--- grpc-1.23.1.orig/src/core/lib/iomgr/ev_epollex_linux.cc ++++ grpc-1.23.1/src/core/lib/iomgr/ev_epollex_linux.cc +@@ -1102,7 +1102,7 @@ static void end_worker(grpc_pollset* pol + } + + #ifndef NDEBUG +-static long gettid(void) { return syscall(__NR_gettid); } ++static long my_gettid(void) { return syscall(__NR_gettid); } + #endif + + /* pollset->mu lock must be held by the caller before calling this. +@@ -1122,7 +1122,7 @@ static grpc_error* pollset_work(grpc_pol + #define WORKER_PTR (&worker) + #endif + #ifndef NDEBUG +- WORKER_PTR->originator = gettid(); ++ WORKER_PTR->originator = my_gettid(); + #endif + if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) { + gpr_log(GPR_INFO, diff --git a/grpc.changes b/grpc.changes index 7b510df..7dc7ea9 100644 --- a/grpc.changes +++ b/grpc.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Oct 2 18:39:47 UTC 2019 - Jan Engelhardt + +- Update to release 1.23.1 + * Unspecific refinements, improvements, and bug fixes. +- Add gettid.patch +- Split libgrpc into libgrpc++ because that has a SO version + group of its own. +- Bump libgrpc6 to libgrpc7 as there is actually .so.7 files. + Add suitable Conflicts markers. + ------------------------------------------------------------------- Thu Aug 22 18:28:15 UTC 2019 - Jan Engelhardt diff --git a/grpc.spec b/grpc.spec index 5d15ca0..44ac6e2 100644 --- a/grpc.spec +++ b/grpc.spec @@ -16,22 +16,25 @@ # -%define lname libgrpc6 +%define lver 7 +%define lverp 1 %define src_install_dir /usr/src/%name %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: grpc -Version: 1.23 +Version: 1.23.1 Release: 0 -%define rver 1.23.0 +%define rver 1.23.1 Summary: HTTP/2-based Remote Procedure Call implementation License: Apache-2.0 Group: Development/Tools/Building URL: https://grpc.io/ Source: https://github.com/grpc/grpc/archive/v%rver.tar.gz +Patch1: gettid.patch BuildRequires: %{python_module Cython} BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: cmake +BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: pkg-config BuildRequires: python-rpm-macros @@ -46,11 +49,28 @@ The reference implementation of the gRPC protocol, done on top of HTTP/2 with support for synchronous and asynchronous calls. gRPC uses Protocol Buffers as the Interface Definition Language by default. -%package -n %lname +%package -n libgrpc%lver Summary: HTTP/2-based Remote Procedure Call implementation Group: System/Libraries +%if "%lver" == "7" +# prior error in packaging +Conflicts: libgrpc6 +%endif -%description -n %lname +%description -n libgrpc%lver +The reference implementation of the gRPC protocol, done on top of +HTTP/2 with support for synchronous and asynchronous calls. gRPC uses +Protocol Buffers as the Interface Definition Language by default. + +%package -n libgrpc++%lverp +Summary: HTTP/2-based Remote Procedure Call implementation +Group: System/Libraries +%if "%lverp" == "1" +# prior error in packaging +Conflicts: libgrpc6 +%endif + +%description -n libgrpc++%lverp The reference implementation of the gRPC protocol, done on top of HTTP/2 with support for synchronous and asynchronous calls. gRPC uses Protocol Buffers as the Interface Definition Language by default. @@ -58,7 +78,8 @@ Protocol Buffers as the Interface Definition Language by default. %package devel Summary: Development files for grpc, a HTTP/2 Remote Procedure Call implementation Group: Development/Tools/Building -Requires: %lname = %version +Requires: libgrpc%lver = %version +Requires: libgrpc++%lverp = %version %description devel This subpackage contains libraries and header files for developing @@ -75,7 +96,7 @@ This subpackage contains source code of the gRPC reference implementation. %package -n python2-grpcio Summary: Python language bindings for grpc, a HTTP/2 Remote Procedure Call implementation Group: Development/Libraries/Python -Requires: %lname = %version-%release +Requires: libgrpc%lver = %version-%release Requires: python = %python2_version %description -n python2-grpcio @@ -84,14 +105,14 @@ This subpackage contains the python2 bindings. %package -n python3-grpcio Summary: Python language bindings for grpc, a HTTP/2 Remote Procedure Call implementation Group: Development/Libraries/Python -Requires: %lname = %version-%release +Requires: libgrpc%lver = %version-%release Requires: python = %python3_version %description -n python3-grpcio This subpackage contains the python3 bindings. %prep -%setup -qn grpc-%rver +%autosetup -n grpc-%rver -p1 %build %define _lto_cflags %nil @@ -129,6 +150,7 @@ popd # Install sources mkdir -p "%buildroot/%src_install_dir" tar -xzf %SOURCE0 --strip-components=1 -C "%buildroot/%src_install_dir" +find "%buildroot/%src_install_dir" -type d -name ".git*" -exec rm -Rf {} + # Fix env-script-interpreter rpmlint error find "%buildroot/%src_install_dir" -type f \ -exec sed -i 's|#!%_bindir/env bash|#!/bin/bash|' "{}" + \ @@ -137,17 +159,23 @@ find "%buildroot/%src_install_dir" -type f "(" -name "*.bzl" -o -name "*.py" ")" -exec sed -i 's|#!%_bindir/env python2.7|#!%_bindir/python2.7|' "{}" + \ -exec sed -i 's|#!%_bindir/env python|#!%_bindir/python|' "{}" + -%post -n %lname -p /sbin/ldconfig -%postun -n %lname -p /sbin/ldconfig +%fdupes %buildroot/%_prefix -%files -n %lname -%defattr(-,root,root) -%_libdir/libaddress_sorting.so.* -%_libdir/libgpr*.so.* -%_libdir/libgrpc*.so.* +%post -n libgrpc%lver -p /sbin/ldconfig +%postun -n libgrpc%lver -p /sbin/ldconfig +%post -n libgrpc++%lverp -p /sbin/ldconfig +%postun -n libgrpc++%lverp -p /sbin/ldconfig + +%files -n libgrpc%lver +%_libdir/libaddress_sorting.so.%{lver}* +%_libdir/libgpr*.so.%{lver}* +%_libdir/libgrpc*.so.%{lver}* + +%files -n libgrpc++%lverp +%_libdir/libgrpc++*.so.%{lverp}* +%_libdir/libgrpcpp_channelz.so.%{lverp}* %files devel -%defattr(-,root,root) %license LICENSE %_bindir/* %_includedir/* diff --git a/v1.23.0.tar.gz b/v1.23.0.tar.gz deleted file mode 100644 index 621b0d0..0000000 --- a/v1.23.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f56ced18740895b943418fa29575a65cc2396ccfa3159fa40d318ef5f59471f9 -size 15212436 diff --git a/v1.23.1.tar.gz b/v1.23.1.tar.gz new file mode 100644 index 0000000..9320533 --- /dev/null +++ b/v1.23.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd7da002b15641e4841f20a1f3eb1e359edb69d5ccf8ac64c362823b05f523d9 +size 15210322