aboutsummaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-09 15:00:14 -0500
committerGitHub <noreply@github.com>2021-02-09 15:00:14 -0500
commit2b89fe7d5dcf4e2e33127eaefdb02419c42592a6 (patch)
tree08b447452de98615ca4a82a8524ead56f75e35b3 /vendor
parent1112f8566d78fcb251ce9f034b98036dcd085e5a (diff)
parent721d4b5ffcdd2388621106bfc681614f89e9de4e (diff)
downloadpodman-2b89fe7d5dcf4e2e33127eaefdb02419c42592a6.tar.gz
podman-2b89fe7d5dcf4e2e33127eaefdb02419c42592a6.tar.bz2
podman-2b89fe7d5dcf4e2e33127eaefdb02419c42592a6.zip
Merge pull request #9287 from vrothberg/3.0-vendor-image
[3.0] vendor github.com/containers/image v5.10.2
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/containers/image/v5/pkg/sysregistriesv2/shortnames.go21
-rw-r--r--vendor/github.com/containers/image/v5/version/version.go2
-rw-r--r--vendor/modules.txt2
3 files changed, 19 insertions, 6 deletions
diff --git a/vendor/github.com/containers/image/v5/pkg/sysregistriesv2/shortnames.go b/vendor/github.com/containers/image/v5/pkg/sysregistriesv2/shortnames.go
index 4001b65b6..a9c498d7a 100644
--- a/vendor/github.com/containers/image/v5/pkg/sysregistriesv2/shortnames.go
+++ b/vendor/github.com/containers/image/v5/pkg/sysregistriesv2/shortnames.go
@@ -7,6 +7,7 @@ import (
"github.com/BurntSushi/toml"
"github.com/containers/image/v5/docker/reference"
+ "github.com/containers/image/v5/internal/rootless"
"github.com/containers/image/v5/types"
"github.com/containers/storage/pkg/homedir"
"github.com/containers/storage/pkg/lockfile"
@@ -27,12 +28,24 @@ func shortNameAliasesConfPath(ctx *types.SystemContext) (string, error) {
return ctx.UserShortNameAliasConfPath, nil
}
- configHome, err := homedir.GetConfigHome()
- if err != nil {
- return "", err
+ if rootless.GetRootlessEUID() == 0 {
+ // Root user or in a non-conforming user NS
+ return filepath.Join("/var/cache", userShortNamesFile), nil
+ }
+
+ // Rootless user
+ var cacheRoot string
+ if xdgCache := os.Getenv("XDG_CACHE_HOME"); xdgCache != "" {
+ cacheRoot = xdgCache
+ } else {
+ configHome, err := homedir.GetConfigHome()
+ if err != nil {
+ return "", err
+ }
+ cacheRoot = filepath.Join(configHome, ".cache")
}
- return filepath.Join(configHome, userShortNamesFile), nil
+ return filepath.Join(cacheRoot, userShortNamesFile), nil
}
// shortNameAliasConf is a subset of the `V2RegistriesConf` format. It's used in the
diff --git a/vendor/github.com/containers/image/v5/version/version.go b/vendor/github.com/containers/image/v5/version/version.go
index 1fc775410..4c722505c 100644
--- a/vendor/github.com/containers/image/v5/version/version.go
+++ b/vendor/github.com/containers/image/v5/version/version.go
@@ -8,7 +8,7 @@ const (
// VersionMinor is for functionality in a backwards-compatible manner
VersionMinor = 10
// VersionPatch is for backwards-compatible bug fixes
- VersionPatch = 1
+ VersionPatch = 2
// VersionDev indicates development branch. Releases will be empty string.
VersionDev = ""
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 64125f40f..0b8be9734 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -108,7 +108,7 @@ github.com/containers/common/pkg/umask
github.com/containers/common/version
# github.com/containers/conmon v2.0.20+incompatible
github.com/containers/conmon/runner/config
-# github.com/containers/image/v5 v5.10.1
+# github.com/containers/image/v5 v5.10.2
github.com/containers/image/v5/copy
github.com/containers/image/v5/directory
github.com/containers/image/v5/directory/explicitfilepath