Skip to content

Commit 4347fc8

Browse files
committed
go.mod: github.com/opencontainers/image-spec v1.1.0-rc3
Signed-off-by: Akihiro Suda <[email protected]>
1 parent bd18581 commit 4347fc8

19 files changed

Lines changed: 64 additions & 83 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ require (
4444
github.com/moby/sys/signal v0.7.0
4545
github.com/moby/sys/symlink v0.2.0
4646
github.com/opencontainers/go-digest v1.0.0
47-
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b
47+
github.com/opencontainers/image-spec v1.1.0-rc3
4848
github.com/opencontainers/runc v1.1.7
4949
github.com/opencontainers/runtime-spec v1.1.0-rc.2
5050
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,8 +773,8 @@ github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zM
773773
github.com/opencontainers/image-spec v1.0.2-0.20211117181255-693428a734f5/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
774774
github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
775775
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
776-
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b h1:YWuSjZCQAPM8UUBLkYUk1e+rZcvWHJmFb6i6rM44Xs8=
777-
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ=
776+
github.com/opencontainers/image-spec v1.1.0-rc3 h1:fzg1mXZFj8YdPeNkRXMg+zb88BFV0Ys52cJydRwBkb8=
777+
github.com/opencontainers/image-spec v1.1.0-rc3/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8=
778778
github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
779779
github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
780780
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
@@ -37,7 +37,7 @@ func GetDiffID(ctx context.Context, cs content.Store, desc ocispec.Descriptor) (
3737
MediaTypeDockerSchema2Layer,
3838
ocispec.MediaTypeImageLayer,
3939
MediaTypeDockerSchema2LayerForeign,
40-
ocispec.MediaTypeImageLayerNonDistributable:
40+
ocispec.MediaTypeImageLayerNonDistributable: //nolint:staticcheck // deprecated
4141
return desc.Digest, nil
4242
}
4343
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.2
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-rc.2
1818
github.com/stretchr/testify v1.8.2
1919
go.opentelemetry.io/otel v1.14.0

integration/client/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,8 +1175,8 @@ github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zM
11751175
github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
11761176
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
11771177
github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ=
1178-
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b h1:YWuSjZCQAPM8UUBLkYUk1e+rZcvWHJmFb6i6rM44Xs8=
1179-
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ=
1178+
github.com/opencontainers/image-spec v1.1.0-rc3 h1:fzg1mXZFj8YdPeNkRXMg+zb88BFV0Ys52cJydRwBkb8=
1179+
github.com/opencontainers/image-spec v1.1.0-rc3/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8=
11801180
github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0=
11811181
github.com/opencontainers/runc v1.1.2/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc=
11821182
github.com/opencontainers/runc v1.1.7 h1:y2EZDS8sNng4Ksf0GUYNhKbTShZJPJg1FiXJNH/uoCk=

integration/client/import_test.go

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

390390
func createConfig(osName, archName, author string) ([]byte, digest.Digest) {
391391
image := ocispec.Image{
392-
OS: osName,
393-
Architecture: archName,
394-
Author: author,
392+
Platform: ocispec.Platform{
393+
OS: osName,
394+
Architecture: archName,
395+
},
396+
Author: author,
395397
}
396398
b, _ := json.Marshal(image)
397399

oci/spec_opts.go

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

467+
//nolint:staticcheck // ArgsEscaped is deprecated
467468
if config.ArgsEscaped && (len(config.Entrypoint) > 0 || cmdFromImage) {
468469
s.Process.Args = nil
469470
s.Process.CommandLine = cmd[0]

0 commit comments

Comments
 (0)