From d44589f8b07435b0b1f052f087c6b508b9ed614d16d2622a1ed0a96e82e38ea0 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Wed, 19 Apr 2017 13:05:25 +0000 Subject: [PATCH] Accepting request 489305 from home:jengelh:dev with .changes OBS-URL: https://build.opensuse.org/request/show/489305 OBS-URL: https://build.opensuse.org/package/show/devel:tools/grpc?expand=0&rev=1 --- .gitattributes | 23 +++++++++ .gitignore | 1 + grpc-protobuf.diff | 24 +++++++++ grpc-versioning.diff | 93 ++++++++++++++++++++++++++++++++++ grpc-zlib.diff | 37 ++++++++++++++ grpc.changes | 4 ++ grpc.spec | 115 +++++++++++++++++++++++++++++++++++++++++++ v1.2.3.tar.gz | 3 ++ 8 files changed, 300 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 grpc-protobuf.diff create mode 100644 grpc-versioning.diff create mode 100644 grpc-zlib.diff create mode 100644 grpc.changes create mode 100644 grpc.spec create mode 100644 v1.2.3.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/grpc-protobuf.diff b/grpc-protobuf.diff new file mode 100644 index 0000000..fda4c5c --- /dev/null +++ b/grpc-protobuf.diff @@ -0,0 +1,24 @@ + +[ 12s] CMakeFiles/grpc_plugin_support.dir/src/compiler/csharp_generator.cc.o: In function `grpc_csharp_generator::(anonymous namespace)::GetMethodRequestParamMaybe(google::protobuf::MethodDescriptor const*, bool)': +[ 12s] /home/abuild/rpmbuild/BUILD/grpc-1.2.3/src/compiler/csharp_generator.cc:236: undefined reference to `google::protobuf::compiler::csharp::GetClassName[abi:cxx11](google::protobuf::Descriptor const*)' + +--- + CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) + +Index: grpc-1.2.3/CMakeLists.txt +=================================================================== +--- grpc-1.2.3.orig/CMakeLists.txt ++++ grpc-1.2.3/CMakeLists.txt +@@ -166,6 +166,11 @@ elseif("${gRPC_PROTOBUF_PROVIDER}" STREQ + set(_gRPC_FIND_PROTOBUF "if(NOT protobuf_FOUND)\n find_package(protobuf CONFIG)\nendif()") + else() + find_package(Protobuf MODULE) ++ if(PROTOBUF_FOUND) ++ set(_gRPC_PROTOBUF_PROTOC_LIBRARIES ${PROTOBUF_PROTOC_LIBRARIES}) ++ set(_gRPC_PROTOBUF_PROTOC ${PROTOBUF_PROTOC_EXECUTABLE}) ++ set(_gRPC_PROTOBUF_LIBRARIES ${PROTOBUF_LIBRARIES}) ++ endif() + set(_gRPC_FIND_PROTOBUF "if(NOT Protobuf_FOUND)\n find_package(Protobuf)\nendif()") + endif() + endif() diff --git a/grpc-versioning.diff b/grpc-versioning.diff new file mode 100644 index 0000000..19ad246 --- /dev/null +++ b/grpc-versioning.diff @@ -0,0 +1,93 @@ +From: Jan Engelhardt +Date: 2017-04-19 10:07:43.563879307 +0200 + +Unversioned libraries are an ABI nightmare, so work around that in short order. + +--- + CMakeLists.txt | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +Index: grpc-1.2.3/CMakeLists.txt +=================================================================== +--- grpc-1.2.3.orig/CMakeLists.txt ++++ grpc-1.2.3/CMakeLists.txt +@@ -735,6 +735,7 @@ add_library(gpr + src/core/lib/support/tmpfile_windows.c + src/core/lib/support/wrap_memcpy.c + ) ++set_target_properties(gpr PROPERTIES OUTPUT_NAME "gpr-${PACKAGE_VERSION}") + + if(WIN32 AND MSVC) + set_target_properties(gpr PROPERTIES COMPILE_PDB_NAME "gpr" +@@ -1083,6 +1084,7 @@ add_library(grpc + src/core/ext/census/tracing.c + src/core/plugin_registry/grpc_plugin_registry.c + ) ++set_target_properties(grpc PROPERTIES OUTPUT_NAME "grpc-${PACKAGE_VERSION}") + + if(WIN32 AND MSVC) + set_target_properties(grpc PROPERTIES COMPILE_PDB_NAME "grpc" +@@ -1364,6 +1366,7 @@ add_library(grpc_cronet + src/core/ext/load_reporting/load_reporting_filter.c + src/core/plugin_registry/grpc_cronet_plugin_registry.c + ) ++set_target_properties(grpc_cronet PROPERTIES OUTPUT_NAME "grpc_cronet-${PACKAGE_VERSION}") + + if(WIN32 AND MSVC) + set_target_properties(grpc_cronet PROPERTIES COMPILE_PDB_NAME "grpc_cronet" +@@ -1909,6 +1912,7 @@ add_library(grpc_unsecure + src/core/ext/census/tracing.c + src/core/plugin_registry/grpc_unsecure_plugin_registry.c + ) ++set_target_properties(grpc_unsecure PROPERTIES OUTPUT_NAME "grpc_unsecure-${PACKAGE_VERSION}") + + if(WIN32 AND MSVC) + set_target_properties(grpc_unsecure PROPERTIES COMPILE_PDB_NAME "grpc_unsecure" +@@ -2110,6 +2114,7 @@ add_library(grpc++ + src/cpp/util/time_cc.cc + src/cpp/codegen/codegen_init.cc + ) ++set_target_properties(grpc++ PROPERTIES OUTPUT_NAME "grpc++-${PACKAGE_VERSION}") + + if(WIN32 AND MSVC) + set_target_properties(grpc++ PROPERTIES COMPILE_PDB_NAME "grpc++" +@@ -2479,6 +2484,7 @@ add_library(grpc++_cronet + third_party/nanopb/pb_decode.c + third_party/nanopb/pb_encode.c + ) ++set_target_properties(grpc++_cronet PROPERTIES OUTPUT_NAME "grpc++_cronet-${PACKAGE_VERSION}") + + if(WIN32 AND MSVC) + set_target_properties(grpc++_cronet PROPERTIES COMPILE_PDB_NAME "grpc++_cronet" +@@ -2700,6 +2706,7 @@ add_library(grpc++_reflection + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h + ) ++set_target_properties(grpc++_reflection PROPERTIES OUTPUT_NAME "grpc++_reflection-${PACKAGE_VERSION}") + + if(WIN32 AND MSVC) + set_target_properties(grpc++_reflection PROPERTIES COMPILE_PDB_NAME "grpc++_reflection" +@@ -2967,6 +2974,7 @@ add_library(grpc++_unsecure + src/cpp/util/time_cc.cc + src/cpp/codegen/codegen_init.cc + ) ++set_target_properties(grpc++_unsecure PROPERTIES OUTPUT_NAME "grpc++_unsecure-${PACKAGE_VERSION}") + + if(WIN32 AND MSVC) + set_target_properties(grpc++_unsecure PROPERTIES COMPILE_PDB_NAME "grpc++_unsecure" +@@ -3226,6 +3234,7 @@ add_library(grpc_plugin_support + src/compiler/python_generator.cc + src/compiler/ruby_generator.cc + ) ++set_target_properties(grpc_plugin_support PROPERTIES OUTPUT_NAME "grpc_plugin_support-${PACKAGE_VERSION}") + + if(WIN32 AND MSVC) + set_target_properties(grpc_plugin_support PROPERTIES COMPILE_PDB_NAME "grpc_plugin_support" +@@ -3703,6 +3712,7 @@ endif (gRPC_BUILD_TESTS) + add_library(grpc_csharp_ext SHARED + src/csharp/ext/grpc_csharp_ext.c + ) ++set_target_properties(grpc_csharp_ext PROPERTIES OUTPUT_NAME "grpc_csharp_ext-${PACKAGE_VERSION}") + + if(WIN32 AND MSVC) + set_target_properties(grpc_csharp_ext PROPERTIES COMPILE_PDB_NAME "grpc_csharp_ext" diff --git a/grpc-zlib.diff b/grpc-zlib.diff new file mode 100644 index 0000000..66ddca9 --- /dev/null +++ b/grpc-zlib.diff @@ -0,0 +1,37 @@ +[ 24s] CMakeFiles/grpc_unsecure.dir/src/core/lib/compression/message_compress.c.o: In function `zlib_compress': +[ 24s] /home/abuild/rpmbuild/BUILD/grpc-1.2.3/src/core/lib/compression/message_compress.c:112: undefined reference to `deflateInit2_' + +--- + CMakeLists.txt | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +Index: grpc-1.2.3/CMakeLists.txt +=================================================================== +--- grpc-1.2.3.orig/CMakeLists.txt ++++ grpc-1.2.3/CMakeLists.txt +@@ -121,7 +121,7 @@ if("${gRPC_ZLIB_PROVIDER}" STREQUAL "mod + elseif("${gRPC_ZLIB_PROVIDER}" STREQUAL "package") + find_package(ZLIB) + if(TARGET ZLIB::ZLIB) +- set(_gRPC_ZLIB_LIBRARIES ZLIB::ZLIB) ++ set(_gRPC_ZLIB_LIBRARIES ${ZLIB_LIBRARIES}) + endif() + set(_gRPC_FIND_ZLIB "if(NOT ZLIB_FOUND)\n find_package(ZLIB)\nendif()") + endif() +@@ -242,7 +242,7 @@ if(NOT MSVC) + endif() + + if(UNIX) +- set(_gRPC_ALLTARGETS_LIBRARIES dl rt m pthread) ++ set(_gRPC_ALLTARGETS_LIBRARIES dl rt m pthread z) + endif() + + if(WIN32 AND MSVC) +@@ -1392,6 +1392,7 @@ target_link_libraries(grpc_cronet + ${_gRPC_BASELIB_LIBRARIES} + ${_gRPC_SSL_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} ++ ${ZLIB_LIBRARIES} + gpr + ) + diff --git a/grpc.changes b/grpc.changes new file mode 100644 index 0000000..70582ab --- /dev/null +++ b/grpc.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Wed Apr 19 11:57:55 UTC 2017 - jengelh@inai.de + +- Initial package (version 1.2.3) for build.opensuse.org diff --git a/grpc.spec b/grpc.spec new file mode 100644 index 0000000..32f1470 --- /dev/null +++ b/grpc.spec @@ -0,0 +1,115 @@ +# +# spec file for package grpc +# +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +%define lname libgrpc-1_2_3 +Name: grpc +Version: 1.2.3 +Release: 0 +Summary: HTTP/2-based Remote Procedure Call implementation +License: BSD-3-Clause +Group: Development/Tools/Building +Url: http://grpc.io/ +Source: https://github.com/grpc/grpc/archive/v%version.tar.gz +Patch1: grpc-protobuf.diff +Patch2: grpc-zlib.diff +Patch3: grpc-versioning.diff +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: pkg-config +BuildRequires: pkgconfig(openssl) >= 1.0.1 +BuildRequires: pkgconfig(protobuf) >= 3 +BuildRequires: pkgconfig(zlib) +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +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 +Summary: HTTP/2-based Remote Procedure Call implementation +Group: System/Libraries + +%description -n %lname +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 devel +Summary: Development files for grpc, a HTTP/2 Remote Procedure Call implementation +Group: Development/Tools/Building +Requires: %lname = %version + +%description devel +This subpackage contains libraries and header files for developing +applications that want to make use of the gRPC reference implementation. + +%prep +%setup -q +%patch -P 1 -P 2 -P 3 -p1 + +%build +make LIBDIR=x CONFIG=opt \ + x/opt/pkgconfig/grpc.pc x/opt/pkgconfig/grpc_unsecure.pc \ + x/opt/pkgconfig/grpc++.pc x/opt/pkgconfig/grpc++_unsecure.pc +%cmake \ + -DgRPC_PROTOBUF_PROVIDER=package \ + -DgRPC_SSL_PROVIDER=package \ + -DgRPC_ZLIB_PROVIDER=package + +#[ 36%] Running gRPC C++ protocol buffer compiler on src/proto/grpc/reflection/v1alpha/reflection.proto +#cd /home/abuild/rpmbuild/BUILD/grpc-1.2.3 && /usr/bin/protoc --grpc_out=/home/abuild/rpmbuild/BUILD/grpc-1.2.3/build/gens --cpp_out=/home/abuild/rpmbuild/BUILD/grpc-1.2.3/build/gens --plugin=protoc-gen-grpc=/home/abuild/rpmbuild/BUILD/grpc-1.2.3/build/grpc_cpp_plugin -I . src/proto/grpc/reflection/v1alpha/reflection.proto +#/home/abuild/rpmbuild/BUILD/grpc-1.2.3/build/grpc_cpp_plugin: error while loading shared libraries: libgrpc_plugin_support.so: cannot open shared object file: No such file or directory +#--grpc_out: protoc-gen-grpc: Plugin failed with status code 127. +export LD_LIBRARY_PATH="$PWD" +%make_jobs + +%install +b="%buildroot" +mkdir -p "$b/%_libdir/pkgconfig" +cp x/opt/pkgconfig/*.pc "$b/%_libdir/pkgconfig/" +%cmake_install +for i in "$b/%_libdir"/libg*-%version.so; do + ln -s "${i##*/}" "${i%%-%version.so}.so" +done + +%post -n libgrpc-1_2_3 -p /sbin/ldconfig +%postun -n libgrpc-1_2_3 -p /sbin/ldconfig + +%files -n libgrpc-1_2_3 +%defattr(-,root,root) +%_libdir/libg*-%version.so + +%files devel +%defattr(-,root,root) +%_bindir/* +%_includedir/* +%_libdir/cmake/ +%_libdir/pkgconfig/*.pc +%_libdir/libgpr.so +%_libdir/libgrpc++.so +%_libdir/libgrpc++_cronet.so +%_libdir/libgrpc++_reflection.so +%_libdir/libgrpc++_unsecure.so +%_libdir/libgrpc.so +%_libdir/libgrpc_cronet.so +%_libdir/libgrpc_csharp_ext.so +%_libdir/libgrpc_plugin_support.so +%_libdir/libgrpc_unsecure.so + +%changelog diff --git a/v1.2.3.tar.gz b/v1.2.3.tar.gz new file mode 100644 index 0000000..ca0f17e --- /dev/null +++ b/v1.2.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e07ac5a2c657c25d5628529ec051f2ae3fa69a1d8802125810cba0c35fed9adf +size 4453354