summaryrefslogtreecommitdiffstats
path: root/recipes-containers/runc/runc.inc
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2017-09-13 12:39:46 -0700
committerBruce Ashfield <bruce.ashfield@windriver.com>2017-09-14 09:49:00 -0400
commit01a8d4537012ad93dc8510e9b762acdc8c4536c7 (patch)
tree8b22ba0333f7a8c83193bee31b33a3b307f1164a /recipes-containers/runc/runc.inc
parent718592922bd64da4d609c96e831f6aba05e44a8d (diff)
downloadmeta-virtualization-01a8d4537012ad93dc8510e9b762acdc8c4536c7.tar.gz
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 <jason.wessel@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-containers/runc/runc.inc')
-rw-r--r--recipes-containers/runc/runc.inc13
1 files changed, 6 insertions, 7 deletions
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
4 4
5# Apache-2.0 for containerd 5# Apache-2.0 for containerd
6LICENSE = "Apache-2.0" 6LICENSE = "Apache-2.0"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=435b266b3899aa8a959f17d41c56def8" 7LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=435b266b3899aa8a959f17d41c56def8"
8 8
9S = "${WORKDIR}/git" 9S = "${WORKDIR}/git"
10 10
@@ -26,20 +26,19 @@ do_compile() {
26 # Set GOPATH. See 'PACKAGERS.md'. Don't rely on 26 # Set GOPATH. See 'PACKAGERS.md'. Don't rely on
27 # docker to download its dependencies but rather 27 # docker to download its dependencies but rather
28 # use dependencies packaged independently. 28 # use dependencies packaged independently.
29 cd ${S} 29 cd ${S}/src/import
30 rm -rf .gopath 30 rm -rf .gopath
31 dname=`dirname "${LIBCONTAINER_PACKAGE}"` 31 dname=`dirname "${LIBCONTAINER_PACKAGE}"`
32 bname=`basename "${LIBCONTAINER_PACKAGE}"` 32 bname=`basename "${LIBCONTAINER_PACKAGE}"`
33 mkdir -p .gopath/src/${dname} 33 mkdir -p .gopath/src/${dname}
34 34
35 (cd .gopath/src/${dname}; ln -sf ../../../../../${bname} ${bname}) 35 (cd .gopath/src/${dname}; ln -sf ../../../../../${bname} ${bname})
36 export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" 36 export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
37 export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" 37 export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
38 cd -
39 38
40 # Fix up symlink for go-cross compiler 39 # Fix up symlink for go-cross compiler
41 rm -f ${S}/vendor/src 40 rm -f ${S}/src/import/vendor/src
42 ln -sf ./ ${S}/vendor/src 41 ln -sf ./ ${S}/src/import/vendor/src
43 42
44 # Pass the needed cflags/ldflags so that cgo 43 # Pass the needed cflags/ldflags so that cgo
45 # can find the needed headers files and libraries 44 # can find the needed headers files and libraries
@@ -55,7 +54,7 @@ do_compile() {
55do_install() { 54do_install() {
56 mkdir -p ${D}/${bindir} 55 mkdir -p ${D}/${bindir}
57 56
58 cp ${S}/runc ${D}/${bindir}/runc 57 cp ${S}/src/import/runc ${D}/${bindir}/runc
59 ln -sf runc ${D}/${bindir}/docker-runc 58 ln -sf runc ${D}/${bindir}/docker-runc
60} 59}
61 60