Merge pull request #4428 from thaJeztah/bump_continuity
vendor: update containerd/continuity efbc4488d8fe1bdc16bde3b2d2990d9b3a899165
This commit is contained in:
commit
c2a6f180d7
@ -4,7 +4,7 @@ github.com/cespare/xxhash/v2 v2.1.1
|
|||||||
github.com/containerd/btrfs 153935315f4ab9be5bf03650a1341454b05efa5d
|
github.com/containerd/btrfs 153935315f4ab9be5bf03650a1341454b05efa5d
|
||||||
github.com/containerd/cgroups 318312a373405e5e91134d8063d04d59768a1bff
|
github.com/containerd/cgroups 318312a373405e5e91134d8063d04d59768a1bff
|
||||||
github.com/containerd/console v1.0.0
|
github.com/containerd/console v1.0.0
|
||||||
github.com/containerd/continuity d3ef23f19fbb106bb73ffde425d07a9187e30745
|
github.com/containerd/continuity efbc4488d8fe1bdc16bde3b2d2990d9b3a899165
|
||||||
github.com/containerd/fifo f15a3290365b9d2627d189e619ab4008e0069caf
|
github.com/containerd/fifo f15a3290365b9d2627d189e619ab4008e0069caf
|
||||||
github.com/containerd/go-runc 7016d3ce2328dd2cb1192b2076ebd565c4e8df0c
|
github.com/containerd/go-runc 7016d3ce2328dd2cb1192b2076ebd565c4e8df0c
|
||||||
github.com/containerd/ttrpc v1.0.1
|
github.com/containerd/ttrpc v1.0.1
|
||||||
|
8
vendor/github.com/containerd/continuity/context.go
generated
vendored
8
vendor/github.com/containerd/continuity/context.go
generated
vendored
@ -596,7 +596,7 @@ func (c *context) Walk(fn filepath.WalkFunc) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return c.pathDriver.Walk(root, func(p string, fi os.FileInfo, err error) error {
|
return c.pathDriver.Walk(root, func(p string, fi os.FileInfo, _ error) error {
|
||||||
contained, err := c.containWithRoot(p, root)
|
contained, err := c.containWithRoot(p, root)
|
||||||
return fn(contained, fi, err)
|
return fn(contained, fi, err)
|
||||||
})
|
})
|
||||||
@ -613,12 +613,6 @@ func (c *context) fullpath(p string) (string, error) {
|
|||||||
return p, nil
|
return p, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// contain cleans and santizes the filesystem path p to be an absolute path,
|
|
||||||
// effectively relative to the context root.
|
|
||||||
func (c *context) contain(p string) (string, error) {
|
|
||||||
return c.containWithRoot(p, c.root)
|
|
||||||
}
|
|
||||||
|
|
||||||
// containWithRoot cleans and santizes the filesystem path p to be an absolute path,
|
// containWithRoot cleans and santizes the filesystem path p to be an absolute path,
|
||||||
// effectively relative to the passed root. Extra care should be used when calling this
|
// effectively relative to the passed root. Extra care should be used when calling this
|
||||||
// instead of contain. This is needed for Walk, as if context root is a symlink,
|
// instead of contain. This is needed for Walk, as if context root is a symlink,
|
||||||
|
1
vendor/github.com/containerd/continuity/devices/devices_unix.go
generated
vendored
1
vendor/github.com/containerd/continuity/devices/devices_unix.go
generated
vendored
@ -32,6 +32,7 @@ func DeviceInfo(fi os.FileInfo) (uint64, uint64, error) {
|
|||||||
return 0, 0, fmt.Errorf("cannot extract device from os.FileInfo")
|
return 0, 0, fmt.Errorf("cannot extract device from os.FileInfo")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//nolint:unconvert
|
||||||
dev := uint64(sys.Rdev)
|
dev := uint64(sys.Rdev)
|
||||||
return uint64(unix.Major(dev)), uint64(unix.Minor(dev)), nil
|
return uint64(unix.Major(dev)), uint64(unix.Minor(dev)), nil
|
||||||
}
|
}
|
||||||
|
10
vendor/github.com/containerd/continuity/digests.go
generated
vendored
10
vendor/github.com/containerd/continuity/digests.go
generated
vendored
@ -88,13 +88,9 @@ func digestsMatch(as, bs []digest.Digest) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
disjoint := len(as) + len(bs)
|
disjoint := len(as) + len(bs)
|
||||||
if len(uniqified) == disjoint {
|
// if these two sets have the same cardinality, we know both sides
|
||||||
// if these two sets have the same cardinality, we know both sides
|
// didn't share any digests.
|
||||||
// didn't share any digests.
|
return len(uniqified) != disjoint
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type digestSlice []digest.Digest
|
type digestSlice []digest.Digest
|
||||||
|
4
vendor/github.com/containerd/continuity/driver/driver_windows.go
generated
vendored
4
vendor/github.com/containerd/continuity/driver/driver_windows.go
generated
vendored
@ -1,3 +1,5 @@
|
|||||||
|
// +build go1.13
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright The containerd Authors.
|
Copyright The containerd Authors.
|
||||||
|
|
||||||
@ -14,8 +16,6 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// +build go1.13
|
|
||||||
|
|
||||||
// Go 1.13 is the minimally supported version for Windows.
|
// Go 1.13 is the minimally supported version for Windows.
|
||||||
// Earlier golang releases have bug in os.Readlink
|
// Earlier golang releases have bug in os.Readlink
|
||||||
// (see https://github.com/golang/go/issues/30463).
|
// (see https://github.com/golang/go/issues/30463).
|
||||||
|
4
vendor/github.com/containerd/continuity/fs/fstest/continuity_util.go
generated
vendored
4
vendor/github.com/containerd/continuity/fs/fstest/continuity_util.go
generated
vendored
@ -47,7 +47,7 @@ func (l resourceListDifference) HasDiff() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, add := range l.Additions {
|
for _, add := range l.Additions {
|
||||||
if ok, _ := metadataFiles[add.Path()]; !ok {
|
if ok := metadataFiles[add.Path()]; !ok {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -66,7 +66,7 @@ func (l resourceListDifference) String() string {
|
|||||||
for _, upt := range l.Updates {
|
for _, upt := range l.Updates {
|
||||||
fmt.Fprintf(buf, "~ %s\n", upt.String())
|
fmt.Fprintf(buf, "~ %s\n", upt.String())
|
||||||
}
|
}
|
||||||
return string(buf.Bytes())
|
return buf.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
// diffManifest compares two resource lists and returns the list
|
// diffManifest compares two resource lists and returns the list
|
||||||
|
2
vendor/github.com/containerd/continuity/fs/fstest/testsuite.go
generated
vendored
2
vendor/github.com/containerd/continuity/fs/fstest/testsuite.go
generated
vendored
@ -210,7 +210,7 @@ var (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Hardlink name before with modification
|
// Hardlink name before with modification
|
||||||
// Tests link is created for unmodified files when new hardlinked file is seen first
|
// Tests link is created for unmodified files when a new hard linked file is seen first
|
||||||
hardlinkBeforeUnmodified = []Applier{
|
hardlinkBeforeUnmodified = []Applier{
|
||||||
baseApplier,
|
baseApplier,
|
||||||
Apply(
|
Apply(
|
||||||
|
10
vendor/github.com/containerd/continuity/fs/path.go
generated
vendored
10
vendor/github.com/containerd/continuity/fs/path.go
generated
vendored
@ -117,15 +117,13 @@ func sameFile(f1, f2 *currentPath) (bool, error) {
|
|||||||
// If the timestamp may have been truncated in both of the
|
// If the timestamp may have been truncated in both of the
|
||||||
// files, check content of file to determine difference
|
// files, check content of file to determine difference
|
||||||
if t1.Nanosecond() == 0 && t2.Nanosecond() == 0 {
|
if t1.Nanosecond() == 0 && t2.Nanosecond() == 0 {
|
||||||
var eq bool
|
|
||||||
if (f1.f.Mode() & os.ModeSymlink) == os.ModeSymlink {
|
if (f1.f.Mode() & os.ModeSymlink) == os.ModeSymlink {
|
||||||
eq, err = compareSymlinkTarget(f1.fullPath, f2.fullPath)
|
return compareSymlinkTarget(f1.fullPath, f2.fullPath)
|
||||||
} else if f1.f.Size() > 0 {
|
|
||||||
eq, err = compareFileContent(f1.fullPath, f2.fullPath)
|
|
||||||
}
|
}
|
||||||
if err != nil || !eq {
|
if f1.f.Size() == 0 { // if file sizes are zero length, the files are the same by definition
|
||||||
return eq, err
|
return true, nil
|
||||||
}
|
}
|
||||||
|
return compareFileContent(f1.fullPath, f2.fullPath)
|
||||||
} else if t1.Nanosecond() != t2.Nanosecond() {
|
} else if t1.Nanosecond() != t2.Nanosecond() {
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
2
vendor/github.com/containerd/continuity/go.mod
generated
vendored
2
vendor/github.com/containerd/continuity/go.mod
generated
vendored
@ -1,6 +1,6 @@
|
|||||||
module github.com/containerd/continuity
|
module github.com/containerd/continuity
|
||||||
|
|
||||||
go 1.11
|
go 1.13
|
||||||
|
|
||||||
require (
|
require (
|
||||||
bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898
|
bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898
|
||||||
|
1
vendor/github.com/containerd/continuity/groups_unix.go
generated
vendored
1
vendor/github.com/containerd/continuity/groups_unix.go
generated
vendored
@ -14,6 +14,7 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//nolint:unused,deadcode
|
||||||
package continuity
|
package continuity
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
2
vendor/github.com/containerd/continuity/hardlinks.go
generated
vendored
2
vendor/github.com/containerd/continuity/hardlinks.go
generated
vendored
@ -53,7 +53,7 @@ func (hlm *hardlinkManager) Add(fi os.FileInfo, resource Resource) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Merge processes the current state of the hardlink manager and merges any
|
// Merge processes the current state of the hardlink manager and merges any
|
||||||
// shared nodes into hardlinked resources.
|
// shared nodes into hard linked resources.
|
||||||
func (hlm *hardlinkManager) Merge() ([]Resource, error) {
|
func (hlm *hardlinkManager) Merge() ([]Resource, error) {
|
||||||
var resources []Resource
|
var resources []Resource
|
||||||
for key, linked := range hlm.hardlinks {
|
for key, linked := range hlm.hardlinks {
|
||||||
|
1
vendor/github.com/containerd/continuity/hardlinks_unix.go
generated
vendored
1
vendor/github.com/containerd/continuity/hardlinks_unix.go
generated
vendored
@ -48,5 +48,6 @@ func newHardlinkKey(fi os.FileInfo) (hardlinkKey, error) {
|
|||||||
return hardlinkKey{}, errNotAHardLink
|
return hardlinkKey{}, errNotAHardLink
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//nolint:unconvert
|
||||||
return hardlinkKey{dev: uint64(sys.Dev), inode: uint64(sys.Ino)}, nil
|
return hardlinkKey{dev: uint64(sys.Dev), inode: uint64(sys.Ino)}, nil
|
||||||
}
|
}
|
||||||
|
2
vendor/github.com/containerd/continuity/manifest.go
generated
vendored
2
vendor/github.com/containerd/continuity/manifest.go
generated
vendored
@ -114,11 +114,13 @@ func BuildManifest(ctx Context) (*Manifest, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// merge and post-process the hardlinks.
|
// merge and post-process the hardlinks.
|
||||||
|
// nolint:misspell
|
||||||
hardlinked, err := hardlinks.Merge()
|
hardlinked, err := hardlinks.Merge()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// nolint:misspell
|
||||||
for _, resource := range hardlinked {
|
for _, resource := range hardlinked {
|
||||||
resourcesByPath[resource.Path()] = resource
|
resourcesByPath[resource.Path()] = resource
|
||||||
}
|
}
|
||||||
|
12
vendor/github.com/containerd/continuity/sysx/xattr_unsupported.go
generated
vendored
12
vendor/github.com/containerd/continuity/sysx/xattr_unsupported.go
generated
vendored
@ -23,7 +23,7 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
)
|
)
|
||||||
|
|
||||||
var unsupported = errors.New("extended attributes unsupported on " + runtime.GOOS)
|
var errUnsupported = errors.New("extended attributes unsupported on " + runtime.GOOS)
|
||||||
|
|
||||||
// Listxattr calls syscall listxattr and reads all content
|
// Listxattr calls syscall listxattr and reads all content
|
||||||
// and returns a string array
|
// and returns a string array
|
||||||
@ -33,17 +33,17 @@ func Listxattr(path string) ([]string, error) {
|
|||||||
|
|
||||||
// Removexattr calls syscall removexattr
|
// Removexattr calls syscall removexattr
|
||||||
func Removexattr(path string, attr string) (err error) {
|
func Removexattr(path string, attr string) (err error) {
|
||||||
return unsupported
|
return errUnsupported
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setxattr calls syscall setxattr
|
// Setxattr calls syscall setxattr
|
||||||
func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||||
return unsupported
|
return errUnsupported
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getxattr calls syscall getxattr
|
// Getxattr calls syscall getxattr
|
||||||
func Getxattr(path, attr string) ([]byte, error) {
|
func Getxattr(path, attr string) ([]byte, error) {
|
||||||
return []byte{}, unsupported
|
return []byte{}, errUnsupported
|
||||||
}
|
}
|
||||||
|
|
||||||
// LListxattr lists xattrs, not following symlinks
|
// LListxattr lists xattrs, not following symlinks
|
||||||
@ -53,12 +53,12 @@ func LListxattr(path string) ([]string, error) {
|
|||||||
|
|
||||||
// LRemovexattr removes an xattr, not following symlinks
|
// LRemovexattr removes an xattr, not following symlinks
|
||||||
func LRemovexattr(path string, attr string) (err error) {
|
func LRemovexattr(path string, attr string) (err error) {
|
||||||
return unsupported
|
return errUnsupported
|
||||||
}
|
}
|
||||||
|
|
||||||
// LSetxattr sets an xattr, not following symlinks
|
// LSetxattr sets an xattr, not following symlinks
|
||||||
func LSetxattr(path string, attr string, data []byte, flags int) (err error) {
|
func LSetxattr(path string, attr string, data []byte, flags int) (err error) {
|
||||||
return unsupported
|
return errUnsupported
|
||||||
}
|
}
|
||||||
|
|
||||||
// LGetxattr gets an xattr, not following symlinks
|
// LGetxattr gets an xattr, not following symlinks
|
||||||
|
8
vendor/github.com/containerd/continuity/testutil/loopback/loopback_linux.go
generated
vendored
8
vendor/github.com/containerd/continuity/testutil/loopback/loopback_linux.go
generated
vendored
@ -22,8 +22,8 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"syscall"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
"syscall"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
@ -70,9 +70,9 @@ func New(size int64) (*Loopback, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
l := Loopback{
|
l := Loopback{
|
||||||
File: file.Name(),
|
File: file.Name(),
|
||||||
Device: deviceName,
|
Device: deviceName,
|
||||||
close: cleanup,
|
close: cleanup,
|
||||||
}
|
}
|
||||||
return &l, nil
|
return &l, nil
|
||||||
}
|
}
|
||||||
@ -83,7 +83,7 @@ type Loopback struct {
|
|||||||
File string
|
File string
|
||||||
// Device is /dev/loopX
|
// Device is /dev/loopX
|
||||||
Device string
|
Device string
|
||||||
close func() error
|
close func() error
|
||||||
}
|
}
|
||||||
|
|
||||||
// SoftSize returns st_size
|
// SoftSize returns st_size
|
||||||
|
Loading…
Reference in New Issue
Block a user