From 8753a622f1a3313a8459dbd45e7bd0434a271346 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Tue, 8 Nov 2016 22:36:09 -0500 Subject: [PATCH] oci: introduce runtime tools The oci runtime uses config.json to configure and control containers. Most of that file can be generated via the oci runtime tools. With this package we can generate container configurations dynamically on the target. Signed-off-by: Bruce Ashfield --- .../oci-runtime-tools_git.bb | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb diff --git a/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb b/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb new file mode 100644 index 00000000..dac2d133 --- /dev/null +++ b/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb @@ -0,0 +1,35 @@ +HOMEPAGE = "https://github.com/opencontainers/runtime-tools" +SUMMARY = "oci-runtime-tool is a collection of tools for working with the OCI runtime specification" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b355a61a394a504dacde901c958f662c" +DEPENDS = "go-cross" + +SRC_URI = "git://github.com/opencontainers/runtime-tools.git" + +SRCREV = "038b0c99b82f3c08de31f6b09e693eb24644affd" +PV = "0.0.1+git${SRCPV}" + +S = "${WORKDIR}/git" + +inherit go-osarchmap + +do_compile() { + export GOARCH="${TARGET_GOARCH}" + + export GOPATH="${S}" + + # Pass the needed cflags/ldflags so that cgo + # can find the needed headers files and libraries + export CGO_ENABLED="1" + export CFLAGS="" + export LDFLAGS="" + export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" + export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" + + oe_runmake +} + +do_install() { + install -d ${D}/${sbindir} + install ${S}/oci-runtime-tool ${D}/${sbindir}/oci-runtime-tool +}