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

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.

Signed-off-by: Christian Stewart <christian@paral.in>
[yann.morin.1998@free.fr:
  - run fixups in post-extract hook
  - rework commit log for (hopefully) better explanations
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
Christian Stewart 2023-02-06 20:30:08 -08:00 committed by Yann E. MORIN
parent 29fd8481e2
commit 485b47e025
2 changed files with 11 additions and 2 deletions

View File

@ -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

View File

@ -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