containerd-opencontainers: update to 1.5.2

Updating to the released 1.5.x containerd.

We also add a patch to fix the following:

    Since our oe-core go infrastructure insists on both -pie and static
    builds (for the most part), and that is not recommended by many
    packages, we end up with errors like:

      cannot find package runtime/cgo (using -importcfg)
              ...
             recipe-sysroot-native/usr/lib/aarch64-poky-linux/go/pkg/tool/linux_amd64/link:
             cannot open file : open : no such file or directory

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
Bruce Ashfield 2021-05-25 12:57:55 -04:00
parent e16ec7aebc
commit 87460f34d7
2 changed files with 47 additions and 4 deletions

View File

@ -0,0 +1,38 @@
From 474b93f8f643651144304a6971ef476add7f06f8 Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@gmail.com>
Date: Tue, 25 May 2021 12:49:41 -0400
Subject: [PATCH] Makefile: allow GO_BUILD_FLAGS to be externally specified
Since our oe-core go infrastructure insists on both -pie and static
builds (for the most part), and that is not recommended by many
packages, we end up with errors like:
cannot find package runtime/cgo (using -importcfg)
...
recipe-sysroot-native/usr/lib/aarch64-poky-linux/go/pkg/tool/linux_amd64/link:
cannot open file : open : no such file or directory
Upstream-Status: Inappropriate: specific to OE go configuration and build
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
---
Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git git.orig/src/import/Makefile git.orig/src/import/Makefile
index c61418e60..54a10eb42 100644
--- git.orig/src/import/Makefile
+++ git.orig/src/import/Makefile
@@ -112,7 +112,8 @@ endif
GOPATHS=$(shell echo ${GOPATH} | tr ":" "\n" | tr ";" "\n")
TESTFLAGS_RACE=
-GO_BUILD_FLAGS=
+# allow flags to be exported and picked up.
+# GO_BUILD_FLAGS=
# See Golang issue re: '-trimpath': https://github.com/golang/go/issues/13809
GO_GCFLAGS=$(shell \
set -- ${GOPATHS}; \
--
2.19.1

View File

@ -5,17 +5,17 @@ DESCRIPTION = "containerd is a daemon to control runC, built for performance and
support as well as checkpoint and restore for cloning and live migration of containers." support as well as checkpoint and restore for cloning and live migration of containers."
SRCREV = "32005190c04eb635cdd0de7c9245dd043168ec9e" SRCREV = "36cc874494a56a253cd181a1a685b44b58a2e34a"
SRC_URI = "git://github.com/containerd/containerd;branch=master \ SRC_URI = "git://github.com/containerd/containerd;branch=release/1.5 \
file://0001-build-use-oe-provided-GO-and-flags.patch \
file://0001-Add-build-option-GODEBUG-1.patch \ file://0001-Add-build-option-GODEBUG-1.patch \
file://0001-Makefile-allow-GO_BUILD_FLAGS-to-be-externally-speci.patch \
" "
# Apache-2.0 for containerd # Apache-2.0 for containerd
LICENSE = "Apache-2.0" LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=1269f40c0d099c21a871163984590d89" LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=1269f40c0d099c21a871163984590d89"
CONTAINERD_VERSION = "v1.5.0-rc" CONTAINERD_VERSION = "v1.5.2"
EXTRA_OEMAKE += "GODEBUG=1" EXTRA_OEMAKE += "GODEBUG=1"
@ -78,6 +78,11 @@ do_compile() {
export CFLAGS="${CFLAGS}" export CFLAGS="${CFLAGS}"
export LDFLAGS="${LDFLAGS}" export LDFLAGS="${LDFLAGS}"
export SHIM_CGO_ENABLED="${CGO_ENABLED}" export SHIM_CGO_ENABLED="${CGO_ENABLED}"
# fixes:
# cannot find package runtime/cgo (using -importcfg)
# ... recipe-sysroot-native/usr/lib/aarch64-poky-linux/go/pkg/tool/linux_amd64/link:
# cannot open file : open : no such file or directory
export GO_BUILD_FLAGS="-a -pkgdir dontusecurrentpkgs"
export GO111MODULE=off export GO111MODULE=off
cd ${S}/src/import cd ${S}/src/import