go.mod: update github.com/containers/image/v5
Version 5.22 introduced a new option to /etc/containers/policy.json called
keyPaths, see
https://github.com/containers/image/pull/1609
EL9 immediately took advantage of this new feature and started using it, see
04645c4a84
This quickly became an issue in our code: The go library (containers/image)
parses the configuration file very strictly and refuses to create a client
when policy.json with an unknown key is present on the filesystem. As we
used 5.21.1 that doesn't know the new key, our unit tests started to
failing when containers-common was present.
Reproducer:
podman run --pull=always --rm -it centos:stream9
dnf install -y dnf-plugins-core
dnf config-manager --set-enabled crb
dnf install -y gpgme-devel libassuan-devel krb5-devel golang git-core
git clone https://github.com/osbuild/osbuild-composer
cd osbuild-composer
# install the new containers-common and run the test
dnf install -y https://kojihub.stream.centos.org/kojifiles/packages/containers-common/1/44.el9/x86_64/containers-common-1-44.el9.x86_64.rpm
go test -count 1 ./...
# this returns:
--- FAIL: TestClientResolve (0.00s)
client_test.go:31:
Error Trace: client_test.go:31
Error: Received unexpected error:
Unknown key "keyPaths"
invalid policy in "/etc/containers/policy.json"
github.com/containers/image/v5/signature.NewPolicyFromFile
/osbuild-composer/vendor/github.com/containers/image/v5/signature/policy_config.go:88
github.com/osbuild/osbuild-composer/internal/container.NewClient
/osbuild-composer/internal/container/client.go:123
github.com/osbuild/osbuild-composer/internal/container_test.TestClientResolve
/osbuild-composer/internal/container/client_test.go:29
testing.tRunner
/usr/lib/golang/src/testing/testing.go:1439
runtime.goexit
/usr/lib/golang/src/runtime/asm_amd64.s:1571
Test: TestClientResolve
client_test.go:32:
Error Trace: client_test.go:32
Error: Expected value not to be nil.
Test: TestClientResolve
When run with an older containers-common, it succeeds:
dnf install -y https://kojihub.stream.centos.org/kojifiles/packages/containers-common/1/40.el9/x86_64/containers-common-1-40.el9.x86_64.rpm
go test -count 1 ./...
PASS
To sum it up, I had to upgrade github.com/containers/image/v5 to v5.22.0.
Unfortunately, this wasn't so simple, see
go get github.com/containers/image/v5@latest
go: github.com/containers/image/v5@v5.22.0 requires
github.com/letsencrypt/boulder@v0.0.0-20220331220046-b23ab962616e requires
github.com/honeycombio/beeline-go@v1.1.1 requires
github.com/gobuffalo/pop/v5@v5.3.1 requires
github.com/mattn/go-sqlite3@v2.0.3+incompatible: reading github.com/mattn/go-sqlite3/go.mod at revision v2.0.3: unknown revision v2.0.3
It turns out that github.com/mattn/go-sqlite3@v2.0.3+incompatible has been
recently retracted https://github.com/mattn/go-sqlite3/pull/998 and this
broke a ton of packages depending on it. I was able to fix it by adding
exclude github.com/mattn/go-sqlite3 v2.0.3+incompatible
to our go.mod, see
https://github.com/mattn/go-sqlite3/issues/975#issuecomment-955661657
After adding it,
go get github.com/containers/image/v5@latest
succeeded and tools/prepare-source.sh took care of the rest.
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
parent
fa514c5326
commit
29f66a251f
694 changed files with 90636 additions and 50426 deletions
1706
vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
generated
vendored
1706
vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
generated
vendored
File diff suppressed because it is too large
Load diff
2
vendor/github.com/aws/aws-sdk-go/aws/version.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go/aws/version.go
generated
vendored
|
|
@ -5,4 +5,4 @@ package aws
|
|||
const SDKName = "aws-sdk-go"
|
||||
|
||||
// SDKVersion is the version of this SDK
|
||||
const SDKVersion = "1.44.4"
|
||||
const SDKVersion = "1.44.44"
|
||||
|
|
|
|||
1018
vendor/github.com/aws/aws-sdk-go/service/ec2/api.go
generated
vendored
1018
vendor/github.com/aws/aws-sdk-go/service/ec2/api.go
generated
vendored
File diff suppressed because it is too large
Load diff
27
vendor/github.com/aws/aws-sdk-go/service/s3/api.go
generated
vendored
27
vendor/github.com/aws/aws-sdk-go/service/s3/api.go
generated
vendored
|
|
@ -8113,8 +8113,9 @@ func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleCon
|
|||
// Rules
|
||||
//
|
||||
// You specify the lifecycle configuration in your request body. The lifecycle
|
||||
// configuration is specified as XML consisting of one or more rules. Each rule
|
||||
// consists of the following:
|
||||
// configuration is specified as XML consisting of one or more rules. An Amazon
|
||||
// S3 Lifecycle configuration can have up to 1,000 rules. This limit is not
|
||||
// adjustable. Each rule consists of the following:
|
||||
//
|
||||
// * Filter identifying a subset of objects to which the rule applies. The
|
||||
// filter can be based on a key name prefix, object tags, or a combination
|
||||
|
|
@ -10918,9 +10919,11 @@ func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, ou
|
|||
// Part numbers can be any number from 1 to 10,000, inclusive. A part number
|
||||
// uniquely identifies a part and also defines its position within the object
|
||||
// being created. If you upload a new part using the same part number that was
|
||||
// used with a previous part, the previously uploaded part is overwritten. Each
|
||||
// part must be at least 5 MB in size, except the last part. There is no size
|
||||
// limit on the last part of your multipart upload.
|
||||
// used with a previous part, the previously uploaded part is overwritten.
|
||||
//
|
||||
// For information about maximum and minimum part sizes and other multipart
|
||||
// upload specifications, see Multipart upload limits (https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// To ensure that data is not corrupted when traversing the network, specify
|
||||
// the Content-MD5 header in the upload part request. Amazon S3 checks the part
|
||||
|
|
@ -11068,8 +11071,8 @@ func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Req
|
|||
// your request and a byte range by adding the request header x-amz-copy-source-range
|
||||
// in your request.
|
||||
//
|
||||
// The minimum allowable part size for a multipart upload is 5 MB. For more
|
||||
// information about multipart upload limits, go to Quick Facts (https://docs.aws.amazon.com/AmazonS3/latest/dev/qfacts.html)
|
||||
// For information about maximum and minimum part sizes and other multipart
|
||||
// upload specifications, see Multipart upload limits (https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html)
|
||||
// in the Amazon S3 User Guide.
|
||||
//
|
||||
// Instead of using an existing object as part data, you might use the UploadPart
|
||||
|
|
@ -29347,9 +29350,9 @@ type NoncurrentVersionExpiration struct {
|
|||
NewerNoncurrentVersions *int64 `type:"integer"`
|
||||
|
||||
// Specifies the number of days an object is noncurrent before Amazon S3 can
|
||||
// perform the associated action. For information about the noncurrent days
|
||||
// calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
|
||||
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations)
|
||||
// perform the associated action. The value must be a non-zero positive integer.
|
||||
// For information about the noncurrent days calculations, see How Amazon S3
|
||||
// Calculates When an Object Became Noncurrent (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations)
|
||||
// in the Amazon S3 User Guide.
|
||||
NoncurrentDays *int64 `type:"integer"`
|
||||
}
|
||||
|
|
@ -29662,7 +29665,9 @@ type Object struct {
|
|||
//
|
||||
// * If an object is created by either the Multipart Upload or Part Copy
|
||||
// operation, the ETag is not an MD5 digest, regardless of the method of
|
||||
// encryption.
|
||||
// encryption. If an object is larger than 16 MB, the Amazon Web Services
|
||||
// Management Console will upload or copy that object as a Multipart Upload,
|
||||
// and therefore the ETag will not be an MD5 digest.
|
||||
ETag *string `type:"string"`
|
||||
|
||||
// The name that you assign to an object. You use the object key to retrieve
|
||||
|
|
|
|||
6
vendor/github.com/aws/aws-sdk-go/service/sts/api.go
generated
vendored
6
vendor/github.com/aws/aws-sdk-go/service/sts/api.go
generated
vendored
|
|
@ -1279,6 +1279,12 @@ func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request.
|
|||
// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// No permissions are required for users to perform this operation. The purpose
|
||||
// of the sts:GetSessionToken operation is to authenticate the user using MFA.
|
||||
// You cannot use policies to control authentication operations. For more information,
|
||||
// see Permissions for GetSessionToken (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html)
|
||||
// in the IAM User Guide.
|
||||
//
|
||||
// Session Duration
|
||||
//
|
||||
// The GetSessionToken operation must be called by using the long-term Amazon
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue