diff --git a/go.mod b/go.mod index 2aa308299f..26019d7f70 100644 --- a/go.mod +++ b/go.mod @@ -230,3 +230,5 @@ require ( gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect tags.cncf.io/container-device-interface/specs-go v0.8.0 // indirect ) + +replace github.com/containers/common => github.com/Jamstah/common v0.0.0-20241129125228-ff282b120c34 diff --git a/go.sum b/go.sum index 9f0d847d68..8b1d1b3e05 100644 --- a/go.sum +++ b/go.sum @@ -10,6 +10,8 @@ github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg6 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/Jamstah/common v0.0.0-20241129125228-ff282b120c34 h1:pHhHRlA64r0lA/LdiH5PQfP6Ymv2VrKaql2zj4kfl0s= +github.com/Jamstah/common v0.0.0-20241129125228-ff282b120c34/go.mod h1:ySiyZ85+F3xk7kcQvaZo0Ii67Hma7T4JEeILEQPWEKY= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/Microsoft/hcsshim v0.12.9 h1:2zJy5KA+l0loz1HzEGqyNnjd3fyZA31ZBCGKacp6lLg= @@ -81,8 +83,6 @@ github.com/containernetworking/plugins v1.5.1 h1:T5ji+LPYjjgW0QM+KyrigZbLsZ8jaX+ github.com/containernetworking/plugins v1.5.1/go.mod h1:MIQfgMayGuHYs0XdNudf31cLLAC+i242hNm6KuDGqCM= github.com/containers/buildah v1.38.1-0.20241119213149-52437ef15d33 h1:Ih6KuyByK7ZGGzkS0M5rVBPLWIyeDvdL5klhsKBo8vA= github.com/containers/buildah v1.38.1-0.20241119213149-52437ef15d33/go.mod h1:RxIuKhwTpRl3ma4d4BF6QzSSeg9zNNvo/xhYJOKeDQs= -github.com/containers/common v0.61.1-0.20241125172552-a801fac4edc0 h1:Vh8IytxprODmjd4sALcSVUzhT28vT537UWsfCXcahWk= -github.com/containers/common v0.61.1-0.20241125172552-a801fac4edc0/go.mod h1:3mUU2/PxkOwvL46fmaRVj0YfBDBxNPOMctIvBHWo4Ak= github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg= github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I= github.com/containers/gvisor-tap-vsock v0.8.0 h1:Z8ZEWb+Lio0d+lXexONdUWT4rm9lF91vH0g3ARnMy7o= diff --git a/vendor/github.com/containers/common/libimage/push.go b/vendor/github.com/containers/common/libimage/push.go index dc99344808..692e76bc93 100644 --- a/vendor/github.com/containers/common/libimage/push.go +++ b/vendor/github.com/containers/common/libimage/push.go @@ -86,8 +86,16 @@ func (r *Runtime) Push(ctx context.Context, source, destination string, options destRef = dockerRef } - // docker-archive and only DockerV2Schema2MediaType support Gzip compression - if options.CompressionFormat != nil && + // docker-archive and DockerV2Schema2MediaType support only Gzip compression + // If the CompressionFormat has come from containers.conf (set as a default), + // but isn't supported for this push, we want to ignore it. + // If the CompressionFormat has come from the CLI (ForceCompressionFormat + // requires CompressionFormat to be set), we want to strip the invalid value + // so that the push attempt fails. + // + // Ideally this should all happen at a much higher layer, where the code can differentiate + // between a value coming from containers.conf vs. the CLI. + if options.CompressionFormat != nil && options.CompressionFormat.Name() != "gzip" && (destRef.Transport().Name() == dockerArchiveTransport.Transport.Name() || destRef.Transport().Name() == dockerDaemonTransport.Transport.Name() || options.ManifestMIMEType == manifest.DockerV2Schema2MediaType) { diff --git a/vendor/modules.txt b/vendor/modules.txt index a08736dbde..a8559ee57d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -174,7 +174,7 @@ github.com/containers/buildah/pkg/sshagent github.com/containers/buildah/pkg/util github.com/containers/buildah/pkg/volumes github.com/containers/buildah/util -# github.com/containers/common v0.61.1-0.20241125172552-a801fac4edc0 +# github.com/containers/common v0.61.1-0.20241125172552-a801fac4edc0 => github.com/Jamstah/common v0.0.0-20241129125228-ff282b120c34 ## explicit; go 1.22.6 github.com/containers/common/internal github.com/containers/common/internal/attributedstring @@ -1393,3 +1393,4 @@ tags.cncf.io/container-device-interface/pkg/parser # tags.cncf.io/container-device-interface/specs-go v0.8.0 ## explicit; go 1.19 tags.cncf.io/container-device-interface/specs-go +# github.com/containers/common => github.com/Jamstah/common v0.0.0-20241129125228-ff282b120c34