From 5d9a67a56d8bf7076b0e17cb4aa032a03875c2e2 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 30 Jan 2020 05:10:50 -0500 Subject: [PATCH] use third_party/boringssl-with-bazel/err_data.c instead of err_data.c --- src/boringssl/gen_build_yaml.py | 9 +++---- templates/gRPC-Core.podspec.template | 2 +- .../BoringSSL-GRPC.podspec.template | 24 ++++--------------- tools/distrib/check_copyright.py | 4 +--- 4 files changed, 11 insertions(+), 28 deletions(-) diff --git a/src/boringssl/gen_build_yaml.py b/src/boringssl/gen_build_yaml.py index 45f247f1836..b54f53df095 100755 --- a/src/boringssl/gen_build_yaml.py +++ b/src/boringssl/gen_build_yaml.py @@ -134,14 +134,15 @@ try: # so we don't need to generate them again, but there's no option to disable that behavior. # - crypto_test_data.cc is required to run boringssl_crypto_test but we already # use the copy under third_party/boringssl-with-bazel so we just delete it - # - err_data.c is currently only used by the obj-C boringssl podspec - # TODO(jtattermusch): avoid the need to keep src/boringssl/err_data.c + # - err_data.c is already under third_party/boringssl-with-bazel so we just delete it generate_build_files.main([grpc_platform]) print(yaml.dump(grpc_platform.yaml)) finally: + # we don't want err_data.c and crypto_test_data.cc (see comment above) + if os.path.exists('err_data.c'): + os.remove('err_data.c') if os.path.exists('crypto_test_data.cc'): - os.remove('crypto_test_data.cc' - ) # we don't want this file (see comment above) + os.remove('crypto_test_data.cc') shutil.rmtree('src') diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index 9a95ebb03f7..30d22cebf34 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -184,7 +184,7 @@ ss.header_mappings_dir = '.' ss.libraries = 'z' ss.dependency "#{s.name}/Interface", version - ss.dependency 'BoringSSL-GRPC', '0.0.6' + ss.dependency 'BoringSSL-GRPC', '0.0.7' abseil_version = '0.20190808.1' % for abseil_spec in grpc_abseil_specs: ss.dependency '${abseil_spec}', abseil_version diff --git a/templates/src/objective-c/BoringSSL-GRPC.podspec.template b/templates/src/objective-c/BoringSSL-GRPC.podspec.template index 9802a6abc82..f321838be3c 100644 --- a/templates/src/objective-c/BoringSSL-GRPC.podspec.template +++ b/templates/src/objective-c/BoringSSL-GRPC.podspec.template @@ -11,9 +11,7 @@ # Please make modifications to # `templates/src/objective-c/BoringSSL-GRPC.podspec.template` instead. This # file can be regenerated from the template by running - # `tools/buildgen/generate_projects.sh`. Because of some limitations of this - # template, you might actually need to run the same script twice in a row. - # (see err_data.c section) + # `tools/buildgen/generate_projects.sh`. # BoringSSL CocoaPods podspec @@ -48,7 +46,7 @@ Pod::Spec.new do |s| s.name = 'BoringSSL-GRPC' - version = '0.0.6' + version = '0.0.7' s.version = version s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google\'s needs.' # Adapted from the homepage: @@ -141,8 +139,8 @@ 'src/crypto/**/*.{h,c,cc}', # We have to include fiat because spake25519 depends on it 'src/third_party/fiat/*.{h,c,cc}', - # Include the err_data.c generated in prepare_command below - 'src/err_data.c' + # Include the err_data.c pre-generated in boringssl's master-with-bazel branch + 'err_data.c' ss.private_header_files = 'src/ssl/*.h', 'src/ssl/**/*.h', @@ -211,20 +209,6 @@ } EOF - # To build boringssl, we need the generated file err_data.c, which is normally generated - # by boringssl's err_data_generate.go, but we already have a copy of err_data.c checked into the - # grpc/grpc repository that gets regenerated whenever we update the third_party/boringssl submodule. - # To make the podspec independent of the grpc repository, the .podspec.template just copies - # the contents of err_data.c directly into the .podspec. - # TODO(jtattermusch): avoid needing to run tools/buildgen/generate_projects.sh twice on update - # TODO(jtattermusch): another pre-generated copy of err_data.c is under third_party/boringssl-with-bazel - # investigate if we could use it. - cat > src/err_data.c <