build(deps): bump github.com/containers/storage from 1.15.0 to 1.15.2

Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.15.0 to 1.15.2.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.15.0...v1.15.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
dependabot-preview[bot]
2019-12-06 09:17:29 +00:00
committed by Valentin Rothberg
parent 465e142bf2
commit 625a02a286
39 changed files with 322 additions and 500 deletions

View File

@@ -407,6 +407,10 @@ func ReadUserXattrToTarHeader(path string, hdr *tar.Header) error {
for _, key := range xattrs {
if strings.HasPrefix(key, "user.") {
value, err := system.Lgetxattr(path, key)
if err == system.E2BIG {
logrus.Errorf("archive: Skipping xattr for file %s since value is too big: %s", path, key)
continue
}
if err != nil {
return err
}
@@ -567,10 +571,7 @@ func (ta *tarAppender) addTarFile(path, name string) error {
}
if hdr.Typeflag == tar.TypeReg && hdr.Size > 0 {
// We use system.OpenSequential to ensure we use sequential file
// access on Windows to avoid depleting the standby list.
// On Linux, this equates to a regular os.Open.
file, err := system.OpenSequential(path)
file, err := os.Open(path)
if err != nil {
return err
}
@@ -611,7 +612,7 @@ func createTarFile(path, extractDir string, hdr *tar.Header, reader io.Reader, L
// Source is regular file. We use system.OpenFileSequential to use sequential
// file access to avoid depleting the standby list on Windows.
// On Linux, this equates to a regular os.OpenFile
file, err := system.OpenFileSequential(path, os.O_CREATE|os.O_WRONLY, hdrInfo.Mode())
file, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY, hdrInfo.Mode())
if err != nil {
return err
}
@@ -1192,7 +1193,7 @@ func (archiver *Archiver) CopyFileWithTar(src, dst string) (err error) {
dst = filepath.Join(dst, filepath.Base(src))
}
// Create the holding directory if necessary
if err := system.MkdirAll(filepath.Dir(dst), 0700, ""); err != nil {
if err := os.MkdirAll(filepath.Dir(dst), 0700); err != nil {
return err
}

View File

@@ -12,6 +12,7 @@ import (
"github.com/containers/storage/pkg/idtools"
"github.com/containers/storage/pkg/system"
"github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
)
@@ -95,6 +96,10 @@ func walkchunk(path string, fi os.FileInfo, dir string, root *FileInfo) error {
for _, key := range xattrs {
if strings.HasPrefix(key, "user.") {
value, err := system.Lgetxattr(cpath, key)
if err == system.E2BIG {
logrus.Errorf("archive: Skipping xattr for file %s since value is too big: %s", cpath, key)
continue
}
if err != nil {
return err
}

View File

@@ -9,7 +9,6 @@ import (
"path/filepath"
"strings"
"github.com/containers/storage/pkg/system"
"github.com/sirupsen/logrus"
)
@@ -198,7 +197,7 @@ func CopyInfoDestinationPath(path string) (info CopyInfo, err error) {
return CopyInfo{}, err
}
if !system.IsAbs(linkTarget) {
if !filepath.IsAbs(linkTarget) {
// Join with the parent directory.
dstParent, _ := SplitPathDirEntry(path)
linkTarget = filepath.Join(dstParent, linkTarget)

View File

@@ -84,7 +84,7 @@ func UnpackLayer(dest string, layer io.Reader, options *TarOptions) (size int64,
parentPath := filepath.Join(dest, parent)
if _, err := os.Lstat(parentPath); err != nil && os.IsNotExist(err) {
err = system.MkdirAll(parentPath, 0600, "")
err = os.MkdirAll(parentPath, 0600)
if err != nil {
return 0, err
}