diff --git a/go.mod b/go.mod index 9faa7bef1cdae..086bccb37bb71 100644 --- a/go.mod +++ b/go.mod @@ -57,7 +57,7 @@ require ( github.com/sirupsen/logrus v1.4.1 github.com/stretchr/testify v1.3.0 github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 // indirect - github.com/tonistiigi/fsutil v0.0.0-20190327153851-3bbb99cdbd76 + github.com/tonistiigi/fsutil v0.0.0-20190819224149-3d2716dd0a4d github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea github.com/uber/jaeger-client-go v0.0.0-20180103221425-e02c85f9069e github.com/uber/jaeger-lib v1.2.1 // indirect diff --git a/go.sum b/go.sum index 7966fc20ecdfc..705a70a9d7b64 100644 --- a/go.sum +++ b/go.sum @@ -144,8 +144,8 @@ github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 h1:b6uOv7YOFK0 github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tiborvass/continuity v0.0.0-20190821231029-461eceee38df h1:wqq1QvcxorfJKX8bWhTtenUpg9qxCjvuNn/lh2SM4UQ= github.com/tiborvass/continuity v0.0.0-20190821231029-461eceee38df/go.mod h1:vVTllsaz7LhFIffF49bKxclxe57wHiquWHHUIDQncaE= -github.com/tonistiigi/fsutil v0.0.0-20190327153851-3bbb99cdbd76 h1:eGfgYrNUSD448sa4mxH6nQpyZfN39QH0mLB7QaKIjus= -github.com/tonistiigi/fsutil v0.0.0-20190327153851-3bbb99cdbd76/go.mod h1:pzh7kdwkDRh+Bx8J30uqaKJ1M4QrSH/um8fcIXeM8rc= +github.com/tonistiigi/fsutil v0.0.0-20190819224149-3d2716dd0a4d h1:HJg27yqwTV7vFG9dWPDbUi373o/bmSDYGN9mZgVwdH0= +github.com/tonistiigi/fsutil v0.0.0-20190819224149-3d2716dd0a4d/go.mod h1:pzh7kdwkDRh+Bx8J30uqaKJ1M4QrSH/um8fcIXeM8rc= github.com/tonistiigi/go-immutable-radix v0.0.0-20170803185627-826af9ccf0fe h1:pd7hrFSqUPxYS9IB+UMG1AB/8EXGXo17ssx0bSQ5L6Y= github.com/tonistiigi/go-immutable-radix v0.0.0-20170803185627-826af9ccf0fe/go.mod h1:/+MCh11CJf2oz0BXmlmqyopK/ad1rKkcOXPoYuPCJYU= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0= diff --git a/vendor/github.com/tonistiigi/fsutil/copy/copy.go b/vendor/github.com/tonistiigi/fsutil/copy/copy.go index a57f9dc8eaaf4..f9d91fdaeeb66 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_linux.go b/vendor/github.com/tonistiigi/fsutil/copy/copy_linux.go index 94b023d1c54a6..8d1c9d2b8f563 100644 --- a/vendor/github.com/tonistiigi/fsutil/copy/copy_linux.go +++ b/vendor/github.com/tonistiigi/fsutil/copy/copy_linux.go @@ -52,6 +52,21 @@ func (c *copier) copyFileInfo(fi os.FileInfo, name string) error { return nil } +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 copyFileContent(dst, src *os.File) error { st, err := src.Stat() if err != nil { diff --git a/vendor/github.com/tonistiigi/fsutil/copy/copy_unix.go b/vendor/github.com/tonistiigi/fsutil/copy/copy_unix.go index f80b7dd807f2f..dc8ff5d3abc87 100644 --- a/vendor/github.com/tonistiigi/fsutil/copy/copy_unix.go +++ b/vendor/github.com/tonistiigi/fsutil/copy/copy_unix.go @@ -3,7 +3,6 @@ package fs import ( - "io" "os" "syscall" @@ -51,14 +50,6 @@ func (c *copier) copyFileInfo(fi os.FileInfo, name string) error { return nil } -func copyFileContent(dst, src *os.File) error { - buf := bufferPool.Get().(*[]byte) - _, err := io.CopyBuffer(dst, src, *buf) - bufferPool.Put(buf) - - return err -} - func copyDevice(dst string, fi os.FileInfo) error { st, ok := fi.Sys().(*syscall.Stat_t) if !ok { diff --git a/vendor/github.com/tonistiigi/fsutil/copy/copy_windows.go b/vendor/github.com/tonistiigi/fsutil/copy/copy_windows.go index 1c6abb596ccfb..330c0e3f2c352 100644 --- a/vendor/github.com/tonistiigi/fsutil/copy/copy_windows.go +++ b/vendor/github.com/tonistiigi/fsutil/copy/copy_windows.go @@ -17,6 +17,21 @@ func (c *copier) copyFileInfo(fi os.FileInfo, name string) error { return nil } +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 copyFileContent(dst, src *os.File) error { buf := bufferPool.Get().(*[]byte) _, err := io.CopyBuffer(dst, src, *buf) diff --git a/vendor/github.com/tonistiigi/fsutil/stat.go b/vendor/github.com/tonistiigi/fsutil/stat.go index 573894da8062d..789dce3dbfb4e 100644 --- a/vendor/github.com/tonistiigi/fsutil/stat.go +++ b/vendor/github.com/tonistiigi/fsutil/stat.go @@ -49,6 +49,9 @@ func mkstat(path, relpath string, fi os.FileInfo, inodemap map[uint64]string) (* stat.Mode = noPermPart | permPart } + // Clear the socket bit since archive/tar.FileInfoHeader does not handle it + stat.Mode &^= uint32(os.ModeSocket) + return stat, nil } diff --git a/vendor/modules.txt b/vendor/modules.txt index 6c89d3d1b346a..7574a66ef3dff 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -239,7 +239,7 @@ github.com/stretchr/testify/require github.com/stretchr/testify/assert # github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 github.com/syndtr/gocapability/capability -# github.com/tonistiigi/fsutil v0.0.0-20190327153851-3bbb99cdbd76 +# github.com/tonistiigi/fsutil v0.0.0-20190819224149-3d2716dd0a4d github.com/tonistiigi/fsutil github.com/tonistiigi/fsutil/types github.com/tonistiigi/fsutil/copy