From 99cc36b0e3e673318275a11b7c9d2ed5ba0bc3e91b9beef4a43fd155a4ca38d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Rostecki?= Date: Thu, 10 Sep 2020 12:37:36 +0000 Subject: [PATCH 1/7] Accepting request 833341 from home:badshah400:branches:devel:tools - Drop python modules provided by python-grpcio source package in openSUSE:Factory. OBS-URL: https://build.opensuse.org/request/show/833341 OBS-URL: https://build.opensuse.org/package/show/devel:tools/grpc?expand=0&rev=62 --- grpc.changes | 6 ++++++ grpc.spec | 38 -------------------------------------- 2 files changed, 6 insertions(+), 38 deletions(-) diff --git a/grpc.changes b/grpc.changes index 9d5e577..6cdcda9 100644 --- a/grpc.changes +++ b/grpc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 9 22:43:27 UTC 2020 - Atri Bhattacharya + +- Drop python modules provided by python-grpcio source package in + openSUSE:Factory. + ------------------------------------------------------------------- Thu Mar 12 06:53:27 UTC 2020 - Tomáš Chvátal diff --git a/grpc.spec b/grpc.spec index a3335ed..a293af6 100644 --- a/grpc.spec +++ b/grpc.spec @@ -19,8 +19,6 @@ %define lver 8 %define lverp 1 %define src_install_dir /usr/src/%name -%bcond_without python2 -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: grpc Version: 1.25.0 Release: 0 @@ -30,14 +28,10 @@ Group: Development/Tools/Building URL: https://grpc.io/ Source: https://github.com/grpc/grpc/archive/v%version.tar.gz Source2: %name-rpmlintrc -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 BuildRequires: zypper BuildRequires: pkgconfig(libcares) BuildRequires: pkgconfig(openssl) >= 1.0.1 @@ -93,22 +87,6 @@ BuildArch: noarch %description -n grpc-source 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: libgrpc%lver = %version-%release - -%description -n python2-grpcio -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: libgrpc%lver = %version-%release - -%description -n python3-grpcio -This subpackage contains the python3 bindings. - %prep %autosetup -p1 @@ -121,13 +99,6 @@ export CFLAGS="%optflags -Wno-error" export CXXFLAGS="$CFLAGS" make %{?_smp_mflags} STRIP=/bin/true V=1 VERBOSE=1 -# build python module -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 -%python_build - %install b="%buildroot" # work around "Argument list too long" @@ -143,7 +114,6 @@ if test ! -d lib64 && test "%_lib" = lib64; then mv lib lib64 fi popd -%python_install # Install sources make clean @@ -178,12 +148,4 @@ cp -r * "%buildroot/%src_install_dir" %files source %src_install_dir -%if %{with python2} -%files -n python2-grpcio -%python2_sitearch/grpc* -%endif - -%files -n python3-grpcio -%python3_sitearch/grpc* - %changelog From effca5875f1d8fe61ca1f3bc2b317df3d058180b65ffedb4ca1da4c6902516b2 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 10 Sep 2020 15:19:49 +0000 Subject: [PATCH 2/7] Accepting request 833510 from home:badshah400:branches:devel:tools * Update to version 1.32.0. * Use cmake to configure and cmake macros to build and install. * New BuildRequires: abseil-cpp-source and pkgconfig(re2); copy abseil-cpp-source contents into source's third_party dir and build it as a module (since we don't have the actual abseil-cpp library built for openSUSE. * Add grpc-find-re2-via-pkgconfig.patch to enable finding system Re2 library via pkg-config; taken from upstream PR gh#grpc/grpc#24088. * Split out new shared lib package libgrpc_plugin_support1 for supporting grpc plugins. OBS-URL: https://build.opensuse.org/request/show/833510 OBS-URL: https://build.opensuse.org/package/show/devel:tools/grpc?expand=0&rev=63 --- grpc-find-re2-via-pkgconfig.patch | 120 ++++++++++++++++++++++++++++++ grpc.changes | 40 ++++++++++ grpc.spec | 53 ++++++++++--- v1.25.0.tar.gz | 3 - v1.32.0.tar.gz | 3 + 5 files changed, 207 insertions(+), 12 deletions(-) create mode 100644 grpc-find-re2-via-pkgconfig.patch delete mode 100644 v1.25.0.tar.gz create mode 100644 v1.32.0.tar.gz diff --git a/grpc-find-re2-via-pkgconfig.patch b/grpc-find-re2-via-pkgconfig.patch new file mode 100644 index 0000000..3800569 --- /dev/null +++ b/grpc-find-re2-via-pkgconfig.patch @@ -0,0 +1,120 @@ +From 45e413d2520795e7281e9a592af81620349bc186 Mon Sep 17 00:00:00 2001 +From: Paul Wankadia +Date: Wed, 9 Sep 2020 04:26:36 -0700 +Subject: [PATCH] Attempt to find RE2 via CMake and via pkg-config. + +--- + CMakeLists.txt | 1 + + cmake/modules/Findre2.cmake | 58 +++++++++++++++++++++++++++++++ + cmake/re2.cmake | 6 +--- + templates/CMakeLists.txt.template | 1 + + 4 files changed, 61 insertions(+), 5 deletions(-) + create mode 100644 cmake/modules/Findre2.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4b04d25ac50..cecb4396c57 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15624,6 +15624,7 @@ install(FILES + ) + install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/Findc-ares.cmake ++ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/Findre2.cmake + DESTINATION ${gRPC_INSTALL_CMAKEDIR}/modules + ) + +diff --git a/cmake/modules/Findre2.cmake b/cmake/modules/Findre2.cmake +new file mode 100644 +index 00000000000..41df4547138 +--- /dev/null ++++ b/cmake/modules/Findre2.cmake +@@ -0,0 +1,58 @@ ++# Copyright 2017 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. ++ ++find_package(re2 QUIET CONFIG) ++if(re2_FOUND) ++ message(STATUS "Found RE2 via CMake.") ++ return() ++endif() ++ ++find_package(PkgConfig REQUIRED) ++# TODO(junyer): Use the IMPORTED_TARGET option whenever CMake 3.6 (or newer) ++# becomes the minimum required: that will take care of the add_library() and ++# set_property() calls; then we can simply alias PkgConfig::RE2 as re2::re2. ++# For now, we can only set INTERFACE_* properties that existed in CMake 3.5. ++pkg_check_modules(RE2 QUIET re2) ++if(RE2_FOUND) ++ set(re2_FOUND "${RE2_FOUND}") ++ add_library(re2::re2 INTERFACE IMPORTED) ++ if(RE2_INCLUDE_DIRS) ++ set_property(TARGET re2::re2 PROPERTY ++ INTERFACE_INCLUDE_DIRECTORIES "${RE2_INCLUDE_DIRS}") ++ endif() ++ if(RE2_CFLAGS_OTHER) ++ # Filter out the -std flag, which is handled by CMAKE_CXX_STANDARD. ++ # TODO(junyer): Use the FILTER option whenever CMake 3.6 (or newer) ++ # becomes the minimum required: that will allow this to be concise. ++ foreach(flag IN LISTS RE2_CFLAGS_OTHER) ++ if("${flag}" MATCHES "^-std=") ++ list(REMOVE_ITEM RE2_CFLAGS_OTHER "${flag}") ++ endif() ++ endforeach() ++ set_property(TARGET re2::re2 PROPERTY ++ INTERFACE_COMPILE_OPTIONS "${RE2_CFLAGS_OTHER}") ++ endif() ++ if(RE2_LDFLAGS) ++ set_property(TARGET re2::re2 PROPERTY ++ INTERFACE_LINK_LIBRARIES "${RE2_LDFLAGS}") ++ endif() ++ message(STATUS "Found RE2 via pkg-config.") ++ return() ++endif() ++ ++if(re2_FIND_REQUIRED) ++ message(FATAL_ERROR "Failed to find RE2.") ++elseif(NOT re2_FIND_QUIETLY) ++ message(WARNING "Failed to find RE2.") ++endif() +diff --git a/cmake/re2.cmake b/cmake/re2.cmake +index 3e83aae6910..974b0a436e2 100644 +--- a/cmake/re2.cmake ++++ b/cmake/re2.cmake +@@ -45,13 +45,9 @@ if(gRPC_RE2_PROVIDER STREQUAL "module") + set(gRPC_INSTALL FALSE) + endif() + elseif(gRPC_RE2_PROVIDER STREQUAL "package") +- find_package(re2 REQUIRED CONFIG) +- ++ find_package(re2 REQUIRED) + if(TARGET re2::re2) + set(_gRPC_RE2_LIBRARIES re2::re2) +- else() +- set(_gRPC_RE2_LIBRARIES ${RE2_LIBRARIES}) + endif() +- set(_gRPC_RE2_INCLUDE_DIR ${RE2_INCLUDE_DIRS}) + set(_gRPC_FIND_RE2 "if(NOT re2_FOUND)\n find_package(re2)\nendif()") + endif() +diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template +index c7f2556dc92..f7db0fd2d0c 100644 +--- a/templates/CMakeLists.txt.template ++++ b/templates/CMakeLists.txt.template +@@ -706,6 +706,7 @@ + ) + install(FILES + <%text>${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/Findc-ares.cmake ++ <%text>${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/Findre2.cmake + DESTINATION <%text>${gRPC_INSTALL_CMAKEDIR}/modules + ) + diff --git a/grpc.changes b/grpc.changes index 6cdcda9..243f79f 100644 --- a/grpc.changes +++ b/grpc.changes @@ -1,3 +1,43 @@ +------------------------------------------------------------------- +Thu Sep 10 14:33:01 UTC 2020 - Atri Bhattacharya + +- Update to version 1.32.0: + * Core + - Remove stream from stalled lists on remove_stream + (gh#grpc/grpc#23984). + - Do not cancel RPC if send metadata size if larger than + peer's limit (gh#grpc/grpc#23806). + - Don't consider receiving non-OK status as an error for HTTP2 + (gh#grpc/grpc#19545). + - Keepalive throttling (gh#grpc/grpc#23313). + - Include the target_uri in "target uri is not valid" error + messages (gh#grpc/grpc#23782). + - Fix "cannot send compressed message large than 1024B" in + cronet_transport (gh#grpc/grpc#23219). + - Receive SETTINGS frame on clients before declaring + subchannel READY (gh#grpc/grpc#23636). + - Enabled GPR_ABSEIL_SYNC (gh#grpc/grpc#23372). + - Experimental xDS v3 support (gh#grpc/grpc#23281). + * C++ + - Upgrade bazel used for all tests to 2.2.0 + (gh#grpc/grpc#23902). + - Remove test targets and test helper libraries from Makefile + (gh#grpc/grpc#23813). + - Fix repeated builds broken by re2's cmake + (gh#grpc/grpc#23587). + - Log the peer address of grpc_cli CallMethod RPCs to stderr + (gh#grpc/grpc#23557). +- Use cmake to configure and cmake macros to build and install. +- New BuildRequires: abseil-cpp-source and pkgconfig(re2); copy + abseil-cpp-source contents into source's third_party dir and + build it as a module (since we don't have the actual abseil-cpp + library built for openSUSE. +- Add grpc-find-re2-via-pkgconfig.patch to enable finding system + Re2 library via pkg-config; taken from upstream PR + gh#grpc/grpc#24088. +- Split out new shared lib package libgrpc_plugin_support1 for + supporting grpc plugins. + ------------------------------------------------------------------- Wed Sep 9 22:43:27 UTC 2020 - Atri Bhattacharya diff --git a/grpc.spec b/grpc.spec index a293af6..0ce4b17 100644 --- a/grpc.spec +++ b/grpc.spec @@ -16,11 +16,12 @@ # -%define lver 8 +%define lver 12 %define lverp 1 +%define lverplugin 1 %define src_install_dir /usr/src/%name Name: grpc -Version: 1.25.0 +Version: 1.32.0 Release: 0 Summary: HTTP/2-based Remote Procedure Call implementation License: Apache-2.0 @@ -28,6 +29,9 @@ 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-find-re2-via-pkgconfig.patch gh#grpc/grpc#24088 badshah400@gmail.com -- Attempt to find Re2 library via pkg-config; patch taken from upstream PR +Patch0: grpc-find-re2-via-pkgconfig.patch +BuildRequires: abseil-cpp-source BuildRequires: cmake BuildRequires: fdupes BuildRequires: gcc-c++ @@ -36,6 +40,7 @@ BuildRequires: zypper BuildRequires: pkgconfig(libcares) BuildRequires: pkgconfig(openssl) >= 1.0.1 BuildRequires: pkgconfig(protobuf) >= 3.8.0 +BuildRequires: pkgconfig(re2) BuildRequires: pkgconfig(zlib) %description @@ -69,11 +74,23 @@ 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_support%lverplugin +Summary: HTTP/2-based Remote Procedure Call implementation - plugin support +Group: System/Libraries + +%description -n libgrpc_plugin_support%lverplugin +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. + +This package provides the shared library to support plugins for grpc. + %package devel Summary: Development files for grpc, a HTTP/2 Remote Procedure Call implementation Group: Development/Tools/Building Requires: libgrpc%lver = %version Requires: libgrpc++%lverp = %version +Requires: libgrpc-plugin-support%lverplugin = %version %description devel This subpackage contains libraries and header files for developing @@ -89,6 +106,8 @@ This subpackage contains source code of the gRPC reference implementation. %prep %autosetup -p1 +# Copy abseil-cpp source into empty third_party/abseil-cpp dir +cp -r %_prefix/src/abseil-cpp/* third_party/abseil-cpp/ %build %define _lto_cflags %nil @@ -97,28 +116,37 @@ mkdir -p third_party/protobuf/src export CFLAGS="%optflags -Wno-error" export CXXFLAGS="$CFLAGS" -make %{?_smp_mflags} STRIP=/bin/true V=1 VERBOSE=1 +%cmake -DgRPC_INSTALL=ON \ + -DgRPC_ABSL_PROVIDER=module \ + -DgRPC_CARES_PROVIDER=package \ + -DgRPC_PROTOBUF_PROVIDER=package \ + -DgRPC_RE2_PROVIDER=package \ + -DgRPC_SSL_PROVIDER=package \ + -DgRPC_ZLIB_PROVIDER=package +%cmake_build %install b="%buildroot" # work around "Argument list too long" ln -s "%buildroot" "b" -%make_install DESTDIR="b" prefix="b/%_prefix" STRIP=/bin/true V=1 VERBOSE=1 +%cmake_install -find "$b/%_includedir" -type f -exec chmod a-x {} + pushd "$b/usr" rm -fv lib/*.a share/grpc/*.pem -perl -i -pe 's{^prefix=.*}{prefix=%_prefix}' lib/pkgconfig/*.pc -perl -i -pe 's{^libdir=.*}{libdir=%_libdir}' lib/pkgconfig/*.pc if test ! -d lib64 && test "%_lib" = lib64; then mv lib lib64 fi popd # Install sources +pushd %__builddir make clean -rm -f "b" "a.out" -find . -type f "(" -name "*.so" -o -name "*.o" -o -name ".git*" ")" -exec rm -rf {} + +rm -f "b" +find . -type f "(" -name "*.so" -o -name "*.o" -o -name ".git*" -o -name "*.bin" -o -name "*.out" ")" -exec rm -rf {} + +popd +# Don't include abseil-cpp in sources +rm -fr third_party/abseil-cpp/* + mkdir -p "%buildroot/%src_install_dir" cp -r * "%buildroot/%src_install_dir" @@ -128,22 +156,29 @@ 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_support%lverplugin -p /sbin/ldconfig +%postun -n libgrpc_plugin_support%lverplugin -p /sbin/ldconfig %files -n libgrpc%lver %_libdir/libaddress_sorting.so.%{lver}* %_libdir/libgpr*.so.%{lver}* %_libdir/libgrpc*.so.%{lver}* +%_libdir/libupb*.so.%{lver}* %files -n libgrpc++%lverp %_libdir/libgrpc++*.so.%{lverp}* %_libdir/libgrpcpp_channelz.so.%{lverp}* +%files -n libgrpc_plugin_support%lverplugin +%_libdir/libgrpc_plugin_support.so.%{lverplugin}* + %files devel %license LICENSE %_bindir/* %_includedir/* %_libdir/pkgconfig/*.pc %_libdir/*.so +%_libdir/cmake/grpc/ %files source %src_install_dir diff --git a/v1.25.0.tar.gz b/v1.25.0.tar.gz deleted file mode 100644 index 2d17dbd..0000000 --- a/v1.25.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ffbe61269160ea745e487f79b0fd06b6edd3d50c6d9123f053b5634737cf2f69 -size 16460163 diff --git a/v1.32.0.tar.gz b/v1.32.0.tar.gz new file mode 100644 index 0000000..a8e27e8 --- /dev/null +++ b/v1.32.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f880ebeb2ccf0e47721526c10dd97469200e40b5f101a0d9774eb69efa0bd07a +size 7174251 From f6968b801ef332ce397bd683bfcb437be75913f06bd81140b1aaddf3a7d47dd0 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 12 Sep 2020 22:11:48 +0000 Subject: [PATCH 3/7] - Drop now-obsolescent Conflicts. OBS-URL: https://build.opensuse.org/package/show/devel:tools/grpc?expand=0&rev=64 --- grpc.changes | 5 +++++ grpc.spec | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/grpc.changes b/grpc.changes index 243f79f..598709a 100644 --- a/grpc.changes +++ b/grpc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Sep 12 22:11:30 UTC 2020 - Jan Engelhardt + +- Drop now-obsolescent Conflicts. + ------------------------------------------------------------------- Thu Sep 10 14:33:01 UTC 2020 - Atri Bhattacharya diff --git a/grpc.spec b/grpc.spec index 0ce4b17..81b1982 100644 --- a/grpc.spec +++ b/grpc.spec @@ -51,10 +51,6 @@ Protocol Buffers as the Interface Definition Language by default. %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 libgrpc%lver The reference implementation of the gRPC protocol, done on top of From 429cc9c84637f5b2e93898f54bb7a1ba286decd9b75fb7f121451b3b005c6d8c Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 17 Sep 2020 13:21:11 +0000 Subject: [PATCH 4/7] - Fixup 1.32.0 update with wrong grpc-devel -> libgrpc-support-plugin1 require. OBS-URL: https://build.opensuse.org/package/show/devel:tools/grpc?expand=0&rev=65 --- grpc.changes | 6 ++++++ grpc.spec | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/grpc.changes b/grpc.changes index 598709a..0f5c775 100644 --- a/grpc.changes +++ b/grpc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Sep 17 13:14:42 UTC 2020 - Jan Engelhardt + +- Fixup 1.32.0 update with wrong grpc-devel -> + libgrpc-support-plugin1 require. + ------------------------------------------------------------------- Sat Sep 12 22:11:30 UTC 2020 - Jan Engelhardt diff --git a/grpc.spec b/grpc.spec index 81b1982..d792c9b 100644 --- a/grpc.spec +++ b/grpc.spec @@ -86,7 +86,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-support%lverplugin = %version +Requires: libgrpc_plugin_support%lverplugin = %version %description devel This subpackage contains libraries and header files for developing From 89dc3d2012c5dd7421f764af546b2d0a9b4a0b1c03f575fad0277d931decf97b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Rostecki?= Date: Fri, 18 Sep 2020 21:58:49 +0000 Subject: [PATCH 5/7] Accepting request 835473 from home:badshah400:branches:devel:tools (Flagged by oS:F:Staging for sr#835204) Add pkgconfig(re2) to list of Requires for grpc-devel package. OBS-URL: https://build.opensuse.org/request/show/835473 OBS-URL: https://build.opensuse.org/package/show/devel:tools/grpc?expand=0&rev=66 --- grpc.changes | 5 +++++ grpc.spec | 1 + 2 files changed, 6 insertions(+) diff --git a/grpc.changes b/grpc.changes index 0f5c775..08c9ba3 100644 --- a/grpc.changes +++ b/grpc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Sep 18 19:53:23 UTC 2020 - Atri Bhattacharya + +- Add pkgconfig(re2) to list of Requires for grpc-devel package. + ------------------------------------------------------------------- Thu Sep 17 13:14:42 UTC 2020 - Jan Engelhardt diff --git a/grpc.spec b/grpc.spec index d792c9b..ac8be7f 100644 --- a/grpc.spec +++ b/grpc.spec @@ -87,6 +87,7 @@ Group: Development/Tools/Building Requires: libgrpc%lver = %version Requires: libgrpc++%lverp = %version Requires: libgrpc_plugin_support%lverplugin = %version +Requires: pkgconfig(re2) %description devel This subpackage contains libraries and header files for developing From 1090425ed4e2fda0d440208164a5e4b49569542c5ee7d4196dc85f73855a3ed9 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Tue, 29 Sep 2020 05:54:34 +0000 Subject: [PATCH 6/7] Accepting request 836136 from home:mrostecki:branches:devel:tools - Add new subpackages - libupb and upb-devel. Currently, grpc sources include also upb sources. Before this change, libupb and upb-devel used to be included in a separate package - upb. OBS-URL: https://build.opensuse.org/request/show/836136 OBS-URL: https://build.opensuse.org/package/show/devel:tools/grpc?expand=0&rev=67 --- grpc.changes | 7 +++++++ grpc.spec | 32 +++++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/grpc.changes b/grpc.changes index 08c9ba3..4b88e72 100644 --- a/grpc.changes +++ b/grpc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Sep 22 16:37:51 UTC 2020 - Michał Rostecki + +- Add new subpackages - libupb and upb-devel. Currently, grpc + sources include also upb sources. Before this change, libupb and + upb-devel used to be included in a separate package - upb. + ------------------------------------------------------------------- Fri Sep 18 19:53:23 UTC 2020 - Atri Bhattacharya diff --git a/grpc.spec b/grpc.spec index ac8be7f..51bf0fe 100644 --- a/grpc.spec +++ b/grpc.spec @@ -81,6 +81,17 @@ Protocol Buffers as the Interface Definition Language by default. This package provides the shared library to support plugins for grpc. +%package -n libupb%lver +Summary: A small protobuf implementation in C +Group: System/Libraries + +%description -n libupb%lver +μpb (often written 'upb') is a small protobuf implementation written in C. + +upb generates a C API for creating, parsing, and serializing messages as +declared in .proto files. upb is heavily arena-based: all messages always live +in an arena (note: the arena can live in stack or static memory if desired). + %package devel Summary: Development files for grpc, a HTTP/2 Remote Procedure Call implementation Group: Development/Tools/Building @@ -93,6 +104,20 @@ Requires: pkgconfig(re2) This subpackage contains libraries and header files for developing applications that want to make use of the gRPC reference implementation. +%package -n upb-devel +Summary: Developmnt files for upb +Group: Development/Tools/Building +Requires: libupb%lver = %version + +%description -n upb-devel +μpb (often written 'upb') is a small protobuf implementation written in C. + +upb generates a C API for creating, parsing, and serializing messages as +declared in .proto files. upb is heavily arena-based: all messages always live +in an arena (note: the arena can live in stack or static memory if desired). + +This package provides development files for upb. + %package source Summary: Source code of gRPC Group: Development/Sources @@ -160,7 +185,6 @@ cp -r * "%buildroot/%src_install_dir" %_libdir/libaddress_sorting.so.%{lver}* %_libdir/libgpr*.so.%{lver}* %_libdir/libgrpc*.so.%{lver}* -%_libdir/libupb*.so.%{lver}* %files -n libgrpc++%lverp %_libdir/libgrpc++*.so.%{lverp}* @@ -169,6 +193,9 @@ cp -r * "%buildroot/%src_install_dir" %files -n libgrpc_plugin_support%lverplugin %_libdir/libgrpc_plugin_support.so.%{lverplugin}* +%files -n libupb%lver +%_libdir/libupb*.so.%{lver}* + %files devel %license LICENSE %_bindir/* @@ -177,6 +204,9 @@ cp -r * "%buildroot/%src_install_dir" %_libdir/*.so %_libdir/cmake/grpc/ +%files -n upb-devel +%_libdir/libupb*.so + %files source %src_install_dir From b249206e2fad6d54a240a0b70bf7065bcdfe2ad62154be2db9007396dc8f146a Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 11 Oct 2020 17:32:37 +0000 Subject: [PATCH 7/7] Accepting request 841058 from home:badshah400:branches:devel:tools (Fixes for libdir path flagged in sr#838414) - Specify gRPC_INSTALL_LIBDIR and gRPC_INSTALL_CMAKEDIR to correctly configure install paths for libraries and cmake files instead of moving them after the installation. - Add grpc-correct-pkgconfig-path.patch to fix install path for pkgconfig file relative to gRPC_INSTALL_LIBDIR. - Add Requires: pkgconfig(libcares) for the -devel pkg. OBS-URL: https://build.opensuse.org/request/show/841058 OBS-URL: https://build.opensuse.org/package/show/devel:tools/grpc?expand=0&rev=68 --- grpc-correct-pkgconfig-path.patch | 13 +++++++++++++ grpc.changes | 10 ++++++++++ grpc.spec | 20 +++++++++++--------- 3 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 grpc-correct-pkgconfig-path.patch diff --git a/grpc-correct-pkgconfig-path.patch b/grpc-correct-pkgconfig-path.patch new file mode 100644 index 0000000..760a8a1 --- /dev/null +++ b/grpc-correct-pkgconfig-path.patch @@ -0,0 +1,13 @@ +Index: grpc-1.32.0/CMakeLists.txt +=================================================================== +--- grpc-1.32.0.orig/CMakeLists.txt ++++ grpc-1.32.0/CMakeLists.txt +@@ -15667,7 +15667,7 @@ function(generate_pkgconfig name descrip + "${output_filepath}" + @ONLY) + install(FILES "${output_filepath}" +- DESTINATION "lib/pkgconfig/") ++ DESTINATION "${gRPC_INSTALL_LIBDIR}/pkgconfig/") + endfunction() + + # gpr .pc file diff --git a/grpc.changes b/grpc.changes index 4b88e72..36f63cd 100644 --- a/grpc.changes +++ b/grpc.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Sun Oct 11 16:14:38 UTC 2020 - Atri Bhattacharya + +- Specify gRPC_INSTALL_LIBDIR and gRPC_INSTALL_CMAKEDIR to + correctly configure install paths for libraries and cmake files + instead of moving them after the installation. +- Add grpc-correct-pkgconfig-path.patch to fix install path for + pkgconfig file relative to gRPC_INSTALL_LIBDIR. +- Add Requires: pkgconfig(libcares) for the -devel pkg. + ------------------------------------------------------------------- Tue Sep 22 16:37:51 UTC 2020 - Michał Rostecki diff --git a/grpc.spec b/grpc.spec index 51bf0fe..e1ee078 100644 --- a/grpc.spec +++ b/grpc.spec @@ -31,6 +31,8 @@ Source: https://github.com/grpc/grpc/archive/v%version.tar.gz Source2: %name-rpmlintrc # PATCH-FIX-UPSTREAM grpc-find-re2-via-pkgconfig.patch gh#grpc/grpc#24088 badshah400@gmail.com -- Attempt to find Re2 library via pkg-config; patch taken from upstream PR Patch0: grpc-find-re2-via-pkgconfig.patch +# 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 BuildRequires: abseil-cpp-source BuildRequires: cmake BuildRequires: fdupes @@ -98,6 +100,7 @@ Group: Development/Tools/Building Requires: libgrpc%lver = %version Requires: libgrpc++%lverp = %version Requires: libgrpc_plugin_support%lverplugin = %version +Requires: pkgconfig(libcares) Requires: pkgconfig(re2) %description devel @@ -138,12 +141,14 @@ mkdir -p third_party/protobuf/src export CFLAGS="%optflags -Wno-error" export CXXFLAGS="$CFLAGS" -%cmake -DgRPC_INSTALL=ON \ - -DgRPC_ABSL_PROVIDER=module \ - -DgRPC_CARES_PROVIDER=package \ - -DgRPC_PROTOBUF_PROVIDER=package \ - -DgRPC_RE2_PROVIDER=package \ - -DgRPC_SSL_PROVIDER=package \ +%cmake -DgRPC_INSTALL=ON \ + -DgRPC_INSTALL_LIBDIR:PATH="%_lib" \ + -DgRPC_INSTALL_CMAKEDIR:PATH="%_libdir"/cmake/grpc \ + -DgRPC_ABSL_PROVIDER=module \ + -DgRPC_CARES_PROVIDER=package \ + -DgRPC_PROTOBUF_PROVIDER=package \ + -DgRPC_RE2_PROVIDER=package \ + -DgRPC_SSL_PROVIDER=package \ -DgRPC_ZLIB_PROVIDER=package %cmake_build @@ -155,9 +160,6 @@ ln -s "%buildroot" "b" pushd "$b/usr" rm -fv lib/*.a share/grpc/*.pem -if test ! -d lib64 && test "%_lib" = lib64; then - mv lib lib64 -fi popd # Install sources