Files
Jing Chen 5867605e80 Make the bwrap alias a wrapper around the sandboxexec Go bindings.
bwrap previously built its own specs.Spec, wrote an OCI bundle and drove
runsc/container directly. It now only parses the bubblewrap command line
and translates it into sandbox.Options; //sandboxexec/sandbox owns the
bundle, the runsc invocation and the container lifecycle.
2026-08-31 01:51:10 +00:00

60 lines
1.4 KiB
Python

load("//tools:defs.bzl", "go_library", "go_test")
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)
go_library(
name = "bwrap",
srcs = [
"bwrap.go",
"cli.go",
],
visibility = [
"//:__subpackages__",
],
deps = [
"//pkg/log",
"//runsc/cmd/util",
"//runsc/config",
"//runsc/flag",
"//runsc/specutils",
"//sandboxexec/sandbox",
"@com_github_google_subcommands//:go_default_library",
"@com_github_opencontainers_runtime_spec//specs-go:go_default_library",
"@org_golang_x_sys//unix:go_default_library",
],
)
go_test(
name = "bwrap_test",
srcs = ["bwrap_test.go"],
library = ":bwrap",
deps = [
"//runsc/config",
"//sandboxexec/sandbox",
"@com_github_google_go_cmp//cmp:go_default_library",
"@com_github_google_go_cmp//cmp/cmpopts:go_default_library",
"@com_github_opencontainers_runtime_spec//specs-go:go_default_library",
],
)
go_test(
name = "bwrap_integration_test",
srcs = ["bwrap_integration_test.go"],
data = [
"//:release",
],
library = ":bwrap",
tags = [
"local",
"manual",
],
deps = [
"//pkg/test/testutil",
"//runsc/specutils",
"@com_github_google_go_cmp//cmp:go_default_library",
],
)