diff --git a/Makefile b/Makefile index 1ed758f0ce5d..5b4adf4c8809 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,7 @@ BUILDTAGS += ${EXTRA_BUILDTAGS} # N/B: This value is managed by Renovate, manual changes are # possible, as long as they don't disturb the formatting # (i.e. DO NOT ADD A 'v' prefix!) -GOLANGCI_LINT_VERSION := 1.59.1 +GOLANGCI_LINT_VERSION := 1.60.1 PYTHON ?= $(shell command -v python3 python|head -n1) PKG_MANAGER ?= $(shell command -v dnf yum|head -n1) # ~/.local/bin is not in PATH on all systems diff --git a/cmd/podman-testing/create.go b/cmd/podman-testing/create.go index 1bdd14c5f9cf..99cb29177184 100644 --- a/cmd/podman-testing/create.go +++ b/cmd/podman-testing/create.go @@ -1,3 +1,5 @@ +//go:build !remote + package main import ( diff --git a/cmd/podman-testing/data.go b/cmd/podman-testing/data.go index 6fe2099c00b8..81333cba3ff4 100644 --- a/cmd/podman-testing/data.go +++ b/cmd/podman-testing/data.go @@ -1,3 +1,5 @@ +//go:build !remote + package main import ( diff --git a/cmd/podman-testing/layer.go b/cmd/podman-testing/layer.go index ae4de28ca17f..2b21ae2f6d09 100644 --- a/cmd/podman-testing/layer.go +++ b/cmd/podman-testing/layer.go @@ -1,3 +1,5 @@ +//go:build !remote + package main import ( diff --git a/cmd/podman-testing/main.go b/cmd/podman-testing/main.go index ccc1ff745434..e883a6b84e2a 100644 --- a/cmd/podman-testing/main.go +++ b/cmd/podman-testing/main.go @@ -1,3 +1,5 @@ +//go:build !remote + package main import ( diff --git a/cmd/podman-testing/remove.go b/cmd/podman-testing/remove.go index 59dadfd2d06a..90efefa58789 100644 --- a/cmd/podman-testing/remove.go +++ b/cmd/podman-testing/remove.go @@ -1,3 +1,5 @@ +//go:build !remote + package main import ( diff --git a/cmd/podman-testing/store_supported.go b/cmd/podman-testing/store_supported.go index b8e2fac5a7a8..8931930e1333 100644 --- a/cmd/podman-testing/store_supported.go +++ b/cmd/podman-testing/store_supported.go @@ -1,5 +1,4 @@ //go:build linux && !remote -// +build linux,!remote package main diff --git a/cmd/podman-testing/store_unsupported.go b/cmd/podman-testing/store_unsupported.go deleted file mode 100644 index de79ed88b0f4..000000000000 --- a/cmd/podman-testing/store_unsupported.go +++ /dev/null @@ -1,16 +0,0 @@ -//go:build !linux || remote -// +build !linux remote - -package main - -import "github.com/containers/podman/v5/pkg/domain/entities" - -const engineMode = entities.TunnelMode - -func storeBefore() error { - return nil -} - -func storeAfter() error { - return nil -} diff --git a/cmd/podman/containers/commit.go b/cmd/podman/containers/commit.go index b0cf44fe6d9a..40e816f650b5 100644 --- a/cmd/podman/containers/commit.go +++ b/cmd/podman/containers/commit.go @@ -9,7 +9,6 @@ import ( "github.com/containers/common/pkg/completion" "github.com/containers/podman/v5/cmd/podman/common" "github.com/containers/podman/v5/cmd/podman/registry" - "github.com/containers/podman/v5/pkg/api/handlers" "github.com/containers/podman/v5/pkg/domain/entities" "github.com/spf13/cobra" ) @@ -105,9 +104,6 @@ func commit(cmd *cobra.Command, args []string) error { if !commitOptions.Quiet { commitOptions.Writer = os.Stderr } - if len(commitOptions.Changes) > 0 { - commitOptions.Changes = handlers.DecodeChanges(commitOptions.Changes) - } if len(configFile) > 0 { cfg, err := os.ReadFile(configFile) if err != nil { diff --git a/cmd/podman/containers/create.go b/cmd/podman/containers/create.go index 5edeb2afac46..15e714b3421f 100644 --- a/cmd/podman/containers/create.go +++ b/cmd/podman/containers/create.go @@ -314,7 +314,7 @@ func CreateInit(c *cobra.Command, vals entities.ContainerCreateOptions, isInfra vals.ShmSizeSystemd = c.Flag("shm-size-systemd").Value.String() } if (c.Flag("dns").Changed || c.Flag("dns-option").Changed || c.Flag("dns-search").Changed) && vals.Net != nil && (vals.Net.Network.NSMode == specgen.NoNetwork || vals.Net.Network.IsContainer()) { - return vals, fmt.Errorf("conflicting options: dns and the network mode: " + string(vals.Net.Network.NSMode)) + return vals, errors.New("conflicting options: dns and the network mode: " + string(vals.Net.Network.NSMode)) } noHosts, err := c.Flags().GetBool("no-hosts") if err != nil { diff --git a/go.mod b/go.mod index eb65bdad9fe3..22a06ceb17a1 100644 --- a/go.mod +++ b/go.mod @@ -12,11 +12,11 @@ require ( github.com/checkpoint-restore/checkpointctl v1.2.1 github.com/checkpoint-restore/go-criu/v7 v7.1.0 github.com/containernetworking/plugins v1.5.1 - github.com/containers/buildah v1.37.1 - github.com/containers/common v0.60.1 + github.com/containers/buildah v1.37.2 + github.com/containers/common v0.60.2 github.com/containers/conmon v2.0.20+incompatible github.com/containers/gvisor-tap-vsock v0.7.4 - github.com/containers/image/v5 v5.32.1 + github.com/containers/image/v5 v5.32.2 github.com/containers/libhvee v0.7.1 github.com/containers/ocicrypt v1.2.0 github.com/containers/psgo v1.9.0 diff --git a/go.sum b/go.sum index 04086f013f33..f5f406fd674c 100644 --- a/go.sum +++ b/go.sum @@ -77,16 +77,16 @@ github.com/containernetworking/cni v1.2.3 h1:hhOcjNVUQTnzdRJ6alC5XF+wd9mfGIUaj8F github.com/containernetworking/cni v1.2.3/go.mod h1:DuLgF+aPd3DzcTQTtp/Nvl1Kim23oFKdm2okJzBQA5M= github.com/containernetworking/plugins v1.5.1 h1:T5ji+LPYjjgW0QM+KyrigZbLsZ8jaX+E5J/EcKOE4gQ= github.com/containernetworking/plugins v1.5.1/go.mod h1:MIQfgMayGuHYs0XdNudf31cLLAC+i242hNm6KuDGqCM= -github.com/containers/buildah v1.37.1 h1:BZ3vESqzmqGuj9kGqyjitdn9o0hD7owdZM699qtfMTc= -github.com/containers/buildah v1.37.1/go.mod h1:p/qfxznBMSn9YGYNBh0Sf2k4modfjD3us4rVqvmyeZM= -github.com/containers/common v0.60.1 h1:hMJNKfDxfXY91zD7mr4t/Ybe8JbAsTq5nkrUaCqTKsA= -github.com/containers/common v0.60.1/go.mod h1:tB0DRxznmHviECVHnqgWbl+8AVCSMZLA8qe7+U7KD6k= +github.com/containers/buildah v1.37.2 h1:KiJ3jVNUvdtGORxDz8fjjLkR81ZHQZIfnGWJWavks40= +github.com/containers/buildah v1.37.2/go.mod h1:alFCM3X0xfhE6ZjsFQkUlOMyKzOnbv9FL9fe1Ho48PA= +github.com/containers/common v0.60.2 h1:utcwp2YkO8c0mNlwRxsxfOiqfj157FRrBjxgjR6f+7o= +github.com/containers/common v0.60.2/go.mod h1:I0upBi1qJX3QmzGbUOBN1LVP6RvkKhd3qQpZbQT+Q54= github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg= github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I= github.com/containers/gvisor-tap-vsock v0.7.4 h1:iOtr/KEi+r599OOx1+9Qbss91jD5yxh1HO35MKTdths= github.com/containers/gvisor-tap-vsock v0.7.4/go.mod h1:orUOSdxU/IGEOxhecu2i7EzV7k7e2TgQlyCBfUngS0A= -github.com/containers/image/v5 v5.32.1 h1:fVa7GxRC4BCPGsfSRs4JY12WyeY26SUYQ0NuANaCFrI= -github.com/containers/image/v5 v5.32.1/go.mod h1:v1l73VeMugfj/QtKI+jhYbwnwFCFnNGckvbST3rQ5Hk= +github.com/containers/image/v5 v5.32.2 h1:SzNE2Y6sf9b1GJoC8qjCuMBXwQrACFp4p0RK15+4gmQ= +github.com/containers/image/v5 v5.32.2/go.mod h1:v1l73VeMugfj/QtKI+jhYbwnwFCFnNGckvbST3rQ5Hk= github.com/containers/libhvee v0.7.1 h1:dWGF5GLq9DZvXo3P8aDp3cNieL5eCaSell4UmeA/jY4= github.com/containers/libhvee v0.7.1/go.mod h1:fRKB3AyIqHMvq6xaeYhTpckM2cdoq0oecolyoiuLP7M= github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 h1:Qzk5C6cYglewc+UyGf6lc8Mj2UaPTHy/iF2De0/77CA= diff --git a/hack/golangci-lint.sh b/hack/golangci-lint.sh index 8803b68bd3e8..17d1e0075863 100755 --- a/hack/golangci-lint.sh +++ b/hack/golangci-lint.sh @@ -18,11 +18,11 @@ BUILD_TAGS_TUNNEL="$BUILD_TAGS_DEFAULT,remote" BUILD_TAGS_REMOTE="remote,containers_image_openpgp" SKIP_DIRS_ABI="" -SKIP_DIRS_TUNNEL="pkg/api,pkg/domain/infra/abi,internal/domain/infra/abi" -SKIP_DIRS_REMOTE="libpod/events,pkg/api,pkg/domain/infra/abi,internal/domain/infra/abi,pkg/machine/qemu,pkg/trust,test" +SKIP_DIRS_TUNNEL="" +SKIP_DIRS_REMOTE="libpod/events,pkg/machine/qemu,pkg/machine/wsl,test" declare -a to_lint -to_lint=(ABI TUNNEL REMOTE) +to_lint=(ABI TUNNEL) # Special-case, for Darwin and Windows only "remote" linting is possible and required. if [[ "$GOOS" == "windows" ]] || [[ "$GOOS" == "darwin" ]]; then diff --git a/internal/domain/entities/engine_testing.go b/internal/domain/entities/engine_testing.go index 9ad9ee18bb8c..28c78a46a593 100644 --- a/internal/domain/entities/engine_testing.go +++ b/internal/domain/entities/engine_testing.go @@ -1,3 +1,5 @@ +//go:build !remote + package entities import ( diff --git a/internal/domain/entities/testing.go b/internal/domain/entities/testing.go index 754c4927e751..caba5e61efca 100644 --- a/internal/domain/entities/testing.go +++ b/internal/domain/entities/testing.go @@ -1,3 +1,5 @@ +//go:build !remote + package entities type CreateStorageLayerOptions struct { diff --git a/internal/domain/infra/abi/testing.go b/internal/domain/infra/abi/testing.go index 4cf49d0801d3..f617656dbd5f 100644 --- a/internal/domain/infra/abi/testing.go +++ b/internal/domain/infra/abi/testing.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/internal/domain/infra/abi/testing_test.go b/internal/domain/infra/abi/testing_test.go index 75c6f4f54251..dbad5489d6b8 100644 --- a/internal/domain/infra/abi/testing_test.go +++ b/internal/domain/infra/abi/testing_test.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import "github.com/containers/podman/v5/internal/domain/entities" diff --git a/internal/domain/infra/runtime_tunnel.go b/internal/domain/infra/runtime_tunnel.go deleted file mode 100644 index 5bade4eddc1a..000000000000 --- a/internal/domain/infra/runtime_tunnel.go +++ /dev/null @@ -1,25 +0,0 @@ -//go:build remote - -package infra - -import ( - "context" - "fmt" - - ientities "github.com/containers/podman/v5/internal/domain/entities" - "github.com/containers/podman/v5/internal/domain/infra/tunnel" - "github.com/containers/podman/v5/pkg/bindings" - "github.com/containers/podman/v5/pkg/domain/entities" -) - -// NewTestingEngine factory provides a libpod runtime for testing-specific operations -func NewTestingEngine(facts *entities.PodmanConfig) (ientities.TestingEngine, error) { - switch facts.EngineMode { - case entities.ABIMode: - return nil, fmt.Errorf("direct image runtime not supported") - case entities.TunnelMode: - ctx, err := bindings.NewConnectionWithIdentity(context.Background(), facts.URI, facts.Identity, facts.MachineMode) - return &tunnel.TestingEngine{ClientCtx: ctx}, err - } - return nil, fmt.Errorf("runtime mode '%v' is not supported", facts.EngineMode) -} diff --git a/internal/domain/infra/tunnel/testing.go b/internal/domain/infra/tunnel/testing.go index 8efc6c37273c..66d62633ade9 100644 --- a/internal/domain/infra/tunnel/testing.go +++ b/internal/domain/infra/tunnel/testing.go @@ -1,3 +1,5 @@ +//go:build !remote + package tunnel import ( diff --git a/internal/domain/infra/tunnel/testing_test.go b/internal/domain/infra/tunnel/testing_test.go index d8cfa120f47f..f803e77a1a38 100644 --- a/internal/domain/infra/tunnel/testing_test.go +++ b/internal/domain/infra/tunnel/testing_test.go @@ -1,3 +1,5 @@ +//go:build !remote + package tunnel import "github.com/containers/podman/v5/internal/domain/entities" diff --git a/libpod/container_top_linux.go b/libpod/container_top_linux.go index 0b85a5a70545..bc8ed2511b2f 100644 --- a/libpod/container_top_linux.go +++ b/libpod/container_top_linux.go @@ -411,7 +411,7 @@ func (c *Container) execPSinContainer(args []string) ([]string, error) { if logrus.GetLevel() >= logrus.DebugLevel { // If we're running in debug mode or higher, we might want to have a // look at stderr which includes debug logs from conmon. - logrus.Debugf(errBuf.String()) + logrus.Debug(errBuf.String()) } if err := <-outErrChan; err != nil { diff --git a/libpod/events/logfile_test.go b/libpod/events/logfile_test.go index 0fb344177c9d..f391ef227726 100644 --- a/libpod/events/logfile_test.go +++ b/libpod/events/logfile_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package events import ( diff --git a/pkg/annotations/validate.go b/pkg/annotations/validate.go index 4ddeea30ed68..1e9c3bf866b4 100644 --- a/pkg/annotations/validate.go +++ b/pkg/annotations/validate.go @@ -1,6 +1,7 @@ package annotations import ( + "errors" "fmt" "regexp" "strings" @@ -41,7 +42,7 @@ func isDNS1123Subdomain(value string) error { } if !dns1123SubdomainRegexp.MatchString(value) { - return fmt.Errorf(regexErrorMsg(dns1123SubdomainErrorMsg, dns1123SubdomainFmt, "example.com")) + return errors.New(regexErrorMsg(dns1123SubdomainErrorMsg, dns1123SubdomainFmt, "example.com")) } return nil diff --git a/pkg/api/handlers/compat/auth.go b/pkg/api/handlers/compat/auth.go index 9364d4c6d941..162f7d652076 100644 --- a/pkg/api/handlers/compat/auth.go +++ b/pkg/api/handlers/compat/auth.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/changes.go b/pkg/api/handlers/compat/changes.go index 5b74ae07c319..cfcb0990f625 100644 --- a/pkg/api/handlers/compat/changes.go +++ b/pkg/api/handlers/compat/changes.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/containers.go b/pkg/api/handlers/compat/containers.go index dfaf6fbe7326..bd883bf6f2bb 100644 --- a/pkg/api/handlers/compat/containers.go +++ b/pkg/api/handlers/compat/containers.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/containers_archive.go b/pkg/api/handlers/compat/containers_archive.go index 044ec6455e3b..88496415255c 100644 --- a/pkg/api/handlers/compat/containers_archive.go +++ b/pkg/api/handlers/compat/containers_archive.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/containers_attach.go b/pkg/api/handlers/compat/containers_attach.go index 6d7295cdf23f..301be134b102 100644 --- a/pkg/api/handlers/compat/containers_attach.go +++ b/pkg/api/handlers/compat/containers_attach.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/containers_create.go b/pkg/api/handlers/compat/containers_create.go index cef33d37ddc8..404c117bb66a 100644 --- a/pkg/api/handlers/compat/containers_create.go +++ b/pkg/api/handlers/compat/containers_create.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/containers_export.go b/pkg/api/handlers/compat/containers_export.go index a95406ab7ad4..9cc4fd9f992c 100644 --- a/pkg/api/handlers/compat/containers_export.go +++ b/pkg/api/handlers/compat/containers_export.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/containers_logs.go b/pkg/api/handlers/compat/containers_logs.go index 3f5f75406c55..b1440ff9dd78 100644 --- a/pkg/api/handlers/compat/containers_logs.go +++ b/pkg/api/handlers/compat/containers_logs.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/containers_pause.go b/pkg/api/handlers/compat/containers_pause.go index acd06ae42067..b002d6bac80a 100644 --- a/pkg/api/handlers/compat/containers_pause.go +++ b/pkg/api/handlers/compat/containers_pause.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/containers_prune.go b/pkg/api/handlers/compat/containers_prune.go index 30b38403b0ca..fe2de393581a 100644 --- a/pkg/api/handlers/compat/containers_prune.go +++ b/pkg/api/handlers/compat/containers_prune.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/containers_restart.go b/pkg/api/handlers/compat/containers_restart.go index 3681993dde9c..91e8573f5f6c 100644 --- a/pkg/api/handlers/compat/containers_restart.go +++ b/pkg/api/handlers/compat/containers_restart.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/containers_start.go b/pkg/api/handlers/compat/containers_start.go index 813f5e1f1dba..ef4d7c5f8262 100644 --- a/pkg/api/handlers/compat/containers_start.go +++ b/pkg/api/handlers/compat/containers_start.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/containers_stats_freebsd.go b/pkg/api/handlers/compat/containers_stats_freebsd.go index 06490bbe9073..ad48739fb99d 100644 --- a/pkg/api/handlers/compat/containers_stats_freebsd.go +++ b/pkg/api/handlers/compat/containers_stats_freebsd.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/containers_stats_linux.go b/pkg/api/handlers/compat/containers_stats_linux.go index 6c4d5f2fbfac..ccb48dc3b432 100644 --- a/pkg/api/handlers/compat/containers_stats_linux.go +++ b/pkg/api/handlers/compat/containers_stats_linux.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/containers_stop.go b/pkg/api/handlers/compat/containers_stop.go index b80150833575..208c33f04308 100644 --- a/pkg/api/handlers/compat/containers_stop.go +++ b/pkg/api/handlers/compat/containers_stop.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/containers_top.go b/pkg/api/handlers/compat/containers_top.go index ea72919dfc0d..9653906277ed 100644 --- a/pkg/api/handlers/compat/containers_top.go +++ b/pkg/api/handlers/compat/containers_top.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/containers_unpause.go b/pkg/api/handlers/compat/containers_unpause.go index 7533c5a905fc..70205d258e50 100644 --- a/pkg/api/handlers/compat/containers_unpause.go +++ b/pkg/api/handlers/compat/containers_unpause.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/events.go b/pkg/api/handlers/compat/events.go index 4ab12eb02249..e449aa0cab04 100644 --- a/pkg/api/handlers/compat/events.go +++ b/pkg/api/handlers/compat/events.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/exec.go b/pkg/api/handlers/compat/exec.go index 88ccffa9f46a..e7f29d727a7c 100644 --- a/pkg/api/handlers/compat/exec.go +++ b/pkg/api/handlers/compat/exec.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/images.go b/pkg/api/handlers/compat/images.go index 8dde5f1f61c8..a7e2701cb1dc 100644 --- a/pkg/api/handlers/compat/images.go +++ b/pkg/api/handlers/compat/images.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( @@ -137,7 +139,7 @@ func CommitContainer(w http.ResponseWriter, r *http.Request) { options.Author = query.Author options.Pause = query.Pause options.Squash = query.Squash - options.Changes = handlers.DecodeChanges(query.Changes) + options.Changes = util.DecodeChanges(query.Changes) if r.Body != nil { defer r.Body.Close() if options.CommitOptions.OverrideConfig, err = abi.DecodeOverrideConfig(r.Body); err != nil { diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go index 898c6ff73203..baf94637c363 100644 --- a/pkg/api/handlers/compat/images_build.go +++ b/pkg/api/handlers/compat/images_build.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/images_history.go b/pkg/api/handlers/compat/images_history.go index 4ed97cdbe841..4d55ff4a6b4c 100644 --- a/pkg/api/handlers/compat/images_history.go +++ b/pkg/api/handlers/compat/images_history.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/images_prune.go b/pkg/api/handlers/compat/images_prune.go index 8cc303a6e2ef..35dbe290e076 100644 --- a/pkg/api/handlers/compat/images_prune.go +++ b/pkg/api/handlers/compat/images_prune.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/images_push.go b/pkg/api/handlers/compat/images_push.go index 1710006c677c..319dc98a27f9 100644 --- a/pkg/api/handlers/compat/images_push.go +++ b/pkg/api/handlers/compat/images_push.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/images_remove.go b/pkg/api/handlers/compat/images_remove.go index 957a87c5ad5d..5dd7a5695803 100644 --- a/pkg/api/handlers/compat/images_remove.go +++ b/pkg/api/handlers/compat/images_remove.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/images_save.go b/pkg/api/handlers/compat/images_save.go index 6314756f6b9e..c3022348a8c8 100644 --- a/pkg/api/handlers/compat/images_save.go +++ b/pkg/api/handlers/compat/images_save.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/images_search.go b/pkg/api/handlers/compat/images_search.go index d918929f6de9..93f2c47870b1 100644 --- a/pkg/api/handlers/compat/images_search.go +++ b/pkg/api/handlers/compat/images_search.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/images_tag.go b/pkg/api/handlers/compat/images_tag.go index d210b70764b2..9e5dc09d0c0e 100644 --- a/pkg/api/handlers/compat/images_tag.go +++ b/pkg/api/handlers/compat/images_tag.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/info.go b/pkg/api/handlers/compat/info.go index d4c2f5f649be..1f6e249b7449 100644 --- a/pkg/api/handlers/compat/info.go +++ b/pkg/api/handlers/compat/info.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/networks.go b/pkg/api/handlers/compat/networks.go index 598645bfc08d..4d31cfd2e91c 100644 --- a/pkg/api/handlers/compat/networks.go +++ b/pkg/api/handlers/compat/networks.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/ping.go b/pkg/api/handlers/compat/ping.go index 94d2099cdd0c..260178814314 100644 --- a/pkg/api/handlers/compat/ping.go +++ b/pkg/api/handlers/compat/ping.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/resize.go b/pkg/api/handlers/compat/resize.go index 8d13d9b70c7f..19ce87929cd1 100644 --- a/pkg/api/handlers/compat/resize.go +++ b/pkg/api/handlers/compat/resize.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/secrets.go b/pkg/api/handlers/compat/secrets.go index 13f7508ca244..bf1cdca0f3f6 100644 --- a/pkg/api/handlers/compat/secrets.go +++ b/pkg/api/handlers/compat/secrets.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/system.go b/pkg/api/handlers/compat/system.go index d53e9c3012dd..e22920cbc1c4 100644 --- a/pkg/api/handlers/compat/system.go +++ b/pkg/api/handlers/compat/system.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/types.go b/pkg/api/handlers/compat/types.go index 3c42190932df..2402fe7b4575 100644 --- a/pkg/api/handlers/compat/types.go +++ b/pkg/api/handlers/compat/types.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/unsupported.go b/pkg/api/handlers/compat/unsupported.go index 31afb85bad09..476502fe06d2 100644 --- a/pkg/api/handlers/compat/unsupported.go +++ b/pkg/api/handlers/compat/unsupported.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/version.go b/pkg/api/handlers/compat/version.go index 4b0af7bf79d0..e1c40007e799 100644 --- a/pkg/api/handlers/compat/version.go +++ b/pkg/api/handlers/compat/version.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/compat/volumes.go b/pkg/api/handlers/compat/volumes.go index 4bb0a168070a..943190841be3 100644 --- a/pkg/api/handlers/compat/volumes.go +++ b/pkg/api/handlers/compat/volumes.go @@ -1,3 +1,5 @@ +//go:build !remote + package compat import ( diff --git a/pkg/api/handlers/decoder.go b/pkg/api/handlers/decoder.go index 4750fa1c54c8..6904f4f21e51 100644 --- a/pkg/api/handlers/decoder.go +++ b/pkg/api/handlers/decoder.go @@ -1,3 +1,5 @@ +//go:build !remote + package handlers import ( diff --git a/pkg/api/handlers/libpod/containers.go b/pkg/api/handlers/libpod/containers.go index 0dabd649bbbc..726c30b2e7a3 100644 --- a/pkg/api/handlers/libpod/containers.go +++ b/pkg/api/handlers/libpod/containers.go @@ -1,3 +1,5 @@ +//go:build !remote + package libpod import ( diff --git a/pkg/api/handlers/libpod/containers_create.go b/pkg/api/handlers/libpod/containers_create.go index 1df0bb2a407a..1a129422264b 100644 --- a/pkg/api/handlers/libpod/containers_create.go +++ b/pkg/api/handlers/libpod/containers_create.go @@ -1,3 +1,5 @@ +//go:build !remote + package libpod import ( diff --git a/pkg/api/handlers/libpod/containers_stats.go b/pkg/api/handlers/libpod/containers_stats.go index 2ed2006c913c..d595e3d60706 100644 --- a/pkg/api/handlers/libpod/containers_stats.go +++ b/pkg/api/handlers/libpod/containers_stats.go @@ -1,3 +1,5 @@ +//go:build !remote + package libpod import ( diff --git a/pkg/api/handlers/libpod/generate.go b/pkg/api/handlers/libpod/generate.go index 9c9ea458a958..575136937669 100644 --- a/pkg/api/handlers/libpod/generate.go +++ b/pkg/api/handlers/libpod/generate.go @@ -1,3 +1,5 @@ +//go:build !remote + package libpod import ( diff --git a/pkg/api/handlers/libpod/healthcheck.go b/pkg/api/handlers/libpod/healthcheck.go index e5e921405107..c5ccdbac383a 100644 --- a/pkg/api/handlers/libpod/healthcheck.go +++ b/pkg/api/handlers/libpod/healthcheck.go @@ -1,3 +1,5 @@ +//go:build !remote + package libpod import ( diff --git a/pkg/api/handlers/libpod/images.go b/pkg/api/handlers/libpod/images.go index aa12e5976bd9..91d2b7377a9d 100644 --- a/pkg/api/handlers/libpod/images.go +++ b/pkg/api/handlers/libpod/images.go @@ -1,3 +1,5 @@ +//go:build !remote + package libpod import ( @@ -499,7 +501,7 @@ func CommitContainer(w http.ResponseWriter, r *http.Request) { options.Author = query.Author options.Pause = query.Pause options.Squash = query.Squash - options.Changes = handlers.DecodeChanges(query.Changes) + options.Changes = util.DecodeChanges(query.Changes) ctr, err := runtime.LookupContainer(query.Container) if err != nil { utils.Error(w, http.StatusNotFound, err) diff --git a/pkg/api/handlers/libpod/images_pull.go b/pkg/api/handlers/libpod/images_pull.go index 7075b98b648a..317e33d64e08 100644 --- a/pkg/api/handlers/libpod/images_pull.go +++ b/pkg/api/handlers/libpod/images_pull.go @@ -1,3 +1,5 @@ +//go:build !remote + package libpod import ( diff --git a/pkg/api/handlers/libpod/images_push.go b/pkg/api/handlers/libpod/images_push.go index ce9d5d19e142..576f25cf64b7 100644 --- a/pkg/api/handlers/libpod/images_push.go +++ b/pkg/api/handlers/libpod/images_push.go @@ -1,3 +1,5 @@ +//go:build !remote + package libpod import ( diff --git a/pkg/api/handlers/libpod/info.go b/pkg/api/handlers/libpod/info.go index 536cd51d8f9c..546991699b58 100644 --- a/pkg/api/handlers/libpod/info.go +++ b/pkg/api/handlers/libpod/info.go @@ -1,3 +1,5 @@ +//go:build !remote + package libpod import ( diff --git a/pkg/api/handlers/libpod/kube.go b/pkg/api/handlers/libpod/kube.go index 8d6d096ca106..7068074f3b31 100644 --- a/pkg/api/handlers/libpod/kube.go +++ b/pkg/api/handlers/libpod/kube.go @@ -1,3 +1,5 @@ +//go:build !remote + package libpod import ( diff --git a/pkg/api/handlers/libpod/manifests.go b/pkg/api/handlers/libpod/manifests.go index ee97aa1f120b..124f94ba8211 100644 --- a/pkg/api/handlers/libpod/manifests.go +++ b/pkg/api/handlers/libpod/manifests.go @@ -1,3 +1,5 @@ +//go:build !remote + package libpod import ( diff --git a/pkg/api/handlers/libpod/networks.go b/pkg/api/handlers/libpod/networks.go index e427cb94f6ce..1bbcfa9f5e76 100644 --- a/pkg/api/handlers/libpod/networks.go +++ b/pkg/api/handlers/libpod/networks.go @@ -1,3 +1,5 @@ +//go:build !remote + package libpod import ( diff --git a/pkg/api/handlers/libpod/play.go b/pkg/api/handlers/libpod/play.go index 74830badbf5b..0e7625c5ff05 100644 --- a/pkg/api/handlers/libpod/play.go +++ b/pkg/api/handlers/libpod/play.go @@ -1,3 +1,5 @@ +//go:build !remote + package libpod import ( diff --git a/pkg/api/handlers/libpod/pods.go b/pkg/api/handlers/libpod/pods.go index 8bc081f1609f..6b318d070da3 100644 --- a/pkg/api/handlers/libpod/pods.go +++ b/pkg/api/handlers/libpod/pods.go @@ -1,3 +1,5 @@ +//go:build !remote + package libpod import ( diff --git a/pkg/api/handlers/libpod/secrets.go b/pkg/api/handlers/libpod/secrets.go index 56d27778c549..068ebecb761e 100644 --- a/pkg/api/handlers/libpod/secrets.go +++ b/pkg/api/handlers/libpod/secrets.go @@ -1,3 +1,5 @@ +//go:build !remote + package libpod import ( diff --git a/pkg/api/handlers/libpod/swagger_spec.go b/pkg/api/handlers/libpod/swagger_spec.go index 3ba2cb4d353c..bcfb407e382b 100644 --- a/pkg/api/handlers/libpod/swagger_spec.go +++ b/pkg/api/handlers/libpod/swagger_spec.go @@ -1,3 +1,5 @@ +//go:build !remote + package libpod import ( diff --git a/pkg/api/handlers/libpod/system.go b/pkg/api/handlers/libpod/system.go index c6444fd901ba..a658d20d9085 100644 --- a/pkg/api/handlers/libpod/system.go +++ b/pkg/api/handlers/libpod/system.go @@ -1,3 +1,5 @@ +//go:build !remote + package libpod import ( diff --git a/pkg/api/handlers/libpod/volumes.go b/pkg/api/handlers/libpod/volumes.go index b3b3ce27aebf..986052e92435 100644 --- a/pkg/api/handlers/libpod/volumes.go +++ b/pkg/api/handlers/libpod/volumes.go @@ -1,3 +1,5 @@ +//go:build !remote + package libpod import ( diff --git a/pkg/api/handlers/swagger/doc.go b/pkg/api/handlers/swagger/doc.go index 7e535ea2981c..8b1c557c6c4c 100644 --- a/pkg/api/handlers/swagger/doc.go +++ b/pkg/api/handlers/swagger/doc.go @@ -1,3 +1,5 @@ +//go:build !remote + // Package swagger defines the payloads used by the Podman API // // - errors.go: declares the errors used in the API. By embedding errors.ErrorModel, more meaningful diff --git a/pkg/api/handlers/swagger/errors.go b/pkg/api/handlers/swagger/errors.go index 176fa3c18cd6..2fac8b36fa99 100644 --- a/pkg/api/handlers/swagger/errors.go +++ b/pkg/api/handlers/swagger/errors.go @@ -1,3 +1,5 @@ +//go:build !remote + //nolint:unused // these types are used to wire generated swagger to API code package swagger diff --git a/pkg/api/handlers/swagger/models.go b/pkg/api/handlers/swagger/models.go index d792c410723b..56fd5d8b5666 100644 --- a/pkg/api/handlers/swagger/models.go +++ b/pkg/api/handlers/swagger/models.go @@ -1,3 +1,5 @@ +//go:build !remote + //nolint:unused // these types are used to wire generated swagger to API code package swagger diff --git a/pkg/api/handlers/swagger/responses.go b/pkg/api/handlers/swagger/responses.go index 5c0192f91953..f3fe1333423b 100644 --- a/pkg/api/handlers/swagger/responses.go +++ b/pkg/api/handlers/swagger/responses.go @@ -1,3 +1,5 @@ +//go:build !remote + //nolint:unused // these types are used to wire generated swagger to API code package swagger diff --git a/pkg/api/handlers/utils/apiutil/apiutil.go b/pkg/api/handlers/utils/apiutil/apiutil.go index 48f4dfba5d13..f5fde780b4fc 100644 --- a/pkg/api/handlers/utils/apiutil/apiutil.go +++ b/pkg/api/handlers/utils/apiutil/apiutil.go @@ -1,3 +1,5 @@ +//go:build !remote + package apiutil import ( diff --git a/pkg/api/handlers/utils/apiutil/apiutil_test.go b/pkg/api/handlers/utils/apiutil/apiutil_test.go index 377c0ef84ae6..02a1194d0638 100644 --- a/pkg/api/handlers/utils/apiutil/apiutil_test.go +++ b/pkg/api/handlers/utils/apiutil/apiutil_test.go @@ -1,3 +1,5 @@ +//go:build !remote + package apiutil import ( diff --git a/pkg/api/handlers/utils/containers.go b/pkg/api/handlers/utils/containers.go index 383505cabbe2..62af4b45d136 100644 --- a/pkg/api/handlers/utils/containers.go +++ b/pkg/api/handlers/utils/containers.go @@ -1,3 +1,5 @@ +//go:build !remote + package utils import ( diff --git a/pkg/api/handlers/utils/errors.go b/pkg/api/handlers/utils/errors.go index f659aa06cc3a..82255ac4101f 100644 --- a/pkg/api/handlers/utils/errors.go +++ b/pkg/api/handlers/utils/errors.go @@ -1,3 +1,5 @@ +//go:build !remote + package utils import ( diff --git a/pkg/api/handlers/utils/handler.go b/pkg/api/handlers/utils/handler.go index 49bbf4c0cf78..dc425ce6568f 100644 --- a/pkg/api/handlers/utils/handler.go +++ b/pkg/api/handlers/utils/handler.go @@ -1,3 +1,5 @@ +//go:build !remote + package utils import ( diff --git a/pkg/api/handlers/utils/handler_test.go b/pkg/api/handlers/utils/handler_test.go index 099f4169b924..4df0f08042c8 100644 --- a/pkg/api/handlers/utils/handler_test.go +++ b/pkg/api/handlers/utils/handler_test.go @@ -1,3 +1,5 @@ +//go:build !remote + package utils import ( diff --git a/pkg/api/handlers/utils/images.go b/pkg/api/handlers/utils/images.go index c330e45e5540..f97f4939726c 100644 --- a/pkg/api/handlers/utils/images.go +++ b/pkg/api/handlers/utils/images.go @@ -1,3 +1,5 @@ +//go:build !remote + package utils import ( diff --git a/pkg/api/server/doc.go b/pkg/api/server/doc.go index b7f31fffa9d0..63a9bc0a3a96 100644 --- a/pkg/api/server/doc.go +++ b/pkg/api/server/doc.go @@ -1,3 +1,5 @@ +//go:build !remote + // Package server supports a RESTful API for the Libpod library // // This documentation describes the Podman v2.x+ RESTful API. It consists of a Docker-compatible diff --git a/pkg/api/server/handler_api.go b/pkg/api/server/handler_api.go index 7696db4eec9b..9a895f0814bf 100644 --- a/pkg/api/server/handler_api.go +++ b/pkg/api/server/handler_api.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/handler_logging.go b/pkg/api/server/handler_logging.go index 2f62a28fd369..1fd75e233f6d 100644 --- a/pkg/api/server/handler_logging.go +++ b/pkg/api/server/handler_logging.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/handler_panic.go b/pkg/api/server/handler_panic.go index 5bab6eff8354..e654c0047a12 100644 --- a/pkg/api/server/handler_panic.go +++ b/pkg/api/server/handler_panic.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/handler_rid.go b/pkg/api/server/handler_rid.go index 7869cc1a1485..1acd47823b1e 100644 --- a/pkg/api/server/handler_rid.go +++ b/pkg/api/server/handler_rid.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/idle/tracker.go b/pkg/api/server/idle/tracker.go index fe815f61385d..c192d13e11de 100644 --- a/pkg/api/server/idle/tracker.go +++ b/pkg/api/server/idle/tracker.go @@ -1,3 +1,5 @@ +//go:build !remote + package idle import ( diff --git a/pkg/api/server/listener_api.go b/pkg/api/server/listener_api.go index 38abe274314b..a657396922ae 100644 --- a/pkg/api/server/listener_api.go +++ b/pkg/api/server/listener_api.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_archive.go b/pkg/api/server/register_archive.go index 6e031a074e02..b21983a2412d 100644 --- a/pkg/api/server/register_archive.go +++ b/pkg/api/server/register_archive.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_auth.go b/pkg/api/server/register_auth.go index 6fabd65fe096..d199f4cfae3c 100644 --- a/pkg/api/server/register_auth.go +++ b/pkg/api/server/register_auth.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_containers.go b/pkg/api/server/register_containers.go index b3a603af950f..cc1cc5e74df2 100644 --- a/pkg/api/server/register_containers.go +++ b/pkg/api/server/register_containers.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_distribution.go b/pkg/api/server/register_distribution.go index d85480d09039..90607bb99fa4 100644 --- a/pkg/api/server/register_distribution.go +++ b/pkg/api/server/register_distribution.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_events.go b/pkg/api/server/register_events.go index aa8b3d0d9ab7..5f8090fc8b86 100644 --- a/pkg/api/server/register_events.go +++ b/pkg/api/server/register_events.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_exec.go b/pkg/api/server/register_exec.go index 56228ae1aa3f..f1eaaeaf010b 100644 --- a/pkg/api/server/register_exec.go +++ b/pkg/api/server/register_exec.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_generate.go b/pkg/api/server/register_generate.go index 2d1d517cf82e..c5299a575436 100644 --- a/pkg/api/server/register_generate.go +++ b/pkg/api/server/register_generate.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_healthcheck.go b/pkg/api/server/register_healthcheck.go index b3643af6df27..1535f984ced2 100644 --- a/pkg/api/server/register_healthcheck.go +++ b/pkg/api/server/register_healthcheck.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_images.go b/pkg/api/server/register_images.go index 68ab63cc1d93..fa01634b5cc0 100644 --- a/pkg/api/server/register_images.go +++ b/pkg/api/server/register_images.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_info.go b/pkg/api/server/register_info.go index 5f6a11432642..6252ac57c2f9 100644 --- a/pkg/api/server/register_info.go +++ b/pkg/api/server/register_info.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_kube.go b/pkg/api/server/register_kube.go index 567874666972..b50bafecab9f 100644 --- a/pkg/api/server/register_kube.go +++ b/pkg/api/server/register_kube.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_manifest.go b/pkg/api/server/register_manifest.go index a7bd4efc11e4..a6de54d0b6aa 100644 --- a/pkg/api/server/register_manifest.go +++ b/pkg/api/server/register_manifest.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_monitor.go b/pkg/api/server/register_monitor.go index b892442bd2de..7bcfafa81394 100644 --- a/pkg/api/server/register_monitor.go +++ b/pkg/api/server/register_monitor.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_networks.go b/pkg/api/server/register_networks.go index 38075e93b59a..c324b4c73b5b 100644 --- a/pkg/api/server/register_networks.go +++ b/pkg/api/server/register_networks.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_ping.go b/pkg/api/server/register_ping.go index 041fbf301a42..ee0098e9afe9 100644 --- a/pkg/api/server/register_ping.go +++ b/pkg/api/server/register_ping.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_plugins.go b/pkg/api/server/register_plugins.go index 2e4aca8d4aa1..8ea03d73760a 100644 --- a/pkg/api/server/register_plugins.go +++ b/pkg/api/server/register_plugins.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_pods.go b/pkg/api/server/register_pods.go index 0eb7e79a801e..842e1588fcdd 100644 --- a/pkg/api/server/register_pods.go +++ b/pkg/api/server/register_pods.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_secrets.go b/pkg/api/server/register_secrets.go index deb0fc2492ad..0540abf356eb 100644 --- a/pkg/api/server/register_secrets.go +++ b/pkg/api/server/register_secrets.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_swagger.go b/pkg/api/server/register_swagger.go index ceb9d874263e..db5c6709e4c3 100644 --- a/pkg/api/server/register_swagger.go +++ b/pkg/api/server/register_swagger.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_swarm.go b/pkg/api/server/register_swarm.go index 4dcb63cf3254..af819ebb34fb 100644 --- a/pkg/api/server/register_swarm.go +++ b/pkg/api/server/register_swarm.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_system.go b/pkg/api/server/register_system.go index 4010dfb0e088..91d31a86d3ac 100644 --- a/pkg/api/server/register_system.go +++ b/pkg/api/server/register_system.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_version.go b/pkg/api/server/register_version.go index 1a62e51d830c..1d1ca0eef071 100644 --- a/pkg/api/server/register_version.go +++ b/pkg/api/server/register_version.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/register_volumes.go b/pkg/api/server/register_volumes.go index 7ad71e58cb70..867325d24e8d 100644 --- a/pkg/api/server/register_volumes.go +++ b/pkg/api/server/register_volumes.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/server/server.go b/pkg/api/server/server.go index 8c5b73872aa0..4c07390d0d5a 100644 --- a/pkg/api/server/server.go +++ b/pkg/api/server/server.go @@ -1,3 +1,5 @@ +//go:build !remote + package server import ( diff --git a/pkg/api/types/types.go b/pkg/api/types/types.go index a01ded0111da..eb4d89e0f25c 100644 --- a/pkg/api/types/types.go +++ b/pkg/api/types/types.go @@ -1,3 +1,5 @@ +//go:build !remote + package types type APIContextKey int diff --git a/pkg/autoupdate/autoupdate.go b/pkg/autoupdate/autoupdate.go index df6627e378b7..f82090399f0e 100644 --- a/pkg/autoupdate/autoupdate.go +++ b/pkg/autoupdate/autoupdate.go @@ -131,7 +131,7 @@ func AutoUpdate(ctx context.Context, runtime *libpod.Runtime, options entities.A // Connect to DBUS. conn, err := systemd.ConnectToDBUS() if err != nil { - logrus.Errorf(err.Error()) + logrus.Error(err.Error()) allErrors = append(allErrors, err) return nil, allErrors } diff --git a/pkg/bindings/test/resource_test.go b/pkg/bindings/test/resource_test.go index 3a2421c8a339..1afca1d78825 100644 --- a/pkg/bindings/test/resource_test.go +++ b/pkg/bindings/test/resource_test.go @@ -1,3 +1,5 @@ +//go:build linux + package bindings_test import ( diff --git a/pkg/domain/infra/abi/apply.go b/pkg/domain/infra/abi/apply.go index 903154636545..2c3986b4e135 100644 --- a/pkg/domain/infra/abi/apply.go +++ b/pkg/domain/infra/abi/apply.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/archive.go b/pkg/domain/infra/abi/archive.go index 49dc9f3f0404..711d54f93d26 100644 --- a/pkg/domain/infra/abi/archive.go +++ b/pkg/domain/infra/abi/archive.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/auto-update.go b/pkg/domain/infra/abi/auto-update.go index 57504e92a17c..f8f14169da2f 100644 --- a/pkg/domain/infra/abi/auto-update.go +++ b/pkg/domain/infra/abi/auto-update.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/config.go b/pkg/domain/infra/abi/config.go index ae564cf44287..bc41498a8ed4 100644 --- a/pkg/domain/infra/abi/config.go +++ b/pkg/domain/infra/abi/config.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/config_test.go b/pkg/domain/infra/abi/config_test.go index 4a9af42e43de..6ac29276ca4a 100644 --- a/pkg/domain/infra/abi/config_test.go +++ b/pkg/domain/infra/abi/config_test.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go index e2356e9d6b9e..3cbeb2cd6583 100644 --- a/pkg/domain/infra/abi/containers.go +++ b/pkg/domain/infra/abi/containers.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( @@ -18,7 +20,6 @@ import ( "github.com/containers/podman/v5/libpod" "github.com/containers/podman/v5/libpod/define" "github.com/containers/podman/v5/libpod/logs" - "github.com/containers/podman/v5/pkg/api/handlers" "github.com/containers/podman/v5/pkg/checkpoint" "github.com/containers/podman/v5/pkg/domain/entities" "github.com/containers/podman/v5/pkg/domain/entities/reports" @@ -585,7 +586,7 @@ func (ic *ContainerEngine) ContainerCommit(ctx context.Context, nameOrID string, sc := ic.Libpod.SystemContext() var changes []string if len(options.Changes) > 0 { - changes = handlers.DecodeChanges(options.Changes) + changes = util.DecodeChanges(options.Changes) } var overrideConfig *manifest.Schema2Config if len(options.Config) > 0 { diff --git a/pkg/domain/infra/abi/containers_freebsd.go b/pkg/domain/infra/abi/containers_freebsd.go index a095a87cb7ad..cb4741839949 100644 --- a/pkg/domain/infra/abi/containers_freebsd.go +++ b/pkg/domain/infra/abi/containers_freebsd.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi const processFileDescriptorsPath = "/dev/fd" diff --git a/pkg/domain/infra/abi/containers_linux.go b/pkg/domain/infra/abi/containers_linux.go index 10b3d33a4969..927aaa611e6e 100644 --- a/pkg/domain/infra/abi/containers_linux.go +++ b/pkg/domain/infra/abi/containers_linux.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi const processFileDescriptorsPath = "/proc/self/fd" diff --git a/pkg/domain/infra/abi/containers_runlabel.go b/pkg/domain/infra/abi/containers_runlabel.go index 2a4119996fd6..d27ea0ec7da0 100644 --- a/pkg/domain/infra/abi/containers_runlabel.go +++ b/pkg/domain/infra/abi/containers_runlabel.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/containers_runlabel_test.go b/pkg/domain/infra/abi/containers_runlabel_test.go index 10f9ae0040e7..3b12b54f7d81 100644 --- a/pkg/domain/infra/abi/containers_runlabel_test.go +++ b/pkg/domain/infra/abi/containers_runlabel_test.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/containers_stat.go b/pkg/domain/infra/abi/containers_stat.go index 99cde003503d..aed498fe018d 100644 --- a/pkg/domain/infra/abi/containers_stat.go +++ b/pkg/domain/infra/abi/containers_stat.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/events.go b/pkg/domain/infra/abi/events.go index ffbd119f1c27..ad2bf5313f00 100644 --- a/pkg/domain/infra/abi/events.go +++ b/pkg/domain/infra/abi/events.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/generate.go b/pkg/domain/infra/abi/generate.go index e424500fbdbf..d58fb0323897 100644 --- a/pkg/domain/infra/abi/generate.go +++ b/pkg/domain/infra/abi/generate.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/healthcheck.go b/pkg/domain/infra/abi/healthcheck.go index b464c88c4b27..6c61dfa4febb 100644 --- a/pkg/domain/infra/abi/healthcheck.go +++ b/pkg/domain/infra/abi/healthcheck.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go index f7d5356aeda7..16b8b662a161 100644 --- a/pkg/domain/infra/abi/images.go +++ b/pkg/domain/infra/abi/images.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/images_list.go b/pkg/domain/infra/abi/images_list.go index 6f6d575711be..9fa855035a53 100644 --- a/pkg/domain/infra/abi/images_list.go +++ b/pkg/domain/infra/abi/images_list.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/images_test.go b/pkg/domain/infra/abi/images_test.go index 3999de45784f..f24a11cd0e3f 100644 --- a/pkg/domain/infra/abi/images_test.go +++ b/pkg/domain/infra/abi/images_test.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/internal/expansion/expand.go b/pkg/domain/infra/abi/internal/expansion/expand.go index 6bf0ea8ce09f..293679380a72 100644 --- a/pkg/domain/infra/abi/internal/expansion/expand.go +++ b/pkg/domain/infra/abi/internal/expansion/expand.go @@ -1,3 +1,5 @@ +//go:build !remote + package expansion import ( diff --git a/pkg/domain/infra/abi/internal/expansion/expand_test.go b/pkg/domain/infra/abi/internal/expansion/expand_test.go index 45f32edfc695..e432ceee66bd 100644 --- a/pkg/domain/infra/abi/internal/expansion/expand_test.go +++ b/pkg/domain/infra/abi/internal/expansion/expand_test.go @@ -1,3 +1,5 @@ +//go:build !remote + package expansion import ( diff --git a/pkg/domain/infra/abi/manifest.go b/pkg/domain/infra/abi/manifest.go index 144740ec884e..812c8e1ae314 100644 --- a/pkg/domain/infra/abi/manifest.go +++ b/pkg/domain/infra/abi/manifest.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/network.go b/pkg/domain/infra/abi/network.go index c39b9c600b2b..5dc3963ba1c0 100644 --- a/pkg/domain/infra/abi/network.go +++ b/pkg/domain/infra/abi/network.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/parse/parse.go b/pkg/domain/infra/abi/parse/parse.go index 571e52a951ff..268610716c49 100644 --- a/pkg/domain/infra/abi/parse/parse.go +++ b/pkg/domain/infra/abi/parse/parse.go @@ -1,3 +1,5 @@ +//go:build !remote + package parse import ( diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go index ec5c1a1fc30c..e5c24b1d2a4a 100644 --- a/pkg/domain/infra/abi/play.go +++ b/pkg/domain/infra/abi/play.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/play_test.go b/pkg/domain/infra/abi/play_test.go index 4661763e287a..ef6207f127be 100644 --- a/pkg/domain/infra/abi/play_test.go +++ b/pkg/domain/infra/abi/play_test.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/play_utils.go b/pkg/domain/infra/abi/play_utils.go index 16d30acd1630..7285d9c9b987 100644 --- a/pkg/domain/infra/abi/play_utils.go +++ b/pkg/domain/infra/abi/play_utils.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import "github.com/containers/podman/v5/libpod/define" diff --git a/pkg/domain/infra/abi/play_utils_test.go b/pkg/domain/infra/abi/play_utils_test.go index 8bc56e234b77..fa4b6010c0cd 100644 --- a/pkg/domain/infra/abi/play_utils_test.go +++ b/pkg/domain/infra/abi/play_utils_test.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/pods.go b/pkg/domain/infra/abi/pods.go index 8d4453202340..d402421cc8b2 100644 --- a/pkg/domain/infra/abi/pods.go +++ b/pkg/domain/infra/abi/pods.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/pods_stats.go b/pkg/domain/infra/abi/pods_stats.go index 26d070344e43..3b76407f7d76 100644 --- a/pkg/domain/infra/abi/pods_stats.go +++ b/pkg/domain/infra/abi/pods_stats.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/runtime.go b/pkg/domain/infra/abi/runtime.go index bfa182f24320..6e5f3240efc2 100644 --- a/pkg/domain/infra/abi/runtime.go +++ b/pkg/domain/infra/abi/runtime.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/secrets.go b/pkg/domain/infra/abi/secrets.go index 02fbc9426974..5f5cfdc19bfc 100644 --- a/pkg/domain/infra/abi/secrets.go +++ b/pkg/domain/infra/abi/secrets.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/secrets_test.go b/pkg/domain/infra/abi/secrets_test.go index 6b3a745e2564..fb6157d9c554 100644 --- a/pkg/domain/infra/abi/secrets_test.go +++ b/pkg/domain/infra/abi/secrets_test.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/system.go b/pkg/domain/infra/abi/system.go index 5da8aba326fd..440d81e48bce 100644 --- a/pkg/domain/infra/abi/system.go +++ b/pkg/domain/infra/abi/system.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/system_freebsd.go b/pkg/domain/infra/abi/system_freebsd.go index 1521a7e1a8f0..9f17df7828fb 100644 --- a/pkg/domain/infra/abi/system_freebsd.go +++ b/pkg/domain/infra/abi/system_freebsd.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/system_linux.go b/pkg/domain/infra/abi/system_linux.go index 6dd99554cdfd..50e4632408e3 100644 --- a/pkg/domain/infra/abi/system_linux.go +++ b/pkg/domain/infra/abi/system_linux.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/terminal/sigproxy_commn.go b/pkg/domain/infra/abi/terminal/sigproxy_commn.go index e4a601f93de0..df9aee00ad2f 100644 --- a/pkg/domain/infra/abi/terminal/sigproxy_commn.go +++ b/pkg/domain/infra/abi/terminal/sigproxy_commn.go @@ -1,4 +1,4 @@ -//go:build linux || freebsd +//go:build (linux || freebsd) && !remote package terminal diff --git a/pkg/domain/infra/abi/terminal/terminal.go b/pkg/domain/infra/abi/terminal/terminal.go index c7b75c6c29d5..954997c095e0 100644 --- a/pkg/domain/infra/abi/terminal/terminal.go +++ b/pkg/domain/infra/abi/terminal/terminal.go @@ -1,3 +1,5 @@ +//go:build !remote + package terminal import ( diff --git a/pkg/domain/infra/abi/terminal/terminal_common.go b/pkg/domain/infra/abi/terminal/terminal_common.go index 5ca0d8d2c4ad..065ac3012d0b 100644 --- a/pkg/domain/infra/abi/terminal/terminal_common.go +++ b/pkg/domain/infra/abi/terminal/terminal_common.go @@ -1,4 +1,4 @@ -//go:build linux || freebsd +//go:build (linux || freebsd) && !remote package terminal diff --git a/pkg/domain/infra/abi/terminal/terminal_unsupported.go b/pkg/domain/infra/abi/terminal/terminal_unsupported.go index a1b5ac37d19b..b67c73875168 100644 --- a/pkg/domain/infra/abi/terminal/terminal_unsupported.go +++ b/pkg/domain/infra/abi/terminal/terminal_unsupported.go @@ -1,4 +1,4 @@ -//go:build !linux && !freebsd +//go:build !linux && !freebsd && !remote package terminal diff --git a/pkg/domain/infra/abi/trust.go b/pkg/domain/infra/abi/trust.go index e23ed4bd57b1..5b617b1154cd 100644 --- a/pkg/domain/infra/abi/trust.go +++ b/pkg/domain/infra/abi/trust.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/abi/volumes.go b/pkg/domain/infra/abi/volumes.go index d99ab0f992f9..7ecc29324f2e 100644 --- a/pkg/domain/infra/abi/volumes.go +++ b/pkg/domain/infra/abi/volumes.go @@ -1,3 +1,5 @@ +//go:build !remote + package abi import ( diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go index 9c81fb2197a6..6e8c6fea4418 100644 --- a/pkg/domain/infra/tunnel/containers.go +++ b/pkg/domain/infra/tunnel/containers.go @@ -350,7 +350,7 @@ func (ic *ContainerEngine) ContainerCommit(ctx context.Context, nameOrID string, } var changes []string if len(opts.Changes) > 0 { - changes = handlers.DecodeChanges(opts.Changes) + changes = util.DecodeChanges(opts.Changes) } var configReader io.Reader if len(opts.Config) > 0 { diff --git a/pkg/machine/apple/vfkit/helper.go b/pkg/machine/apple/vfkit/helper.go index f971129b1621..47a3c98bf69c 100644 --- a/pkg/machine/apple/vfkit/helper.go +++ b/pkg/machine/apple/vfkit/helper.go @@ -102,7 +102,8 @@ func (vf *Helper) Stop(force, wait bool) error { // Wait up to 90s then hard force off for i := 0; i < 180; i++ { _, err := vf.getRawState() - if err != nil || errors.Is(err, unix.ECONNREFUSED) { + if err != nil { + //nolint:nilerr // error means vfkit is gone so machine is stopped return nil } time.Sleep(waitDuration) diff --git a/pkg/machine/ignition/ignition.go b/pkg/machine/ignition/ignition.go index 58e7b622f150..62bf7a872fe8 100644 --- a/pkg/machine/ignition/ignition.go +++ b/pkg/machine/ignition/ignition.go @@ -303,7 +303,7 @@ func getFiles(usrName string, uid int, rootful bool, vmtype define.VMType, _ boo lingerExample.Add("Service", "ExecStart", "/usr/bin/sleep infinity") lingerExampleFile, err := lingerExample.ToString() if err != nil { - logrus.Warnf(err.Error()) + logrus.Warn(err.Error()) } containers := `[containers] diff --git a/pkg/machine/machine_windows.go b/pkg/machine/machine_windows.go index 7d39795bc5ef..d6c23e64f857 100644 --- a/pkg/machine/machine_windows.go +++ b/pkg/machine/machine_windows.go @@ -207,8 +207,8 @@ func readWinProxyTid(name string, vmtype define.VMType) (uint32, uint32, string, } var pid, tid uint32 - fmt.Sscanf(string(contents), "%d:%d", &pid, &tid) - return pid, tid, tidFile, nil + _, err = fmt.Sscanf(string(contents), "%d:%d", &pid, &tid) + return pid, tid, tidFile, err } func waitTimeout(proc *os.Process, timeout time.Duration) bool { diff --git a/pkg/machine/qemu/config.go b/pkg/machine/qemu/config.go index 760df18eadca..7d86bb6349d0 100644 --- a/pkg/machine/qemu/config.go +++ b/pkg/machine/qemu/config.go @@ -1,4 +1,4 @@ -//go:build !darwin +//go:build !darwin && !windows package qemu diff --git a/pkg/specgen/generate/config_linux.go b/pkg/specgen/generate/config_linux.go index ddca2b151c59..5954b78c22a7 100644 --- a/pkg/specgen/generate/config_linux.go +++ b/pkg/specgen/generate/config_linux.go @@ -176,7 +176,7 @@ func shouldMask(mask string, unmask []string) bool { for _, m1 := range strings.Split(m, ":") { match, err := filepath.Match(m1, mask) if err != nil { - logrus.Errorf(err.Error()) + logrus.Error(err.Error()) } if match { return false diff --git a/pkg/specgen/generate/pod_create.go b/pkg/specgen/generate/pod_create.go index 79348aec8b4c..c4c8dc45110b 100644 --- a/pkg/specgen/generate/pod_create.go +++ b/pkg/specgen/generate/pod_create.go @@ -268,7 +268,7 @@ func MapSpec(p *specgen.PodSpecGenerator) (*specgen.SpecGenerator, error) { spec.ConmonPidFile = p.InfraConmonPidFile } - if p.Sysctl != nil && len(p.Sysctl) > 0 { + if len(p.Sysctl) > 0 { spec.Sysctl = p.Sysctl } diff --git a/pkg/systemd/activation_test.go b/pkg/systemd/activation_test.go index 687472206f92..0a411bcaa09a 100644 --- a/pkg/systemd/activation_test.go +++ b/pkg/systemd/activation_test.go @@ -14,19 +14,19 @@ func TestSocketActivated(t *testing.T) { assert.False(SocketActivated()) // different pid - assert.NoError(os.Setenv("LISTEN_PID", "1")) + t.Setenv("LISTEN_PID", "1") assert.False(SocketActivated()) // same pid no fds - assert.NoError(os.Setenv("LISTEN_PID", strconv.Itoa(os.Getpid()))) - assert.NoError(os.Setenv("LISTEN_FDS", "0")) + t.Setenv("LISTEN_PID", strconv.Itoa(os.Getpid())) + t.Setenv("LISTEN_FDS", "0") assert.False(SocketActivated()) // same pid some fds - assert.NoError(os.Setenv("LISTEN_FDS", "1")) + t.Setenv("LISTEN_FDS", "1") assert.True(SocketActivated()) // FDNAME is ok too (but not required) - assert.NoError(os.Setenv("LISTEN_FDNAMES", "/meshuggah/rocks")) + t.Setenv("LISTEN_FDNAMES", "/meshuggah/rocks") assert.True(SocketActivated()) } diff --git a/pkg/systemd/quadlet/quadlet.go b/pkg/systemd/quadlet/quadlet.go index c21ec2a151b7..611d98c14cf3 100644 --- a/pkg/systemd/quadlet/quadlet.go +++ b/pkg/systemd/quadlet/quadlet.go @@ -1678,7 +1678,7 @@ func handleUserRemap(unitFile *parser.UnitFile, groupName string, podman *Podman autoOpts = append(autoOpts, fmt.Sprintf("size=%v", uidSize)) } - podman.addf("--userns=" + usernsOpts("auto", autoOpts)) + podman.add("--userns=" + usernsOpts("auto", autoOpts)) case "keep-id": if !isUser { return fmt.Errorf("RemapUsers=keep-id is unsupported for system units") @@ -1698,7 +1698,7 @@ func handleUserRemap(unitFile *parser.UnitFile, groupName string, podman *Podman keepidOpts = append(keepidOpts, "gid="+gidMaps[0]) } - podman.addf("--userns=" + usernsOpts("keep-id", keepidOpts)) + podman.add("--userns=" + usernsOpts("keep-id", keepidOpts)) default: return fmt.Errorf("unsupported RemapUsers option '%s'", remapUsers) diff --git a/pkg/api/handlers/changes.go b/pkg/util/changes.go similarity index 98% rename from pkg/api/handlers/changes.go rename to pkg/util/changes.go index 58e3a739adfb..86f418c335db 100644 --- a/pkg/api/handlers/changes.go +++ b/pkg/util/changes.go @@ -1,4 +1,4 @@ -package handlers +package util import ( "strings" diff --git a/pkg/api/handlers/changes_test.go b/pkg/util/changes_test.go similarity index 98% rename from pkg/api/handlers/changes_test.go rename to pkg/util/changes_test.go index 03ff1523e77e..2b635c5d645e 100644 --- a/pkg/api/handlers/changes_test.go +++ b/pkg/util/changes_test.go @@ -1,4 +1,4 @@ -package handlers +package util import ( "testing" diff --git a/test/e2e/attach_test.go b/test/e2e/attach_test.go index 1f22559023ec..c8570da18778 100644 --- a/test/e2e/attach_test.go +++ b/test/e2e/attach_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/build_test.go b/test/e2e/build_test.go index d2d50d49c665..20462d457a8d 100644 --- a/test/e2e/build_test.go +++ b/test/e2e/build_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/checkpoint_image_test.go b/test/e2e/checkpoint_image_test.go index 093c873092af..2481e2226ed8 100644 --- a/test/e2e/checkpoint_image_test.go +++ b/test/e2e/checkpoint_image_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/checkpoint_test.go b/test/e2e/checkpoint_test.go index 58198fe37eaf..8b2f13e55eba 100644 --- a/test/e2e/checkpoint_test.go +++ b/test/e2e/checkpoint_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/cleanup_test.go b/test/e2e/cleanup_test.go index 10bdd9d92c42..7f0a89b59d43 100644 --- a/test/e2e/cleanup_test.go +++ b/test/e2e/cleanup_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/commit_test.go b/test/e2e/commit_test.go index 4ab55303b77a..45c2bea13d4d 100644 --- a/test/e2e/commit_test.go +++ b/test/e2e/commit_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go index 5e0d1df72bd5..79868413b46d 100644 --- a/test/e2e/common_test.go +++ b/test/e2e/common_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/config.go b/test/e2e/config.go index 6cadae2a14cb..af9364502d82 100644 --- a/test/e2e/config.go +++ b/test/e2e/config.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration var ( diff --git a/test/e2e/config_amd64.go b/test/e2e/config_amd64.go index f5c1b691984e..b00d7bfc5bea 100644 --- a/test/e2e/config_amd64.go +++ b/test/e2e/config_amd64.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration var ( diff --git a/test/e2e/config_arm64.go b/test/e2e/config_arm64.go index 1bf29d78169c..785c772c251f 100644 --- a/test/e2e/config_arm64.go +++ b/test/e2e/config_arm64.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration var ( diff --git a/test/e2e/config_ppc64le.go b/test/e2e/config_ppc64le.go index d89bf1d4f7d0..1b7b5e29617b 100644 --- a/test/e2e/config_ppc64le.go +++ b/test/e2e/config_ppc64le.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration var ( diff --git a/test/e2e/container_clone_test.go b/test/e2e/container_clone_test.go index 343be45164ba..1f5677b51a99 100644 --- a/test/e2e/container_clone_test.go +++ b/test/e2e/container_clone_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/container_create_volume_test.go b/test/e2e/container_create_volume_test.go index 493d08ab39e1..e7cc8aa36a4e 100644 --- a/test/e2e/container_create_volume_test.go +++ b/test/e2e/container_create_volume_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/container_iface_name_test.go b/test/e2e/container_iface_name_test.go index a0030b94e8e4..74d5d91e1595 100644 --- a/test/e2e/container_iface_name_test.go +++ b/test/e2e/container_iface_name_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/container_inspect_test.go b/test/e2e/container_inspect_test.go index 2a3861ff86b7..8e26eb0f25d2 100644 --- a/test/e2e/container_inspect_test.go +++ b/test/e2e/container_inspect_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/containers_conf_test.go b/test/e2e/containers_conf_test.go index 129c889bcfb0..469558b71824 100644 --- a/test/e2e/containers_conf_test.go +++ b/test/e2e/containers_conf_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/cp_test.go b/test/e2e/cp_test.go index 4a2c7a5108f4..f71963a81168 100644 --- a/test/e2e/cp_test.go +++ b/test/e2e/cp_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/create_staticip_test.go b/test/e2e/create_staticip_test.go index fba85cbf7240..32a72b788030 100644 --- a/test/e2e/create_staticip_test.go +++ b/test/e2e/create_staticip_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/create_staticmac_test.go b/test/e2e/create_staticmac_test.go index d020e16530b1..9d9e3457dfbd 100644 --- a/test/e2e/create_staticmac_test.go +++ b/test/e2e/create_staticmac_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go index 646ff679d9ce..ca59962f967e 100644 --- a/test/e2e/create_test.go +++ b/test/e2e/create_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/diff_test.go b/test/e2e/diff_test.go index 7507f35def0f..a9c20fadc8d8 100644 --- a/test/e2e/diff_test.go +++ b/test/e2e/diff_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/events_test.go b/test/e2e/events_test.go index 63ca8f239c04..c16df55398cd 100644 --- a/test/e2e/events_test.go +++ b/test/e2e/events_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/exec_test.go b/test/e2e/exec_test.go index dcb7ff23f855..2b5b411d5b4a 100644 --- a/test/e2e/exec_test.go +++ b/test/e2e/exec_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/exists_test.go b/test/e2e/exists_test.go index 3da48b808841..579bacda0e51 100644 --- a/test/e2e/exists_test.go +++ b/test/e2e/exists_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/export_test.go b/test/e2e/export_test.go index efebd9f8edb4..18ae177e0a93 100644 --- a/test/e2e/export_test.go +++ b/test/e2e/export_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/farm_test.go b/test/e2e/farm_test.go index ede6d2d94d07..556746990fb6 100644 --- a/test/e2e/farm_test.go +++ b/test/e2e/farm_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/generate_kube_test.go b/test/e2e/generate_kube_test.go index bb8800a8db71..9603af245a95 100644 --- a/test/e2e/generate_kube_test.go +++ b/test/e2e/generate_kube_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/generate_spec_test.go b/test/e2e/generate_spec_test.go index b4641ae57c70..981f912e46ec 100644 --- a/test/e2e/generate_spec_test.go +++ b/test/e2e/generate_spec_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/generate_systemd_test.go b/test/e2e/generate_systemd_test.go index 81483223f534..c1c5844352ff 100644 --- a/test/e2e/generate_systemd_test.go +++ b/test/e2e/generate_systemd_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/healthcheck_run_test.go b/test/e2e/healthcheck_run_test.go index de71a38ca00f..5a9e444eef78 100644 --- a/test/e2e/healthcheck_run_test.go +++ b/test/e2e/healthcheck_run_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/history_test.go b/test/e2e/history_test.go index b5251c1c09ff..a69a59103f29 100644 --- a/test/e2e/history_test.go +++ b/test/e2e/history_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/image_scp_test.go b/test/e2e/image_scp_test.go index e19da2d09e13..917363fd7083 100644 --- a/test/e2e/image_scp_test.go +++ b/test/e2e/image_scp_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/image_sign_test.go b/test/e2e/image_sign_test.go index 026a2e40e7a8..5940aaf4a28e 100644 --- a/test/e2e/image_sign_test.go +++ b/test/e2e/image_sign_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/images_test.go b/test/e2e/images_test.go index ddde5a27bcb8..7d6a12a77c20 100644 --- a/test/e2e/images_test.go +++ b/test/e2e/images_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/import_test.go b/test/e2e/import_test.go index fb85182e8f55..eac9596a3350 100644 --- a/test/e2e/import_test.go +++ b/test/e2e/import_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/info_test.go b/test/e2e/info_test.go index 6e5ae8722e38..87c8902621ea 100644 --- a/test/e2e/info_test.go +++ b/test/e2e/info_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/init_test.go b/test/e2e/init_test.go index dae57b6c88d3..c8c544ad62db 100644 --- a/test/e2e/init_test.go +++ b/test/e2e/init_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/inspect_test.go b/test/e2e/inspect_test.go index 72b3c8b5cc9b..be7809bd3267 100644 --- a/test/e2e/inspect_test.go +++ b/test/e2e/inspect_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/kill_test.go b/test/e2e/kill_test.go index 981cf8d760ce..86e12857ee5e 100644 --- a/test/e2e/kill_test.go +++ b/test/e2e/kill_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/libpod_suite_remote_test.go b/test/e2e/libpod_suite_remote_test.go index 44a79eaf3621..ceaa5851ea9c 100644 --- a/test/e2e/libpod_suite_remote_test.go +++ b/test/e2e/libpod_suite_remote_test.go @@ -1,4 +1,4 @@ -//go:build remote_testing +//go:build remote_testing && (linux || freebsd) package integration diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go index 549777e79675..3b11b3952b67 100644 --- a/test/e2e/libpod_suite_test.go +++ b/test/e2e/libpod_suite_test.go @@ -1,4 +1,4 @@ -//go:build !remote_testing +//go:build !remote_testing && (linux || freebsd) package integration diff --git a/test/e2e/load_test.go b/test/e2e/load_test.go index 9cade0294e41..edfad48fb0e6 100644 --- a/test/e2e/load_test.go +++ b/test/e2e/load_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/login_logout_test.go b/test/e2e/login_logout_test.go index f860f9443650..d0b5bb940e39 100644 --- a/test/e2e/login_logout_test.go +++ b/test/e2e/login_logout_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/logs_test.go b/test/e2e/logs_test.go index 16392fbbd9c9..1dc0eb2887a9 100644 --- a/test/e2e/logs_test.go +++ b/test/e2e/logs_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/manifest_test.go b/test/e2e/manifest_test.go index dba357c18bc7..22bf064b4e3d 100644 --- a/test/e2e/manifest_test.go +++ b/test/e2e/manifest_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/mount_rootless_test.go b/test/e2e/mount_rootless_test.go index 7e4af2eb6895..9844f260f9c1 100644 --- a/test/e2e/mount_rootless_test.go +++ b/test/e2e/mount_rootless_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/mount_test.go b/test/e2e/mount_test.go index aba488528f05..961e027f09a7 100644 --- a/test/e2e/mount_test.go +++ b/test/e2e/mount_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/negative_test.go b/test/e2e/negative_test.go index f6cae5352a70..2c097bd6e44a 100644 --- a/test/e2e/negative_test.go +++ b/test/e2e/negative_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/network_connect_disconnect_test.go b/test/e2e/network_connect_disconnect_test.go index 3764b44bc71a..3b2059b24486 100644 --- a/test/e2e/network_connect_disconnect_test.go +++ b/test/e2e/network_connect_disconnect_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/network_create_test.go b/test/e2e/network_create_test.go index 0ce6be1a526b..b9fcec6431a5 100644 --- a/test/e2e/network_create_test.go +++ b/test/e2e/network_create_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/network_test.go b/test/e2e/network_test.go index 5072eeee0e52..8ce85305cbd2 100644 --- a/test/e2e/network_test.go +++ b/test/e2e/network_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/pause_test.go b/test/e2e/pause_test.go index 0b474b3ad38c..bf9132a49a45 100644 --- a/test/e2e/pause_test.go +++ b/test/e2e/pause_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/play_build_test.go b/test/e2e/play_build_test.go index 80157104f52c..a18f2dbb5249 100644 --- a/test/e2e/play_build_test.go +++ b/test/e2e/play_build_test.go @@ -1,4 +1,4 @@ -//go:build !remote_testing +//go:build !remote_testing && (linux || freebsd) // build for play kube is not supported on remote yet. diff --git a/test/e2e/play_kube_test.go b/test/e2e/play_kube_test.go index cc051137d15f..8291cbdb4dd7 100644 --- a/test/e2e/play_kube_test.go +++ b/test/e2e/play_kube_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/pod_clone_test.go b/test/e2e/pod_clone_test.go index fb240c279bdb..a2ddd46ac4ce 100644 --- a/test/e2e/pod_clone_test.go +++ b/test/e2e/pod_clone_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go index c5d7ff6bb69a..a84f640b8f1c 100644 --- a/test/e2e/pod_create_test.go +++ b/test/e2e/pod_create_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/pod_infra_container_test.go b/test/e2e/pod_infra_container_test.go index adc0303b7d61..83aff3680bc4 100644 --- a/test/e2e/pod_infra_container_test.go +++ b/test/e2e/pod_infra_container_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/pod_initcontainers_test.go b/test/e2e/pod_initcontainers_test.go index 5aa291ed6f5b..a8458e8ea0a2 100644 --- a/test/e2e/pod_initcontainers_test.go +++ b/test/e2e/pod_initcontainers_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/pod_inspect_test.go b/test/e2e/pod_inspect_test.go index 8a17a59f2df2..e946811187d6 100644 --- a/test/e2e/pod_inspect_test.go +++ b/test/e2e/pod_inspect_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/pod_kill_test.go b/test/e2e/pod_kill_test.go index 7aa1c88cb1fa..7ae98d6e620b 100644 --- a/test/e2e/pod_kill_test.go +++ b/test/e2e/pod_kill_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/pod_pause_test.go b/test/e2e/pod_pause_test.go index b4e7c05a8445..3e673dcc7f4f 100644 --- a/test/e2e/pod_pause_test.go +++ b/test/e2e/pod_pause_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/pod_pod_namespaces_test.go b/test/e2e/pod_pod_namespaces_test.go index a1597bca6100..21409f505525 100644 --- a/test/e2e/pod_pod_namespaces_test.go +++ b/test/e2e/pod_pod_namespaces_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/pod_prune_test.go b/test/e2e/pod_prune_test.go index 851dccabb578..cb772a397e0f 100644 --- a/test/e2e/pod_prune_test.go +++ b/test/e2e/pod_prune_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/pod_ps_test.go b/test/e2e/pod_ps_test.go index e347fd57576f..0fb18d303882 100644 --- a/test/e2e/pod_ps_test.go +++ b/test/e2e/pod_ps_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/pod_restart_test.go b/test/e2e/pod_restart_test.go index 8a0753387202..568147a27a9d 100644 --- a/test/e2e/pod_restart_test.go +++ b/test/e2e/pod_restart_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/pod_rm_test.go b/test/e2e/pod_rm_test.go index cc00d68f9805..a847a534146d 100644 --- a/test/e2e/pod_rm_test.go +++ b/test/e2e/pod_rm_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/pod_start_test.go b/test/e2e/pod_start_test.go index 640ff484628a..9ec7bb59b444 100644 --- a/test/e2e/pod_start_test.go +++ b/test/e2e/pod_start_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/pod_stats_test.go b/test/e2e/pod_stats_test.go index 6dd760d1bbd0..f2259b9136f4 100644 --- a/test/e2e/pod_stats_test.go +++ b/test/e2e/pod_stats_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/pod_stop_test.go b/test/e2e/pod_stop_test.go index d68621d3f273..ab9f79482ab4 100644 --- a/test/e2e/pod_stop_test.go +++ b/test/e2e/pod_stop_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/pod_top_test.go b/test/e2e/pod_top_test.go index e104902e5741..b42b50720fc1 100644 --- a/test/e2e/pod_top_test.go +++ b/test/e2e/pod_top_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/port_test.go b/test/e2e/port_test.go index 591fd9eebf68..5f2a71ac0b86 100644 --- a/test/e2e/port_test.go +++ b/test/e2e/port_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/prune_test.go b/test/e2e/prune_test.go index 7943d7cfde53..dd893fc9b983 100644 --- a/test/e2e/prune_test.go +++ b/test/e2e/prune_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go index 280f1b7af68a..c79e1e55e1e1 100644 --- a/test/e2e/ps_test.go +++ b/test/e2e/ps_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/pull_test.go b/test/e2e/pull_test.go index 79f26411ddc7..04fd63728dfd 100644 --- a/test/e2e/pull_test.go +++ b/test/e2e/pull_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/push_test.go b/test/e2e/push_test.go index 8a9d2827cb62..d4f6df9e395b 100644 --- a/test/e2e/push_test.go +++ b/test/e2e/push_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/quadlet_test.go b/test/e2e/quadlet_test.go index 7ba4e6269bdc..922b7a8f74d1 100644 --- a/test/e2e/quadlet_test.go +++ b/test/e2e/quadlet_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/rename_test.go b/test/e2e/rename_test.go index 27698e937cb8..abd34abf12c2 100644 --- a/test/e2e/rename_test.go +++ b/test/e2e/rename_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/restart_test.go b/test/e2e/restart_test.go index 53872b1818df..21090a337aff 100644 --- a/test/e2e/restart_test.go +++ b/test/e2e/restart_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/rm_test.go b/test/e2e/rm_test.go index 7a734c9285ac..8b4cc4d06c96 100644 --- a/test/e2e/rm_test.go +++ b/test/e2e/rm_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/rmi_test.go b/test/e2e/rmi_test.go index bc5d2d1fa293..b4ed4bad111d 100644 --- a/test/e2e/rmi_test.go +++ b/test/e2e/rmi_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_aardvark_test.go b/test/e2e/run_aardvark_test.go index 4283639a9800..6f99743effbf 100644 --- a/test/e2e/run_aardvark_test.go +++ b/test/e2e/run_aardvark_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_apparmor_test.go b/test/e2e/run_apparmor_test.go index 152efec8f6d7..5f44473a9b50 100644 --- a/test/e2e/run_apparmor_test.go +++ b/test/e2e/run_apparmor_test.go @@ -1,4 +1,4 @@ -//go:build !remote_testing +//go:build !remote_testing && (linux || freebsd) package integration diff --git a/test/e2e/run_cgroup_parent_test.go b/test/e2e/run_cgroup_parent_test.go index f590087ff0c9..8ebcf8612634 100644 --- a/test/e2e/run_cgroup_parent_test.go +++ b/test/e2e/run_cgroup_parent_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_cleanup_test.go b/test/e2e/run_cleanup_test.go index b484f586be74..4629ddee000f 100644 --- a/test/e2e/run_cleanup_test.go +++ b/test/e2e/run_cleanup_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_cpu_test.go b/test/e2e/run_cpu_test.go index 13e5586baac0..956e99f5aaf2 100644 --- a/test/e2e/run_cpu_test.go +++ b/test/e2e/run_cpu_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_device_test.go b/test/e2e/run_device_test.go index ef6fe8b486c9..230eaa66358c 100644 --- a/test/e2e/run_device_test.go +++ b/test/e2e/run_device_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_dns_test.go b/test/e2e/run_dns_test.go index 126c17a741ce..21b347d677c5 100644 --- a/test/e2e/run_dns_test.go +++ b/test/e2e/run_dns_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_entrypoint_test.go b/test/e2e/run_entrypoint_test.go index 687847c1f31b..6fe07cf9efcc 100644 --- a/test/e2e/run_entrypoint_test.go +++ b/test/e2e/run_entrypoint_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_env_test.go b/test/e2e/run_env_test.go index bc459b74751b..f7a2851fd02e 100644 --- a/test/e2e/run_env_test.go +++ b/test/e2e/run_env_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_exit_test.go b/test/e2e/run_exit_test.go index b300567ce53a..412bd6df1110 100644 --- a/test/e2e/run_exit_test.go +++ b/test/e2e/run_exit_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_memory_test.go b/test/e2e/run_memory_test.go index e535e6bba78a..77cc748c5807 100644 --- a/test/e2e/run_memory_test.go +++ b/test/e2e/run_memory_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_networking_test.go b/test/e2e/run_networking_test.go index 813de9f7372a..010c8f17c6dc 100644 --- a/test/e2e/run_networking_test.go +++ b/test/e2e/run_networking_test.go @@ -1,3 +1,5 @@ +//go:build linux + package integration import ( diff --git a/test/e2e/run_ns_test.go b/test/e2e/run_ns_test.go index 80f463a941f8..3cae4592ab83 100644 --- a/test/e2e/run_ns_test.go +++ b/test/e2e/run_ns_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_passwd_test.go b/test/e2e/run_passwd_test.go index 3ce00b0bdc08..8381ca1bdb7e 100644 --- a/test/e2e/run_passwd_test.go +++ b/test/e2e/run_passwd_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_privileged_test.go b/test/e2e/run_privileged_test.go index 5e6c5fb51ddb..f3d571ebe65b 100644 --- a/test/e2e/run_privileged_test.go +++ b/test/e2e/run_privileged_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( @@ -137,13 +139,6 @@ var _ = Describe("Podman privileged container tests", func() { }) It("run no-new-privileges test", func() { - // Check if our kernel is new enough - k, err := IsKernelNewerThan("4.14") - Expect(err).ToNot(HaveOccurred()) - if !k { - Skip("Kernel is not new enough to test this feature") - } - cap := SystemExec("grep", []string{"NoNewPrivs", "/proc/self/status"}) if cap.ExitCode() != 0 { Skip("Can't determine NoNewPrivs") diff --git a/test/e2e/run_restart_test.go b/test/e2e/run_restart_test.go index 1fcaf9b191a6..f4a62a3b951c 100644 --- a/test/e2e/run_restart_test.go +++ b/test/e2e/run_restart_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_seccomp_test.go b/test/e2e/run_seccomp_test.go index c55a8033e26c..82a7a428314f 100644 --- a/test/e2e/run_seccomp_test.go +++ b/test/e2e/run_seccomp_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_security_labels_test.go b/test/e2e/run_security_labels_test.go index 380beb8e924e..1d1346067319 100644 --- a/test/e2e/run_security_labels_test.go +++ b/test/e2e/run_security_labels_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_selinux_test.go b/test/e2e/run_selinux_test.go index 50ac5b58ca3e..dad1eb4e4f15 100644 --- a/test/e2e/run_selinux_test.go +++ b/test/e2e/run_selinux_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_signal_test.go b/test/e2e/run_signal_test.go index 8f81186aa8b6..2f1cb18ef15c 100644 --- a/test/e2e/run_signal_test.go +++ b/test/e2e/run_signal_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_staticip_test.go b/test/e2e/run_staticip_test.go index 9fda9f4a4e8e..fd727dac087e 100644 --- a/test/e2e/run_staticip_test.go +++ b/test/e2e/run_staticip_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index 95a2ab61e139..3d5007c273f1 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_transient_test.go b/test/e2e/run_transient_test.go index 990024cf148d..46a9643e49fc 100644 --- a/test/e2e/run_transient_test.go +++ b/test/e2e/run_transient_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_userns_test.go b/test/e2e/run_userns_test.go index ffb0ef11d876..2d09ae2aefbb 100644 --- a/test/e2e/run_userns_test.go +++ b/test/e2e/run_userns_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go index f8dc22b1ede0..4a4a7078e145 100644 --- a/test/e2e/run_volume_test.go +++ b/test/e2e/run_volume_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/run_working_dir_test.go b/test/e2e/run_working_dir_test.go index bc5deaff642d..b002af7885c0 100644 --- a/test/e2e/run_working_dir_test.go +++ b/test/e2e/run_working_dir_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/runlabel_test.go b/test/e2e/runlabel_test.go index db1a6d0929b0..c2eac029e8b9 100644 --- a/test/e2e/runlabel_test.go +++ b/test/e2e/runlabel_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/save_test.go b/test/e2e/save_test.go index 7e7cdcb406df..b4dbecc54c57 100644 --- a/test/e2e/save_test.go +++ b/test/e2e/save_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/search_test.go b/test/e2e/search_test.go index 16bbe87a5269..4d9f296d0ac9 100644 --- a/test/e2e/search_test.go +++ b/test/e2e/search_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/secret_test.go b/test/e2e/secret_test.go index 71d5fc34bf7d..bf373eeebe7b 100644 --- a/test/e2e/secret_test.go +++ b/test/e2e/secret_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/start_test.go b/test/e2e/start_test.go index 773de2ffb5b8..0be44035802b 100644 --- a/test/e2e/start_test.go +++ b/test/e2e/start_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/stats_test.go b/test/e2e/stats_test.go index 3f0d4a8f1659..4a4fc460c08f 100644 --- a/test/e2e/stats_test.go +++ b/test/e2e/stats_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/stop_test.go b/test/e2e/stop_test.go index 74b2b63d2c9a..5cd14d119bf7 100644 --- a/test/e2e/stop_test.go +++ b/test/e2e/stop_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/system_connection_test.go b/test/e2e/system_connection_test.go index 5757c83d36a9..adf8d1f1316d 100644 --- a/test/e2e/system_connection_test.go +++ b/test/e2e/system_connection_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/system_df_test.go b/test/e2e/system_df_test.go index 45945f605b30..dd1d715fd2d8 100644 --- a/test/e2e/system_df_test.go +++ b/test/e2e/system_df_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/system_dial_stdio_test.go b/test/e2e/system_dial_stdio_test.go index 35dfd5efee3d..7c278f2d96e7 100644 --- a/test/e2e/system_dial_stdio_test.go +++ b/test/e2e/system_dial_stdio_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/system_reset_test.go b/test/e2e/system_reset_test.go index 0e641e99e232..679c4ccb3eb7 100644 --- a/test/e2e/system_reset_test.go +++ b/test/e2e/system_reset_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/systemd_activate_test.go b/test/e2e/systemd_activate_test.go index 51344964c34d..72f539a3ed4d 100644 --- a/test/e2e/systemd_activate_test.go +++ b/test/e2e/systemd_activate_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/systemd_test.go b/test/e2e/systemd_test.go index 2b835b3059ae..99e454799cde 100644 --- a/test/e2e/systemd_test.go +++ b/test/e2e/systemd_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/tag_test.go b/test/e2e/tag_test.go index 47b931e9bbae..81c692b0f1e7 100644 --- a/test/e2e/tag_test.go +++ b/test/e2e/tag_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/toolbox_test.go b/test/e2e/toolbox_test.go index 73b1b54ab8a4..b24650b56c6c 100644 --- a/test/e2e/toolbox_test.go +++ b/test/e2e/toolbox_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration /* diff --git a/test/e2e/top_test.go b/test/e2e/top_test.go index 262b62111a77..2fbac24a9747 100644 --- a/test/e2e/top_test.go +++ b/test/e2e/top_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/tree_test.go b/test/e2e/tree_test.go index 86d07f978f1e..03aa72e06d20 100644 --- a/test/e2e/tree_test.go +++ b/test/e2e/tree_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/trust_test.go b/test/e2e/trust_test.go index db4bf25464fe..7f565044f910 100644 --- a/test/e2e/trust_test.go +++ b/test/e2e/trust_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/unshare_test.go b/test/e2e/unshare_test.go index 9fc5c6d79a13..1d5e6cf23cb1 100644 --- a/test/e2e/unshare_test.go +++ b/test/e2e/unshare_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/untag_test.go b/test/e2e/untag_test.go index 0e7ba94aae4b..5aa8cf91ec6d 100644 --- a/test/e2e/untag_test.go +++ b/test/e2e/untag_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/update_test.go b/test/e2e/update_test.go index 27c091da17c3..04a8532209c8 100644 --- a/test/e2e/update_test.go +++ b/test/e2e/update_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/version_test.go b/test/e2e/version_test.go index ea17b01b95bc..d14a6728253f 100644 --- a/test/e2e/version_test.go +++ b/test/e2e/version_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/volume_create_test.go b/test/e2e/volume_create_test.go index 71b042a9d51c..7ea3e893bda7 100644 --- a/test/e2e/volume_create_test.go +++ b/test/e2e/volume_create_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/volume_exists_test.go b/test/e2e/volume_exists_test.go index d0709048db7c..1a19f5169916 100644 --- a/test/e2e/volume_exists_test.go +++ b/test/e2e/volume_exists_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/volume_inspect_test.go b/test/e2e/volume_inspect_test.go index f5866ccbc65f..c78f2429c9e0 100644 --- a/test/e2e/volume_inspect_test.go +++ b/test/e2e/volume_inspect_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/volume_ls_test.go b/test/e2e/volume_ls_test.go index ecd31550b07d..d9454c015de6 100644 --- a/test/e2e/volume_ls_test.go +++ b/test/e2e/volume_ls_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/volume_plugin_test.go b/test/e2e/volume_plugin_test.go index 939e3a5e3c75..6ca55b55468d 100644 --- a/test/e2e/volume_plugin_test.go +++ b/test/e2e/volume_plugin_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/volume_prune_test.go b/test/e2e/volume_prune_test.go index aeeffe933aa7..d8add183f759 100644 --- a/test/e2e/volume_prune_test.go +++ b/test/e2e/volume_prune_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/volume_rm_test.go b/test/e2e/volume_rm_test.go index 59f611f13188..8009a748bbf8 100644 --- a/test/e2e/volume_rm_test.go +++ b/test/e2e/volume_rm_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/e2e/wait_test.go b/test/e2e/wait_test.go index 205c4d33dd3e..a2f3a13175af 100644 --- a/test/e2e/wait_test.go +++ b/test/e2e/wait_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package integration import ( diff --git a/test/utils/common_function_test.go b/test/utils/common_function_test.go index 6d6c49dcb73d..988e83b1b2c9 100644 --- a/test/utils/common_function_test.go +++ b/test/utils/common_function_test.go @@ -56,18 +56,6 @@ var _ = Describe("Common functions test", func() { Entry("Item empty with and without \"", "/tmp/os-release.test", "", "\"\"", false), ) - DescribeTable("Test IsKernelNewerThan", - func(kv string, expect, isNil bool) { - newer, err := IsKernelNewerThan(kv) - Expect(newer).To(Equal(expect), "Version compare results is not as expect.") - Expect(err == nil).To(Equal(isNil), "Error is not as expect.") - }, - Entry("Invalid kernel version: 0", "0", false, false), - Entry("Older kernel version:0.0", "0.0", true, true), - Entry("Newer kernel version: 100.17.14", "100.17.14", false, true), - Entry("Invalid kernel version: I am not a kernel version", "I am not a kernel version", false, false), - ) - DescribeTable("Test TestIsCommandAvailable", func(cmd string, expect bool) { cmdExist := IsCommandAvailable(cmd) diff --git a/test/utils/utils.go b/test/utils/utils.go index 72af69d55551..9961fdde95e3 100644 --- a/test/utils/utils.go +++ b/test/utils/utils.go @@ -18,7 +18,6 @@ import ( "github.com/sirupsen/logrus" - "github.com/containers/storage/pkg/parsers/kernel" . "github.com/onsi/ginkgo/v2" //nolint:revive,stylecheck . "github.com/onsi/gomega" //nolint:revive,stylecheck . "github.com/onsi/gomega/gexec" //nolint:revive,stylecheck @@ -448,27 +447,6 @@ func GetHostDistributionInfo() HostOS { return host } -// IsKernelNewerThan compares the current kernel version to one provided. If -// the kernel is equal to or greater, returns true -func IsKernelNewerThan(version string) (bool, error) { - inputVersion, err := kernel.ParseRelease(version) - if err != nil { - return false, err - } - kv, err := kernel.GetKernelVersion() - if err != nil { - return false, err - } - - // CompareKernelVersion compares two kernel.VersionInfo structs. - // Returns -1 if a < b, 0 if a == b, 1 it a > b - result := kernel.CompareKernelVersion(*kv, *inputVersion) - if result >= 0 { - return true, nil - } - return false, nil -} - // IsCommandAvailable check if command exist func IsCommandAvailable(command string) bool { check := exec.Command("bash", "-c", strings.Join([]string{"command -v", command}, " ")) diff --git a/vendor/github.com/containers/buildah/CHANGELOG.md b/vendor/github.com/containers/buildah/CHANGELOG.md index e714c531212a..8434e6aeaecb 100644 --- a/vendor/github.com/containers/buildah/CHANGELOG.md +++ b/vendor/github.com/containers/buildah/CHANGELOG.md @@ -2,6 +2,10 @@ # Changelog +## v1.37.2 (2024-08-20) + + [release-1.37] Bump c/common to v0.60.2, c/image to v5.32.2 + ## v1.37.1 (2024-08-12) [release-1.37] Bump c/common v0.60.1, c/image v5.32.1 diff --git a/vendor/github.com/containers/buildah/changelog.txt b/vendor/github.com/containers/buildah/changelog.txt index aedba235040a..0d3b01227536 100644 --- a/vendor/github.com/containers/buildah/changelog.txt +++ b/vendor/github.com/containers/buildah/changelog.txt @@ -1,3 +1,6 @@ +- Changelog for v1.37.2 (2024-08-20) + * [release-1.37] Bump c/common to v0.60.2, c/image to v5.32.2 + - Changelog for v1.37.1 (2024-08-12) * [release-1.37] Bump c/common v0.60.1, c/image v5.32.1 diff --git a/vendor/github.com/containers/buildah/define/types.go b/vendor/github.com/containers/buildah/define/types.go index 735c2391a8ed..8e2615eba68f 100644 --- a/vendor/github.com/containers/buildah/define/types.go +++ b/vendor/github.com/containers/buildah/define/types.go @@ -29,7 +29,7 @@ const ( // identify working containers. Package = "buildah" // Version for the Package. Also used by .packit.sh for Packit builds. - Version = "1.37.1" + Version = "1.37.2" // DefaultRuntime if containers.conf fails. DefaultRuntime = "runc" diff --git a/vendor/github.com/containers/common/version/version.go b/vendor/github.com/containers/common/version/version.go index 5499120fc506..4867ade0bf96 100644 --- a/vendor/github.com/containers/common/version/version.go +++ b/vendor/github.com/containers/common/version/version.go @@ -1,4 +1,4 @@ package version // Version is the version of the build. -const Version = "0.60.1" +const Version = "0.60.2" diff --git a/vendor/github.com/containers/image/v5/signature/fulcio_cert.go b/vendor/github.com/containers/image/v5/signature/fulcio_cert.go index 4e99864226a1..31dfdd3422b9 100644 --- a/vendor/github.com/containers/image/v5/signature/fulcio_cert.go +++ b/vendor/github.com/containers/image/v5/signature/fulcio_cert.go @@ -195,10 +195,10 @@ func (f *fulcioTrustRoot) verifyFulcioCertificateAtTime(relevantTime time.Time, return untrustedCertificate.PublicKey, nil } -func verifyRekorFulcio(rekorPublicKey *ecdsa.PublicKey, fulcioTrustRoot *fulcioTrustRoot, untrustedRekorSET []byte, +func verifyRekorFulcio(rekorPublicKeys []*ecdsa.PublicKey, fulcioTrustRoot *fulcioTrustRoot, untrustedRekorSET []byte, untrustedCertificateBytes []byte, untrustedIntermediateChainBytes []byte, untrustedBase64Signature string, untrustedPayloadBytes []byte) (crypto.PublicKey, error) { - rekorSETTime, err := internal.VerifyRekorSET(rekorPublicKey, untrustedRekorSET, untrustedCertificateBytes, + rekorSETTime, err := internal.VerifyRekorSET(rekorPublicKeys, untrustedRekorSET, untrustedCertificateBytes, untrustedBase64Signature, untrustedPayloadBytes) if err != nil { return nil, err diff --git a/vendor/github.com/containers/image/v5/signature/internal/rekor_set.go b/vendor/github.com/containers/image/v5/signature/internal/rekor_set.go index e79c91cf9956..604c21c08916 100644 --- a/vendor/github.com/containers/image/v5/signature/internal/rekor_set.go +++ b/vendor/github.com/containers/image/v5/signature/internal/rekor_set.go @@ -113,7 +113,7 @@ func (p UntrustedRekorPayload) MarshalJSON() ([]byte, error) { // VerifyRekorSET verifies that unverifiedRekorSET is correctly signed by publicKey and matches the rest of the data. // Returns bundle upload time on success. -func VerifyRekorSET(publicKey *ecdsa.PublicKey, unverifiedRekorSET []byte, unverifiedKeyOrCertBytes []byte, unverifiedBase64Signature string, unverifiedPayloadBytes []byte) (time.Time, error) { +func VerifyRekorSET(publicKeys []*ecdsa.PublicKey, unverifiedRekorSET []byte, unverifiedKeyOrCertBytes []byte, unverifiedBase64Signature string, unverifiedPayloadBytes []byte) (time.Time, error) { // FIXME: Should the publicKey parameter hard-code ecdsa? // == Parse SET bytes @@ -130,7 +130,14 @@ func VerifyRekorSET(publicKey *ecdsa.PublicKey, unverifiedRekorSET []byte, unver return time.Time{}, NewInvalidSignatureError(fmt.Sprintf("canonicalizing Rekor SET JSON: %v", err)) } untrustedSETPayloadHash := sha256.Sum256(untrustedSETPayloadCanonicalBytes) - if !ecdsa.VerifyASN1(publicKey, untrustedSETPayloadHash[:], untrustedSET.UntrustedSignedEntryTimestamp) { + publicKeymatched := false + for _, pk := range publicKeys { + if ecdsa.VerifyASN1(pk, untrustedSETPayloadHash[:], untrustedSET.UntrustedSignedEntryTimestamp) { + publicKeymatched = true + break + } + } + if !publicKeymatched { return time.Time{}, NewInvalidSignatureError("cryptographic signature verification of Rekor SET failed") } diff --git a/vendor/github.com/containers/image/v5/signature/internal/sigstore_payload.go b/vendor/github.com/containers/image/v5/signature/internal/sigstore_payload.go index a2609c954b05..8630b08e3082 100644 --- a/vendor/github.com/containers/image/v5/signature/internal/sigstore_payload.go +++ b/vendor/github.com/containers/image/v5/signature/internal/sigstore_payload.go @@ -7,6 +7,7 @@ import ( "encoding/json" "errors" "fmt" + "strings" "time" "github.com/containers/image/v5/version" @@ -171,24 +172,62 @@ type SigstorePayloadAcceptanceRules struct { ValidateSignedDockerManifestDigest func(digest.Digest) error } -// VerifySigstorePayload verifies unverifiedBase64Signature of unverifiedPayload was correctly created by publicKey, and that its principal components +// verifySigstorePayloadBlobSignature verifies unverifiedSignature of unverifiedPayload was correctly created +// by any of the public keys in publicKeys. +// +// This is an internal implementation detail of VerifySigstorePayload and should have no other callers. +// It is INSUFFICIENT alone to consider the signature acceptable. +func verifySigstorePayloadBlobSignature(publicKeys []crypto.PublicKey, unverifiedPayload, unverifiedSignature []byte) error { + if len(publicKeys) == 0 { + return errors.New("Need at least one public key to verify the sigstore payload, but got 0") + } + + verifiers := make([]sigstoreSignature.Verifier, 0, len(publicKeys)) + for _, key := range publicKeys { + // Failing to load a verifier indicates that something is really, really + // invalid about the public key; prefer to fail even if the signature might be + // valid with other keys, so that users fix their fallback keys before they need them. + // For that reason, we even initialize all verifiers before trying to validate the signature + // with any key. + verifier, err := sigstoreSignature.LoadVerifier(key, sigstoreHarcodedHashAlgorithm) + if err != nil { + return err + } + verifiers = append(verifiers, verifier) + } + + var failures []string + for _, verifier := range verifiers { + // github.com/sigstore/cosign/pkg/cosign.verifyOCISignature uses signatureoptions.WithContext(), + // which seems to be not used by anything. So we don’t bother. + err := verifier.VerifySignature(bytes.NewReader(unverifiedSignature), bytes.NewReader(unverifiedPayload)) + if err == nil { + return nil + } + + failures = append(failures, err.Error()) + } + + if len(failures) == 0 { + // Coverage: We have checked there is at least one public key, any success causes an early return, + // and any failure adds an entry to failures => there must be at least one error. + return fmt.Errorf("Internal error: signature verification failed but no errors have been recorded") + } + return NewInvalidSignatureError("cryptographic signature verification failed: " + strings.Join(failures, ", ")) +} + +// VerifySigstorePayload verifies unverifiedBase64Signature of unverifiedPayload was correctly created by any of the public keys in publicKeys, and that its principal components // match expected values, both as specified by rules, and returns it. // We return an *UntrustedSigstorePayload, although nothing actually uses it, // just to double-check against stupid typos. -func VerifySigstorePayload(publicKey crypto.PublicKey, unverifiedPayload []byte, unverifiedBase64Signature string, rules SigstorePayloadAcceptanceRules) (*UntrustedSigstorePayload, error) { - verifier, err := sigstoreSignature.LoadVerifier(publicKey, sigstoreHarcodedHashAlgorithm) - if err != nil { - return nil, fmt.Errorf("creating verifier: %w", err) - } - +func VerifySigstorePayload(publicKeys []crypto.PublicKey, unverifiedPayload []byte, unverifiedBase64Signature string, rules SigstorePayloadAcceptanceRules) (*UntrustedSigstorePayload, error) { unverifiedSignature, err := base64.StdEncoding.DecodeString(unverifiedBase64Signature) if err != nil { return nil, NewInvalidSignatureError(fmt.Sprintf("base64 decoding: %v", err)) } - // github.com/sigstore/cosign/pkg/cosign.verifyOCISignature uses signatureoptions.WithContext(), - // which seems to be not used by anything. So we don’t bother. - if err := verifier.VerifySignature(bytes.NewReader(unverifiedSignature), bytes.NewReader(unverifiedPayload)); err != nil { - return nil, NewInvalidSignatureError(fmt.Sprintf("cryptographic signature verification failed: %v", err)) + + if err := verifySigstorePayloadBlobSignature(publicKeys, unverifiedPayload, unverifiedSignature); err != nil { + return nil, err } var unmatchedPayload UntrustedSigstorePayload diff --git a/vendor/github.com/containers/image/v5/signature/policy_config_sigstore.go b/vendor/github.com/containers/image/v5/signature/policy_config_sigstore.go index beb5d0673e73..965901e1871f 100644 --- a/vendor/github.com/containers/image/v5/signature/policy_config_sigstore.go +++ b/vendor/github.com/containers/image/v5/signature/policy_config_sigstore.go @@ -2,7 +2,6 @@ package signature import ( "encoding/json" - "errors" "fmt" "github.com/containers/image/v5/signature/internal" @@ -15,29 +14,57 @@ type PRSigstoreSignedOption func(*prSigstoreSigned) error func PRSigstoreSignedWithKeyPath(keyPath string) PRSigstoreSignedOption { return func(pr *prSigstoreSigned) error { if pr.KeyPath != "" { - return errors.New(`"keyPath" already specified`) + return InvalidPolicyFormatError(`"keyPath" already specified`) } pr.KeyPath = keyPath return nil } } +// PRSigstoreSignedWithKeyPaths specifies a value for the "keyPaths" field when calling NewPRSigstoreSigned. +func PRSigstoreSignedWithKeyPaths(keyPaths []string) PRSigstoreSignedOption { + return func(pr *prSigstoreSigned) error { + if pr.KeyPaths != nil { + return InvalidPolicyFormatError(`"keyPaths" already specified`) + } + if len(keyPaths) == 0 { + return InvalidPolicyFormatError(`"keyPaths" contains no entries`) + } + pr.KeyPaths = keyPaths + return nil + } +} + // PRSigstoreSignedWithKeyData specifies a value for the "keyData" field when calling NewPRSigstoreSigned. func PRSigstoreSignedWithKeyData(keyData []byte) PRSigstoreSignedOption { return func(pr *prSigstoreSigned) error { if pr.KeyData != nil { - return errors.New(`"keyData" already specified`) + return InvalidPolicyFormatError(`"keyData" already specified`) } pr.KeyData = keyData return nil } } +// PRSigstoreSignedWithKeyDatas specifies a value for the "keyDatas" field when calling NewPRSigstoreSigned. +func PRSigstoreSignedWithKeyDatas(keyDatas [][]byte) PRSigstoreSignedOption { + return func(pr *prSigstoreSigned) error { + if pr.KeyDatas != nil { + return InvalidPolicyFormatError(`"keyDatas" already specified`) + } + if len(keyDatas) == 0 { + return InvalidPolicyFormatError(`"keyDatas" contains no entries`) + } + pr.KeyDatas = keyDatas + return nil + } +} + // PRSigstoreSignedWithFulcio specifies a value for the "fulcio" field when calling NewPRSigstoreSigned. func PRSigstoreSignedWithFulcio(fulcio PRSigstoreSignedFulcio) PRSigstoreSignedOption { return func(pr *prSigstoreSigned) error { if pr.Fulcio != nil { - return errors.New(`"fulcio" already specified`) + return InvalidPolicyFormatError(`"fulcio" already specified`) } pr.Fulcio = fulcio return nil @@ -48,29 +75,57 @@ func PRSigstoreSignedWithFulcio(fulcio PRSigstoreSignedFulcio) PRSigstoreSignedO func PRSigstoreSignedWithRekorPublicKeyPath(rekorPublicKeyPath string) PRSigstoreSignedOption { return func(pr *prSigstoreSigned) error { if pr.RekorPublicKeyPath != "" { - return errors.New(`"rekorPublicKeyPath" already specified`) + return InvalidPolicyFormatError(`"rekorPublicKeyPath" already specified`) } pr.RekorPublicKeyPath = rekorPublicKeyPath return nil } } +// PRSigstoreSignedWithRekorPublicKeyPaths specifies a value for the rRekorPublickeyPaths" field when calling NewPRSigstoreSigned. +func PRSigstoreSignedWithRekorPublicKeyPaths(rekorPublickeyPaths []string) PRSigstoreSignedOption { + return func(pr *prSigstoreSigned) error { + if pr.RekorPublicKeyPaths != nil { + return InvalidPolicyFormatError(`"rekorPublickeyPaths" already specified`) + } + if len(rekorPublickeyPaths) == 0 { + return InvalidPolicyFormatError(`"rekorPublickeyPaths" contains no entries`) + } + pr.RekorPublicKeyPaths = rekorPublickeyPaths + return nil + } +} + // PRSigstoreSignedWithRekorPublicKeyData specifies a value for the "rekorPublicKeyData" field when calling NewPRSigstoreSigned. func PRSigstoreSignedWithRekorPublicKeyData(rekorPublicKeyData []byte) PRSigstoreSignedOption { return func(pr *prSigstoreSigned) error { if pr.RekorPublicKeyData != nil { - return errors.New(`"rekorPublicKeyData" already specified`) + return InvalidPolicyFormatError(`"rekorPublicKeyData" already specified`) } pr.RekorPublicKeyData = rekorPublicKeyData return nil } } +// PRSigstoreSignedWithRekorPublicKeyDatas specifies a value for the "rekorPublickeyDatas" field when calling NewPRSigstoreSigned. +func PRSigstoreSignedWithRekorPublicKeyDatas(rekorPublickeyDatas [][]byte) PRSigstoreSignedOption { + return func(pr *prSigstoreSigned) error { + if pr.RekorPublicKeyDatas != nil { + return InvalidPolicyFormatError(`"rekorPublickeyDatas" already specified`) + } + if len(rekorPublickeyDatas) == 0 { + return InvalidPolicyFormatError(`"rekorPublickeyDatas" contains no entries`) + } + pr.RekorPublicKeyDatas = rekorPublickeyDatas + return nil + } +} + // PRSigstoreSignedWithSignedIdentity specifies a value for the "signedIdentity" field when calling NewPRSigstoreSigned. func PRSigstoreSignedWithSignedIdentity(signedIdentity PolicyReferenceMatch) PRSigstoreSignedOption { return func(pr *prSigstoreSigned) error { if pr.SignedIdentity != nil { - return errors.New(`"signedIdentity" already specified`) + return InvalidPolicyFormatError(`"signedIdentity" already specified`) } pr.SignedIdentity = signedIdentity return nil @@ -92,21 +147,40 @@ func newPRSigstoreSigned(options ...PRSigstoreSignedOption) (*prSigstoreSigned, if res.KeyPath != "" { keySources++ } + if res.KeyPaths != nil { + keySources++ + } if res.KeyData != nil { keySources++ } + if res.KeyDatas != nil { + keySources++ + } if res.Fulcio != nil { keySources++ } if keySources != 1 { - return nil, InvalidPolicyFormatError("exactly one of keyPath, keyData and fulcio must be specified") + return nil, InvalidPolicyFormatError("exactly one of keyPath, keyPaths, keyData, keyDatas and fulcio must be specified") } - if res.RekorPublicKeyPath != "" && res.RekorPublicKeyData != nil { - return nil, InvalidPolicyFormatError("rekorPublickeyType and rekorPublickeyData cannot be used simultaneously") + rekorSources := 0 + if res.RekorPublicKeyPath != "" { + rekorSources++ + } + if res.RekorPublicKeyPaths != nil { + rekorSources++ + } + if res.RekorPublicKeyData != nil { + rekorSources++ + } + if res.RekorPublicKeyDatas != nil { + rekorSources++ } - if res.Fulcio != nil && res.RekorPublicKeyPath == "" && res.RekorPublicKeyData == nil { - return nil, InvalidPolicyFormatError("At least one of RekorPublickeyPath and RekorPublickeyData must be specified if fulcio is used") + if rekorSources > 1 { + return nil, InvalidPolicyFormatError("at most one of rekorPublickeyPath, rekorPublicKeyPaths, rekorPublickeyData and rekorPublicKeyDatas can be used simultaneously") + } + if res.Fulcio != nil && rekorSources == 0 { + return nil, InvalidPolicyFormatError("At least one of rekorPublickeyPath, rekorPublicKeyPaths, rekorPublickeyData and rekorPublicKeyDatas must be specified if fulcio is used") } if res.SignedIdentity == nil { @@ -144,7 +218,8 @@ var _ json.Unmarshaler = (*prSigstoreSigned)(nil) func (pr *prSigstoreSigned) UnmarshalJSON(data []byte) error { *pr = prSigstoreSigned{} var tmp prSigstoreSigned - var gotKeyPath, gotKeyData, gotFulcio, gotRekorPublicKeyPath, gotRekorPublicKeyData bool + var gotKeyPath, gotKeyPaths, gotKeyData, gotKeyDatas, gotFulcio bool + var gotRekorPublicKeyPath, gotRekorPublicKeyPaths, gotRekorPublicKeyData, gotRekorPublicKeyDatas bool var fulcio prSigstoreSignedFulcio var signedIdentity json.RawMessage if err := internal.ParanoidUnmarshalJSONObject(data, func(key string) any { @@ -154,18 +229,30 @@ func (pr *prSigstoreSigned) UnmarshalJSON(data []byte) error { case "keyPath": gotKeyPath = true return &tmp.KeyPath + case "keyPaths": + gotKeyPaths = true + return &tmp.KeyPaths case "keyData": gotKeyData = true return &tmp.KeyData + case "keyDatas": + gotKeyDatas = true + return &tmp.KeyDatas case "fulcio": gotFulcio = true return &fulcio case "rekorPublicKeyPath": gotRekorPublicKeyPath = true return &tmp.RekorPublicKeyPath + case "rekorPublicKeyPaths": + gotRekorPublicKeyPaths = true + return &tmp.RekorPublicKeyPaths case "rekorPublicKeyData": gotRekorPublicKeyData = true return &tmp.RekorPublicKeyData + case "rekorPublicKeyDatas": + gotRekorPublicKeyDatas = true + return &tmp.RekorPublicKeyDatas case "signedIdentity": return &signedIdentity default: @@ -192,18 +279,30 @@ func (pr *prSigstoreSigned) UnmarshalJSON(data []byte) error { if gotKeyPath { opts = append(opts, PRSigstoreSignedWithKeyPath(tmp.KeyPath)) } + if gotKeyPaths { + opts = append(opts, PRSigstoreSignedWithKeyPaths(tmp.KeyPaths)) + } if gotKeyData { opts = append(opts, PRSigstoreSignedWithKeyData(tmp.KeyData)) } + if gotKeyDatas { + opts = append(opts, PRSigstoreSignedWithKeyDatas(tmp.KeyDatas)) + } if gotFulcio { opts = append(opts, PRSigstoreSignedWithFulcio(&fulcio)) } if gotRekorPublicKeyPath { opts = append(opts, PRSigstoreSignedWithRekorPublicKeyPath(tmp.RekorPublicKeyPath)) } + if gotRekorPublicKeyPaths { + opts = append(opts, PRSigstoreSignedWithRekorPublicKeyPaths(tmp.RekorPublicKeyPaths)) + } if gotRekorPublicKeyData { opts = append(opts, PRSigstoreSignedWithRekorPublicKeyData(tmp.RekorPublicKeyData)) } + if gotRekorPublicKeyDatas { + opts = append(opts, PRSigstoreSignedWithRekorPublicKeyDatas(tmp.RekorPublicKeyDatas)) + } opts = append(opts, PRSigstoreSignedWithSignedIdentity(tmp.SignedIdentity)) res, err := newPRSigstoreSigned(opts...) @@ -221,7 +320,7 @@ type PRSigstoreSignedFulcioOption func(*prSigstoreSignedFulcio) error func PRSigstoreSignedFulcioWithCAPath(caPath string) PRSigstoreSignedFulcioOption { return func(f *prSigstoreSignedFulcio) error { if f.CAPath != "" { - return errors.New(`"caPath" already specified`) + return InvalidPolicyFormatError(`"caPath" already specified`) } f.CAPath = caPath return nil @@ -232,7 +331,7 @@ func PRSigstoreSignedFulcioWithCAPath(caPath string) PRSigstoreSignedFulcioOptio func PRSigstoreSignedFulcioWithCAData(caData []byte) PRSigstoreSignedFulcioOption { return func(f *prSigstoreSignedFulcio) error { if f.CAData != nil { - return errors.New(`"caData" already specified`) + return InvalidPolicyFormatError(`"caData" already specified`) } f.CAData = caData return nil @@ -243,7 +342,7 @@ func PRSigstoreSignedFulcioWithCAData(caData []byte) PRSigstoreSignedFulcioOptio func PRSigstoreSignedFulcioWithOIDCIssuer(oidcIssuer string) PRSigstoreSignedFulcioOption { return func(f *prSigstoreSignedFulcio) error { if f.OIDCIssuer != "" { - return errors.New(`"oidcIssuer" already specified`) + return InvalidPolicyFormatError(`"oidcIssuer" already specified`) } f.OIDCIssuer = oidcIssuer return nil @@ -254,7 +353,7 @@ func PRSigstoreSignedFulcioWithOIDCIssuer(oidcIssuer string) PRSigstoreSignedFul func PRSigstoreSignedFulcioWithSubjectEmail(subjectEmail string) PRSigstoreSignedFulcioOption { return func(f *prSigstoreSignedFulcio) error { if f.SubjectEmail != "" { - return errors.New(`"subjectEmail" already specified`) + return InvalidPolicyFormatError(`"subjectEmail" already specified`) } f.SubjectEmail = subjectEmail return nil diff --git a/vendor/github.com/containers/image/v5/signature/policy_eval_signedby.go b/vendor/github.com/containers/image/v5/signature/policy_eval_signedby.go index 896ca5a60dcc..e5c93291858a 100644 --- a/vendor/github.com/containers/image/v5/signature/policy_eval_signedby.go +++ b/vendor/github.com/containers/image/v5/signature/policy_eval_signedby.go @@ -6,7 +6,6 @@ import ( "context" "errors" "fmt" - "os" "slices" "github.com/containers/image/v5/internal/multierr" @@ -27,33 +26,18 @@ func (pr *prSignedBy) isSignatureAuthorAccepted(ctx context.Context, image priva } // FIXME: move this to per-context initialization - var data [][]byte - keySources := 0 - if pr.KeyPath != "" { - keySources++ - d, err := os.ReadFile(pr.KeyPath) - if err != nil { - return sarRejected, nil, err - } - data = [][]byte{d} - } - if pr.KeyPaths != nil { - keySources++ - data = [][]byte{} - for _, path := range pr.KeyPaths { - d, err := os.ReadFile(path) - if err != nil { - return sarRejected, nil, err - } - data = append(data, d) - } - } - if pr.KeyData != nil { - keySources++ - data = [][]byte{pr.KeyData} + const notOneSourceErrorText = `Internal inconsistency: not exactly one of "keyPath", "keyPaths" and "keyData" specified` + data, err := loadBytesFromConfigSources(configBytesSources{ + inconsistencyErrorMessage: notOneSourceErrorText, + path: pr.KeyPath, + paths: pr.KeyPaths, + data: pr.KeyData, + }) + if err != nil { + return sarRejected, nil, err } - if keySources != 1 { - return sarRejected, nil, errors.New(`Internal inconsistency: not exactly one of "keyPath", "keyPaths" and "keyData" specified`) + if data == nil { + return sarRejected, nil, errors.New(notOneSourceErrorText) } // FIXME: move this to per-context initialization diff --git a/vendor/github.com/containers/image/v5/signature/policy_eval_sigstore.go b/vendor/github.com/containers/image/v5/signature/policy_eval_sigstore.go index 485165077867..9c553771cbe7 100644 --- a/vendor/github.com/containers/image/v5/signature/policy_eval_sigstore.go +++ b/vendor/github.com/containers/image/v5/signature/policy_eval_sigstore.go @@ -10,6 +10,7 @@ import ( "errors" "fmt" "os" + "strings" "github.com/containers/image/v5/internal/multierr" "github.com/containers/image/v5/internal/private" @@ -20,37 +21,69 @@ import ( "github.com/sigstore/sigstore/pkg/cryptoutils" ) -// loadBytesFromDataOrPath ensures there is at most one of ${prefix}Data and ${prefix}Path set, +// configBytesSources contains configuration fields which may result in one or more []byte values +type configBytesSources struct { + inconsistencyErrorMessage string // Error to return if more than one source is set + path string // …Path: a path to a file containing the data, or "" + paths []string // …Paths: paths to files containing the data, or nil + data []byte // …Data: a single instance ofhe raw data, or nil + datas [][]byte // …Datas: the raw data, or nil // codespell:ignore datas +} + +// loadBytesFromConfigSources ensures at most one of the sources in src is set, // and returns the referenced data, or nil if neither is set. -func loadBytesFromDataOrPath(prefix string, data []byte, path string) ([]byte, error) { - switch { - case data != nil && path != "": - return nil, fmt.Errorf(`Internal inconsistency: both "%sPath" and "%sData" specified`, prefix, prefix) - case path != "": - d, err := os.ReadFile(path) +func loadBytesFromConfigSources(src configBytesSources) ([][]byte, error) { + sources := 0 + var data [][]byte // = nil + if src.path != "" { + sources++ + d, err := os.ReadFile(src.path) if err != nil { return nil, err } - return d, nil - case data != nil: - return data, nil - default: // Nothing - return nil, nil + data = [][]byte{d} + } + if src.paths != nil { + sources++ + data = [][]byte{} + for _, path := range src.paths { + d, err := os.ReadFile(path) + if err != nil { + return nil, err + } + data = append(data, d) + } } + if src.data != nil { + sources++ + data = [][]byte{src.data} + } + if src.datas != nil { // codespell:ignore datas + sources++ + data = src.datas // codespell:ignore datas + } + if sources > 1 { + return nil, errors.New(src.inconsistencyErrorMessage) + } + return data, nil } // prepareTrustRoot creates a fulcioTrustRoot from the input data. // (This also prevents external implementations of this interface, ensuring that prSigstoreSignedFulcio is the only one.) func (f *prSigstoreSignedFulcio) prepareTrustRoot() (*fulcioTrustRoot, error) { - caCertBytes, err := loadBytesFromDataOrPath("fulcioCA", f.CAData, f.CAPath) + caCertPEMs, err := loadBytesFromConfigSources(configBytesSources{ + inconsistencyErrorMessage: `Internal inconsistency: both "caPath" and "caData" specified`, + path: f.CAPath, + data: f.CAData, + }) if err != nil { return nil, err } - if caCertBytes == nil { - return nil, errors.New(`Internal inconsistency: Fulcio specified with neither "caPath" nor "caData"`) + if len(caCertPEMs) != 1 { + return nil, errors.New(`Internal inconsistency: Fulcio specified with not exactly one of "caPath" nor "caData"`) } certs := x509.NewCertPool() - if ok := certs.AppendCertsFromPEM(caCertBytes); !ok { + if ok := certs.AppendCertsFromPEM(caCertPEMs[0]); !ok { return nil, errors.New("error loading Fulcio CA certificates") } fulcio := fulcioTrustRoot{ @@ -66,24 +99,35 @@ func (f *prSigstoreSignedFulcio) prepareTrustRoot() (*fulcioTrustRoot, error) { // sigstoreSignedTrustRoot contains an already parsed version of the prSigstoreSigned policy type sigstoreSignedTrustRoot struct { - publicKey crypto.PublicKey - fulcio *fulcioTrustRoot - rekorPublicKey *ecdsa.PublicKey + publicKeys []crypto.PublicKey + fulcio *fulcioTrustRoot + rekorPublicKeys []*ecdsa.PublicKey } func (pr *prSigstoreSigned) prepareTrustRoot() (*sigstoreSignedTrustRoot, error) { res := sigstoreSignedTrustRoot{} - publicKeyPEM, err := loadBytesFromDataOrPath("key", pr.KeyData, pr.KeyPath) + publicKeyPEMs, err := loadBytesFromConfigSources(configBytesSources{ + inconsistencyErrorMessage: `Internal inconsistency: more than one of "keyPath", "keyPaths", "keyData", "keyDatas" specified`, + path: pr.KeyPath, + paths: pr.KeyPaths, + data: pr.KeyData, + datas: pr.KeyDatas, // codespell:ignore datas + }) if err != nil { return nil, err } - if publicKeyPEM != nil { - pk, err := cryptoutils.UnmarshalPEMToPublicKey(publicKeyPEM) - if err != nil { - return nil, fmt.Errorf("parsing public key: %w", err) + if publicKeyPEMs != nil { + for index, keyData := range publicKeyPEMs { + pk, err := cryptoutils.UnmarshalPEMToPublicKey(keyData) + if err != nil { + return nil, fmt.Errorf("parsing public key %d: %w", index+1, err) + } + res.publicKeys = append(res.publicKeys, pk) + } + if len(res.publicKeys) == 0 { + return nil, errors.New(`Internal inconsistency: "keyPath", "keyPaths", "keyData" and "keyDatas" produced no public keys`) } - res.publicKey = pk } if pr.Fulcio != nil { @@ -94,21 +138,32 @@ func (pr *prSigstoreSigned) prepareTrustRoot() (*sigstoreSignedTrustRoot, error) res.fulcio = f } - rekorPublicKeyPEM, err := loadBytesFromDataOrPath("rekorPublicKey", pr.RekorPublicKeyData, pr.RekorPublicKeyPath) + rekorPublicKeyPEMs, err := loadBytesFromConfigSources(configBytesSources{ + inconsistencyErrorMessage: `Internal inconsistency: both "rekorPublicKeyPath" and "rekorPublicKeyData" specified`, + path: pr.RekorPublicKeyPath, + paths: pr.RekorPublicKeyPaths, + data: pr.RekorPublicKeyData, + datas: pr.RekorPublicKeyDatas, // codespell:ignore datas + }) if err != nil { return nil, err } - if rekorPublicKeyPEM != nil { - pk, err := cryptoutils.UnmarshalPEMToPublicKey(rekorPublicKeyPEM) - if err != nil { - return nil, fmt.Errorf("parsing Rekor public key: %w", err) - } - pkECDSA, ok := pk.(*ecdsa.PublicKey) - if !ok { - return nil, fmt.Errorf("Rekor public key is not using ECDSA") + if rekorPublicKeyPEMs != nil { + for index, pem := range rekorPublicKeyPEMs { + pk, err := cryptoutils.UnmarshalPEMToPublicKey(pem) + if err != nil { + return nil, fmt.Errorf("parsing Rekor public key %d: %w", index+1, err) + } + pkECDSA, ok := pk.(*ecdsa.PublicKey) + if !ok { + return nil, fmt.Errorf("Rekor public key %d is not using ECDSA", index+1) + } + res.rekorPublicKeys = append(res.rekorPublicKeys, pkECDSA) + } + if len(res.rekorPublicKeys) == 0 { + return nil, errors.New(`Internal inconsistency: "rekorPublicKeyPath", "rekorPublicKeyPaths", "rekorPublicKeyData" and "rekorPublicKeyDatas" produced no public keys`) } - res.rekorPublicKey = pkECDSA } return &res, nil @@ -134,37 +189,51 @@ func (pr *prSigstoreSigned) isSignatureAccepted(ctx context.Context, image priva } untrustedPayload := sig.UntrustedPayload() - var publicKey crypto.PublicKey + var publicKeys []crypto.PublicKey switch { - case trustRoot.publicKey != nil && trustRoot.fulcio != nil: // newPRSigstoreSigned rejects such combinations. + case trustRoot.publicKeys != nil && trustRoot.fulcio != nil: // newPRSigstoreSigned rejects such combinations. return sarRejected, errors.New("Internal inconsistency: Both a public key and Fulcio CA specified") - case trustRoot.publicKey == nil && trustRoot.fulcio == nil: // newPRSigstoreSigned rejects such combinations. + case trustRoot.publicKeys == nil && trustRoot.fulcio == nil: // newPRSigstoreSigned rejects such combinations. return sarRejected, errors.New("Internal inconsistency: Neither a public key nor a Fulcio CA specified") - case trustRoot.publicKey != nil: - if trustRoot.rekorPublicKey != nil { + case trustRoot.publicKeys != nil: + if trustRoot.rekorPublicKeys != nil { untrustedSET, ok := untrustedAnnotations[signature.SigstoreSETAnnotationKey] if !ok { // For user convenience; passing an empty []byte to VerifyRekorSet should work. return sarRejected, fmt.Errorf("missing %s annotation", signature.SigstoreSETAnnotationKey) } - // We could use publicKeyPEM directly, but let’s re-marshal to avoid inconsistencies. - // FIXME: We could just generate DER instead of the full PEM text - recreatedPublicKeyPEM, err := cryptoutils.MarshalPublicKeyToPEM(trustRoot.publicKey) - if err != nil { - // Coverage: The key was loaded from a PEM format, so it’s unclear how this could fail. - // (PEM is not essential, MarshalPublicKeyToPEM can only fail if marshaling to ASN1.DER fails.) - return sarRejected, fmt.Errorf("re-marshaling public key to PEM: %w", err) + var rekorFailures []string + for _, candidatePublicKey := range trustRoot.publicKeys { + // We could use publicKeyPEM directly, but let’s re-marshal to avoid inconsistencies. + // FIXME: We could just generate DER instead of the full PEM text + recreatedPublicKeyPEM, err := cryptoutils.MarshalPublicKeyToPEM(candidatePublicKey) + if err != nil { + // Coverage: The key was loaded from a PEM format, so it’s unclear how this could fail. + // (PEM is not essential, MarshalPublicKeyToPEM can only fail if marshaling to ASN1.DER fails.) + return sarRejected, fmt.Errorf("re-marshaling public key to PEM: %w", err) + } + // We don’t care about the Rekor timestamp, just about log presence. + _, err = internal.VerifyRekorSET(trustRoot.rekorPublicKeys, []byte(untrustedSET), recreatedPublicKeyPEM, untrustedBase64Signature, untrustedPayload) + if err == nil { + publicKeys = append(publicKeys, candidatePublicKey) + break // The SET can only accept one public key entry, so if we found one, the rest either doesn’t match or is a duplicate + } + rekorFailures = append(rekorFailures, err.Error()) } - // We don’t care about the Rekor timestamp, just about log presence. - if _, err := internal.VerifyRekorSET(trustRoot.rekorPublicKey, []byte(untrustedSET), recreatedPublicKeyPEM, untrustedBase64Signature, untrustedPayload); err != nil { - return sarRejected, err + if len(publicKeys) == 0 { + if len(rekorFailures) == 0 { + // Coverage: We have ensured that len(trustRoot.publicKeys) != 0, when nothing succeeds, there must be at least one failure. + return sarRejected, errors.New(`Internal inconsistency: Rekor SET did not match any key but we have no failures.`) + } + return sarRejected, internal.NewInvalidSignatureError(fmt.Sprintf("No public key verified against the RekorSET: %s", strings.Join(rekorFailures, ", "))) } + } else { + publicKeys = trustRoot.publicKeys } - publicKey = trustRoot.publicKey case trustRoot.fulcio != nil: - if trustRoot.rekorPublicKey == nil { // newPRSigstoreSigned rejects such combinations. + if trustRoot.rekorPublicKeys == nil { // newPRSigstoreSigned rejects such combinations. return sarRejected, errors.New("Internal inconsistency: Fulcio CA specified without a Rekor public key") } untrustedSET, ok := untrustedAnnotations[signature.SigstoreSETAnnotationKey] @@ -179,19 +248,20 @@ func (pr *prSigstoreSigned) isSignatureAccepted(ctx context.Context, image priva if untrustedIntermediateChain, ok := untrustedAnnotations[signature.SigstoreIntermediateCertificateChainAnnotationKey]; ok { untrustedIntermediateChainBytes = []byte(untrustedIntermediateChain) } - pk, err := verifyRekorFulcio(trustRoot.rekorPublicKey, trustRoot.fulcio, + pk, err := verifyRekorFulcio(trustRoot.rekorPublicKeys, trustRoot.fulcio, []byte(untrustedSET), []byte(untrustedCert), untrustedIntermediateChainBytes, untrustedBase64Signature, untrustedPayload) if err != nil { return sarRejected, err } - publicKey = pk + publicKeys = []crypto.PublicKey{pk} } - if publicKey == nil { - // Coverage: This should never happen, we have already excluded the possibility in the switch above. + if len(publicKeys) == 0 { + // Coverage: This should never happen, we ensured that trustRoot.publicKeys is non-empty if set, + // and we have already excluded the possibility in the switch above. return sarRejected, fmt.Errorf("Internal inconsistency: publicKey not set before verifying sigstore payload") } - signature, err := internal.VerifySigstorePayload(publicKey, untrustedPayload, untrustedBase64Signature, internal.SigstorePayloadAcceptanceRules{ + signature, err := internal.VerifySigstorePayload(publicKeys, untrustedPayload, untrustedBase64Signature, internal.SigstorePayloadAcceptanceRules{ ValidateSignedDockerReference: func(ref string) error { if !pr.SignedIdentity.matchesDockerReference(image, ref) { return PolicyRequirementError(fmt.Sprintf("Signature for identity %q is not accepted", ref)) diff --git a/vendor/github.com/containers/image/v5/signature/policy_types.go b/vendor/github.com/containers/image/v5/signature/policy_types.go index 96e91a0a9c88..32aa1c0ad44f 100644 --- a/vendor/github.com/containers/image/v5/signature/policy_types.go +++ b/vendor/github.com/containers/image/v5/signature/policy_types.go @@ -74,7 +74,7 @@ type prSignedBy struct { // KeyPath is a pathname to a local file containing the trusted key(s). Exactly one of KeyPath, KeyPaths and KeyData must be specified. KeyPath string `json:"keyPath,omitempty"` - // KeyPaths if a set of pathnames to local files containing the trusted key(s). Exactly one of KeyPath, KeyPaths and KeyData must be specified. + // KeyPaths is a set of pathnames to local files containing the trusted key(s). Exactly one of KeyPath, KeyPaths and KeyData must be specified. KeyPaths []string `json:"keyPaths,omitempty"` // KeyData contains the trusted key(s), base64-encoded. Exactly one of KeyPath, KeyPaths and KeyData must be specified. KeyData []byte `json:"keyData,omitempty"` @@ -111,24 +111,35 @@ type prSignedBaseLayer struct { type prSigstoreSigned struct { prCommon - // KeyPath is a pathname to a local file containing the trusted key. Exactly one of KeyPath, KeyData, Fulcio must be specified. + // KeyPath is a pathname to a local file containing the trusted key. Exactly one of KeyPath, KeyPaths, KeyData, KeyDatas and Fulcio must be specified. KeyPath string `json:"keyPath,omitempty"` - // KeyData contains the trusted key, base64-encoded. Exactly one of KeyPath, KeyData, Fulcio must be specified. + // KeyPaths is a set of pathnames to local files containing the trusted key(s). Exactly one of KeyPath, KeyPaths, KeyData, KeyDatas and Fulcio must be specified. + KeyPaths []string `json:"keyPaths,omitempty"` + // KeyData contains the trusted key, base64-encoded. Exactly one of KeyPath, KeyPaths, KeyData, KeyDatas and Fulcio must be specified. KeyData []byte `json:"keyData,omitempty"` - // FIXME: Multiple public keys? + // KeyDatas is a set of trusted keys, base64-encoded. Exactly one of KeyPath, KeyPaths, KeyData, KeyDatas and Fulcio must be specified. + KeyDatas [][]byte `json:"keyDatas,omitempty"` - // Fulcio specifies which Fulcio-generated certificates are accepted. Exactly one of KeyPath, KeyData, Fulcio must be specified. + // Fulcio specifies which Fulcio-generated certificates are accepted. Exactly one of KeyPath, KeyPaths, KeyData, KeyDatas and Fulcio must be specified. // If Fulcio is specified, one of RekorPublicKeyPath or RekorPublicKeyData must be specified as well. Fulcio PRSigstoreSignedFulcio `json:"fulcio,omitempty"` // RekorPublicKeyPath is a pathname to local file containing a public key of a Rekor server which must record acceptable signatures. - // If Fulcio is used, one of RekorPublicKeyPath or RekorPublicKeyData must be specified as well; otherwise it is optional - // (and Rekor inclusion is not required if a Rekor public key is not specified). + // If Fulcio is used, one of RekorPublicKeyPath, RekorPublicKeyPaths, RekorPublicKeyData and RekorPublicKeyDatas must be specified as well; + // otherwise it is optional (and Rekor inclusion is not required if a Rekor public key is not specified). RekorPublicKeyPath string `json:"rekorPublicKeyPath,omitempty"` + // RekorPublicKeyPaths is a set of pathnames to local files, each containing a public key of a Rekor server. One of the keys must record acceptable signatures. + // If Fulcio is used, one of RekorPublicKeyPath, RekorPublicKeyPaths, RekorPublicKeyData and RekorPublicKeyDatas must be specified as well; + // otherwise it is optional (and Rekor inclusion is not required if a Rekor public key is not specified). + RekorPublicKeyPaths []string `json:"rekorPublicKeyPaths,omitempty"` // RekorPublicKeyPath contain a base64-encoded public key of a Rekor server which must record acceptable signatures. - // If Fulcio is used, one of RekorPublicKeyPath or RekorPublicKeyData must be specified as well; otherwise it is optional - // (and Rekor inclusion is not required if a Rekor public key is not specified). + // If Fulcio is used, one of RekorPublicKeyPath, RekorPublicKeyPaths, RekorPublicKeyData and RekorPublicKeyDatas must be specified as well; + // otherwise it is optional (and Rekor inclusion is not required if a Rekor public key is not specified). RekorPublicKeyData []byte `json:"rekorPublicKeyData,omitempty"` + // RekorPublicKeyDatas each contain a base64-encoded public key of a Rekor server. One of the keys must record acceptable signatures. + // If Fulcio is used, one of RekorPublicKeyPath, RekorPublicKeyPaths, RekorPublicKeyData and RekorPublicKeyDatas must be specified as well; + // otherwise it is optional (and Rekor inclusion is not required if a Rekor public key is not specified). + RekorPublicKeyDatas [][]byte `json:"rekorPublicKeyDatas,omitempty"` // SignedIdentity specifies what image identity the signature must be claiming about the image. // Defaults to "matchRepoDigestOrExact" if not specified. diff --git a/vendor/github.com/containers/image/v5/version/version.go b/vendor/github.com/containers/image/v5/version/version.go index 19f708adb969..64e46872597c 100644 --- a/vendor/github.com/containers/image/v5/version/version.go +++ b/vendor/github.com/containers/image/v5/version/version.go @@ -6,9 +6,9 @@ const ( // VersionMajor is for an API incompatible changes VersionMajor = 5 // VersionMinor is for functionality in a backwards-compatible manner - VersionMinor = 33 + VersionMinor = 32 // VersionPatch is for backwards-compatible bug fixes - VersionPatch = 1 + VersionPatch = 2 // VersionDev indicates development branch. Releases will be empty string. VersionDev = "" diff --git a/vendor/github.com/containers/storage/pkg/parsers/kernel/kernel.go b/vendor/github.com/containers/storage/pkg/parsers/kernel/kernel.go deleted file mode 100644 index 5cee2693ad80..000000000000 --- a/vendor/github.com/containers/storage/pkg/parsers/kernel/kernel.go +++ /dev/null @@ -1,90 +0,0 @@ -//go:build !windows -// +build !windows - -// Package kernel provides helper function to get, parse and compare kernel -// versions for different platforms. -package kernel - -import ( - "errors" - "fmt" - - "github.com/sirupsen/logrus" -) - -// VersionInfo holds information about the kernel. -type VersionInfo struct { - Kernel int // Version of the kernel (e.g. 4.1.2-generic -> 4) - Major int // Major part of the kernel version (e.g. 4.1.2-generic -> 1) - Minor int // Minor part of the kernel version (e.g. 4.1.2-generic -> 2) - Flavor string // Flavor of the kernel version (e.g. 4.1.2-generic -> generic) -} - -func (k *VersionInfo) String() string { - return fmt.Sprintf("%d.%d.%d%s", k.Kernel, k.Major, k.Minor, k.Flavor) -} - -// CompareKernelVersion compares two kernel.VersionInfo structs. -// Returns -1 if a < b, 0 if a == b, 1 it a > b -func CompareKernelVersion(a, b VersionInfo) int { - if a.Kernel < b.Kernel { - return -1 - } else if a.Kernel > b.Kernel { - return 1 - } - - if a.Major < b.Major { - return -1 - } else if a.Major > b.Major { - return 1 - } - - if a.Minor < b.Minor { - return -1 - } else if a.Minor > b.Minor { - return 1 - } - - return 0 -} - -// CheckKernelVersion checks if current kernel is newer than (or equal to) -// the given version. -func CheckKernelVersion(k, major, minor int) bool { - if v, err := GetKernelVersion(); err != nil { - logrus.Warnf("Error getting kernel version: %s", err) - } else { - if CompareKernelVersion(*v, VersionInfo{Kernel: k, Major: major, Minor: minor}) < 0 { - return false - } - } - return true -} - -// ParseRelease parses a string and creates a VersionInfo based on it. -func ParseRelease(release string) (*VersionInfo, error) { - var ( - kernel, major, minor, parsed int - flavor, partial string - ) - - // Ignore error from Sscanf to allow an empty flavor. Instead, just - // make sure we got all the version numbers. - parsed, _ = fmt.Sscanf(release, "%d.%d%s", &kernel, &major, &partial) - if parsed < 2 { - return nil, errors.New("Can't parse kernel version " + release) - } - - // sometimes we have 3.12.25-gentoo, but sometimes we just have 3.12-1-amd64 - parsed, _ = fmt.Sscanf(partial, ".%d%s", &minor, &flavor) - if parsed < 1 { - flavor = partial - } - - return &VersionInfo{ - Kernel: kernel, - Major: major, - Minor: minor, - Flavor: flavor, - }, nil -} diff --git a/vendor/github.com/containers/storage/pkg/parsers/kernel/kernel_darwin.go b/vendor/github.com/containers/storage/pkg/parsers/kernel/kernel_darwin.go deleted file mode 100644 index 645790da6487..000000000000 --- a/vendor/github.com/containers/storage/pkg/parsers/kernel/kernel_darwin.go +++ /dev/null @@ -1,57 +0,0 @@ -//go:build darwin -// +build darwin - -// Package kernel provides helper function to get, parse and compare kernel -// versions for different platforms. -package kernel - -import ( - "fmt" - "os/exec" - "strings" - - "github.com/mattn/go-shellwords" -) - -// GetKernelVersion gets the current kernel version. -func GetKernelVersion() (*VersionInfo, error) { - release, err := getRelease() - if err != nil { - return nil, err - } - - return ParseRelease(release) -} - -// getRelease uses `system_profiler SPSoftwareDataType` to get OSX kernel version -func getRelease() (string, error) { - cmd := exec.Command("system_profiler", "SPSoftwareDataType") - osName, err := cmd.Output() - if err != nil { - return "", err - } - - var release string - data := strings.Split(string(osName), "\n") - for _, line := range data { - if strings.Contains(line, "Kernel Version") { - // It has the format like ' Kernel Version: Darwin 14.5.0' - content := strings.SplitN(line, ":", 2) - if len(content) != 2 { - return "", fmt.Errorf("kernel version is invalid") - } - - prettyNames, err := shellwords.Parse(content[1]) - if err != nil { - return "", fmt.Errorf("kernel version is invalid: %w", err) - } - - if len(prettyNames) != 2 { - return "", fmt.Errorf("kernel version needs to be 'Darwin x.x.x' ") - } - release = prettyNames[1] - } - } - - return release, nil -} diff --git a/vendor/github.com/containers/storage/pkg/parsers/kernel/kernel_unix.go b/vendor/github.com/containers/storage/pkg/parsers/kernel/kernel_unix.go deleted file mode 100644 index 48a8b12cf1e4..000000000000 --- a/vendor/github.com/containers/storage/pkg/parsers/kernel/kernel_unix.go +++ /dev/null @@ -1,20 +0,0 @@ -//go:build unix && !darwin - -// Package kernel provides helper function to get, parse and compare kernel -// versions for different platforms. -package kernel - -import ( - "golang.org/x/sys/unix" -) - -// GetKernelVersion gets the current kernel version. -func GetKernelVersion() (*VersionInfo, error) { - uts := &unix.Utsname{} - - if err := unix.Uname(uts); err != nil { - return nil, err - } - - return ParseRelease(unix.ByteSliceToString(uts.Release[:])) -} diff --git a/vendor/github.com/containers/storage/pkg/parsers/kernel/kernel_windows.go b/vendor/github.com/containers/storage/pkg/parsers/kernel/kernel_windows.go deleted file mode 100644 index 4b7fdee830c4..000000000000 --- a/vendor/github.com/containers/storage/pkg/parsers/kernel/kernel_windows.go +++ /dev/null @@ -1,70 +0,0 @@ -//go:build windows -// +build windows - -package kernel - -import ( - "fmt" - "unsafe" - - "golang.org/x/sys/windows" -) - -// VersionInfo holds information about the kernel. -type VersionInfo struct { - kvi string // Version of the kernel (e.g. 6.1.7601.17592 -> 6) - major int // Major part of the kernel version (e.g. 6.1.7601.17592 -> 1) - minor int // Minor part of the kernel version (e.g. 6.1.7601.17592 -> 7601) - build int // Build number of the kernel version (e.g. 6.1.7601.17592 -> 17592) -} - -func (k *VersionInfo) String() string { - return fmt.Sprintf("%d.%d %d (%s)", k.major, k.minor, k.build, k.kvi) -} - -// GetKernelVersion gets the current kernel version. -func GetKernelVersion() (*VersionInfo, error) { - var ( - h windows.Handle - dwVersion uint32 - err error - ) - - KVI := &VersionInfo{"Unknown", 0, 0, 0} - - if err = windows.RegOpenKeyEx(windows.HKEY_LOCAL_MACHINE, - windows.StringToUTF16Ptr(`SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\`), - 0, - windows.KEY_READ, - &h); err != nil { - return KVI, err - } - defer windows.RegCloseKey(h) - - var buf [1 << 10]uint16 - var typ uint32 - n := uint32(len(buf) * 2) // api expects array of bytes, not uint16 - - if err = windows.RegQueryValueEx(h, - windows.StringToUTF16Ptr("BuildLabEx"), - nil, - &typ, - (*byte)(unsafe.Pointer(&buf[0])), - &n); err != nil { - return KVI, err - } - - KVI.kvi = windows.UTF16ToString(buf[:]) - - // Important - docker.exe MUST be manifested for this API to return - // the correct information. - if dwVersion, err = windows.GetVersion(); err != nil { - return KVI, err - } - - KVI.major = int(dwVersion & 0xFF) - KVI.minor = int((dwVersion & 0xFF00) >> 8) - KVI.build = int((dwVersion & 0xFFFF0000) >> 16) - - return KVI, nil -} diff --git a/vendor/modules.txt b/vendor/modules.txt index e7f28c740b4a..69255b280466 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -140,7 +140,7 @@ github.com/containernetworking/cni/pkg/version # github.com/containernetworking/plugins v1.5.1 ## explicit; go 1.20 github.com/containernetworking/plugins/pkg/ns -# github.com/containers/buildah v1.37.1 +# github.com/containers/buildah v1.37.2 ## explicit; go 1.21.0 github.com/containers/buildah github.com/containers/buildah/bind @@ -170,7 +170,7 @@ github.com/containers/buildah/pkg/sshagent github.com/containers/buildah/pkg/util github.com/containers/buildah/pkg/volumes github.com/containers/buildah/util -# github.com/containers/common v0.60.1 +# github.com/containers/common v0.60.2 ## explicit; go 1.21.0 github.com/containers/common/internal github.com/containers/common/internal/attributedstring @@ -243,7 +243,7 @@ github.com/containers/conmon/runner/config # github.com/containers/gvisor-tap-vsock v0.7.4 ## explicit; go 1.21 github.com/containers/gvisor-tap-vsock/pkg/types -# github.com/containers/image/v5 v5.32.1 +# github.com/containers/image/v5 v5.32.2 ## explicit; go 1.21.0 github.com/containers/image/v5/copy github.com/containers/image/v5/directory @@ -390,7 +390,6 @@ github.com/containers/storage/pkg/longpath github.com/containers/storage/pkg/loopback github.com/containers/storage/pkg/mount github.com/containers/storage/pkg/parsers -github.com/containers/storage/pkg/parsers/kernel github.com/containers/storage/pkg/pools github.com/containers/storage/pkg/promise github.com/containers/storage/pkg/reexec