diff mbox series

[v3,3/3] package/docker-cli: bump version to v23.0.0

Message ID 20230207043010.85696-3-christian@paral.in
State Accepted
Headers show
Series [v3,1/3] package/docker-engine: bump version to v23.0.0 | expand

Commit Message

Christian Stewart Feb. 7, 2023, 4:30 a.m. UTC
docker-cli does not ship a go.mod file in the tarball: create one to tell the Go
compiler the root import path prefix for the module and the language version.
Note that the language version in go.mod is not required to be equal the version
of the Go compiler.

This update requires a workaround for the non-standard vendor/ structure in the
docker-engine repository, which has an invalid vendor/modules.txt file.

Reference: https://github.com/moby/moby/issues/44618#issuecomment-1343565705

Signed-off-by: Christian Stewart <christian@paral.in>

---

v2 -> v3:

 - create go.mod file in the CONFIGURE step
 - update comments regarding adjusting language version
 - use rm -f instead of checking for file existence

Signed-off-by: Christian Stewart <christian@paral.in>
---
 package/docker-cli/docker-cli.hash |  2 +-
 package/docker-cli/docker-cli.mk   | 10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/package/docker-cli/docker-cli.hash b/package/docker-cli/docker-cli.hash
index c6db95f9b3..ff981be963 100644
--- a/package/docker-cli/docker-cli.hash
+++ b/package/docker-cli/docker-cli.hash
@@ -1,3 +1,3 @@ 
 # Locally calculated
-sha256  84d71ac2b508b54e8df9f3ea425aa33e254fd3645fe9bad5619b98eaffb33408  docker-cli-20.10.22.tar.gz
+sha256  3379d06cd6177832b91f4796c680b6bf15c7895773448716b4c3c5253f611d1b  docker-cli-23.0.0.tar.gz
 sha256  2d81ea060825006fc8f3fe28aa5dc0ffeb80faf325b612c955229157b8c10dc0  LICENSE
diff --git a/package/docker-cli/docker-cli.mk b/package/docker-cli/docker-cli.mk
index cb44c68c1b..4b0c9dcc89 100644
--- a/package/docker-cli/docker-cli.mk
+++ b/package/docker-cli/docker-cli.mk
@@ -4,7 +4,7 @@ 
 #
 ################################################################################
 
-DOCKER_CLI_VERSION = 20.10.22
+DOCKER_CLI_VERSION = 23.0.0
 DOCKER_CLI_SITE = $(call github,docker,cli,v$(DOCKER_CLI_VERSION))
 
 DOCKER_CLI_LICENSE = Apache-2.0
@@ -29,6 +29,14 @@  DOCKER_CLI_TAGS += osusergo netgo
 DOCKER_CLI_GO_ENV = CGO_ENABLED=no
 endif
 
+# create the go.mod file with language version go1.19
+# remove the conflicting vendor/modules.txt
+# https://github.com/moby/moby/issues/44618#issuecomment-1343565705
+define DOCKER_CLI_CONFIGURE_CMDS
+	printf "module $(DOCKER_CLI_GOMOD)\n\ngo 1.19\n" > $(@D)/go.mod
+	rm -f $(@D)/vendor/modules.txt
+endef
+
 DOCKER_CLI_INSTALL_BINS = $(notdir $(DOCKER_CLI_BUILD_TARGETS))
 
 $(eval $(golang-package))