Skip to content

Commit

Permalink
Merge pull request containerd#9662 from dmcgowan/replace-platform-pac…
Browse files Browse the repository at this point in the history
…kage

Use github.com/containerd/platforms package
  • Loading branch information
dmcgowan authored Jan 23, 2024
2 parents 8e1578e + e79ec7a commit f276561
Show file tree
Hide file tree
Showing 102 changed files with 335 additions and 1,464 deletions.
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ import (
"github.com/containerd/containerd/v2/pkg/errdefs"
"github.com/containerd/containerd/v2/pkg/events"
"github.com/containerd/containerd/v2/pkg/namespaces"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/containerd/v2/plugins"
"github.com/containerd/containerd/v2/plugins/services/introspection"
ptypes "github.com/containerd/containerd/v2/protobuf/types"
"github.com/containerd/platforms"
"github.com/containerd/typeurl/v2"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/opencontainers/runtime-spec/specs-go"
Expand Down
2 changes: 1 addition & 1 deletion client/client_opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/core/remotes"
"github.com/containerd/containerd/v2/core/snapshots"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/platforms"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"

"google.golang.org/grpc"
Expand Down
2 changes: 1 addition & 1 deletion client/container_checkpoint_opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/core/runtime/v2/runc/options"
"github.com/containerd/containerd/v2/pkg/rootfs"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/containerd/v2/protobuf"
"github.com/containerd/containerd/v2/protobuf/proto"
"github.com/containerd/platforms"
"github.com/opencontainers/go-digest"
imagespec "github.com/opencontainers/image-spec/specs-go/v1"
)
Expand Down
2 changes: 1 addition & 1 deletion client/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"github.com/containerd/containerd/v2/pkg/errdefs"
"github.com/containerd/containerd/v2/pkg/labels"
"github.com/containerd/containerd/v2/pkg/rootfs"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/platforms"
"github.com/opencontainers/go-digest"
"github.com/opencontainers/image-spec/identity"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
Expand Down
2 changes: 1 addition & 1 deletion client/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/core/images/archive"
"github.com/containerd/containerd/v2/pkg/errdefs"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/platforms"
digest "github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)
Expand Down
2 changes: 1 addition & 1 deletion client/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"github.com/containerd/containerd/v2/pkg/errdefs"
"github.com/containerd/containerd/v2/pkg/tracing"
"github.com/containerd/containerd/v2/pkg/unpack"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/platforms"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cmd/containerd/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ import (
"github.com/containerd/containerd/v2/pkg/dialer"
"github.com/containerd/containerd/v2/pkg/sys"
"github.com/containerd/containerd/v2/pkg/timeout"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/containerd/v2/plugins"
"github.com/containerd/containerd/v2/plugins/content/local"
"github.com/containerd/containerd/v2/plugins/services/warning"
"github.com/containerd/platforms"
"github.com/containerd/plugin"
"github.com/containerd/plugin/dynamic"
"github.com/containerd/plugin/registry"
Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/commands/content/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import (
"github.com/containerd/containerd/v2/core/remotes"
"github.com/containerd/containerd/v2/pkg/errdefs"
"github.com/containerd/containerd/v2/pkg/progress"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/log"
"github.com/containerd/platforms"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/urfave/cli"
Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/commands/images/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/containerd/containerd/v2/cmd/ctr/commands"
"github.com/containerd/containerd/v2/core/images/converter"
"github.com/containerd/containerd/v2/core/images/converter/uncompress"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/platforms"
"github.com/urfave/cli"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/commands/images/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"github.com/containerd/containerd/v2/pkg/transfer"
tarchive "github.com/containerd/containerd/v2/pkg/transfer/archive"
"github.com/containerd/containerd/v2/pkg/transfer/image"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/platforms"
)

var exportCommand = cli.Command{
Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/commands/images/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/pkg/errdefs"
"github.com/containerd/containerd/v2/pkg/progress"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/log"
"github.com/containerd/platforms"
"github.com/urfave/cli"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/commands/images/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
"github.com/containerd/containerd/v2/pkg/transfer"
tarchive "github.com/containerd/containerd/v2/pkg/transfer/archive"
"github.com/containerd/containerd/v2/pkg/transfer/image"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/log"
"github.com/containerd/platforms"
)

