WORKSPACE: bump rules_go go 0.29 and Go to 1.17.1
The changes to nogo are from rules_go being able to use go_library
targets as part toolchain definitions. gVisor needed to be bumped
to be compatible with Go 1.17. It also needs a fix for us not having
the systemd cgroup controller.
Change-Id: I058b5c68d97809a286fbe36df00e49e55874dfd5
Reviewed-on: https://review.monogon.dev/c/monogon/+/438
Reviewed-by: Sergiusz Bazanski <serge@monogon.tech>
diff --git a/metropolis/build/gotoolwrap/main.go b/metropolis/build/gotoolwrap/main.go
index 5b36048..eb70884 100644
--- a/metropolis/build/gotoolwrap/main.go
+++ b/metropolis/build/gotoolwrap/main.go
@@ -127,10 +127,21 @@
}
cmd.Env = append(cmd.Env, v)
}
+ // Create a temporary cache directory and remove everything afterwards.
+ // Based on code from
+ // @io_bazel_rules_go//go/tools/builders:stdliblist.go L174
+ tempDir, err := os.MkdirTemp("", "gocache")
+ if err != nil {
+ log.Fatalf("Cannot create temporary directory: %v", err)
+ }
+ defer os.RemoveAll(tempDir)
+
cmd.Env = append(cmd.Env,
fmt.Sprintf("GOROOT=%s", gorootAbs),
fmt.Sprintf("GOPATH=%s", gopathAbs),
fmt.Sprintf("PATH=%s", path),
+ fmt.Sprintf("GO111MODULE=off"),
+ fmt.Sprintf("GOCACHE=%s", tempDir),
)
// Run the command interactively.
diff --git a/metropolis/node/BUILD.bazel b/metropolis/node/BUILD.bazel
index fd9dfaf..8e7ea95 100644
--- a/metropolis/node/BUILD.bazel
+++ b/metropolis/node/BUILD.bazel
@@ -53,7 +53,7 @@
# runsc/gVisor
"@com_github_google_gvisor//runsc": "/containerd/bin/runsc",
- "@com_github_google_gvisor//shim/v2:containerd-shim-runsc-v1": "/containerd/bin/containerd-shim-runsc-v1",
+ "@com_github_google_gvisor//shim:containerd-shim-runsc-v1": "/containerd/bin/containerd-shim-runsc-v1",
# runc (runtime in files_cc because of cgo)
"@com_github_containerd_containerd//cmd/containerd-shim-runc-v2": "/containerd/bin/containerd-shim-runc-v2",