diff options
| author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2017-01-16 22:27:37 -0500 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2017-01-16 22:29:34 -0500 |
| commit | 169ca413e0affc914af9f0a11e4ddbc4ab184cbc (patch) | |
| tree | 4fff74e6f68105c77edda8a7dd139a9eb61edc51 | |
| parent | 60ba6620761252f7ca0ef06712cb708059aa5589 (diff) | |
| download | meta-virtualization-169ca413e0affc914af9f0a11e4ddbc4ab184cbc.tar.gz | |
containers/oci: introduce riddler package
riddler is useful for converting docker container to runc OCI spec json.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
| -rw-r--r-- | recipes-containers/riddler/riddler_git.bb | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/recipes-containers/riddler/riddler_git.bb b/recipes-containers/riddler/riddler_git.bb new file mode 100644 index 00000000..361e9d24 --- /dev/null +++ b/recipes-containers/riddler/riddler_git.bb | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | HOMEPAGE = "https://github.com/jfrazelle/riddler" | ||
| 2 | SUMMARY = "Convert `docker inspect` to opencontainers (OCI compatible) runc spec." | ||
| 3 | LICENSE = "MIT" | ||
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=20ce4c6a4f32d6ee4a68e3a7506db3f1" | ||
| 5 | DEPENDS = "go-cross" | ||
| 6 | |||
| 7 | SRC_URI = "git://github.com/jfrazelle/riddler;branch=master" | ||
| 8 | SRCREV = "23befa0b232877b5b502b828e24161d801bd67f6" | ||
| 9 | PV = "0.1.0+git${SRCPV}" | ||
| 10 | |||
| 11 | S = "${WORKDIR}/git" | ||
| 12 | |||
| 13 | inherit go-osarchmap | ||
| 14 | |||
| 15 | # This disables seccomp and apparmor, which are on by default in the | ||
| 16 | # go package. | ||
| 17 | EXTRA_OEMAKE="BUILDTAGS=''" | ||
| 18 | |||
| 19 | do_compile() { | ||
| 20 | export GOARCH="${TARGET_GOARCH}" | ||
| 21 | |||
| 22 | # Setup vendor directory so that it can be used in GOPATH. | ||
| 23 | # | ||
| 24 | # Go looks in a src directory under any directory in GOPATH but riddler | ||
| 25 | # uses 'vendor' instead of 'vendor/src'. We can fix this with a symlink. | ||
| 26 | # | ||
| 27 | # We also need to link in the ipallocator directory as that is not under | ||
| 28 | # a src directory. | ||
| 29 | ln -sfn . "${S}/vendor/src" | ||
| 30 | mkdir -p "${S}/vendor/src/github.com/jessfraz/riddler" | ||
| 31 | ln -sfn "${S}/parse" "${S}/vendor/src/github.com/jessfraz/riddler/parse" | ||
| 32 | export GOPATH="${S}/vendor" | ||
| 33 | |||
| 34 | # Pass the needed cflags/ldflags so that cgo | ||
| 35 | # can find the needed headers files and libraries | ||
| 36 | export CGO_ENABLED="1" | ||
| 37 | export CFLAGS="" | ||
| 38 | export LDFLAGS="" | ||
| 39 | export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" | ||
| 40 | export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" | ||
| 41 | |||
| 42 | oe_runmake static | ||
| 43 | } | ||
| 44 | |||
| 45 | do_install() { | ||
| 46 | install -d ${D}/${sbindir} | ||
| 47 | install ${S}/riddler ${D}/${sbindir}/riddler | ||
| 48 | } | ||