var importCommand = cli.Command{
Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/commands/images/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/containerd/containerd/v2/core/mount"
"github.com/containerd/containerd/v2/defaults"
"github.com/containerd/containerd/v2/pkg/errdefs"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/platforms"
"github.com/opencontainers/image-spec/identity"
"github.com/urfave/cli"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/commands/images/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import (
"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/log"
"github.com/containerd/platforms"
"github.com/opencontainers/image-spec/identity"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/urfave/cli"
Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/commands/images/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ import (
"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/log"
"github.com/containerd/platforms"
digest "github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/urfave/cli"
Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/commands/oci/oci.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/containerd/containerd/v2/cmd/ctr/commands"
"github.com/containerd/containerd/v2/core/containers"
"github.com/containerd/containerd/v2/pkg/oci"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/platforms"
)

// Command is the parent for all OCI related tools under 'oci'
Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/commands/plugins/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

"github.com/containerd/containerd/v2/api/types"
"github.com/containerd/containerd/v2/cmd/ctr/commands"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/platforms"
pluginutils "github.com/containerd/plugin"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/urfave/cli"
Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/commands/run/run_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ import (
"github.com/containerd/containerd/v2/core/snapshots"
"github.com/containerd/containerd/v2/pkg/oci"
runtimeoptions "github.com/containerd/containerd/v2/pkg/runtimeoptions/v1"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/log"
"github.com/containerd/platforms"
"github.com/intel/goresctrl/pkg/blockio"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/urfave/cli"
Expand Down
2 changes: 1 addition & 1 deletion contrib/fuzz/fuzz_images.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

fuzz "github.com/AdaLogics/go-fuzz-headers"
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/containerd/v2/plugins/content/local"
"github.com/containerd/platforms"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion core/images/archive/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import (
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/pkg/errdefs"
"github.com/containerd/containerd/v2/pkg/labels"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/log"
"github.com/containerd/platforms"
digest "github.com/opencontainers/go-digest"
ocispecs "github.com/opencontainers/image-spec/specs-go"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
Expand Down
2 changes: 1 addition & 1 deletion core/images/archive/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import (
"github.com/containerd/containerd/v2/pkg/archive/compression"
"github.com/containerd/containerd/v2/pkg/errdefs"
"github.com/containerd/containerd/v2/pkg/labels"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/log"
"github.com/containerd/platforms"
digest "github.com/opencontainers/go-digest"
specs "github.com/opencontainers/image-spec/specs-go"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
Expand Down
2 changes: 1 addition & 1 deletion core/images/converter/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/core/leases"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/platforms"
)

type convertOpts struct {
Expand Down
2 changes: 1 addition & 1 deletion core/images/converter/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (

"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/log"
"github.com/containerd/platforms"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"golang.org/x/sync/errgroup"
Expand Down
2 changes: 1 addition & 1 deletion core/images/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/pkg/errdefs"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/platforms"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"golang.org/x/sync/errgroup"
"golang.org/x/sync/semaphore"
Expand Down
2 changes: 1 addition & 1 deletion core/images/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (

"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/pkg/errdefs"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/log"
"github.com/containerd/platforms"
digest "github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)
Expand Down
2 changes: 1 addition & 1 deletion core/images/usage/calculator.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/core/snapshots"
"github.com/containerd/containerd/v2/pkg/errdefs"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/platforms"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"

"golang.org/x/sync/semaphore"
Expand Down
2 changes: 1 addition & 1 deletion core/images/usage/calculator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (

"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/core/images/imagetest"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/log/logtest"
"github.com/containerd/platforms"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion core/metrics/cgroups/cgroups.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
v2 "github.com/containerd/containerd/v2/core/metrics/cgroups/v2"
"github.com/containerd/containerd/v2/core/runtime"
"github.com/containerd/containerd/v2/pkg/events"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/containerd/v2/plugins"
"github.com/containerd/platforms"
"github.com/containerd/plugin"
"github.com/containerd/plugin/registry"
metrics "github.com/docker/go-metrics"
Expand Down
2 changes: 1 addition & 1 deletion core/remotes/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (
"github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/pkg/errdefs"
"github.com/containerd/containerd/v2/pkg/labels"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/log"
"github.com/containerd/platforms"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"golang.org/x/sync/semaphore"
)
Expand Down
2 changes: 1 addition & 1 deletion core/runtime/v2/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ import (
"github.com/containerd/containerd/v2/pkg/events/exchange"
"github.com/containerd/containerd/v2/pkg/namespaces"
"github.com/containerd/containerd/v2/pkg/timeout"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/containerd/v2/plugins"
"github.com/containerd/containerd/v2/protobuf"
"github.com/containerd/log"
"github.com/containerd/platforms"
"github.com/containerd/plugin"
"github.com/containerd/plugin/registry"
)
Expand Down
2 changes: 1 addition & 1 deletion core/runtime/v2/manager_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package v2

import (
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/platforms"
)

func defaultPlatforms() []string {
Expand Down
2 changes: 1 addition & 1 deletion core/runtime/v2/manager_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package v2

import (
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/platforms"
)

func defaultPlatforms() []string {
Expand Down
2 changes: 1 addition & 1 deletion core/sandbox/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"github.com/containerd/containerd/v2/api/types"
"github.com/containerd/containerd/v2/core/mount"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/platforms"
"github.com/containerd/typeurl/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion core/sandbox/proxy/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/containerd/containerd/v2/core/mount"
"github.com/containerd/containerd/v2/core/sandbox"
"github.com/containerd/containerd/v2/pkg/errdefs"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/platforms"
"google.golang.org/protobuf/types/known/anypb"
)

Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ require (
github.com/containerd/go-runc v1.1.0
github.com/containerd/log v0.1.0
github.com/containerd/nri v0.5.0
github.com/containerd/platforms v0.1.1
github.com/containerd/plugin v0.0.0-20231101173250-7ec69893e1e7
github.com/containerd/ttrpc v1.2.2
github.com/containerd/typeurl/v2 v2.1.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=
github.com/containerd/nri v0.5.0 h1:bwCtKpi8i5FCA8g8WjIZNod91CEfIloYpV0+TH2prnQ=
github.com/containerd/nri v0.5.0/go.mod h1:qIu2NlP3r/qK4YGnNuQf0De4VPqQWP2i2CVBfAZbGzg=
github.com/containerd/platforms v0.1.1 h1:gp0xXBoY+1CjH54gJDon0kBjIbK2C4XSX1BGwP5ptG0=
github.com/containerd/platforms v0.1.1/go.mod h1:XOM2BS6kN6gXafPLg80V6y/QUib+xoLyC3qVmHzibko=
github.com/containerd/plugin v0.0.0-20231101173250-7ec69893e1e7 h1:MUbtIMHEcMzj+8mPgHd5ett0WVbY/KYHa5tMvFs5Ejs=
github.com/containerd/plugin v0.0.0-20231101173250-7ec69893e1e7/go.mod h1:j6HlpMtkiZMgT4UsfVNxPBUkwdw9KQGU6nCLfRxnq+w=
github.com/containerd/ttrpc v1.2.2 h1:9vqZr0pxwOF5koz6N0N3kJ0zDHokrcPxIR/ZR2YFtOs=
Expand Down
2 changes: 1 addition & 1 deletion integration/build_local_containerd_helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (
srvconfig "github.com/containerd/containerd/v2/cmd/containerd/server/config"
"github.com/containerd/containerd/v2/core/content"
"github.com/containerd/containerd/v2/pkg/cri/constants"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/containerd/v2/plugins"
"github.com/containerd/log/logtest"
"github.com/containerd/platforms"
"github.com/containerd/plugin"
"github.com/opencontainers/go-digest"

Expand Down
2 changes: 1 addition & 1 deletion integration/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ import (
"github.com/containerd/containerd/v2/internal/testutil"
"github.com/containerd/containerd/v2/pkg/errdefs"
"github.com/containerd/containerd/v2/pkg/namespaces"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/log"
"github.com/containerd/platforms"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion integration/client/client_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

. "github.com/containerd/containerd/v2/client"
"github.com/containerd/containerd/v2/integration/images"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/platforms"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion integration/client/container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ import (
"github.com/containerd/containerd/v2/pkg/errdefs"
"github.com/containerd/containerd/v2/pkg/namespaces"
"github.com/containerd/containerd/v2/pkg/oci"
"github.com/containerd/containerd/v2/platforms"
"github.com/containerd/containerd/v2/plugins"
gogotypes "github.com/containerd/containerd/v2/protobuf/types"
"github.com/containerd/continuity/fs"
"github.com/containerd/go-runc"
"github.com/containerd/log/logtest"
"github.com/containerd/platforms"
"github.com/containerd/typeurl/v2"
specs "github.com/opencontainers/runtime-spec/specs-go"
"github.com/stretchr/testify/require"
Expand Down
Loading

0 comments on commit f276561

Please sign in to comment.