summaryrefslogtreecommitdiffstats
path: root/recipes-containers
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers')
-rw-r--r--recipes-containers/criu/criu_git.bb29
-rw-r--r--recipes-containers/criu/files/0001-Fixed-hardcoding.patch47
-rw-r--r--recipes-containers/criu/files/disable_tests.patch19
-rw-r--r--recipes-containers/criu/protobuf-c_0.15.bb20
-rw-r--r--recipes-containers/criu/protobuf_2.4.1.bb18
-rw-r--r--recipes-containers/lxc/files/config_network_type-set-macvlan-default-mode-to-priv.patch43
-rw-r--r--recipes-containers/lxc/files/lxc-1.0.0-disable-udhcp-from-busybox-template.patch24
-rw-r--r--recipes-containers/lxc/files/lxc-busybox-follow-symlinks-when-inspecting-busybox-.patch27
-rw-r--r--recipes-containers/lxc/files/network.c-Add-missing-LXC_NET_NONE-option-refactor.patch38
-rw-r--r--recipes-containers/lxc/files/run-ptest4
-rw-r--r--recipes-containers/lxc/files/runtest.patch32
-rw-r--r--recipes-containers/lxc/lxc_1.0.1.bb78
12 files changed, 379 insertions, 0 deletions
diff --git a/recipes-containers/criu/criu_git.bb b/recipes-containers/criu/criu_git.bb
new file mode 100644
index 00000000..878827f8
--- /dev/null
+++ b/recipes-containers/criu/criu_git.bb
@@ -0,0 +1,29 @@
1SUMMARY = "CRIU"
2DESCRIPTION = "Checkpoint/Restore In Userspace, or CRIU, is a software tool for Linux operating system. Using this tool, you can freeze a running application (or part of it) and checkpoint it to a hard drive as a collection of files. You can then use the files to restore and run the application from the point it was frozen at. The distinctive feature of the CRIU project is that it is mainly implemented in user space"
3HOMEPAGE = "http://criu.org"
4SECTION = "console/tools"
5LICENSE = "GPLv2"
6
7LIC_FILES_CHKSUM = "file://COPYING;md5=12920dfe6b35a0758155f0e62878b366"
8
9SRCREV = "d81c9a4618db2f618bdb8e207b7f0fec631c7142"
10PR = "r0"
11PV = "0.2+git${SRCPV}"
12
13SRC_URI = "git://git.criu.org/crtools.git;protocol=git \
14 file://0001-Fixed-hardcoding.patch"
15
16DEPENDS += "protobuf-c-native protobuf-c"
17
18S = "${WORKDIR}/git"
19
20EXTRA_OEMAKE += "ARCH=${TARGET_ARCH} WERROR=0"
21
22do_compile () {
23 oe_runmake
24}
25
26do_install () {
27 mkdir -p ${D}/${bindir}
28 install -m 755 ${S}/crtools ${D}/${bindir}/crtools
29} \ No newline at end of file
diff --git a/recipes-containers/criu/files/0001-Fixed-hardcoding.patch b/recipes-containers/criu/files/0001-Fixed-hardcoding.patch
new file mode 100644
index 00000000..5ff0a78d
--- /dev/null
+++ b/recipes-containers/criu/files/0001-Fixed-hardcoding.patch
@@ -0,0 +1,47 @@
1From 32c6c037a6de0a0972e16949ebb64ffebb5b7bcc Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?David=20Nystr=C3=B6m?= <david.nystrom@enea.com>
3Date: Wed, 28 Nov 2012 15:07:27 +0100
4Subject: [PATCH] Fixed hardcoding
5
6---
7 Makefile.inc | 24 ++++++++++++------------
8 1 file changed, 12 insertions(+), 12 deletions(-)
9
10diff --git a/Makefile.inc b/Makefile.inc
11index 722cbfc..3ae693e 100644
12--- a/Makefile.inc
13+++ b/Makefile.inc
14@@ -11,18 +11,18 @@ else
15 endif
16 export E Q
17
18-FIND := find
19-CSCOPE := cscope
20-TAGS := ctags
21-RM := rm
22-LD := ld
23-HEXDUMP := hexdump
24-CC := gcc
25-ECHO := echo
26-NM := nm
27-AWK := awk
28-SH := sh
29-MAKE := make
30+FIND ?= find
31+CSCOPE ?= cscope
32+TAGS ?= ctags
33+RM ?= rm
34+LD ?= ld
35+HEXDUMP ?= hexdump
36+CC ?= gcc
37+ECHO ?= echo
38+NM ?= nm
39+AWK ?= awk
40+SH ?= sh
41+MAKE ?= make
42
43 # Additional ARCH settings for x86
44 ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
45--
461.7.9.5
47
diff --git a/recipes-containers/criu/files/disable_tests.patch b/recipes-containers/criu/files/disable_tests.patch
new file mode 100644
index 00000000..dac89421
--- /dev/null
+++ b/recipes-containers/criu/files/disable_tests.patch
@@ -0,0 +1,19 @@
1diff -Naur protobuf-c-0.15.old/src/Makefile.am protobuf-c-0.15/src/Makefile.am
2--- protobuf-c-0.15.old/src/Makefile.am 2012-11-28 14:59:57.845251943 +0100
3+++ protobuf-c-0.15/src/Makefile.am 2012-11-28 15:00:23.549252632 +0100
4@@ -1,5 +1,5 @@
5 if BUILD_PROTOC_C
6-SUBDIRS = . test
7+
8 bin_PROGRAMS = protoc-c
9 protoc_c_SOURCES = \
10 google/protobuf/compiler/c/c_service.cc \
11@@ -23,7 +23,7 @@
12 lib_LTLIBRARIES = libprotobuf-c.la
13 protobufcincludedir = $(includedir)/google/protobuf-c
14
15-EXTRA_DIST = CMakeLists.txt test/CMakeLists.txt
16+EXTRA_DIST = CMakeLists.txt
17
18 libprotobuf_c_la_SOURCES = \
19 google/protobuf-c/protobuf-c-dispatch.c \
diff --git a/recipes-containers/criu/protobuf-c_0.15.bb b/recipes-containers/criu/protobuf-c_0.15.bb
new file mode 100644
index 00000000..d9d4fd97
--- /dev/null
+++ b/recipes-containers/criu/protobuf-c_0.15.bb
@@ -0,0 +1,20 @@
1SUMMARY = "protobuf-c"
2DESCRIPTION = "This package provides a code generator and runtime libraries to use Protocol Buffers from pure C"
3HOMEPAGE = "http://code.google.com/p/protobuf-c/"
4SECTION = "console/tools"
5LICENSE = "Apache-2.0"
6
7LIC_FILES_CHKSUM = "file://src/google/protobuf-c/protobuf-c.c;endline=33;md5=333140fae7cf8a38dc5f980ddb63704b"
8
9PR = "r0"
10
11DEPENDS = "protobuf"
12
13SRC_URI[md5sum] = "73ff0c8df50d2eee75269ad8f8c07dc8"
14SRC_URI[sha256sum] = "8fcb538e13a5431c46168fc8f2e6ad2574e2db9b684c0c72b066e24f010a0036"
15SRC_URI = "http://protobuf-c.googlecode.com/files/protobuf-c-${PV}.tar.gz \
16 file://disable_tests.patch"
17
18inherit autotools
19
20BBCLASSEXTEND = "native nativesdk" \ No newline at end of file
diff --git a/recipes-containers/criu/protobuf_2.4.1.bb b/recipes-containers/criu/protobuf_2.4.1.bb
new file mode 100644
index 00000000..d8f1b530
--- /dev/null
+++ b/recipes-containers/criu/protobuf_2.4.1.bb
@@ -0,0 +1,18 @@
1SUMMARY = "protobuf"
2DESCRIPTION = "Protocol Buffers are a way of encoding structured data in an efficient yet extensible format. Google uses Protocol Buffers for almost all of its internal RPC protocols and file formats."
3HOMEPAGE = "http://code.google.com/p/protobuf/"
4SECTION = "console/tools"
5LICENSE = "BSD-3-Clause"
6
7LIC_FILES_CHKSUM = "file://COPYING.txt;md5=af6809583bfde9a31595a58bb4a24514"
8
9PR = "r0"
10
11SRC_URI[md5sum] = "dc84e9912ea768baa1976cb7bbcea7b5"
12SRC_URI[sha256sum] = "eac6969b617f397247e805267da2b0db3ff9e5a9163b123503a192fbb5776567"
13SRC_URI = "http://protobuf.googlecode.com/files/protobuf-${PV}.tar.gz"
14
15EXTRA_OECONF += " --with-protoc=echo"
16inherit autotools
17
18BBCLASSEXTEND = "native nativesdk" \ No newline at end of file
diff --git a/recipes-containers/lxc/files/config_network_type-set-macvlan-default-mode-to-priv.patch b/recipes-containers/lxc/files/config_network_type-set-macvlan-default-mode-to-priv.patch
new file mode 100644
index 00000000..8cb321bb
--- /dev/null
+++ b/recipes-containers/lxc/files/config_network_type-set-macvlan-default-mode-to-priv.patch
@@ -0,0 +1,43 @@
1From 261658e80014c031852a024f8794dd7f2a2351ad Mon Sep 17 00:00:00 2001
2From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
3Date: Fri, 28 Mar 2014 10:31:41 -0400
4Subject: [PATCH] config_network_type: set macvlan default mode to private
5
6If a default mode is not set, the container requires an explicit
7mode specified in the config file, otherwise creating the
8container fails.
9
10Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
11Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
12---
13 src/lxc/confile.c | 6 +++++-
14 1 file changed, 5 insertions(+), 1 deletion(-)
15
16diff --git a/src/lxc/confile.c b/src/lxc/confile.c
17index d6cf151..90fb344 100644
18--- a/src/lxc/confile.c
19+++ b/src/lxc/confile.c
20@@ -303,6 +303,8 @@ out:
21 return ret;
22 }
23
24+static int macvlan_mode(int *valuep, const char *value);
25+
26 static int config_network_type(const char *key, const char *value,
27 struct lxc_conf *lxc_conf)
28 {
29@@ -337,8 +339,10 @@ static int config_network_type(const char *key, const char *value,
30
31 if (!strcmp(value, "veth"))
32 netdev->type = LXC_NET_VETH;
33- else if (!strcmp(value, "macvlan"))
34+ else if (!strcmp(value, "macvlan")) {
35 netdev->type = LXC_NET_MACVLAN;
36+ macvlan_mode(&netdev->priv.macvlan_attr.mode, "private");
37+ }
38 else if (!strcmp(value, "vlan"))
39 netdev->type = LXC_NET_VLAN;
40 else if (!strcmp(value, "phys"))
41--
421.9.rc1
43
diff --git a/recipes-containers/lxc/files/lxc-1.0.0-disable-udhcp-from-busybox-template.patch b/recipes-containers/lxc/files/lxc-1.0.0-disable-udhcp-from-busybox-template.patch
new file mode 100644
index 00000000..723be277
--- /dev/null
+++ b/recipes-containers/lxc/files/lxc-1.0.0-disable-udhcp-from-busybox-template.patch
@@ -0,0 +1,24 @@
1From d7e07e7acb1cbad33806f49143a2a30b4468c369 Mon Sep 17 00:00:00 2001
2From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
3Date: Mon, 8 Apr 2013 18:30:19 +0300
4Subject: [PATCH] lxc-0.9.0-disable-udhcp-from-busybox-template
5
6---
7 templates/lxc-busybox.in | 1 -
8 1 file changed, 1 deletion(-)
9
10diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in
11index cb425ec..bb8c951 100644
12--- a/templates/lxc-busybox.in
13+++ b/templates/lxc-busybox.in
14@@ -84,7 +84,6 @@ EOF
15 #!/bin/sh
16 /bin/syslogd
17 /bin/mount -a
18-/bin/udhcpc
19 EOF
20
21 # executable
22--
231.7.11.7
24
diff --git a/recipes-containers/lxc/files/lxc-busybox-follow-symlinks-when-inspecting-busybox-.patch b/recipes-containers/lxc/files/lxc-busybox-follow-symlinks-when-inspecting-busybox-.patch
new file mode 100644
index 00000000..6882c16e
--- /dev/null
+++ b/recipes-containers/lxc/files/lxc-busybox-follow-symlinks-when-inspecting-busybox-.patch
@@ -0,0 +1,27 @@
1From 50dbb8209bf65e4d24ccd06d3ca05004d0ddc63c Mon Sep 17 00:00:00 2001
2From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
3Date: Mon, 24 Mar 2014 12:43:03 -0400
4Subject: [PATCH] lxc-busybox: follow symlinks when inspecting busybox binary
5
6Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
7Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
8---
9 templates/lxc-busybox.in | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in
13index e5a512a..246e743 100644
14--- a/templates/lxc-busybox.in
15+++ b/templates/lxc-busybox.in
16@@ -187,7 +187,7 @@ configure_busybox()
17 return 1
18 fi
19
20- file $(which busybox) | grep -q "statically linked"
21+ file -L $(which busybox) | grep -q "statically linked"
22 if [ $? -ne 0 ]; then
23 echo "warning : busybox is not statically linked."
24 echo "warning : The template script may not correctly"
25--
261.9.rc1
27
diff --git a/recipes-containers/lxc/files/network.c-Add-missing-LXC_NET_NONE-option-refactor.patch b/recipes-containers/lxc/files/network.c-Add-missing-LXC_NET_NONE-option-refactor.patch
new file mode 100644
index 00000000..81fde835
--- /dev/null
+++ b/recipes-containers/lxc/files/network.c-Add-missing-LXC_NET_NONE-option-refactor.patch
@@ -0,0 +1,38 @@
1From b343592b45c91db8c18e863fac5ab8eeb94445d6 Mon Sep 17 00:00:00 2001
2From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
3Date: Wed, 26 Mar 2014 11:35:09 -0400
4Subject: [PATCH] network.c: Add missing LXC_NET_NONE option + refactor
5
6Add LXC_NET_NONE to known lxc_network_types, so parsing a config
7file with lxc.network.type = none does not result in failure
8(e.g. doc/examples/lxc-no-netns.conf). Options have also been
9reordered to match the enum in conf.h.
10
11Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
12Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
13---
14 src/lxc/network.c | 5 +++--
15 1 file changed, 3 insertions(+), 2 deletions(-)
16
17diff --git a/src/lxc/network.c b/src/lxc/network.c
18index 090b9bd..a9900de 100644
19--- a/src/lxc/network.c
20+++ b/src/lxc/network.c
21@@ -1202,11 +1202,12 @@ int lxc_bridge_attach(const char *bridge, const char *ifname)
22 }
23
24 static const char* const lxc_network_types[LXC_NET_MAXCONFTYPE + 1] = {
25+ [LXC_NET_EMPTY] = "empty",
26 [LXC_NET_VETH] = "veth",
27 [LXC_NET_MACVLAN] = "macvlan",
28- [LXC_NET_VLAN] = "vlan",
29 [LXC_NET_PHYS] = "phys",
30- [LXC_NET_EMPTY] = "empty",
31+ [LXC_NET_VLAN] = "vlan",
32+ [LXC_NET_NONE] = "none",
33 };
34
35 const char *lxc_net_type_to_str(int type)
36--
371.9.rc1
38
diff --git a/recipes-containers/lxc/files/run-ptest b/recipes-containers/lxc/files/run-ptest
new file mode 100644
index 00000000..23a6256b
--- /dev/null
+++ b/recipes-containers/lxc/files/run-ptest
@@ -0,0 +1,4 @@
1#!/bin/sh
2
3make -C src/tests -k check-TESTS
4
diff --git a/recipes-containers/lxc/files/runtest.patch b/recipes-containers/lxc/files/runtest.patch
new file mode 100644
index 00000000..e4e034b2
--- /dev/null
+++ b/recipes-containers/lxc/files/runtest.patch
@@ -0,0 +1,32 @@
1Add install-ptest rule.
2
3Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com>
4Upstream-status: Pending
5
6diff -uNr a/src/tests/Makefile.am b/src/tests/Makefile.am
7--- a/src/tests/Makefile.am 2014-04-07 16:25:59.246238815 +0300
8+++ b/src/tests/Makefile.am 2014-04-10 18:09:43.195772467 +0300
9@@ -54,6 +54,23 @@
10
11 endif
12
13+TESTS = lxc-test-containertests lxc-test-locktests \
14+ lxc-test-getkeys lxc-test-lxcpath lxc-test-cgpath lxc-test-console \
15+ lxc-test-snapshot lxc-test-concurrent lxc-test-may-control \
16+ lxc-test-reboot lxc-test-list lxc-test-attach lxc-test-device-add-remove
17+
18+buildtest-TESTS: $(TESTS)
19+
20+install-ptest:
21+ install -d $(TEST_DIR)
22+ install -D ../lxc/liblxc.so $(TEST_DIR)/../lxc/liblxc.so
23+ install -D ../../config/test-driver $(TEST_DIR)/../../config/test-driver
24+ cp Makefile $(TEST_DIR)
25+ @(for file in $(TESTS); do install $$file $(TEST_DIR); done;)
26+ sed -i 's|^Makefile:|_Makefile:|' $(TEST_DIR)/Makefile
27+ sed -i 's|^all-am:|_all-am:|' $(TEST_DIR)/Makefile
28+ sed -i -e 's|^\(.*\.log:\) \(.*EXEEXT.*\)|\1|g' $(TEST_DIR)/Makefile
29+
30 EXTRA_DIST = \
31 cgpath.c \
32 clonetest.c \
diff --git a/recipes-containers/lxc/lxc_1.0.1.bb b/recipes-containers/lxc/lxc_1.0.1.bb
new file mode 100644
index 00000000..b366116d
--- /dev/null
+++ b/recipes-containers/lxc/lxc_1.0.1.bb
@@ -0,0 +1,78 @@
1DESCRIPTION = "lxc aims to use these new functionnalities to provide an userspace container object"
2SECTION = "console/utils"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
5PRIORITY = "optional"
6PR = "r4"
7DEPENDS = "libxml2 libcap"
8RDEPENDS_${PN} = " \
9 rsync \
10 gzip \
11 libcap-bin \
12 bridge-utils \
13 dnsmasq \
14 perl-module-strict \
15 perl-module-getopt-long \
16 perl-module-vars \
17 perl-module-warnings-register \
18 perl-module-exporter \
19 perl-module-constant \
20 perl-module-overload \
21 perl-module-exporter-heavy \
22"
23RDEPENDS_${PN}-ptest += "file make"
24
25SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \
26 file://lxc-1.0.0-disable-udhcp-from-busybox-template.patch \
27 file://config_network_type-set-macvlan-default-mode-to-priv.patch \
28 file://lxc-busybox-follow-symlinks-when-inspecting-busybox-.patch \
29 file://network.c-Add-missing-LXC_NET_NONE-option-refactor.patch \
30 file://runtest.patch \
31 file://run-ptest \
32 "
33SRC_URI[md5sum] = "3c7379891e45713817ec873a167070b0"
34SRC_URI[sha256sum] = "17d8e5b575207b4fb57da0b8ba2d13f3e5ee20ce8ccd1259d6eae4bd5ca575b1"
35
36S = "${WORKDIR}/${BPN}-${PV}"
37
38# Let's not configure for the host distro.
39#
40PTEST_CONF = "${@base_contains('DISTRO_FEATURES', 'ptest', '--enable-tests', '', d)}"
41EXTRA_OECONF += "--with-distro=${DISTRO} ${PTEST_CONF}"
42
43PACKAGECONFIG ??= ""
44PACKAGECONFIG[doc] = "--enable-doc,--disable-doc,,"
45PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath,,"
46PACKAGECONFIG[apparmour] = "--enable-apparmor,--disable-apparmor,apparmor,apparmor"
47
48inherit autotools pkgconfig ptest
49
50FILES_${PN}-doc = "${mandir} ${infodir}"
51# For LXC the docdir only contains example configuration files and should be included in the lxc package
52FILES_${PN} += "${docdir}"
53FILES_${PN}-dbg += "${libexecdir}/lxc/.debug"
54
55PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1"
56
57do_install_append() {
58 # The /var/cache/lxc directory created by the Makefile
59 # is wiped out in volatile, we need to create this at boot.
60 rm -rf ${D}${localstatedir}/cache
61 install -d ${D}${sysconfdir}/default/volatiles
62 echo "d root root 0755 ${localstatedir}/cache/lxc none" \
63 > ${D}${sysconfdir}/default/volatiles/99_lxc
64
65}
66
67EXTRA_OEMAKE += "TEST_DIR=${D}${PTEST_PATH}/src/tests"
68
69do_install_ptest() {
70 oe_runmake -C src/tests install-ptest
71}
72
73pkg_postinst_${PN}() {
74 if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
75 /etc/init.d/populate-volatile.sh update
76 fi
77}
78