Repository navigation
Update BoringSSL to match gRPC v1.69.0 (b8b3e6e111) - #2002
Conversation
Update firebase-cpp-sdk's BoringSSL dependency from fips-20220613 to commit
b8b3e6e11166719a8ebfa43c0cde9ad7d57a84f6, matching gRPC v1.69.0's
bazel/grpc_deps.bzl:
- Download the pinned tarball with SHA256 verification instead of shallow git
fetch, and remove the obsolete scripts/git/patches/boringssl/0001-disable-warnings.patch.
- Update BoringSSL header path (boringssl/src/include) and flattened static
library paths (boringssl-build/{libssl.a,libcrypto.a} and MSVC config subdirs)
in CMakeLists.txt, cmake/external_rules.cmake, and build_scripts/desktop/package.sh.
- Fixes GCC 14+/15 compilation (b8b3e6e111 includes upstream C++ guards around
C11 _Generic in crypto/internal.h).
There was a problem hiding this comment.
Code Review
This pull request updates the BoringSSL dependency configuration by switching from a git-based download with a patch to downloading a specific commit tarball with SHA256 verification. It also adjusts the associated library and header paths across the build and packaging scripts. The feedback recommends renaming the generic commit variable in CMake to prevent scope pollution and wrapping file paths in double quotes to ensure robustness against paths containing spaces.
| set(commit b8b3e6e11166719a8ebfa43c0cde9ad7d57a84f6) | ||
|
|
||
| ExternalProject_Add( | ||
| boringssl | ||
|
|
||
| DOWNLOAD_COMMAND | ||
| COMMAND git init boringssl | ||
| COMMAND cd boringssl && git fetch --depth=1 https://github.com/google/boringssl.git ${boringssl_commit_tag} && git reset --hard FETCH_HEAD | ||
|
|
||
| PATCH_COMMAND git apply ${patch_file} && git gc --aggressive | ||
| DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} | ||
| DOWNLOAD_NAME boringssl-${commit}.tar.gz | ||
| URL https://github.com/google/boringssl/archive/${commit}.tar.gz | ||
| URL_HASH SHA256=c70d519e4ee709b7a74410a5e3a937428b8198d793a3d771be3dd2086ae167c8 |
There was a problem hiding this comment.
Using a generic variable name like commit can lead to variable pollution and conflicts if other external dependency scripts (which may be included in the same CMake scope) also define a variable named commit. It is safer to use a prefixed variable name, such as boringssl_commit, or retain the previous boringssl_commit_tag naming convention.
set(boringssl_commit b8b3e6e11166719a8ebfa43c0cde9ad7d57a84f6)
ExternalProject_Add(
boringssl
DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
DOWNLOAD_NAME boringssl-${boringssl_commit}.tar.gz
URL https://github.com/google/boringssl/archive/${boringssl_commit}.tar.gz
URL_HASH SHA256=c70d519e4ee709b7a74410a5e3a937428b8198d793a3d771be3dd2086ae167c8
| # CMake's find_package(OpenSSL) doesn't quite work right with BoringSSL | ||
| # unless the header file contains OPENSSL_VERSION_NUMBER. | ||
| file(READ ${PROJECT_BINARY_DIR}/external/src/boringssl/include/openssl/opensslv.h TMP_HEADER_CONTENTS) | ||
| file(READ ${PROJECT_BINARY_DIR}/external/src/boringssl/src/include/openssl/opensslv.h TMP_HEADER_CONTENTS) |
There was a problem hiding this comment.
File paths in CMake should be wrapped in double quotes to prevent errors if the path contains spaces (e.g., if the build directory path contains spaces). Please apply this quoting to all file(READ) and file(APPEND) calls in this block (lines 111, 113, 119, and 121).
file(READ "${PROJECT_BINARY_DIR}/external/src/boringssl/src/include/openssl/opensslv.h" TMP_HEADER_CONTENTS)
❌ Integration test FAILEDRequested by @AustinBenoit on commit 66dce9f
Add flaky tests to go/fpl-cpp-flake-tracker |
Description
Updates
firebase-cpp-sdk's desktop BoringSSL dependency fromfips-20220613(June 2022) to commitb8b3e6e11166719a8ebfa43c0cde9ad7d57a84f6(September 2024), matching the BoringSSL version pinned ingrpc/grpc@v1.69.0/bazel/grpc_deps.bzl(which Firestore's CMake build uses).Key changes:
cmake/external/boringssl.cmake: Switched from a shallowgit fetchoffips-20220613to a SHA256-verified tarball download ofb8b3e6e11166719a8ebfa43c0cde9ad7d57a84f6, and removed the obsoletescripts/git/patches/boringssl/0001-disable-warnings.patch(no longer needed with the generatedmaster-with-bazelCMake build).CMakeLists.txt,cmake/external_rules.cmake,build_scripts/desktop/package.sh: Updated BoringSSL header paths (boringssl/src/include) and flattened static library output paths (boringssl-build/{libssl.a,libcrypto.a}on Unix andboringssl-build/<Config>/{ssl,crypto}.libon MSVC).b8b3e6e111builds cleanly under GCC 15 without patching (resolving the-Werror=discarded-qualifiersfailure infips-20220613'sbcm.cand including upstream#if !defined(__cplusplus)guards around C11_Generic).Testing
-DFIREBASE_USE_BORINGSSL=ON -DFIREBASE_INCLUDE_FIRESTORE=ON -DFIREBASE_CPP_BUILD_TESTS=ON -DFIREBASE_FORCE_FAKE_SECURE_STORAGE=ON -DFIREBASE_LINUX_USE_CXX11_ABI=TRUE:b8b3e6e111,libcurl 8.23.0(Enabled SSL backends: BoringSSL),firebase_database, andfirebase_firestore/ gRPC1.69.0(gRPC_SSL_PROVIDER=package) compile and link cleanly.firebase_app_rest_tls_policy_testandfirebase_rtdb_util_desktop_testviactest(2/2 passed).scripts/gha/check_copyright.sh -g.Type of Change
Place an
xin the applicable box: