mirror of
https://github.com/containers/podman.git
synced 2025-09-25 15:55:32 +08:00
vendor: update containers/common
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
2
vendor/github.com/containers/common/libimage/pull.go
generated
vendored
2
vendor/github.com/containers/common/libimage/pull.go
generated
vendored
@ -454,7 +454,7 @@ func (r *Runtime) copySingleImageFromRegistry(ctx context.Context, imageName str
|
||||
// NOTE that this is will even override --pull={false,never}. This is
|
||||
// very likely a bug but a consistent one in Podman/Buildah and should
|
||||
// be addressed at a later point.
|
||||
if pullPolicy != config.PullPolicyAlways {
|
||||
if pullPolicy != config.PullPolicyAlways && pullPolicy != config.PullPolicyNever {
|
||||
switch {
|
||||
// User input clearly refer to a local image.
|
||||
case strings.HasPrefix(imageName, "localhost/"):
|
||||
|
3
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
3
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
@ -420,6 +420,9 @@ type EngineConfig struct {
|
||||
// ChownCopiedFiles tells the container engine whether to chown files copied
|
||||
// into a container to the container's primary uid/gid.
|
||||
ChownCopiedFiles bool `toml:"chown_copied_files,omitempty"`
|
||||
|
||||
// CompressionFormat is the compression format used to compress image layers.
|
||||
CompressionFormat string `toml:"compression_format,omitempty"`
|
||||
}
|
||||
|
||||
// SetOptions contains a subset of options in a Config. It's used to indicate if
|
||||
|
6
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
6
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
@ -294,6 +294,12 @@ default_sysctls = [
|
||||
#
|
||||
#active_service = production
|
||||
|
||||
# The compression format to use when pushing an image.
|
||||
# Valid options are: `gzip`, `zstd` and `zstd:chunked`.
|
||||
#
|
||||
#compression_format = "gzip"
|
||||
|
||||
|
||||
# Cgroup management implementation used for the runtime.
|
||||
# Valid options "systemd" or "cgroupfs"
|
||||
#
|
||||
|
4
vendor/github.com/containers/common/pkg/config/nosystemd.go
generated
vendored
4
vendor/github.com/containers/common/pkg/config/nosystemd.go
generated
vendored
@ -22,3 +22,7 @@ func defaultLogDriver() string {
|
||||
func useSystemd() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func useJournald() bool {
|
||||
return false
|
||||
}
|
||||
|
20
vendor/github.com/containers/common/pkg/config/systemd.go
generated
vendored
20
vendor/github.com/containers/common/pkg/config/systemd.go
generated
vendored
@ -4,12 +4,12 @@ package config
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/containers/common/pkg/cgroupv2"
|
||||
"github.com/containers/storage/pkg/unshare"
|
||||
"github.com/coreos/go-systemd/v22/sdjournal"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -67,12 +67,20 @@ func useJournald() bool {
|
||||
if !useSystemd() {
|
||||
return
|
||||
}
|
||||
journal, err := sdjournal.NewJournal()
|
||||
if err != nil {
|
||||
return
|
||||
for _, root := range []string{"/run/log/journal", "/var/log/journal"} {
|
||||
dirs, err := ioutil.ReadDir(root)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
for _, d := range dirs {
|
||||
if d.IsDir() {
|
||||
if _, err := ioutil.ReadDir(filepath.Join(root, d.Name())); err == nil {
|
||||
usesJournald = true
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
journal.Close()
|
||||
usesJournald = true
|
||||
return
|
||||
})
|
||||
return usesJournald
|
||||
|
2
vendor/github.com/containers/common/pkg/manifests/manifests.go
generated
vendored
2
vendor/github.com/containers/common/pkg/manifests/manifests.go
generated
vendored
@ -74,6 +74,7 @@ func Create() List {
|
||||
},
|
||||
oci: v1.Index{
|
||||
Versioned: imgspec.Versioned{SchemaVersion: 2},
|
||||
MediaType: v1.MediaTypeImageIndex,
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -373,6 +374,7 @@ func FromBlob(manifestBytes []byte) (List, error) {
|
||||
},
|
||||
oci: v1.Index{
|
||||
Versioned: imgspec.Versioned{SchemaVersion: 2},
|
||||
MediaType: v1.MediaTypeImageIndex,
|
||||
},
|
||||
}
|
||||
switch manifestType {
|
||||
|
Reference in New Issue
Block a user