From 01a8d4537012ad93dc8510e9b762acdc8c4536c7 Mon Sep 17 00:00:00 2001 From: Jason Wessel Date: Wed, 13 Sep 2017 12:39:46 -0700 Subject: nets, docker, runc, oci-*tools: go.bbclass compile fixes Recently in the oe-core the go.bbclass changed and requires the defition of the GO_IMPORT variable. This was intended to simplify how the compilation works with go packages and it is still a work in progress. This patch set makes the recipes compatible to generate the same end result as before using the new go.bbclass from oe-core. Any patches that were included in the recipes had to have the paths adjusted because the new go.bbclass manipulates the notion of S to be S + "src" + "$GO_IMPORT" internally for the purpose of unpack, patch and compile. Signed-off-by: Jason Wessel Signed-off-by: Bruce Ashfield --- recipes-containers/runc/runc.inc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'recipes-containers/runc/runc.inc') diff --git a/recipes-containers/runc/runc.inc b/recipes-containers/runc/runc.inc index dbc83c27..83d5f863 100644 --- a/recipes-containers/runc/runc.inc +++ b/recipes-containers/runc/runc.inc @@ -4,7 +4,7 @@ DESCRIPTION = "runc is a CLI tool for spawning and running containers according # Apache-2.0 for containerd LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=435b266b3899aa8a959f17d41c56def8" +LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=435b266b3899aa8a959f17d41c56def8" S = "${WORKDIR}/git" @@ -26,20 +26,19 @@ do_compile() { # Set GOPATH. See 'PACKAGERS.md'. Don't rely on # docker to download its dependencies but rather # use dependencies packaged independently. - cd ${S} + cd ${S}/src/import rm -rf .gopath dname=`dirname "${LIBCONTAINER_PACKAGE}"` bname=`basename "${LIBCONTAINER_PACKAGE}"` mkdir -p .gopath/src/${dname} (cd .gopath/src/${dname}; ln -sf ../../../../../${bname} ${bname}) - export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" + export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" - cd - # Fix up symlink for go-cross compiler - rm -f ${S}/vendor/src - ln -sf ./ ${S}/vendor/src + rm -f ${S}/src/import/vendor/src + ln -sf ./ ${S}/src/import/vendor/src # Pass the needed cflags/ldflags so that cgo # can find the needed headers files and libraries @@ -55,7 +54,7 @@ do_compile() { do_install() { mkdir -p ${D}/${bindir} - cp ${S}/runc ${D}/${bindir}/runc + cp ${S}/src/import/runc ${D}/${bindir}/runc ln -sf runc ${D}/${bindir}/docker-runc } -- cgit v1.2.3-54-g00ecf