From 94a8c8b3c09540497f6fb7a3d40de80610c920ac Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 25 Oct 2019 01:49:54 +0200 Subject: [PATCH] vendor: update fsutil 0f039a052ca1da01626278199624b62aed9b3729 full diff: https://github.com/tonistiigi/fsutil/compare/3bbb99cdbd76619ab717299830c60f6f2a533a6b...0f039a052ca1da01626278199624b62aed9b3729 - tonistiigi/fsutil#66 copy: add fast copy path for darwin - tonistiigi/fsutil#67 Treat Unix sockets as regular files - relates to moby/buildkit#1144 Fix socket handling - tonistiigi/fsutil#68 fix gocrypto commit - tonistiigi/fsutil#69 receive: use filter on receive diff - prevents incremental transfers with userns because the metadata on disk is always different than the one being transferred. Signed-off-by: Sebastiaan van Stijn --- vendor.conf | 2 +- .../github.com/tonistiigi/fsutil/copy/copy.go | 15 ---- .../tonistiigi/fsutil/copy/copy_darwin.go | 84 +++++++++++++++++++ .../tonistiigi/fsutil/copy/copy_linux.go | 15 ++++ .../tonistiigi/fsutil/copy/copy_unix.go | 9 -- .../tonistiigi/fsutil/copy/copy_windows.go | 15 ++++ vendor/github.com/tonistiigi/fsutil/diff.go | 8 +- .../tonistiigi/fsutil/diff_containerd.go | 47 +++++------ .../tonistiigi/fsutil/diskwriter.go | 6 +- vendor/github.com/tonistiigi/fsutil/go.mod | 2 +- .../github.com/tonistiigi/fsutil/receive.go | 8 +- vendor/github.com/tonistiigi/fsutil/stat.go | 3 + .../tonistiigi/fsutil/types/stat.go | 7 ++ 13 files changed, 162 insertions(+), 59 deletions(-) create mode 100644 vendor/github.com/tonistiigi/fsutil/copy/copy_darwin.go create mode 100644 vendor/github.com/tonistiigi/fsutil/types/stat.go diff --git a/vendor.conf b/vendor.conf index e878a75ec5..1f4e40466a 100644 --- a/vendor.conf +++ b/vendor.conf @@ -27,7 +27,7 @@ golang.org/x/sync e225da77a7e68af35c70ccbf71af # buildkit github.com/moby/buildkit 4f4e03067523b2fc5ca2f17514a5e75ad63e02fb -github.com/tonistiigi/fsutil 3bbb99cdbd76619ab717299830c60f6f2a533a6b +github.com/tonistiigi/fsutil 0f039a052ca1da01626278199624b62aed9b3729 github.com/grpc-ecosystem/grpc-opentracing 8e809c8a86450a29b90dcc9efbf062d0fe6d9746 github.com/opentracing/opentracing-go 1361b9cd60be79c4c3a7fa9841b3c132e40066a7 github.com/google/shlex 6f45313302b9c56850fc17f99e40caebce98c716 diff --git a/vendor/github.com/tonistiigi/fsutil/copy/copy.go b/vendor/github.com/tonistiigi/fsutil/copy/copy.go index a57f9dc8ea..f9d91fdaee 100644 --- a/vendor/github.com/tonistiigi/fsutil/copy/copy.go +++ b/vendor/github.com/tonistiigi/fsutil/copy/copy.go @@ -329,21 +329,6 @@ func ensureEmptyFileTarget(dst string) error { return os.Remove(dst) } -func copyFile(source, target string) error { - src, err := os.Open(source) - if err != nil { - return errors.Wrapf(err, "failed to open source %s", source) - } - defer src.Close() - tgt, err := os.Create(target) - if err != nil { - return errors.Wrapf(err, "failed to open target %s", target) - } - defer tgt.Close() - - return copyFileContent(tgt, src) -} - func containsWildcards(name string) bool { isWindows := runtime.GOOS == "windows" for i := 0; i < len(name); i++ { diff --git a/vendor/github.com/tonistiigi/fsutil/copy/copy_darwin.go b/vendor/github.com/tonistiigi/fsutil/copy/copy_darwin.go new file mode 100644 index 0000000000..2882dfda9d --- /dev/null +++ b/vendor/github.com/tonistiigi/fsutil/copy/copy_darwin.go @@ -0,0 +1,84 @@ +// +build darwin + +package fs + +import ( + "io" + "os" + "syscall" + "unsafe" + + "github.com/pkg/errors" + "golang.org/x/sys/unix" +) + +//