From a60edd8a2759b4a286587943fb6baebaea1984df Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 10:02:08 +0000 Subject: [PATCH] Bump github.com/opencontainers/image-spec Bumps [github.com/opencontainers/image-spec](https://github.com/opencontainers/image-spec) from 1.0.2-0.20210819154149-5ad6f50d6283 to 1.1.0. - [Release notes](https://github.com/opencontainers/image-spec/releases) - [Changelog](https://github.com/opencontainers/image-spec/blob/main/RELEASES.md) - [Commits](https://github.com/opencontainers/image-spec/commits/v1.1.0) --- updated-dependencies: - dependency-name: github.com/opencontainers/image-spec dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 +- .../image-spec/schema/config-schema.json | 3 + .../image-spec/schema/content-descriptor.json | 8 + .../image-spec/schema/defs.json | 6 + .../opencontainers/image-spec/schema/error.go | 4 +- .../opencontainers/image-spec/schema/fs.go | 363 ------------------ .../opencontainers/image-spec/schema/gen.go | 21 - .../image-spec/schema/image-index-schema.json | 11 + .../schema/image-manifest-schema.json | 11 + .../image-spec/schema/loader.go | 7 +- .../image-spec/schema/schema.go | 8 +- .../image-spec/schema/validator.go | 53 ++- .../image-spec/specs-go/v1/config.go | 29 +- .../image-spec/specs-go/v1/descriptor.go | 22 +- .../image-spec/specs-go/v1/index.go | 9 + .../image-spec/specs-go/v1/layout.go | 6 +- .../image-spec/specs-go/v1/manifest.go | 11 +- .../image-spec/specs-go/v1/mediatype.go | 38 +- .../image-spec/specs-go/version.go | 6 +- vendor/modules.txt | 2 +- 21 files changed, 173 insertions(+), 451 deletions(-) delete mode 100644 vendor/github.com/opencontainers/image-spec/schema/fs.go delete mode 100644 vendor/github.com/opencontainers/image-spec/schema/gen.go diff --git a/go.mod b/go.mod index 7eb3ce12de..512646c3c5 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/uuid v1.3.0 // indirect 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.1.0 github.com/opencontainers/image-tools v1.0.0-rc3 github.com/pkg/errors v0.9.1 github.com/russross/blackfriday v2.0.0+incompatible // indirect diff --git a/go.sum b/go.sum index f6d623e743..0640a017a0 100644 --- a/go.sum +++ b/go.sum @@ -628,8 +628,9 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= 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.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opencontainers/image-tools v1.0.0-rc3 h1:ZR837lBIxq6mmwEqfYrbLMuf75eBSHhccVHy6lsBeM4= github.com/opencontainers/image-tools v1.0.0-rc3/go.mod h1:A9btVpZLzttF4iFaKNychhPyrhfOjJ1OF5KrA8GcLj4= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= @@ -709,6 +710,7 @@ github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/russross/blackfriday v2.0.0+incompatible h1:cBXrhZNUf9C+La9/YpS+UHpUT8YD6Td9ZMSU9APFcsk= github.com/russross/blackfriday v2.0.0+incompatible/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= diff --git a/vendor/github.com/opencontainers/image-spec/schema/config-schema.json b/vendor/github.com/opencontainers/image-spec/schema/config-schema.json index 9b3be97c5a..0c325f1e08 100644 --- a/vendor/github.com/opencontainers/image-spec/schema/config-schema.json +++ b/vendor/github.com/opencontainers/image-spec/schema/config-schema.json @@ -95,6 +95,9 @@ }, "StopSignal": { "type": "string" + }, + "ArgsEscaped": { + "type": "boolean" } } }, diff --git a/vendor/github.com/opencontainers/image-spec/schema/content-descriptor.json b/vendor/github.com/opencontainers/image-spec/schema/content-descriptor.json index 9157e04a7c..b2f6deeaf4 100644 --- a/vendor/github.com/opencontainers/image-spec/schema/content-descriptor.json +++ b/vendor/github.com/opencontainers/image-spec/schema/content-descriptor.json @@ -20,6 +20,14 @@ "description": "a list of urls from which this object may be downloaded", "$ref": "defs-descriptor.json#/definitions/urls" }, + "data": { + "description": "an embedding of the targeted content (base64 encoded)", + "$ref": "defs.json#/definitions/base64" + }, + "artifactType": { + "description": "the IANA media type of this artifact", + "$ref": "defs-descriptor.json#/definitions/mediaType" + }, "annotations": { "id": "https://opencontainers.org/schema/descriptor/annotations", "$ref": "defs-descriptor.json#/definitions/annotations" diff --git a/vendor/github.com/opencontainers/image-spec/schema/defs.json b/vendor/github.com/opencontainers/image-spec/schema/defs.json index 03cb495b86..220f5d47db 100644 --- a/vendor/github.com/opencontainers/image-spec/schema/defs.json +++ b/vendor/github.com/opencontainers/image-spec/schema/defs.json @@ -61,6 +61,12 @@ } ] }, + "base64": { + "type": "string", + "media": { + "binaryEncoding": "base64" + } + }, "stringPointer": { "oneOf": [ { diff --git a/vendor/github.com/opencontainers/image-spec/schema/error.go b/vendor/github.com/opencontainers/image-spec/schema/error.go index baf8751958..c667c23e26 100644 --- a/vendor/github.com/opencontainers/image-spec/schema/error.go +++ b/vendor/github.com/opencontainers/image-spec/schema/error.go @@ -17,6 +17,7 @@ package schema import ( "bufio" "encoding/json" + "errors" "io" ) @@ -34,7 +35,8 @@ func (e *SyntaxError) Error() string { return e.msg } // and converts it into a *schema.SyntaxError containing line/col information using the given reader. // If the given error is not a *json.SyntaxError it is returned unchanged. func WrapSyntaxError(r io.Reader, err error) error { - if serr, ok := err.(*json.SyntaxError); ok { + var serr *json.SyntaxError + if errors.As(err, &serr) { buf := bufio.NewReader(r) line := 0 col := 0 diff --git a/vendor/github.com/opencontainers/image-spec/schema/fs.go b/vendor/github.com/opencontainers/image-spec/schema/fs.go deleted file mode 100644 index 9c6b294150..0000000000 --- a/vendor/github.com/opencontainers/image-spec/schema/fs.go +++ /dev/null @@ -1,363 +0,0 @@ -// Copyright 2016 The Linux Foundation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by "esc -private -pkg=schema -include=.*\.json$ ."; DO NOT EDIT. - -package schema - -import ( - "bytes" - "compress/gzip" - "encoding/base64" - "fmt" - "io" - "io/ioutil" - "net/http" - "os" - "path" - "sync" - "time" -) - -type _escLocalFS struct{} - -var _escLocal _escLocalFS - -type _escStaticFS struct{} - -var _escStatic _escStaticFS - -type _escDirectory struct { - fs http.FileSystem - name string -} - -type _escFile struct { - compressed string - size int64 - modtime int64 - local string - isDir bool - - once sync.Once - data []byte - name string -} - -func (_escLocalFS) Open(name string) (http.File, error) { - f, present := _escData[path.Clean(name)] - if !present { - return nil, os.ErrNotExist - } - return os.Open(f.local) -} - -func (_escStaticFS) prepare(name string) (*_escFile, error) { - f, present := _escData[path.Clean(name)] - if !present { - return nil, os.ErrNotExist - } - var err error - f.once.Do(func() { - f.name = path.Base(name) - if f.size == 0 { - return - } - var gr *gzip.Reader - b64 := base64.NewDecoder(base64.StdEncoding, bytes.NewBufferString(f.compressed)) - gr, err = gzip.NewReader(b64) - if err != nil { - return - } - f.data, err = ioutil.ReadAll(gr) - }) - if err != nil { - return nil, err - } - return f, nil -} - -func (fs _escStaticFS) Open(name string) (http.File, error) { - f, err := fs.prepare(name) - if err != nil { - return nil, err - } - return f.File() -} - -func (dir _escDirectory) Open(name string) (http.File, error) { - return dir.fs.Open(dir.name + name) -} - -func (f *_escFile) File() (http.File, error) { - type httpFile struct { - *bytes.Reader - *_escFile - } - return &httpFile{ - Reader: bytes.NewReader(f.data), - _escFile: f, - }, nil -} - -func (f *_escFile) Close() error { - return nil -} - -func (f *_escFile) Readdir(count int) ([]os.FileInfo, error) { - if !f.isDir { - return nil, fmt.Errorf(" escFile.Readdir: '%s' is not directory", f.name) - } - - fis, ok := _escDirs[f.local] - if !ok { - return nil, fmt.Errorf(" escFile.Readdir: '%s' is directory, but we have no info about content of this dir, local=%s", f.name, f.local) - } - limit := count - if count <= 0 || limit > len(fis) { - limit = len(fis) - } - - if len(fis) == 0 && count > 0 { - return nil, io.EOF - } - - return fis[0:limit], nil -} - -func (f *_escFile) Stat() (os.FileInfo, error) { - return f, nil -} - -func (f *_escFile) Name() string { - return f.name -} - -func (f *_escFile) Size() int64 { - return f.size -} - -func (f *_escFile) Mode() os.FileMode { - return 0 -} - -func (f *_escFile) ModTime() time.Time { - return time.Unix(f.modtime, 0) -} - -func (f *_escFile) IsDir() bool { - return f.isDir -} - -func (f *_escFile) Sys() interface{} { - return f -} - -// _escFS returns a http.Filesystem for the embedded assets. If useLocal is true, -// the filesystem's contents are instead used. -func _escFS(useLocal bool) http.FileSystem { - if useLocal { - return _escLocal - } - return _escStatic -} - -// _escDir returns a http.Filesystem for the embedded assets on a given prefix dir. -// If useLocal is true, the filesystem's contents are instead used. -func _escDir(useLocal bool, name string) http.FileSystem { - if useLocal { - return _escDirectory{fs: _escLocal, name: name} - } - return _escDirectory{fs: _escStatic, name: name} -} - -// _escFSByte returns the named file from the embedded assets. If useLocal is -// true, the filesystem's contents are instead used. -func _escFSByte(useLocal bool, name string) ([]byte, error) { - if useLocal { - f, err := _escLocal.Open(name) - if err != nil { - return nil, err - } - b, err := ioutil.ReadAll(f) - _ = f.Close() - return b, err - } - f, err := _escStatic.prepare(name) - if err != nil { - return nil, err - } - return f.data, nil -} - -// _escFSMustByte is the same as _escFSByte, but panics if name is not present. -func _escFSMustByte(useLocal bool, name string) []byte { - b, err := _escFSByte(useLocal, name) - if err != nil { - panic(err) - } - return b -} - -// _escFSString is the string version of _escFSByte. -func _escFSString(useLocal bool, name string) (string, error) { - b, err := _escFSByte(useLocal, name) - return string(b), err -} - -// _escFSMustString is the string version of _escFSMustByte. -func _escFSMustString(useLocal bool, name string) string { - return string(_escFSMustByte(useLocal, name)) -} - -var _escData = map[string]*_escFile{ - - "/config-schema.json": { - name: "config-schema.json", - local: "config-schema.json", - size: 2969, - modtime: 1625865937, - compressed: ` -H4sIAAAAAAAC/+RWsW7bQAzd9RWCkjGJOnTymnYrkAJG2yEojLNE2Ux1xyuPMioU/vdCJzvx2SfZteEu -XSnyvcdHSuLvJE2zElzBaAXJZJM0e7JgHsmIQgOcPpKpcJFOLRRYYaF81l1XduuKJWjVlSxF7CTPXxyZ -+z76QLzIS1aV3L97n/exm74Oy22Jm+Q5WTDFls35sj47R60WkBeev6+U1kJXS/MXKKSPWSYLLAgum6Rd -O2maFQxKoHwN7JQ6YTQ9nI9XxFpJ96RUAveCGjL/bN2nZKqRJfEIVJjNxRIFCmkYTq1ZKUZl5NR0cqdn -PqyAXT/WUysqUJ34KIliVu2bdyigd/MGwNN0HZBsJhrB35mrj0dm6+NfHHAQGWR+ZfU5H39ZclB+Jha3 -X3/LUPk1gMo9dIt8k5dQocFu4V2ulZ165KdeYxzfrIZkhdYN2DfayNbGQ1Lh1hIGG9RP08BT19NzQBDS -jUockXlEaih3T/KoCtPUdYi0i/M9asGjLv/b3r9S3WhwZ/Z/7tZfu6tvxD/QLD7gWe/5JzWH+tqWTCOD -v6YlUyE7xYVR9cmWRD+/TCSVu+TzW2JVzbB0//5bt8kf6z6gBdPog4lntWqBXRZ3PNljzRh+Nsj+mniO -eLCvLtlF3Hq+RCfE7WX/1L3xDA8oegEdd2vsGoqs9+FldHyodxGNs3l7AQZpDQd/vr8AAG2lnfmNGAaZ -E9WgzMB+hm9ZsmE43JvwOHy75sL3Mul2Z538CQAA//9C38scmQsAAA== -`, - }, - - "/content-descriptor.json": { - name: "content-descriptor.json", - local: "content-descriptor.json", - size: 1079, - modtime: 1625865919, - compressed: ` -H4sIAAAAAAAC/5yTsW7cMAyGdz8F4QTIkos6BB2MIEu7d2i3ooNOok5Mz5JK8RBci7x7QcvX2G2RILfZ -xP+Rn2zqVwfQe6yOqQjl1A/QfyqYPuQklhIy6BMmgY9zKDN8LugokLMTca0tLquLOFrFo0gZjHmoOW1a -9Sbzzni2QTbvbk2rXTSO/AmpgzG5YHKnyXXCWtr4P9MbJ8eCSubtAzpptcK5IAth7QfQgwH0I3qyX1q4 -lf49r0SEKadNIQfQAmNAxuTQw2LGhF8yBuU8hrp5FrvRE18Yj4ESae9qnqdP7FNr0Vf6+ZqPRoASbI+C -9Y1O/xGhJO9v1xKedljlFQ3HxyJ5x7ZEcuAiuu/1MEJjT1rN5Vp19bVYEeQEV3d2v8tMEsf74U5/rEd/ -f3XOd5xdV/4H3tcX7C3sqSlqEALnER4juQgSqc7OMNojbBF8fkz7bD36c+wmk5WbTSnLdDtWim9fdrPs -dIbaEm+G3WzZM/44EKMqff37riz3dL0uHcC37qn7HQAA//9DKIMKNwQAAA== -`, - }, - - "/defs-descriptor.json": { - name: "defs-descriptor.json", - local: "defs-descriptor.json", - size: 844, - modtime: 1625865919, - compressed: ` -H4sIAAAAAAAC/5SST2/TTBDG7/kU826jt0DiOHBAqlWKKnrnUE6t0mi6O7aneP9od6IqVPnuaG03SYtA -cLC1+2jmefwbz9MEQBlKOnIQ9k5VoK6oZsf5liBgFNabDiOIh6+B3BfvBNlRhKuxzUe4DqS5Zo29x3ww -3buoCnIOgLJkGL9tA+0lAMUmp7YiIVVl6QM5/ZyRFj42ZdItWSzZYkOl2aeWB7f5s5cM3ipJZNcc9IAi -FHu8u9vL4gaLH8vibHU4/ncy/b+4Wy9mq6fl/P2Hj7vy78qmqo/YDUnKcENJjuleDVdaAh23QXwTMbSs -Qbekv6eNhaEXfA25yN8/kJY5sOuvIwCcnmPX+MjS2ovqPI/KkLk4/ccJjFyzN5+r29liXaz2ytt3VT5f -FjfL4uzTuljNXhFuYpf+wIfQ8QCRC6GO3sJjy7oFaTmNVGBxC/cExj+6zqMh8+v3Y4y4PcgsZI9zf08K -oGofLea/oDaR1ajvXmCgc17w5XoCqGmkOvcZqtPiIXl3Uh4tcmkxXPdpw3uczCQ/u8nPAAAA///5nDLG -TAMAAA== -`, - }, - - "/defs.json": { - name: "defs.json", - local: "defs.json", - size: 1670, - modtime: 1625865903, - compressed: ` -H4sIAAAAAAAC/7STza6bMBCF9zzFyO2S9oJtbGDb7hMpy6oLSiaJq2AjY6RWEe9e8RNChFuJKneRgGc8 -3zmeMbcAgByxKa2qnTKa5EC+4klp1a8aaBs8grtY054vpnXgLgi7GvUXo12hNFo41FiqkyqLoTwceTOA -5NBLABClXTqvAIj7XWOvprTDM9qhckhUSquqrUgOn2KaPsLFrykcUzkEu3Amx2IrmlEpfPA+vsIzuhVP -Yy55ygT3aczJlZDgW4UyShmTNGIiTbiUIooij6Jn15N0+x/T8enQJFlxN8/GBxZJwtbozXPxoTnNeCYk -zdb8zePw8eOUcyE5jySTUZYk1Nf8WOxNz7VLQaNxdyI5fJsCMKeG9EeLfZZ8eFt8cG9Ty+eNXeivvp9G -t9frYvf09t3Ti1c6FPy1DhtnlT5vd3jXGOtf66kq6sOAHf99V8n8+Imle9ykunAOrd5bU6N1CptFEQD5 -fIvD7in0ryMEy+fK1G6UfmdTE+tvpoL+1wV/AgAA//96IpqyhgYAAA== -`, - }, - - "/image-index-schema.json": { - name: "image-index-schema.json", - local: "image-index-schema.json", - size: 2993, - modtime: 1625865919, - compressed: ` -H4sIAAAAAAAC/6yWz0/jOhDH7/0rRgGJC5CnJ/QOFeLy9sJpD4v2suJg7EkybGNnx1Ogu+r/vrJN2qRJ -C4Te2rHnO5/vxL/+zAAyg14zNULOZnPIvjZo/3dWFFlkuK1ViXBrDb7AtwY1FaRVnHoeck+9rrBWIa8S -aeZ5/uidvUjRS8dlblgVcvHPVZ5iJymPTJvi53nuGrS6LeljWpqdUyifUyifEmXVYEh1D4+oJcUadg2y -EPpsDsESQJbyvyP7ZCuFh27vKvJQEC4M+GQPPUiFECtDrAxJDJ6SGigPygJZwRI5IkTlCZ7yPuZGqnU5 -qFGTpXpZZ3P4dxtTL20shtZpJKuVpQK9+K79Vlkxq1WHXbDuzvuwnbbYl9f2ui30+Fd7HWH8tSTGUOvH -Jhrg0ZC6C2nn3bCn3zsRQyV6yTah+474yMIYyPcHhgskrIU4O3gAV8TFwVggo9VoYGApipwyFiHbYOEv -zKYnl2F3nOQGC7IUKvh8S9JRWA9Nv4czTASy8LAS9JNYRwDJyn9X++Fe+/8ePM2rRlzJqqlIg65Q//TL -GpJCi5sYz4ON8LdRIsgWzq7VonRMUtU38+uwFg2am7Ppfd9dN7u+lrzwb7pSsKCEHqZDwa6G54p0BRLO -leQFarWCBwTjnu3CKYNmOnWk2svcLJQUjush98c280Znh3PvNj60leOYYl2RoJYl404eQOZ6nnp7+PA+ -HmoPxye7zw9Cd9rhhcmW2c6E9ZjNY+I5fxyoy6fBLXkMuI3scSALVOE7HLuFW90DmP3Lslt2cG2+2yTA -+k3bT4pJWRm3/EYPZ/v+9Y8MZa2T+KDznz01tgdX3lWdfNZ1RWZjXtpf696zZ9zRpNfZmI3PGAigEXN4 -VmZjL8HOE24GcD9bz/4GAAD//yCnv52xCwAA -`, - }, - - "/image-layout-schema.json": { - name: "image-layout-schema.json", - local: "image-layout-schema.json", - size: 439, - modtime: 1625865903, - compressed: ` -H4sIAAAAAAAC/2yPQUvEMBCF7/0VQ/Sg4DYVPOW6pwVhD4IX8VDTaTvLNonJVFik/12SaRXRU5g38+W9 -91kBqA6TjRSYvFMG1DGg23vHLTmMcJjaAeGxvfiZ4cmOOLXqLlPXSQYDamQORutT8m4nau3joLvY9rxr -HrRoV8JRtyHJaO0DOruZpYLJtaZsrM/FWEi+BMysfzuhXbUQfcDIhEkZyG2yQyYl8TPGJLVk97fth1yA -74FHhOP+8LvyDbmy8JZ2EgZ6OuNtsS8fbrESR3LDj45unpSBl3UGUPd1UzdqnV/Lu1QAS2kS8X2miN03 -8l+PKnNL9RUAAP//k31n5bcBAAA= -`, - }, - - "/image-manifest-schema.json": { - name: "image-manifest-schema.json", - local: "image-manifest-schema.json", - size: 921, - modtime: 1625865903, - compressed: ` -H4sIAAAAAAAC/5ySMW8iMRCF+/0VI0MJ+O501bZXUZxSJEoTpXB2x7uDWNsZmygo4r9HtnHAkCKifTvv -zTdv/dEAiB59x+QCWSNaEHcOzT9rgiKDDOtJDQj/lSGNPsC9w440dSpNL6J97rsRJxWtYwiulXLjrVlm -dWV5kD0rHZa//sqszbKP+mLxrZTWoenKVp9seVpSJJDTkSB7w95hdNuXDXZHzbF1yIHQixbiYQAiRzwi -+3xclq9vfhjJgybc9uDzheghjAhpOZTlkPPgLQeC8qAMkAk4ICeKFH7bZbKG/Uort16tmcjQtJtEC39O -mnovWpIO+YvorNE0nDcwZ9QxNqKhCcvSiOVV/H+ism/VHtmf2wuVYlb7imkdcIqjv099HJVi/ul2gENF -oYyxIb28CuXGus/TFpet9Kj9JdRM9qjJULJU9qawJlLB+Lojxoj19N07rP9JXXED8Nwcms8AAAD//7u3 -Dj+ZAwAA -`, - }, - - "/": { - name: "/", - local: `.`, - isDir: true, - }, -} - -var _escDirs = map[string][]os.FileInfo{ - - ".": { - _escData["/config-schema.json"], - _escData["/content-descriptor.json"], - _escData["/defs-descriptor.json"], - _escData["/defs.json"], - _escData["/image-index-schema.json"], - _escData["/image-layout-schema.json"], - _escData["/image-manifest-schema.json"], - }, -} diff --git a/vendor/github.com/opencontainers/image-spec/schema/gen.go b/vendor/github.com/opencontainers/image-spec/schema/gen.go deleted file mode 100644 index ae78604fd8..0000000000 --- a/vendor/github.com/opencontainers/image-spec/schema/gen.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2016 The Linux Foundation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package schema - -// Generates an embbedded http.FileSystem for all schema files -// using esc (https://github.com/mjibson/esc). - -// This should generally be invoked with `make schema-fs` -//go:generate esc -private -pkg=schema -include=.*\.json$ . diff --git a/vendor/github.com/opencontainers/image-spec/schema/image-index-schema.json b/vendor/github.com/opencontainers/image-spec/schema/image-index-schema.json index 8a962aab24..2e5dbf5cd3 100644 --- a/vendor/github.com/opencontainers/image-spec/schema/image-index-schema.json +++ b/vendor/github.com/opencontainers/image-spec/schema/image-index-schema.json @@ -11,6 +11,17 @@ "minimum": 2, "maximum": 2 }, + "mediaType": { + "description": "the mediatype of the referenced object", + "$ref": "defs-descriptor.json#/definitions/mediaType" + }, + "artifactType": { + "description": "the artifact mediatype of the referenced object", + "$ref": "defs-descriptor.json#/definitions/mediaType" + }, + "subject": { + "$ref": "content-descriptor.json" + }, "manifests": { "type": "array", "items": { diff --git a/vendor/github.com/opencontainers/image-spec/schema/image-manifest-schema.json b/vendor/github.com/opencontainers/image-spec/schema/image-manifest-schema.json index ec00748e19..9bce5a1502 100644 --- a/vendor/github.com/opencontainers/image-spec/schema/image-manifest-schema.json +++ b/vendor/github.com/opencontainers/image-spec/schema/image-manifest-schema.json @@ -11,9 +11,20 @@ "minimum": 2, "maximum": 2 }, + "mediaType": { + "description": "the mediatype of the referenced object", + "$ref": "defs-descriptor.json#/definitions/mediaType" + }, + "artifactType": { + "description": "the artifact mediatype of the referenced object", + "$ref": "defs-descriptor.json#/definitions/mediaType" + }, "config": { "$ref": "content-descriptor.json" }, + "subject": { + "$ref": "content-descriptor.json" + }, "layers": { "type": "array", "minItems": 1, diff --git a/vendor/github.com/opencontainers/image-spec/schema/loader.go b/vendor/github.com/opencontainers/image-spec/schema/loader.go index f171765958..d7737582c7 100644 --- a/vendor/github.com/opencontainers/image-spec/schema/loader.go +++ b/vendor/github.com/opencontainers/image-spec/schema/loader.go @@ -19,7 +19,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "net/http" "strings" @@ -68,7 +67,7 @@ func (factory *fsLoaderFactory) refContents(ref gojsonreference.JsonReference) ( } defer f.Close() - return ioutil.ReadAll(f) + return io.ReadAll(f) } // fsLoader implements gojsonschema.JSONLoader by reading the document named by source from a fsLoaderFactory. @@ -78,7 +77,7 @@ type fsLoader struct { } // JsonSource implements gojsonschema.JSONLoader.JsonSource. The "Json" capitalization needs to be maintained to conform to the interface. -func (l *fsLoader) JsonSource() interface{} { // nolint: golint +func (l *fsLoader) JsonSource() interface{} { // revive:disable-line:var-naming return l.source } @@ -117,7 +116,7 @@ func decodeJSONUsingNumber(r io.Reader) (interface{}, error) { } // JsonReference implements gojsonschema.JSONLoader.JsonReference. The "Json" capitalization needs to be maintained to conform to the interface. -func (l *fsLoader) JsonReference() (gojsonreference.JsonReference, error) { // nolint: golint +func (l *fsLoader) JsonReference() (gojsonreference.JsonReference, error) { // revive:disable-line:var-naming return gojsonreference.NewJsonReference(l.JsonSource().(string)) } diff --git a/vendor/github.com/opencontainers/image-spec/schema/schema.go b/vendor/github.com/opencontainers/image-spec/schema/schema.go index 239eefa240..7a338d8ee9 100644 --- a/vendor/github.com/opencontainers/image-spec/schema/schema.go +++ b/vendor/github.com/opencontainers/image-spec/schema/schema.go @@ -15,9 +15,10 @@ package schema import ( + "embed" "net/http" - "github.com/opencontainers/image-spec/specs-go/v1" + v1 "github.com/opencontainers/image-spec/specs-go/v1" ) // Media types for the OCI image formats @@ -33,7 +34,8 @@ const ( var ( // fs stores the embedded http.FileSystem // having the OCI JSON schema files in root "/". - fs = _escFS(false) + //go:embed *.json + fs embed.FS // schemaNamespaces is a set of URI prefixes which are treated as containing the schema files of fs. // This is necessary because *.json schema files in this directory use "id" and "$ref" attributes which evaluate to such URIs, e.g. @@ -72,5 +74,5 @@ var ( // FileSystem returns an in-memory filesystem including the schema files. // The schema files are located at the root directory. func FileSystem() http.FileSystem { - return fs + return http.FS(fs) } diff --git a/vendor/github.com/opencontainers/image-spec/schema/validator.go b/vendor/github.com/opencontainers/image-spec/schema/validator.go index 8cd9ecfc3d..b7a0acaa81 100644 --- a/vendor/github.com/opencontainers/image-spec/schema/validator.go +++ b/vendor/github.com/opencontainers/image-spec/schema/validator.go @@ -17,14 +17,13 @@ package schema import ( "bytes" "encoding/json" + "errors" "fmt" "io" - "io/ioutil" "regexp" digest "github.com/opencontainers/go-digest" v1 "github.com/opencontainers/image-spec/specs-go/v1" - "github.com/pkg/errors" "github.com/xeipuuv/gojsonschema" ) @@ -52,9 +51,9 @@ func (e ValidationError) Error() string { // Validate validates the given reader against the schema of the wrapped media type. func (v Validator) Validate(src io.Reader) error { - buf, err := ioutil.ReadAll(src) + buf, err := io.ReadAll(src) if err != nil { - return errors.Wrap(err, "unable to read the document file") + return fmt.Errorf("unable to read the document file: %w", err) } if f, ok := mapValidate[v]; ok { @@ -67,14 +66,13 @@ func (v Validator) Validate(src io.Reader) error { } } - sl := newFSLoaderFactory(schemaNamespaces, fs).New(specs[v]) + sl := newFSLoaderFactory(schemaNamespaces, FileSystem()).New(specs[v]) ml := gojsonschema.NewStringLoader(string(buf)) result, err := gojsonschema.Validate(sl, ml) if err != nil { - return errors.Wrapf( - WrapSyntaxError(bytes.NewReader(buf), err), - "schema %s: unable to validate", v) + return fmt.Errorf("schema %s: unable to validate: %w", v, + WrapSyntaxError(bytes.NewReader(buf), err)) } if result.Valid() { @@ -93,21 +91,21 @@ func (v Validator) Validate(src io.Reader) error { type unimplemented string -func (v unimplemented) Validate(src io.Reader) error { +func (v unimplemented) Validate(_ io.Reader) error { return fmt.Errorf("%s: unimplemented", v) } func validateManifest(r io.Reader) error { header := v1.Manifest{} - buf, err := ioutil.ReadAll(r) + buf, err := io.ReadAll(r) if err != nil { - return errors.Wrapf(err, "error reading the io stream") + return fmt.Errorf("error reading the io stream: %w", err) } err = json.Unmarshal(buf, &header) if err != nil { - return errors.Wrap(err, "manifest format mismatch") + return fmt.Errorf("manifest format mismatch: %w", err) } if header.Config.MediaType != string(v1.MediaTypeImageConfig) { @@ -118,9 +116,9 @@ func validateManifest(r io.Reader) error { if layer.MediaType != string(v1.MediaTypeImageLayer) && layer.MediaType != string(v1.MediaTypeImageLayerGzip) && layer.MediaType != string(v1.MediaTypeImageLayerZstd) && - layer.MediaType != string(v1.MediaTypeImageLayerNonDistributable) && - layer.MediaType != string(v1.MediaTypeImageLayerNonDistributableGzip) && - layer.MediaType != string(v1.MediaTypeImageLayerNonDistributableZstd) { + layer.MediaType != string(v1.MediaTypeImageLayerNonDistributable) && //nolint:staticcheck + layer.MediaType != string(v1.MediaTypeImageLayerNonDistributableGzip) && //nolint:staticcheck + layer.MediaType != string(v1.MediaTypeImageLayerNonDistributableZstd) { //nolint:staticcheck fmt.Printf("warning: layer %s has an unknown media type: %s\n", layer.Digest, layer.MediaType) } } @@ -130,18 +128,18 @@ func validateManifest(r io.Reader) error { func validateDescriptor(r io.Reader) error { header := v1.Descriptor{} - buf, err := ioutil.ReadAll(r) + buf, err := io.ReadAll(r) if err != nil { - return errors.Wrapf(err, "error reading the io stream") + return fmt.Errorf("error reading the io stream: %w", err) } err = json.Unmarshal(buf, &header) if err != nil { - return errors.Wrap(err, "descriptor format mismatch") + return fmt.Errorf("descriptor format mismatch: %w", err) } err = header.Digest.Validate() - if err == digest.ErrDigestUnsupported { + if errors.Is(err, digest.ErrDigestUnsupported) { // we ignore unsupported algorithms fmt.Printf("warning: unsupported digest: %q: %v\n", header.Digest, err) return nil @@ -152,14 +150,14 @@ func validateDescriptor(r io.Reader) error { func validateIndex(r io.Reader) error { header := v1.Index{} - buf, err := ioutil.ReadAll(r) + buf, err := io.ReadAll(r) if err != nil { - return errors.Wrapf(err, "error reading the io stream") + return fmt.Errorf("error reading the io stream: %w", err) } err = json.Unmarshal(buf, &header) if err != nil { - return errors.Wrap(err, "index format mismatch") + return fmt.Errorf("index format mismatch: %w", err) } for _, manifest := range header.Manifests { @@ -179,14 +177,14 @@ func validateIndex(r io.Reader) error { func validateConfig(r io.Reader) error { header := v1.Image{} - buf, err := ioutil.ReadAll(r) + buf, err := io.ReadAll(r) if err != nil { - return errors.Wrapf(err, "error reading the io stream") + return fmt.Errorf("error reading the io stream: %w", err) } err = json.Unmarshal(buf, &header) if err != nil { - return errors.Wrap(err, "config format mismatch") + return fmt.Errorf("config format mismatch: %w", err) } checkPlatform(header.OS, header.Architecture) @@ -195,7 +193,7 @@ func validateConfig(r io.Reader) error { envRegexp := regexp.MustCompile(`^[^=]+=.*$`) for _, e := range header.Config.Env { if !envRegexp.MatchString(e) { - return errors.Errorf("unexpected env: %q", e) + return fmt.Errorf("unexpected env: %q", e) } } @@ -213,6 +211,7 @@ func checkArchitecture(Architecture string, Variant string) { "mips64": {""}, "mips64le": {""}, "s390x": {""}, + "riscv64": {""}, } for arch, variants := range validCombins { if arch == Architecture { @@ -233,7 +232,7 @@ func checkPlatform(OS string, Architecture string) { "darwin": {"386", "amd64", "arm", "arm64"}, "dragonfly": {"amd64"}, "freebsd": {"386", "amd64", "arm"}, - "linux": {"386", "amd64", "arm", "arm64", "ppc64", "ppc64le", "mips64", "mips64le", "s390x"}, + "linux": {"386", "amd64", "arm", "arm64", "ppc64", "ppc64le", "mips64", "mips64le", "s390x", "riscv64"}, "netbsd": {"386", "amd64", "arm"}, "openbsd": {"386", "amd64", "arm"}, "plan9": {"386", "amd64"}, 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 ffff4b6d18..36b0aeb8f1 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 @@ -48,6 +48,17 @@ type ImageConfig struct { // StopSignal contains the system call signal that will be sent to the container to exit. StopSignal string `json:"StopSignal,omitempty"` + + // ArgsEscaped + // + // Deprecated: This field is present only for legacy compatibility with + // Docker and should not be used by new image builders. It is used by Docker + // for Windows images to indicate that the `Entrypoint` or `Cmd` or both, + // contains only a single element array, that is a pre-escaped, and combined + // into a single string `CommandLine`. If `true` the value in `Entrypoint` or + // `Cmd` should be used as-is to avoid double escaping. + // https://github.com/opencontainers/image-spec/pull/892 + ArgsEscaped bool `json:"ArgsEscaped,omitempty"` } // RootFS describes a layer content addresses @@ -86,22 +97,8 @@ type Image struct { // 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"` - // Architecture is the CPU architecture which the binaries in this image are built to run on. - Architecture string `json:"architecture"` - - // Variant is the variant of the specified CPU architecture which image binaries are intended to run on. - Variant string `json:"variant,omitempty"` - - // OS is the name of the operating system which the image is built to run on. - OS string `json:"os"` - - // OSVersion is an optional field specifying the operating system - // version, for example on Windows `10.0.14393.1066`. - OSVersion string `json:"os.version,omitempty"` - - // OSFeatures is an optional field specifying an array of strings, - // each listing a required OS feature (for example on Windows `win32k`). - OSFeatures []string `json:"os.features,omitempty"` + // Platform describes the platform which the image in the manifest runs on. + Platform // Config defines the execution parameters which should be used as a base when running a container using the image. Config ImageConfig `json:"config,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 6e442a0853..1881b11814 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 @@ -1,4 +1,4 @@ -// Copyright 2016 The Linux Foundation +// Copyright 2016-2022 The Linux Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ import digest "github.com/opencontainers/go-digest" // when marshalled to JSON. type Descriptor struct { // MediaType is the media type of the object this schema refers to. - MediaType string `json:"mediaType,omitempty"` + MediaType string `json:"mediaType"` // Digest is the digest of the targeted content. Digest digest.Digest `json:"digest"` @@ -35,16 +35,24 @@ type Descriptor struct { // Annotations contains arbitrary metadata relating to the targeted content. Annotations map[string]string `json:"annotations,omitempty"` + // Data is an embedding of the targeted content. This is encoded as a base64 + // string when marshalled to JSON (automatically, by encoding/json). If + // present, Data can be used directly to avoid fetching the targeted content. + Data []byte `json:"data,omitempty"` + // Platform describes the platform which the image in the manifest runs on. // // This should only be used when referring to a manifest. Platform *Platform `json:"platform,omitempty"` + + // ArtifactType is the IANA media type of this artifact. + ArtifactType string `json:"artifactType,omitempty"` } // Platform describes the platform which the image in the manifest runs on. type Platform struct { // Architecture field specifies the CPU architecture, for example - // `amd64` or `ppc64`. + // `amd64` or `ppc64le`. Architecture string `json:"architecture"` // OS specifies the operating system, for example `linux` or `windows`. @@ -62,3 +70,11 @@ type Platform struct { // example `v7` to specify ARMv7 when architecture is `arm`. Variant string `json:"variant,omitempty"` } + +// DescriptorEmptyJSON is the descriptor of a blob with content of `{}`. +var DescriptorEmptyJSON = Descriptor{ + MediaType: MediaTypeEmptyJSON, + Digest: `sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a`, + Size: 2, + Data: []byte(`{}`), +} diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go index 4e6c4b2362..e2bed9d4e4 100644 --- a/vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go +++ b/vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go @@ -21,9 +21,18 @@ import "github.com/opencontainers/image-spec/specs-go" type Index struct { specs.Versioned + // MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.index.v1+json` + MediaType string `json:"mediaType,omitempty"` + + // ArtifactType specifies the IANA media type of artifact when the manifest is used for an artifact. + ArtifactType string `json:"artifactType,omitempty"` + // Manifests references platform specific manifests. Manifests []Descriptor `json:"manifests"` + // Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest. + Subject *Descriptor `json:"subject,omitempty"` + // 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 fc79e9e0d1..c5503cb305 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 @@ -15,10 +15,14 @@ package v1 const ( - // ImageLayoutFile is the file name of oci image layout file + // ImageLayoutFile is the file name containing ImageLayout in an OCI Image Layout ImageLayoutFile = "oci-layout" // ImageLayoutVersion is the version of ImageLayout ImageLayoutVersion = "1.0.0" + // ImageIndexFile is the file name of the entry point for references and descriptors in an OCI Image Layout + ImageIndexFile = "index.json" + // ImageBlobsDir is the directory name containing content addressable blobs in an OCI Image Layout + ImageBlobsDir = "blobs" ) // ImageLayout is the structure in the "oci-layout" file, found in the root 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 7ff32c40ba..26fec52a6b 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 @@ -1,4 +1,4 @@ -// Copyright 2016 The Linux Foundation +// Copyright 2016-2022 The Linux Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,6 +20,12 @@ import "github.com/opencontainers/image-spec/specs-go" type Manifest struct { specs.Versioned + // MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json` + MediaType string `json:"mediaType,omitempty"` + + // ArtifactType specifies the IANA media type of artifact when the manifest is used for an artifact. + ArtifactType string `json:"artifactType,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"` @@ -27,6 +33,9 @@ type Manifest struct { // Layers is an indexed list of layers referenced by the manifest. Layers []Descriptor `json:"layers"` + // Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest. + Subject *Descriptor `json:"subject,omitempty"` + // Annotations contains arbitrary metadata for the image 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 4f35ac134f..ce8313e796 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,12 +21,20 @@ const ( // MediaTypeLayoutHeader specifies the media type for the oci-layout. MediaTypeLayoutHeader = "application/vnd.oci.layout.header.v1+json" + // MediaTypeImageIndex specifies the media type for an image index. + MediaTypeImageIndex = "application/vnd.oci.image.index.v1+json" + // MediaTypeImageManifest specifies the media type for an image manifest. MediaTypeImageManifest = "application/vnd.oci.image.manifest.v1+json" - // MediaTypeImageIndex specifies the media type for an image index. - MediaTypeImageIndex = "application/vnd.oci.image.index.v1+json" + // MediaTypeImageConfig specifies the media type for the image configuration. + MediaTypeImageConfig = "application/vnd.oci.image.config.v1+json" + + // MediaTypeEmptyJSON specifies the media type for an unused blob containing the value "{}". + MediaTypeEmptyJSON = "application/vnd.oci.empty.v1+json" +) +const ( // MediaTypeImageLayer is the media type used for layers referenced by the manifest. MediaTypeImageLayer = "application/vnd.oci.image.layer.v1.tar" @@ -37,21 +45,41 @@ const ( // MediaTypeImageLayerZstd is the media type used for zstd compressed // layers referenced by the manifest. MediaTypeImageLayerZstd = "application/vnd.oci.image.layer.v1.tar+zstd" +) +// Non-distributable layer media-types. +// +// Deprecated: Non-distributable layers are deprecated, and not recommended +// for future use. Implementations SHOULD NOT produce new non-distributable +// layers. +// https://github.com/opencontainers/image-spec/pull/965 +const ( // MediaTypeImageLayerNonDistributable is the media type for layers referenced by // the manifest but with distribution restrictions. + // + // Deprecated: Non-distributable layers are deprecated, and not recommended + // for future use. Implementations SHOULD NOT produce new non-distributable + // layers. + // https://github.com/opencontainers/image-spec/pull/965 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. + // + // Deprecated: Non-distributable layers are deprecated, and not recommended + // for future use. Implementations SHOULD NOT produce new non-distributable + // layers. + // https://github.com/opencontainers/image-spec/pull/965 MediaTypeImageLayerNonDistributableGzip = "application/vnd.oci.image.layer.nondistributable.v1.tar+gzip" // MediaTypeImageLayerNonDistributableZstd is the media type for zstd // compressed layers referenced by the manifest but with distribution // restrictions. + // + // Deprecated: Non-distributable layers are deprecated, and not recommended + // for future use. Implementations SHOULD NOT produce new non-distributable + // layers. + // https://github.com/opencontainers/image-spec/pull/965 MediaTypeImageLayerNonDistributableZstd = "application/vnd.oci.image.layer.nondistributable.v1.tar+zstd" - - // 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 58f1095ab0..7069ae44d7 100644 --- a/vendor/github.com/opencontainers/image-spec/specs-go/version.go +++ b/vendor/github.com/opencontainers/image-spec/specs-go/version.go @@ -20,12 +20,12 @@ const ( // VersionMajor is for an API incompatible changes VersionMajor = 1 // VersionMinor is for functionality in a backwards-compatible manner - VersionMinor = 0 + VersionMinor = 1 // VersionPatch is for backwards-compatible bug fixes - VersionPatch = 1 + VersionPatch = 0 // VersionDev indicates development branch. Releases will be empty string. - VersionDev = "-dev" + VersionDev = "" ) // Version is the specification version that the package types support. diff --git a/vendor/modules.txt b/vendor/modules.txt index 3350383636..15d26f8a99 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -272,7 +272,7 @@ github.com/modern-go/reflect2 github.com/mtrmac/gpgme # github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/go-digest -# github.com/opencontainers/image-spec v1.0.2-0.20210819154149-5ad6f50d6283 +# github.com/opencontainers/image-spec v1.1.0 github.com/opencontainers/image-spec/schema github.com/opencontainers/image-spec/specs-go github.com/opencontainers/image-spec/specs-go/v1