From 127aa9bbd8e2c750b9eca734678527d7285abbb4 Mon Sep 17 00:00:00 2001 From: Serhii Kostiuk Date: Tue, 15 Nov 2022 19:00:37 +0200 Subject: Docker: Fixed builds after updating to Golang 1.16.x Original idea from Yocto 3.3 Hardknott: - https://git.yoctoproject.org/meta-virtualization/commit/recipes-containers/containerd/containerd-opencontainers_git.bb?h=hardknott&id=8597d4e3a973ac7e78483fb3ab0e19dbcc681913 - https://git.yoctoproject.org/meta-virtualization/commit/recipes-containers/docker/docker-moby.bb?h=hardknott&id=dc1713bec31ecd52a9715fd528253b26140f69d3 Description of the issue, a change in the Golang behavior regarding `GO111MODULE` since Golang 1.16.x: - https://forum.golangbridge.org/t/compilation-changes-in-go-1-16-go-build-throws-error/22457. --- recipes-containers/containerd/containerd-docker_%.bbappend | 6 ++++++ recipes-containers/containerd/containerd-opencontainers_%.bbappend | 6 ++++++ recipes-containers/docker/docker-moby.bbappend | 6 ++++++ recipes-containers/runc/runc-docker_%.bbappend | 6 ++++++ recipes-containers/runc/runc-opencontainers_%.bbappend | 6 ++++++ 5 files changed, 30 insertions(+) create mode 100644 recipes-containers/containerd/containerd-docker_%.bbappend create mode 100644 recipes-containers/containerd/containerd-opencontainers_%.bbappend create mode 100644 recipes-containers/docker/docker-moby.bbappend create mode 100644 recipes-containers/runc/runc-docker_%.bbappend create mode 100644 recipes-containers/runc/runc-opencontainers_%.bbappend diff --git a/recipes-containers/containerd/containerd-docker_%.bbappend b/recipes-containers/containerd/containerd-docker_%.bbappend new file mode 100644 index 0000000..bfedff1 --- /dev/null +++ b/recipes-containers/containerd/containerd-docker_%.bbappend @@ -0,0 +1,6 @@ +# Fix build issues with Go version 1.16.x. Remove this bbappend in Yocto +# version 3.3 and newer. +# Fix in the upstream Yocto: https://git.yoctoproject.org/meta-virtualization/commit/recipes-containers/containerd/containerd-opencontainers_git.bb?h=hardknott&id=8597d4e3a973ac7e78483fb3ab0e19dbcc681913. +do_compile_prepend() { + export GO111MODULE=off +} diff --git a/recipes-containers/containerd/containerd-opencontainers_%.bbappend b/recipes-containers/containerd/containerd-opencontainers_%.bbappend new file mode 100644 index 0000000..bfedff1 --- /dev/null +++ b/recipes-containers/containerd/containerd-opencontainers_%.bbappend @@ -0,0 +1,6 @@ +# Fix build issues with Go version 1.16.x. Remove this bbappend in Yocto +# version 3.3 and newer. +# Fix in the upstream Yocto: https://git.yoctoproject.org/meta-virtualization/commit/recipes-containers/containerd/containerd-opencontainers_git.bb?h=hardknott&id=8597d4e3a973ac7e78483fb3ab0e19dbcc681913. +do_compile_prepend() { + export GO111MODULE=off +} diff --git a/recipes-containers/docker/docker-moby.bbappend b/recipes-containers/docker/docker-moby.bbappend new file mode 100644 index 0000000..fba7110 --- /dev/null +++ b/recipes-containers/docker/docker-moby.bbappend @@ -0,0 +1,6 @@ +# Fix build issues with Go version 1.16.x. Remove this bbappend in Yocto +# version 3.3 and newer. +# Fix in the upstream Yocto: https://git.yoctoproject.org/meta-virtualization/commit/recipes-containers/docker/docker-moby.bb?h=hardknott&id=dc1713bec31ecd52a9715fd528253b26140f69d3 +do_compile_prepend() { + export GO111MODULE=off +} diff --git a/recipes-containers/runc/runc-docker_%.bbappend b/recipes-containers/runc/runc-docker_%.bbappend new file mode 100644 index 0000000..5755da5 --- /dev/null +++ b/recipes-containers/runc/runc-docker_%.bbappend @@ -0,0 +1,6 @@ +# Fix build issues with Go version 1.16.x. Remove this bbappend in Yocto +# version 3.3 and newer. The new versions of `runc` do NOT require this +# hack, they should work properly with `GO111MODULE` and Golang 1.16.x: +do_compile_prepend() { + export GO111MODULE=off +} diff --git a/recipes-containers/runc/runc-opencontainers_%.bbappend b/recipes-containers/runc/runc-opencontainers_%.bbappend new file mode 100644 index 0000000..5755da5 --- /dev/null +++ b/recipes-containers/runc/runc-opencontainers_%.bbappend @@ -0,0 +1,6 @@ +# Fix build issues with Go version 1.16.x. Remove this bbappend in Yocto +# version 3.3 and newer. The new versions of `runc` do NOT require this +# hack, they should work properly with `GO111MODULE` and Golang 1.16.x: +do_compile_prepend() { + export GO111MODULE=off +} -- cgit v1.2.3