Skip to content

Commit 189b69e

Browse files
AkihiroSudadmcgowan
authored andcommitted
go.mod: github.com/opencontainers/image-spec v1.1.0-rc3
Signed-off-by: Akihiro Suda <[email protected]> (cherry picked from commit 4347fc8) Signed-off-by: Derek McGowan <[email protected]>
1 parent 388fb33 commit 189b69e

19 files changed

Lines changed: 64 additions & 82 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ require (
4646
github.com/moby/sys/symlink v0.2.0
4747
github.com/moby/sys/user v0.1.0
4848
github.com/opencontainers/go-digest v1.0.0
49-
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b
49+
github.com/opencontainers/image-spec v1.1.0-rc3
5050
github.com/opencontainers/runtime-spec v1.1.0
5151
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626
5252
github.com/opencontainers/selinux v1.11.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -794,8 +794,8 @@ github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zM
794794
github.com/opencontainers/image-spec v1.0.2-0.20211117181255-693428a734f5/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
795795
github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
796796
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
797-
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b h1:YWuSjZCQAPM8UUBLkYUk1e+rZcvWHJmFb6i6rM44Xs8=
798-
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ=
797+
github.com/opencontainers/image-spec v1.1.0-rc3 h1:fzg1mXZFj8YdPeNkRXMg+zb88BFV0Ys52cJydRwBkb8=
798+
github.com/opencontainers/image-spec v1.1.0-rc3/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8=
799799
github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
800800
github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
801801
github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=

images/converter/default.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,11 @@ func ConvertDockerMediaTypeToOCI(mt string) string {
432432
case images.MediaTypeDockerSchema2LayerGzip:
433433
return ocispec.MediaTypeImageLayerGzip
434434
case images.MediaTypeDockerSchema2LayerForeignGzip:
435-
return ocispec.MediaTypeImageLayerNonDistributableGzip
435+
return ocispec.MediaTypeImageLayerNonDistributableGzip //nolint:staticcheck // deprecated
436436
case images.MediaTypeDockerSchema2Layer:
437437
return ocispec.MediaTypeImageLayer
438438
case images.MediaTypeDockerSchema2LayerForeign:
439-
return ocispec.MediaTypeImageLayerNonDistributable
439+
return ocispec.MediaTypeImageLayerNonDistributable //nolint:staticcheck // deprecated
440440
case images.MediaTypeDockerSchema2Config:
441441
return ocispec.MediaTypeImageConfig
442442
default:

images/converter/uncompress/uncompress.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func IsUncompressedType(mt string) bool {
9999
images.MediaTypeDockerSchema2Layer,
100100
images.MediaTypeDockerSchema2LayerForeign,
101101
ocispec.MediaTypeImageLayer,
102-
ocispec.MediaTypeImageLayerNonDistributable:
102+
ocispec.MediaTypeImageLayerNonDistributable: //nolint:staticcheck // deprecated
103103
return true
104104
default:
105105
return false
@@ -114,8 +114,8 @@ func convertMediaType(mt string) string {
114114
return images.MediaTypeDockerSchema2LayerForeign
115115
case ocispec.MediaTypeImageLayerGzip, ocispec.MediaTypeImageLayerZstd:
116116
return ocispec.MediaTypeImageLayer
117-
case ocispec.MediaTypeImageLayerNonDistributableGzip, ocispec.MediaTypeImageLayerNonDistributableZstd:
118-
return ocispec.MediaTypeImageLayerNonDistributable
117+
case ocispec.MediaTypeImageLayerNonDistributableGzip, ocispec.MediaTypeImageLayerNonDistributableZstd: //nolint:staticcheck // deprecated
118+
return ocispec.MediaTypeImageLayerNonDistributable //nolint:staticcheck // deprecated
119119
default:
120120
return mt
121121
}

images/diffid.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func GetDiffID(ctx context.Context, cs content.Store, desc ocispec.Descriptor) (
3636
MediaTypeDockerSchema2Layer,
3737
ocispec.MediaTypeImageLayer,
3838
MediaTypeDockerSchema2LayerForeign,
39-
ocispec.MediaTypeImageLayerNonDistributable:
39+
ocispec.MediaTypeImageLayerNonDistributable: //nolint:staticcheck // deprecated
4040
return desc.Digest, nil
4141
}
4242
info, err := cs.Info(ctx, desc.Digest)

images/mediatypes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func DiffCompression(ctx context.Context, mediaType string) (string, error) {
8181
return "", nil
8282
}
8383
return "gzip", nil
84-
case ocispec.MediaTypeImageLayer, ocispec.MediaTypeImageLayerNonDistributable:
84+
case ocispec.MediaTypeImageLayer, ocispec.MediaTypeImageLayerNonDistributable: //nolint:staticcheck // Non-distributable layers are deprecated
8585
if len(ext) > 0 {
8686
switch ext[len(ext)-1] {
8787
case "gzip":

integration/client/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ require (
1313
github.com/containerd/ttrpc v1.2.3
1414
github.com/containerd/typeurl/v2 v2.1.1
1515
github.com/opencontainers/go-digest v1.0.0
16-
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b
16+
github.com/opencontainers/image-spec v1.1.0-rc3
1717
github.com/opencontainers/runtime-spec v1.1.0
1818
github.com/stretchr/testify v1.8.4
1919
go.opentelemetry.io/otel v1.19.0

integration/client/go.sum

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1459,8 +1459,9 @@ github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zM
14591459
github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
14601460
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
14611461
github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ=
1462-
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b h1:YWuSjZCQAPM8UUBLkYUk1e+rZcvWHJmFb6i6rM44Xs8=
14631462
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ=
1463+
github.com/opencontainers/image-spec v1.1.0-rc3 h1:fzg1mXZFj8YdPeNkRXMg+zb88BFV0Ys52cJydRwBkb8=
1464+
github.com/opencontainers/image-spec v1.1.0-rc3/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8=
14641465
github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0=
14651466
github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg=
14661467
github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=

integration/client/import_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,9 +491,11 @@ func createContent(size int64, seed int64) ([]byte, digest.Digest) {
491491

492492
func createConfig(osName, archName, author string) ([]byte, digest.Digest) {
493493
image := ocispec.Image{
494-
OS: osName,
495-
Architecture: archName,
496-
Author: author,
494+
Platform: ocispec.Platform{
495+
OS: osName,
496+
Architecture: archName,
497+
},
498+
Author: author,
497499
}
498500
b, _ := json.Marshal(image)
499501

oci/spec_opts.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ func WithImageConfigArgs(image Image, args []string) SpecOpts {
457457
return errors.New("no arguments specified")
458458
}
459459

460+
//nolint:staticcheck // ArgsEscaped is deprecated
460461
if config.ArgsEscaped && (len(config.Entrypoint) > 0 || cmdFromImage) {
461462
s.Process.Args = nil
462463
s.Process.CommandLine = cmd[0]

0 commit comments

Comments
 (0)