mirror of
https://github.com/containers/podman.git
synced 2025-12-09 07:09:03 +08:00
vendor latest c/common main
Includes several rootless-netns fixes. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
7
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
7
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
@@ -328,6 +328,11 @@ type EngineConfig struct {
|
||||
// this slice takes precedence.
|
||||
HooksDir attributedstring.Slice `toml:"hooks_dir,omitempty"`
|
||||
|
||||
// Location of CDI configuration files. These define mounts devices and
|
||||
// other configs according to the CDI spec. In particular this is used
|
||||
// for GPU passthrough.
|
||||
CdiSpecDirs attributedstring.Slice `toml:"cdi_spec_dirs,omitempty"`
|
||||
|
||||
// ImageBuildFormat (DEPRECATED) indicates the default image format to
|
||||
// building container images. Should use ImageDefaultFormat
|
||||
ImageBuildFormat string `toml:"image_build_format,omitempty"`
|
||||
@@ -772,7 +777,7 @@ func (m *MachineConfig) URI() string {
|
||||
}
|
||||
|
||||
func (c *EngineConfig) findRuntime() string {
|
||||
// Search for crun first followed by runc, kata, runsc
|
||||
// Search for crun first followed by runc, runj, kata, runsc, ocijail
|
||||
for _, name := range []string{"crun", "runc", "runj", "kata", "runsc", "ocijail"} {
|
||||
for _, v := range c.OCIRuntimes[name] {
|
||||
if _, err := os.Stat(v); err == nil {
|
||||
|
||||
6
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
6
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
@@ -544,6 +544,12 @@ default_sysctls = [
|
||||
# "/usr/share/containers/oci/hooks.d",
|
||||
#]
|
||||
|
||||
# Directories to scan for CDI Spec files.
|
||||
#
|
||||
#cdi_spec_dirs = [
|
||||
# "/etc/cdi",
|
||||
#]
|
||||
|
||||
# Manifest Type (oci, v2s2, or v2s1) to use when pulling, pushing, building
|
||||
# container images. By default image pulled and pushed match the format of the
|
||||
# source image. Building/committing defaults to OCI.
|
||||
|
||||
6
vendor/github.com/containers/common/pkg/config/containers.conf-freebsd
generated
vendored
6
vendor/github.com/containers/common/pkg/config/containers.conf-freebsd
generated
vendored
@@ -414,6 +414,12 @@ default_sysctls = [
|
||||
# "/usr/local/share/containers/oci/hooks.d",
|
||||
#]
|
||||
|
||||
# Directories to scan for CDI Spec files.
|
||||
#
|
||||
#cdi_spec_dirs = [
|
||||
# "/etc/cdi",
|
||||
#]
|
||||
|
||||
# Manifest Type (oci, v2s2, or v2s1) to use when pulling, pushing, building
|
||||
# container images. By default image pulled and pushed match the format of the
|
||||
# source image. Building/committing defaults to OCI.
|
||||
|
||||
3
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
3
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
@@ -74,6 +74,8 @@ var (
|
||||
ErrInvalidArg = errors.New("invalid argument")
|
||||
// DefaultHooksDirs defines the default hooks directory.
|
||||
DefaultHooksDirs = []string{"/usr/share/containers/oci/hooks.d"}
|
||||
// DefaultCdiSpecDirs defines the default cdi spec directories.
|
||||
DefaultCdiSpecDirs = []string{"/etc/cdi"}
|
||||
// DefaultCapabilities is the default for the default_capabilities option in the containers.conf file.
|
||||
DefaultCapabilities = []string{
|
||||
"CAP_CHOWN",
|
||||
@@ -347,6 +349,7 @@ func defaultEngineConfig() (*EngineConfig, error) {
|
||||
c.HelperBinariesDir.Set(append([]string{additionalHelperBinariesDir}, c.HelperBinariesDir.Get()...))
|
||||
}
|
||||
c.HooksDir.Set(DefaultHooksDirs)
|
||||
c.CdiSpecDirs.Set(DefaultCdiSpecDirs)
|
||||
c.ImageDefaultTransport = _defaultTransport
|
||||
c.ImageVolumeMode = _defaultImageVolumeMode
|
||||
|
||||
|
||||
11
vendor/github.com/containers/common/pkg/config/pull_policy.go
generated
vendored
11
vendor/github.com/containers/common/pkg/config/pull_policy.go
generated
vendored
@@ -2,6 +2,7 @@ package config
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// PullPolicy determines how and which images are being pulled from a container
|
||||
@@ -73,14 +74,14 @@ func (p PullPolicy) Validate() error {
|
||||
// * "newer" <-> PullPolicyNewer (also "ifnewer")
|
||||
// * "never" <-> PullPolicyNever
|
||||
func ParsePullPolicy(s string) (PullPolicy, error) {
|
||||
switch s {
|
||||
case "always", "Always":
|
||||
switch strings.ToLower(s) {
|
||||
case "always":
|
||||
return PullPolicyAlways, nil
|
||||
case "missing", "Missing", "ifnotpresent", "IfNotPresent", "":
|
||||
case "missing", "ifmissing", "ifnotpresent", "":
|
||||
return PullPolicyMissing, nil
|
||||
case "newer", "Newer", "ifnewer", "IfNewer":
|
||||
case "newer", "ifnewer":
|
||||
return PullPolicyNewer, nil
|
||||
case "never", "Never":
|
||||
case "never":
|
||||
return PullPolicyNever, nil
|
||||
default:
|
||||
return PullPolicyUnsupported, fmt.Errorf("unsupported pull policy %q", s)
|
||||
|
||||
Reference in New Issue
Block a user