SHA256
1
0
forked from pool/grpc

Accepting request 897022 from devel:tools

- Add grpc-cxx17.patch
- Update to release 1.38.0

OBS-URL: https://build.opensuse.org/request/show/897022
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grpc?expand=0&rev=35
This commit is contained in:
Dominique Leuenberger 2021-06-03 22:33:18 +00:00 committed by Git OBS Bridge
commit 7a6a8f0e0b
7 changed files with 72 additions and 180 deletions

View File

@ -1,165 +0,0 @@
From 5ca4ecaa7d6e152e66f4d078b3a68f1919841376 Mon Sep 17 00:00:00 2001
From: Esun Kim <veblush@google.com>
Date: Wed, 31 Mar 2021 10:33:34 -0700
Subject: [PATCH] Use absl pkg-config instead of linking them directly (#25840)
---
CMakeLists.txt | 20 +++++++--------
templates/CMakeLists.txt.template | 42 ++++++++++++++++++-------------
2 files changed, 34 insertions(+), 28 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6729fc4600..cfd843f951 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15505,8 +15505,8 @@ generate_pkgconfig(
"gpr"
"gRPC platform support library"
"${gRPC_CORE_VERSION}"
- ""
- "-lgpr -labsl_synchronization -labsl_time -labsl_time_zone -labsl_civil_time -labsl_graphcycles_internal -labsl_status -labsl_cord -labsl_str_format_internal -labsl_bad_optional_access -labsl_symbolize -labsl_strings -labsl_strings_internal -labsl_int128 -labsl_demangle_internal -labsl_malloc_internal -labsl_stacktrace -labsl_debugging_internal -labsl_throw_delegate -labsl_base -labsl_spinlock_wait -labsl_raw_logging_internal -labsl_log_severity"
+ "absl_base absl_memory absl_optional absl_status absl_str_format absl_strings absl_synchronization absl_time"
+ "-lgpr"
""
"gpr.pc")
@@ -15515,8 +15515,8 @@ generate_pkgconfig(
"gRPC"
"high performance general RPC framework"
"${gRPC_CORE_VERSION}"
- "gpr openssl"
- "-lgrpc -laddress_sorting -lre2 -lupb -lcares -lz -labsl_statusor -labsl_status -labsl_raw_hash_set -labsl_hashtablez_sampler -labsl_synchronization -labsl_time -labsl_time_zone -labsl_civil_time -labsl_graphcycles_internal -labsl_symbolize -labsl_demangle_internal -labsl_malloc_internal -labsl_stacktrace -labsl_debugging_internal -labsl_exponential_biased -labsl_cord -labsl_str_format_internal -labsl_hash -labsl_bad_variant_access -labsl_bad_optional_access -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_int128 -labsl_city -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity"
+ "gpr openssl absl_base absl_bind_front absl_flat_hash_map absl_inlined_vector absl_memory absl_optional absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time"
+ "-lgrpc -laddress_sorting -lre2 -lupb -lcares -lz"
""
"grpc.pc")
@@ -15525,8 +15525,8 @@ generate_pkgconfig(
"gRPC unsecure"
"high performance general RPC framework without SSL"
"${gRPC_CORE_VERSION}"
- "gpr"
- "-lgrpc_unsecure -labsl_statusor -labsl_status -labsl_raw_hash_set -labsl_hashtablez_sampler -labsl_synchronization -labsl_time -labsl_time_zone -labsl_civil_time -labsl_graphcycles_internal -labsl_symbolize -labsl_demangle_internal -labsl_malloc_internal -labsl_stacktrace -labsl_debugging_internal -labsl_exponential_biased -labsl_cord -labsl_str_format_internal -labsl_hash -labsl_bad_variant_access -labsl_bad_optional_access -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_int128 -labsl_city -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity"
+ "gpr absl_base absl_flat_hash_map absl_inlined_vector absl_memory absl_optional absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time"
+ "-lgrpc_unsecure"
""
"grpc_unsecure.pc")
@@ -15535,8 +15535,8 @@ generate_pkgconfig(
"gRPC++"
"C++ wrapper for gRPC"
"${gRPC_CPP_VERSION}"
- "grpc"
- "-lgrpc++ -labsl_statusor -labsl_status -labsl_raw_hash_set -labsl_hashtablez_sampler -labsl_synchronization -labsl_time -labsl_time_zone -labsl_civil_time -labsl_graphcycles_internal -labsl_symbolize -labsl_demangle_internal -labsl_malloc_internal -labsl_stacktrace -labsl_debugging_internal -labsl_exponential_biased -labsl_cord -labsl_str_format_internal -labsl_hash -labsl_bad_variant_access -labsl_bad_optional_access -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_int128 -labsl_city -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity"
+ "grpc absl_base absl_bind_front absl_flat_hash_map absl_inlined_vector absl_memory absl_optional absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time"
+ "-lgrpc++"
""
"grpc++.pc")
@@ -15545,7 +15545,7 @@ generate_pkgconfig(
"gRPC++ unsecure"
"C++ wrapper for gRPC without SSL"
"${gRPC_CPP_VERSION}"
- "grpc_unsecure"
- "-lgrpc++_unsecure -labsl_statusor -labsl_status -labsl_raw_hash_set -labsl_hashtablez_sampler -labsl_synchronization -labsl_time -labsl_time_zone -labsl_civil_time -labsl_graphcycles_internal -labsl_symbolize -labsl_demangle_internal -labsl_malloc_internal -labsl_stacktrace -labsl_debugging_internal -labsl_exponential_biased -labsl_cord -labsl_str_format_internal -labsl_hash -labsl_bad_variant_access -labsl_bad_optional_access -labsl_strings -labsl_strings_internal -labsl_base -labsl_spinlock_wait -labsl_int128 -labsl_city -labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity"
+ "grpc_unsecure absl_base absl_flat_hash_map absl_inlined_vector absl_memory absl_optional absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time"
+ "-lgrpc++_unsecure"
""
"grpc++_unsecure.pc")
diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template
index 0a14440523..40cf7ff615 100644
--- a/templates/CMakeLists.txt.template
+++ b/templates/CMakeLists.txt.template
@@ -39,13 +39,20 @@
def get_absl_dep(lib_name):
return lib_map[lib_name].cmake_target
- def list_absl_lib_files_for(lib_name):
- ret = []
- lib = lib_map[lib_name]
- for dep in lib.transitive_deps:
- if is_absl_lib(dep) and len(lib_map[dep].src) > 0:
- ret.append(get_absl_dep(dep).replace("::", "_"))
- return ret
+ def lib_and_transitive_deps(lib):
+ return list(sorted(set({lib} | set(lib_map[lib].transitive_deps))))
+
+ def list_abseil_pkg_targets(lib):
+ # This returns a list of abseil pkg targets which the given lib and
+ # its non-abseil transitive dependencies depend on.
+ # As a result, internal abseil libraries are excluded from the result.
+ absl_specs = set()
+ for lib_name in lib_and_transitive_deps(lib):
+ if is_absl_lib(lib_name): continue
+ for dep in lib_map[lib_name].deps:
+ if is_absl_lib(dep):
+ absl_specs.add(get_absl_dep(dep).replace("::", "_"))
+ return list(sorted(absl_specs))
def is_shared_only_lib(lib_name):
"""Returns True if only shared library should be generated."""
@@ -53,7 +60,6 @@
# only makes sense as a shared lib.
return lib_name in ['grpc_csharp_ext']
-
def get_deps(target_dict):
deps = []
if target_dict.get('baselib', False) or target_dict['name'] == 'address_sorting':
@@ -739,8 +745,8 @@
"gpr"
"gRPC platform support library"
"<%text>${gRPC_CORE_VERSION}</%text>"
- ""
- "${" ".join(("-l" + l) for l in ["gpr",] + list_absl_lib_files_for("gpr"))}"
+ "${" ".join(list_abseil_pkg_targets("gpr"))}"
+ "${" ".join(("-l" + l) for l in ["gpr"])}"
""
"gpr.pc")
@@ -749,8 +755,8 @@
"gRPC"
"high performance general RPC framework"
"<%text>${gRPC_CORE_VERSION}</%text>"
- "gpr openssl"
- "${" ".join(("-l" + l) for l in ["grpc", "address_sorting", "re2", "upb", "cares", "z"] + list_absl_lib_files_for("grpc"))}"
+ "${" ".join(["gpr", "openssl"] + list_abseil_pkg_targets("grpc"))}"
+ "${" ".join(("-l" + l) for l in ["grpc", "address_sorting", "re2", "upb", "cares", "z"])}"
""
"grpc.pc")
@@ -759,8 +765,8 @@
"gRPC unsecure"
"high performance general RPC framework without SSL"
"<%text>${gRPC_CORE_VERSION}</%text>"
- "gpr"
- "${" ".join(("-l" + l) for l in ["grpc_unsecure",] + list_absl_lib_files_for("grpc_unsecure"))}"
+ "${" ".join(["gpr"] + list_abseil_pkg_targets("grpc_unsecure"))}"
+ "${" ".join(("-l" + l) for l in ["grpc_unsecure"])}"
""
"grpc_unsecure.pc")
@@ -769,8 +775,8 @@
"gRPC++"
"C++ wrapper for gRPC"
"<%text>${gRPC_CPP_VERSION}</%text>"
- "grpc"
- "${" ".join(("-l" + l) for l in ["grpc++",] + list_absl_lib_files_for("grpc++"))}"
+ "${" ".join(["grpc"] + list_abseil_pkg_targets("grpc++"))}"
+ "${" ".join(("-l" + l) for l in ["grpc++"])}"
""
"grpc++.pc")
@@ -779,7 +785,7 @@
"gRPC++ unsecure"
"C++ wrapper for gRPC without SSL"
"<%text>${gRPC_CPP_VERSION}</%text>"
- "grpc_unsecure"
- "${" ".join(("-l" + l) for l in ["grpc++_unsecure",] + list_absl_lib_files_for("grpc++_unsecure"))}"
+ "${" ".join(["grpc_unsecure"] + list_abseil_pkg_targets("grpc++_unsecure"))}"
+ "${" ".join(("-l" + l) for l in ["grpc++_unsecure"])}"
""
"grpc++_unsecure.pc")
--
2.26.2

