diff options
| author | Jason Wessel <jason.wessel@windriver.com> | 2017-09-13 12:39:46 -0700 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2017-09-14 09:49:00 -0400 |
| commit | 01a8d4537012ad93dc8510e9b762acdc8c4536c7 (patch) | |
| tree | 8b22ba0333f7a8c83193bee31b33a3b307f1164a | |
| parent | 718592922bd64da4d609c96e831f6aba05e44a8d (diff) | |
| download | meta-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>
14 files changed, 88 insertions, 82 deletions
diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb index 1ced8f47..4d6c17c9 100644 --- a/recipes-containers/docker/docker_git.bb +++ b/recipes-containers/docker/docker_git.bb | |||
| @@ -32,7 +32,9 @@ SRC_URI = "\ | |||
| 32 | 32 | ||
| 33 | # Apache-2.0 for docker | 33 | # Apache-2.0 for docker |
| 34 | LICENSE = "Apache-2.0" | 34 | LICENSE = "Apache-2.0" |
| 35 | LIC_FILES_CHKSUM = "file://LICENSE;md5=9740d093a080530b5c5c6573df9af45a" | 35 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=9740d093a080530b5c5c6573df9af45a" |
| 36 | |||
| 37 | GO_IMPORT = "import" | ||
| 36 | 38 | ||
| 37 | S = "${WORKDIR}/git" | 39 | S = "${WORKDIR}/git" |
| 38 | 40 | ||
| @@ -81,18 +83,17 @@ do_compile() { | |||
| 81 | # Set GOPATH. See 'PACKAGERS.md'. Don't rely on | 83 | # Set GOPATH. See 'PACKAGERS.md'. Don't rely on |
| 82 | # docker to download its dependencies but rather | 84 | # docker to download its dependencies but rather |
| 83 | # use dependencies packaged independently. | 85 | # use dependencies packaged independently. |
| 84 | cd ${S} | 86 | cd ${S}/src/import |
| 85 | rm -rf .gopath | 87 | rm -rf .gopath |
| 86 | mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")" | 88 | mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")" |
| 87 | ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}" | 89 | ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}" |
| 88 | 90 | ||
| 89 | mkdir -p .gopath/src/github.com/docker | 91 | mkdir -p .gopath/src/github.com/docker |
| 90 | ln -sf ../../../../../libnetwork .gopath/src/github.com/docker/libnetwork | 92 | ln -sf ${WORKDIR}/libnetwork .gopath/src/github.com/docker/libnetwork |
| 91 | ln -sf ../../../../../cli .gopath/src/github.com/docker/cli | 93 | ln -sf ${WORKDIR}/cli .gopath/src/github.com/docker/cli |
| 92 | 94 | ||
| 93 | export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" | 95 | export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" |
| 94 | export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" | 96 | export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" |
| 95 | cd - | ||
| 96 | 97 | ||
| 97 | # Pass the needed cflags/ldflags so that cgo | 98 | # Pass the needed cflags/ldflags so that cgo |
| 98 | # can find the needed headers files and libraries | 99 | # can find the needed headers files and libraries |
| @@ -109,10 +110,10 @@ do_compile() { | |||
| 109 | ./hack/make.sh dynbinary | 110 | ./hack/make.sh dynbinary |
| 110 | 111 | ||
| 111 | # build the proxy | 112 | # build the proxy |
| 112 | go build -o ${S}/docker-proxy github.com/docker/libnetwork/cmd/proxy | 113 | go build -o ${S}/src/import/docker-proxy github.com/docker/libnetwork/cmd/proxy |
| 113 | 114 | ||
| 114 | # build the cli | 115 | # build the cli |
| 115 | go build -o ${S}/bundles/latest/dynbinary-client/docker github.com/docker/cli/cmd/docker | 116 | go build -o ${S}/src/import/bundles/latest/dynbinary-client/docker github.com/docker/cli/cmd/docker |
| 116 | } | 117 | } |
| 117 | 118 | ||
| 118 | SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" | 119 | SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" |
| @@ -126,15 +127,15 @@ INITSCRIPT_PARAMS_${PN} = "defaults" | |||
| 126 | 127 | ||
| 127 | do_install() { | 128 | do_install() { |
| 128 | mkdir -p ${D}/${bindir} | 129 | mkdir -p ${D}/${bindir} |
| 129 | cp ${S}/bundles/latest/dynbinary-client/docker ${D}/${bindir}/docker | 130 | cp ${S}/src/import/bundles/latest/dynbinary-client/docker ${D}/${bindir}/docker |
| 130 | cp ${S}/bundles/latest/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd | 131 | cp ${S}/src/import/bundles/latest/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd |
| 131 | cp ${S}/docker-proxy ${D}/${bindir}/docker-proxy | 132 | cp ${S}/src/import/docker-proxy ${D}/${bindir}/docker-proxy |
| 132 | 133 | ||
| 133 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | 134 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 134 | install -d ${D}${systemd_unitdir}/system | 135 | install -d ${D}${systemd_unitdir}/system |
| 135 | install -m 644 ${S}/contrib/init/systemd/docker.* ${D}/${systemd_unitdir}/system | 136 | install -m 644 ${S}/src/import/contrib/init/systemd/docker.* ${D}/${systemd_unitdir}/system |
| 136 | # replaces one copied from above with one that uses the local registry for a mirror | 137 | # replaces one copied from above with one that uses the local registry for a mirror |
| 137 | install -m 644 ${S}/contrib/init/systemd/docker.service ${D}/${systemd_unitdir}/system | 138 | install -m 644 ${S}/src/import/contrib/init/systemd/docker.service ${D}/${systemd_unitdir}/system |
| 138 | else | 139 | else |
| 139 | install -d ${D}${sysconfdir}/init.d | 140 | install -d ${D}${sysconfdir}/init.d |
| 140 | install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init | 141 | install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init |
| @@ -142,7 +143,7 @@ do_install() { | |||
| 142 | 143 | ||
| 143 | mkdir -p ${D}${datadir}/docker/ | 144 | mkdir -p ${D}${datadir}/docker/ |
| 144 | cp ${WORKDIR}/hi.Dockerfile ${D}${datadir}/docker/ | 145 | cp ${WORKDIR}/hi.Dockerfile ${D}${datadir}/docker/ |
| 145 | install -m 0755 ${S}/contrib/check-config.sh ${D}${datadir}/docker/ | 146 | install -m 0755 ${S}/src/import/contrib/check-config.sh ${D}${datadir}/docker/ |
| 146 | } | 147 | } |
| 147 | 148 | ||
| 148 | inherit useradd | 149 | inherit useradd |
diff --git a/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch b/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch index c43a7e74..7ed606ff 100644 --- a/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch +++ b/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch | |||
| @@ -18,8 +18,8 @@ Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | |||
| 18 | integration-cli/docker_cli_save_load_unix_test.go | 2 +- | 18 | integration-cli/docker_cli_save_load_unix_test.go | 2 +- |
| 19 | 5 files changed, 5 insertions(+), 5 deletions(-) | 19 | 5 files changed, 5 insertions(+), 5 deletions(-) |
| 20 | 20 | ||
| 21 | --- a/client/README.md | 21 | --- a/src/import/client/README.md |
| 22 | +++ b/client/README.md | 22 | +++ b/src/import/client/README.md |
| 23 | @@ -8,7 +8,7 @@ For example, to list running containers | 23 | @@ -8,7 +8,7 @@ For example, to list running containers |
| 24 | package main | 24 | package main |
| 25 | 25 | ||
| @@ -29,8 +29,8 @@ Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | |||
| 29 | "fmt" | 29 | "fmt" |
| 30 | 30 | ||
| 31 | "github.com/docker/docker/api/types" | 31 | "github.com/docker/docker/api/types" |
| 32 | --- a/client/client.go | 32 | --- a/src/import/client/client.go |
| 33 | +++ b/client/client.go | 33 | +++ b/src/import/client/client.go |
| 34 | @@ -19,7 +19,7 @@ For example, to list running containers | 34 | @@ -19,7 +19,7 @@ For example, to list running containers |
| 35 | package main | 35 | package main |
| 36 | 36 | ||
| @@ -40,8 +40,8 @@ Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | |||
| 40 | "fmt" | 40 | "fmt" |
| 41 | 41 | ||
| 42 | "github.com/docker/docker/api/types" | 42 | "github.com/docker/docker/api/types" |
| 43 | --- a/daemon/info_unix.go | 43 | --- a/src/import/daemon/info_unix.go |
| 44 | +++ b/daemon/info_unix.go | 44 | +++ b/src/import/daemon/info_unix.go |
| 45 | @@ -3,7 +3,7 @@ | 45 | @@ -3,7 +3,7 @@ |
| 46 | package daemon | 46 | package daemon |
| 47 | 47 | ||
| @@ -51,8 +51,8 @@ Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | |||
| 51 | "os/exec" | 51 | "os/exec" |
| 52 | "strings" | 52 | "strings" |
| 53 | 53 | ||
| 54 | --- a/integration-cli/docker_api_attach_test.go | 54 | --- a/src/import/integration-cli/docker_api_attach_test.go |
| 55 | +++ b/integration-cli/docker_api_attach_test.go | 55 | +++ b/src/import/integration-cli/docker_api_attach_test.go |
| 56 | @@ -3,7 +3,7 @@ package main | 56 | @@ -3,7 +3,7 @@ package main |
| 57 | import ( | 57 | import ( |
| 58 | "bufio" | 58 | "bufio" |
| @@ -62,8 +62,8 @@ Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | |||
| 62 | "io" | 62 | "io" |
| 63 | "net" | 63 | "net" |
| 64 | "net/http" | 64 | "net/http" |
| 65 | --- a/integration-cli/docker_cli_save_load_unix_test.go | 65 | --- a/src/import/integration-cli/docker_cli_save_load_unix_test.go |
| 66 | +++ b/integration-cli/docker_cli_save_load_unix_test.go | 66 | +++ b/src/import/integration-cli/docker_cli_save_load_unix_test.go |
| 67 | @@ -3,7 +3,7 @@ | 67 | @@ -3,7 +3,7 @@ |
| 68 | package main | 68 | package main |
| 69 | 69 | ||
diff --git a/recipes-containers/oci-image-tools/files/0001-image-manifest-Recursively-remove-pre-existing-entri.patch b/recipes-containers/oci-image-tools/files/0001-image-manifest-Recursively-remove-pre-existing-entri.patch index d2cacc2e..5594f976 100644 --- a/recipes-containers/oci-image-tools/files/0001-image-manifest-Recursively-remove-pre-existing-entri.patch +++ b/recipes-containers/oci-image-tools/files/0001-image-manifest-Recursively-remove-pre-existing-entri.patch | |||
| @@ -40,8 +40,8 @@ Signed-off-by: W. Trevor King <wking@tremily.us> | |||
| 40 | 40 | ||
| 41 | diff --git a/image/manifest.go b/image/manifest.go | 41 | diff --git a/image/manifest.go b/image/manifest.go |
| 42 | index 8834c1e5f2f0..144bd4f62219 100644 | 42 | index 8834c1e5f2f0..144bd4f62219 100644 |
| 43 | --- a/image/manifest.go | 43 | --- a/src/import/image/manifest.go |
| 44 | +++ b/image/manifest.go | 44 | +++ b/src/import/image/manifest.go |
| 45 | @@ -253,11 +253,27 @@ loop: | 45 | @@ -253,11 +253,27 @@ loop: |
| 46 | continue loop | 46 | continue loop |
| 47 | } | 47 | } |
diff --git a/recipes-containers/oci-image-tools/files/0002-image-manifest-Split-unpackLayerEntry-into-its-own-f.patch b/recipes-containers/oci-image-tools/files/0002-image-manifest-Split-unpackLayerEntry-into-its-own-f.patch index 9cf513ec..69bdcdb5 100644 --- a/recipes-containers/oci-image-tools/files/0002-image-manifest-Split-unpackLayerEntry-into-its-own-f.patch +++ b/recipes-containers/oci-image-tools/files/0002-image-manifest-Split-unpackLayerEntry-into-its-own-f.patch | |||
| @@ -18,8 +18,8 @@ Signed-off-by: W. Trevor King <wking@tremily.us> | |||
| 18 | 18 | ||
| 19 | diff --git a/image/manifest.go b/image/manifest.go | 19 | diff --git a/image/manifest.go b/image/manifest.go |
| 20 | index 144bd4f62219..dfd5a83f70e4 100644 | 20 | index 144bd4f62219..dfd5a83f70e4 100644 |
| 21 | --- a/image/manifest.go | 21 | --- a/src/import/image/manifest.go |
| 22 | +++ b/image/manifest.go | 22 | +++ b/src/import/image/manifest.go |
| 23 | @@ -218,116 +218,131 @@ loop: | 23 | @@ -218,116 +218,131 @@ loop: |
| 24 | return errors.Wrapf(err, "error advancing tar stream") | 24 | return errors.Wrapf(err, "error advancing tar stream") |
| 25 | } | 25 | } |
diff --git a/recipes-containers/oci-image-tools/oci-image-tools_git.bb b/recipes-containers/oci-image-tools/oci-image-tools_git.bb index 8d48eba3..30179608 100644 --- a/recipes-containers/oci-image-tools/oci-image-tools_git.bb +++ b/recipes-containers/oci-image-tools/oci-image-tools_git.bb | |||
| @@ -18,8 +18,7 @@ SRC_URI = "git://github.com/opencontainers/image-tools.git \ | |||
| 18 | 18 | ||
| 19 | SRCREV = "4abe1a166f9be97e8e71b1bb4d7599cc29323011" | 19 | SRCREV = "4abe1a166f9be97e8e71b1bb4d7599cc29323011" |
| 20 | PV = "0.2.0-dev+git${SRCPV}" | 20 | PV = "0.2.0-dev+git${SRCPV}" |
| 21 | 21 | GO_IMPORT = "import" | |
| 22 | S = "${WORKDIR}/git" | ||
| 23 | 22 | ||
| 24 | inherit goarch | 23 | inherit goarch |
| 25 | inherit go | 24 | inherit go |
| @@ -38,11 +37,11 @@ do_compile() { | |||
| 38 | # | 37 | # |
| 39 | # We also need to link in the ipallocator directory as that is not under | 38 | # We also need to link in the ipallocator directory as that is not under |
| 40 | # a src directory. | 39 | # a src directory. |
| 41 | ln -sfn . "${S}/vendor/src" | 40 | ln -sfn . "${S}/src/import/vendor/src" |
| 42 | mkdir -p "${S}/vendor/src/github.com/opencontainers/image-tools/" | 41 | mkdir -p "${S}/src/import/vendor/src/github.com/opencontainers/image-tools/" |
| 43 | ln -sfn "${S}/image" "${S}/vendor/src/github.com/opencontainers/image-tools/image" | 42 | ln -sfn "${S}/src/import/image" "${S}/src/import/vendor/src/github.com/opencontainers/image-tools/image" |
| 44 | ln -sfn "${S}/version" "${S}/vendor/src/github.com/opencontainers/image-tools/version" | 43 | ln -sfn "${S}/src/import/version" "${S}/src/import/vendor/src/github.com/opencontainers/image-tools/version" |
| 45 | export GOPATH="${S}/vendor" | 44 | export GOPATH="${S}/src/import/vendor" |
| 46 | 45 | ||
| 47 | # Pass the needed cflags/ldflags so that cgo | 46 | # Pass the needed cflags/ldflags so that cgo |
| 48 | # can find the needed headers files and libraries | 47 | # can find the needed headers files and libraries |
| @@ -51,13 +50,14 @@ do_compile() { | |||
| 51 | export LDFLAGS="" | 50 | export LDFLAGS="" |
| 52 | export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" | 51 | export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" |
| 53 | export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" | 52 | export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" |
| 53 | cd ${S}/src/import | ||
| 54 | 54 | ||
| 55 | oe_runmake tool | 55 | oe_runmake tool |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | do_install() { | 58 | do_install() { |
| 59 | install -d ${D}/${sbindir} | 59 | install -d ${D}/${sbindir} |
| 60 | install ${S}/oci-image-tool ${D}/${sbindir}/ | 60 | install ${S}/src/import/oci-image-tool ${D}/${sbindir}/ |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | INSANE_SKIP_${PN} += "ldflags" | 63 | INSANE_SKIP_${PN} += "ldflags" |
diff --git a/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb b/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb index d73edfe7..0d9c6e65 100644 --- a/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb +++ b/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb | |||
| @@ -1,14 +1,13 @@ | |||
| 1 | HOMEPAGE = "https://github.com/opencontainers/runtime-tools" | 1 | HOMEPAGE = "https://github.com/opencontainers/runtime-tools" |
| 2 | SUMMARY = "oci-runtime-tool is a collection of tools for working with the OCI runtime specification" | 2 | SUMMARY = "oci-runtime-tool is a collection of tools for working with the OCI runtime specification" |
| 3 | LICENSE = "GPLv2" | 3 | LICENSE = "GPLv2" |
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=b355a61a394a504dacde901c958f662c" | 4 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=b355a61a394a504dacde901c958f662c" |
| 5 | 5 | ||
| 6 | SRC_URI = "git://github.com/opencontainers/runtime-tools.git" | 6 | SRC_URI = "git://github.com/opencontainers/runtime-tools.git" |
| 7 | 7 | ||
| 8 | SRCREV = "15ec1df3f6607f4223ab3915547c184cf60a30dd" | 8 | SRCREV = "15ec1df3f6607f4223ab3915547c184cf60a30dd" |
| 9 | PV = "0.0.1+git${SRCPV}" | 9 | PV = "0.0.1+git${SRCPV}" |
| 10 | 10 | GO_IMPORT = "import" | |
| 11 | S = "${WORKDIR}/git" | ||
| 12 | 11 | ||
| 13 | INSANE_SKIP_${PN} += "ldflags" | 12 | INSANE_SKIP_${PN} += "ldflags" |
| 14 | 13 | ||
| @@ -18,7 +17,7 @@ inherit go | |||
| 18 | do_compile() { | 17 | do_compile() { |
| 19 | export GOARCH="${TARGET_GOARCH}" | 18 | export GOARCH="${TARGET_GOARCH}" |
| 20 | export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" | 19 | export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" |
| 21 | export GOPATH="${S}:${S}/vendor" | 20 | export GOPATH="${S}/src/import:${S}/src/import/vendor" |
| 22 | 21 | ||
| 23 | # Pass the needed cflags/ldflags so that cgo | 22 | # Pass the needed cflags/ldflags so that cgo |
| 24 | # can find the needed headers files and libraries | 23 | # can find the needed headers files and libraries |
| @@ -29,17 +28,18 @@ do_compile() { | |||
| 29 | export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" | 28 | export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" |
| 30 | 29 | ||
| 31 | # link fixups for compilation | 30 | # link fixups for compilation |
| 32 | rm -f ${S}/vendor/src | 31 | rm -f ${S}/src/import/vendor/src |
| 33 | ln -sf ./ ${S}/vendor/src | 32 | ln -sf ./ ${S}/src/import/vendor/src |
| 34 | mkdir -p ${S}/vendor/github.com/opencontainers/runtime-tools | 33 | mkdir -p ${S}/src/import/vendor/github.com/opencontainers/runtime-tools |
| 35 | ln -sf ../../../../generate ${S}/vendor/github.com/opencontainers/runtime-tools/generate | 34 | ln -sf ../../../../generate ${S}/src/import/vendor/github.com/opencontainers/runtime-tools/generate |
| 36 | ln -sf ../../../../validate ${S}/vendor/github.com/opencontainers/runtime-tools/validate | 35 | ln -sf ../../../../validate ${S}/src/import/vendor/github.com/opencontainers/runtime-tools/validate |
| 37 | ln -sf ../../../../cmd ${S}/vendor/github.com/opencontainers/runtime-tools/cmd | 36 | ln -sf ../../../../cmd ${S}/src/import/vendor/github.com/opencontainers/runtime-tools/cmd |
| 37 | cd ${S}/src/import | ||
| 38 | 38 | ||
| 39 | oe_runmake | 39 | oe_runmake |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | do_install() { | 42 | do_install() { |
| 43 | install -d ${D}/${sbindir} | 43 | install -d ${D}/${sbindir} |
| 44 | install ${S}/oci-runtime-tool ${D}/${sbindir}/oci-runtime-tool | 44 | install ${S}/src/import/oci-runtime-tool ${D}/${sbindir}/oci-runtime-tool |
| 45 | } | 45 | } |
diff --git a/recipes-containers/riddler/riddler_git.bb b/recipes-containers/riddler/riddler_git.bb index ae6c5ec9..9f7fe6b4 100644 --- a/recipes-containers/riddler/riddler_git.bb +++ b/recipes-containers/riddler/riddler_git.bb | |||
| @@ -1,11 +1,12 @@ | |||
| 1 | HOMEPAGE = "https://github.com/jfrazelle/riddler" | 1 | HOMEPAGE = "https://github.com/jfrazelle/riddler" |
| 2 | SUMMARY = "Convert `docker inspect` to opencontainers (OCI compatible) runc spec." | 2 | SUMMARY = "Convert `docker inspect` to opencontainers (OCI compatible) runc spec." |
| 3 | LICENSE = "MIT" | 3 | LICENSE = "MIT" |
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=20ce4c6a4f32d6ee4a68e3a7506db3f1" | 4 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=20ce4c6a4f32d6ee4a68e3a7506db3f1" |
| 5 | 5 | ||
| 6 | SRC_URI = "git://github.com/jfrazelle/riddler;branch=master" | 6 | SRC_URI = "git://github.com/jfrazelle/riddler;branch=master" |
| 7 | SRCREV = "23befa0b232877b5b502b828e24161d801bd67f6" | 7 | SRCREV = "23befa0b232877b5b502b828e24161d801bd67f6" |
| 8 | PV = "0.1.0+git${SRCPV}" | 8 | PV = "0.1.0+git${SRCPV}" |
| 9 | GO_IMPORT = "import" | ||
| 9 | 10 | ||
| 10 | S = "${WORKDIR}/git" | 11 | S = "${WORKDIR}/git" |
| 11 | 12 | ||
| @@ -26,10 +27,10 @@ do_compile() { | |||
| 26 | # | 27 | # |
| 27 | # We also need to link in the ipallocator directory as that is not under | 28 | # We also need to link in the ipallocator directory as that is not under |
| 28 | # a src directory. | 29 | # a src directory. |
| 29 | ln -sfn . "${S}/vendor/src" | 30 | ln -sfn . "${S}/src/import/vendor/src" |
| 30 | mkdir -p "${S}/vendor/src/github.com/jessfraz/riddler" | 31 | mkdir -p "${S}/src/import/vendor/src/github.com/jessfraz/riddler" |
| 31 | ln -sfn "${S}/parse" "${S}/vendor/src/github.com/jessfraz/riddler/parse" | 32 | ln -sfn "${S}/src/import/parse" "${S}/src/import/vendor/src/github.com/jessfraz/riddler/parse" |
| 32 | export GOPATH="${S}/vendor" | 33 | export GOPATH="${S}/src/import/vendor" |
| 33 | 34 | ||
| 34 | # Pass the needed cflags/ldflags so that cgo | 35 | # Pass the needed cflags/ldflags so that cgo |
| 35 | # can find the needed headers files and libraries | 36 | # can find the needed headers files and libraries |
| @@ -38,11 +39,12 @@ do_compile() { | |||
| 38 | export LDFLAGS="" | 39 | export LDFLAGS="" |
| 39 | export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" | 40 | export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" |
| 40 | export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" | 41 | export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" |
| 42 | cd ${S}/src/import | ||
| 41 | 43 | ||
| 42 | oe_runmake static | 44 | oe_runmake static |
| 43 | } | 45 | } |
| 44 | 46 | ||
| 45 | do_install() { | 47 | do_install() { |
| 46 | install -d ${D}/${sbindir} | 48 | install -d ${D}/${sbindir} |
| 47 | install ${S}/riddler ${D}/${sbindir}/riddler | 49 | install ${S}/src/import/riddler ${D}/${sbindir}/riddler |
| 48 | } | 50 | } |
diff --git a/recipes-containers/runc/runc-docker/0001-Update-to-runtime-spec-198f23f827eea397d4331d7eb048d.patch b/recipes-containers/runc/runc-docker/0001-Update-to-runtime-spec-198f23f827eea397d4331d7eb048d.patch index bc1e9a23..bcc76fc4 100644 --- a/recipes-containers/runc/runc-docker/0001-Update-to-runtime-spec-198f23f827eea397d4331d7eb048d.patch +++ b/recipes-containers/runc/runc-docker/0001-Update-to-runtime-spec-198f23f827eea397d4331d7eb048d.patch | |||
| @@ -14,8 +14,8 @@ Signed-off-by: Justin Cormack <justin.cormack@docker.com> | |||
| 14 | 14 | ||
| 15 | diff --git a/vendor.conf b/vendor.conf | 15 | diff --git a/vendor.conf b/vendor.conf |
| 16 | index e23e7ea7..09a8a924 100644 | 16 | index e23e7ea7..09a8a924 100644 |
| 17 | --- a/vendor.conf | 17 | --- a/src/import/vendor.conf |
| 18 | +++ b/vendor.conf | 18 | +++ b/src/import/vendor.conf |
| 19 | @@ -1,7 +1,7 @@ | 19 | @@ -1,7 +1,7 @@ |
| 20 | # OCI runtime-spec. When updating this, make sure you use a version tag rather | 20 | # OCI runtime-spec. When updating this, make sure you use a version tag rather |
| 21 | # than a commit ID so it's much more obvious what version of the spec we are | 21 | # than a commit ID so it's much more obvious what version of the spec we are |
| @@ -27,8 +27,8 @@ index e23e7ea7..09a8a924 100644 | |||
| 27 | github.com/opencontainers/selinux v1.0.0-rc1 | 27 | github.com/opencontainers/selinux v1.0.0-rc1 |
| 28 | diff --git a/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go b/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go | 28 | diff --git a/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go b/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go |
| 29 | index 8bf8d924..68ab112e 100644 | 29 | index 8bf8d924..68ab112e 100644 |
| 30 | --- a/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go | 30 | --- a/src/import/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go |
| 31 | +++ b/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go | 31 | +++ b/src/import/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go |
| 32 | @@ -6,8 +6,6 @@ import "os" | 32 | @@ -6,8 +6,6 @@ import "os" |
| 33 | type Spec struct { | 33 | type Spec struct { |
| 34 | // Version of the Open Container Runtime Specification with which the bundle complies. | 34 | // Version of the Open Container Runtime Specification with which the bundle complies. |
diff --git a/recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch b/recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch index f49adfbf..48c1250d 100644 --- a/recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch +++ b/recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch | |||
| @@ -14,8 +14,8 @@ Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | |||
| 14 | 14 | ||
| 15 | diff --git a/utils_linux.go b/utils_linux.go | 15 | diff --git a/utils_linux.go b/utils_linux.go |
| 16 | index 8085f7fe..e6d31b35 100644 | 16 | index 8085f7fe..e6d31b35 100644 |
| 17 | --- a/utils_linux.go | 17 | --- a/src/import/utils_linux.go |
| 18 | +++ b/utils_linux.go | 18 | +++ b/src/import/utils_linux.go |
| 19 | @@ -227,6 +227,11 @@ type runner struct { | 19 | @@ -227,6 +227,11 @@ type runner struct { |
| 20 | } | 20 | } |
| 21 | 21 | ||
diff --git a/recipes-containers/runc/runc-docker/0002-Remove-Platform-as-no-longer-in-OCI-spec.patch b/recipes-containers/runc/runc-docker/0002-Remove-Platform-as-no-longer-in-OCI-spec.patch index 6ec286a8..7970dec3 100644 --- a/recipes-containers/runc/runc-docker/0002-Remove-Platform-as-no-longer-in-OCI-spec.patch +++ b/recipes-containers/runc/runc-docker/0002-Remove-Platform-as-no-longer-in-OCI-spec.patch | |||
| @@ -13,8 +13,8 @@ Signed-off-by: Justin Cormack <justin.cormack@docker.com> | |||
| 13 | 13 | ||
| 14 | diff --git a/libcontainer/specconv/example.go b/libcontainer/specconv/example.go | 14 | diff --git a/libcontainer/specconv/example.go b/libcontainer/specconv/example.go |
| 15 | index 33134116..d6621194 100644 | 15 | index 33134116..d6621194 100644 |
| 16 | --- a/libcontainer/specconv/example.go | 16 | --- a/src/import/libcontainer/specconv/example.go |
| 17 | +++ b/libcontainer/specconv/example.go | 17 | +++ b/src/import/libcontainer/specconv/example.go |
| 18 | @@ -2,7 +2,6 @@ package specconv | 18 | @@ -2,7 +2,6 @@ package specconv |
| 19 | 19 | ||
| 20 | import ( | 20 | import ( |
| @@ -36,8 +36,8 @@ index 33134116..d6621194 100644 | |||
| 36 | Readonly: true, | 36 | Readonly: true, |
| 37 | diff --git a/spec.go b/spec.go | 37 | diff --git a/spec.go b/spec.go |
| 38 | index 92d38f57..876937d2 100644 | 38 | index 92d38f57..876937d2 100644 |
| 39 | --- a/spec.go | 39 | --- a/src/import/spec.go |
| 40 | +++ b/spec.go | 40 | +++ b/src/import/spec.go |
| 41 | @@ -7,7 +7,6 @@ import ( | 41 | @@ -7,7 +7,6 @@ import ( |
| 42 | "fmt" | 42 | "fmt" |
| 43 | "io/ioutil" | 43 | "io/ioutil" |
diff --git a/recipes-containers/runc/runc-docker/0003-Update-memory-specs-to-use-int64-not-uint64.patch b/recipes-containers/runc/runc-docker/0003-Update-memory-specs-to-use-int64-not-uint64.patch index 9cb34922..50a9b7fc 100644 --- a/recipes-containers/runc/runc-docker/0003-Update-memory-specs-to-use-int64-not-uint64.patch +++ b/recipes-containers/runc/runc-docker/0003-Update-memory-specs-to-use-int64-not-uint64.patch | |||
| @@ -20,8 +20,8 @@ Signed-off-by: Justin Cormack <justin.cormack@docker.com> | |||
| 20 | 20 | ||
| 21 | diff --git a/libcontainer/cgroups/fs/memory.go b/libcontainer/cgroups/fs/memory.go | 21 | diff --git a/libcontainer/cgroups/fs/memory.go b/libcontainer/cgroups/fs/memory.go |
| 22 | index da2cc9f8..b739c631 100644 | 22 | index da2cc9f8..b739c631 100644 |
| 23 | --- a/libcontainer/cgroups/fs/memory.go | 23 | --- a/src/import/libcontainer/cgroups/fs/memory.go |
| 24 | +++ b/libcontainer/cgroups/fs/memory.go | 24 | +++ b/src/import/libcontainer/cgroups/fs/memory.go |
| 25 | @@ -73,14 +73,14 @@ func EnableKernelMemoryAccounting(path string) error { | 25 | @@ -73,14 +73,14 @@ func EnableKernelMemoryAccounting(path string) error { |
| 26 | // until a limit is set on the cgroup and limit cannot be set once the | 26 | // until a limit is set on the cgroup and limit cannot be set once the |
| 27 | // cgroup has children, or if there are already tasks in the cgroup. | 27 | // cgroup has children, or if there are already tasks in the cgroup. |
| @@ -123,8 +123,8 @@ index da2cc9f8..b739c631 100644 | |||
| 123 | } | 123 | } |
| 124 | diff --git a/libcontainer/configs/cgroup_linux.go b/libcontainer/configs/cgroup_linux.go | 124 | diff --git a/libcontainer/configs/cgroup_linux.go b/libcontainer/configs/cgroup_linux.go |
| 125 | index 3e0509de..e15a662f 100644 | 125 | index 3e0509de..e15a662f 100644 |
| 126 | --- a/libcontainer/configs/cgroup_linux.go | 126 | --- a/src/import/libcontainer/configs/cgroup_linux.go |
| 127 | +++ b/libcontainer/configs/cgroup_linux.go | 127 | +++ b/src/import/libcontainer/configs/cgroup_linux.go |
| 128 | @@ -43,19 +43,19 @@ type Resources struct { | 128 | @@ -43,19 +43,19 @@ type Resources struct { |
| 129 | Devices []*Device `json:"devices"` | 129 | Devices []*Device `json:"devices"` |
| 130 | 130 | ||
| @@ -152,8 +152,8 @@ index 3e0509de..e15a662f 100644 | |||
| 152 | CpuShares uint64 `json:"cpu_shares"` | 152 | CpuShares uint64 `json:"cpu_shares"` |
| 153 | diff --git a/update.go b/update.go | 153 | diff --git a/update.go b/update.go |
| 154 | index 0ea90d60..133be999 100644 | 154 | index 0ea90d60..133be999 100644 |
| 155 | --- a/update.go | 155 | --- a/src/import/update.go |
| 156 | +++ b/update.go | 156 | +++ b/src/import/update.go |
| 157 | @@ -124,11 +124,11 @@ other options are ignored. | 157 | @@ -124,11 +124,11 @@ other options are ignored. |
| 158 | 158 | ||
| 159 | r := specs.LinuxResources{ | 159 | r := specs.LinuxResources{ |
diff --git a/recipes-containers/runc/runc-docker_git.bb b/recipes-containers/runc/runc-docker_git.bb index f412c84b..97353254 100644 --- a/recipes-containers/runc/runc-docker_git.bb +++ b/recipes-containers/runc/runc-docker_git.bb | |||
| @@ -10,6 +10,8 @@ SRC_URI = "git://github.com/docker/runc.git;nobranch=1;name=runc-docker \ | |||
| 10 | file://0001-runc-Add-console-socket-dev-null.patch \ | 10 | file://0001-runc-Add-console-socket-dev-null.patch \ |
| 11 | " | 11 | " |
| 12 | 12 | ||
| 13 | GO_IMPORT = "import" | ||
| 14 | |||
| 13 | RUNC_VERSION = "1.0.0-rc3" | 15 | RUNC_VERSION = "1.0.0-rc3" |
| 14 | PROVIDES += "virtual/runc" | 16 | PROVIDES += "virtual/runc" |
| 15 | RPROVIDES_${PN} = "virtual/runc" | 17 | RPROVIDES_${PN} = "virtual/runc" |
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 |
| 6 | LICENSE = "Apache-2.0" | 6 | LICENSE = "Apache-2.0" |
| 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=435b266b3899aa8a959f17d41c56def8" | 7 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=435b266b3899aa8a959f17d41c56def8" |
| 8 | 8 | ||
| 9 | S = "${WORKDIR}/git" | 9 | S = "${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() { | |||
| 55 | do_install() { | 54 | do_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 | ||
diff --git a/recipes-networking/netns/netns_git.bb b/recipes-networking/netns/netns_git.bb index 641d55fc..8e771f5b 100644 --- a/recipes-networking/netns/netns_git.bb +++ b/recipes-networking/netns/netns_git.bb | |||
| @@ -1,11 +1,12 @@ | |||
| 1 | HOMEPAGE = "https://github.com/jfrazelle/netns" | 1 | HOMEPAGE = "https://github.com/jfrazelle/netns" |
| 2 | SUMMARY = "Runc hook for setting up default bridge networking." | 2 | SUMMARY = "Runc hook for setting up default bridge networking." |
| 3 | LICENSE = "MIT" | 3 | LICENSE = "MIT" |
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=20ce4c6a4f32d6ee4a68e3a7506db3f1" | 4 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=20ce4c6a4f32d6ee4a68e3a7506db3f1" |
| 5 | 5 | ||
| 6 | SRC_URI = "git://github.com/jessfraz/netns;branch=master" | 6 | SRC_URI = "git://github.com/jessfraz/netns;branch=master" |
| 7 | SRCREV = "85b1ab9fcccbaa404a2636b52a48bbde02437cf7" | 7 | SRCREV = "85b1ab9fcccbaa404a2636b52a48bbde02437cf7" |
| 8 | PV = "0.1.0+git${SRCPV}" | 8 | PV = "0.1.0+git${SRCPV}" |
| 9 | GO_IMPORT = "import" | ||
| 9 | 10 | ||
| 10 | S = "${WORKDIR}/git" | 11 | S = "${WORKDIR}/git" |
| 11 | 12 | ||
| @@ -22,10 +23,10 @@ do_compile() { | |||
| 22 | # | 23 | # |
| 23 | # We also need to link in the ipallocator directory as that is not under | 24 | # We also need to link in the ipallocator directory as that is not under |
| 24 | # a src directory. | 25 | # a src directory. |
| 25 | ln -sfn . "${S}/vendor/src" | 26 | ln -sfn . "${S}/src/import/vendor/src" |
| 26 | mkdir -p "${S}/vendor/src/github.com/jessfraz/netns" | 27 | mkdir -p "${S}/src/import/vendor/src/github.com/jessfraz/netns" |
| 27 | ln -sfn "${S}/ipallocator" "${S}/vendor/src/github.com/jessfraz/netns/ipallocator" | 28 | ln -sfn "${S}/src/import/ipallocator" "${S}/src/import/vendor/src/github.com/jessfraz/netns/ipallocator" |
| 28 | export GOPATH="${S}/vendor" | 29 | export GOPATH="${S}/src/import/vendor" |
| 29 | 30 | ||
| 30 | # Pass the needed cflags/ldflags so that cgo | 31 | # Pass the needed cflags/ldflags so that cgo |
| 31 | # can find the needed headers files and libraries | 32 | # can find the needed headers files and libraries |
| @@ -35,10 +36,11 @@ do_compile() { | |||
| 35 | export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" | 36 | export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" |
| 36 | export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" | 37 | export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" |
| 37 | 38 | ||
| 39 | cd ${S}/src/import | ||
| 38 | oe_runmake static | 40 | oe_runmake static |
| 39 | } | 41 | } |
| 40 | 42 | ||
| 41 | do_install() { | 43 | do_install() { |
| 42 | install -d ${D}/${sbindir} | 44 | install -d ${D}/${sbindir} |
| 43 | install ${S}/netns ${D}/${sbindir}/netns | 45 | install ${S}/src/import/netns ${D}/${sbindir}/netns |
| 44 | } | 46 | } |
