1
0
mirror of https://github.com/containers/skopeo.git synced 2025-05-03 05:26:32 +00:00

Bump github.com/containers/storage from 1.33.2 to 1.34.0

Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.33.2 to 1.34.0.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/main/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.33.2...v1.34.0)

---
updated-dependencies:
- dependency-name: github.com/containers/storage
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
dependabot[bot] 2021-08-10 08:26:45 +00:00 committed by Daniel J Walsh
parent 252af41dba
commit a23b9f532d
No known key found for this signature in database
GPG Key ID: A2DF901DABE2C028
11 changed files with 118 additions and 16 deletions

View File

@ -74,7 +74,7 @@ doccheck_task:
cpu: 4
memory: 8
env:
BUILDTAGS: &withopengpg 'btrfs_noversion libdm_no_deferred_remove containers_image_openpgp no_libsubid'
BUILDTAGS: &withopengpg 'btrfs_noversion libdm_no_deferred_remove containers_image_openpgp'
script: |
# TODO: Can't use 'runner.sh setup' inside container. However,
# removing the pre-installed package is the only necessary step
@ -147,7 +147,7 @@ test_skopeo_task:
matrix:
- name: "Skopeo Test" # N/B: Name ref. by hack/get_fqin.sh
env:
BUILDTAGS: 'btrfs_noversion libdm_no_deferred_remove no_libsubid'
BUILDTAGS: 'btrfs_noversion libdm_no_deferred_remove'
- name: "Skopeo Test w/ opengpg"
env:
BUILDTAGS: *withopengpg

2
go.mod
View File

