mirror of
https://github.com/containers/podman.git
synced 2025-12-03 03:39:44 +08:00
vendor latest c/common
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
//go:build (freebsd || netbsd || openbsd)
|
||||
|
||||
package config
|
||||
|
||||
const (
|
||||
2
vendor/github.com/containers/common/pkg/config/config_windows.go
generated
vendored
2
vendor/github.com/containers/common/pkg/config/config_windows.go
generated
vendored
@@ -5,7 +5,7 @@ import "os"
|
||||
const (
|
||||
// _configPath is the path to the containers/containers.conf
|
||||
// inside a given config directory.
|
||||
_configPath = "containers\\containers.conf"
|
||||
_configPath = "\\containers\\containers.conf"
|
||||
|
||||
// DefaultContainersConfig holds the default containers config path
|
||||
DefaultContainersConfig = ""
|
||||
|
||||
10
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
10
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
@@ -350,9 +350,9 @@ default_sysctls = [
|
||||
|
||||
# The firewall driver to be used by netavark.
|
||||
# The default is empty which means netavark will pick one accordingly. Current supported
|
||||
# drivers are "iptables", "none" (no firewall rules will be created) and "firewalld" (firewalld is
|
||||
# experimental at the moment and not recommend outside of testing). In the future we are
|
||||
# planning to add support for a "nftables" driver.
|
||||
# drivers are "iptables", "nftables", "none" (no firewall rules will be created) and "firewalld" (firewalld is
|
||||
# experimental at the moment and not recommend outside of testing).
|
||||
#
|
||||
#firewall_driver = ""
|
||||
|
||||
|
||||
@@ -890,10 +890,10 @@ default_sysctls = [
|
||||
[podmansh]
|
||||
# Shell to spawn in container. Default: /bin/sh.
|
||||
#shell = "/bin/sh"
|
||||
#
|
||||
#
|
||||
# Name of the container the podmansh user should join.
|
||||
#container = "podmansh"
|
||||
#
|
||||
#
|
||||
# Default timeout in seconds for podmansh logins.
|
||||
# Favored over the deprecated "podmansh_timeout" field.
|
||||
#timeout = 30
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
//go:build (freebsd || netbsd || openbsd)
|
||||
|
||||
package config
|
||||
|
||||
// DefaultInitPath is the default path to the container-init binary.
|
||||
2
vendor/github.com/containers/common/pkg/config/default_common.go
generated
vendored
2
vendor/github.com/containers/common/pkg/config/default_common.go
generated
vendored
@@ -1,4 +1,4 @@
|
||||
//go:build !freebsd
|
||||
//go:build !freebsd && !netbsd
|
||||
|
||||
package config
|
||||
|
||||
|
||||
2
vendor/github.com/containers/common/pkg/password/password_supported.go
generated
vendored
2
vendor/github.com/containers/common/pkg/password/password_supported.go
generated
vendored
@@ -1,4 +1,4 @@
|
||||
//go:build linux || darwin || freebsd
|
||||
//go:build linux || darwin || freebsd || netbsd
|
||||
|
||||
package password
|
||||
|
||||
|
||||
20
vendor/github.com/containers/common/pkg/version/version.go
generated
vendored
20
vendor/github.com/containers/common/pkg/version/version.go
generated
vendored
@@ -25,7 +25,8 @@ func queryPackageVersion(cmdArg ...string) string {
|
||||
cmd := exec.Command(cmdArg[0], cmdArg[1:]...)
|
||||
if outp, err := cmd.Output(); err == nil {
|
||||
output = string(outp)
|
||||
if cmdArg[0] == "/usr/bin/dlocate" {
|
||||
switch cmdArg[0] {
|
||||
case "/usr/bin/dlocate":
|
||||
// can return multiple matches
|
||||
l := strings.Split(output, "\n")
|
||||
output = l[0]
|
||||
@@ -44,19 +45,24 @@ func queryPackageVersion(cmdArg ...string) string {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if cmdArg[0] == "/usr/bin/dpkg" {
|
||||
case "/usr/bin/dpkg":
|
||||
r := strings.Split(output, ": ")
|
||||
queryFormat := `${Package}_${Version}_${Architecture}`
|
||||
cmd = exec.Command("/usr/bin/dpkg-query", "-f", queryFormat, "-W", r[0])
|
||||
if outp, err := cmd.Output(); err == nil {
|
||||
output = string(outp)
|
||||
}
|
||||
case "/usr/bin/pacman":
|
||||
pkg := strings.Trim(output, "\n")
|
||||
cmd = exec.Command(cmdArg[0], "-Q", "--", pkg)
|
||||
if outp, err := cmd.Output(); err == nil {
|
||||
output = strings.ReplaceAll(string(outp), " ", "-")
|
||||
}
|
||||
case "/sbin/apk":
|
||||
prefix := cmdArg[len(cmdArg)-1] + " is owned by "
|
||||
output = strings.Replace(output, prefix, "", 1)
|
||||
}
|
||||
}
|
||||
if cmdArg[0] == "/sbin/apk" {
|
||||
prefix := cmdArg[len(cmdArg)-1] + " is owned by "
|
||||
output = strings.Replace(output, prefix, "", 1)
|
||||
}
|
||||
}
|
||||
return strings.Trim(output, "\n")
|
||||
}
|
||||
@@ -77,7 +83,7 @@ func Package(program string) string { // program is full path
|
||||
{"rpm", []string{"/usr/bin/rpm", "-q", "-f"}},
|
||||
{"deb", []string{"/usr/bin/dlocate", "-F"}}, // Debian, Ubuntu (quick)
|
||||
{"deb", []string{"/usr/bin/dpkg", "-S"}}, // Debian, Ubuntu (slow)
|
||||
{"pacman", []string{"/usr/bin/pacman", "-Qo"}}, // Arch
|
||||
{"pacman", []string{"/usr/bin/pacman", "-Qoq"}}, // Arch
|
||||
{"gentoo", []string{"/usr/bin/qfile", "-qv"}}, // Gentoo (quick)
|
||||
{"gentoo", []string{"/usr/bin/equery", "b"}}, // Gentoo (slow)
|
||||
{"apk", []string{"/sbin/apk", "info", "-W"}}, // Alpine
|
||||
|
||||
Reference in New Issue
Block a user