View File

@ -1,3 +1,8 @@
Date: Sun Oct 11 16:14:38 UTC 2020
From: Atri Bhattacharya <badshah400@gmail.com>
Make path for pkgconfig file installation consistent with gRPC_INSTALL_LIBDIR specification
Index: grpc-1.34.0/CMakeLists.txt
===================================================================
--- grpc-1.34.0.orig/CMakeLists.txt

36
grpc-cxx17.patch Normal file
View File

@ -0,0 +1,36 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2021-06-03 01:08:48.201340252 +0200
absl changes behavior depending on -std=. It is built with the implied default -std=.
grpc must therefore do the sample (use standard -std=).
---
CMakeLists.txt | 15 ---------------
1 file changed, 15 deletions(-)
Index: grpc-1.38.0/CMakeLists.txt
===================================================================
--- grpc-1.38.0.orig/CMakeLists.txt
+++ grpc-1.38.0/CMakeLists.txt
@@ -189,21 +189,6 @@ if (NOT DEFINED CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 99)
endif()
-# Add c++11 flags
-if (NOT DEFINED CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 11)
-else()
- if (CMAKE_CXX_STANDARD LESS 11)
- message(FATAL_ERROR "CMAKE_CXX_STANDARD is less than 11, please specify at least SET(CMAKE_CXX_STANDARD 11)")
- endif()
-endif()
-if (NOT DEFINED CMAKE_CXX_STANDARD_REQUIRED)
- set(CMAKE_CXX_STANDARD_REQUIRED ON)
-endif()
-if (NOT DEFINED CMAKE_CXX_EXTENSIONS)
- set(CMAKE_CXX_EXTENSIONS OFF)
-endif()
-
if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE)
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
endif()

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Wed Jun 2 23:13:25 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
- Add grpc-cxx17.patch
-------------------------------------------------------------------
Fri May 21 11:24:40 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
- Update to release 1.38.0
* Invalidate ExecCtx now before computing timeouts in all
repeating timer events using a WorkSerializer or combiner.
* Fix use-after-unref bug in fault_injection_filter
* New gRPC EventEngine Interface
* Allow the AWS_DEFAULT_REGION environment variable
* s/OnServingStatusChange/OnServingStatusUpdate/
- Drop 0001-Use-absl-pkg-config-instead-of-linking-them-directly.patch
(merged)
-------------------------------------------------------------------
Fri May 14 10:01:43 UTC 2021 - Ferdinand Thiessen <rpm@fthiessen.de>

