treewide: switch to gomod and bump everything
This switches version resolution from fietsje to gomod and updates
all Go dependencies. It also bumps rules_go (required by gVisor) and
switches the Gazelle naming convention from go_default_xxx to the
standard Bazel convention of the default target having the package
name.
Since Kubernetes dropped upstream Bazel support and doesn't check in
all generated files I manually pregenerated the OpenAPI spec. This
should be fixed, but because of the already-huge scope of this CL
and the rebase complexity this is not in here.
Change-Id: Iec8ea613d06946882426c2f9fad5bda7e8aaf833
Reviewed-on: https://review.monogon.dev/c/monogon/+/639
Reviewed-by: Sergiusz Bazanski <serge@monogon.tech>
Reviewed-by: Leopold Schabel <leo@nexantic.com>
diff --git a/metropolis/node/build/mkcpio/main.go b/metropolis/node/build/mkcpio/main.go
index 10deb5a..bde7082 100644
--- a/metropolis/node/build/mkcpio/main.go
+++ b/metropolis/node/build/mkcpio/main.go
@@ -174,7 +174,7 @@
inF.Close()
case *fsspec.Directory:
if err := cpioWriter.WriteHeader(&cpio.Header{
- Mode: cpio.FileMode(i.Mode) | cpio.ModeDir,
+ Mode: cpio.FileMode(i.Mode) | cpio.TypeDir,
Name: strings.TrimPrefix(i.Path, "/"),
}); err != nil {
log.Fatalf("Failed to write cpio header for directory %q: %v", i.Path, err)
@@ -182,7 +182,7 @@
case *fsspec.SymbolicLink:
if err := cpioWriter.WriteHeader(&cpio.Header{
// Symlinks are 0777 by definition (from man 7 symlink on Linux)
- Mode: 0777 | cpio.ModeSymlink,
+ Mode: 0777 | cpio.TypeSymlink,
Name: strings.TrimPrefix(i.Path, "/"),
Linkname: i.TargetPath,
}); err != nil {
@@ -192,11 +192,11 @@
mode := cpio.FileMode(i.Mode)
switch i.Type {
case fsspec.SpecialFile_CHARACTER_DEV:
- mode |= cpio.ModeCharDevice
+ mode |= cpio.TypeChar
case fsspec.SpecialFile_BLOCK_DEV:
- mode |= cpio.ModeDevice
+ mode |= cpio.TypeBlock
case fsspec.SpecialFile_FIFO:
- mode |= cpio.ModeNamedPipe
+ mode |= cpio.TypeFifo
}
if err := cpioWriter.WriteHeader(&cpio.Header{