diff --git a/cmd/ctd-decoder/main.go b/cmd/ctd-decoder/main.go index 175921db..a1ea185d 100644 --- a/cmd/ctd-decoder/main.go +++ b/cmd/ctd-decoder/main.go @@ -21,10 +21,11 @@ import ( "io" "os" - "github.com/containerd/imgcrypt" - "github.com/containerd/imgcrypt/images/encryption" "github.com/containerd/typeurl/v2" + "github.com/containerd/imgcrypt/v2" + "github.com/containerd/imgcrypt/v2/images/encryption" + "github.com/containerd/containerd/v2/pkg/protobuf/proto" "github.com/containerd/containerd/v2/pkg/protobuf/types" "github.com/urfave/cli/v2" diff --git a/cmd/ctr/commands/images/crypt_utils.go b/cmd/ctr/commands/images/crypt_utils.go index 958b62cb..0b5e6715 100644 --- a/cmd/ctr/commands/images/crypt_utils.go +++ b/cmd/ctr/commands/images/crypt_utils.go @@ -24,8 +24,8 @@ import ( containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/containerd/v2/core/images" "github.com/containerd/imgcrypt/cmd/ctr/commands/img" - imgenc "github.com/containerd/imgcrypt/images/encryption" - "github.com/containerd/imgcrypt/images/encryption/parsehelpers" + imgenc "github.com/containerd/imgcrypt/v2/images/encryption" + "github.com/containerd/imgcrypt/v2/images/encryption/parsehelpers" "github.com/containerd/platforms" encconfig "github.com/containers/ocicrypt/config" "github.com/urfave/cli/v2" diff --git a/cmd/ctr/commands/images/decrypt.go b/cmd/ctr/commands/images/decrypt.go index 86fb83b7..203e17db 100644 --- a/cmd/ctr/commands/images/decrypt.go +++ b/cmd/ctr/commands/images/decrypt.go @@ -23,8 +23,9 @@ import ( "github.com/containerd/containerd/v2/cmd/ctr/commands" "github.com/containerd/imgcrypt/cmd/ctr/commands/flags" "github.com/containerd/imgcrypt/cmd/ctr/commands/img" - imgenc "github.com/containerd/imgcrypt/images/encryption" - "github.com/containerd/imgcrypt/images/encryption/parsehelpers" + + imgenc "github.com/containerd/imgcrypt/v2/images/encryption" + "github.com/containerd/imgcrypt/v2/images/encryption/parsehelpers" "github.com/urfave/cli/v2" ) diff --git a/cmd/ctr/commands/images/encrypt.go b/cmd/ctr/commands/images/encrypt.go index 94c3f04d..955e5215 100644 --- a/cmd/ctr/commands/images/encrypt.go +++ b/cmd/ctr/commands/images/encrypt.go @@ -23,7 +23,8 @@ import ( "github.com/containerd/containerd/v2/cmd/ctr/commands" "github.com/containerd/imgcrypt/cmd/ctr/commands/flags" "github.com/containerd/imgcrypt/cmd/ctr/commands/img" - "github.com/containerd/imgcrypt/images/encryption/parsehelpers" + + "github.com/containerd/imgcrypt/v2/images/encryption/parsehelpers" "github.com/urfave/cli/v2" ) diff --git a/cmd/ctr/commands/images/import.go b/cmd/ctr/commands/images/import.go index 5b9ce821..a8e49431 100644 --- a/cmd/ctr/commands/images/import.go +++ b/cmd/ctr/commands/images/import.go @@ -25,13 +25,14 @@ import ( containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/containerd/v2/cmd/ctr/commands" "github.com/containerd/containerd/v2/core/images/archive" - "github.com/containerd/imgcrypt" "github.com/containerd/imgcrypt/cmd/ctr/commands/flags" - "github.com/containerd/imgcrypt/images/encryption" - "github.com/containerd/imgcrypt/images/encryption/parsehelpers" "github.com/containerd/log" "github.com/containerd/platforms" "github.com/urfave/cli/v2" + + "github.com/containerd/imgcrypt/v2" + "github.com/containerd/imgcrypt/v2/images/encryption" + "github.com/containerd/imgcrypt/v2/images/encryption/parsehelpers" ) var importCommand = cli.Command{ diff --git a/cmd/ctr/commands/images/layerinfo.go b/cmd/ctr/commands/images/layerinfo.go index 5232497d..bb1984e0 100644 --- a/cmd/ctr/commands/images/layerinfo.go +++ b/cmd/ctr/commands/images/layerinfo.go @@ -26,10 +26,11 @@ import ( "github.com/containerd/containerd/v2/cmd/ctr/commands" "github.com/containerd/imgcrypt/cmd/ctr/commands/img" - "github.com/containerd/imgcrypt/images/encryption/parsehelpers" "github.com/containerd/platforms" "github.com/containers/ocicrypt" + "github.com/containerd/imgcrypt/v2/images/encryption/parsehelpers" + "github.com/urfave/cli/v2" ) diff --git a/cmd/ctr/commands/images/pull.go b/cmd/ctr/commands/images/pull.go index 1c2fb1ab..1ce923d3 100644 --- a/cmd/ctr/commands/images/pull.go +++ b/cmd/ctr/commands/images/pull.go @@ -24,13 +24,14 @@ 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/imgcrypt" "github.com/containerd/imgcrypt/cmd/ctr/commands/flags" - "github.com/containerd/imgcrypt/images/encryption" - "github.com/containerd/imgcrypt/images/encryption/parsehelpers" "github.com/containerd/log" "github.com/containerd/platforms" + "github.com/containerd/imgcrypt/v2" + "github.com/containerd/imgcrypt/v2/images/encryption" + "github.com/containerd/imgcrypt/v2/images/encryption/parsehelpers" + "github.com/opencontainers/image-spec/identity" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/urfave/cli/v2" diff --git a/cmd/ctr/commands/run/run_unix.go b/cmd/ctr/commands/run/run_unix.go index 2790b43e..adc996f1 100644 --- a/cmd/ctr/commands/run/run_unix.go +++ b/cmd/ctr/commands/run/run_unix.go @@ -37,11 +37,12 @@ import ( "github.com/containerd/containerd/v2/core/containers" "github.com/containerd/containerd/v2/core/snapshots" "github.com/containerd/containerd/v2/pkg/oci" - "github.com/containerd/imgcrypt" - "github.com/containerd/imgcrypt/images/encryption" - "github.com/containerd/imgcrypt/images/encryption/parsehelpers" "github.com/containerd/platforms" + "github.com/containerd/imgcrypt/v2" + "github.com/containerd/imgcrypt/v2/images/encryption" + "github.com/containerd/imgcrypt/v2/images/encryption/parsehelpers" + "github.com/containerd/imgcrypt/cmd/ctr/commands" "github.com/containerd/imgcrypt/cmd/ctr/commands/images" diff --git a/cmd/ctr/commands/run/run_windows.go b/cmd/ctr/commands/run/run_windows.go index d17d7edd..d9787490 100644 --- a/cmd/ctr/commands/run/run_windows.go +++ b/cmd/ctr/commands/run/run_windows.go @@ -25,11 +25,11 @@ import ( containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/containerd/v2/pkg/netns" "github.com/containerd/containerd/v2/pkg/oci" - "github.com/containerd/imgcrypt" "github.com/containerd/imgcrypt/cmd/ctr/commands" "github.com/containerd/imgcrypt/cmd/ctr/commands/images" - "github.com/containerd/imgcrypt/images/encryption" - "github.com/containerd/imgcrypt/images/encryption/parsehelpers" + "github.com/containerd/imgcrypt/v2" + "github.com/containerd/imgcrypt/v2/images/encryption" + "github.com/containerd/imgcrypt/v2/images/encryption/parsehelpers" specs "github.com/opencontainers/runtime-spec/specs-go" "github.com/sirupsen/logrus" diff --git a/cmd/go.mod b/cmd/go.mod index bfd67a2b..7f971678 100644 --- a/cmd/go.mod +++ b/cmd/go.mod @@ -10,7 +10,7 @@ require ( github.com/containerd/containerd/v2 v2.0.0-rc.6 github.com/containerd/errdefs v0.3.0 github.com/containerd/go-cni v1.1.10 - github.com/containerd/imgcrypt v1.2.0-rc1 + github.com/containerd/imgcrypt/v2 v2.0.0 github.com/containerd/log v0.1.0 github.com/containerd/platforms v0.2.1 github.com/containerd/typeurl/v2 v2.2.0 @@ -92,4 +92,4 @@ require ( tags.cncf.io/container-device-interface/specs-go v0.8.0 // indirect ) -replace github.com/containerd/imgcrypt => ../ +replace github.com/containerd/imgcrypt/v2 => ../ diff --git a/go.mod b/go.mod index ffd914bd..1f50d55b 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/containerd/imgcrypt +module github.com/containerd/imgcrypt/v2 go 1.22.0 diff --git a/images/encryption/client.go b/images/encryption/client.go index 634ef01d..72a02ecc 100644 --- a/images/encryption/client.go +++ b/images/encryption/client.go @@ -24,9 +24,10 @@ import ( "github.com/containerd/containerd/v2/core/containers" "github.com/containerd/containerd/v2/core/diff" "github.com/containerd/errdefs" - "github.com/containerd/imgcrypt" "github.com/containerd/typeurl/v2" + "github.com/containerd/imgcrypt/v2" + encconfig "github.com/containers/ocicrypt/config" ocispec "github.com/opencontainers/image-spec/specs-go/v1" )