vendor: update buildkit to opentelemetry support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
6
vendor/github.com/docker/docker/pkg/namesgenerator/names-generator.go
generated
vendored
6
vendor/github.com/docker/docker/pkg/namesgenerator/names-generator.go
generated
vendored
@@ -596,6 +596,9 @@ var (
|
||||
// Maryam Mirzakhani - an Iranian mathematician and the first woman to win the Fields Medal. https://en.wikipedia.org/wiki/Maryam_Mirzakhani
|
||||
"mirzakhani",
|
||||
|
||||
// Rita Levi-Montalcini - Won Nobel Prize in Physiology or Medicine jointly with colleague Stanley Cohen for the discovery of nerve growth factor (https://en.wikipedia.org/wiki/Rita_Levi-Montalcini)
|
||||
"montalcini",
|
||||
|
||||
// Gordon Earle Moore - American engineer, Silicon Valley founding father, author of Moore's law. https://en.wikipedia.org/wiki/Gordon_Moore
|
||||
"moore",
|
||||
|
||||
@@ -677,9 +680,6 @@ var (
|
||||
// Sally Kristen Ride was an American physicist and astronaut. She was the first American woman in space, and the youngest American astronaut. https://en.wikipedia.org/wiki/Sally_Ride
|
||||
"ride",
|
||||
|
||||
// Rita Levi-Montalcini - Won Nobel Prize in Physiology or Medicine jointly with colleague Stanley Cohen for the discovery of nerve growth factor (https://en.wikipedia.org/wiki/Rita_Levi-Montalcini)
|
||||
"montalcini",
|
||||
|
||||
// Dennis Ritchie - co-creator of UNIX and the C programming language. - https://en.wikipedia.org/wiki/Dennis_Ritchie
|
||||
"ritchie",
|
||||
|
||||
|
||||
48
vendor/github.com/docker/docker/pkg/system/lcow.go
generated
vendored
48
vendor/github.com/docker/docker/pkg/system/lcow.go
generated
vendored
@@ -1,48 +0,0 @@
|
||||
// +build windows,!no_lcow
|
||||
|
||||
package system // import "github.com/docker/docker/pkg/system"
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/Microsoft/hcsshim/osversion"
|
||||
specs "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
var (
|
||||
// lcowSupported determines if Linux Containers on Windows are supported.
|
||||
lcowSupported = false
|
||||
)
|
||||
|
||||
// InitLCOW sets whether LCOW is supported or not. Requires RS5+
|
||||
func InitLCOW(experimental bool) {
|
||||
if experimental && osversion.Build() >= osversion.RS5 {
|
||||
lcowSupported = true
|
||||
}
|
||||
}
|
||||
|
||||
func LCOWSupported() bool {
|
||||
return lcowSupported
|
||||
}
|
||||
|
||||
// ValidatePlatform determines if a platform structure is valid.
|
||||
// TODO This is a temporary windows-only function, should be replaced by
|
||||
// comparison of worker capabilities
|
||||
func ValidatePlatform(platform specs.Platform) error {
|
||||
if !IsOSSupported(platform.OS) {
|
||||
return errors.Errorf("unsupported os %s", platform.OS)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// IsOSSupported determines if an operating system is supported by the host
|
||||
func IsOSSupported(os string) bool {
|
||||
if strings.EqualFold("windows", os) {
|
||||
return true
|
||||
}
|
||||
if LCOWSupported() && strings.EqualFold(os, "linux") {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
13
vendor/github.com/docker/docker/pkg/system/lcow_unsupported.go
generated
vendored
13
vendor/github.com/docker/docker/pkg/system/lcow_unsupported.go
generated
vendored
@@ -1,27 +1,14 @@
|
||||
// +build !windows windows,no_lcow
|
||||
|
||||
package system // import "github.com/docker/docker/pkg/system"
|
||||
import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
specs "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
)
|
||||
|
||||
// InitLCOW does nothing since LCOW is a windows only feature
|
||||
func InitLCOW(_ bool) {}
|
||||
|
||||
// LCOWSupported returns true if Linux containers on Windows are supported.
|
||||
func LCOWSupported() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// ValidatePlatform determines if a platform structure is valid. This function
|
||||
// is used for LCOW, and is a no-op on non-windows platforms.
|
||||
func ValidatePlatform(_ specs.Platform) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// IsOSSupported determines if an operating system is supported by the host.
|
||||
func IsOSSupported(os string) bool {
|
||||
return strings.EqualFold(runtime.GOOS, os)
|
||||
|
||||
32
vendor/github.com/docker/docker/pkg/system/path.go
generated
vendored
32
vendor/github.com/docker/docker/pkg/system/path.go
generated
vendored
@@ -1,24 +1,15 @@
|
||||
package system // import "github.com/docker/docker/pkg/system"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const defaultUnixPathEnv = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
|
||||
// DefaultPathEnv is unix style list of directories to search for
|
||||
// executables. Each directory is separated from the next by a colon
|
||||
// ':' character .
|
||||
// For Windows containers, an empty string is returned as the default
|
||||
// path will be set by the container, and Docker has no context of what the
|
||||
// default path should be.
|
||||
func DefaultPathEnv(os string) string {
|
||||
if runtime.GOOS == "windows" {
|
||||
if os != runtime.GOOS {
|
||||
return defaultUnixPathEnv
|
||||
}
|
||||
// Deliberately empty on Windows containers on Windows as the default path will be set by
|
||||
// the container. Docker has no context of what the default path should be.
|
||||
if os == "windows" {
|
||||
return ""
|
||||
}
|
||||
return defaultUnixPathEnv
|
||||
@@ -47,18 +38,5 @@ type PathVerifier interface {
|
||||
// /a --> \a
|
||||
// d:\ --> Fail
|
||||
func CheckSystemDriveAndRemoveDriveLetter(path string, driver PathVerifier) (string, error) {
|
||||
if runtime.GOOS != "windows" || LCOWSupported() {
|
||||
return path, nil
|
||||
}
|
||||
|
||||
if len(path) == 2 && string(path[1]) == ":" {
|
||||
return "", fmt.Errorf("No relative path specified in %q", path)
|
||||
}
|
||||
if !driver.IsAbs(path) || len(path) < 2 {
|
||||
return filepath.FromSlash(path), nil
|
||||
}
|
||||
if string(path[1]) == ":" && !strings.EqualFold(string(path[0]), "c") {
|
||||
return "", fmt.Errorf("The specified path is not on the system drive (C:)")
|
||||
}
|
||||
return filepath.FromSlash(path[2:]), nil
|
||||
return checkSystemDriveAndRemoveDriveLetter(path, driver)
|
||||
}
|
||||
|
||||
6
vendor/github.com/docker/docker/pkg/system/path_unix.go
generated
vendored
6
vendor/github.com/docker/docker/pkg/system/path_unix.go
generated
vendored
@@ -8,3 +8,9 @@ package system // import "github.com/docker/docker/pkg/system"
|
||||
func GetLongPathName(path string) (string, error) {
|
||||
return path, nil
|
||||
}
|
||||
|
||||
// checkSystemDriveAndRemoveDriveLetter is the non-Windows implementation
|
||||
// of CheckSystemDriveAndRemoveDriveLetter
|
||||
func checkSystemDriveAndRemoveDriveLetter(path string, driver PathVerifier) (string, error) {
|
||||
return path, nil
|
||||
}
|
||||
|
||||
23
vendor/github.com/docker/docker/pkg/system/path_windows.go
generated
vendored
23
vendor/github.com/docker/docker/pkg/system/path_windows.go
generated
vendored
@@ -1,6 +1,12 @@
|
||||
package system // import "github.com/docker/docker/pkg/system"
|
||||
|
||||
import "golang.org/x/sys/windows"
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
// GetLongPathName converts Windows short pathnames to full pathnames.
|
||||
// For example C:\Users\ADMIN~1 --> C:\Users\Administrator.
|
||||
@@ -25,3 +31,18 @@ func GetLongPathName(path string) (string, error) {
|
||||
}
|
||||
return windows.UTF16ToString(b), nil
|
||||
}
|
||||
|
||||
// checkSystemDriveAndRemoveDriveLetter is the Windows implementation
|
||||
// of CheckSystemDriveAndRemoveDriveLetter
|
||||
func checkSystemDriveAndRemoveDriveLetter(path string, driver PathVerifier) (string, error) {
|
||||
if len(path) == 2 && string(path[1]) == ":" {
|
||||
return "", fmt.Errorf("No relative path specified in %q", path)
|
||||
}
|
||||
if !driver.IsAbs(path) || len(path) < 2 {
|
||||
return filepath.FromSlash(path), nil
|
||||
}
|
||||
if string(path[1]) == ":" && !strings.EqualFold(string(path[0]), "c") {
|
||||
return "", fmt.Errorf("The specified path is not on the system drive (C:)")
|
||||
}
|
||||
return filepath.FromSlash(path[2:]), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user