View File

@ -16,11 +16,11 @@
#
%define lver 15
%define lver 16
%define lverp 1
%define src_install_dir /usr/src/%name
Name: grpc
Version: 1.37.1
Version: 1.38.0
Release: 0
Summary: HTTP/2-based Remote Procedure Call implementation
License: Apache-2.0
@ -28,10 +28,8 @@ Group: Development/Tools/Building
URL: https://grpc.io/
Source: https://github.com/grpc/grpc/archive/v%version.tar.gz
Source2: %name-rpmlintrc
# PATCH-FIX-UPSTREAM grpc-correct-pkgconfig-path.patch badshah400@gmail.com -- Make path for pkgconfig file installation consistent with gRPC_INSTALL_LIBDIR specification
Patch1: grpc-correct-pkgconfig-path.patch
# PATCH-FIX-UPSTREAM 0001-Use-absl-pkg-config-instead-of-linking-them-directly.patch -- Keep track of devel dependencies
Patch2: 0001-Use-absl-pkg-config-instead-of-linking-them-directly.patch
Patch2: grpc-cxx17.patch
BuildRequires: abseil-cpp-devel
BuildRequires: cmake
BuildRequires: fdupes
@ -71,11 +69,11 @@ 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_plugin_support1_37
%package -n libgrpc_plugin_support1_38
Summary: HTTP/2-based Remote Procedure Call implementation - plugin support
Group: System/Libraries
%description -n libgrpc_plugin_support1_37
%description -n libgrpc_plugin_support1_38
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.
@ -98,7 +96,7 @@ Summary: Development files for grpc, a HTTP/2 Remote Procedure Call imple
Group: Development/Tools/Building
Requires: libgrpc%lver = %version
Requires: libgrpc++%lverp = %version
Requires: libgrpc_plugin_support1_37 = %version
Requires: libgrpc_plugin_support1_38 = %version
Requires: pkgconfig(libcares)
Requires: pkgconfig(re2)
@ -180,8 +178,8 @@ cp -r * "%buildroot/%src_install_dir"
%postun -n libgrpc%lver -p /sbin/ldconfig
%post -n libgrpc++%lverp -p /sbin/ldconfig
%postun -n libgrpc++%lverp -p /sbin/ldconfig
%post -n libgrpc_plugin_support1_37 -p /sbin/ldconfig
%postun -n libgrpc_plugin_support1_37 -p /sbin/ldconfig
%post -n libgrpc_plugin_support1_38 -p /sbin/ldconfig
%postun -n libgrpc_plugin_support1_38 -p /sbin/ldconfig
%post -n libupb%lver -p /sbin/ldconfig
%postun -n libupb%lver -p /sbin/ldconfig
@ -194,8 +192,8 @@ cp -r * "%buildroot/%src_install_dir"
%_libdir/libgrpc++*.so.%{lverp}*
%_libdir/libgrpcpp_channelz.so.%{lverp}*
%files -n libgrpc_plugin_support1_37
%_libdir/libgrpc_plugin_support.so.1.37*
%files -n libgrpc_plugin_support1_38
%_libdir/libgrpc_plugin_support.so.1.38*
%files -n libupb%lver
%_libdir/libupb*.so.%{lver}*

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:acf247ec3a52edaee5dee28644a4e485c5e5badf46bdb24a80ca1d76cb8f1174
size 8212731

3
v1.38.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:abd9e52c69000f2c051761cfa1f12d52d8b7647b6c66828a91d462e796f2aede
size 8296425