summaryrefslogtreecommitdiffstats
path: root/recipes-core/runv
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2017-10-02 09:11:05 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2017-10-02 09:16:07 -0400
commitb7febd5592a69f79cf194d4561eba2f76e504bd8 (patch)
treeb34fd7d0797fe2aaad48c24b702146f29653c424 /recipes-core/runv
parent176715435e67f30e45a84e3789fe8fb1f809f48b (diff)
downloadmeta-virtualization-b7febd5592a69f79cf194d4561eba2f76e504bd8.tar.gz
virtualization: runv: Hypervisor-based Runtime for OCI
Introducing runv, which is a Hypervisor-based Runtime for OCI. runV is compatible with OCI. However, due to the difference between hypervisors and containers, the following sections of OCI don't apply to runV: - Namespace - Capability - Device - linux and mount fields in OCI specs are ignored - Hypervisor The current release of runV supports the following hypervisors: - KVM (QEMU 2.1 or later) - KVM (Kvmtool) - Xen (4.5 or later) - QEMU without KVM (NOT RECOMMENDED. QEMU 2.1 or later) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-core/runv')
-rw-r--r--recipes-core/runv/runv_git.bb82
1 files changed, 82 insertions, 0 deletions
diff --git a/recipes-core/runv/runv_git.bb b/recipes-core/runv/runv_git.bb
new file mode 100644
index 00000000..5125d906
--- /dev/null
+++ b/recipes-core/runv/runv_git.bb
@@ -0,0 +1,82 @@
1HOMEPAGE = "https://github.com/hyperhq/runv"
2SUMMARY = "Hypervisor-based Runtime for OCI"
3DESCRIPTION = "Hypervisor-based Runtime for OCI"
4
5SRCREV_runv = "b360a686abc6c6e896382990ef1b93ef07c7a677"
6SRC_URI = "\
7 git://github.com/hyperhq/runv.git;nobranch=1;name=runv \
8 "
9
10LICENSE = "Apache-2.0"
11LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=4106a50540bdec3b9734f9c70882d382"
12
13GO_IMPORT = "import"
14
15PV = "0.4.0+git${SRCREV_runv}"
16
17inherit go
18inherit goarch
19inherit pkgconfig
20inherit autotools-brokensep
21
22PACKAGECONFIG[xen] = "--with-xen,--without-xen,"
23AUTOTOOLS_SCRIPT_PATH = "${S}/src/import/"
24
25RDEPENDS_${PN} += " qemu"
26
27do_compile() {
28 export GOARCH="${TARGET_GOARCH}"
29 export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
30 export GOPATH="${S}/src/import:${S}/src/import/vendor"
31
32 # Pass the needed cflags/ldflags so that cgo
33 # can find the needed headers files and libraries
34 export CGO_ENABLED="1"
35 export CFLAGS=""
36 export LDFLAGS=""
37 export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
38 export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
39
40 # link fixups for compilation
41 rm -f ${S}/src/import/vendor/src
42 ln -sf ./ ${S}/src/import/vendor/src
43
44 mkdir -p ${S}/src/import/vendor/github.com/hyperhq/runv
45
46 echo fff
47 pwd
48 ln -sf src/import/cli
49 ln -sf ../../../../api ${S}/src/import/vendor/github.com/hyperhq/runv/api
50 ln -sf ../../../../cli ${S}/src/import/vendor/github.com/hyperhq/runv/cli
51 ln -sf ../../../../lib ${S}/src/import/vendor/github.com/hyperhq/runv/lib
52 ln -sf ../../../../driverloader ${S}/src/import/vendor/github.com/hyperhq/runv/driverloader
53 ln -sf ../../../../factory ${S}/src/import/vendor/github.com/hyperhq/runv/factory
54 ln -sf ../../../../hyperstart ${S}/src/import/vendor/github.com/hyperhq/runv/hyperstart
55 ln -sf ../../../../hypervisor ${S}/src/import/vendor/github.com/hyperhq/runv/hypervisor
56 ln -sf ../../../../template ${S}/src/import/vendor/github.com/hyperhq/runv/template
57
58 export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
59 export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
60
61 # Pass the needed cflags/ldflags so that cgo
62 # can find the needed headers files and libraries
63 export CGO_ENABLED="1"
64 export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
65 export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
66
67 oe_runmake build-runv
68}
69
70do_install() {
71 localbindir="/usr/local/bin"
72
73 install -d ${D}${localbindir}
74 install -m 755 ${S}/runv ${D}/${localbindir}
75}
76
77deltask compile_ptest_base
78
79FILES_${PN} += "/usr/local/bin/*"
80
81INHIBIT_PACKAGE_STRIP = "1"
82INSANE_SKIP_${PN} += "ldflags already-stripped"