mirror of https://github.com/docker/cli.git
vendor: github.com/docker/docker v25.0.1
relevant changes: - Fix isGitURL regular expression - pkg/system: return even richer xattr errors full diff: https://github.com/moby/moby/compare/v25.0.0...v25.0.1 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
c6ae74956c
commit
4b1ed1f442
|
@ -12,7 +12,7 @@ require (
|
||||||
github.com/creack/pty v1.1.21
|
github.com/creack/pty v1.1.21
|
||||||
github.com/distribution/reference v0.5.0
|
github.com/distribution/reference v0.5.0
|
||||||
github.com/docker/distribution v2.8.3+incompatible
|
github.com/docker/distribution v2.8.3+incompatible
|
||||||
github.com/docker/docker v25.0.0+incompatible
|
github.com/docker/docker v25.0.1+incompatible
|
||||||
github.com/docker/docker-credential-helpers v0.8.1
|
github.com/docker/docker-credential-helpers v0.8.1
|
||||||
github.com/docker/go-connections v0.5.0
|
github.com/docker/go-connections v0.5.0
|
||||||
github.com/docker/go-units v0.5.0
|
github.com/docker/go-units v0.5.0
|
||||||
|
|
|
@ -54,8 +54,8 @@ github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5
|
||||||
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||||
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
|
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
|
||||||
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||||
github.com/docker/docker v25.0.0+incompatible h1:g9b6wZTblhMgzOT2tspESstfw6ySZ9kdm94BLDKaZac=
|
github.com/docker/docker v25.0.1+incompatible h1:k5TYd5rIVQRSqcTwCID+cyVA0yRg86+Pcrz1ls0/frA=
|
||||||
github.com/docker/docker v25.0.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
github.com/docker/docker v25.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||||
github.com/docker/docker-credential-helpers v0.8.1 h1:j/eKUktUltBtMzKqmfLB0PAgqYyMHOp5vfsD1807oKo=
|
github.com/docker/docker-credential-helpers v0.8.1 h1:j/eKUktUltBtMzKqmfLB0PAgqYyMHOp5vfsD1807oKo=
|
||||||
github.com/docker/docker-credential-helpers v0.8.1/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M=
|
github.com/docker/docker-credential-helpers v0.8.1/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M=
|
||||||
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=
|
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
|
|
||||||
// urlPathWithFragmentSuffix matches fragments to use as Git reference and build
|
// urlPathWithFragmentSuffix matches fragments to use as Git reference and build
|
||||||
// context from the Git repository. See IsGitURL for details.
|
// context from the Git repository. See IsGitURL for details.
|
||||||
var urlPathWithFragmentSuffix = regexp.MustCompile(".git(?:#.+)?$")
|
var urlPathWithFragmentSuffix = regexp.MustCompile(`\.git(?:#.+)?$`)
|
||||||
|
|
||||||
// IsURL returns true if the provided str is an HTTP(S) URL by checking if it
|
// IsURL returns true if the provided str is an HTTP(S) URL by checking if it
|
||||||
// has a http:// or https:// scheme. No validation is performed to verify if the
|
// has a http:// or https:// scheme. No validation is performed to verify if the
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
package system // import "github.com/docker/docker/pkg/system"
|
||||||
|
|
||||||
|
type XattrError struct {
|
||||||
|
Op string
|
||||||
|
Attr string
|
||||||
|
Path string
|
||||||
|
Err error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *XattrError) Error() string { return e.Op + " " + e.Attr + " " + e.Path + ": " + e.Err.Error() }
|
||||||
|
|
||||||
|
func (e *XattrError) Unwrap() error { return e.Err }
|
||||||
|
|
||||||
|
// Timeout reports whether this error represents a timeout.
|
||||||
|
func (e *XattrError) Timeout() bool {
|
||||||
|
t, ok := e.Err.(interface{ Timeout() bool })
|
||||||
|
return ok && t.Timeout()
|
||||||
|
}
|
|
@ -1,8 +1,6 @@
|
||||||
package system // import "github.com/docker/docker/pkg/system"
|
package system // import "github.com/docker/docker/pkg/system"
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/fs"
|
|
||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -10,8 +8,8 @@ import (
|
||||||
// and associated with the given path in the file system.
|
// and associated with the given path in the file system.
|
||||||
// It will returns a nil slice and nil error if the xattr is not set.
|
// It will returns a nil slice and nil error if the xattr is not set.
|
||||||
func Lgetxattr(path string, attr string) ([]byte, error) {
|
func Lgetxattr(path string, attr string) ([]byte, error) {
|
||||||
pathErr := func(err error) ([]byte, error) {
|
sysErr := func(err error) ([]byte, error) {
|
||||||
return nil, &fs.PathError{Op: "lgetxattr", Path: path, Err: err}
|
return nil, &XattrError{Op: "lgetxattr", Attr: attr, Path: path, Err: err}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start with a 128 length byte array
|
// Start with a 128 length byte array
|
||||||
|
@ -22,7 +20,7 @@ func Lgetxattr(path string, attr string) ([]byte, error) {
|
||||||
// Buffer too small, use zero-sized buffer to get the actual size
|
// Buffer too small, use zero-sized buffer to get the actual size
|
||||||
sz, errno = unix.Lgetxattr(path, attr, []byte{})
|
sz, errno = unix.Lgetxattr(path, attr, []byte{})
|
||||||
if errno != nil {
|
if errno != nil {
|
||||||
return pathErr(errno)
|
return sysErr(errno)
|
||||||
}
|
}
|
||||||
dest = make([]byte, sz)
|
dest = make([]byte, sz)
|
||||||
sz, errno = unix.Lgetxattr(path, attr, dest)
|
sz, errno = unix.Lgetxattr(path, attr, dest)
|
||||||
|
@ -32,7 +30,7 @@ func Lgetxattr(path string, attr string) ([]byte, error) {
|
||||||
case errno == unix.ENODATA:
|
case errno == unix.ENODATA:
|
||||||
return nil, nil
|
return nil, nil
|
||||||
case errno != nil:
|
case errno != nil:
|
||||||
return pathErr(errno)
|
return sysErr(errno)
|
||||||
}
|
}
|
||||||
|
|
||||||
return dest[:sz], nil
|
return dest[:sz], nil
|
||||||
|
@ -43,7 +41,7 @@ func Lgetxattr(path string, attr string) ([]byte, error) {
|
||||||
func Lsetxattr(path string, attr string, data []byte, flags int) error {
|
func Lsetxattr(path string, attr string, data []byte, flags int) error {
|
||||||
err := unix.Lsetxattr(path, attr, data, flags)
|
err := unix.Lsetxattr(path, attr, data, flags)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return &fs.PathError{Op: "lsetxattr", Path: path, Err: err}
|
return &XattrError{Op: "lsetxattr", Attr: attr, Path: path, Err: err}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ github.com/docker/distribution/registry/client/transport
|
||||||
github.com/docker/distribution/registry/storage/cache
|
github.com/docker/distribution/registry/storage/cache
|
||||||
github.com/docker/distribution/registry/storage/cache/memory
|
github.com/docker/distribution/registry/storage/cache/memory
|
||||||
github.com/docker/distribution/uuid
|
github.com/docker/distribution/uuid
|
||||||
# github.com/docker/docker v25.0.0+incompatible
|
# github.com/docker/docker v25.0.1+incompatible
|
||||||
## explicit
|
## explicit
|
||||||
github.com/docker/docker/api
|
github.com/docker/docker/api
|
||||||
github.com/docker/docker/api/types
|
github.com/docker/docker/api/types
|
||||||
|
|
Loading…
Reference in New Issue