diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 3662d9d0355..4656fb48a3c 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -88,58 +88,63 @@ }, { "ImportPath": "github.com/docker/docker/pkg/archive", - "Comment": "v1.4.1-656-g2115131", - "Rev": "211513156dc1ace48e630b4bf4ea0fcfdc8d9abf" + "Comment": "v1.4.1-1714-ged66853", + "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" }, { "ImportPath": "github.com/docker/docker/pkg/fileutils", - "Comment": "v1.4.1-656-g2115131", - "Rev": "211513156dc1ace48e630b4bf4ea0fcfdc8d9abf" + "Comment": "v1.4.1-1714-ged66853", + "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" }, { "ImportPath": "github.com/docker/docker/pkg/ioutils", - "Comment": "v1.4.1-656-g2115131", - "Rev": "211513156dc1ace48e630b4bf4ea0fcfdc8d9abf" + "Comment": "v1.4.1-1714-ged66853", + "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" }, { "ImportPath": "github.com/docker/docker/pkg/mount", - "Comment": "v1.4.1-656-g2115131", - "Rev": "211513156dc1ace48e630b4bf4ea0fcfdc8d9abf" + "Comment": "v1.4.1-1714-ged66853", + "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" + }, + { + "ImportPath": "github.com/docker/docker/pkg/parsers", + "Comment": "v1.4.1-1714-ged66853", + "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" }, { "ImportPath": "github.com/docker/docker/pkg/pools", - "Comment": "v1.4.1-656-g2115131", - "Rev": "211513156dc1ace48e630b4bf4ea0fcfdc8d9abf" + "Comment": "v1.4.1-1714-ged66853", + "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" }, { "ImportPath": "github.com/docker/docker/pkg/promise", - "Comment": "v1.4.1-656-g2115131", - "Rev": "211513156dc1ace48e630b4bf4ea0fcfdc8d9abf" + "Comment": "v1.4.1-1714-ged66853", + "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" }, { "ImportPath": "github.com/docker/docker/pkg/symlink", - "Comment": "v1.4.1-656-g2115131", - "Rev": "211513156dc1ace48e630b4bf4ea0fcfdc8d9abf" + "Comment": "v1.4.1-1714-ged66853", + "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" }, { "ImportPath": "github.com/docker/docker/pkg/system", - "Comment": "v1.4.1-656-g2115131", - "Rev": "211513156dc1ace48e630b4bf4ea0fcfdc8d9abf" + "Comment": "v1.4.1-1714-ged66853", + "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" }, { "ImportPath": "github.com/docker/docker/pkg/term", - "Comment": "v1.4.1-656-g2115131", - "Rev": "211513156dc1ace48e630b4bf4ea0fcfdc8d9abf" + "Comment": "v1.4.1-1714-ged66853", + "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" }, { "ImportPath": "github.com/docker/docker/pkg/units", - "Comment": "v1.4.1-656-g2115131", - "Rev": "211513156dc1ace48e630b4bf4ea0fcfdc8d9abf" + "Comment": "v1.4.1-1714-ged66853", + "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" }, { "ImportPath": "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar", - "Comment": "v1.4.1-656-g2115131", - "Rev": "211513156dc1ace48e630b4bf4ea0fcfdc8d9abf" + "Comment": "v1.4.1-1714-ged66853", + "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" }, { "ImportPath": "github.com/docker/libcontainer", diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/MAINTAINERS b/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/MAINTAINERS deleted file mode 100644 index 2aac7265d23..00000000000 --- a/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/MAINTAINERS +++ /dev/null @@ -1,2 +0,0 @@ -Cristian Staretu (@unclejack) -Tibor Vass (@tiborvass) diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/archive.go b/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/archive.go index 35566520b1c..bfa6e18462f 100644 --- a/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/archive.go +++ b/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/archive.go @@ -101,7 +101,6 @@ func DecompressStream(archive io.Reader) (io.ReadCloser, error) { if err != nil { return nil, err } - log.Debugf("[tar autodetect] n: %v", bs) compression := DetectCompression(bs) switch compression { @@ -173,6 +172,21 @@ type tarAppender struct { SeenFiles map[uint64]string } +// canonicalTarName provides a platform-independent and consistent posix-style +//path for files and directories to be archived regardless of the platform. +func canonicalTarName(name string, isDir bool) (string, error) { + name, err := CanonicalTarNameForPath(name) + if err != nil { + return "", err + } + + // suffix with '/' for directories + if isDir && !strings.HasSuffix(name, "/") { + name += "/" + } + return name, nil +} + func (ta *tarAppender) addTarFile(path, name string) error { fi, err := os.Lstat(path) if err != nil { @@ -190,11 +204,12 @@ func (ta *tarAppender) addTarFile(path, name string) error { if err != nil { return err } + hdr.Mode = int64(chmodTarEntry(os.FileMode(hdr.Mode))) - if fi.IsDir() && !strings.HasSuffix(name, "/") { - name = name + "/" + name, err = canonicalTarName(name, fi.IsDir()) + if err != nil { + return fmt.Errorf("tar: cannot canonicalize path: %v", err) } - hdr.Name = name nlink, inode, err := setHeaderForSpecialDevice(hdr, ta, name, fi.Sys()) @@ -459,7 +474,7 @@ func TarWithOptions(srcPath string, options *TarOptions) (io.ReadCloser, error) } if err := ta.addTarFile(filePath, relFilePath); err != nil { - log.Debugf("Can't add file %s to tar: %s", srcPath, err) + log.Debugf("Can't add file %s to tar: %s", filePath, err) } return nil }) @@ -526,7 +541,7 @@ loop: if err != nil { return err } - if strings.HasPrefix(rel, "..") { + if strings.HasPrefix(rel, "../") { return breakoutError(fmt.Errorf("%q is outside of %q", hdr.Name, dest)) } @@ -682,6 +697,8 @@ func (archiver *Archiver) CopyFileWithTar(src, dst string) (err error) { return err } hdr.Name = filepath.Base(dst) + hdr.Mode = int64(chmodTarEntry(os.FileMode(hdr.Mode))) + tw := tar.NewWriter(w) defer tw.Close() if err := tw.WriteHeader(hdr); err != nil { diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/archive_unix.go b/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/archive_unix.go index c0e8aee93cf..cbce65e31d4 100644 --- a/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/archive_unix.go +++ b/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/archive_unix.go @@ -4,11 +4,26 @@ package archive import ( "errors" + "os" "syscall" "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ) +// canonicalTarNameForPath returns platform-specific filepath +// to canonical posix-style path for tar archival. p is relative +// path. +func CanonicalTarNameForPath(p string) (string, error) { + return p, nil // already unix-style +} + +// chmodTarEntry is used to adjust the file permissions used in tar header based +// on the platform the archival is done. + +func chmodTarEntry(perm os.FileMode) os.FileMode { + return perm // noop for unix as golang APIs provide perm bits correctly +} + func setHeaderForSpecialDevice(hdr *tar.Header, ta *tarAppender, name string, stat interface{}) (nlink uint32, inode uint64, err error) { s, ok := stat.(*syscall.Stat_t) diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/archive_windows.go b/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/archive_windows.go index 3cc2493f6f2..96a93ee7af9 100644 --- a/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/archive_windows.go +++ b/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/archive_windows.go @@ -3,9 +3,39 @@ package archive import ( + "fmt" + "os" + "strings" + "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ) +// canonicalTarNameForPath returns platform-specific filepath +// to canonical posix-style path for tar archival. p is relative +// path. +func CanonicalTarNameForPath(p string) (string, error) { + // windows: convert windows style relative path with backslashes + // into forward slashes. since windows does not allow '/' or '\' + // in file names, it is mostly safe to replace however we must + // check just in case + if strings.Contains(p, "/") { + return "", fmt.Errorf("windows path contains forward slash: %s", p) + } + return strings.Replace(p, string(os.PathSeparator), "/", -1), nil + +} + +// chmodTarEntry is used to adjust the file permissions used in tar header based +// on the platform the archival is done. +func chmodTarEntry(perm os.FileMode) os.FileMode { + // Clear r/w on grp/others: no precise equivalen of group/others on NTFS. + perm &= 0711 + // Add the x bit: make everything +x from windows + perm |= 0100 + + return perm +} + func setHeaderForSpecialDevice(hdr *tar.Header, ta *tarAppender, name string, stat interface{}) (nlink uint32, inode uint64, err error) { // do nothing. no notion of Rdev, Inode, Nlink in stat on Windows return diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/changes.go b/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/changes.go index 85217f6e088..f2ac2a3561d 100644 --- a/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/changes.go +++ b/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/changes.go @@ -6,6 +6,7 @@ import ( "io" "os" "path/filepath" + "sort" "strings" "syscall" "time" @@ -43,6 +44,13 @@ func (change *Change) String() string { return fmt.Sprintf("%s %s", kind, change.Path) } +// for sort.Sort +type changesByPath []Change + +func (c changesByPath) Less(i, j int) bool { return c[i].Path < c[j].Path } +func (c changesByPath) Len() int { return len(c) } +func (c changesByPath) Swap(i, j int) { c[j], c[i] = c[i], c[j] } + // Gnu tar and the go tar writer don't have sub-second mtime // precision, which is problematic when we apply changes via tar // files, we handle this by comparing for exact times, *or* same @@ -135,7 +143,7 @@ func Changes(layers []string, rw string) ([]Change, error) { type FileInfo struct { parent *FileInfo name string - stat *system.Stat + stat *system.Stat_t children map[string]*FileInfo capability []byte added bool @@ -373,6 +381,8 @@ func ExportChanges(dir string, changes []Change) (Archive, error) { // this buffer is needed for the duration of this piped stream defer pools.BufioWriter32KPool.Put(ta.Buffer) + sort.Sort(changesByPath(changes)) + // In general we log errors here but ignore them because // during e.g. a diff operation the container can continue // mutating the filesystem and we can see transient errors diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/changes_test.go b/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/changes_test.go index 6b8f2354b8a..8f32d7b30ea 100644 --- a/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/changes_test.go +++ b/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/changes_test.go @@ -25,13 +25,6 @@ func copyDir(src, dst string) error { return nil } -// Helper to sort []Change by path -type byPath struct{ changes []Change } - -func (b byPath) Less(i, j int) bool { return b.changes[i].Path < b.changes[j].Path } -func (b byPath) Len() int { return len(b.changes) } -func (b byPath) Swap(i, j int) { b.changes[i], b.changes[j] = b.changes[j], b.changes[i] } - type FileType uint32 const ( @@ -220,7 +213,7 @@ func TestChangesDirsMutated(t *testing.T) { t.Fatal(err) } - sort.Sort(byPath{changes}) + sort.Sort(changesByPath(changes)) expectedChanges := []Change{ {"/dir1", ChangeDelete}, diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/diff.go b/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/diff.go index ca282071f5c..b5eb63fd442 100644 --- a/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/diff.go +++ b/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/diff.go @@ -81,7 +81,7 @@ func UnpackLayer(dest string, layer ArchiveReader) (size int64, err error) { if err != nil { return 0, err } - if strings.HasPrefix(rel, "..") { + if strings.HasPrefix(rel, "../") { return 0, breakoutError(fmt.Errorf("%q is outside of %q", hdr.Name, dest)) } base := filepath.Base(path) diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/mount/MAINTAINERS b/Godeps/_workspace/src/github.com/docker/docker/pkg/mount/MAINTAINERS deleted file mode 100644 index 1e998f8ac1a..00000000000 --- a/Godeps/_workspace/src/github.com/docker/docker/pkg/mount/MAINTAINERS +++ /dev/null @@ -1 +0,0 @@ -Michael Crosby (@crosbymichael) diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/mount/sharedsubtree_linux_test.go b/Godeps/_workspace/src/github.com/docker/docker/pkg/mount/sharedsubtree_linux_test.go index 0986bd9c75d..da9aa15015a 100644 --- a/Godeps/_workspace/src/github.com/docker/docker/pkg/mount/sharedsubtree_linux_test.go +++ b/Godeps/_workspace/src/github.com/docker/docker/pkg/mount/sharedsubtree_linux_test.go @@ -9,7 +9,7 @@ import ( "testing" ) -// nothing is propogated in or out +// nothing is propagated in or out func TestSubtreePrivate(t *testing.T) { tmp := path.Join(os.TempDir(), "mount-tests") if err := os.MkdirAll(tmp, 0777); err != nil { diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/parsers/parsers.go b/Godeps/_workspace/src/github.com/docker/docker/pkg/parsers/parsers.go new file mode 100644 index 00000000000..59e294dc225 --- /dev/null +++ b/Godeps/_workspace/src/github.com/docker/docker/pkg/parsers/parsers.go @@ -0,0 +1,137 @@ +package parsers + +import ( + "fmt" + "strconv" + "strings" +) + +// FIXME: Change this not to receive default value as parameter +func ParseHost(defaultTCPAddr, defaultUnixAddr, addr string) (string, error) { + addr = strings.TrimSpace(addr) + if addr == "" { + addr = fmt.Sprintf("unix://%s", defaultUnixAddr) + } + addrParts := strings.Split(addr, "://") + if len(addrParts) == 1 { + addrParts = []string{"tcp", addrParts[0]} + } + + switch addrParts[0] { + case "tcp": + return ParseTCPAddr(addrParts[1], defaultTCPAddr) + case "unix": + return ParseUnixAddr(addrParts[1], defaultUnixAddr) + case "fd": + return addr, nil + default: + return "", fmt.Errorf("Invalid bind address format: %s", addr) + } +} + +func ParseUnixAddr(addr string, defaultAddr string) (string, error) { + addr = strings.TrimPrefix(addr, "unix://") + if strings.Contains(addr, "://") { + return "", fmt.Errorf("Invalid proto, expected unix: %s", addr) + } + if addr == "" { + addr = defaultAddr + } + return fmt.Sprintf("unix://%s", addr), nil +} + +func ParseTCPAddr(addr string, defaultAddr string) (string, error) { + addr = strings.TrimPrefix(addr, "tcp://") + if strings.Contains(addr, "://") || addr == "" { + return "", fmt.Errorf("Invalid proto, expected tcp: %s", addr) + } + + hostParts := strings.Split(addr, ":") + if len(hostParts) != 2 { + return "", fmt.Errorf("Invalid bind address format: %s", addr) + } + host := hostParts[0] + if host == "" { + host = defaultAddr + } + + p, err := strconv.Atoi(hostParts[1]) + if err != nil && p == 0 { + return "", fmt.Errorf("Invalid bind address format: %s", addr) + } + return fmt.Sprintf("tcp://%s:%d", host, p), nil +} + +// Get a repos name and returns the right reposName + tag|digest +// The tag can be confusing because of a port in a repository name. +// Ex: localhost.localdomain:5000/samalba/hipache:latest +// Digest ex: localhost:5000/foo/bar@sha256:bc8813ea7b3603864987522f02a76101c17ad122e1c46d790efc0fca78ca7bfb +func ParseRepositoryTag(repos string) (string, string) { + n := strings.Index(repos, "@") + if n >= 0 { + parts := strings.Split(repos, "@") + return parts[0], parts[1] + } + n = strings.LastIndex(repos, ":") + if n < 0 { + return repos, "" + } + if tag := repos[n+1:]; !strings.Contains(tag, "/") { + return repos[:n], tag + } + return repos, "" +} + +func PartParser(template, data string) (map[string]string, error) { + // ip:public:private + var ( + templateParts = strings.Split(template, ":") + parts = strings.Split(data, ":") + out = make(map[string]string, len(templateParts)) + ) + if len(parts) != len(templateParts) { + return nil, fmt.Errorf("Invalid format to parse. %s should match template %s", data, template) + } + + for i, t := range templateParts { + value := "" + if len(parts) > i { + value = parts[i] + } + out[t] = value + } + return out, nil +} + +func ParseKeyValueOpt(opt string) (string, string, error) { + parts := strings.SplitN(opt, "=", 2) + if len(parts) != 2 { + return "", "", fmt.Errorf("Unable to parse key/value option: %s", opt) + } + return strings.TrimSpace(parts[0]), strings.TrimSpace(parts[1]), nil +} + +func ParsePortRange(ports string) (uint64, uint64, error) { + if ports == "" { + return 0, 0, fmt.Errorf("Empty string specified for ports.") + } + if !strings.Contains(ports, "-") { + start, err := strconv.ParseUint(ports, 10, 16) + end := start + return start, end, err + } + + parts := strings.Split(ports, "-") + start, err := strconv.ParseUint(parts[0], 10, 16) + if err != nil { + return 0, 0, err + } + end, err := strconv.ParseUint(parts[1], 10, 16) + if err != nil { + return 0, 0, err + } + if end < start { + return 0, 0, fmt.Errorf("Invalid range specified for the Port: %s", ports) + } + return start, end, nil +} diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/MAINTAINERS b/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/MAINTAINERS deleted file mode 100644 index 51a41a5b605..00000000000 --- a/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/MAINTAINERS +++ /dev/null @@ -1,3 +0,0 @@ -Tibor Vass (@tiborvass) -Cristian Staretu (@unclejack) -Tianon Gravi (@tianon) diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/system/MAINTAINERS b/Godeps/_workspace/src/github.com/docker/docker/pkg/system/MAINTAINERS deleted file mode 100644 index 68a97d2fc24..00000000000 --- a/Godeps/_workspace/src/github.com/docker/docker/pkg/system/MAINTAINERS +++ /dev/null @@ -1,2 +0,0 @@ -Michael Crosby (@crosbymichael) -Victor Vieux (@vieux) diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/system/lstat.go b/Godeps/_workspace/src/github.com/docker/docker/pkg/system/lstat.go index 9ef82d55237..6c1ed2e3864 100644 --- a/Godeps/_workspace/src/github.com/docker/docker/pkg/system/lstat.go +++ b/Godeps/_workspace/src/github.com/docker/docker/pkg/system/lstat.go @@ -6,7 +6,7 @@ import ( "syscall" ) -func Lstat(path string) (*Stat, error) { +func Lstat(path string) (*Stat_t, error) { s := &syscall.Stat_t{} err := syscall.Lstat(path, s) if err != nil { diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/system/lstat_windows.go b/Godeps/_workspace/src/github.com/docker/docker/pkg/system/lstat_windows.go index 213a7c7ade3..801e756d8b9 100644 --- a/Godeps/_workspace/src/github.com/docker/docker/pkg/system/lstat_windows.go +++ b/Godeps/_workspace/src/github.com/docker/docker/pkg/system/lstat_windows.go @@ -2,7 +2,7 @@ package system -func Lstat(path string) (*Stat, error) { +func Lstat(path string) (*Stat_t, error) { // should not be called on cli code path return nil, ErrNotSupportedPlatform } diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat.go b/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat.go index 5d47494d212..186e85287d4 100644 --- a/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat.go +++ b/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat.go @@ -4,7 +4,7 @@ import ( "syscall" ) -type Stat struct { +type Stat_t struct { mode uint32 uid uint32 gid uint32 @@ -13,30 +13,30 @@ type Stat struct { mtim syscall.Timespec } -func (s Stat) Mode() uint32 { +func (s Stat_t) Mode() uint32 { return s.mode } -func (s Stat) Uid() uint32 { +func (s Stat_t) Uid() uint32 { return s.uid } -func (s Stat) Gid() uint32 { +func (s Stat_t) Gid() uint32 { return s.gid } -func (s Stat) Rdev() uint64 { +func (s Stat_t) Rdev() uint64 { return s.rdev } -func (s Stat) Size() int64 { +func (s Stat_t) Size() int64 { return s.size } -func (s Stat) Mtim() syscall.Timespec { +func (s Stat_t) Mtim() syscall.Timespec { return s.mtim } -func (s Stat) GetLastModification() syscall.Timespec { +func (s Stat_t) GetLastModification() syscall.Timespec { return s.Mtim() } diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_linux.go b/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_linux.go index 47cebef5cf1..072728d0a18 100644 --- a/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_linux.go +++ b/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_linux.go @@ -4,11 +4,20 @@ import ( "syscall" ) -func fromStatT(s *syscall.Stat_t) (*Stat, error) { - return &Stat{size: s.Size, +func fromStatT(s *syscall.Stat_t) (*Stat_t, error) { + return &Stat_t{size: s.Size, mode: s.Mode, uid: s.Uid, gid: s.Gid, rdev: s.Rdev, mtim: s.Mtim}, nil } + +func Stat(path string) (*Stat_t, error) { + s := &syscall.Stat_t{} + err := syscall.Stat(path, s) + if err != nil { + return nil, err + } + return fromStatT(s) +} diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_unsupported.go b/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_unsupported.go index c4d53e6cd61..66323eee21d 100644 --- a/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_unsupported.go +++ b/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_unsupported.go @@ -6,8 +6,8 @@ import ( "syscall" ) -func fromStatT(s *syscall.Stat_t) (*Stat, error) { - return &Stat{size: s.Size, +func fromStatT(s *syscall.Stat_t) (*Stat_t, error) { + return &Stat_t{size: s.Size, mode: uint32(s.Mode), uid: s.Uid, gid: s.Gid, diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_windows.go b/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_windows.go index 584e8940ccf..42d29d6cca0 100644 --- a/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_windows.go +++ b/Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_windows.go @@ -7,6 +7,11 @@ import ( "syscall" ) -func fromStatT(s *syscall.Win32FileAttributeData) (*Stat, error) { +func fromStatT(s *syscall.Win32FileAttributeData) (*Stat_t, error) { return nil, errors.New("fromStatT should not be called on windows path") } + +func Stat(path string) (*Stat_t, error) { + // should not be called on cli code path + return nil, ErrNotSupportedPlatform +} diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/term/MAINTAINERS b/Godeps/_workspace/src/github.com/docker/docker/pkg/term/MAINTAINERS deleted file mode 100644 index aee10c84210..00000000000 --- a/Godeps/_workspace/src/github.com/docker/docker/pkg/term/MAINTAINERS +++ /dev/null @@ -1 +0,0 @@ -Solomon Hykes (@shykes) diff --git a/Godeps/_workspace/src/github.com/docker/docker/pkg/units/MAINTAINERS b/Godeps/_workspace/src/github.com/docker/docker/pkg/units/MAINTAINERS deleted file mode 100644 index 96abeae5700..00000000000 --- a/Godeps/_workspace/src/github.com/docker/docker/pkg/units/MAINTAINERS +++ /dev/null @@ -1,2 +0,0 @@ -Victor Vieux (@vieux) -Jessie Frazelle (@jfrazelle)