diff --git a/recipes-containers/docker/docker-moby_git.bb b/recipes-containers/docker/docker-moby_git.bb index 47ded68c..0078ab6d 100644 --- a/recipes-containers/docker/docker-moby_git.bb +++ b/recipes-containers/docker/docker-moby_git.bb @@ -44,8 +44,8 @@ DESCRIPTION = "Linux container runtime \ # so we get that tag, and make it our SRCREVS: # -SRCREV_moby = "80947b5724c59fb08eb5489fca622411235ecbb4" -SRCREV_cli = "b0d1d9471156ec95aad5c929513718ad89b0309b" +SRCREV_moby = "d1a720cb15d99821e7b96197b0f01ffea33b7356" +SRCREV_cli = "171a9b70b2736c719019393259ecebdcac47bead" SRCREV_FORMAT = "moby" SRC_URI = "\ git://github.com/moby/moby.git;nobranch=1;name=moby;protocol=https;destsuffix=${GO_SRCURI_DESTSUFFIX} \ @@ -64,7 +64,7 @@ require docker.inc LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=4859e97a9c7780e77972d989f0823f28" -DOCKER_VERSION = "28.3.3" +DOCKER_VERSION = "29.0.0-rc.1" PV = "${DOCKER_VERSION}+git${SRCREV_moby}" CVE_PRODUCT = "docker mobyproject:moby" diff --git a/recipes-containers/docker/docker.inc b/recipes-containers/docker/docker.inc index c464bc3c..99535a77 100644 --- a/recipes-containers/docker/docker.inc +++ b/recipes-containers/docker/docker.inc @@ -3,6 +3,8 @@ DEPENDS = " \ sqlite3 \ libtool-native \ libtool \ + nftables \ + libnftnl \ " DEPENDS:append:class-target = " lvm2" @@ -57,7 +59,7 @@ do_configure[noexec] = "1" # Export for possible use in Makefiles, default value comes from go.bbclass export GO_LINKSHARED -DOCKER_PKG = "github.com/docker/docker" +DOCKER_PKG = "github.com/moby/moby/v2" # in order to exclude devicemapper and btrfs - https://github.com/docker/docker/issues/14056 BUILD_TAGS ?= "exclude_graphdriver_btrfs exclude_graphdriver_devicemapper" @@ -68,8 +70,8 @@ do_compile() { cd ${S}/src/import rm -rf .gopath mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")" - ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}" - + ln -sf ../../../../.. .gopath/src/"${DOCKER_PKG}" + mkdir -p .gopath/src/github.com/docker ln -sf ${S}/cli .gopath/src/github.com/docker/cli @@ -86,6 +88,7 @@ do_compile() { export GO111MODULE=off export DISABLE_WARN_OUTSIDE_CONTAINER=1 + export BUILDFLAGS="-trimpath" cd ${S}/src/import/ @@ -95,10 +98,11 @@ do_compile() { VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${DOCKER_COMMIT}" ./hack/make.sh dynbinary # build the cli - cd ${S}/src/import/.gopath/src/github.com/docker/cli + cd ${S}/cli export CFLAGS="" export LDFLAGS="" export DOCKER_VERSION=${DOCKER_VERSION} + export BUILDFLAGS="-trimpath" VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${DOCKER_COMMIT}" make dynbinary } diff --git a/recipes-containers/docker/files/0001-check-config-make-CONFIG_MEMCG_SWAP-conditional.patch b/recipes-containers/docker/files/0001-check-config-make-CONFIG_MEMCG_SWAP-conditional.patch index 95ba2225..b7fe5775 100644 --- a/recipes-containers/docker/files/0001-check-config-make-CONFIG_MEMCG_SWAP-conditional.patch +++ b/recipes-containers/docker/files/0001-check-config-make-CONFIG_MEMCG_SWAP-conditional.patch @@ -40,14 +40,16 @@ Index: import/contrib/check-config.sh =================================================================== --- import.orig/contrib/check-config.sh +++ import/contrib/check-config.sh -@@ -246,7 +246,9 @@ echo 'Optional Features:' - check_flags CGROUP_PIDS +@@ -253,9 +253,11 @@ echo 'Optional Features:' + check_flags SECCOMP_FILTER } { -- check_flags MEMCG_SWAP +- check_flags CGROUP_PIDS + if [ "$kernelMajor" -lt 6 ] || [ "$kernelMajor" -eq 6 -a "$kernelMinor" -le 1 ]; then -+ check_flags MEMCG_SWAP ++ check_flags CGROUP_PIDS + } + { + fi - # Kernel v5.8+ removes MEMCG_SWAP_ENABLED. - if [ "$kernelMajor" -lt 5 ] || [ "$kernelMajor" -eq 5 -a "$kernelMinor" -le 8 ]; then + # Kernel v5.8+ removes MEMCG_SWAP_ENABLED and deprecates MEMCG_SWAP. + if [ "$kernelMajor" -lt 5 ] || [ "$kernelMajor" -eq 5 -a "$kernelMinor" -lt 8 ]; then CODE=${EXITCODE} diff --git a/recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch b/recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch index e3f20a3a..948f5ce8 100644 --- a/recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch +++ b/recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch @@ -102,8 +102,8 @@ Index: import/hack/make/.binary if [ -n "$DOCKER_DEBUG" ]; then set -x fi -- ./hack/with-go-mod.sh go build -mod=vendor -modfile=vendor.mod -o "$DEST/$BINARY_FULLNAME" "${BUILDFLAGS[@]}" -ldflags "$LDFLAGS $LDFLAGS_STATIC $DOCKER_LDFLAGS" -gcflags="${GCFLAGS}" "$GO_PACKAGE" -+ ./hack/with-go-mod.sh ${GO} build -trimpath -mod=vendor -modfile=vendor.mod -o "$DEST/$BINARY_FULLNAME" "${BUILDFLAGS[@]}" -ldflags "$LDFLAGS $LDFLAGS_STATIC $DOCKER_LDFLAGS" -gcflags="${GCFLAGS}" "$GO_PACKAGE" - ) +- go build -o "$DEST/$BINARY_FULLNAME" "${BUILDFLAGS[@]}" -ldflags "$LDFLAGS $LDFLAGS_STATIC $DOCKER_LDFLAGS" -gcflags="${GCFLAGS}" "$GO_PACKAGE" ++ $GO build -o "$DEST/$BINARY_FULLNAME" "${BUILDFLAGS[@]}" -ldflags "$LDFLAGS $LDFLAGS_STATIC $DOCKER_LDFLAGS" -gcflags="${GCFLAGS}" "$GO_PACKAGE" - echo "Created binary: $DEST/$BINARY_FULLNAME" + # Verify that the built binary contains windows resources + if [ "$(go env GOOS)" = "windows" ]; then