diff --git a/0001-cxx-Arg-List-Too-Long.patch b/0001-cxx-Arg-List-Too-Long.patch deleted file mode 100644 index 0e0d457..0000000 --- a/0001-cxx-Arg-List-Too-Long.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff --git a/Makefile b/Makefile -index e8635eda2d..6ede6e34d2 100644 ---- a/Makefile -+++ b/Makefile -@@ -3214,6 +3214,14 @@ install-headers_cxx: - $(E) "[INSTALL] Installing public C++ headers" - $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) -d $(prefix)/$(dir $(h)) && ) exit 0 || exit 1 - $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) $(h) $(prefix)/$(h) && ) exit 0 || exit 1 -+ $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX1), $(INSTALL) -d $(prefix)/$(dir $(h)) && ) exit 0 || exit 1 -+ $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX1), $(INSTALL) $(h) $(prefix)/$(h) && ) exit 0 || exit 1 -+ $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX2), $(INSTALL) -d $(prefix)/$(dir $(h)) && ) exit 0 || exit 1 -+ $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX2), $(INSTALL) $(h) $(prefix)/$(h) && ) exit 0 || exit 1 -+ $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX3), $(INSTALL) -d $(prefix)/$(dir $(h)) && ) exit 0 || exit 1 -+ $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX3), $(INSTALL) $(h) $(prefix)/$(h) && ) exit 0 || exit 1 -+ $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX4), $(INSTALL) -d $(prefix)/$(dir $(h)) && ) exit 0 || exit 1 -+ $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX4), $(INSTALL) $(h) $(prefix)/$(h) && ) exit 0 || exit 1 - - install-static: install-static_c install-static_cxx - -@@ -6190,6 +6198,8 @@ PUBLIC_HEADERS_CXX += \ - include/grpc++/support/stub_options.h \ - include/grpc++/support/sync_stream.h \ - include/grpc++/support/time.h \ -+ -+PUBLIC_HEADERS_CXX1 += \ - include/grpcpp/alarm.h \ - include/grpcpp/alarm_impl.h \ - include/grpcpp/channel.h \ -@@ -6267,6 +6277,8 @@ PUBLIC_HEADERS_CXX += \ - include/grpcpp/support/sync_stream_impl.h \ - include/grpcpp/support/time.h \ - include/grpcpp/support/validate_service_config.h \ -+ -+PUBLIC_HEADERS_CXX2 += \ - include/grpc/support/alloc.h \ - include/grpc/support/atm.h \ - include/grpc/support/atm_gcc_atomic.h \ -@@ -6320,6 +6332,8 @@ PUBLIC_HEADERS_CXX += \ - include/grpc/impl/codegen/propagation_bits.h \ - include/grpc/impl/codegen/slice.h \ - include/grpc/impl/codegen/status.h \ -+ -+PUBLIC_HEADERS_CXX3 += \ - include/grpc++/impl/codegen/async_stream.h \ - include/grpc++/impl/codegen/async_unary_call.h \ - include/grpc++/impl/codegen/byte_buffer.h \ -@@ -6350,6 +6364,8 @@ PUBLIC_HEADERS_CXX += \ - include/grpc++/impl/codegen/stub_options.h \ - include/grpc++/impl/codegen/sync_stream.h \ - include/grpc++/impl/codegen/time.h \ -+ -+PUBLIC_HEADERS_CXX4 += \ - include/grpcpp/impl/codegen/async_generic_service.h \ - include/grpcpp/impl/codegen/async_stream.h \ - include/grpcpp/impl/codegen/async_stream_impl.h \ diff --git a/0002-add-secure-compile-option-in-Makefile.patch b/0002-add-secure-compile-option-in-Makefile.patch deleted file mode 100644 index 40010cb..0000000 --- a/0002-add-secure-compile-option-in-Makefile.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/Makefile b/Makefile -index 6ede6e34d2..d6190ecde4 100644 ---- a/Makefile -+++ b/Makefile -@@ -478,6 +478,10 @@ LDFLAGS += $(EXTRA_LDFLAGS) - DEFINES += $(EXTRA_DEFINES) - LDLIBS += $(EXTRA_LDLIBS) - -+CFLAGS += -Wl,-z,now -fPIE -fPIC -+CPPFLAGS += -Wl,-z,now -fstack-protector-strong -+LDFLAGS += -Wl,-z,now -pie -+ - HOST_CPPFLAGS += $(CPPFLAGS) - HOST_CFLAGS += $(CFLAGS) - HOST_CXXFLAGS += $(CXXFLAGS) diff --git a/grpc-1.28.1.tar.gz b/grpc-1.28.1.tar.gz deleted file mode 100644 index 2266421..0000000 Binary files a/grpc-1.28.1.tar.gz and /dev/null differ diff --git a/grpc.spec b/grpc.spec index 922173e..37f487f 100644 --- a/grpc.spec +++ b/grpc.spec @@ -1,19 +1,29 @@ Name: grpc -Version: 1.28.1 -Release: 3 +Version: 1.31.0 +Release: 1 Summary: A modern, open source high performance RPC framework that can run in any environment License: ASL 2.0 URL: https://www.grpc.io Source0: https://github.com/grpc/grpc/archive/v%{version}/%{name}-%{version}.tar.gz Source1: abseil-cpp-b832dce8489ef7b6231384909fd9b68d5a5ff2b7.tar.gz +Source2: benchmark-v1.5.1.tar.gz +Source3: re2-2020-08-01.tar.gz +Source4: googletest-release-1.10.0.tar.gz -Patch9000: 0001-cxx-Arg-List-Too-Long.patch -Patch9001: 0002-add-secure-compile-option-in-Makefile.patch +Patch0000: Copy-channel-args-hash-before-appending-ruby-user-ag.patch +Patch0001: Ran-generate_proto_ruby.sh-to-update-generated-files.patch +Patch0002: Add-ABSL_RANDOM_HWAES_FLAGS.patch +Patch0003: Fix-destruction-race-between-subchannel-and-client_c.patch +Patch0004: Fix-use-after-free-by-removing-stream-from-transport.patch +Patch0005: repair-gflags-compile-error-with-cmake.patch +Patch0006: repair-pkgconfig-path.patch +Patch0007: add-secure-compile-option-in-Makefile.patch BuildRequires: gcc-c++ pkgconfig protobuf-devel protobuf-compiler gdb -BuildRequires: openssl-devel c-ares-devel gflags-devel gtest-devel zlib-devel gperftools-devel +BuildRequires: openssl-devel c-ares-devel gflags-devel gtest-devel zlib-devel gperftools-devel re2-devel BuildRequires: python3-devel python3-setuptools python3-Cython -Requires: protobuf-compiler +BuildRequires: cmake >= 3.13.0 +Requires: protobuf-compiler glfags Provides: %{name}-plugins = %{version}-%{release} Provides: %{name}-cli = %{version}-%{release} @@ -42,14 +52,35 @@ Requires: %{name} = %{version}-%{release} Python3 bindings for gRPC. %prep -%autosetup -p1 +%autosetup -p1 -n %{name}-%{version} sed -i 's:^prefix ?= .*:prefix ?= %{_prefix}:' Makefile sed -i 's:$(prefix)/lib:$(prefix)/%{_lib}:' Makefile sed -i 's:^GTEST_LIB =.*::' Makefile tar -zxf %{SOURCE1} --strip-components 1 -C %{_builddir}/%{name}-%{version}/third_party/abseil-cpp/ +tar -zxf %{SOURCE2} --strip-components 1 -C %{_builddir}/%{name}-%{version}/third_party/benchmark/ +tar -zxf %{SOURCE3} --strip-components 1 -C %{_builddir}/%{name}-%{version}/third_party/re2/ +tar -zxf %{SOURCE4} --strip-components 1 -C %{_builddir}/%{name}-%{version}/third_party/googletest/ %build -%make_build shared plugins +mkdir -p cmake/build +cd cmake/build +cmake ../../ -DgRPC_INSTALL=ON\ + -DgRPC_CARES_PROVIDER=package \ + -DgRPC_PROTOBUF_PROVIDER=package \ + -DgRPC_SSL_PROVIDER=package \ + -DgRPC_ZLIB_PROVIDER=package \ + -DgRPC_GFLAGS_PROVIDER=package \ + -DgRPC_INSTALL_LIBDIR=%{buildroot}%{_libdir} \ + -DgRPC_INSTALL_BINDIR=%{buildroot}%{_bindir} \ + -DgRPC_INSTALL_INCLUDEDIR=%{buildroot}%{_includedir} \ + -DgRPC_INSTALL_CMAKEDIR=%{buildroot}%{_prefix}/lib/cmake/%{name} \ + -DgRPC_INSTALL_SHAREDIR=%{buildroot}%{_datadir}/%{name} \ + -DgRPC_INSTALL_PKGCONFIGDIR=%{buildroot}%{_libdir}/pkgconfig \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DBUILD_SHARED_LIBS=ON +make %{_smp_mflags} +cd ../.. +make grpc_cli # build python module export GRPC_PYTHON_BUILD_WITH_CYTHON=True @@ -60,8 +91,12 @@ export CFLAGS="%optflags" %py3_build %install -make install prefix="%{buildroot}%{_prefix}" -make install-grpc-cli prefix="%{buildroot}%{_prefix}" +cd cmake/build +make install/local +cd ../.. +cp bins/opt/grpc_cli %{buildroot}%{_bindir} +rm -rf %{buildroot}%{_prefix}/lib + %delete_la_and_a %py3_install @@ -76,8 +111,10 @@ make install-grpc-cli prefix="%{buildroot}%{_prefix}" %{_bindir}/grpc_*_plugin %{_libdir}/*.so.1* -%{_libdir}/*.so.9* -%{_datadir}/grpc +%{_libdir}/*.so.11* +%{_libdir}/*absl* +%{_libdir}/*re2* +%{_datadir}/%{name} %files devel %defattr(-,root,root) @@ -93,6 +130,12 @@ make install-grpc-cli prefix="%{buildroot}%{_prefix}" %{python3_sitearch}/grpcio-%{version}-py?.?.egg-info %changelog +* Mon Aug 28 2020 liuxin - 1.31.0-1 +- Type:requirement +- ID:NA +- SUG:NA +- DESC:update grpc version to 1.31.0 + * Tue Aug 18 2020 chenyaqiang - 1.28.1-3 - rebuild for package build and clarify last changelog info @@ -115,4 +158,4 @@ make install-grpc-cli prefix="%{buildroot}%{_prefix}" - Delete unused patch * Sat Dec 21 2019 openEuler Buildteam - 1.22.0-1 -- Package init +- Package init \ No newline at end of file