From 37d0deb2f16aa91a3787d4716f14d4d5026b7746 Mon Sep 17 00:00:00 2001 From: candrian <candrian@google.com> Date: Thu, 27 Jun 2019 04:20:04 -0700 Subject: [PATCH] Upgrade protobuf to 3.8.0. Fix several issues caused by the upgrade. Set omit_zlib=True to fix issue with io_bazel_rules_closure: no such target '@io_bazel_rules_closure//:third_party/zlib.BUILD' Upgrade io_bazel_rules_go to latest stable v0.18.6. Include .inc files in the tink_headers archive. This is needed by the //examples/helloworld/cc:non_bazel_build_test. PiperOrigin-RevId: 255372936 --- WORKSPACE | 15 +++++++++------ cc/BUILD.bazel | 15 ++++++--------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index b3f70b16c..ed20e816b 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -188,9 +188,9 @@ http_archive( # This statement defines the @com_google_protobuf repo. http_archive( name = "com_google_protobuf", - strip_prefix = "protobuf-3.6.1.2", - urls = ["https://github.com/google/protobuf/archive/v3.6.1.2.zip"], - sha256 = "d6618d117698132dadf0f830b762315807dc424ba36ab9183f1f436008a2fdb6", + strip_prefix = "protobuf-3.8.0", + urls = ["https://github.com/google/protobuf/archive/v3.8.0.zip"], + sha256 = "1e622ce4b84b88b6d2cdf1db38d1a634fe2392d74f0b7b74ff98f3a51838ee53", ) # java_lite_proto_library rules implicitly depend on @@ -714,8 +714,11 @@ http_file( #----------------------------------------------------------------------------- http_archive( name = "io_bazel_rules_go", - urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.17.1/rules_go-0.17.1.tar.gz"], - sha256 = "6776d68ebb897625dead17ae510eac3d5f6342367327875210df44dbe2aeeb19", + urls = [ + "https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/0.18.6/rules_go-0.18.6.tar.gz", + "https://github.com/bazelbuild/rules_go/releases/download/0.18.6/rules_go-0.18.6.tar.gz", + ], + sha256 = "f04d2373bcaf8aa09bccb08a98a57e721306c8f6043a2a0ee610fd6853dcde3d", ) http_archive( @@ -785,7 +788,7 @@ http_archive( load("@io_bazel_rules_closure//closure:defs.bzl", "closure_repositories") -closure_repositories() +closure_repositories(omit_zlib = True) #----------------------------------------------------------------------------- diff --git a/cc/BUILD.bazel b/cc/BUILD.bazel index 61edba787..ca3cb4f08 100644 --- a/cc/BUILD.bazel +++ b/cc/BUILD.bazel @@ -723,11 +723,11 @@ genrule( ":linux_x86_64": "tar -cv -f $@ --dereference --transform \"s/^cc/tink/\" " + " --show-transformed-names `find cc/ -name \"*.h\"`; " + "tar -rv -f $@ -C $(GENDIR) --dereference " + - " `cd $(GENDIR); find proto/ -name \"*.pb.h\"`", + " `cd $(GENDIR); find proto/ -name \"*.pb.h\" -or -name \"*.inc\"`", ":mac_x86_64": "tar -cv -f $@ --dereference -s \"/^cc/tink/p\" " + " `find cc/ -name \"*.h\"`; " + "tar -rv -f $@ -C $(GENDIR) --dereference " + - " `cd $(GENDIR); find proto/ -name \"*.pb.h\"`", + " `cd $(GENDIR); find proto/ -name \"*.pb.h\" -or -name \"*.inc\"`", }), local = 1, # To avoid sandboxing; otherwise cannot access srcs. ) @@ -742,15 +742,12 @@ genrule( "tink_deps_headers.tar", ], # The command below collects headers of Tink dependencies in two steps: - # * First a tar-archive with all Abseil .h-files is created. - # * Then, absl .inc files are added to the tar-archive. - # * Then .h-files of Protobuf library are added to the tar-archive. + # * First a tar-archive with all Abseil .h and .inc-files is created. + # * Then .h and .inc files of Protobuf library are added to the tar-archive. cmd = "tar -cv -f $@ -C external/com_google_absl --dereference " + - " `cd external/com_google_absl; find absl/ -name \"*.h\"`; " + - "tar -rv -f $@ -C external/com_google_absl --dereference " + - " `cd external/com_google_absl; find absl/ -name \"*.inc\"`; " + + " `cd external/com_google_absl; find absl/ -name \"*.h\" -or -name \"*.inc\"`; " + "tar -rv -f $@ -C external/com_google_protobuf/src --dereference " + - " `cd external/com_google_protobuf/src/; find google/ -name \"*.h\"`", + " `cd external/com_google_protobuf/src/; find google/ -name \"*.h\" -or -name \"*.inc\"`", local = 1, # To avoid sandboxing; otherwise cannot access srcs. tags = [ "manual", # Does not run on OSX yet. TODO(b/78299422) -- GitLab