diff --git a/client/client.go b/client/client.go index 94bee29f7..44a71f8c5 100644 --- a/client/client.go +++ b/client/client.go @@ -45,6 +45,8 @@ import ( "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/leases" leasesproxy "github.com/containerd/containerd/v2/core/leases/proxy" + "github.com/containerd/containerd/v2/core/remotes" + "github.com/containerd/containerd/v2/core/remotes/docker" "github.com/containerd/containerd/v2/defaults" "github.com/containerd/containerd/v2/errdefs" "github.com/containerd/containerd/v2/events" @@ -53,8 +55,6 @@ import ( "github.com/containerd/containerd/v2/platforms" "github.com/containerd/containerd/v2/plugins" ptypes "github.com/containerd/containerd/v2/protobuf/types" - "github.com/containerd/containerd/v2/remotes" - "github.com/containerd/containerd/v2/remotes/docker" "github.com/containerd/containerd/v2/sandbox" sandboxproxy "github.com/containerd/containerd/v2/sandbox/proxy" "github.com/containerd/containerd/v2/services/introspection" diff --git a/client/client_opts.go b/client/client_opts.go index 76ed645cf..960bf1252 100644 --- a/client/client_opts.go +++ b/client/client_opts.go @@ -20,8 +20,8 @@ import ( "time" "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/remotes" "github.com/containerd/containerd/v2/platforms" - "github.com/containerd/containerd/v2/remotes" "github.com/containerd/containerd/v2/snapshots" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/client/pull.go b/client/pull.go index 4761d74e4..ee6a7e425 100644 --- a/client/pull.go +++ b/client/pull.go @@ -25,12 +25,12 @@ import ( "golang.org/x/sync/semaphore" "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/remotes" + "github.com/containerd/containerd/v2/core/remotes/docker" + "github.com/containerd/containerd/v2/core/remotes/docker/schema1" //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility. "github.com/containerd/containerd/v2/errdefs" "github.com/containerd/containerd/v2/pkg/unpack" "github.com/containerd/containerd/v2/platforms" - "github.com/containerd/containerd/v2/remotes" - "github.com/containerd/containerd/v2/remotes/docker" - "github.com/containerd/containerd/v2/remotes/docker/schema1" //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility. "github.com/containerd/containerd/v2/tracing" ) diff --git a/cmd/ctr/commands/content/content.go b/cmd/ctr/commands/content/content.go index d6e7b5cc3..62950a8c1 100644 --- a/cmd/ctr/commands/content/content.go +++ b/cmd/ctr/commands/content/content.go @@ -29,8 +29,8 @@ import ( "github.com/containerd/containerd/v2/cmd/ctr/commands" "github.com/containerd/containerd/v2/core/content" + "github.com/containerd/containerd/v2/core/remotes" "github.com/containerd/containerd/v2/errdefs" - "github.com/containerd/containerd/v2/remotes" "github.com/containerd/log" units "github.com/docker/go-units" digest "github.com/opencontainers/go-digest" diff --git a/cmd/ctr/commands/content/fetch.go b/cmd/ctr/commands/content/fetch.go index 6b34e730a..452ad6ddf 100644 --- a/cmd/ctr/commands/content/fetch.go +++ b/cmd/ctr/commands/content/fetch.go @@ -30,10 +30,10 @@ import ( "github.com/containerd/containerd/v2/cmd/ctr/commands" "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/remotes" "github.com/containerd/containerd/v2/errdefs" "github.com/containerd/containerd/v2/pkg/progress" "github.com/containerd/containerd/v2/platforms" - "github.com/containerd/containerd/v2/remotes" "github.com/containerd/log" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/cmd/ctr/commands/images/push.go b/cmd/ctr/commands/images/push.go index 72f105a99..0b5207ebe 100644 --- a/cmd/ctr/commands/images/push.go +++ b/cmd/ctr/commands/images/push.go @@ -30,13 +30,13 @@ import ( "github.com/containerd/containerd/v2/cmd/ctr/commands" "github.com/containerd/containerd/v2/cmd/ctr/commands/content" "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/remotes" + "github.com/containerd/containerd/v2/core/remotes/docker" "github.com/containerd/containerd/v2/pkg/progress" "github.com/containerd/containerd/v2/pkg/transfer" "github.com/containerd/containerd/v2/pkg/transfer/image" "github.com/containerd/containerd/v2/pkg/transfer/registry" "github.com/containerd/containerd/v2/platforms" - "github.com/containerd/containerd/v2/remotes" - "github.com/containerd/containerd/v2/remotes/docker" "github.com/containerd/log" digest "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/cmd/ctr/commands/resolver.go b/cmd/ctr/commands/resolver.go index d34594aee..1146513e6 100644 --- a/cmd/ctr/commands/resolver.go +++ b/cmd/ctr/commands/resolver.go @@ -31,10 +31,10 @@ import ( "strings" "github.com/containerd/console" + "github.com/containerd/containerd/v2/core/remotes" + "github.com/containerd/containerd/v2/core/remotes/docker" + "github.com/containerd/containerd/v2/core/remotes/docker/config" "github.com/containerd/containerd/v2/pkg/transfer/registry" - "github.com/containerd/containerd/v2/remotes" - "github.com/containerd/containerd/v2/remotes/docker" - "github.com/containerd/containerd/v2/remotes/docker/config" "github.com/containerd/log" "github.com/urfave/cli" ) diff --git a/remotes/docker/auth/fetch.go b/core/remotes/docker/auth/fetch.go similarity index 98% rename from remotes/docker/auth/fetch.go rename to core/remotes/docker/auth/fetch.go index b912e40a5..007afe424 100644 --- a/remotes/docker/auth/fetch.go +++ b/core/remotes/docker/auth/fetch.go @@ -26,7 +26,7 @@ import ( "strings" "time" - remoteserrors "github.com/containerd/containerd/v2/remotes/errors" + remoteserrors "github.com/containerd/containerd/v2/core/remotes/errors" "github.com/containerd/containerd/v2/version" "github.com/containerd/log" ) diff --git a/remotes/docker/auth/fetch_test.go b/core/remotes/docker/auth/fetch_test.go similarity index 100% rename from remotes/docker/auth/fetch_test.go rename to core/remotes/docker/auth/fetch_test.go diff --git a/remotes/docker/auth/parse.go b/core/remotes/docker/auth/parse.go similarity index 100% rename from remotes/docker/auth/parse.go rename to core/remotes/docker/auth/parse.go diff --git a/remotes/docker/auth/parse_test.go b/core/remotes/docker/auth/parse_test.go similarity index 100% rename from remotes/docker/auth/parse_test.go rename to core/remotes/docker/auth/parse_test.go diff --git a/remotes/docker/authorizer.go b/core/remotes/docker/authorizer.go similarity index 98% rename from remotes/docker/authorizer.go rename to core/remotes/docker/authorizer.go index 7885db4c1..3cc72b1e4 100644 --- a/remotes/docker/authorizer.go +++ b/core/remotes/docker/authorizer.go @@ -25,9 +25,9 @@ import ( "strings" "sync" + "github.com/containerd/containerd/v2/core/remotes/docker/auth" + remoteerrors "github.com/containerd/containerd/v2/core/remotes/errors" "github.com/containerd/containerd/v2/errdefs" - "github.com/containerd/containerd/v2/remotes/docker/auth" - remoteerrors "github.com/containerd/containerd/v2/remotes/errors" "github.com/containerd/log" ) diff --git a/remotes/docker/config/config_unix.go b/core/remotes/docker/config/config_unix.go similarity index 100% rename from remotes/docker/config/config_unix.go rename to core/remotes/docker/config/config_unix.go diff --git a/remotes/docker/config/config_windows.go b/core/remotes/docker/config/config_windows.go similarity index 100% rename from remotes/docker/config/config_windows.go rename to core/remotes/docker/config/config_windows.go diff --git a/remotes/docker/config/docker_fuzzer_internal.go b/core/remotes/docker/config/docker_fuzzer_internal.go similarity index 100% rename from remotes/docker/config/docker_fuzzer_internal.go rename to core/remotes/docker/config/docker_fuzzer_internal.go diff --git a/remotes/docker/config/hosts.go b/core/remotes/docker/config/hosts.go similarity index 99% rename from remotes/docker/config/hosts.go rename to core/remotes/docker/config/hosts.go index 8abb0213c..152f035d8 100644 --- a/remotes/docker/config/hosts.go +++ b/core/remotes/docker/config/hosts.go @@ -30,8 +30,8 @@ import ( "strings" "time" + "github.com/containerd/containerd/v2/core/remotes/docker" "github.com/containerd/containerd/v2/errdefs" - "github.com/containerd/containerd/v2/remotes/docker" "github.com/containerd/log" "github.com/pelletier/go-toml/v2" tomlu "github.com/pelletier/go-toml/v2/unstable" diff --git a/remotes/docker/config/hosts_test.go b/core/remotes/docker/config/hosts_test.go similarity index 99% rename from remotes/docker/config/hosts_test.go rename to core/remotes/docker/config/hosts_test.go index 801677e53..94b8d973e 100644 --- a/remotes/docker/config/hosts_test.go +++ b/core/remotes/docker/config/hosts_test.go @@ -26,7 +26,7 @@ import ( "path/filepath" "testing" - "github.com/containerd/containerd/v2/remotes/docker" + "github.com/containerd/containerd/v2/core/remotes/docker" "github.com/containerd/log/logtest" ) diff --git a/remotes/docker/converter.go b/core/remotes/docker/converter.go similarity index 98% rename from remotes/docker/converter.go rename to core/remotes/docker/converter.go index 95163ded3..f21103e17 100644 --- a/remotes/docker/converter.go +++ b/core/remotes/docker/converter.go @@ -24,7 +24,7 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/images" - "github.com/containerd/containerd/v2/remotes" + "github.com/containerd/containerd/v2/core/remotes" "github.com/containerd/log" digest "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/remotes/docker/converter_fuzz.go b/core/remotes/docker/converter_fuzz.go similarity index 100% rename from remotes/docker/converter_fuzz.go rename to core/remotes/docker/converter_fuzz.go diff --git a/remotes/docker/errcode.go b/core/remotes/docker/errcode.go similarity index 100% rename from remotes/docker/errcode.go rename to core/remotes/docker/errcode.go diff --git a/remotes/docker/errdesc.go b/core/remotes/docker/errdesc.go similarity index 100% rename from remotes/docker/errdesc.go rename to core/remotes/docker/errdesc.go diff --git a/remotes/docker/fetcher.go b/core/remotes/docker/fetcher.go similarity index 99% rename from remotes/docker/fetcher.go rename to core/remotes/docker/fetcher.go index 2ab1c3374..4335a6ab0 100644 --- a/remotes/docker/fetcher.go +++ b/core/remotes/docker/fetcher.go @@ -29,8 +29,8 @@ import ( "strings" "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/remotes" "github.com/containerd/containerd/v2/errdefs" - "github.com/containerd/containerd/v2/remotes" "github.com/containerd/log" "github.com/klauspost/compress/zstd" digest "github.com/opencontainers/go-digest" diff --git a/remotes/docker/fetcher_fuzz.go b/core/remotes/docker/fetcher_fuzz.go similarity index 100% rename from remotes/docker/fetcher_fuzz.go rename to core/remotes/docker/fetcher_fuzz.go diff --git a/remotes/docker/fetcher_test.go b/core/remotes/docker/fetcher_test.go similarity index 100% rename from remotes/docker/fetcher_test.go rename to core/remotes/docker/fetcher_test.go diff --git a/remotes/docker/handler.go b/core/remotes/docker/handler.go similarity index 100% rename from remotes/docker/handler.go rename to core/remotes/docker/handler.go diff --git a/remotes/docker/handler_test.go b/core/remotes/docker/handler_test.go similarity index 100% rename from remotes/docker/handler_test.go rename to core/remotes/docker/handler_test.go diff --git a/remotes/docker/httpreadseeker.go b/core/remotes/docker/httpreadseeker.go similarity index 100% rename from remotes/docker/httpreadseeker.go rename to core/remotes/docker/httpreadseeker.go diff --git a/remotes/docker/pusher.go b/core/remotes/docker/pusher.go similarity index 99% rename from remotes/docker/pusher.go rename to core/remotes/docker/pusher.go index 39e12a337..065677373 100644 --- a/remotes/docker/pusher.go +++ b/core/remotes/docker/pusher.go @@ -30,9 +30,9 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/remotes" + remoteserrors "github.com/containerd/containerd/v2/core/remotes/errors" "github.com/containerd/containerd/v2/errdefs" - "github.com/containerd/containerd/v2/remotes" - remoteserrors "github.com/containerd/containerd/v2/remotes/errors" "github.com/containerd/log" digest "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/remotes/docker/pusher_test.go b/core/remotes/docker/pusher_test.go similarity index 99% rename from remotes/docker/pusher_test.go rename to core/remotes/docker/pusher_test.go index 29b9e3a04..9751b59a6 100644 --- a/remotes/docker/pusher_test.go +++ b/core/remotes/docker/pusher_test.go @@ -30,9 +30,9 @@ import ( "testing" "github.com/containerd/containerd/v2/core/content" + "github.com/containerd/containerd/v2/core/remotes" "github.com/containerd/containerd/v2/errdefs" "github.com/containerd/containerd/v2/reference" - "github.com/containerd/containerd/v2/remotes" "github.com/containerd/log/logtest" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/remotes/docker/registry.go b/core/remotes/docker/registry.go similarity index 100% rename from remotes/docker/registry.go rename to core/remotes/docker/registry.go diff --git a/remotes/docker/registry_test.go b/core/remotes/docker/registry_test.go similarity index 100% rename from remotes/docker/registry_test.go rename to core/remotes/docker/registry_test.go diff --git a/remotes/docker/resolver.go b/core/remotes/docker/resolver.go similarity index 98% rename from remotes/docker/resolver.go rename to core/remotes/docker/resolver.go index a91584070..5dc502f71 100644 --- a/remotes/docker/resolver.go +++ b/core/remotes/docker/resolver.go @@ -29,11 +29,11 @@ import ( "strings" "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/remotes" + "github.com/containerd/containerd/v2/core/remotes/docker/schema1" //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility. + remoteerrors "github.com/containerd/containerd/v2/core/remotes/errors" "github.com/containerd/containerd/v2/errdefs" "github.com/containerd/containerd/v2/reference" - "github.com/containerd/containerd/v2/remotes" - "github.com/containerd/containerd/v2/remotes/docker/schema1" //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility. - remoteerrors "github.com/containerd/containerd/v2/remotes/errors" "github.com/containerd/containerd/v2/tracing" "github.com/containerd/containerd/v2/version" "github.com/containerd/log" diff --git a/remotes/docker/resolver_test.go b/core/remotes/docker/resolver_test.go similarity index 99% rename from remotes/docker/resolver_test.go rename to core/remotes/docker/resolver_test.go index 7a12072c5..82a581b36 100644 --- a/remotes/docker/resolver_test.go +++ b/core/remotes/docker/resolver_test.go @@ -32,10 +32,10 @@ import ( "testing" "time" + "github.com/containerd/containerd/v2/core/remotes" + "github.com/containerd/containerd/v2/core/remotes/docker/auth" + remoteerrors "github.com/containerd/containerd/v2/core/remotes/errors" "github.com/containerd/containerd/v2/errdefs" - "github.com/containerd/containerd/v2/remotes" - "github.com/containerd/containerd/v2/remotes/docker/auth" - remoteerrors "github.com/containerd/containerd/v2/remotes/errors" digest "github.com/opencontainers/go-digest" specs "github.com/opencontainers/image-spec/specs-go" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/remotes/docker/schema1/converter.go b/core/remotes/docker/schema1/converter.go similarity index 99% rename from remotes/docker/schema1/converter.go rename to core/remotes/docker/schema1/converter.go index 86f86a60d..3a4d9a5a2 100644 --- a/remotes/docker/schema1/converter.go +++ b/core/remotes/docker/schema1/converter.go @@ -35,9 +35,9 @@ import ( "github.com/containerd/containerd/v2/archive/compression" "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/remotes" "github.com/containerd/containerd/v2/errdefs" "github.com/containerd/containerd/v2/labels" - "github.com/containerd/containerd/v2/remotes" "github.com/containerd/log" digest "github.com/opencontainers/go-digest" specs "github.com/opencontainers/image-spec/specs-go" diff --git a/remotes/docker/scope.go b/core/remotes/docker/scope.go similarity index 100% rename from remotes/docker/scope.go rename to core/remotes/docker/scope.go diff --git a/remotes/docker/scope_test.go b/core/remotes/docker/scope_test.go similarity index 100% rename from remotes/docker/scope_test.go rename to core/remotes/docker/scope_test.go diff --git a/remotes/docker/status.go b/core/remotes/docker/status.go similarity index 100% rename from remotes/docker/status.go rename to core/remotes/docker/status.go diff --git a/remotes/errors/errors.go b/core/remotes/errors/errors.go similarity index 100% rename from remotes/errors/errors.go rename to core/remotes/errors/errors.go diff --git a/remotes/handlers.go b/core/remotes/handlers.go similarity index 100% rename from remotes/handlers.go rename to core/remotes/handlers.go diff --git a/remotes/handlers_test.go b/core/remotes/handlers_test.go similarity index 100% rename from remotes/handlers_test.go rename to core/remotes/handlers_test.go diff --git a/remotes/resolver.go b/core/remotes/resolver.go similarity index 100% rename from remotes/resolver.go rename to core/remotes/resolver.go diff --git a/pkg/cri/server/images/image_pull.go b/pkg/cri/server/images/image_pull.go index 4c8eb8efe..cbab7ef67 100644 --- a/pkg/cri/server/images/image_pull.go +++ b/pkg/cri/server/images/image_pull.go @@ -42,13 +42,13 @@ import ( containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/containerd/v2/core/diff" containerdimages "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/remotes/docker" + "github.com/containerd/containerd/v2/core/remotes/docker/config" "github.com/containerd/containerd/v2/errdefs" "github.com/containerd/containerd/v2/pkg/cri/annotations" criconfig "github.com/containerd/containerd/v2/pkg/cri/config" crilabels "github.com/containerd/containerd/v2/pkg/cri/labels" snpkg "github.com/containerd/containerd/v2/pkg/snapshotters" - "github.com/containerd/containerd/v2/remotes/docker" - "github.com/containerd/containerd/v2/remotes/docker/config" "github.com/containerd/containerd/v2/tracing" ) diff --git a/pkg/transfer/image/imagestore.go b/pkg/transfer/image/imagestore.go index 1109b07fe..9eb4a3e16 100644 --- a/pkg/transfer/image/imagestore.go +++ b/pkg/transfer/image/imagestore.go @@ -28,12 +28,12 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/images" "github.com/containerd/containerd/v2/core/images/archive" + "github.com/containerd/containerd/v2/core/remotes" "github.com/containerd/containerd/v2/errdefs" "github.com/containerd/containerd/v2/pkg/streaming" "github.com/containerd/containerd/v2/pkg/transfer" "github.com/containerd/containerd/v2/pkg/transfer/plugins" "github.com/containerd/containerd/v2/platforms" - "github.com/containerd/containerd/v2/remotes" ) func init() { diff --git a/pkg/transfer/local/progress.go b/pkg/transfer/local/progress.go index a130e7f54..d156c6abe 100644 --- a/pkg/transfer/local/progress.go +++ b/pkg/transfer/local/progress.go @@ -23,8 +23,8 @@ import ( "time" "github.com/containerd/containerd/v2/core/content" + "github.com/containerd/containerd/v2/core/remotes" "github.com/containerd/containerd/v2/pkg/transfer" - "github.com/containerd/containerd/v2/remotes" "github.com/containerd/log" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/pkg/transfer/local/pull.go b/pkg/transfer/local/pull.go index 6f0a2d410..f2fb5ca8e 100644 --- a/pkg/transfer/local/pull.go +++ b/pkg/transfer/local/pull.go @@ -22,12 +22,12 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/remotes" + "github.com/containerd/containerd/v2/core/remotes/docker" "github.com/containerd/containerd/v2/defaults" "github.com/containerd/containerd/v2/errdefs" "github.com/containerd/containerd/v2/pkg/transfer" "github.com/containerd/containerd/v2/pkg/unpack" - "github.com/containerd/containerd/v2/remotes" - "github.com/containerd/containerd/v2/remotes/docker" "github.com/containerd/log" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/sirupsen/logrus" diff --git a/pkg/transfer/local/push.go b/pkg/transfer/local/push.go index c39c8ad2b..fce8ede44 100644 --- a/pkg/transfer/local/push.go +++ b/pkg/transfer/local/push.go @@ -24,10 +24,10 @@ import ( "github.com/containerd/containerd/v2/core/content" "github.com/containerd/containerd/v2/core/images" + "github.com/containerd/containerd/v2/core/remotes" "github.com/containerd/containerd/v2/errdefs" "github.com/containerd/containerd/v2/pkg/transfer" "github.com/containerd/containerd/v2/platforms" - "github.com/containerd/containerd/v2/remotes" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/pkg/transfer/registry/registry.go b/pkg/transfer/registry/registry.go index db0a5d554..26a245bf4 100644 --- a/pkg/transfer/registry/registry.go +++ b/pkg/transfer/registry/registry.go @@ -26,12 +26,12 @@ import ( "sync" transfertypes "github.com/containerd/containerd/v2/api/types/transfer" + "github.com/containerd/containerd/v2/core/remotes" + "github.com/containerd/containerd/v2/core/remotes/docker" "github.com/containerd/containerd/v2/pkg/streaming" "github.com/containerd/containerd/v2/pkg/transfer" "github.com/containerd/containerd/v2/pkg/transfer/plugins" tstreaming "github.com/containerd/containerd/v2/pkg/transfer/streaming" - "github.com/containerd/containerd/v2/remotes" - "github.com/containerd/containerd/v2/remotes/docker" "github.com/containerd/log" "github.com/containerd/typeurl/v2" ocispec "github.com/opencontainers/image-spec/specs-go/v1"