mirror of
https://github.com/containers/podman.git
synced 2025-07-15 03:02:52 +08:00
auto update: fix usage of --authfile
The --authfile flag has been ignored. Fix that and add a test to make sure we won't regress another time. Requires a new --tls-verify flag to actually test the code. Also bump c/common since common/pull/1538 is required to correctly check for updates. Note that I had to use the go-mod-edit-replace trick on c/common as c/buildah would otherwise be moved back to 1.30. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2218315 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
14
vendor/github.com/containers/common/libimage/image.go
generated
vendored
14
vendor/github.com/containers/common/libimage/image.go
generated
vendored
@ -806,6 +806,9 @@ type HasDifferentDigestOptions struct {
|
||||
// containers-auth.json(5) file to use when authenticating against
|
||||
// container registries.
|
||||
AuthFilePath string
|
||||
// Allow contacting registries over HTTP, or HTTPS with failed TLS
|
||||
// verification. Note that this does not affect other TLS connections.
|
||||
InsecureSkipTLSVerify types.OptionalBool
|
||||
}
|
||||
|
||||
// HasDifferentDigest returns true if the image specified by `remoteRef` has a
|
||||
@ -831,8 +834,15 @@ func (i *Image) HasDifferentDigest(ctx context.Context, remoteRef types.ImageRef
|
||||
sys.VariantChoice = inspectInfo.Variant
|
||||
}
|
||||
|
||||
if options != nil && options.AuthFilePath != "" {
|
||||
sys.AuthFilePath = options.AuthFilePath
|
||||
if options != nil {
|
||||
if options.AuthFilePath != "" {
|
||||
sys.AuthFilePath = options.AuthFilePath
|
||||
}
|
||||
if options.InsecureSkipTLSVerify != types.OptionalBoolUndefined {
|
||||
sys.DockerInsecureSkipTLSVerify = options.InsecureSkipTLSVerify
|
||||
sys.OCIInsecureSkipTLSVerify = options.InsecureSkipTLSVerify == types.OptionalBoolTrue
|
||||
sys.DockerDaemonInsecureSkipTLSVerify = options.InsecureSkipTLSVerify == types.OptionalBoolTrue
|
||||
}
|
||||
}
|
||||
|
||||
return i.hasDifferentDigestWithSystemContext(ctx, remoteRef, sys)
|
||||
|
9
vendor/github.com/containers/common/pkg/secrets/secrets.go
generated
vendored
9
vendor/github.com/containers/common/pkg/secrets/secrets.go
generated
vendored
@ -217,9 +217,12 @@ func (s *SecretsManager) Store(name string, data []byte, driverType string, opti
|
||||
}
|
||||
|
||||
if options.Replace {
|
||||
err = driver.Delete(secr.ID)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("replacing secret %s: %w", name, err)
|
||||
if err := driver.Delete(secr.ID); err != nil {
|
||||
return "", fmt.Errorf("deleting secret %s: %w", secr.ID, err)
|
||||
}
|
||||
|
||||
if err := s.delete(secr.ID); err != nil {
|
||||
return "", fmt.Errorf("deleting secret %s: %w", secr.ID, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
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
|
||||
|
||||
// Version is the version of the build.
|
||||
const Version = "0.55.1"
|
||||
const Version = "0.56.0-dev"
|
||||
|
Reference in New Issue
Block a user