Skip to content

Commit b864c2b

Browse files
grnmeiraphlax
authored andcommitted
Fix for broken FIPS builds (envoyproxy#41226)
[This PR](envoyproxy#39728) moved the Go dependency in FIPS builds to a Bazel `http_archive`. Once that was done, Bazel's `filegroup` doesn't seem to be dealing so well with non-UTF-8 characters present in a file name in Go's test suite, causing the build to fail. ``` #23 170.8 ERROR: /build/top/BUILD/envoy/build/bazel_root/base/external/boringssl_fips/BUILD.bazel:70:8: Executing genrule @@boringssl_fips//:build failed: error reading file '@@fips_go_linux_amd64//:test/fixedbugs/issue27836.dir/Þmain.go': /build/top/BUILD/envoy/build/bazel_root/base/external/fips_go_linux_amd64/test/fixedbugs/issue27836.dir/Þmain.go (No such file or directory) #23 170.8 ERROR: /build/top/BUILD/envoy/build/bazel_root/base/external/boringssl_fips/BUILD.bazel:70:8: Executing genrule @@boringssl_fips//:build failed: 1 input file(s) are in error #23 171.2 Target //distribution/binary:release failed to build ``` It's not fully understood what circumstances cause Bazel to behave like that, but it seems reasonable to remove the `test` directory from the exports. Once a bug is filed to the Bazel project I'll update the PR with the issue number. Signed-off-by: Gustavo <[email protected]>
1 parent c84715c commit b864c2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bazel/repositories.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def _boringssl_fips():
282282
name = "fips_cmake_linux_aarch64",
283283
build_file_content = CMAKE_BUILD_CONTENT,
284284
)
285-
GO_BUILD_CONTENT = "%s\nexports_files([\"bin/go\"])" % BUILD_ALL_CONTENT
285+
GO_BUILD_CONTENT = "%s\nexports_files([\"bin/go\"])" % _build_all_content(["test/**"])
286286
external_http_archive(
287287
name = "fips_go_linux_amd64",
288288
build_file_content = GO_BUILD_CONTENT,

0 commit comments

Comments
 (0)