@ -6,7 +6,7 @@ require (
github.com/containers/common v0.42.1
github.com/containers/image/v5 v5.15.0
github.com/containers/ocicrypt v1.1.2
github.com/containers/storage v1.33.2
github.com/containers/storage v1.34.0
github.com/docker/docker v20.10.8+incompatible
github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect
github.com/go-check/check v0.0.0-20180628173108-788fd7840127

4
go.sum
View File

@ -233,8 +233,8 @@ github.com/containers/ocicrypt v1.1.2/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B
github.com/containers/storage v1.32.6/go.mod h1:mdB+b89p+jU8zpzLTVXA0gWMmIo0WrkfGMh1R8O2IQw=
github.com/containers/storage v1.33.0/go.mod h1:FUZPF4nJijX8ixdhByZJXf02cvbyLi6dyDwXdIe8QVY=
github.com/containers/storage v1.33.1/go.mod h1:FUZPF4nJijX8ixdhByZJXf02cvbyLi6dyDwXdIe8QVY=
github.com/containers/storage v1.33.2 h1:HmUfQ33ArH7LA7TdJbaKwcGoVheCGxv80H/4DYUTFhM=
github.com/containers/storage v1.33.2/go.mod h1:t6I+hTgPU0/tVxQ75vw406wDi/TXwYBqZp4QZV9N7b8=
github.com/containers/storage v1.34.0 h1:39MhQe+3knl2G6WcaYf24Fpqqz6gbdLK/52Ms5wV+II=
github.com/containers/storage v1.34.0/go.mod h1:t6I+hTgPU0/tVxQ75vw406wDi/TXwYBqZp4QZV9N7b8=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU=

View File

@ -1,6 +1,5 @@
#!/usr/bin/env bash
if test $(${GO:-go} env GOOS) != "linux" ; then
echo no_libsubid
exit 0
fi
tmpdir="$PWD/tmp.$RANDOM"
@ -15,6 +14,6 @@ int main() {
return 0;
}
EOF
if test $? -ne 0 ; then
echo no_libsubid
if test $? -eq 0 ; then
echo libsubid
fi

View File

@ -1 +1 @@
1.33.2
1.34.0

View File

@ -0,0 +1,42 @@
// +build !go1.16
package overlay
import (
"os"
"path/filepath"
"strings"
"github.com/containers/storage/pkg/archive"
"github.com/containers/storage/pkg/system"
)
func scanForMountProgramIndicators(home string) (detected bool, err error) {
err = filepath.Walk(home, func(path string, info os.FileInfo, err error) error {
if detected {
return filepath.SkipDir
}
if err != nil {
return err
}
basename := filepath.Base(path)
if strings.HasPrefix(basename, archive.WhiteoutPrefix) {
detected = true
return filepath.SkipDir
}
if info.IsDir() {
xattrs, err := system.Llistxattr(path)
if err != nil {
return err
}
for _, xattr := range xattrs {
if strings.HasPrefix(xattr, "user.fuseoverlayfs.") || strings.HasPrefix(xattr, "user.containers.") {
detected = true
return filepath.SkipDir
}
}
}
return nil
})
return detected, err
}

View File

@ -0,0 +1,42 @@
// +build go1.16
package overlay
import (
"io/fs"
"path/filepath"
"strings"
"github.com/containers/storage/pkg/archive"
"github.com/containers/storage/pkg/system"
)
func scanForMountProgramIndicators(home string) (detected bool, err error) {
err = filepath.WalkDir(home, func(path string, d fs.DirEntry, err error) error {
if detected {
return fs.SkipDir
}
if err != nil {
return err
}
basename := filepath.Base(path)
if strings.HasPrefix(basename, archive.WhiteoutPrefix) {
detected = true
return fs.SkipDir
}
if d.IsDir() {
xattrs, err := system.Llistxattr(path)
if err != nil {
return err
}
for _, xattr := range xattrs {
if strings.HasPrefix(xattr, "user.fuseoverlayfs.") || strings.HasPrefix(xattr, "user.containers.") {
detected = true
return fs.SkipDir
}
}
}
return nil
})
return detected, err
}

View File

@ -266,9 +266,8 @@ func Init(home string, options graphdriver.Options) (graphdriver.Driver, error)
}
if opts.mountProgram != "" {
f, err := os.Create(getMountProgramFlagFile(home))
if err == nil {
f.Close()
if err := ioutil.WriteFile(getMountProgramFlagFile(home), []byte("true"), 0600); err != nil {
return nil, err
}
} else {
// check if they are running over btrfs, aufs, zfs, overlay, or ecryptfs
@ -542,9 +541,29 @@ func SupportsNativeOverlay(graphroot, rundir string) (bool, error) {
home := filepath.Join(graphroot, "overlay")
runhome := filepath.Join(rundir, "overlay")
if _, err := os.Stat(getMountProgramFlagFile(home)); err == nil {
var contents string
flagContent, err := ioutil.ReadFile(getMountProgramFlagFile(home))
if err == nil {
contents = strings.TrimSpace(string(flagContent))
}
switch contents {
case "true":
logrus.Debugf("overlay storage already configured with a mount-program")
return false, nil
default:
needsMountProgram, err := scanForMountProgramIndicators(home)
if err != nil && !os.IsNotExist(err) {
return false, err
}
if err := ioutil.WriteFile(getMountProgramFlagFile(home), []byte(fmt.Sprintf("%t", needsMountProgram)), 0600); err != nil && !os.IsNotExist(err) {
return false, err
}
if needsMountProgram {
return false, nil
}
// fall through to check if we find ourselves needing to use a
// mount program now
case "false":
}
for _, dir := range []string{home, runhome} {

View File

@ -1,4 +1,4 @@
// +build linux,cgo,!no_libsubid
// +build linux,cgo,libsubid
package idtools

View File

@ -1,4 +1,4 @@
// +build !linux no_libsubid !cgo
// +build !linux !libsubid !cgo
package idtools

2
vendor/modules.txt vendored
View File

@ -114,7 +114,7 @@ github.com/containers/ocicrypt/keywrap/pkcs7
github.com/containers/ocicrypt/spec
github.com/containers/ocicrypt/utils
github.com/containers/ocicrypt/utils/keyprovider
# github.com/containers/storage v1.33.2
# github.com/containers/storage v1.34.0
github.com/containers/storage
github.com/containers/storage/drivers
github.com/containers/storage/drivers/aufs