Skip to contentSkip to conversation

package/docker-engine: bump version to v23.0.0

Buildroot Yann E. MORIN 1 participant 1 message Feb 7, 2023

lore
Share & tools
lore
#0 lore raw

commit: https://git.buildroot.net/buildroot/commit/?id=485b47e025541a58358d8852c600b8e7644b4ec6
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

This update requires a few workaround for the non-standard vendor/ structure in the docker-engine repository.

First, as the vendor/ directory exists, our go-post-process script does not do the vendoring, and exits early, which is exactly what we need.

Second, docker-engine does not use the "new" go.mod mechanism, so it does not ship any go.mod file, so our go-post-proces, exiting early, does not check that the go.mod file exists, and thus does not fail, which is again exactly what we need.

Third, docker-engine has an invalid vendor/modules.txt file that we need to remove or go would fail to build. Since our go-post-process exits early, there is no vendoring, and thus it does not break at download, which once more is exactly what we need.

However, the missing go.mod and the problematic vendor/modules.txt cause go to fail at build time, which this time is not really, even really not, what we want...

So, we fix it up in two ways.

First, the easy part: we just remove the problematic vendor/modules.txt file.

Second, we create a go.mod 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.

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

Note that as of v23.0.0 docker-engine expects containerd to be started by systemd if --containerd= flag is set in dockerd.service, whereas in previous versions containerd was started by the docker daemon as a sub-process.

There is no sysv unit for containerd, but this is OK: in the Docker sysv init file S60dockerd, we do not set the --containerd flag. The docker daemon will start containerd as a sub-process automatically due to the absence of this flag.

[[email protected]:
- run fixups in post-extract hook
- rework commit log for (hopefully) better explanations
]

---
 package/docker-engine/docker-engine.hash |  2 +-
 package/docker-engine/docker-engine.mk   | 11 ++++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)
package/docker-engine/docker-engine.hash +1 -1
index d15b1359cb..670cbd414b 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  ee0e2168e27ec87f1b0650e86af5d3e167a07fd2ff8c1ce3bb588f0b4f9a4658  docker-engine-20.10.22.tar.gz
+sha256  94492508260e57eb93399257d53435cd5308ca6330e173ca6e6f3dbf4c6e12f3  docker-engine-23.0.0.tar.gz
 sha256  7c87873291f289713ac5df48b1f2010eb6963752bbd6b530416ab99fc37914a8  LICENSE
package/docker-engine/docker-engine.mk +10 -1
index 2a9b72ca78..c50f08245d 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-DOCKER_ENGINE_VERSION = 20.10.22
+DOCKER_ENGINE_VERSION = 23.0.0
 DOCKER_ENGINE_SITE = $(call github,moby,moby,v$(DOCKER_ENGINE_VERSION))
 
 DOCKER_ENGINE_LICENSE = Apache-2.0
@@ -62,6 +62,15 @@ else
 DOCKER_ENGINE_TAGS += exclude_graphdriver_vfs
 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_ENGINE_FIX_VENDORING
+	printf "module $(DOCKER_ENGINE_GOMOD)\n\ngo 1.19\n" > $(@D)/go.mod
+	rm -f $(@D)/vendor/modules.txt
+endef
+DOCKER_ENGINE_POST_EXTRACT_HOOKS += DOCKER_ENGINE_FIX_VENDORING
+
 DOCKER_ENGINE_INSTALL_BINS = $(notdir $(DOCKER_ENGINE_BUILD_TARGETS))
 
 define DOCKER_ENGINE_INSTALL_INIT_SYSTEMD

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot