Skip to content

Commit

Permalink
universe/skopeo: enable Docker Client API version negotiation
Browse files Browse the repository at this point in the history
Updating a vendored dependency to enable Docker Client API
version negotiation:

  containers/image#2260

and, in particular, make skopeo work with Docker 25.
  • Loading branch information
kholmanskikh committed Jan 26, 2024
1 parent caa28a5 commit 8c9add5
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
32 changes: 32 additions & 0 deletions universe/skopeo/0100-Enable-docker-api-version-negotiation.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Update a vendored dependency to enable Docker client API
version negotiation.

Upstream PR:

https://github.com/containers/image/pull/2260

diff --git a/vendor/github.com/containers/image/v5/docker/daemon/client.go b/vendor/github.com/containers/image/v5/docker/daemon/client.go
index 2c245f5..354af21 100644
--- a/vendor/github.com/containers/image/v5/docker/daemon/client.go
+++ b/vendor/github.com/containers/image/v5/docker/daemon/client.go
@@ -9,11 +9,6 @@ import (
"github.com/docker/go-connections/tlsconfig"
)

-const (
- // The default API version to be used in case none is explicitly specified
- defaultAPIVersion = "1.22"
-)
-
// NewDockerClient initializes a new API client based on the passed SystemContext.
func newDockerClient(sys *types.SystemContext) (*dockerclient.Client, error) {
host := dockerclient.DefaultDockerHost
@@ -23,7 +18,7 @@ func newDockerClient(sys *types.SystemContext) (*dockerclient.Client, error) {

opts := []dockerclient.Opt{
dockerclient.WithHost(host),
- dockerclient.WithVersion(defaultAPIVersion),
+ dockerclient.WithAPIVersionNegotiation(),
}

// We conditionalize building the TLS configuration only to TLS sockets:
8 changes: 6 additions & 2 deletions universe/skopeo/APKBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pkgname=skopeo
pkgver=1.14.1
pkgrel=0
pkgrel=1
# set this to the gitrev of the version
_gitrev=45b7bf5e4ac70a5bfe29e0486719d8390bd6679c
pkgdesc="Work with remote images registries - retrieving information, images, signing content"
Expand All @@ -25,7 +25,10 @@ subpackages="
$pkgname-fish-completion
$pkgname-zsh-completion
"
source="https://github.com/containers/skopeo/archive/v$pkgver/skopeo-$pkgver.tar.gz"
source="https://github.com/containers/skopeo/archive/v$pkgver/skopeo-$pkgver.tar.gz
0100-Enable-docker-api-version-negotiation.patch
"

# secfixes:
# 1.5.2-r0:
Expand Down Expand Up @@ -53,4 +56,5 @@ package() {

sha512sums="
5c0cf81ad283fcf715f68e361b1e6525c5521adf09b4fc733221cad12306f60c7a77c2f9c956d80575db953c5c91699a86aeba6ea37f1ce396c672e9dc3b2e4d skopeo-1.14.1.tar.gz
9fb6649e6565a60698ce1bdd79a52631da1347469942dfe7d35a5c8f734475768c3b8273e184b5aa8f55c1b2cbf2e88a2e20d2092132611919887eb5b8075b76 0100-Enable-docker-api-version-negotiation.patch
"

0 comments on commit 8c9add5

Please sign in to comment.