debian-forge-composer/vendor/github.com
Ondřej Budai 29f66a251f 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>
2022-08-29 10:25:38 +02:00
..
acarl005/stripansi container: add support for uploading to registries 2022-06-29 10:02:46 +02:00
aws/aws-sdk-go go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
aymerick/douceur go: update most dependencies to the latest version 2021-09-05 12:50:02 +01:00
Azure go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
beorn7/perks worker: add metrics 2021-07-23 21:54:28 +02:00
BurntSushi/toml go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
cenkalti/backoff/v4 go.mod: Update openshift-online/ocm-sdk-go 2022-05-19 22:18:42 +02:00
cespare/xxhash/v2 build(deps): bump cloud.google.com/go/storage from 1.18.2 to 1.22.0 2022-04-20 14:27:18 +02:00
containers go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
coreos Use semver to enforce blueprint version numbers 2020-02-25 09:00:35 +01:00
davecgh/go-spew worker: use openapi spec and generated code 2020-09-06 18:42:23 +01:00
deepmap/oapi-codegen go.mod: Update oapi-codegen and kin-openapi 2022-01-12 11:35:06 +01:00
dimchansky/utfbom go: update most dependencies to the latest version 2021-09-05 12:50:02 +01:00
docker container: add support for uploading to registries 2022-06-29 10:02:46 +02:00
dougm/pretty build(deps): bump github.com/vmware/govmomi from 0.27.4 to 0.28.0 2022-05-10 13:31:39 +02:00
getkin/kin-openapi cloudapi: validate input 2022-05-16 13:20:46 +02:00
ghodss/yaml go: vendor the oapi-codegen cmd 2021-02-01 15:32:58 +01:00
go-openapi cloudapi: validate input 2022-05-16 13:20:46 +02:00
gobwas/glob go: include vendored modules 2020-02-17 16:09:17 +01:00
golang go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
golang-jwt/jwt go.mod: Update openshift-online/ocm-sdk-go 2022-05-19 22:18:42 +02:00
google go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
googleapis go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
gophercloud/gophercloud build(deps): bump github.com/gophercloud/gophercloud 2022-04-14 09:55:55 +02:00
gorilla container: add support for uploading to registries 2022-06-29 10:02:46 +02:00
hashicorp go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
inconshreveable/mousetrap OCI: vendor dependencies 2022-01-28 15:16:47 +01:00
jackc go.mod: Update openshift-online/ocm-sdk-go 2022-05-19 22:18:42 +02:00
jmespath/go-jmespath go: update most dependencies to the latest version 2021-09-05 12:50:02 +01:00
josharian/intern cloudapi: validate input 2022-05-16 13:20:46 +02:00
json-iterator/go lib: upgrade prometheus client to 1.12 2022-04-07 20:08:42 +02:00
julienschmidt/httprouter worker: add metrics 2021-07-23 21:54:28 +02:00
klauspost go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
kolo/xmlrpc go: update most dependencies to the latest version 2021-09-05 12:50:02 +01:00
kr/text build(deps): bump github.com/vmware/govmomi from 0.27.4 to 0.28.0 2022-05-10 13:31:39 +02:00
labstack build(deps): bump github.com/labstack/echo/v4 from 4.6.1 to 4.7.2 2022-04-12 10:01:15 +02:00
letsencrypt/boulder go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
mailru/easyjson cloudapi: validate input 2022-05-16 13:20:46 +02:00
mattn go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
matttproud/golang_protobuf_extensions worker: add metrics 2021-07-23 21:54:28 +02:00
microcosm-cc/bluemonday go.mod: Update openshift-online/ocm-sdk-go 2022-05-19 22:18:42 +02:00
Microsoft/go-winio container: add support for uploading to registries 2022-06-29 10:02:46 +02:00
miekg/pkcs11 container: add support for uploading to registries 2022-06-29 10:02:46 +02:00
mitchellh/go-homedir vendor Azure SDK 2020-04-27 20:34:20 +02:00
moby/sys/mountinfo go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
modern-go lib: upgrade prometheus client to 1.12 2022-04-07 20:08:42 +02:00
opencontainers go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
openshift-online/ocm-sdk-go go.mod: Update openshift-online/ocm-sdk-go 2022-05-19 22:18:42 +02:00
oracle/oci-go-sdk/v54 OCI: vendor dependencies 2022-01-28 15:16:47 +01:00
pkg/errors worker: use openapi spec and generated code 2020-09-06 18:42:23 +01:00
pmezard/go-difflib add missing packages to vendor directory 2020-03-13 16:00:29 +01:00
proglottis/gpgme go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
prometheus build(deps): bump github.com/prometheus/client_golang 2022-04-19 14:50:15 +02:00
rivo/uniseg container: add support for uploading to registries 2022-06-29 10:02:46 +02:00
segmentio/ksuid cloudapi: V2 2021-09-14 15:32:21 +02:00
sigstore/sigstore go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
sirupsen/logrus go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
sony/gobreaker OCI: vendor dependencies 2022-01-28 15:16:47 +01:00
spf13 build(deps): bump github.com/spf13/cobra from 0.0.3 to 1.4.0 2022-04-18 23:18:30 +02:00
stefanberger/go-pkcs11uri container: add support for uploading to registries 2022-06-29 10:02:46 +02:00
stretchr/testify go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
syndtr/gocapability container: add support for uploading to registries 2022-06-29 10:02:46 +02:00
theupdateframework/go-tuf go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
titanous/rocacheck go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
ubccr/kerby upload/koji: add support for GSSAPI/Kerberos auth 2020-08-27 17:29:57 +01:00
ulikunitz/xz container: add support for uploading to registries 2022-06-29 10:02:46 +02:00
valyala build(deps): bump github.com/labstack/echo/v4 from 4.1.11 to 4.5.0 2021-09-04 15:46:13 +02:00
vbatts/tar-split container: add support for uploading to registries 2022-06-29 10:02:46 +02:00
vbauerster/mpb/v7 go.mod: update github.com/containers/image/v5 2022-08-29 10:25:38 +02:00
VividCortex/ewma container: add support for uploading to registries 2022-06-29 10:02:46 +02:00
vmware/govmomi build(deps): bump github.com/vmware/govmomi from 0.27.4 to 0.28.0 2022-05-10 13:31:39 +02:00