From 24397e716978983a67ea5f9fbf569ab588e74ce8 Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Wed, 22 Feb 2017 00:52:35 -0800 Subject: [PATCH] vendor: update oci image spec dependency Signed-off-by: Stephen J Day --- vendor.conf | 2 +- .../opencontainers/image-spec/README.md | 7 +++++-- .../image-spec/specs-go/v1/config.go | 11 +++++++---- .../image-spec/specs-go/v1/descriptor.go | 12 +++++++++--- .../v1/{manifest_list.go => image_index.go} | 7 ++++--- .../image-spec/specs-go/v1/layout.go | 15 ++++++--------- .../image-spec/specs-go/v1/manifest.go | 4 ++-- .../image-spec/specs-go/v1/mediatype.go | 17 +++++++++++++---- .../image-spec/specs-go/version.go | 2 +- .../image-spec/specs-go/versioned.go | 3 --- 10 files changed, 48 insertions(+), 32 deletions(-) rename vendor/github.com/opencontainers/image-spec/specs-go/v1/{manifest_list.go => image_index.go} (89%) diff --git a/vendor.conf b/vendor.conf index e077760..a20102a 100644 --- a/vendor.conf +++ b/vendor.conf @@ -55,7 +55,7 @@ github.com/opencontainers/go-digest 21dfd564fd89c944783d00d069f33e3e7123c448 # sys/unix; master as of 1/12/2017 golang.org/x/sys/unix d75a52659825e75fff6158388dddc6a5b04f9ba5 # image-spec master as of 1/17/2017 -github.com/opencontainers/image-spec 0ff14aabcda3b2ee62621174f1b29fc157bdf335 +github.com/opencontainers/image-spec a431dbcf6a74fca2e0e040b819a836dbe3fb23ca # continuity master as of 2/1/2017 github.com/stevvooe/continuity 1530f13d23b34e2ccaf33881fefecc7e28e3577b # sync master as of 12/5/2016 diff --git a/vendor/github.com/opencontainers/image-spec/README.md b/vendor/github.com/opencontainers/image-spec/README.md index e0f7816..c63d8b7 100644 --- a/vendor/github.com/opencontainers/image-spec/README.md +++ b/vendor/github.com/opencontainers/image-spec/README.md @@ -9,6 +9,9 @@ The OCI Image Format project creates and maintains the software shipping contain The specification can be found [here](spec.md). +This repository also provides [Go types](specs-go), [intra-blob validation tooling, and JSON Schema](schema). +The Go types and validation should be compatible with the current Go release; earlier Go releases are not supported. + Additional documentation about how this group operates: - [Code of Conduct](https://github.com/opencontainers/tob/blob/d2f9d68c1332870e40693fe077d311e0742bc73d/code-of-conduct.md) @@ -16,7 +19,7 @@ Additional documentation about how this group operates: - [Releases](RELEASES.md) - [Project Documentation](project.md) -The _optional_ and _base_ layers of all OCI projects are tracked in the [OCI Scope Table](https://www.opencontainers.org/governance/oci-scope-table). +The _optional_ and _base_ layers of all OCI projects are tracked in the [OCI Scope Table](https://www.opencontainers.org/about/oci-scope-table). ## Running an OCI Image @@ -36,7 +39,7 @@ To support this UX the OCI Image Format contains sufficient information to launc **Q: Why doesn't this project mention distribution?** -A: Distribution, for example using HTTP as both Docker v2.2 and AppC do today, is currently out of scope on the [OCI Scope Table](https://www.opencontainers.org/governance/oci-scope-table). +A: Distribution, for example using HTTP as both Docker v2.2 and AppC do today, is currently out of scope on the [OCI Scope Table](https://www.opencontainers.org/about/oci-scope-table). There has been [some discussion on the TOB mailing list](https://groups.google.com/a/opencontainers.org/d/msg/tob/A3JnmI-D-6Y/tLuptPDHAgAJ) to make distribution an optional layer, but this topic is a work in progress. **Q: Why a new project?** diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go index c709e2c..ddbc586 100644 --- a/vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go +++ b/vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go @@ -14,6 +14,8 @@ package v1 +import "time" + // ImageConfig defines the execution parameters which should be used as a base when running a container using an image. type ImageConfig struct { // User defines the username or UID which the process in the container should run as. @@ -52,8 +54,8 @@ type RootFS struct { // History describes the history of a layer. type History struct { - // Created is the creation time. - Created string `json:"created,omitempty"` + // Created is the combined date and time at which the layer was created, formatted as defined by RFC 3339, section 5.6. + Created time.Time `json:"created,omitempty"` // CreatedBy is the command which created the layer. CreatedBy string `json:"created_by,omitempty"` @@ -69,9 +71,10 @@ type History struct { } // Image is the JSON structure which describes some basic information about the image. +// This provides the `application/vnd.oci.image.config.v1+json` mediatype when marshalled to JSON. type Image struct { - // Created defines an ISO-8601 formatted combined date and time at which the image was created. - Created string `json:"created,omitempty"` + // Created is the combined date and time at which the image was created, formatted as defined by RFC 3339, section 5.6. + Created time.Time `json:"created,omitempty"` // Author defines the name and/or email address of the person or entity which created and is responsible for maintaining the image. Author string `json:"author,omitempty"` diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go index 83dde96..fdf50c7 100644 --- a/vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go +++ b/vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go @@ -14,17 +14,23 @@ package v1 +import digest "github.com/opencontainers/go-digest" + // Descriptor describes the disposition of targeted content. +// This structure provides `application/vnd.oci.descriptor.v1+json` mediatype when marshalled to JSON type Descriptor struct { - // MediaType contains the MIME type of the referenced object. - MediaType string `json:"mediaType"` + // MediaType is the media type of the object this schema refers to. + MediaType string `json:"mediaType,omitempty"` // Digest is the digest of the targeted content. - Digest string `json:"digest"` + Digest digest.Digest `json:"digest"` // Size specifies the size in bytes of the blob. Size int64 `json:"size"` // URLs specifies a list of URLs from which this object MAY be downloaded URLs []string `json:"urls,omitempty"` + + // Annotations contains arbitrary metadata relating to the targeted content. + Annotations map[string]string `json:"annotations,omitempty"` } diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest_list.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/image_index.go similarity index 89% rename from vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest_list.go rename to vendor/github.com/opencontainers/image-spec/specs-go/v1/image_index.go index d127ab6..3c1b6b1 100644 --- a/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest_list.go +++ b/vendor/github.com/opencontainers/image-spec/specs-go/v1/image_index.go @@ -50,13 +50,14 @@ type ManifestDescriptor struct { Platform Platform `json:"platform"` } -// ManifestList references manifests for various platforms. -type ManifestList struct { +// ImageIndex references manifests for various platforms. +// This structure provides `application/vnd.oci.image.index.v1+json` mediatype when marshalled to JSON. +type ImageIndex struct { specs.Versioned // Manifests references platform specific manifests. Manifests []ManifestDescriptor `json:"manifests"` - // Annotations contains arbitrary metadata for the manifest list. + // Annotations contains arbitrary metadata for the image index. Annotations map[string]string `json:"annotations,omitempty"` } diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.go index b3a9fb1..fc79e9e 100644 --- a/vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.go +++ b/vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.go @@ -14,18 +14,15 @@ package v1 -import "regexp" - -// ImageLayoutVersion is the version of ImageLayout -const ImageLayoutVersion = "1.0.0" +const ( + // ImageLayoutFile is the file name of oci image layout file + ImageLayoutFile = "oci-layout" + // ImageLayoutVersion is the version of ImageLayout + ImageLayoutVersion = "1.0.0" +) // ImageLayout is the structure in the "oci-layout" file, found in the root // of an OCI Image-layout directory. type ImageLayout struct { Version string `json:"imageLayoutVersion"` } - -var ( - // RefsRegexp matches requirement of image-layout 'refs' charset. - RefsRegexp = regexp.MustCompile(`^[a-zA-Z0-9-._]+$`) -) diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go index 7d16043..42d8c6a 100644 --- a/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go +++ b/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go @@ -16,7 +16,7 @@ package v1 import "github.com/opencontainers/image-spec/specs-go" -// Manifest defines a schema2 manifest +// Manifest provides `application/vnd.oci.image.manifest.v1+json` mediatype structure when marshalled to JSON. type Manifest struct { specs.Versioned @@ -27,6 +27,6 @@ type Manifest struct { // Layers is an indexed list of layers referenced by the manifest. Layers []Descriptor `json:"layers"` - // Annotations contains arbitrary metadata for the manifest list. + // Annotations contains arbitrary metadata for the manifest. Annotations map[string]string `json:"annotations,omitempty"` } diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go index d6592f5..c3f2e8a 100644 --- a/vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go +++ b/vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go @@ -21,15 +21,24 @@ const ( // MediaTypeImageManifest specifies the media type for an image manifest. MediaTypeImageManifest = "application/vnd.oci.image.manifest.v1+json" - // MediaTypeImageManifestList specifies the media type for an image manifest list. - MediaTypeImageManifestList = "application/vnd.oci.image.manifest.list.v1+json" + // MediaTypeImageIndex specifies the media type for an image index. + MediaTypeImageIndex = "application/vnd.oci.image.index.v1+json" // MediaTypeImageLayer is the media type used for layers referenced by the manifest. - MediaTypeImageLayer = "application/vnd.oci.image.layer.v1.tar+gzip" + MediaTypeImageLayer = "application/vnd.oci.image.layer.v1.tar" + + // MediaTypeImageLayerGzip is the media type used for gzipped layers + // referenced by the manifest. + MediaTypeImageLayerGzip = "application/vnd.oci.image.layer.v1.tar+gzip" // MediaTypeImageLayerNonDistributable is the media type for layers referenced by // the manifest but with distribution restrictions. - MediaTypeImageLayerNonDistributable = "application/vnd.oci.image.layer.nondistributable.v1.tar+gzip" + MediaTypeImageLayerNonDistributable = "application/vnd.oci.image.layer.nondistributable.v1.tar" + + // MediaTypeImageLayerNonDistributableGzip is the media type for + // gzipped layers referenced by the manifest but with distribution + // restrictions. + MediaTypeImageLayerNonDistributableGzip = "application/vnd.oci.image.layer.nondistributable.v1.tar+gzip" // MediaTypeImageConfig specifies the media type for the image configuration. MediaTypeImageConfig = "application/vnd.oci.image.config.v1+json" diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/version.go b/vendor/github.com/opencontainers/image-spec/specs-go/version.go index 5264ff3..1e0d104 100644 --- a/vendor/github.com/opencontainers/image-spec/specs-go/version.go +++ b/vendor/github.com/opencontainers/image-spec/specs-go/version.go @@ -25,7 +25,7 @@ const ( VersionPatch = 0 // VersionDev indicates development branch. Releases will be empty string. - VersionDev = "-rc3-dev" + VersionDev = "-rc4-dev" ) // Version is the specification version that the package types support. diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/versioned.go b/vendor/github.com/opencontainers/image-spec/specs-go/versioned.go index d01a1a8..58a1510 100644 --- a/vendor/github.com/opencontainers/image-spec/specs-go/versioned.go +++ b/vendor/github.com/opencontainers/image-spec/specs-go/versioned.go @@ -20,7 +20,4 @@ package specs type Versioned struct { // SchemaVersion is the image manifest schema that this image follows SchemaVersion int `json:"schemaVersion"` - - // MediaType is the media type of this schema. - MediaType string `json:"mediaType"` }