[19.03] vendor: buildkit v0.6.4-5-g59e305aa
full diff: b26cff2413...59e305aa33
- moby/buildkit#1469 Avoid creation of irrelevant temporary files on Windows
- backport of moby/buildkit#1462 for the docker-19.03/v0.6 branch
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
2fbb374ab7
commit
63841af153
4 changed files with 43 additions and 43 deletions
|
@ -26,7 +26,7 @@ github.com/imdario/mergo 7c29201646fa3de8506f70121347
|
|||
golang.org/x/sync e225da77a7e68af35c70ccbf71af2b83e6acac3c
|
||||
|
||||
# buildkit
|
||||
github.com/moby/buildkit b26cff2413cc6a466f8739262efa13bd126f8fc7 # v0.6.4 + aa7df97d7136e732561b59f87a38ad52d46d3b19
|
||||
github.com/moby/buildkit 59e305aa33fd96e51d5c458f55104250b3e39f56 # v0.6.4-5-g59e305aa
|
||||
github.com/tonistiigi/fsutil 6c909ab392c173a4264ae1bfcbc0450b9aac0c7d
|
||||
github.com/grpc-ecosystem/grpc-opentracing 8e809c8a86450a29b90dcc9efbf062d0fe6d9746
|
||||
github.com/opentracing/opentracing-go 1361b9cd60be79c4c3a7fa9841b3c132e40066a7
|
||||
|
|
42
vendor/github.com/moby/buildkit/util/binfmt_misc/check.go
generated
vendored
42
vendor/github.com/moby/buildkit/util/binfmt_misc/check.go
generated
vendored
|
@ -1,42 +0,0 @@
|
|||
package binfmt_misc
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"compress/gzip"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
func check(bin string) error {
|
||||
tmpdir, err := ioutil.TempDir("", "qemu-check")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer os.RemoveAll(tmpdir)
|
||||
pp := filepath.Join(tmpdir, "check")
|
||||
|
||||
r, err := gzip.NewReader(bytes.NewReader([]byte(bin)))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer r.Close()
|
||||
|
||||
f, err := os.OpenFile(pp, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0700)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, err := io.Copy(f, r); err != nil {
|
||||
f.Close()
|
||||
return err
|
||||
}
|
||||
f.Close()
|
||||
|
||||
cmd := exec.Command("/check")
|
||||
withChroot(cmd, tmpdir)
|
||||
err = cmd.Run()
|
||||
return err
|
||||
}
|
37
vendor/github.com/moby/buildkit/util/binfmt_misc/check_unix.go
generated
vendored
37
vendor/github.com/moby/buildkit/util/binfmt_misc/check_unix.go
generated
vendored
|
@ -3,7 +3,13 @@
|
|||
package binfmt_misc
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"compress/gzip"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
|
@ -12,3 +18,34 @@ func withChroot(cmd *exec.Cmd, dir string) {
|
|||
Chroot: dir,
|
||||
}
|
||||
}
|
||||
|
||||
func check(bin string) error {
|
||||
tmpdir, err := ioutil.TempDir("", "qemu-check")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer os.RemoveAll(tmpdir)
|
||||
pp := filepath.Join(tmpdir, "check")
|
||||
|
||||
r, err := gzip.NewReader(bytes.NewReader([]byte(bin)))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer r.Close()
|
||||
|
||||
f, err := os.OpenFile(pp, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0700)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, err := io.Copy(f, r); err != nil {
|
||||
f.Close()
|
||||
return err
|
||||
}
|
||||
f.Close()
|
||||
|
||||
cmd := exec.Command("/check")
|
||||
withChroot(cmd, tmpdir)
|
||||
err = cmd.Run()
|
||||
return err
|
||||
}
|
||||
|
|
5
vendor/github.com/moby/buildkit/util/binfmt_misc/check_windows.go
generated
vendored
5
vendor/github.com/moby/buildkit/util/binfmt_misc/check_windows.go
generated
vendored
|
@ -3,8 +3,13 @@
|
|||
package binfmt_misc
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
func withChroot(cmd *exec.Cmd, dir string) {
|
||||
}
|
||||
|
||||
func check(bin string) error {
|
||||
return errors.New("binfmt is not supported on Windows")
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue