mirror of
https://github.com/containers/podman.git
synced 2025-10-20 20:54:45 +08:00
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>
This commit is contained in:
committed by
Daniel J Walsh
parent
344a791ac2
commit
ca049ef6f9
24
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
24
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
@ -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 {
|
||||
|
||||
9
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
9
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
@ -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,
|
||||
|
||||
2
vendor/github.com/containers/common/version/version.go
generated
vendored
2
vendor/github.com/containers/common/version/version.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
package version
|
||||
|
||||
// Version is the version of the build.
|
||||
const Version = "0.16.0"
|
||||
const Version = "0.17.0"
|
||||
|
||||
Reference in New Issue
Block a user