summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>2020-07-22 09:19:21 +0000
committerDaniel J Walsh <dwalsh@redhat.com>2020-07-22 05:29:34 -0400
commitca049ef6f9fb540369a5d6ef470c3b2bb4f7b7a9 (patch)
tree689cb7dc9ef2371c3abe7d8ed0c96b95be4797d7
parent344a791ac2019b078dd334ef0a492ee37fe0a937 (diff)
downloadpodman-ca049ef6f9fb540369a5d6ef470c3b2bb4f7b7a9.tar.gz
podman-ca049ef6f9fb540369a5d6ef470c3b2bb4f7b7a9.tar.bz2
podman-ca049ef6f9fb540369a5d6ef470c3b2bb4f7b7a9.zip
Bump github.com/containers/common from 0.16.0 to 0.17.0
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.16.0 to 0.17.0. - [Release notes](https://github.com/containers/common/releases) - [Commits](https://github.com/containers/common/compare/v0.16.0...v0.17.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
-rw-r--r--go.mod2
-rw-r--r--go.sum4
-rw-r--r--vendor/github.com/containers/common/pkg/config/config.go24
-rw-r--r--vendor/github.com/containers/common/pkg/config/default.go9
-rw-r--r--vendor/github.com/containers/common/version/version.go2
-rw-r--r--vendor/modules.txt2
6 files changed, 29 insertions, 14 deletions
diff --git a/go.mod b/go.mod
index bf9718dea..1d148dc3a 100644
--- a/go.mod
+++ b/go.mod
@@ -11,7 +11,7 @@ require (
github.com/containernetworking/cni v0.7.2-0.20200304161608-4fae32b84921
github.com/containernetworking/plugins v0.8.6
github.com/containers/buildah v1.15.1-0.20200708111410-d2ea9429455d
- github.com/containers/common v0.16.0
+ github.com/containers/common v0.17.0
github.com/containers/conmon v2.0.19+incompatible
github.com/containers/image/v5 v5.5.1
github.com/containers/psgo v1.5.1
diff --git a/go.sum b/go.sum
index 7f95292ac..479146f0c 100644
--- a/go.sum
+++ b/go.sum
@@ -73,8 +73,8 @@ github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHV
github.com/containers/buildah v1.15.1-0.20200708111410-d2ea9429455d h1:HgJJn1UBFjM464NpEmgLwVje5vSF/fBYAdLLoww9HgU=
github.com/containers/buildah v1.15.1-0.20200708111410-d2ea9429455d/go.mod h1:HUAiD1mCGPFPcIuk5zls1LElLhXo7Q3hWDwheojjyAs=
github.com/containers/common v0.15.2/go.mod h1:rhpXuGLTEKsk/xX/x0iKGHjRadMHpBd2ZiNDugwXPEM=
-github.com/containers/common v0.16.0 h1:zAxDJ2tA2wBEjXwV/+ddC8s1f3MfqulH3waSjKxlX3o=
-github.com/containers/common v0.16.0/go.mod h1:siKqOA03Bhh7Ss2m7fCsbVvbjwaNqrI+gZtC9FUp+DI=
+github.com/containers/common v0.17.0 h1:3wkcSLw92UYPEhPSHeG1szyIe1qFgi9Jtj18l/tTii0=
+github.com/containers/common v0.17.0/go.mod h1:bG22Wvr0iyWJ8UvIkL5dA5OEZFDqAJx1MejmWZb51HE=
github.com/containers/conmon v2.0.19+incompatible h1:1bDVRvHy2MUNTUT/SW6LlHsJHQBTSwXvnKNdcB/a1vQ=
github.com/containers/conmon v2.0.19+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
github.com/containers/image/v5 v5.5.1 h1:h1FCOXH6Ux9/p/E4rndsQOC4yAdRU0msRTfLVeQ7FDQ=
diff --git a/vendor/github.com/containers/common/pkg/config/config.go b/vendor/github.com/containers/common/pkg/config/config.go
index b3278bb28..80c478505 100644
--- a/vendor/github.com/containers/common/pkg/config/config.go
+++ b/vendor/github.com/containers/common/pkg/config/config.go
@@ -622,9 +622,17 @@ func (c *ContainersConfig) Validate() error {
// execution checks. It returns an `error` on validation failure, otherwise
// `nil`.
func (c *NetworkConfig) Validate() error {
- if c.NetworkConfigDir != _cniConfigDir {
- err := isDirectory(c.NetworkConfigDir)
+ expectedConfigDir := _cniConfigDir
+ if unshare.IsRootless() {
+ home, err := unshare.HomeDir()
if err != nil {
+ return err
+ }
+ expectedConfigDir = filepath.Join(home, _cniConfigDirRootless)
+ }
+ if c.NetworkConfigDir != expectedConfigDir {
+ err := isDirectory(c.NetworkConfigDir)
+ if err != nil && !os.IsNotExist(err) {
return errors.Wrapf(err, "invalid network_config_dir: %s", c.NetworkConfigDir)
}
}
@@ -874,6 +882,10 @@ func Default() (*Config, error) {
if config != nil || configErr != nil {
return config, configErr
}
+ return defConfig()
+}
+
+func defConfig() (*Config, error) {
config, configErr = NewConfig("")
return config, configErr
}
@@ -969,13 +981,11 @@ func (c *Config) Write() error {
// the cached containers.conf files.
func Reload() (*Config, error) {
configMutex.Lock()
- configErr = nil
- config = nil
- configMutex.Unlock()
- return Default()
+ defer configMutex.Unlock()
+ return defConfig()
}
-func (c *Config) ActiveDestination() (string, string, error){
+func (c *Config) ActiveDestination() (string, string, error) {
if uri, found := os.LookupEnv("CONTAINER_HOST"); found {
var ident string
if v, found := os.LookupEnv("CONTAINER_SSHKEY"); found {
diff --git a/vendor/github.com/containers/common/pkg/config/default.go b/vendor/github.com/containers/common/pkg/config/default.go
index 12cf1b421..57b703f53 100644
--- a/vendor/github.com/containers/common/pkg/config/default.go
+++ b/vendor/github.com/containers/common/pkg/config/default.go
@@ -92,8 +92,10 @@ const (
// InstallPrefix is the prefix where podman will be installed.
// It can be overridden at build time.
_installPrefix = "/usr"
- // _cniConfigDir is the directory where cni plugins are found
+ // _cniConfigDir is the directory where cni configuration is found
_cniConfigDir = "/etc/cni/net.d/"
+ // _cniConfigDirRootless is the directory where cni plugins are found
+ _cniConfigDirRootless = ".config/cni/net.d/"
// CgroupfsCgroupsManager represents cgroupfs native cgroup manager
CgroupfsCgroupsManager = "cgroupfs"
// DefaultApparmorProfile specifies the default apparmor profile for the container.
@@ -138,6 +140,8 @@ func DefaultConfig() (*Config, error) {
netns := "bridge"
+ cniConfig := _cniConfigDir
+
defaultEngineConfig.SignaturePolicyPath = DefaultSignaturePolicyPath
if unshare.IsRootless() {
home, err := unshare.HomeDir()
@@ -152,6 +156,7 @@ func DefaultConfig() (*Config, error) {
}
}
netns = "slirp4netns"
+ cniConfig = filepath.Join(home, _cniConfigDirRootless)
}
cgroupNS := "host"
@@ -198,7 +203,7 @@ func DefaultConfig() (*Config, error) {
},
Network: NetworkConfig{
DefaultNetwork: "podman",
- NetworkConfigDir: _cniConfigDir,
+ NetworkConfigDir: cniConfig,
CNIPluginDirs: cniBinDir,
},
Engine: *defaultEngineConfig,
diff --git a/vendor/github.com/containers/common/version/version.go b/vendor/github.com/containers/common/version/version.go
index b75bbe971..2913fe974 100644
--- a/vendor/github.com/containers/common/version/version.go
+++ b/vendor/github.com/containers/common/version/version.go
@@ -1,4 +1,4 @@
package version
// Version is the version of the build.
-const Version = "0.16.0"
+const Version = "0.17.0"
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 913cb71eb..85d02ddd2 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -84,7 +84,7 @@ github.com/containers/buildah/pkg/secrets
github.com/containers/buildah/pkg/supplemented
github.com/containers/buildah/pkg/umask
github.com/containers/buildah/util
-# github.com/containers/common v0.16.0
+# github.com/containers/common v0.17.0
github.com/containers/common/pkg/apparmor
github.com/containers/common/pkg/auth
github.com/containers/common/pkg/capabilities