vendor: docker d15be0c54de92a4d868ebd66dbb1065e264554f2 / v22.06-dev

full diff: cd8873dd3d...d15be0c54d

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-11-17 11:01:35 +01:00
Родитель 722cde068f
Коммит 845f002d3c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 76698F39D527CE8C
11 изменённых файлов: 51 добавлений и 55 удалений

Просмотреть файл

@ -77,7 +77,7 @@ require (
)
replace (
github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221116131102-cd8873dd3d21+incompatible // 22.06 branch (v22.06-dev)
github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221117094850-d15be0c54de9+incompatible // 22.06 branch (v22.06-dev)
// Resolve dependency hell with github.com/cloudflare/cfssl (transitive via
// swarmkit) by pinning the certificate-transparency-go version. Remove once

Просмотреть файл

@ -101,8 +101,8 @@ github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xb
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68=
github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v20.10.3-0.20221116131102-cd8873dd3d21+incompatible h1:9yS78attW84p2jbXDLfAGOwxh/hCkiPq1argIQEKEZ4=
github.com/docker/docker v20.10.3-0.20221116131102-cd8873dd3d21+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v20.10.3-0.20221117094850-d15be0c54de9+incompatible h1:148CEtil9pdujrgsujs9P1PglhnefnHjp7BqoDB6sF4=
github.com/docker/docker v20.10.3-0.20221117094850-d15be0c54de9+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A=
github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0=
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=

9
vendor/github.com/docker/docker/pkg/archive/diff.go сгенерированный поставляемый
Просмотреть файл

@ -229,13 +229,8 @@ func applyLayerHandler(dest string, layer io.Reader, options *TarOptions, decomp
dest = filepath.Clean(dest)
// We need to be able to set any perms
if runtime.GOOS != "windows" {
oldmask, err := system.Umask(0)
if err != nil {
return 0, err
}
defer system.Umask(oldmask)
}
restore := overrideUmask(0)
defer restore()
if decompress {
decompLayer, err := DecompressStream(layer)

22
vendor/github.com/docker/docker/pkg/archive/diff_unix.go сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,22 @@
//go:build !windows
// +build !windows
package archive
import "golang.org/x/sys/unix"
// overrideUmask sets current process's file mode creation mask to newmask
// and returns a function to restore it.
//
// WARNING for readers stumbling upon this code. Changing umask in a multi-
// threaded environment isn't safe. Don't use this without understanding the
// risks, and don't export this function for others to use (we shouldn't even
// be using this ourself).
//
// FIXME(thaJeztah): we should get rid of these hacks if possible.
func overrideUmask(newMask int) func() {
oldMask := unix.Umask(newMask)
return func() {
unix.Umask(oldMask)
}
}

6
vendor/github.com/docker/docker/pkg/archive/diff_windows.go сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,6 @@
package archive
// overrideUmask is a no-op on windows.
func overrideUmask(newmask int) func() {
return func() {}
}

15
vendor/github.com/docker/docker/pkg/idtools/idtools_unix.go сгенерированный поставляемый
Просмотреть файл

@ -8,6 +8,7 @@ import (
"fmt"
"io"
"os"
"os/exec"
"path/filepath"
"strconv"
"sync"
@ -199,7 +200,7 @@ func callGetent(database, key string) (io.Reader, error) {
}
out, err := execCmd(getentCmd, database, key)
if err != nil {
exitCode, errC := system.GetExitCode(err)
exitCode, errC := getExitCode(err)
if errC != nil {
return nil, err
}
@ -217,6 +218,18 @@ func callGetent(database, key string) (io.Reader, error) {
return bytes.NewReader(out), nil
}
// getExitCode returns the ExitStatus of the specified error if its type is
// exec.ExitError, returns 0 and an error otherwise.
func getExitCode(err error) (int, error) {
exitCode := 0
if exiterr, ok := err.(*exec.ExitError); ok {
if procExit, ok := exiterr.Sys().(syscall.WaitStatus); ok {
return procExit.ExitStatus(), nil
}
}
return exitCode, fmt.Errorf("failed to get exit code")
}
// setPermissions performs a chown/chmod only if the uid/gid don't match what's requested
// Normally a Chown is a no-op if uid/gid match, but in some cases this can still cause an error, e.g. if the
// dir is on an NFS share, so don't call chown unless we absolutely must.

19
vendor/github.com/docker/docker/pkg/system/exitcode.go сгенерированный поставляемый
Просмотреть файл

@ -1,19 +0,0 @@
package system // import "github.com/docker/docker/pkg/system"
import (
"fmt"
"os/exec"
"syscall"
)
// GetExitCode returns the ExitStatus of the specified error if its type is
// exec.ExitError, returns 0 and an error otherwise.
func GetExitCode(err error) (int, error) {
exitCode := 0
if exiterr, ok := err.(*exec.ExitError); ok {
if procExit, ok := exiterr.Sys().(syscall.WaitStatus); ok {
return procExit.ExitStatus(), nil
}
}
return exitCode, fmt.Errorf("failed to get exit code")
}

4
vendor/github.com/docker/docker/pkg/system/stat_windows.go сгенерированный поставляемый
Просмотреть файл

@ -20,12 +20,12 @@ func (s StatT) Size() int64 {
// Mode returns file's permission mode.
func (s StatT) Mode() os.FileMode {
return os.FileMode(s.mode)
return s.mode
}
// Mtim returns file's last modification time.
func (s StatT) Mtim() time.Time {
return time.Time(s.mtim)
return s.mtim
}
// Stat takes a path to a file and returns

14
vendor/github.com/docker/docker/pkg/system/umask.go сгенерированный поставляемый
Просмотреть файл

@ -1,14 +0,0 @@
//go:build !windows
// +build !windows
package system // import "github.com/docker/docker/pkg/system"
import (
"golang.org/x/sys/unix"
)
// Umask sets current process's file mode creation mask to newmask
// and returns oldmask.
func Umask(newmask int) (oldmask int, err error) {
return unix.Umask(newmask), nil
}

7
vendor/github.com/docker/docker/pkg/system/umask_windows.go сгенерированный поставляемый
Просмотреть файл

@ -1,7 +0,0 @@
package system // import "github.com/docker/docker/pkg/system"
// Umask is not supported on the windows platform.
func Umask(newmask int) (oldmask int, err error) {
// should not be called on cli code path
return 0, ErrNotSupportedPlatform
}

4
vendor/modules.txt поставляемый
Просмотреть файл

@ -39,7 +39,7 @@ github.com/docker/distribution/registry/client/transport
github.com/docker/distribution/registry/storage/cache
github.com/docker/distribution/registry/storage/cache/memory
github.com/docker/distribution/uuid
# github.com/docker/docker v20.10.21+incompatible => github.com/docker/docker v20.10.3-0.20221116131102-cd8873dd3d21+incompatible
# github.com/docker/docker v20.10.21+incompatible => github.com/docker/docker v20.10.3-0.20221117094850-d15be0c54de9+incompatible
## explicit
github.com/docker/docker/api
github.com/docker/docker/api/types
@ -398,5 +398,5 @@ gotest.tools/v3/internal/format
gotest.tools/v3/internal/source
gotest.tools/v3/poll
gotest.tools/v3/skip
# github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221116131102-cd8873dd3d21+incompatible
# github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221117094850-d15be0c54de9+incompatible
# github.com/google/certificate-transparency-go => github.com/google/certificate-transparency-go v1.0.20