diff --git a/common/go.mod b/common/go.mod index 0e41a54492..4313330d29 100644 --- a/common/go.mod +++ b/common/go.mod @@ -22,7 +22,7 @@ require ( github.com/onsi/ginkgo v1.16.5 github.com/onsi/gomega v1.17.0 github.com/opencontainers/go-digest v1.0.0 - github.com/opencontainers/image-spec v1.0.2-0.20210819154149-5ad6f50d6283 + github.com/opencontainers/image-spec v1.0.2-0.20211123152302-43a7dee1ec31 github.com/opencontainers/runc v1.0.2 github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 github.com/opencontainers/runtime-tools v0.9.0 diff --git a/common/go.sum b/common/go.sum index 80f2c5129e..74aefded50 100644 --- a/common/go.sum +++ b/common/go.sum @@ -655,6 +655,8 @@ github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zM github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.2-0.20210819154149-5ad6f50d6283 h1:TVzvdjOalkJBNkbpPVMAr4KV9QRf2IjfxdyxwAK78Gs= github.com/opencontainers/image-spec v1.0.2-0.20210819154149-5ad6f50d6283/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.2-0.20211123152302-43a7dee1ec31 h1:Wh4aR2I6JFwySre9m3iHJYuMnvUFE/HT6qAXozRWi/E= +github.com/opencontainers/image-spec v1.0.2-0.20211123152302-43a7dee1ec31/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= diff --git a/common/pkg/manifests/manifests.go b/common/pkg/manifests/manifests.go index ea9495ee73..5c2836893a 100644 --- a/common/pkg/manifests/manifests.go +++ b/common/pkg/manifests/manifests.go @@ -74,6 +74,7 @@ func Create() List { }, oci: v1.Index{ Versioned: imgspec.Versioned{SchemaVersion: 2}, + MediaType: v1.MediaTypeImageIndex, }, } } @@ -373,6 +374,7 @@ func FromBlob(manifestBytes []byte) (List, error) { }, oci: v1.Index{ Versioned: imgspec.Versioned{SchemaVersion: 2}, + MediaType: v1.MediaTypeImageIndex, }, } switch manifestType { diff --git a/common/pkg/supplemented/supplemented_test.go b/common/pkg/supplemented/supplemented_test.go index b75f05ed1b..ecedc58dd3 100644 --- a/common/pkg/supplemented/supplemented_test.go +++ b/common/pkg/supplemented/supplemented_test.go @@ -88,6 +88,7 @@ func makeManifest(layer, config []byte) v1.Manifest { Versioned: specs.Versioned{ SchemaVersion: 2, }, + MediaType: v1.MediaTypeImageManifest, Config: v1.Descriptor{ MediaType: v1.MediaTypeImageConfig, Digest: digest.Canonical.FromBytes(config), @@ -182,6 +183,7 @@ func TestSupplemented(t *testing.T) { Versioned: specs.Versioned{ SchemaVersion: 2, }, + MediaType: v1.MediaTypeImageIndex, Manifests: []v1.Descriptor{ { MediaType: v1.MediaTypeImageManifest, diff --git a/common/vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go b/common/vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go index 4e6c4b2362..82da6c6a89 100644 --- a/common/vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go +++ b/common/vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go @@ -21,6 +21,9 @@ import "github.com/opencontainers/image-spec/specs-go" type Index struct { specs.Versioned + // MediaType specificies the type of this document data structure e.g. `application/vnd.oci.image.index.v1+json` + MediaType string `json:"mediaType,omitempty"` + // Manifests references platform specific manifests. Manifests []Descriptor `json:"manifests"` diff --git a/common/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go b/common/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go index 7ff32c40ba..d72d15ce4b 100644 --- a/common/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go +++ b/common/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go @@ -20,6 +20,9 @@ import "github.com/opencontainers/image-spec/specs-go" type Manifest struct { specs.Versioned + // MediaType specificies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json` + MediaType string `json:"mediaType,omitempty"` + // Config references a configuration object for a container, by digest. // The referenced configuration object is a JSON blob that the runtime uses to set up the container. Config Descriptor `json:"config"` diff --git a/common/vendor/github.com/opencontainers/image-spec/specs-go/version.go b/common/vendor/github.com/opencontainers/image-spec/specs-go/version.go index 58f1095ab0..31f99cf645 100644 --- a/common/vendor/github.com/opencontainers/image-spec/specs-go/version.go +++ b/common/vendor/github.com/opencontainers/image-spec/specs-go/version.go @@ -22,7 +22,7 @@ const ( // VersionMinor is for functionality in a backwards-compatible manner VersionMinor = 0 // VersionPatch is for backwards-compatible bug fixes - VersionPatch = 1 + VersionPatch = 2 // VersionDev indicates development branch. Releases will be empty string. VersionDev = "-dev" diff --git a/common/vendor/modules.txt b/common/vendor/modules.txt index d30677aa80..f2b10cf9f2 100644 --- a/common/vendor/modules.txt +++ b/common/vendor/modules.txt @@ -340,7 +340,7 @@ github.com/onsi/gomega/types # github.com/opencontainers/go-digest v1.0.0 ## explicit github.com/opencontainers/go-digest -# github.com/opencontainers/image-spec v1.0.2-0.20210819154149-5ad6f50d6283 +# github.com/opencontainers/image-spec v1.0.2-0.20211123152302-43a7dee1ec31 ## explicit github.com/opencontainers/image-spec/specs-go github.com/opencontainers/image-spec/specs-go/v1