mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
Merge pull request #10871 from vrothberg/3.2-vendor-common
[3.2] vendor containers/common@v0.38.15
This commit is contained in:
2
go.mod
2
go.mod
@ -12,7 +12,7 @@ require (
|
|||||||
github.com/containernetworking/cni v0.8.1
|
github.com/containernetworking/cni v0.8.1
|
||||||
github.com/containernetworking/plugins v0.9.1
|
github.com/containernetworking/plugins v0.9.1
|
||||||
github.com/containers/buildah v1.21.0
|
github.com/containers/buildah v1.21.0
|
||||||
github.com/containers/common v0.38.14
|
github.com/containers/common v0.38.15
|
||||||
github.com/containers/conmon v2.0.20+incompatible
|
github.com/containers/conmon v2.0.20+incompatible
|
||||||
github.com/containers/image/v5 v5.12.0
|
github.com/containers/image/v5 v5.12.0
|
||||||
github.com/containers/ocicrypt v1.1.1
|
github.com/containers/ocicrypt v1.1.1
|
||||||
|
4
go.sum
4
go.sum
@ -218,8 +218,8 @@ github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRD
|
|||||||
github.com/containers/buildah v1.21.0 h1:LuwuqRPjan3X3AIdGwfkEkqMgmrDMNpQznFqNdHgCz8=
|
github.com/containers/buildah v1.21.0 h1:LuwuqRPjan3X3AIdGwfkEkqMgmrDMNpQznFqNdHgCz8=
|
||||||
github.com/containers/buildah v1.21.0/go.mod h1:yPdlpVd93T+i91yGxrJbW1YOWrqN64j5ZhHOZmHUejs=
|
github.com/containers/buildah v1.21.0/go.mod h1:yPdlpVd93T+i91yGxrJbW1YOWrqN64j5ZhHOZmHUejs=
|
||||||
github.com/containers/common v0.38.4/go.mod h1:egfpX/Y3+19Dz4Wa1eRZDdgzoEOeneieF9CQppKzLBg=
|
github.com/containers/common v0.38.4/go.mod h1:egfpX/Y3+19Dz4Wa1eRZDdgzoEOeneieF9CQppKzLBg=
|
||||||
github.com/containers/common v0.38.14 h1:6fp6+NpG/JhhGboRuUuc4fDaXHoHnSW9n/qL2iGQlLA=
|
github.com/containers/common v0.38.15 h1:esHGxhaqjb5GihF9uO2KZoSGcydIB1PxjZojDipkN6E=
|
||||||
github.com/containers/common v0.38.14/go.mod h1:egfpX/Y3+19Dz4Wa1eRZDdgzoEOeneieF9CQppKzLBg=
|
github.com/containers/common v0.38.15/go.mod h1:egfpX/Y3+19Dz4Wa1eRZDdgzoEOeneieF9CQppKzLBg=
|
||||||
github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg=
|
github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg=
|
||||||
github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
|
github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
|
||||||
github.com/containers/image/v5 v5.12.0 h1:1hNS2QkzFQ4lH3GYQLyAXB0acRMhS1Ubm6oV++8vw4w=
|
github.com/containers/image/v5 v5.12.0 h1:1hNS2QkzFQ4lH3GYQLyAXB0acRMhS1Ubm6oV++8vw4w=
|
||||||
|
28
vendor/github.com/containers/common/libimage/import.go
generated
vendored
28
vendor/github.com/containers/common/libimage/import.go
generated
vendored
@ -80,16 +80,12 @@ func (r *Runtime) Import(ctx context.Context, path string, options *ImportOption
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
name := options.Tag
|
id, err := getImageDigest(ctx, srcRef, r.systemContextCopy())
|
||||||
if name == "" {
|
if err != nil {
|
||||||
name, err = getImageDigest(ctx, srcRef, r.systemContextCopy())
|
return "", err
|
||||||
if err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
name = "sha256:" + name[1:] // strip leading "@"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
destRef, err := storageTransport.Transport.ParseStoreReference(r.store, name)
|
destRef, err := storageTransport.Transport.ParseStoreReference(r.store, id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
@ -104,5 +100,19 @@ func (r *Runtime) Import(ctx context.Context, path string, options *ImportOption
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
return name, nil
|
// Strip the leading @ off the id.
|
||||||
|
name := id[1:]
|
||||||
|
|
||||||
|
// If requested, tag the imported image.
|
||||||
|
if options.Tag != "" {
|
||||||
|
image, _, err := r.LookupImage(name, nil)
|
||||||
|
if err != nil {
|
||||||
|
return "", errors.Wrap(err, "looking up imported image")
|
||||||
|
}
|
||||||
|
if err := image.Tag(options.Tag); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return "sha256:" + name, nil
|
||||||
}
|
}
|
||||||
|
2
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
2
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
@ -191,7 +191,7 @@ func DefaultConfig() (*Config, error) {
|
|||||||
Init: false,
|
Init: false,
|
||||||
InitPath: "",
|
InitPath: "",
|
||||||
IPCNS: "private",
|
IPCNS: "private",
|
||||||
LogDriver: DefaultLogDriver,
|
LogDriver: defaultLogDriver(),
|
||||||
LogSizeMax: DefaultLogSizeMax,
|
LogSizeMax: DefaultLogSizeMax,
|
||||||
NetNS: netns,
|
NetNS: netns,
|
||||||
NoHosts: false,
|
NoHosts: false,
|
||||||
|
10
vendor/github.com/containers/common/pkg/config/nosystemd.go
generated
vendored
10
vendor/github.com/containers/common/pkg/config/nosystemd.go
generated
vendored
@ -3,9 +3,17 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
func defaultCgroupManager() string {
|
func defaultCgroupManager() string {
|
||||||
return "cgroupfs"
|
return CgroupfsCgroupsManager
|
||||||
}
|
}
|
||||||
|
|
||||||
func defaultEventsLogger() string {
|
func defaultEventsLogger() string {
|
||||||
return "file"
|
return "file"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func defaultLogDriver() string {
|
||||||
|
return DefaultLogDriver
|
||||||
|
}
|
||||||
|
|
||||||
|
func useSystemd() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
40
vendor/github.com/containers/common/pkg/config/systemd.go
generated
vendored
40
vendor/github.com/containers/common/pkg/config/systemd.go
generated
vendored
@ -3,11 +3,23 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"io/ioutil"
|
||||||
|
"strings"
|
||||||
|
"sync"
|
||||||
|
|
||||||
"github.com/containers/common/pkg/cgroupv2"
|
"github.com/containers/common/pkg/cgroupv2"
|
||||||
"github.com/containers/storage/pkg/unshare"
|
"github.com/containers/storage/pkg/unshare"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
systemdOnce sync.Once
|
||||||
|
usesSystemd bool
|
||||||
|
)
|
||||||
|
|
||||||
func defaultCgroupManager() string {
|
func defaultCgroupManager() string {
|
||||||
|
if !useSystemd() {
|
||||||
|
return CgroupfsCgroupsManager
|
||||||
|
}
|
||||||
enabled, err := cgroupv2.Enabled()
|
enabled, err := cgroupv2.Enabled()
|
||||||
if err == nil && !enabled && unshare.IsRootless() {
|
if err == nil && !enabled && unshare.IsRootless() {
|
||||||
return CgroupfsCgroupsManager
|
return CgroupfsCgroupsManager
|
||||||
@ -15,6 +27,32 @@ func defaultCgroupManager() string {
|
|||||||
|
|
||||||
return SystemdCgroupsManager
|
return SystemdCgroupsManager
|
||||||
}
|
}
|
||||||
|
|
||||||
func defaultEventsLogger() string {
|
func defaultEventsLogger() string {
|
||||||
return "journald"
|
if useSystemd() {
|
||||||
|
return "journald"
|
||||||
|
}
|
||||||
|
return "file"
|
||||||
|
}
|
||||||
|
|
||||||
|
func defaultLogDriver() string {
|
||||||
|
// If we decide to change the default for logdriver, it should be done here.
|
||||||
|
if useSystemd() {
|
||||||
|
return DefaultLogDriver
|
||||||
|
}
|
||||||
|
|
||||||
|
return DefaultLogDriver
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func useSystemd() bool {
|
||||||
|
systemdOnce.Do(func() {
|
||||||
|
dat, err := ioutil.ReadFile("/proc/1/comm")
|
||||||
|
if err == nil {
|
||||||
|
val := strings.TrimSuffix(string(dat), "\n")
|
||||||
|
usesSystemd = (val == "systemd")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
})
|
||||||
|
return usesSystemd
|
||||||
}
|
}
|
||||||
|
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
|
package version
|
||||||
|
|
||||||
// Version is the version of the build.
|
// Version is the version of the build.
|
||||||
const Version = "0.38.14"
|
const Version = "0.38.15"
|
||||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -91,7 +91,7 @@ github.com/containers/buildah/pkg/overlay
|
|||||||
github.com/containers/buildah/pkg/parse
|
github.com/containers/buildah/pkg/parse
|
||||||
github.com/containers/buildah/pkg/rusage
|
github.com/containers/buildah/pkg/rusage
|
||||||
github.com/containers/buildah/util
|
github.com/containers/buildah/util
|
||||||
# github.com/containers/common v0.38.14
|
# github.com/containers/common v0.38.15
|
||||||
github.com/containers/common/libimage
|
github.com/containers/common/libimage
|
||||||
github.com/containers/common/libimage/manifests
|
github.com/containers/common/libimage/manifests
|
||||||
github.com/containers/common/pkg/apparmor
|
github.com/containers/common/pkg/apparmor
|
||||||
|
Reference in New Issue
Block a user