summaryrefslogtreecommitdiffstats
path: root/recipes-containers
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2017-02-14 22:47:03 -0500
committerBruce Ashfield <bruce.ashfield@windriver.com>2017-02-15 14:57:35 -0500
commitb18acd8bc403dc8781e3a25bb534e14ba0c38fda (patch)
tree64bbd8a342a0c58c18f1e82b0fcec0a87f491b48 /recipes-containers
parent88a28bbbebd8ea134d088d42bfe6c0044b40ecb1 (diff)
downloadmeta-virtualization-b18acd8bc403dc8781e3a25bb534e14ba0c38fda.tar.gz
oci: introduce oci-image-tools (and dependencies)
The oci image tools allow the easy manipulation of containers and bundles. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-containers')
-rw-r--r--recipes-containers/go-digest/go-digest_git.bb41
-rw-r--r--recipes-containers/go-errors/go-errors_git.bb41
-rw-r--r--recipes-containers/go-spf13-cobra/spf13-cobra_git.bb41
-rw-r--r--recipes-containers/go-spf13-pflag/spf13-pflag_git.bb41
-rw-r--r--recipes-containers/oci-image-spec/oci-image-spec_git.bb41
-rw-r--r--recipes-containers/oci-image-tools/oci-image-tools_git.bb60
-rw-r--r--recipes-containers/oci-runtime-spec/oci-runtime-spec_git.bb41
7 files changed, 306 insertions, 0 deletions
diff --git a/recipes-containers/go-digest/go-digest_git.bb b/recipes-containers/go-digest/go-digest_git.bb
new file mode 100644
index 00000000..a2f8cd69
--- /dev/null
+++ b/recipes-containers/go-digest/go-digest_git.bb
@@ -0,0 +1,41 @@
1DESCRIPTION = "Common digest package used across the container ecosystem."
2HOMEPAGE = "https://github.com/opencontainers/go-digest.git"
3SECTION = "devel/go"
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE.code;md5=9cd86830b557232ce55e2a6b47387471"
6
7SRCNAME = "go-digest"
8
9PKG_NAME = "github.com/opencontainers/${SRCNAME}"
10SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
11
12SRCREV = "b6234c321f263c503268e3b205f3d9755f9d14ed"
13PV = "v1.0.0-rc0+git${SRCPV}"
14
15S = "${WORKDIR}/git"
16
17# NO-OP the do compile rule because this recipe is source only.
18do_compile() {
19}
20
21do_install() {
22 install -d ${D}${prefix}/local/go/src/${PKG_NAME}
23 for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do
24 if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
25 mkdir -p ${D}${prefix}/local/go/$(dirname $j)
26 fi
27 cp $j ${D}${prefix}/local/go/$j
28 done
29 cp -r ${S}/src/${PKG_NAME}/LICENSE.code ${D}${prefix}/local/go/src/${PKG_NAME}/
30}
31
32SYSROOT_PREPROCESS_FUNCS += "go_digest_file_sysroot_preprocess"
33
34go_digest_file_sysroot_preprocess () {
35 install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
36 cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
37}
38
39FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
40
41CLEANBROKEN = "1" \ No newline at end of file
diff --git a/recipes-containers/go-errors/go-errors_git.bb b/recipes-containers/go-errors/go-errors_git.bb
new file mode 100644
index 00000000..3bb74a7c
--- /dev/null
+++ b/recipes-containers/go-errors/go-errors_git.bb
@@ -0,0 +1,41 @@
1DESCRIPTION = "Simple error handling primitives"
2HOMEPAGE = "https://github.com/pkg/errors"
3SECTION = "devel/go"
4LICENSE = "BSD"
5LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=6fe682a02df52c6653f33bd0f7126b5a"
6
7SRCNAME = "errors"
8
9PKG_NAME = "github.com/pkg/${SRCNAME}"
10SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
11
12SRCREV = "248dadf4e9068a0b3e79f02ed0a610d935de5302"
13PV = "v0.8.0+git${SRCPV}"
14
15S = "${WORKDIR}/git"
16
17# NO-OP the do compile rule because this recipe is source only.
18do_compile() {
19}
20
21do_install() {
22 install -d ${D}${prefix}/local/go/src/${PKG_NAME}
23 for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go" -not -path "*/.tool/*"); do
24 if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
25 mkdir -p ${D}${prefix}/local/go/$(dirname $j)
26 fi
27 cp $j ${D}${prefix}/local/go/$j
28 done
29 cp -r ${S}/src/${PKG_NAME}/LICENSE ${D}${prefix}/local/go/src/${PKG_NAME}/
30}
31
32SYSROOT_PREPROCESS_FUNCS += "go_errors_file_sysroot_preprocess"
33
34go_errors_file_sysroot_preprocess () {
35 install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
36 cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
37}
38
39FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
40
41CLEANBROKEN = "1" \ No newline at end of file
diff --git a/recipes-containers/go-spf13-cobra/spf13-cobra_git.bb b/recipes-containers/go-spf13-cobra/spf13-cobra_git.bb
new file mode 100644
index 00000000..e942e4e3
--- /dev/null
+++ b/recipes-containers/go-spf13-cobra/spf13-cobra_git.bb
@@ -0,0 +1,41 @@
1DESCRIPTION = "A Commander for modern Go CLI interactions"
2HOMEPAGE = "https://github.com/spf13/cobra"
3SECTION = "devel/go"
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE.txt;md5=920d76114a32b0fb75b3f2718c5a91be"
6
7SRCNAME = "cobra"
8
9PKG_NAME = "github.com/spf13/${SRCNAME}"
10SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
11
12SRCREV = "b5d8e8f46a2f829f755b6e33b454e25c61c935e1"
13PV = "v0.0.1+git${SRCPV}"
14
15S = "${WORKDIR}/git"
16
17# NO-OP the do compile rule because this recipe is source only.
18do_compile() {
19}
20
21do_install() {
22 install -d ${D}${prefix}/local/go/src/${PKG_NAME}
23 for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go" -not -path "*/.tool/*"); do
24 if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
25 mkdir -p ${D}${prefix}/local/go/$(dirname $j)
26 fi
27 cp $j ${D}${prefix}/local/go/$j
28 done
29 cp -r ${S}/src/${PKG_NAME}/LICENSE.txt ${D}${prefix}/local/go/src/${PKG_NAME}/
30}
31
32SYSROOT_PREPROCESS_FUNCS += "cobra_file_sysroot_preprocess"
33
34cobra_file_sysroot_preprocess () {
35 install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
36 cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
37}
38
39FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
40
41CLEANBROKEN = "1" \ No newline at end of file
diff --git a/recipes-containers/go-spf13-pflag/spf13-pflag_git.bb b/recipes-containers/go-spf13-pflag/spf13-pflag_git.bb
new file mode 100644
index 00000000..2fbcb439
--- /dev/null
+++ b/recipes-containers/go-spf13-pflag/spf13-pflag_git.bb
@@ -0,0 +1,41 @@
1DESCRIPTION = "Drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags."
2HOMEPAGE = "https://github.com/spf13/pflag"
3SECTION = "devel/go"
4LICENSE = "BSD"
5LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=1e8b7dc8b906737639131047a590f21d"
6
7SRCNAME = "pflag"
8
9PKG_NAME = "github.com/spf13/${SRCNAME}"
10SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
11
12SRCREV = "9ff6c6923cfffbcd502984b8e0c80539a94968b7"
13PV = "v1.0.0-rc4+git${SRCPV}"
14
15S = "${WORKDIR}/git"
16
17# NO-OP the do compile rule because this recipe is source only.
18do_compile() {
19}
20
21do_install() {
22 install -d ${D}${prefix}/local/go/src/${PKG_NAME}
23 for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go" -not -path "*/.tool/*"); do
24 if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
25 mkdir -p ${D}${prefix}/local/go/$(dirname $j)
26 fi
27 cp $j ${D}${prefix}/local/go/$j
28 done
29 cp -r ${S}/src/${PKG_NAME}/LICENSE ${D}${prefix}/local/go/src/${PKG_NAME}/
30}
31
32SYSROOT_PREPROCESS_FUNCS += "pflag_file_sysroot_preprocess"
33
34pflag_file_sysroot_preprocess () {
35 install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
36 cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
37}
38
39FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
40
41CLEANBROKEN = "1" \ No newline at end of file
diff --git a/recipes-containers/oci-image-spec/oci-image-spec_git.bb b/recipes-containers/oci-image-spec/oci-image-spec_git.bb
new file mode 100644
index 00000000..92a83998
--- /dev/null
+++ b/recipes-containers/oci-image-spec/oci-image-spec_git.bb
@@ -0,0 +1,41 @@
1DESCRIPTION = "The OCI Image Format project creates and maintains the software shipping container image format spec"
2HOMEPAGE = "https://github.com/opencontainers/image-spec"
3SECTION = "devel/go"
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=27ef03aa2da6e424307f102e8b42621d"
6
7SRCNAME = "image-spec"
8
9PKG_NAME = "github.com/opencontainers/${SRCNAME}"
10SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
11
12SRCREV = "91d3eaabebcdc329edd9b4ff0f28f8f90022201f"
13PV = "v1.0.0-rc4+git${SRCPV}"
14
15S = "${WORKDIR}/git"
16
17# NO-OP the do compile rule because this recipe is source only.
18do_compile() {
19}
20
21do_install() {
22 install -d ${D}${prefix}/local/go/src/${PKG_NAME}
23 for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do
24 if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
25 mkdir -p ${D}${prefix}/local/go/$(dirname $j)
26 fi
27 cp $j ${D}${prefix}/local/go/$j
28 done
29 cp -r ${S}/src/${PKG_NAME}/LICENSE ${D}${prefix}/local/go/src/${PKG_NAME}/
30}
31
32SYSROOT_PREPROCESS_FUNCS += "image_spec_file_sysroot_preprocess"
33
34image_spec_file_sysroot_preprocess () {
35 install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
36 cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
37}
38
39FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
40
41CLEANBROKEN = "1" \ No newline at end of file
diff --git a/recipes-containers/oci-image-tools/oci-image-tools_git.bb b/recipes-containers/oci-image-tools/oci-image-tools_git.bb
new file mode 100644
index 00000000..48cae767
--- /dev/null
+++ b/recipes-containers/oci-image-tools/oci-image-tools_git.bb
@@ -0,0 +1,60 @@
1HOMEPAGE = "https://github.com/opencontainers/image-tools"
2SUMMARY = "A collection of tools for working with the OCI image format specification"
3LICENSE = "Apache-2"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
5
6DEPENDS = "go-cross \
7 oci-image-spec \
8 oci-runtime-spec \
9 go-digest \
10 go-errors \
11 spf13-cobra \
12 spf13-pflag \
13 "
14
15SRC_URI = "git://github.com/opencontainers/image-tools.git"
16SRCREV = "a358e03fde4e3628bf9fb7656bf643b63f975636"
17PV = "0.1.0+git${SRCPV}"
18
19S = "${WORKDIR}/git"
20
21inherit go-osarchmap
22
23# This disables seccomp and apparmor, which are on by default in the
24# go package.
25EXTRA_OEMAKE="BUILDTAGS=''"
26
27do_compile() {
28 export GOARCH="${TARGET_GOARCH}"
29
30 # Setup vendor directory so that it can be used in GOPATH.
31 #
32 # Go looks in a src directory under any directory in GOPATH but riddler
33 # uses 'vendor' instead of 'vendor/src'. We can fix this with a symlink.
34 #
35 # We also need to link in the ipallocator directory as that is not under
36 # a src directory.
37 ln -sfn . "${S}/vendor/src"
38 mkdir -p "${S}/vendor/src/github.com/opencontainers/image-tools/"
39 ln -sfn "${S}/image" "${S}/vendor/src/github.com/opencontainers/image-tools/image"
40 export GOPATH="${S}/vendor"
41
42 # Pass the needed cflags/ldflags so that cgo
43 # can find the needed headers files and libraries
44 export CGO_ENABLED="1"
45 export CFLAGS=""
46 export LDFLAGS=""
47 export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
48 export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
49
50 oe_runmake tools
51}
52
53do_install() {
54 install -d ${D}/${sbindir}
55 install ${S}/oci-create-runtime-bundle ${D}/${sbindir}/
56 install ${S}/oci-image-validate ${D}/${sbindir}/
57 install ${S}/oci-unpack ${D}/${sbindir}/
58}
59
60INSANE_SKIP_${PN} += "ldflags"
diff --git a/recipes-containers/oci-runtime-spec/oci-runtime-spec_git.bb b/recipes-containers/oci-runtime-spec/oci-runtime-spec_git.bb
new file mode 100644
index 00000000..82f852f9
--- /dev/null
+++ b/recipes-containers/oci-runtime-spec/oci-runtime-spec_git.bb
@@ -0,0 +1,41 @@
1DESCRIPTION = "The Open Container Initiative develops specifications for standards on Operating System process and application containers"
2HOMEPAGE = "https://github.com/opencontainers/runtime-spec"
3SECTION = "devel/go"
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=b355a61a394a504dacde901c958f662c"
6
7SRCNAME = "runtime-spec"
8
9PKG_NAME = "github.com/opencontainers/${SRCNAME}"
10SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
11
12SRCREV = "4af0c72f92aacf1b43618d7986197d8209fadf0b"
13PV = "v1.0.0-rc4+git${SRCPV}"
14
15S = "${WORKDIR}/git"
16
17# NO-OP the do compile rule because this recipe is source only.
18do_compile() {
19}
20
21do_install() {
22 install -d ${D}${prefix}/local/go/src/${PKG_NAME}
23 for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go" -not -path "*/.tool/*"); do
24 if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
25 mkdir -p ${D}${prefix}/local/go/$(dirname $j)
26 fi
27 cp $j ${D}${prefix}/local/go/$j
28 done
29 cp -r ${S}/src/${PKG_NAME}/LICENSE ${D}${prefix}/local/go/src/${PKG_NAME}/
30}
31
32SYSROOT_PREPROCESS_FUNCS += "runtime_spec_file_sysroot_preprocess"
33
34runtime_spec_file_sysroot_preprocess () {
35 install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
36 cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
37}
38
39FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
40
41CLEANBROKEN = "1" \ No newline at end of file