From b4c6e5f9d372f29376076a0d287cc6ac1a3679a2 Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Wed, 3 May 2017 14:51:22 -0700 Subject: [PATCH] vendor: move to new continuity import paths Signed-off-by: Stephen J Day --- archive/tar_linux.go | 2 +- fs/copy_linux.go | 2 +- fs/diff_linux.go | 2 +- fs/fstest/compare.go | 2 +- fs/fstest/continuity_util.go | 2 +- fs/fstest/file.go | 2 +- vendor.conf | 2 +- .../continuity/LICENSE | 0 .../continuity/README.md | 3 + .../continuity/context.go | 21 +- .../continuity/devices_darwin.go | 0 .../continuity/devices_linux.go | 0 .../continuity/devices_unix.go | 0 .../containerd/continuity/devices_windows.go | 11 ++ .../continuity/digests.go | 0 .../continuity/driver.go | 14 -- .../continuity/driver_darwin.go | 0 .../continuity/driver_unix.go | 16 +- .../containerd/continuity/driver_windows.go | 21 ++ .../continuity/groups_unix.go | 0 .../continuity/hardlinks.go | 0 .../continuity/hardlinks_unix.go | 2 + .../continuity/hardlinks_windows.go | 12 ++ .../continuity/ioutils.go | 0 .../continuity/manifest.go | 2 +- .../continuity/manifest_test_darwin.go | 0 .../continuity/proto/gen.go | 0 .../continuity/proto/manifest.pb.go | 181 ++++++++++++++++++ .../continuity/proto/manifest.proto | 42 ++-- .../continuity/resource.go | 44 ++--- .../containerd/continuity/resource_unix.go | 37 ++++ .../containerd/continuity/resource_windows.go | 12 ++ .../continuity/sysx/asm.s | 0 .../continuity/sysx/chmod_darwin.go | 0 .../continuity/sysx/chmod_darwin_386.go | 0 .../continuity/sysx/chmod_darwin_amd64.go | 0 .../continuity/sysx/chmod_linux.go | 0 .../continuity/sysx/copy_linux.go | 0 .../continuity/sysx/copy_linux_386.go | 0 .../continuity/sysx/copy_linux_amd64.go | 0 .../continuity/sysx/copy_linux_arm.go | 0 .../continuity/sysx/copy_linux_arm64.go | 0 .../continuity/sysx/sys.go | 0 .../continuity/sysx/sysnum_linux_386.go | 0 .../continuity/sysx/sysnum_linux_amd64.go | 0 .../continuity/sysx/sysnum_linux_arm.go | 0 .../continuity/sysx/sysnum_linux_arm64.go | 0 .../continuity/sysx/xattr.go | 3 + .../continuity/sysx/xattr_darwin.go | 0 .../continuity/sysx/xattr_darwin_386.go | 0 .../continuity/sysx/xattr_darwin_amd64.go | 0 .../continuity/sysx/xattr_linux.go | 0 .../continuity/sysx/xattr_linux_386.go | 0 .../continuity/sysx/xattr_linux_amd64.go | 0 .../continuity/sysx/xattr_linux_arm.go | 0 .../continuity/sysx/xattr_linux_arm64.go | 0 .../continuity/sysx/xattr_linux_ppc64.go | 19 ++ .../continuity/sysx/xattr_linux_ppc64le.go | 19 ++ .../continuity/sysx/xattr_linux_s390x.go | 19 ++ .../stevvooe/continuity/hardlinks_windows.go | 5 - .../stevvooe/continuity/proto/manifest.pb.go | 98 ---------- 61 files changed, 418 insertions(+), 177 deletions(-) rename vendor/github.com/{stevvooe => containerd}/continuity/LICENSE (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/README.md (61%) rename vendor/github.com/{stevvooe => containerd}/continuity/context.go (95%) rename vendor/github.com/{stevvooe => containerd}/continuity/devices_darwin.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/devices_linux.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/devices_unix.go (100%) create mode 100644 vendor/github.com/containerd/continuity/devices_windows.go rename vendor/github.com/{stevvooe => containerd}/continuity/digests.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/driver.go (92%) rename vendor/github.com/{stevvooe => containerd}/continuity/driver_darwin.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/driver_unix.go (86%) create mode 100644 vendor/github.com/containerd/continuity/driver_windows.go rename vendor/github.com/{stevvooe => containerd}/continuity/groups_unix.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/hardlinks.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/hardlinks_unix.go (97%) create mode 100644 vendor/github.com/containerd/continuity/hardlinks_windows.go rename vendor/github.com/{stevvooe => containerd}/continuity/ioutils.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/manifest.go (98%) rename vendor/github.com/{stevvooe => containerd}/continuity/manifest_test_darwin.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/proto/gen.go (100%) create mode 100644 vendor/github.com/containerd/continuity/proto/manifest.pb.go rename vendor/github.com/{stevvooe => containerd}/continuity/proto/manifest.proto (71%) rename vendor/github.com/{stevvooe => containerd}/continuity/resource.go (94%) create mode 100644 vendor/github.com/containerd/continuity/resource_unix.go create mode 100644 vendor/github.com/containerd/continuity/resource_windows.go rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/asm.s (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/chmod_darwin.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/chmod_darwin_386.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/chmod_darwin_amd64.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/chmod_linux.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/copy_linux.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/copy_linux_386.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/copy_linux_amd64.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/copy_linux_arm.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/copy_linux_arm64.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/sys.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/sysnum_linux_386.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/sysnum_linux_amd64.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/sysnum_linux_arm.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/sysnum_linux_arm64.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/xattr.go (95%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/xattr_darwin.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/xattr_darwin_386.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/xattr_darwin_amd64.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/xattr_linux.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/xattr_linux_386.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/xattr_linux_amd64.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/xattr_linux_arm.go (100%) rename vendor/github.com/{stevvooe => containerd}/continuity/sysx/xattr_linux_arm64.go (100%) create mode 100644 vendor/github.com/containerd/continuity/sysx/xattr_linux_ppc64.go create mode 100644 vendor/github.com/containerd/continuity/sysx/xattr_linux_ppc64le.go create mode 100644 vendor/github.com/containerd/continuity/sysx/xattr_linux_s390x.go delete mode 100644 vendor/github.com/stevvooe/continuity/hardlinks_windows.go delete mode 100644 vendor/github.com/stevvooe/continuity/proto/manifest.pb.go diff --git a/archive/tar_linux.go b/archive/tar_linux.go index f4b6a09e9..6ec8f4cba 100644 --- a/archive/tar_linux.go +++ b/archive/tar_linux.go @@ -6,9 +6,9 @@ import ( "sync" "syscall" + "github.com/containerd/continuity/sysx" "github.com/opencontainers/runc/libcontainer/system" "github.com/pkg/errors" - "github.com/stevvooe/continuity/sysx" ) func tarName(p string) (string, error) { diff --git a/fs/copy_linux.go b/fs/copy_linux.go index a6c193c23..40e401797 100644 --- a/fs/copy_linux.go +++ b/fs/copy_linux.go @@ -5,8 +5,8 @@ import ( "os" "syscall" + "github.com/containerd/continuity/sysx" "github.com/pkg/errors" - "github.com/stevvooe/continuity/sysx" ) func copyFileInfo(fi os.FileInfo, name string) error { diff --git a/fs/diff_linux.go b/fs/diff_linux.go index 24c290a5f..7580f09bc 100644 --- a/fs/diff_linux.go +++ b/fs/diff_linux.go @@ -7,8 +7,8 @@ import ( "strings" "syscall" + "github.com/containerd/continuity/sysx" "github.com/pkg/errors" - "github.com/stevvooe/continuity/sysx" ) // whiteouts are files with a special meaning for the layered filesystem. diff --git a/fs/fstest/compare.go b/fs/fstest/compare.go index a569d693b..4f55f1c62 100644 --- a/fs/fstest/compare.go +++ b/fs/fstest/compare.go @@ -4,8 +4,8 @@ import ( "io/ioutil" "os" + "github.com/containerd/continuity" "github.com/pkg/errors" - "github.com/stevvooe/continuity" ) // CheckDirectoryEqual compares two directory paths to make sure that diff --git a/fs/fstest/continuity_util.go b/fs/fstest/continuity_util.go index a300388e1..1100ca467 100644 --- a/fs/fstest/continuity_util.go +++ b/fs/fstest/continuity_util.go @@ -4,7 +4,7 @@ import ( "bytes" "fmt" - "github.com/stevvooe/continuity" + "github.com/containerd/continuity" ) type resourceUpdate struct { diff --git a/fs/fstest/file.go b/fs/fstest/file.go index 41c10474f..2b9345449 100644 --- a/fs/fstest/file.go +++ b/fs/fstest/file.go @@ -6,7 +6,7 @@ import ( "path/filepath" "time" - "github.com/stevvooe/continuity/sysx" + "github.com/containerd/continuity/sysx" ) // Applier applies single file changes diff --git a/vendor.conf b/vendor.conf index 31af60d40..a88ee280b 100644 --- a/vendor.conf +++ b/vendor.conf @@ -29,7 +29,7 @@ github.com/nightlyone/lockfile 1d49c987357a327b5b03aa84cbddd582c328615d github.com/opencontainers/go-digest 21dfd564fd89c944783d00d069f33e3e7123c448 golang.org/x/sys f3918c30c5c2cb527c0b071a27c35120a6c0719a github.com/opencontainers/image-spec a431dbcf6a74fca2e0e040b819a836dbe3fb23ca -github.com/stevvooe/continuity 577e137350afb00343495f55bb8671fe7e22b0bf +github.com/containerd/continuity 6414d06cab9e2fe082ea29ff42aab627e740d00c golang.org/x/sync 450f422ab23cf9881c94e2db30cac0eb1b7cf80c github.com/BurntSushi/toml v0.2.0-21-g9906417 github.com/grpc-ecosystem/go-grpc-prometheus 6b7015e65d366bf3f19b2b2a000a831940f0f7e0 diff --git a/vendor/github.com/stevvooe/continuity/LICENSE b/vendor/github.com/containerd/continuity/LICENSE similarity index 100% rename from vendor/github.com/stevvooe/continuity/LICENSE rename to vendor/github.com/containerd/continuity/LICENSE diff --git a/vendor/github.com/stevvooe/continuity/README.md b/vendor/github.com/containerd/continuity/README.md similarity index 61% rename from vendor/github.com/stevvooe/continuity/README.md rename to vendor/github.com/containerd/continuity/README.md index 12d655387..50b64c20f 100644 --- a/vendor/github.com/stevvooe/continuity/README.md +++ b/vendor/github.com/containerd/continuity/README.md @@ -1,5 +1,8 @@ # continuity +[![GoDoc](https://godoc.org/github.com/containerd/continuity?status.svg)](https://godoc.org/github.com/containerd/continuity) +[![Build Status](https://travis-ci.org/containerd/continuity.svg?branch=master)](https://travis-ci.org/containerd/continuity) + A transport-agnostic, filesystem metadata manifest system This project is a staging area for experiments in providing transport agnostic diff --git a/vendor/github.com/stevvooe/continuity/context.go b/vendor/github.com/containerd/continuity/context.go similarity index 95% rename from vendor/github.com/stevvooe/continuity/context.go rename to vendor/github.com/containerd/continuity/context.go index b89717344..9e72fd0b0 100644 --- a/vendor/github.com/stevvooe/continuity/context.go +++ b/vendor/github.com/containerd/continuity/context.go @@ -8,7 +8,6 @@ import ( "os" "path/filepath" "strings" - "syscall" "github.com/opencontainers/go-digest" ) @@ -115,19 +114,7 @@ func (c *context) Resource(p string, fi os.FileInfo) (Resource, error) { } } - // TODO(stevvooe): This need to be resolved for the container's root, - // where here we are really getting the host OS's value. We need to allow - // this be passed in and fixed up to make these uid/gid mappings portable. - // Either this can be part of the driver or we can achieve it through some - // other mechanism. - sys, ok := fi.Sys().(*syscall.Stat_t) - if !ok { - // TODO(stevvooe): This may not be a hard error for all platforms. We - // may want to move this to the driver. - return nil, fmt.Errorf("unable to resolve syscall.Stat_t from (os.FileInfo).Sys(): %#v", fi) - } - - base, err := newBaseResource(p, fi.Mode(), fmt.Sprint(sys.Uid), fmt.Sprint(sys.Gid)) + base, err := newBaseResource(p, fi) if err != nil { return nil, err } @@ -463,8 +450,10 @@ func (c *context) Apply(resource Resource) error { } if target != r.Target() { - if err := c.driver.Remove(fp); err != nil { // RemoveAll? - return err + if fi != nil { + if err := c.driver.Remove(fp); err != nil { // RemoveAll in case of directory? + return err + } } if err := c.driver.Symlink(r.Target(), fp); err != nil { diff --git a/vendor/github.com/stevvooe/continuity/devices_darwin.go b/vendor/github.com/containerd/continuity/devices_darwin.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/devices_darwin.go rename to vendor/github.com/containerd/continuity/devices_darwin.go diff --git a/vendor/github.com/stevvooe/continuity/devices_linux.go b/vendor/github.com/containerd/continuity/devices_linux.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/devices_linux.go rename to vendor/github.com/containerd/continuity/devices_linux.go diff --git a/vendor/github.com/stevvooe/continuity/devices_unix.go b/vendor/github.com/containerd/continuity/devices_unix.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/devices_unix.go rename to vendor/github.com/containerd/continuity/devices_unix.go diff --git a/vendor/github.com/containerd/continuity/devices_windows.go b/vendor/github.com/containerd/continuity/devices_windows.go new file mode 100644 index 000000000..3e7753aec --- /dev/null +++ b/vendor/github.com/containerd/continuity/devices_windows.go @@ -0,0 +1,11 @@ +package continuity + +import ( + "os" + + "github.com/pkg/errors" +) + +func deviceInfo(fi os.FileInfo) (uint64, uint64, error) { + return 0, 0, errors.Wrap(ErrNotSupported, "cannot get device info on windows") +} diff --git a/vendor/github.com/stevvooe/continuity/digests.go b/vendor/github.com/containerd/continuity/digests.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/digests.go rename to vendor/github.com/containerd/continuity/digests.go diff --git a/vendor/github.com/stevvooe/continuity/driver.go b/vendor/github.com/containerd/continuity/driver.go similarity index 92% rename from vendor/github.com/stevvooe/continuity/driver.go rename to vendor/github.com/containerd/continuity/driver.go index 6af7f023e..ae06615c8 100644 --- a/vendor/github.com/stevvooe/continuity/driver.go +++ b/vendor/github.com/containerd/continuity/driver.go @@ -1,7 +1,6 @@ package continuity import ( - "errors" "os" "strconv" ) @@ -143,16 +142,3 @@ func (d *driver) Lchown(name, uidStr, gidStr string) error { func (d *driver) Symlink(oldname, newname string) error { return os.Symlink(oldname, newname) } - -func (d *driver) Mknod(path string, mode os.FileMode, major, minor int) error { - return mknod(path, mode, major, minor) -} - -func (d *driver) Mkfifo(path string, mode os.FileMode) error { - if mode&os.ModeNamedPipe == 0 { - return errors.New("mode passed to Mkfifo does not have the named pipe bit set") - } - // mknod with a mode that has ModeNamedPipe set creates a fifo, not a - // device. - return mknod(path, mode, 0, 0) -} diff --git a/vendor/github.com/stevvooe/continuity/driver_darwin.go b/vendor/github.com/containerd/continuity/driver_darwin.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/driver_darwin.go rename to vendor/github.com/containerd/continuity/driver_darwin.go diff --git a/vendor/github.com/stevvooe/continuity/driver_unix.go b/vendor/github.com/containerd/continuity/driver_unix.go similarity index 86% rename from vendor/github.com/stevvooe/continuity/driver_unix.go rename to vendor/github.com/containerd/continuity/driver_unix.go index 337ab12ac..7336a872f 100644 --- a/vendor/github.com/stevvooe/continuity/driver_unix.go +++ b/vendor/github.com/containerd/continuity/driver_unix.go @@ -3,14 +3,28 @@ package continuity import ( + "errors" "fmt" "os" "path/filepath" "sort" - "github.com/stevvooe/continuity/sysx" + "github.com/containerd/continuity/sysx" ) +func (d *driver) Mknod(path string, mode os.FileMode, major, minor int) error { + return mknod(path, mode, major, minor) +} + +func (d *driver) Mkfifo(path string, mode os.FileMode) error { + if mode&os.ModeNamedPipe == 0 { + return errors.New("mode passed to Mkfifo does not have the named pipe bit set") + } + // mknod with a mode that has ModeNamedPipe set creates a fifo, not a + // device. + return mknod(path, mode, 0, 0) +} + // Lchmod changes the mode of an file not following symlinks. func (d *driver) Lchmod(path string, mode os.FileMode) (err error) { if !filepath.IsAbs(path) { diff --git a/vendor/github.com/containerd/continuity/driver_windows.go b/vendor/github.com/containerd/continuity/driver_windows.go new file mode 100644 index 000000000..a2cda2049 --- /dev/null +++ b/vendor/github.com/containerd/continuity/driver_windows.go @@ -0,0 +1,21 @@ +package continuity + +import ( + "os" + + "github.com/pkg/errors" +) + +func (d *driver) Mknod(path string, mode os.FileMode, major, minor int) error { + return errors.Wrap(ErrNotSupported, "cannot create device node on Windows") +} + +func (d *driver) Mkfifo(path string, mode os.FileMode) error { + return errors.Wrap(ErrNotSupported, "cannot create fifo on Windows") +} + +// Lchmod changes the mode of an file not following symlinks. +func (d *driver) Lchmod(path string, mode os.FileMode) (err error) { + // TODO: Use Window's equivalent + return os.Chmod(path, mode) +} diff --git a/vendor/github.com/stevvooe/continuity/groups_unix.go b/vendor/github.com/containerd/continuity/groups_unix.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/groups_unix.go rename to vendor/github.com/containerd/continuity/groups_unix.go diff --git a/vendor/github.com/stevvooe/continuity/hardlinks.go b/vendor/github.com/containerd/continuity/hardlinks.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/hardlinks.go rename to vendor/github.com/containerd/continuity/hardlinks.go diff --git a/vendor/github.com/stevvooe/continuity/hardlinks_unix.go b/vendor/github.com/containerd/continuity/hardlinks_unix.go similarity index 97% rename from vendor/github.com/stevvooe/continuity/hardlinks_unix.go rename to vendor/github.com/containerd/continuity/hardlinks_unix.go index 5880f069e..3a3c36eb5 100644 --- a/vendor/github.com/stevvooe/continuity/hardlinks_unix.go +++ b/vendor/github.com/containerd/continuity/hardlinks_unix.go @@ -1,3 +1,5 @@ +// +build linux darwin + package continuity import ( diff --git a/vendor/github.com/containerd/continuity/hardlinks_windows.go b/vendor/github.com/containerd/continuity/hardlinks_windows.go new file mode 100644 index 000000000..be516c560 --- /dev/null +++ b/vendor/github.com/containerd/continuity/hardlinks_windows.go @@ -0,0 +1,12 @@ +package continuity + +import "os" + +type hardlinkKey struct{} + +func newHardlinkKey(fi os.FileInfo) (hardlinkKey, error) { + // NOTE(stevvooe): Obviously, this is not yet implemented. However, the + // makings of an implementation are available in src/os/types_windows.go. More + // investigation needs to be done to figure out exactly how to do this. + return hardlinkKey{}, errNotAHardLink +} diff --git a/vendor/github.com/stevvooe/continuity/ioutils.go b/vendor/github.com/containerd/continuity/ioutils.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/ioutils.go rename to vendor/github.com/containerd/continuity/ioutils.go diff --git a/vendor/github.com/stevvooe/continuity/manifest.go b/vendor/github.com/containerd/continuity/manifest.go similarity index 98% rename from vendor/github.com/stevvooe/continuity/manifest.go rename to vendor/github.com/containerd/continuity/manifest.go index 4315bcbbd..36e9210d3 100644 --- a/vendor/github.com/stevvooe/continuity/manifest.go +++ b/vendor/github.com/containerd/continuity/manifest.go @@ -8,7 +8,7 @@ import ( "sort" "github.com/golang/protobuf/proto" - pb "github.com/stevvooe/continuity/proto" + pb "github.com/containerd/continuity/proto" ) // Manifest provides the contents of a manifest. Users of this struct should diff --git a/vendor/github.com/stevvooe/continuity/manifest_test_darwin.go b/vendor/github.com/containerd/continuity/manifest_test_darwin.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/manifest_test_darwin.go rename to vendor/github.com/containerd/continuity/manifest_test_darwin.go diff --git a/vendor/github.com/stevvooe/continuity/proto/gen.go b/vendor/github.com/containerd/continuity/proto/gen.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/proto/gen.go rename to vendor/github.com/containerd/continuity/proto/gen.go diff --git a/vendor/github.com/containerd/continuity/proto/manifest.pb.go b/vendor/github.com/containerd/continuity/proto/manifest.pb.go new file mode 100644 index 000000000..151b75881 --- /dev/null +++ b/vendor/github.com/containerd/continuity/proto/manifest.pb.go @@ -0,0 +1,181 @@ +// Code generated by protoc-gen-go. +// source: manifest.proto +// DO NOT EDIT! + +/* +Package proto is a generated protocol buffer package. + +It is generated from these files: + manifest.proto + +It has these top-level messages: + Manifest + Resource + XAttr + ADSEntry +*/ +package proto + +import proto1 "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto1.ProtoPackageIsVersion2 // please upgrade the proto package + +// Manifest specifies the entries in a container bundle, keyed and sorted by +// path. +type Manifest struct { + Resource []*Resource `protobuf:"bytes,1,rep,name=resource" json:"resource,omitempty"` +} + +func (m *Manifest) Reset() { *m = Manifest{} } +func (m *Manifest) String() string { return proto1.CompactTextString(m) } +func (*Manifest) ProtoMessage() {} +func (*Manifest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *Manifest) GetResource() []*Resource { + if m != nil { + return m.Resource + } + return nil +} + +type Resource struct { + // Path specifies the path from the bundle root. If more than one + // path is present, the entry may represent a hardlink, rather than using + // a link target. The path format is operating system specific. + Path []string `protobuf:"bytes,1,rep,name=path" json:"path,omitempty"` + // Uid specifies the user id for the resource. A string type is used for + // compatibility across different OS. + Uid string `protobuf:"bytes,2,opt,name=uid" json:"uid,omitempty"` + // Gid specifies the group id for the resource. A string type is used for + // compatibility across different OS. + Gid string `protobuf:"bytes,3,opt,name=gid" json:"gid,omitempty"` + // user and group are not currently used but their field numbers have been + // reserved for future use. As such, they are marked as deprecated. + User string `protobuf:"bytes,4,opt,name=user" json:"user,omitempty"` + Group string `protobuf:"bytes,5,opt,name=group" json:"group,omitempty"` + // Mode defines the file mode and permissions. We've used the same + // bit-packing from Go's os package, + // http://golang.org/pkg/os/#FileMode, since they've done the work of + // creating a cross-platform layout. + Mode uint32 `protobuf:"varint,6,opt,name=mode" json:"mode,omitempty"` + // Size specifies the size in bytes of the resource. This is only valid + // for regular files. + Size uint64 `protobuf:"varint,7,opt,name=size" json:"size,omitempty"` + // Digest specifies the content digest of the target file. Only valid for + // regular files. The strings are formatted as :. + // The digests are sorted in lexical order and implementations may choose + // which algorithms they prefer. + Digest []string `protobuf:"bytes,8,rep,name=digest" json:"digest,omitempty"` + // Target defines the target of a hard or soft link. Absolute links start + // with a slash and specify the resource relative to the bundle root. + // Relative links do not start with a slash and are relative to the + // resource path. + Target string `protobuf:"bytes,9,opt,name=target" json:"target,omitempty"` + // Major specifies the major device number for charactor and block devices. + Major uint64 `protobuf:"varint,10,opt,name=major" json:"major,omitempty"` + // Minor specifies the minor device number for charactor and block devices. + Minor uint64 `protobuf:"varint,11,opt,name=minor" json:"minor,omitempty"` + // Xattr provides storage for extended attributes for the target resource. + Xattr []*XAttr `protobuf:"bytes,12,rep,name=xattr" json:"xattr,omitempty"` + // Ads stores one or more alternate data streams for the target resource. + Ads []*ADSEntry `protobuf:"bytes,13,rep,name=ads" json:"ads,omitempty"` +} + +func (m *Resource) Reset() { *m = Resource{} } +func (m *Resource) String() string { return proto1.CompactTextString(m) } +func (*Resource) ProtoMessage() {} +func (*Resource) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *Resource) GetXattr() []*XAttr { + if m != nil { + return m.Xattr + } + return nil +} + +func (m *Resource) GetAds() []*ADSEntry { + if m != nil { + return m.Ads + } + return nil +} + +// XAttr encodes extended attributes for a resource. +type XAttr struct { + // Name specifies the attribute name. + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Data specifies the associated data for the attribute. + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` +} + +func (m *XAttr) Reset() { *m = XAttr{} } +func (m *XAttr) String() string { return proto1.CompactTextString(m) } +func (*XAttr) ProtoMessage() {} +func (*XAttr) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +// ADSEntry encodes information for a Windows Alternate Data Stream. +type ADSEntry struct { + // Name specifices the stream name. + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Data specifies the stream data. + // See also the description about the digest below. + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + // Digest is a CAS representation of the stream data. + // + // At least one of data or digest MUST be specified, and either one of them + // SHOULD be specified. + // + // How to access the actual data using the digest is implementation-specific, + // and implementations can choose not to implement digest. + // So, digest SHOULD be used only when the stream data is large. + Digest string `protobuf:"bytes,3,opt,name=digest" json:"digest,omitempty"` +} + +func (m *ADSEntry) Reset() { *m = ADSEntry{} } +func (m *ADSEntry) String() string { return proto1.CompactTextString(m) } +func (*ADSEntry) ProtoMessage() {} +func (*ADSEntry) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +func init() { + proto1.RegisterType((*Manifest)(nil), "proto.Manifest") + proto1.RegisterType((*Resource)(nil), "proto.Resource") + proto1.RegisterType((*XAttr)(nil), "proto.XAttr") + proto1.RegisterType((*ADSEntry)(nil), "proto.ADSEntry") +} + +func init() { proto1.RegisterFile("manifest.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 313 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x90, 0x41, 0x4b, 0xfb, 0x40, + 0x10, 0xc5, 0x49, 0x93, 0xf4, 0x9f, 0x4e, 0xdb, 0xbf, 0xb2, 0x48, 0x99, 0x63, 0xcc, 0x29, 0x20, + 0x54, 0xd0, 0x83, 0xe7, 0x8a, 0x5e, 0x04, 0x2f, 0xeb, 0xc5, 0xeb, 0xea, 0xae, 0x71, 0x85, 0x64, + 0xc3, 0x66, 0x03, 0xea, 0x97, 0xf3, 0xab, 0xc9, 0x4c, 0xb6, 0x45, 0x6f, 0x9e, 0xf2, 0xde, 0x6f, + 0x76, 0x26, 0x8f, 0x07, 0xff, 0x5b, 0xd5, 0xd9, 0x17, 0x33, 0x84, 0x6d, 0xef, 0x5d, 0x70, 0x22, + 0xe7, 0x4f, 0x75, 0x05, 0xc5, 0x7d, 0x1c, 0x88, 0x33, 0x28, 0xbc, 0x19, 0xdc, 0xe8, 0x9f, 0x0d, + 0x26, 0x65, 0x5a, 0x2f, 0x2f, 0x8e, 0xa6, 0xc7, 0x5b, 0x19, 0xb1, 0x3c, 0x3c, 0xa8, 0xbe, 0x66, + 0x50, 0xec, 0xb1, 0x10, 0x90, 0xf5, 0x2a, 0xbc, 0xf2, 0xd6, 0x42, 0xb2, 0x16, 0xc7, 0x90, 0x8e, + 0x56, 0xe3, 0xac, 0x4c, 0xea, 0x85, 0x24, 0x49, 0xa4, 0xb1, 0x1a, 0xd3, 0x89, 0x34, 0x56, 0x8b, + 0x0d, 0x64, 0xe3, 0x60, 0x3c, 0x66, 0x84, 0xae, 0x67, 0x98, 0x48, 0xf6, 0x02, 0x21, 0x6f, 0xbc, + 0x1b, 0x7b, 0xcc, 0x0f, 0x83, 0x09, 0xd0, 0x9f, 0x5a, 0xa7, 0x0d, 0xce, 0xcb, 0xa4, 0x5e, 0x4b, + 0xd6, 0xc4, 0x06, 0xfb, 0x69, 0xf0, 0x5f, 0x99, 0xd4, 0x99, 0x64, 0x2d, 0x36, 0x30, 0xd7, 0xb6, + 0x31, 0x43, 0xc0, 0x82, 0x33, 0x45, 0x47, 0x3c, 0x28, 0xdf, 0x98, 0x80, 0x0b, 0x8e, 0x11, 0x9d, + 0x38, 0x81, 0xbc, 0x55, 0x6f, 0xce, 0x23, 0xf0, 0x91, 0xc9, 0x30, 0xb5, 0x9d, 0xf3, 0xb8, 0x8c, + 0x94, 0x8c, 0xa8, 0x20, 0x7f, 0x57, 0x21, 0x78, 0x5c, 0x71, 0x49, 0xab, 0x58, 0xd2, 0xe3, 0x2e, + 0x04, 0x2f, 0xa7, 0x91, 0x38, 0x85, 0x54, 0xe9, 0x01, 0xd7, 0xbf, 0x6a, 0xdc, 0xdd, 0x3c, 0xdc, + 0x76, 0xc1, 0x7f, 0x48, 0x9a, 0x55, 0xe7, 0x90, 0xf3, 0x0a, 0xe5, 0xef, 0x54, 0x4b, 0x9d, 0x53, + 0x22, 0xd6, 0xc4, 0xb4, 0x0a, 0x8a, 0xeb, 0x5b, 0x49, 0xd6, 0xd5, 0x1d, 0x14, 0xfb, 0x0b, 0x7f, + 0xdd, 0xf9, 0xd1, 0xc3, 0x54, 0x7b, 0x74, 0x4f, 0x73, 0x4e, 0x74, 0xf9, 0x1d, 0x00, 0x00, 0xff, + 0xff, 0x91, 0xfe, 0x64, 0xca, 0x17, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/stevvooe/continuity/proto/manifest.proto b/vendor/github.com/containerd/continuity/proto/manifest.proto similarity index 71% rename from vendor/github.com/stevvooe/continuity/proto/manifest.proto rename to vendor/github.com/containerd/continuity/proto/manifest.proto index f7f5d3ebf..f7fd9aa7a 100644 --- a/vendor/github.com/stevvooe/continuity/proto/manifest.proto +++ b/vendor/github.com/containerd/continuity/proto/manifest.proto @@ -59,19 +59,39 @@ message Resource { // Minor specifies the minor device number for charactor and block devices. uint64 minor = 11; - // TODO(stevvooe): The use of maps here may be problematic for - // deterministic generation. Check out this comment: - // https://developers.google.com/protocol-buffers/docs/proto3#backwards-compatibility - // Fortunately, the Go implementation correctly sorts the map keys to - // ensure deterministic generation, but this is not guaranteed for all - // implementations. If this is problem, we should generate that schema and - // sort by key. We can do this at any time and retain backwards - // compatibility. - // Xattr provides storage for extended attributes for the target resource. - map xattr = 12; + repeated XAttr xattr = 12; // Ads stores one or more alternate data streams for the target resource. - map ads = 13; + repeated ADSEntry ads = 13; } + +// XAttr encodes extended attributes for a resource. +message XAttr { + // Name specifies the attribute name. + string name = 1; + + // Data specifies the associated data for the attribute. + bytes data = 2; +} + +// ADSEntry encodes information for a Windows Alternate Data Stream. +message ADSEntry { + // Name specifices the stream name. + string name = 1; + + // Data specifies the stream data. + // See also the description about the digest below. + bytes data = 2; + + // Digest is a CAS representation of the stream data. + // + // At least one of data or digest MUST be specified, and either one of them + // SHOULD be specified. + // + // How to access the actual data using the digest is implementation-specific, + // and implementations can choose not to implement digest. + // So, digest SHOULD be used only when the stream data is large. + string digest = 3; +} diff --git a/vendor/github.com/stevvooe/continuity/resource.go b/vendor/github.com/containerd/continuity/resource.go similarity index 94% rename from vendor/github.com/stevvooe/continuity/resource.go rename to vendor/github.com/containerd/continuity/resource.go index 3ba543116..60abe1986 100644 --- a/vendor/github.com/stevvooe/continuity/resource.go +++ b/vendor/github.com/containerd/continuity/resource.go @@ -8,7 +8,7 @@ import ( "sort" "github.com/opencontainers/go-digest" - pb "github.com/stevvooe/continuity/proto" + pb "github.com/containerd/continuity/proto" ) // TODO(stevvooe): A record based model, somewhat sketched out at the bottom @@ -111,7 +111,7 @@ func Merge(fs ...Resource) (Resource, error) { if xattrer, ok := f.(XAttrer); ok { fxattrs := xattrer.XAttrs() if !reflect.DeepEqual(fxattrs, xattrs) { - return nil, fmt.Errorf("resource %q xattrs do not match: %v != %v", fxattrs, xattrs) + return nil, fmt.Errorf("resource %q xattrs do not match: %v != %v", f, fxattrs, xattrs) } } @@ -246,22 +246,6 @@ type resource struct { var _ Resource = &resource{} -// newBaseResource returns a *resource, populated with data from p and fi, -// where p will be populated directly. -func newBaseResource(p string, mode os.FileMode, uid, gid string) (*resource, error) { - return &resource{ - paths: []string{p}, - mode: mode, - - uid: uid, - gid: gid, - - // NOTE(stevvooe): Population of shared xattrs field is deferred to - // the resource types that populate it. Since they are a property of - // the context, they must set there. - }, nil -} - func (r *resource) Path() string { if len(r.paths) < 1 { return "" @@ -482,7 +466,17 @@ func toProto(resource Resource) *pb.Resource { } if xattrer, ok := resource.(XAttrer); ok { - b.Xattr = xattrer.XAttrs() + // Sorts the XAttrs by name for consistent ordering. + keys := []string{} + xattrs := xattrer.XAttrs() + for k := range xattrs { + keys = append(keys, k) + } + sort.Strings(keys) + + for _, k := range keys { + b.Xattr = append(b.Xattr, &pb.XAttr{Name: k, Data: xattrs[k]}) + } } switch r := resource.(type) { @@ -511,15 +505,17 @@ func toProto(resource Resource) *pb.Resource { // fromProto converts from a protobuf Resource to a Resource interface. func fromProto(b *pb.Resource) (Resource, error) { - base, err := newBaseResource(b.Path[0], os.FileMode(b.Mode), b.Uid, b.Gid) - if err != nil { - return nil, err + base := &resource{ + paths: b.Path, + mode: os.FileMode(b.Mode), + uid: b.Uid, + gid: b.Gid, } base.xattrs = make(map[string][]byte, len(b.Xattr)) - for attr, value := range b.Xattr { - base.xattrs[attr] = append(base.xattrs[attr], value...) + for _, attr := range b.Xattr { + base.xattrs[attr.Name] = attr.Data } switch { diff --git a/vendor/github.com/containerd/continuity/resource_unix.go b/vendor/github.com/containerd/continuity/resource_unix.go new file mode 100644 index 000000000..f159a2793 --- /dev/null +++ b/vendor/github.com/containerd/continuity/resource_unix.go @@ -0,0 +1,37 @@ +// +build linux darwin + +package continuity + +import ( + "fmt" + "os" + "syscall" +) + +// newBaseResource returns a *resource, populated with data from p and fi, +// where p will be populated directly. +func newBaseResource(p string, fi os.FileInfo) (*resource, error) { + // TODO(stevvooe): This need to be resolved for the container's root, + // where here we are really getting the host OS's value. We need to allow + // this be passed in and fixed up to make these uid/gid mappings portable. + // Either this can be part of the driver or we can achieve it through some + // other mechanism. + sys, ok := fi.Sys().(*syscall.Stat_t) + if !ok { + // TODO(stevvooe): This may not be a hard error for all platforms. We + // may want to move this to the driver. + return nil, fmt.Errorf("unable to resolve syscall.Stat_t from (os.FileInfo).Sys(): %#v", fi) + } + + return &resource{ + paths: []string{p}, + mode: fi.Mode(), + + uid: fmt.Sprint(sys.Uid), + gid: fmt.Sprint(sys.Gid), + + // NOTE(stevvooe): Population of shared xattrs field is deferred to + // the resource types that populate it. Since they are a property of + // the context, they must set there. + }, nil +} diff --git a/vendor/github.com/containerd/continuity/resource_windows.go b/vendor/github.com/containerd/continuity/resource_windows.go new file mode 100644 index 000000000..7b44414ac --- /dev/null +++ b/vendor/github.com/containerd/continuity/resource_windows.go @@ -0,0 +1,12 @@ +package continuity + +import "os" + +// newBaseResource returns a *resource, populated with data from p and fi, +// where p will be populated directly. +func newBaseResource(p string, fi os.FileInfo) (*resource, error) { + return &resource{ + paths: []string{p}, + mode: fi.Mode(), + }, nil +} diff --git a/vendor/github.com/stevvooe/continuity/sysx/asm.s b/vendor/github.com/containerd/continuity/sysx/asm.s similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/asm.s rename to vendor/github.com/containerd/continuity/sysx/asm.s diff --git a/vendor/github.com/stevvooe/continuity/sysx/chmod_darwin.go b/vendor/github.com/containerd/continuity/sysx/chmod_darwin.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/chmod_darwin.go rename to vendor/github.com/containerd/continuity/sysx/chmod_darwin.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/chmod_darwin_386.go b/vendor/github.com/containerd/continuity/sysx/chmod_darwin_386.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/chmod_darwin_386.go rename to vendor/github.com/containerd/continuity/sysx/chmod_darwin_386.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/chmod_darwin_amd64.go b/vendor/github.com/containerd/continuity/sysx/chmod_darwin_amd64.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/chmod_darwin_amd64.go rename to vendor/github.com/containerd/continuity/sysx/chmod_darwin_amd64.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/chmod_linux.go b/vendor/github.com/containerd/continuity/sysx/chmod_linux.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/chmod_linux.go rename to vendor/github.com/containerd/continuity/sysx/chmod_linux.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/copy_linux.go b/vendor/github.com/containerd/continuity/sysx/copy_linux.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/copy_linux.go rename to vendor/github.com/containerd/continuity/sysx/copy_linux.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/copy_linux_386.go b/vendor/github.com/containerd/continuity/sysx/copy_linux_386.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/copy_linux_386.go rename to vendor/github.com/containerd/continuity/sysx/copy_linux_386.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/copy_linux_amd64.go b/vendor/github.com/containerd/continuity/sysx/copy_linux_amd64.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/copy_linux_amd64.go rename to vendor/github.com/containerd/continuity/sysx/copy_linux_amd64.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/copy_linux_arm.go b/vendor/github.com/containerd/continuity/sysx/copy_linux_arm.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/copy_linux_arm.go rename to vendor/github.com/containerd/continuity/sysx/copy_linux_arm.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/copy_linux_arm64.go b/vendor/github.com/containerd/continuity/sysx/copy_linux_arm64.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/copy_linux_arm64.go rename to vendor/github.com/containerd/continuity/sysx/copy_linux_arm64.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/sys.go b/vendor/github.com/containerd/continuity/sysx/sys.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/sys.go rename to vendor/github.com/containerd/continuity/sysx/sys.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/sysnum_linux_386.go b/vendor/github.com/containerd/continuity/sysx/sysnum_linux_386.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/sysnum_linux_386.go rename to vendor/github.com/containerd/continuity/sysx/sysnum_linux_386.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/sysnum_linux_amd64.go b/vendor/github.com/containerd/continuity/sysx/sysnum_linux_amd64.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/sysnum_linux_amd64.go rename to vendor/github.com/containerd/continuity/sysx/sysnum_linux_amd64.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/sysnum_linux_arm.go b/vendor/github.com/containerd/continuity/sysx/sysnum_linux_arm.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/sysnum_linux_arm.go rename to vendor/github.com/containerd/continuity/sysx/sysnum_linux_arm.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/sysnum_linux_arm64.go b/vendor/github.com/containerd/continuity/sysx/sysnum_linux_arm64.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/sysnum_linux_arm64.go rename to vendor/github.com/containerd/continuity/sysx/sysnum_linux_arm64.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/xattr.go b/vendor/github.com/containerd/continuity/sysx/xattr.go similarity index 95% rename from vendor/github.com/stevvooe/continuity/sysx/xattr.go rename to vendor/github.com/containerd/continuity/sysx/xattr.go index 0c0710197..20937c2d4 100644 --- a/vendor/github.com/stevvooe/continuity/sysx/xattr.go +++ b/vendor/github.com/containerd/continuity/sysx/xattr.go @@ -2,11 +2,14 @@ package sysx import ( "bytes" + "fmt" "syscall" ) const defaultXattrBufferSize = 5 +var ErrNotSupported = fmt.Errorf("not supported") + type listxattrFunc func(path string, dest []byte) (int, error) func listxattrAll(path string, listFunc listxattrFunc) ([]string, error) { diff --git a/vendor/github.com/stevvooe/continuity/sysx/xattr_darwin.go b/vendor/github.com/containerd/continuity/sysx/xattr_darwin.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/xattr_darwin.go rename to vendor/github.com/containerd/continuity/sysx/xattr_darwin.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/xattr_darwin_386.go b/vendor/github.com/containerd/continuity/sysx/xattr_darwin_386.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/xattr_darwin_386.go rename to vendor/github.com/containerd/continuity/sysx/xattr_darwin_386.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/xattr_darwin_amd64.go b/vendor/github.com/containerd/continuity/sysx/xattr_darwin_amd64.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/xattr_darwin_amd64.go rename to vendor/github.com/containerd/continuity/sysx/xattr_darwin_amd64.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/xattr_linux.go b/vendor/github.com/containerd/continuity/sysx/xattr_linux.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/xattr_linux.go rename to vendor/github.com/containerd/continuity/sysx/xattr_linux.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/xattr_linux_386.go b/vendor/github.com/containerd/continuity/sysx/xattr_linux_386.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/xattr_linux_386.go rename to vendor/github.com/containerd/continuity/sysx/xattr_linux_386.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/xattr_linux_amd64.go b/vendor/github.com/containerd/continuity/sysx/xattr_linux_amd64.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/xattr_linux_amd64.go rename to vendor/github.com/containerd/continuity/sysx/xattr_linux_amd64.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/xattr_linux_arm.go b/vendor/github.com/containerd/continuity/sysx/xattr_linux_arm.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/xattr_linux_arm.go rename to vendor/github.com/containerd/continuity/sysx/xattr_linux_arm.go diff --git a/vendor/github.com/stevvooe/continuity/sysx/xattr_linux_arm64.go b/vendor/github.com/containerd/continuity/sysx/xattr_linux_arm64.go similarity index 100% rename from vendor/github.com/stevvooe/continuity/sysx/xattr_linux_arm64.go rename to vendor/github.com/containerd/continuity/sysx/xattr_linux_arm64.go diff --git a/vendor/github.com/containerd/continuity/sysx/xattr_linux_ppc64.go b/vendor/github.com/containerd/continuity/sysx/xattr_linux_ppc64.go new file mode 100644 index 000000000..33385d70a --- /dev/null +++ b/vendor/github.com/containerd/continuity/sysx/xattr_linux_ppc64.go @@ -0,0 +1,19 @@ +package sysx + +import "github.com/pkg/errors" + +func llistxattr(path string, dest []byte) (sz int, err error) { + return 0, errors.Wrap(ErrNotSupported, "llistxattr not implemented on ppc64") +} + +func lremovexattr(path string, attr string) (err error) { + return errors.Wrap(ErrNotSupported, "lremovexattr not implemented on ppc64") +} + +func lsetxattr(path string, attr string, data []byte, flags int) (err error) { + return errors.Wrap(ErrNotSupported, "lsetxattr not implemented on ppc64") +} + +func lgetxattr(path string, attr string, dest []byte) (sz int, err error) { + return 0, errors.Wrap(ErrNotSupported, "lgetxattr not implemented on ppc64") +} diff --git a/vendor/github.com/containerd/continuity/sysx/xattr_linux_ppc64le.go b/vendor/github.com/containerd/continuity/sysx/xattr_linux_ppc64le.go new file mode 100644 index 000000000..dc65a72fd --- /dev/null +++ b/vendor/github.com/containerd/continuity/sysx/xattr_linux_ppc64le.go @@ -0,0 +1,19 @@ +package sysx + +import "github.com/pkg/errors" + +func llistxattr(path string, dest []byte) (sz int, err error) { + return 0, errors.Wrap(ErrNotSupported, "llistxattr not implemented on ppc64le") +} + +func lremovexattr(path string, attr string) (err error) { + return errors.Wrap(ErrNotSupported, "lremovexattr not implemented on ppc64le") +} + +func lsetxattr(path string, attr string, data []byte, flags int) (err error) { + return errors.Wrap(ErrNotSupported, "lsetxattr not implemented on ppc64le") +} + +func lgetxattr(path string, attr string, dest []byte) (sz int, err error) { + return 0, errors.Wrap(ErrNotSupported, "lgetxattr not implemented on ppc64le") +} diff --git a/vendor/github.com/containerd/continuity/sysx/xattr_linux_s390x.go b/vendor/github.com/containerd/continuity/sysx/xattr_linux_s390x.go new file mode 100644 index 000000000..0af2b2c27 --- /dev/null +++ b/vendor/github.com/containerd/continuity/sysx/xattr_linux_s390x.go @@ -0,0 +1,19 @@ +package sysx + +import "github.com/pkg/errors" + +func llistxattr(path string, dest []byte) (sz int, err error) { + return 0, errors.Wrap(ErrNotSupported, "llistxattr not implemented on s390x") +} + +func lremovexattr(path string, attr string) (err error) { + return errors.Wrap(ErrNotSupported, "lremovexattr not implemented on s390x") +} + +func lsetxattr(path string, attr string, data []byte, flags int) (err error) { + return errors.Wrap(ErrNotSupported, "lsetxattr not implemented on s390x") +} + +func lgetxattr(path string, attr string, dest []byte) (sz int, err error) { + return 0, errors.Wrap(ErrNotSupported, "lgetxattr not implemented on s390x") +} diff --git a/vendor/github.com/stevvooe/continuity/hardlinks_windows.go b/vendor/github.com/stevvooe/continuity/hardlinks_windows.go deleted file mode 100644 index 9d55972ce..000000000 --- a/vendor/github.com/stevvooe/continuity/hardlinks_windows.go +++ /dev/null @@ -1,5 +0,0 @@ -package continuity - -// NOTE(stevvooe): Obviously, this is not yet implemented. However, the -// makings of an implementation are available in src/os/types_windows.go. More -// investigation needs to be done to figure out exactly how to do this. diff --git a/vendor/github.com/stevvooe/continuity/proto/manifest.pb.go b/vendor/github.com/stevvooe/continuity/proto/manifest.pb.go deleted file mode 100644 index edb178148..000000000 --- a/vendor/github.com/stevvooe/continuity/proto/manifest.pb.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by protoc-gen-go. -// source: manifest.proto -// DO NOT EDIT! - -/* -Package proto is a generated protocol buffer package. - -It is generated from these files: - manifest.proto - -It has these top-level messages: - Manifest - Resource -*/ -package proto - -import proto1 "github.com/golang/protobuf/proto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto1.Marshal - -// Manifest specifies the entries in a container bundle, keyed and sorted by -// path. -type Manifest struct { - Resource []*Resource `protobuf:"bytes,1,rep,name=resource" json:"resource,omitempty"` -} - -func (m *Manifest) Reset() { *m = Manifest{} } -func (m *Manifest) String() string { return proto1.CompactTextString(m) } -func (*Manifest) ProtoMessage() {} - -func (m *Manifest) GetResource() []*Resource { - if m != nil { - return m.Resource - } - return nil -} - -type Resource struct { - // Path specifies the path from the bundle root. If more than one - // path is present, the entry may represent a hardlink, rather than using - // a link target. The path format is operating system specific. - Path []string `protobuf:"bytes,1,rep,name=path" json:"path,omitempty"` - // Uid specifies the user id for the resource. A string type is used for - // compatibility across different OS. - Uid string `protobuf:"bytes,2,opt,name=uid" json:"uid,omitempty"` - // Gid specifies the group id for the resource. A string type is used for - // compatibility across different OS. - Gid string `protobuf:"bytes,3,opt,name=gid" json:"gid,omitempty"` - // user and group are not currently used but their field numbers have been - // reserved for future use. As such, they are marked as deprecated. - User string `protobuf:"bytes,4,opt,name=user" json:"user,omitempty"` - Group string `protobuf:"bytes,5,opt,name=group" json:"group,omitempty"` - // Mode defines the file mode and permissions. We've used the same - // bit-packing from Go's os package, - // http://golang.org/pkg/os/#FileMode, since they've done the work of - // creating a cross-platform layout. - Mode uint32 `protobuf:"varint,6,opt,name=mode" json:"mode,omitempty"` - // Size specifies the size in bytes of the resource. This is only valid - // for regular files. - Size uint64 `protobuf:"varint,7,opt,name=size" json:"size,omitempty"` - // Digest specifies the content digest of the target file. Only valid for - // regular files. The strings are formatted as :. - // The digests are sorted in lexical order and implementations may choose - // which algorithms they prefer. - Digest []string `protobuf:"bytes,8,rep,name=digest" json:"digest,omitempty"` - // Target defines the target of a hard or soft link. Absolute links start - // with a slash and specify the resource relative to the bundle root. - // Relative links do not start with a slash and are relative to the - // resource path. - Target string `protobuf:"bytes,9,opt,name=target" json:"target,omitempty"` - // Major specifies the major device number for charactor and block devices. - Major uint64 `protobuf:"varint,10,opt,name=major" json:"major,omitempty"` - // Minor specifies the minor device number for charactor and block devices. - Minor uint64 `protobuf:"varint,11,opt,name=minor" json:"minor,omitempty"` - // Xattr provides storage for extended attributes for the target resource. - Xattr map[string][]byte `protobuf:"bytes,12,rep,name=xattr" json:"xattr,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Ads stores one or more alternate data streams for the target resource. - Ads map[string][]byte `protobuf:"bytes,13,rep,name=ads" json:"ads,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *Resource) Reset() { *m = Resource{} } -func (m *Resource) String() string { return proto1.CompactTextString(m) } -func (*Resource) ProtoMessage() {} - -func (m *Resource) GetXattr() map[string][]byte { - if m != nil { - return m.Xattr - } - return nil -} - -func (m *Resource) GetAds() map[string][]byte { - if m != nil { - return m.Ads - } - return nil -}