summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-22 09:53:46 -0400
committerGitHub <noreply@github.com>2021-09-22 09:53:46 -0400
commit8f19efb51951c9f88e8def089c9d2e6446d4af01 (patch)
tree5227f6c65e7469f6f129f7d38d7ba4eb1d47e16c /vendor
parent7910bfd7c1f93a9bac73ae855a1eb6b63aa642a2 (diff)
parent49c5688a30ac29b258196d0be73cc7f09a9705cb (diff)
downloadpodman-8f19efb51951c9f88e8def089c9d2e6446d4af01.tar.gz
podman-8f19efb51951c9f88e8def089c9d2e6446d4af01.tar.bz2
podman-8f19efb51951c9f88e8def089c9d2e6446d4af01.zip
Merge pull request #11678 from vrothberg/fix-11613
podman save: add `--uncompressed`
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/containers/common/libimage/copier.go18
-rw-r--r--vendor/github.com/containers/common/pkg/config/default.go1
-rw-r--r--vendor/github.com/containers/common/pkg/secrets/secrets.go6
-rw-r--r--vendor/github.com/containers/common/pkg/secrets/secretsdb.go12
-rw-r--r--vendor/modules.txt2
5 files changed, 28 insertions, 11 deletions
diff --git a/vendor/github.com/containers/common/libimage/copier.go b/vendor/github.com/containers/common/libimage/copier.go
index a44f098ad..42d3690b9 100644
--- a/vendor/github.com/containers/common/libimage/copier.go
+++ b/vendor/github.com/containers/common/libimage/copier.go
@@ -12,6 +12,7 @@ import (
"github.com/containers/common/pkg/retry"
"github.com/containers/image/v5/copy"
"github.com/containers/image/v5/docker/reference"
+ "github.com/containers/image/v5/pkg/compression"
"github.com/containers/image/v5/signature"
storageTransport "github.com/containers/image/v5/storage"
"github.com/containers/image/v5/types"
@@ -40,6 +41,10 @@ type CopyOptions struct {
// Allows for customizing the destination reference lookup. This can
// be used to use custom blob caches.
DestinationLookupReferenceFunc LookupReferenceFunc
+ // CompressionFormat is the format to use for the compression of the blobs
+ CompressionFormat *compression.Algorithm
+ // CompressionLevel specifies what compression level is used
+ CompressionLevel *int
// containers-auth.json(5) file to use when authenticating against
// container registries.
@@ -65,6 +70,8 @@ type CopyOptions struct {
// types. Short forms (e.g., oci, v2s2) used by some tools are not
// supported.
ManifestMIMEType string
+ // Accept uncompressed layers when copying OCI images.
+ OciAcceptUncompressedLayers bool
// If OciEncryptConfig is non-nil, it indicates that an image should be
// encrypted. The encryption options is derived from the construction
// of EncryptConfig object. Note: During initial encryption process of
@@ -242,6 +249,17 @@ func (r *Runtime) newCopier(options *CopyOptions) (*copier, error) {
c.systemContext.DockerCertPath = options.CertDirPath
}
+ if options.CompressionFormat != nil {
+ c.systemContext.CompressionFormat = options.CompressionFormat
+ }
+
+ if options.CompressionLevel != nil {
+ c.systemContext.CompressionLevel = options.CompressionLevel
+ }
+
+ // NOTE: for the sake of consistency it's called Oci* in the CopyOptions.
+ c.systemContext.OCIAcceptUncompressedLayers = options.OciAcceptUncompressedLayers
+
policy, err := signature.DefaultPolicy(c.systemContext)
if err != nil {
return nil, err
diff --git a/vendor/github.com/containers/common/pkg/config/default.go b/vendor/github.com/containers/common/pkg/config/default.go
index a3fdc9529..34d17d72c 100644
--- a/vendor/github.com/containers/common/pkg/config/default.go
+++ b/vendor/github.com/containers/common/pkg/config/default.go
@@ -198,7 +198,6 @@ func DefaultConfig() (*Config, error) {
TZ: "",
Umask: "0022",
UTSNS: "private",
- UserNS: "host",
UserNSSize: DefaultUserNSSize,
},
Network: NetworkConfig{
diff --git a/vendor/github.com/containers/common/pkg/secrets/secrets.go b/vendor/github.com/containers/common/pkg/secrets/secrets.go
index 2e7802369..aea983cb1 100644
--- a/vendor/github.com/containers/common/pkg/secrets/secrets.go
+++ b/vendor/github.com/containers/common/pkg/secrets/secrets.go
@@ -24,8 +24,8 @@ const secretIDLength = 25
// errInvalidPath indicates that the secrets path is invalid
var errInvalidPath = errors.New("invalid secrets path")
-// errNoSuchSecret indicates that the secret does not exist
-var errNoSuchSecret = errors.New("no such secret")
+// ErrNoSuchSecret indicates that the secret does not exist
+var ErrNoSuchSecret = errors.New("no such secret")
// errSecretNameInUse indicates that the secret name is already in use
var errSecretNameInUse = errors.New("secret name in use")
@@ -152,7 +152,7 @@ func (s *SecretsManager) Store(name string, data []byte, driverType string, driv
newID = newID[0:secretIDLength]
_, err := s.lookupSecret(newID)
if err != nil {
- if errors.Cause(err) == errNoSuchSecret {
+ if errors.Cause(err) == ErrNoSuchSecret {
secr.ID = newID
break
} else {
diff --git a/vendor/github.com/containers/common/pkg/secrets/secretsdb.go b/vendor/github.com/containers/common/pkg/secrets/secretsdb.go
index 1395d103c..0c4929995 100644
--- a/vendor/github.com/containers/common/pkg/secrets/secretsdb.go
+++ b/vendor/github.com/containers/common/pkg/secrets/secretsdb.go
@@ -71,14 +71,14 @@ func (s *SecretsManager) getNameAndID(nameOrID string) (name, id string, err err
name, id, err = s.getExactNameAndID(nameOrID)
if err == nil {
return name, id, nil
- } else if errors.Cause(err) != errNoSuchSecret {
+ } else if errors.Cause(err) != ErrNoSuchSecret {
return "", "", err
}
// ID prefix may have been given, iterate through all IDs.
// ID and partial ID has a max length of 25, so we return if its greater than that.
if len(nameOrID) > secretIDLength {
- return "", "", errors.Wrapf(errNoSuchSecret, "no secret with name or id %q", nameOrID)
+ return "", "", errors.Wrapf(ErrNoSuchSecret, "no secret with name or id %q", nameOrID)
}
exists := false
var foundID, foundName string
@@ -96,7 +96,7 @@ func (s *SecretsManager) getNameAndID(nameOrID string) (name, id string, err err
if exists {
return foundName, foundID, nil
}
- return "", "", errors.Wrapf(errNoSuchSecret, "no secret with name or id %q", nameOrID)
+ return "", "", errors.Wrapf(ErrNoSuchSecret, "no secret with name or id %q", nameOrID)
}
// getExactNameAndID takes a secret's name or ID and returns both its name and full ID.
@@ -115,7 +115,7 @@ func (s *SecretsManager) getExactNameAndID(nameOrID string) (name, id string, er
return name, id, nil
}
- return "", "", errors.Wrapf(errNoSuchSecret, "no secret with name or id %q", nameOrID)
+ return "", "", errors.Wrapf(ErrNoSuchSecret, "no secret with name or id %q", nameOrID)
}
// exactSecretExists checks if the secret exists, given a name or ID
@@ -123,7 +123,7 @@ func (s *SecretsManager) getExactNameAndID(nameOrID string) (name, id string, er
func (s *SecretsManager) exactSecretExists(nameOrID string) (bool, error) {
_, _, err := s.getExactNameAndID(nameOrID)
if err != nil {
- if errors.Cause(err) == errNoSuchSecret {
+ if errors.Cause(err) == ErrNoSuchSecret {
return false, nil
}
return false, err
@@ -158,7 +158,7 @@ func (s *SecretsManager) lookupSecret(nameOrID string) (*Secret, error) {
return &secret, nil
}
- return nil, errors.Wrapf(errNoSuchSecret, "no secret with name or id %q", nameOrID)
+ return nil, errors.Wrapf(ErrNoSuchSecret, "no secret with name or id %q", nameOrID)
}
// Store creates a new secret in the secrets database.
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 50a010306..5e5e3ab0f 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -94,7 +94,7 @@ github.com/containers/buildah/pkg/rusage
github.com/containers/buildah/pkg/sshagent
github.com/containers/buildah/pkg/util
github.com/containers/buildah/util
-# github.com/containers/common v0.44.1-0.20210920093543-bf187ada7d0e
+# github.com/containers/common v0.44.1-0.20210921143342-f2f10e650c73
github.com/containers/common/libimage
github.com/containers/common/libimage/manifests
github.com/containers/common/pkg/apparmor