From a6871585a680515cbf665895d7a789d8818087d7de1aa91e355e8137304ac9ec Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Fri, 8 Nov 2019 08:46:18 +0000 Subject: [PATCH] Accepting request 746418 from home:mrostecki:branches:devel:kubic - Add patch which replaces BoringSSL with OpenSSL as the SSL library when grpc is used as a Bazel dependency: * 0001-bazel-Replace-boringssl-with-openssl.patch OBS-URL: https://build.opensuse.org/request/show/746418 OBS-URL: https://build.opensuse.org/package/show/devel:tools/grpc?expand=0&rev=52 --- ...bazel-Replace-boringssl-with-openssl.patch | 53 +++++++++++++++++++ grpc.changes | 7 +++ grpc.spec | 2 + 3 files changed, 62 insertions(+) create mode 100644 0001-bazel-Replace-boringssl-with-openssl.patch diff --git a/0001-bazel-Replace-boringssl-with-openssl.patch b/0001-bazel-Replace-boringssl-with-openssl.patch new file mode 100644 index 0000000..f93c394 --- /dev/null +++ b/0001-bazel-Replace-boringssl-with-openssl.patch @@ -0,0 +1,53 @@ +From 0b2a289c98e5cd953e7c239327e96891b511532e Mon Sep 17 00:00:00 2001 +From: Michal Rostecki +Date: Tue, 5 Nov 2019 01:33:28 +0100 +Subject: [PATCH] bazel: Replace boringssl with openssl + +Signed-off-by: Michal Rostecki +--- + bazel/grpc_deps.bzl | 22 ++++++++++++++-------- + 1 file changed, 14 insertions(+), 8 deletions(-) + +diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl +index cce2f88fe8..ebcafed427 100644 +--- a/bazel/grpc_deps.bzl ++++ b/bazel/grpc_deps.bzl +@@ -28,7 +28,7 @@ def grpc_deps(): + + native.bind( + name = "libssl", +- actual = "@boringssl//:ssl", ++ actual = "@openssl//:openssl-lib", + ) + + native.bind( +@@ -101,13 +101,19 @@ def grpc_deps(): + actual = "@io_opencensus_cpp//opencensus/stats:test_utils", + ) + +- if "boringssl" not in native.existing_rules(): +- http_archive( +- name = "boringssl", +- # on the chromium-stable-with-bazel branch +- # NOTE: This URL generates a tarball containing dynamic date +- # information, so the sha256 is not consistent. +- url = "https://boringssl.googlesource.com/boringssl/+archive/afc30d43eef92979b05776ec0963c9cede5fb80f.tar.gz", ++ if "openssl" not in native.existing_rules(): ++ native.new_local_repository( ++ name = "openssl", ++ path = "%LIBDIR%", ++ build_file_content = """cc_library( ++ name = "openssl-lib", ++ srcs = [ ++ "libssl.so.1.1", ++ "libcrypto.so.1.1", ++ ], ++ visibility = ["//visibility:public"], ++ linkstatic = False, ++)""", + ) + + if "zlib" not in native.existing_rules(): +-- +2.16.4 + diff --git a/grpc.changes b/grpc.changes index c65a310..b902d21 100644 --- a/grpc.changes +++ b/grpc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Nov 5 00:43:17 UTC 2019 - Michał Rostecki + +- Add patch which replaces BoringSSL with OpenSSL as the SSL + library when grpc is used as a Bazel dependency: + * 0001-bazel-Replace-boringssl-with-openssl.patch + ------------------------------------------------------------------- Thu Oct 10 00:23:16 UTC 2019 - Michał Rostecki diff --git a/grpc.spec b/grpc.spec index 1388e70..de20ba2 100644 --- a/grpc.spec +++ b/grpc.spec @@ -31,6 +31,7 @@ URL: https://grpc.io/ Source0: https://github.com/grpc/grpc/archive/v%rver.tar.gz Source1: %{name}-rpmlintrc Patch1: gettid.patch +Patch2: 0001-bazel-Replace-boringssl-with-openssl.patch BuildRequires: %{python_module Cython} BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} @@ -114,6 +115,7 @@ This subpackage contains the python3 bindings. %prep %autosetup -n grpc-%rver -p1 +sed -i -e "s|%%LIBDIR%%|%{_libdir}|" bazel/grpc_deps.bzl %build %define _lto_cflags %nil