diff options
| author | Martin Jansa <Martin.Jansa@gmail.com> | 2023-08-14 17:13:56 +0200 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2023-08-15 18:45:49 +0000 |
| commit | 36b5b74c892971f0edb7c54a4e19d2fc7c4cc323 (patch) | |
| tree | 3e971978fbc2b9db24aa308d03ff8229838a532a | |
| parent | af02908efda1580e77b3fdeed25b124a2b8d9482 (diff) | |
| download | meta-virtualization-36b5b74c892971f0edb7c54a4e19d2fc7c4cc323.tar.gz | |
docker: update to v20.10.25 + 58 commits to fix compatibility with go currently in kirkstone
* since this backport:
https://lists.openembedded.org/g/openembedded-core/message/185082
landed in kirkstone:
https://git.openembedded.org/openembedded-core/commit/?h=kirkstone&id=5dc74138649ab7a2c0158a43225dc7a8fd732355
docker cannot access network and fails with:
"http: invalid Host header"
update to latest commit in 20.10 branch, because latest tag v20.10.25
have the fix yet:
https://github.com/moby/moby/compare/v20.10.21...v20.10.25
so we need couple more commits from upstream:
https://github.com/moby/moby/compare/v20.10.25...791d8ab87747169b4cbfcdf2fd57c81952bae6d5
Adjust the go version revert which was here since the upgrade to v20.10.21:
https://git.yoctoproject.org/meta-virtualization/commit/?h=kirkstone&id=927537108bcf2b98859512ce3eae59a73439994d
and add another revert for the go upgrades from upstream for this older
patch to apply.
* update cli to latest in 20.10 branch as well:
https://github.com/docker/cli/compare/baeda1f82a10204ec5708d5fbba130ad76cfee49..911449ca245308472a3d34a7f1a98b918e65c8c3
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
| -rw-r--r-- | recipes-containers/docker/docker-ce_git.bb | 27 | ||||
| -rw-r--r-- | recipes-containers/docker/docker-moby_git.bb | 29 | ||||
| -rw-r--r-- | recipes-containers/docker/files/0001-Revert-go-updates-from-1.19.12-to-1.18.7.patch | 144 | ||||
| -rw-r--r-- | recipes-containers/docker/files/0002-Revert-go-updates-from-1.18.7-to-1.17.13.patch (renamed from recipes-containers/docker/files/0001-revert-go-1.8-update.patch) | 35 | ||||
| -rw-r--r-- | recipes-containers/docker/files/0003-builder.go-avoid-using-strings.Cut-from-go-1.18.patch | 32 |
5 files changed, 218 insertions, 49 deletions
diff --git a/recipes-containers/docker/docker-ce_git.bb b/recipes-containers/docker/docker-ce_git.bb index a41e83ae..76ac41ee 100644 --- a/recipes-containers/docker/docker-ce_git.bb +++ b/recipes-containers/docker/docker-ce_git.bb | |||
| @@ -33,18 +33,20 @@ DESCRIPTION = "Linux container runtime \ | |||
| 33 | 33 | ||
| 34 | SRCREV_docker = "3056208812eb5e792fa99736c9167d1e10f4ab49" | 34 | SRCREV_docker = "3056208812eb5e792fa99736c9167d1e10f4ab49" |
| 35 | SRCREV_libnetwork = "dcdf8f176d1e13ad719e913e796fb698d846de98" | 35 | SRCREV_libnetwork = "dcdf8f176d1e13ad719e913e796fb698d846de98" |
| 36 | SRCREV_cli = "baeda1f82a10204ec5708d5fbba130ad76cfee49" | 36 | SRCREV_cli = "911449ca245308472a3d34a7f1a98b918e65c8c3" |
| 37 | SRCREV_FORMAT = "docker_libnetwork" | 37 | SRCREV_FORMAT = "docker_libnetwork" |
| 38 | SRC_URI = "\ | 38 | SRC_URI = "\ |
| 39 | git://github.com/docker/docker.git;branch=20.10;name=docker;protocol=https \ | 39 | git://github.com/docker/docker.git;branch=20.10;name=docker;protocol=https \ |
| 40 | git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=git/libnetwork;protocol=https \ | 40 | git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=git/libnetwork;protocol=https \ |
| 41 | git://github.com/docker/cli;branch=20.10;name=cli;destsuffix=git/cli;protocol=https \ | 41 | git://github.com/docker/cli;branch=20.10;name=cli;destsuffix=git/cli;protocol=https \ |
| 42 | file://0001-libnetwork-use-GO-instead-of-go.patch \ | 42 | file://0001-libnetwork-use-GO-instead-of-go.patch \ |
| 43 | file://docker.init \ | 43 | file://docker.init \ |
| 44 | file://0001-dynbinary-use-go-cross-compiler.patch \ | 44 | file://0001-dynbinary-use-go-cross-compiler.patch \ |
| 45 | file://0001-cli-use-external-GO111MODULE-and-cross-compiler.patch \ | 45 | file://0001-cli-use-external-GO111MODULE-and-cross-compiler.patch \ |
| 46 | file://0001-revert-go-1.8-update.patch;patchdir=src/import \ | 46 | file://0001-Revert-go-updates-from-1.19.12-to-1.18.7.patch;patchdir=src/import \ |
| 47 | " | 47 | file://0002-Revert-go-updates-from-1.18.7-to-1.17.13.patch;patchdir=src/import \ |
| 48 | file://0003-builder.go-avoid-using-strings.Cut-from-go-1.18.patch;patchdir=src/import \ | ||
| 49 | " | ||
| 48 | 50 | ||
| 49 | DOCKER_COMMIT = "${SRCREV_docker}" | 51 | DOCKER_COMMIT = "${SRCREV_docker}" |
| 50 | 52 | ||
| @@ -54,7 +56,10 @@ require docker.inc | |||
| 54 | LICENSE = "Apache-2.0" | 56 | LICENSE = "Apache-2.0" |
| 55 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=4859e97a9c7780e77972d989f0823f28" | 57 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=4859e97a9c7780e77972d989f0823f28" |
| 56 | 58 | ||
| 57 | DOCKER_VERSION = "20.10.21-ce" | 59 | # 58 commits after v20.10.25 to include the fixes for go compatibility after |
| 60 | # https://lists.openembedded.org/g/openembedded-core/message/185082 | ||
| 61 | # https://github.com/moby/moby/compare/v20.10.25...791d8ab87747169b4cbfcdf2fd57c81952bae6d5 | ||
| 62 | DOCKER_VERSION = "20.10.25-ce" | ||
| 58 | PV = "${DOCKER_VERSION}+git${SRCREV_docker}" | 63 | PV = "${DOCKER_VERSION}+git${SRCREV_docker}" |
| 59 | 64 | ||
| 60 | CVE_PRODUCT = "docker mobyproject:moby" | 65 | CVE_PRODUCT = "docker mobyproject:moby" |
diff --git a/recipes-containers/docker/docker-moby_git.bb b/recipes-containers/docker/docker-moby_git.bb index b0482082..5f8de075 100644 --- a/recipes-containers/docker/docker-moby_git.bb +++ b/recipes-containers/docker/docker-moby_git.bb | |||
| @@ -34,20 +34,22 @@ DESCRIPTION = "Linux container runtime \ | |||
| 34 | # - The common components of this recipe and docker-ce do need to be moved | 34 | # - The common components of this recipe and docker-ce do need to be moved |
| 35 | # to a docker.inc recipe | 35 | # to a docker.inc recipe |
| 36 | 36 | ||
| 37 | SRCREV_moby = "3056208812eb5e792fa99736c9167d1e10f4ab49" | 37 | SRCREV_moby = "791d8ab87747169b4cbfcdf2fd57c81952bae6d5" |
| 38 | SRCREV_libnetwork = "dcdf8f176d1e13ad719e913e796fb698d846de98" | 38 | SRCREV_libnetwork = "dcdf8f176d1e13ad719e913e796fb698d846de98" |
| 39 | SRCREV_cli = "baeda1f82a10204ec5708d5fbba130ad76cfee49" | 39 | SRCREV_cli = "911449ca245308472a3d34a7f1a98b918e65c8c3" |
| 40 | SRCREV_FORMAT = "moby_libnetwork" | 40 | SRCREV_FORMAT = "moby_libnetwork" |
| 41 | SRC_URI = "\ | 41 | SRC_URI = "\ |
| 42 | git://github.com/moby/moby.git;branch=20.10;name=moby;protocol=https \ | 42 | git://github.com/moby/moby.git;branch=20.10;name=moby;protocol=https \ |
| 43 | git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=git/libnetwork;protocol=https \ | 43 | git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=git/libnetwork;protocol=https \ |
| 44 | git://github.com/docker/cli;branch=20.10;name=cli;destsuffix=git/cli;protocol=https \ | 44 | git://github.com/docker/cli;branch=20.10;name=cli;destsuffix=git/cli;protocol=https \ |
| 45 | file://docker.init \ | 45 | file://docker.init \ |
| 46 | file://0001-libnetwork-use-GO-instead-of-go.patch \ | 46 | file://0001-libnetwork-use-GO-instead-of-go.patch \ |
| 47 | file://0001-cli-use-external-GO111MODULE-and-cross-compiler.patch \ | 47 | file://0001-cli-use-external-GO111MODULE-and-cross-compiler.patch \ |
| 48 | file://0001-dynbinary-use-go-cross-compiler.patch \ | 48 | file://0001-dynbinary-use-go-cross-compiler.patch \ |
| 49 | file://0001-revert-go-1.8-update.patch;patchdir=src/import \ | 49 | file://0001-Revert-go-updates-from-1.19.12-to-1.18.7.patch;patchdir=src/import \ |
| 50 | " | 50 | file://0002-Revert-go-updates-from-1.18.7-to-1.17.13.patch;patchdir=src/import \ |
| 51 | file://0003-builder.go-avoid-using-strings.Cut-from-go-1.18.patch;patchdir=src/import \ | ||
| 52 | " | ||
| 51 | 53 | ||
| 52 | DOCKER_COMMIT = "${SRCREV_moby}" | 54 | DOCKER_COMMIT = "${SRCREV_moby}" |
| 53 | 55 | ||
| @@ -57,7 +59,10 @@ require docker.inc | |||
| 57 | LICENSE = "Apache-2.0" | 59 | LICENSE = "Apache-2.0" |
| 58 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=4859e97a9c7780e77972d989f0823f28" | 60 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=4859e97a9c7780e77972d989f0823f28" |
| 59 | 61 | ||
| 60 | DOCKER_VERSION = "20.10.21" | 62 | # 58 commits after v20.10.25 to include the fixes for go compatibility after |
| 63 | # https://lists.openembedded.org/g/openembedded-core/message/185082 | ||
| 64 | # https://github.com/moby/moby/compare/v20.10.25...791d8ab87747169b4cbfcdf2fd57c81952bae6d5 | ||
| 65 | DOCKER_VERSION = "20.10.25" | ||
| 61 | PV = "${DOCKER_VERSION}+git${SRCREV_moby}" | 66 | PV = "${DOCKER_VERSION}+git${SRCREV_moby}" |
| 62 | 67 | ||
| 63 | CVE_PRODUCT = "docker mobyproject:moby" | 68 | CVE_PRODUCT = "docker mobyproject:moby" |
diff --git a/recipes-containers/docker/files/0001-Revert-go-updates-from-1.19.12-to-1.18.7.patch b/recipes-containers/docker/files/0001-Revert-go-updates-from-1.19.12-to-1.18.7.patch new file mode 100644 index 00000000..2a3f3b97 --- /dev/null +++ b/recipes-containers/docker/files/0001-Revert-go-updates-from-1.19.12-to-1.18.7.patch | |||
| @@ -0,0 +1,144 @@ | |||
| 1 | From 2cc349a336cd3cb4fa33554216a99dbce3879d29 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 3 | Date: Mon, 14 Aug 2023 16:02:30 +0200 | ||
| 4 | Subject: [PATCH] Revert go updates from 1.19.12 to 1.18.7 | ||
| 5 | |||
| 6 | To continue using 1.17 version as implemented for some reason in: | ||
| 7 | https://git.yoctoproject.org/meta-virtualization/commit/?h=kirkstone&id=927537108bcf2b98859512ce3eae59a73439994d | ||
| 8 | with 0001-revert-go-1.8-update.patch | ||
| 9 | |||
| 10 | Revert "update to go1.19.12" | ||
| 11 | This reverts commit c42d7c7f6d0dccfe5d85f0126da2c8ec77573616. | ||
| 12 | Revert "[20.10] update go to go1.19.11" | ||
| 13 | This reverts commit 43fe787c232c54b53bda21301bbf3a463c4e4056. | ||
| 14 | Revert "[20.10] update go to go1.19.10" | ||
| 15 | This reverts commit 99f10dec91409c4f6ed2c4867638f4e5ea678f0a. | ||
| 16 | Revert "Dockerfile: temporarily skip CRIU stage" | ||
| 17 | This reverts commit af0477880cc8c0197517c0bc8de0cbd6cb9bd9a9. | ||
| 18 | Revert "[20.10] update go to go1.19.9" | ||
| 19 | This reverts commit 7f91a52b8969f5604fdca36ee30475cc9600be5b. | ||
| 20 | Revert "[20.10] update go to go1.19.8" | ||
| 21 | This reverts commit a09b3e9cf9de906438a6300760754fcb087f166a. | ||
| 22 | Revert "update to go1.19.7" | ||
| 23 | This reverts commit 9aa5d55a8ba8725133a6fbb5ac98d1fab341fdc7. | ||
| 24 | Revert "update to go1.19.6" | ||
| 25 | This reverts commit 98c9e3f43833bf87c21e02aca77c75c7a475ecd6. | ||
| 26 | Revert "update to go1.19.5" | ||
| 27 | This reverts commit 5b48f300dd0c6a2bbfc942408bc7e3fbc39609f0. | ||
| 28 | Revert "update to go1.19.4" | ||
| 29 | This reverts commit 82b0ac1166cc553e2757c5d490ce69078064ef6e. | ||
| 30 | Revert "Update to Go 1.19.3 to address CVE-2022-41716" | ||
| 31 | This reverts commit 4701ca9f719f5386d2ca2417b566b5950aa8a929. | ||
| 32 | Revert "Update to go 1.19.2 to address CVE-2022-2879, CVE-2022-2880, CVE-2022-41715" | ||
| 33 | This reverts commit 1c8c16524f94ae69eb33c5c9000e87615ce973a6. | ||
| 34 | Revert "Update to go 1.19.1 to address CVE-2022-27664, CVE-2022-32190" | ||
| 35 | This reverts commit 6cc1ef32a28e7e6e74383d4775bd178d36495181. | ||
| 36 | Revert "update to golang 1.19" | ||
| 37 | This reverts commit 5091f13a5d027b785084028aedb03beb5b0bd9a6. | ||
| 38 | Revert "Dockerfile: configure code dir as "safe" directory" | ||
| 39 | This reverts commit 0312e468da5c99267654d5c6b62785e29ffe6e0d. | ||
| 40 | Revert "[20.10] update to go1.18.10" | ||
| 41 | This reverts commit 625903f3fda862c69492256016b386628954b3a4. | ||
| 42 | Revert "[20.10] update gotestsum to v1.8.2" | ||
| 43 | This reverts commit edca413033cea5252f69bfc740e9450e5d0a0ef9. | ||
| 44 | Revert "[20.10] update to go1.18.9" | ||
| 45 | This reverts commit f8b0d77bfe109c5248ba6eb6c6db7f32e99a2e75. | ||
| 46 | Revert "[20.10] update to Go 1.18.8 to address CVE-2022-41716" | ||
| 47 | This reverts commit 0211f9e44dba888fa62dc2ba59ea573ad70e9708. | ||
| 48 | |||
| 49 | Upstream-Status: Inapropriate | ||
| 50 | --- | ||
| 51 | Dockerfile | 12 ++---------- | ||
| 52 | Dockerfile.e2e | 2 +- | ||
| 53 | Dockerfile.simple | 2 +- | ||
| 54 | Dockerfile.windows | 4 ++-- | ||
| 55 | hack/dockerfile/install/gotestsum.installer | 2 +- | ||
| 56 | 5 files changed, 7 insertions(+), 15 deletions(-) | ||
| 57 | |||
| 58 | diff --git a/Dockerfile b/Dockerfile | ||
| 59 | index 4ee4d8dd2c..9472c512a6 100644 | ||
| 60 | --- a/Dockerfile | ||
| 61 | +++ b/Dockerfile | ||
| 62 | @@ -3,7 +3,7 @@ | ||
| 63 | ARG CROSS="false" | ||
| 64 | ARG SYSTEMD="false" | ||
| 65 | # IMPORTANT: When updating this please note that stdlib archive/tar pkg is vendored | ||
| 66 | -ARG GO_VERSION=1.19.12 | ||
| 67 | +ARG GO_VERSION=1.18.7 | ||
| 68 | ARG DEBIAN_FRONTEND=noninteractive | ||
| 69 | ARG VPNKIT_VERSION=0.5.0 | ||
| 70 | ARG DOCKER_BUILDTAGS="apparmor seccomp" | ||
| 71 | @@ -267,9 +267,6 @@ RUN ln -sfv /go/src/github.com/docker/docker/.bashrc ~/.bashrc | ||
| 72 | RUN echo "source /usr/share/bash-completion/bash_completion" >> /etc/bash.bashrc | ||
| 73 | RUN ln -s /usr/local/completion/bash/docker /etc/bash_completion.d/docker | ||
| 74 | RUN ldconfig | ||
| 75 | -# Set dev environment as safe git directory to prevent "dubious ownership" errors | ||
| 76 | -# when bind-mounting the source into the dev-container. See https://github.com/moby/moby/pull/44930 | ||
| 77 | -RUN git config --global --add safe.directory $GOPATH/src/github.com/docker/docker | ||
| 78 | # This should only install packages that are specifically needed for the dev environment and nothing else | ||
| 79 | # Do you really need to add another package here? Can it be done in a different build stage? | ||
| 80 | RUN --mount=type=cache,sharing=locked,id=moby-dev-aptlib,target=/var/lib/apt \ | ||
| 81 | @@ -316,12 +313,7 @@ COPY --from=swagger /build/ /usr/local/bin/ | ||
| 82 | COPY --from=tomlv /build/ /usr/local/bin/ | ||
| 83 | COPY --from=tini /build/ /usr/local/bin/ | ||
| 84 | COPY --from=registry /build/ /usr/local/bin/ | ||
| 85 | - | ||
| 86 | -# Skip the CRIU stage for now, as the opensuse package repository is sometimes | ||
| 87 | -# unstable, and we're currently not using it in CI. | ||
| 88 | -# | ||
| 89 | -# FIXME(thaJeztah): re-enable this stage when https://github.com/moby/moby/issues/38963 is resolved (see https://github.com/moby/moby/pull/38984) | ||
| 90 | -# COPY --from=criu /build/ /usr/local/ | ||
| 91 | +COPY --from=criu /build/ /usr/local/ | ||
| 92 | COPY --from=vndr /build/ /usr/local/bin/ | ||
| 93 | COPY --from=gotestsum /build/ /usr/local/bin/ | ||
| 94 | COPY --from=golangci_lint /build/ /usr/local/bin/ | ||
| 95 | diff --git a/Dockerfile.e2e b/Dockerfile.e2e | ||
| 96 | index 31f836fc16..f92bec85b0 100644 | ||
| 97 | --- a/Dockerfile.e2e | ||
| 98 | +++ b/Dockerfile.e2e | ||
| 99 | @@ -1,4 +1,4 @@ | ||
| 100 | -ARG GO_VERSION=1.19.12 | ||
| 101 | +ARG GO_VERSION=1.18.7 | ||
| 102 | |||
| 103 | FROM golang:${GO_VERSION}-alpine AS base | ||
| 104 | ENV GO111MODULE=off | ||
| 105 | diff --git a/Dockerfile.simple b/Dockerfile.simple | ||
| 106 | index af5fc13c25..8aa6d7ff94 100644 | ||
| 107 | --- a/Dockerfile.simple | ||
| 108 | +++ b/Dockerfile.simple | ||
| 109 | @@ -5,7 +5,7 @@ | ||
| 110 | |||
| 111 | # This represents the bare minimum required to build and test Docker. | ||
| 112 | |||
| 113 | -ARG GO_VERSION=1.19.12 | ||
| 114 | +ARG GO_VERSION=1.18.7 | ||
| 115 | |||
| 116 | FROM golang:${GO_VERSION}-buster | ||
| 117 | ENV GO111MODULE=off | ||
| 118 | diff --git a/Dockerfile.windows b/Dockerfile.windows | ||
| 119 | index 7c2fe66389..6f8242decc 100644 | ||
| 120 | --- a/Dockerfile.windows | ||
| 121 | +++ b/Dockerfile.windows | ||
| 122 | @@ -165,8 +165,8 @@ FROM microsoft/windowsservercore | ||
| 123 | # Use PowerShell as the default shell | ||
| 124 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] | ||
| 125 | |||
| 126 | -ARG GO_VERSION=1.19.12 | ||
| 127 | -ARG GOTESTSUM_VERSION=v1.8.2 | ||
| 128 | +ARG GO_VERSION=1.18.7 | ||
| 129 | +ARG GOTESTSUM_VERSION=v1.7.0 | ||
| 130 | |||
| 131 | # Environment variable notes: | ||
| 132 | # - GO_VERSION must be consistent with 'Dockerfile' used by Linux. | ||
| 133 | diff --git a/hack/dockerfile/install/gotestsum.installer b/hack/dockerfile/install/gotestsum.installer | ||
| 134 | index 8e88fec77b..5024179958 100755 | ||
| 135 | --- a/hack/dockerfile/install/gotestsum.installer | ||
| 136 | +++ b/hack/dockerfile/install/gotestsum.installer | ||
| 137 | @@ -1,6 +1,6 @@ | ||
| 138 | #!/bin/sh | ||
| 139 | |||
| 140 | -: ${GOTESTSUM_VERSION:=v1.8.2} | ||
| 141 | +: ${GOTESTSUM_VERSION:=v1.7.0} | ||
| 142 | |||
| 143 | install_gotestsum() ( | ||
| 144 | set -e | ||
diff --git a/recipes-containers/docker/files/0001-revert-go-1.8-update.patch b/recipes-containers/docker/files/0002-Revert-go-updates-from-1.18.7-to-1.17.13.patch index 0298c31a..7cacccb8 100644 --- a/recipes-containers/docker/files/0001-revert-go-1.8-update.patch +++ b/recipes-containers/docker/files/0002-Revert-go-updates-from-1.18.7-to-1.17.13.patch | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | From 575302e9c6567b8547b308b2b0c6a07b27e3be3b Mon Sep 17 00:00:00 2001 | 1 | From 575302e9c6567b8547b308b2b0c6a07b27e3be3b Mon Sep 17 00:00:00 2001 |
| 2 | From: Adrian Freihofer <adrian.freihofer@siemens.com> | 2 | From: Adrian Freihofer <adrian.freihofer@siemens.com> |
| 3 | Date: Sun, 4 Dec 2022 18:02:54 +0100 | 3 | Date: Sun, 4 Dec 2022 18:02:54 +0100 |
| 4 | Subject: [PATCH] Revert "Merge pull request #43976 from | 4 | Subject: [PATCH] Revert go updates from 1.18.7 to 1.17.13 |
| 5 | thaJeztah/20.10_backport_bump_golang_1.18" | ||
| 6 | 5 | ||
| 7 | Upstream-Status: Inapropriate | 6 | Upstream-Status: Inapropriate |
| 8 | 7 | ||
| @@ -25,12 +24,11 @@ changes made to 32debe0986f4516bfe17bf9122447f0c735e61b4. | |||
| 25 | vendor/archive/tar/reader_test.go | 30 +++--- | 24 | vendor/archive/tar/reader_test.go | 30 +++--- |
| 26 | vendor/archive/tar/stat_actime1.go | 1 + | 25 | vendor/archive/tar/stat_actime1.go | 1 + |
| 27 | vendor/archive/tar/stat_actime2.go | 1 + | 26 | vendor/archive/tar/stat_actime2.go | 1 + |
| 28 | vendor/archive/tar/stat_unix.go | 1 + | ||
| 29 | vendor/archive/tar/strconv.go | 43 +++++--- | 27 | vendor/archive/tar/strconv.go | 43 +++++--- |
| 30 | vendor/archive/tar/tar_test.go | 2 +- | 28 | vendor/archive/tar/tar_test.go | 2 +- |
| 31 | vendor/archive/tar/writer.go | 89 ++++++++--------- | 29 | vendor/archive/tar/writer.go | 89 ++++++++--------- |
| 32 | vendor/archive/tar/writer_test.go | 24 +++-- | 30 | vendor/archive/tar/writer_test.go | 24 +++-- |
| 33 | 18 files changed, 251 insertions(+), 312 deletions(-) | 31 | 17 files changed, 250 insertions(+), 312 deletions(-) |
| 34 | delete mode 100644 vendor/archive/tar/fuzz_test.go | 32 | delete mode 100644 vendor/archive/tar/fuzz_test.go |
| 35 | 33 | ||
| 36 | diff --git a/Dockerfile b/Dockerfile | 34 | diff --git a/Dockerfile b/Dockerfile |
| @@ -109,10 +107,10 @@ index c34a5add11..50ed9293c1 100644 | |||
| 109 | 107 | ||
| 110 | var generatedTempl = template.Must(template.New("rpc_cient").Funcs(templFuncs).Parse(` | 108 | var generatedTempl = template.Must(template.New("rpc_cient").Funcs(templFuncs).Parse(` |
| 111 | diff --git a/vendor/archive/tar/common.go b/vendor/archive/tar/common.go | 109 | diff --git a/vendor/archive/tar/common.go b/vendor/archive/tar/common.go |
| 112 | index c99b5c1920..c667cfc872 100644 | 110 | index f6d701d925..8706ede431 100644 |
| 113 | --- a/vendor/archive/tar/common.go | 111 | --- a/vendor/archive/tar/common.go |
| 114 | +++ b/vendor/archive/tar/common.go | 112 | +++ b/vendor/archive/tar/common.go |
| 115 | @@ -316,10 +316,10 @@ func invertSparseEntries(src []sparseEntry, size int64) []sparseEntry { | 113 | @@ -319,10 +319,10 @@ func invertSparseEntries(src []sparseEntry, size int64) []sparseEntry { |
| 116 | // fileState tracks the number of logical (includes sparse holes) and physical | 114 | // fileState tracks the number of logical (includes sparse holes) and physical |
| 117 | // (actual in tar archive) bytes remaining for the current file. | 115 | // (actual in tar archive) bytes remaining for the current file. |
| 118 | // | 116 | // |
| @@ -126,7 +124,7 @@ index c99b5c1920..c667cfc872 100644 | |||
| 126 | } | 124 | } |
| 127 | 125 | ||
| 128 | // allowedFormats determines which formats can be used. | 126 | // allowedFormats determines which formats can be used. |
| 129 | @@ -413,22 +413,22 @@ func (h Header) allowedFormats() (format Format, paxHdrs map[string]string, err | 127 | @@ -416,22 +416,22 @@ func (h Header) allowedFormats() (format Format, paxHdrs map[string]string, err |
| 130 | 128 | ||
| 131 | // Check basic fields. | 129 | // Check basic fields. |
| 132 | var blk block | 130 | var blk block |
| @@ -165,7 +163,7 @@ index c99b5c1920..c667cfc872 100644 | |||
| 165 | 163 | ||
| 166 | // Check for header-only types. | 164 | // Check for header-only types. |
| 167 | var whyOnlyPAX, whyOnlyGNU string | 165 | var whyOnlyPAX, whyOnlyGNU string |
| 168 | @@ -538,7 +538,7 @@ type headerFileInfo struct { | 166 | @@ -541,7 +541,7 @@ type headerFileInfo struct { |
| 169 | func (fi headerFileInfo) Size() int64 { return fi.h.Size } | 167 | func (fi headerFileInfo) Size() int64 { return fi.h.Size } |
| 170 | func (fi headerFileInfo) IsDir() bool { return fi.Mode().IsDir() } | 168 | func (fi headerFileInfo) IsDir() bool { return fi.Mode().IsDir() } |
| 171 | func (fi headerFileInfo) ModTime() time.Time { return fi.h.ModTime } | 169 | func (fi headerFileInfo) ModTime() time.Time { return fi.h.ModTime } |
| @@ -474,7 +472,7 @@ index e73e0d2609..0000000000 | |||
| 474 | - }) | 472 | - }) |
| 475 | -} | 473 | -} |
| 476 | diff --git a/vendor/archive/tar/reader.go b/vendor/archive/tar/reader.go | 474 | diff --git a/vendor/archive/tar/reader.go b/vendor/archive/tar/reader.go |
| 477 | index e609c15f27..f645af8016 100644 | 475 | index 45848304ed..ca32bdea1f 100644 |
| 478 | --- a/vendor/archive/tar/reader.go | 476 | --- a/vendor/archive/tar/reader.go |
| 479 | +++ b/vendor/archive/tar/reader.go | 477 | +++ b/vendor/archive/tar/reader.go |
| 480 | @@ -65,7 +65,7 @@ func (tr *Reader) next() (*Header, error) { | 478 | @@ -65,7 +65,7 @@ func (tr *Reader) next() (*Header, error) { |
| @@ -821,20 +819,8 @@ index f76d6be220..5a9a35cbb4 100644 | |||
| 821 | 819 | ||
| 822 | package tar | 820 | package tar |
| 823 | 821 | ||
| 824 | diff --git a/vendor/archive/tar/stat_unix.go b/vendor/archive/tar/stat_unix.go | ||
| 825 | index b743c76b8c..4a5bca0312 100644 | ||
| 826 | --- a/vendor/archive/tar/stat_unix.go | ||
| 827 | +++ b/vendor/archive/tar/stat_unix.go | ||
| 828 | @@ -3,6 +3,7 @@ | ||
| 829 | // license that can be found in the LICENSE file. | ||
| 830 | |||
| 831 | //go:build aix || linux || darwin || dragonfly || freebsd || openbsd || netbsd || solaris | ||
| 832 | +// +build aix linux darwin dragonfly freebsd openbsd netbsd solaris | ||
| 833 | |||
| 834 | package tar | ||
| 835 | |||
| 836 | diff --git a/vendor/archive/tar/strconv.go b/vendor/archive/tar/strconv.go | 822 | diff --git a/vendor/archive/tar/strconv.go b/vendor/archive/tar/strconv.go |
| 837 | index 275db6f026..f0b61e6dba 100644 | 823 | index ac3196370e..fde45c9dbf 100644 |
| 838 | --- a/vendor/archive/tar/strconv.go | 824 | --- a/vendor/archive/tar/strconv.go |
| 839 | +++ b/vendor/archive/tar/strconv.go | 825 | +++ b/vendor/archive/tar/strconv.go |
| 840 | @@ -14,7 +14,7 @@ import ( | 826 | @@ -14,7 +14,7 @@ import ( |
| @@ -916,7 +902,7 @@ index 275db6f026..f0b61e6dba 100644 | |||
| 916 | 902 | ||
| 917 | if !validPAXRecord(k, v) { | 903 | if !validPAXRecord(k, v) { |
| 918 | return "", "", s, ErrHeader | 904 | return "", "", s, ErrHeader |
| 919 | @@ -314,7 +333,7 @@ func formatPAXRecord(k, v string) (string, error) { | 905 | @@ -315,7 +334,7 @@ func formatPAXRecord(k, v string) (string, error) { |
| 920 | // for the PAX version of the USTAR string fields. | 906 | // for the PAX version of the USTAR string fields. |
| 921 | // The key must not contain an '=' character. | 907 | // The key must not contain an '=' character. |
| 922 | func validPAXRecord(k, v string) bool { | 908 | func validPAXRecord(k, v string) bool { |
| @@ -1213,6 +1199,3 @@ index 640264984a..4e709e5cac 100644 | |||
| 1213 | } | 1199 | } |
| 1214 | default: | 1200 | default: |
| 1215 | t.Fatalf("test %d.%d, unknown test operation: %T", i, j, tf) | 1201 | t.Fatalf("test %d.%d, unknown test operation: %T", i, j, tf) |
| 1216 | -- | ||
| 1217 | 2.38.1 | ||
| 1218 | |||
diff --git a/recipes-containers/docker/files/0003-builder.go-avoid-using-strings.Cut-from-go-1.18.patch b/recipes-containers/docker/files/0003-builder.go-avoid-using-strings.Cut-from-go-1.18.patch new file mode 100644 index 00000000..0574d9ed --- /dev/null +++ b/recipes-containers/docker/files/0003-builder.go-avoid-using-strings.Cut-from-go-1.18.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | From 6867fc1f6bd01596c2d3dc7bc07e26fa98965185 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 3 | Date: Mon, 14 Aug 2023 16:41:42 +0200 | ||
| 4 | Subject: [PATCH] builder.go: avoid using strings.Cut from go-1.18 | ||
| 5 | |||
| 6 | * we're still using go-1.17 | ||
| 7 | |||
| 8 | Upstream-Status: Inapropriate | ||
| 9 | --- | ||
| 10 | builder/builder-next/builder.go | 7 +++++-- | ||
| 11 | 1 file changed, 5 insertions(+), 2 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/builder/builder-next/builder.go b/builder/builder-next/builder.go | ||
| 14 | index ee6b9f0fb1..a9bda8c370 100644 | ||
| 15 | --- a/builder/builder-next/builder.go | ||
| 16 | +++ b/builder/builder-next/builder.go | ||
| 17 | @@ -555,10 +555,13 @@ func toBuildkitExtraHosts(inp []string, hostGatewayIP net.IP) (string, error) { | ||
| 18 | } | ||
| 19 | hosts := make([]string, 0, len(inp)) | ||
| 20 | for _, h := range inp { | ||
| 21 | - host, ip, ok := strings.Cut(h, ":") | ||
| 22 | - if !ok || host == "" || ip == "" { | ||
| 23 | + parts := strings.Split(h, ":") | ||
| 24 | + | ||
| 25 | + if len(parts) != 2 || parts[0] == "" || parts[1] == "" { | ||
| 26 | return "", errors.Errorf("invalid host %s", h) | ||
| 27 | } | ||
| 28 | + host := parts[0] | ||
| 29 | + ip := parts[1] | ||
| 30 | // If the IP Address is a "host-gateway", replace this value with the | ||
| 31 | // IP address stored in the daemon level HostGatewayIP config variable. | ||
| 32 | if ip == opts.HostGatewayName { | ||
