mirror of
https://github.com/containers/podman.git
synced 2025-12-09 23:27:09 +08:00
Vendor in latest c/common
Pull in updates made to the filters code for images. Filters now perform an AND operation except for th reference filter which does an OR operation for positive case but an AND operation for negative cases. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
This commit is contained in:
8
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
8
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
@@ -13,12 +13,12 @@ import (
|
||||
"github.com/containers/common/internal/attributedstring"
|
||||
"github.com/containers/common/libnetwork/types"
|
||||
"github.com/containers/common/pkg/capabilities"
|
||||
"github.com/containers/common/pkg/util"
|
||||
"github.com/containers/storage/pkg/ioutils"
|
||||
"github.com/containers/storage/pkg/unshare"
|
||||
units "github.com/docker/go-units"
|
||||
selinux "github.com/opencontainers/selinux/go-selinux"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -918,7 +918,7 @@ func (c *Config) GetDefaultEnvEx(envHost, httpProxy bool) []string {
|
||||
}
|
||||
|
||||
// Capabilities returns the capabilities parses the Add and Drop capability
|
||||
// list from the default capabiltiies for the container
|
||||
// list from the default capabilities for the container
|
||||
func (c *Config) Capabilities(user string, addCapabilities, dropCapabilities []string) ([]string, error) {
|
||||
userNotRoot := func(user string) bool {
|
||||
if user == "" || user == "root" || user == "0" {
|
||||
@@ -1228,7 +1228,7 @@ func ValidateImageVolumeMode(mode string) error {
|
||||
if mode == "" {
|
||||
return nil
|
||||
}
|
||||
if util.StringInSlice(mode, validImageVolumeModes) {
|
||||
if slices.Contains(validImageVolumeModes, mode) {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1245,7 +1245,7 @@ func (c *Config) FindInitBinary() (string, error) {
|
||||
if c.Engine.InitPath != "" {
|
||||
return c.Engine.InitPath, nil
|
||||
}
|
||||
// keep old default working to guarantee backwards comapt
|
||||
// keep old default working to guarantee backwards compat
|
||||
if _, err := os.Stat(DefaultInitPath); err == nil {
|
||||
return DefaultInitPath, nil
|
||||
}
|
||||
|
||||
8
vendor/github.com/containers/common/pkg/config/config_local.go
generated
vendored
8
vendor/github.com/containers/common/pkg/config/config_local.go
generated
vendored
@@ -1,5 +1,4 @@
|
||||
//go:build !remote
|
||||
// +build !remote
|
||||
|
||||
package config
|
||||
|
||||
@@ -67,6 +66,13 @@ func (c *ContainersConfig) validateTZ() error {
|
||||
"/etc/zoneinfo",
|
||||
}
|
||||
|
||||
// Allow using TZDIR to override the lookupPaths. Ref:
|
||||
// https://sourceware.org/git/?p=glibc.git;a=blob;f=time/tzfile.c;h=8a923d0cccc927a106dc3e3c641be310893bab4e;hb=HEAD#l149
|
||||
tzdir := os.Getenv("TZDIR")
|
||||
if tzdir != "" {
|
||||
lookupPaths = []string{tzdir}
|
||||
}
|
||||
|
||||
for _, paths := range lookupPaths {
|
||||
zonePath := filepath.Join(paths, c.TZ)
|
||||
if _, err := os.Stat(zonePath); err == nil {
|
||||
|
||||
1
vendor/github.com/containers/common/pkg/config/config_remote.go
generated
vendored
1
vendor/github.com/containers/common/pkg/config/config_remote.go
generated
vendored
@@ -1,5 +1,4 @@
|
||||
//go:build remote
|
||||
// +build remote
|
||||
|
||||
package config
|
||||
|
||||
|
||||
1
vendor/github.com/containers/common/pkg/config/config_unsupported.go
generated
vendored
1
vendor/github.com/containers/common/pkg/config/config_unsupported.go
generated
vendored
@@ -1,5 +1,4 @@
|
||||
//go:build !linux
|
||||
// +build !linux
|
||||
|
||||
package config
|
||||
|
||||
|
||||
9
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
9
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
@@ -737,6 +737,15 @@ default_sysctls = [
|
||||
# "/run/current-system/sw/bin/crun",
|
||||
#]
|
||||
|
||||
#crun-vm = [
|
||||
# "/usr/bin/crun-vm",
|
||||
# "/usr/local/bin/crun-vm",
|
||||
# "/usr/local/sbin/crun-vm",
|
||||
# "/sbin/crun-vm",
|
||||
# "/bin/crun-vm",
|
||||
# "/run/current-system/sw/bin/crun-vm",
|
||||
#]
|
||||
|
||||
#kata = [
|
||||
# "/usr/bin/kata-runtime",
|
||||
# "/usr/sbin/kata-runtime",
|
||||
|
||||
15
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
15
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
@@ -295,9 +295,8 @@ func defaultMachineConfig() MachineConfig {
|
||||
|
||||
// defaultFarmConfig returns the default farms configuration.
|
||||
func defaultFarmConfig() FarmConfig {
|
||||
emptyList := make(map[string][]string)
|
||||
return FarmConfig{
|
||||
List: emptyList,
|
||||
List: map[string][]string{},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,7 +339,7 @@ func defaultEngineConfig() (*EngineConfig, error) {
|
||||
|
||||
c.HelperBinariesDir.Set(defaultHelperBinariesDir)
|
||||
if additionalHelperBinariesDir != "" {
|
||||
// Prioritize addtionalHelperBinariesDir over defaults.
|
||||
// Prioritize additionalHelperBinariesDir over defaults.
|
||||
c.HelperBinariesDir.Set(append([]string{additionalHelperBinariesDir}, c.HelperBinariesDir.Get()...))
|
||||
}
|
||||
c.HooksDir.Set(DefaultHooksDirs)
|
||||
@@ -365,6 +364,14 @@ func defaultEngineConfig() (*EngineConfig, error) {
|
||||
"/bin/crun",
|
||||
"/run/current-system/sw/bin/crun",
|
||||
},
|
||||
"crun-vm": {
|
||||
"/usr/bin/crun-vm",
|
||||
"/usr/local/bin/crun-vm",
|
||||
"/usr/local/sbin/crun-vm",
|
||||
"/sbin/crun-vm",
|
||||
"/bin/crun-vm",
|
||||
"/run/current-system/sw/bin/crun-vm",
|
||||
},
|
||||
"crun-wasm": {
|
||||
"/usr/bin/crun-wasm",
|
||||
"/usr/sbin/crun-wasm",
|
||||
@@ -556,7 +563,7 @@ func (c *Config) DNSServers() []string {
|
||||
return c.Containers.DNSServers.Get()
|
||||
}
|
||||
|
||||
// DNSSerches returns the default DNS searches to add to resolv.conf in containers.
|
||||
// DNSSearches returns the default DNS searches to add to resolv.conf in containers.
|
||||
func (c *Config) DNSSearches() []string {
|
||||
return c.Containers.DNSSearches.Get()
|
||||
}
|
||||
|
||||
1
vendor/github.com/containers/common/pkg/config/default_common.go
generated
vendored
1
vendor/github.com/containers/common/pkg/config/default_common.go
generated
vendored
@@ -1,5 +1,4 @@
|
||||
//go:build !freebsd
|
||||
// +build !freebsd
|
||||
|
||||
package config
|
||||
|
||||
|
||||
1
vendor/github.com/containers/common/pkg/config/default_unsupported.go
generated
vendored
1
vendor/github.com/containers/common/pkg/config/default_unsupported.go
generated
vendored
@@ -1,5 +1,4 @@
|
||||
//go:build !linux && !windows
|
||||
// +build !linux,!windows
|
||||
|
||||
package config
|
||||
|
||||
|
||||
1
vendor/github.com/containers/common/pkg/config/nosystemd.go
generated
vendored
1
vendor/github.com/containers/common/pkg/config/nosystemd.go
generated
vendored
@@ -1,5 +1,4 @@
|
||||
//go:build !systemd || !cgo
|
||||
// +build !systemd !cgo
|
||||
|
||||
package config
|
||||
|
||||
|
||||
1
vendor/github.com/containers/common/pkg/config/systemd.go
generated
vendored
1
vendor/github.com/containers/common/pkg/config/systemd.go
generated
vendored
@@ -1,5 +1,4 @@
|
||||
//go:build systemd && cgo
|
||||
// +build systemd,cgo
|
||||
|
||||
package config
|
||||
|
||||
|
||||
Reference in New Issue
Block a user