summaryrefslogtreecommitdiffstats
path: root/recipes-containers
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-08 22:53:03 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-08 22:53:03 +0200
commitddb59df2a039d1326122e3b0ed1a22fbf1c42a52 (patch)
tree9bcf593cf809204722ca7df3c9fe4de7aba38ebf /recipes-containers
downloadmeta-virtualization-ddb59df2a039d1326122e3b0ed1a22fbf1c42a52.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'recipes-containers')
-rw-r--r--recipes-containers/criu/criu-1.2/0001-Makefile-Fix-hardcoding.patch42
-rw-r--r--recipes-containers/criu/criu_1.2.bb39
-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/files/protobuf-allow-running-python-scripts-from-anywhere.patch38
-rwxr-xr-xrecipes-containers/criu/files/run-ptest32
-rw-r--r--recipes-containers/criu/protobuf-c_0.15.bb20
-rw-r--r--recipes-containers/criu/protobuf-native_2.5.0.bb21
-rw-r--r--recipes-containers/criu/protobuf_2.5.0.bb93
-rw-r--r--recipes-containers/lxc/files/automake-ensure-VPATH-builds-correctly.patch26
-rw-r--r--recipes-containers/lxc/files/lxc-1.0.0-disable-udhcp-from-busybox-template.patch24
-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.6.bb80
15 files changed, 546 insertions, 0 deletions
diff --git a/recipes-containers/criu/criu-1.2/0001-Makefile-Fix-hardcoding.patch b/recipes-containers/criu/criu-1.2/0001-Makefile-Fix-hardcoding.patch
new file mode 100644
index 00000000..fd9ab5b1
--- /dev/null
+++ b/recipes-containers/criu/criu-1.2/0001-Makefile-Fix-hardcoding.patch
@@ -0,0 +1,42 @@
1From fa785bb1eb9cb0039d77836f4658c7bcccae5999 Mon Sep 17 00:00:00 2001
2From: Alexey Firago <alexey_firago@mentor.com>
3Date: Wed, 9 Jul 2014 02:01:11 +0400
4Subject: [PATCH] Makefile: Fix hardcoding
5
6Signed-off-by: Alexey Firago <alexey_firago@mentor.com>
7---
8 Makefile | 18 +++++++++---------
9 1 file changed, 9 insertions(+), 9 deletions(-)
10
11diff --git a/Makefile b/Makefile
12index bda808d..4614ae2 100644
13--- a/Makefile
14+++ b/Makefile
15@@ -23,15 +23,15 @@ export VERSION_SO_MAJOR VERSION_SO_MINOR
16 # Common definitions
17 #
18
19-FIND := find
20-CSCOPE := cscope
21-RM := rm -f
22-LD := $(CROSS_COMPILE)ld
23-CC := $(CROSS_COMPILE)gcc
24-NM := $(CROSS_COMPILE)nm
25-SH := bash
26-MAKE := make
27-OBJCOPY := $(CROSS_COMPILE)objcopy
28+FIND ?= find
29+CSCOPE ?= cscope
30+RM ?= rm -f
31+LD ?= $(CROSS_COMPILE)ld
32+CC ?= $(CROSS_COMPILE)gcc
33+NM ?= $(CROSS_COMPILE)nm
34+SH ?= bash
35+MAKE ?= make
36+OBJCOPY ?= $(CROSS_COMPILE)objcopy
37
38 CFLAGS += $(USERCFLAGS)
39
40--
411.9.1
42
diff --git a/recipes-containers/criu/criu_1.2.bb b/recipes-containers/criu/criu_1.2.bb
new file mode 100644
index 00000000..de07842c
--- /dev/null
+++ b/recipes-containers/criu/criu_1.2.bb
@@ -0,0 +1,39 @@
1SUMMARY = "CRIU"
2DESCRIPTION = "Checkpoint/Restore In Userspace, or CRIU, is a software \
3tool for Linux operating system. Using this tool, you can freeze a running \
4application (or part of it) and checkpoint it to a hard drive \
5as a collection of files. You can then use the files to restore and run \
6the application from the point it was frozen at. The distinctive feature \
7of the CRIU project is that it is mainly implemented in user space"
8HOMEPAGE = "http://criu.org"
9SECTION = "console/tools"
10LICENSE = "GPLv2"
11
12LIC_FILES_CHKSUM = "file://COPYING;md5=5cc804625b8b491b6b4312f0c9cb5efa"
13
14SRCREV = "v1.2"
15PR = "r0"
16PV = "1.2"
17
18SRC_URI = "git://git.criu.org/crtools.git;protocol=git \
19 file://0001-Makefile-Fix-hardcoding.patch"
20
21DEPENDS += "protobuf-c-native protobuf-c"
22
23S = "${WORKDIR}/git"
24
25ARMV_armv7a = "ARMV=7"
26ARMV_armv6 = "ARMV=6"
27ARMV ?= ""
28EXTRA_OEMAKE += "ARCH=${TARGET_ARCH} WERROR=0 ${ARMV}"
29
30do_compile () {
31 unset CFLAGS
32 unset LDFLAGS
33 oe_runmake
34}
35
36do_install () {
37 mkdir -p ${D}/${bindir}
38 install -m 755 ${S}/criu ${D}/${bindir}/criu
39}
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/files/protobuf-allow-running-python-scripts-from-anywhere.patch b/recipes-containers/criu/files/protobuf-allow-running-python-scripts-from-anywhere.patch
new file mode 100644
index 00000000..13d4e848
--- /dev/null
+++ b/recipes-containers/criu/files/protobuf-allow-running-python-scripts-from-anywhere.patch
@@ -0,0 +1,38 @@
1From 46e331263eb92e47510e88478b255f226d30245c Mon Sep 17 00:00:00 2001
2From: Keith Holman <Keith.Holman@windriver.com>
3Date: Mon, 18 Aug 2014 15:19:35 -0400
4Subject: [PATCH] protobuf: allow running python scripts from anywhere
5
6The Makefile to generate the examples with Google Protocol Buffers
7generates some scripts for python. However, these generated scripts
8only work if they are ran in the same directory as the source files.
9This fix generates scripts to execute from anywhere on the system.
10
11Signed-off-by: Keith Holman <Keith.Holman@windriver.com>
12---
13 examples/Makefile | 6 ++++--
14 1 file changed, 4 insertions(+), 2 deletions(-)
15
16diff --git a/examples/Makefile b/examples/Makefile
17index 8dc9083..a993d63 100644
18--- a/examples/Makefile
19+++ b/examples/Makefile
20@@ -48,11 +48,13 @@ list_people_java: javac_middleman
21 add_person_python: add_person.py protoc_middleman
22 @echo "Writing shortcut script add_person_python..."
23 @echo '#! /bin/sh' > add_person_python
24- @echo './add_person.py "$$@"' >> add_person_python
25+ @echo 'SCRIPT_DIR=$$(dirname $$0)' >> add_person_python
26+ @echo '$$SCRIPT_DIR/add_person.py "$$@"' >> add_person_python
27 @chmod +x add_person_python
28
29 list_people_python: list_people.py protoc_middleman
30 @echo "Writing shortcut script list_people_python..."
31 @echo '#! /bin/sh' > list_people_python
32- @echo './list_people.py "$$@"' >> list_people_python
33+ @echo 'SCRIPT_DIR=$$(dirname $$0)' >> list_people_python
34+ @echo '$$SCRIPT_DIR/list_people.py "$$@"' >> list_people_python
35 @chmod +x list_people_python
36--
371.9.3
38
diff --git a/recipes-containers/criu/files/run-ptest b/recipes-containers/criu/files/run-ptest
new file mode 100755
index 00000000..a5a7b0f9
--- /dev/null
+++ b/recipes-containers/criu/files/run-ptest
@@ -0,0 +1,32 @@
1#!/bin/bash
2DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
3TEST_FILE="/tmp/test.data"
4
5RETVAL=0
6# Test every writing test application
7for write_exe_full_path in ${DIR}/add_person_*; do
8 if [ -x "${write_exe_full_path}" ]; then
9 write_exe=`basename ${write_exe_full_path}`
10 echo "Generating new test file using ${write_exe}..."
11 ${write_exe_full_path} "${TEST_FILE}"
12 RETVAL=$?
13
14 # Test every reading test application
15 for read_exe_full_path in ${DIR}/list_people_*; do
16 read_exe=`basename ${read_exe_full_path}`
17 echo "Test: Write with ${write_exe}; Read with ${read_exe}..."
18 if [ -x "${read_exe_full_path}" ]; then
19 ${read_exe_full_path} "${TEST_FILE}"
20 RETVAL=$?
21 fi
22 done
23
24 # Cleanup...
25 if [ -e "${TEST_FILE}" ]; then
26 rm "${TEST_FILE}"
27 fi
28 fi
29done
30
31exit $RETVAL
32
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-native_2.5.0.bb b/recipes-containers/criu/protobuf-native_2.5.0.bb
new file mode 100644
index 00000000..b3f00dd8
--- /dev/null
+++ b/recipes-containers/criu/protobuf-native_2.5.0.bb
@@ -0,0 +1,21 @@
1SUMMARY = "protobuf"
2DESCRIPTION = "Protocol Buffers are a way of encoding structured data in \
3an efficient yet extensible format. Google uses Protocol Buffers for \
4almost all of its internal RPC protocols and file formats."
5HOMEPAGE = "http://code.google.com/p/protobuf/"
6SECTION = "console/tools"
7LICENSE = "BSD-3-Clause"
8
9LIC_FILES_CHKSUM = "file://COPYING.txt;md5=af6809583bfde9a31595a58bb4a24514"
10
11PR = "r0"
12
13SRC_URI[md5sum] = "b751f772bdeb2812a2a8e7202bf1dae8"
14SRC_URI[sha256sum] = "c55aa3dc538e6fd5eaf732f4eb6b98bdcb7cedb5b91d3b5bdcf29c98c293f58e"
15SRC_URI = "http://protobuf.googlecode.com/files/protobuf-${PV}.tar.gz \
16 "
17
18EXTRA_OECONF += " --with-protoc=echo --disable-shared"
19
20inherit native autotools
21
diff --git a/recipes-containers/criu/protobuf_2.5.0.bb b/recipes-containers/criu/protobuf_2.5.0.bb
new file mode 100644
index 00000000..0e11ff48
--- /dev/null
+++ b/recipes-containers/criu/protobuf_2.5.0.bb
@@ -0,0 +1,93 @@
1SUMMARY = "protobuf"
2DESCRIPTION = "Protocol Buffers are a way of encoding structured data in \
3an efficient yet extensible format. Google uses Protocol Buffers for \
4almost all of its internal RPC protocols and file formats."
5HOMEPAGE = "http://code.google.com/p/protobuf/"
6SECTION = "console/tools"
7LICENSE = "BSD-3-Clause"
8
9LIC_FILES_CHKSUM = "file://COPYING.txt;md5=af6809583bfde9a31595a58bb4a24514"
10
11PR = "r0"
12
13SRC_URI[md5sum] = "b751f772bdeb2812a2a8e7202bf1dae8"
14SRC_URI[sha256sum] = "c55aa3dc538e6fd5eaf732f4eb6b98bdcb7cedb5b91d3b5bdcf29c98c293f58e"
15SRC_URI = "http://protobuf.googlecode.com/files/protobuf-${PV}.tar.gz \
16 file://protobuf-allow-running-python-scripts-from-anywhere.patch \
17 file://run-ptest"
18
19EXTRA_OECONF += " --with-protoc=${STAGING_BINDIR_NATIVE}/protoc"
20inherit autotools setuptools ptest
21
22DEPENDS += "protobuf-native"
23
24PYTHON_SRC_DIR="python"
25TEST_SRC_DIR="examples"
26LANG_SUPPORT="cpp python"
27
28do_compile() {
29 # Compile protoc compiler
30 base_do_compile
31}
32
33do_compile_ptest() {
34 # Modify makefile to use the cross-compiler
35 sed -e "s|c++|${CXX}|g" -i "${S}/${TEST_SRC_DIR}/Makefile"
36
37 mkdir -p "${B}/${TEST_SRC_DIR}"
38
39 # Add the location of the cross-compiled header and library files
40 # which haven't been installed yet.
41 cp "${B}/protobuf.pc" "${B}/${TEST_SRC_DIR}/protobuf.pc"
42 sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
43 sed -e 's|Cflags:|Cflags: -I${S}/src|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
44 sed -e 's|Libs:|Libs: -L${B}/src/.libs|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
45 export PKG_CONFIG_PATH="${B}/${TEST_SRC_DIR}"
46
47 # Save the pkgcfg sysroot variable, and update it to nothing so
48 # that it doesn't append the sysroot to the beginning of paths.
49 # The header and library files aren't installed to the target
50 # system yet. So the absolute paths were specified above.
51 save_pkg_config_sysroot_dir=$PKG_CONFIG_SYSROOT_DIR
52 export PKG_CONFIG_SYSROOT_DIR=
53
54 # Compile the tests
55 for lang in ${LANG_SUPPORT}; do
56 oe_runmake -C "${S}/${TEST_SRC_DIR}" ${lang}
57 done
58
59 # Restore the pkgconfig sysroot variable
60 export PKG_CONFIG_SYSROOT_DIR=$save_pkg_config_sysroot_dir
61}
62
63do_install() {
64 local olddir=`pwd`
65
66 # Install protoc compiler
67 autotools_do_install
68
69 # Install header files
70 export PROTOC="${STAGING_BINDIR_NATIVE}/protoc"
71 cd "${S}/${PYTHON_SRC_DIR}"
72 distutils_do_install
73
74 cd "$olddir"
75}
76
77do_install_ptest() {
78 local olddir=`pwd`
79
80 cd "${S}/${TEST_SRC_DIR}"
81 install -d "${D}/${PTEST_PATH}"
82 for i in add_person* list_people*; do
83 if [ -x "$i" ]; then
84 install "$i" "${D}/${PTEST_PATH}"
85 fi
86 done
87 cp "${S}/${TEST_SRC_DIR}/addressbook_pb2.py" "${D}/${PTEST_PATH}"
88
89 cd "$olddir"
90}
91
92BBCLASSEXTEND = "nativesdk"
93
diff --git a/recipes-containers/lxc/files/automake-ensure-VPATH-builds-correctly.patch b/recipes-containers/lxc/files/automake-ensure-VPATH-builds-correctly.patch
new file mode 100644
index 00000000..2b5c853c
--- /dev/null
+++ b/recipes-containers/lxc/files/automake-ensure-VPATH-builds-correctly.patch
@@ -0,0 +1,26 @@
1From fe23085d9a40d6d78387d9ce8ddb65785fe8d6e5 Mon Sep 17 00:00:00 2001
2From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
3Date: Thu, 2 Oct 2014 18:31:50 -0400
4Subject: [PATCH] automake: ensure VPATH builds correctly
5
6Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
7---
8 src/tests/Makefile.am | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
12index d74c10d..6225f78 100644
13--- a/src/tests/Makefile.am
14+++ b/src/tests/Makefile.am
15@@ -66,7 +66,7 @@ buildtest-TESTS: $(TESTS)
16 install-ptest:
17 install -d $(TEST_DIR)
18 install -D ../lxc/liblxc.so $(TEST_DIR)/../lxc/liblxc.so
19- install -D ../../config/test-driver $(TEST_DIR)/../../config/test-driver
20+ install -D $(top_srcdir)/config/test-driver $(TEST_DIR)/../../config/test-driver
21 cp Makefile $(TEST_DIR)
22 @(for file in $(TESTS); do install $$file $(TEST_DIR); done;)
23 sed -i 's|^Makefile:|_Makefile:|' $(TEST_DIR)/Makefile
24--
251.7.10.4
26
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/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.6.bb b/recipes-containers/lxc/lxc_1.0.6.bb
new file mode 100644
index 00000000..2d384dd6
--- /dev/null
+++ b/recipes-containers/lxc/lxc_1.0.6.bb
@@ -0,0 +1,80 @@
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"
6DEPENDS = "libxml2 libcap"
7RDEPENDS_${PN} = " \
8 rsync \
9 gzip \
10 libcap-bin \
11 bridge-utils \
12 dnsmasq \
13 perl-module-strict \
14 perl-module-getopt-long \
15 perl-module-vars \
16 perl-module-warnings-register \
17 perl-module-exporter \
18 perl-module-constant \
19 perl-module-overload \
20 perl-module-exporter-heavy \
21"
22RDEPENDS_${PN}-ptest += "file make"
23
24SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \
25 file://lxc-1.0.0-disable-udhcp-from-busybox-template.patch \
26 file://runtest.patch \
27 file://run-ptest \
28 file://automake-ensure-VPATH-builds-correctly.patch \
29 "
30SRC_URI[md5sum] = "4aad3aee84b42faa194e44091d723a3b"
31SRC_URI[sha256sum] = "fc6bffa750f00daaa92aa33d719c1cc235146aa779ebd2a64a0c24423977cf14"
32
33S = "${WORKDIR}/${BPN}-${PV}"
34
35# Let's not configure for the host distro.
36#
37PTEST_CONF = "${@base_contains('DISTRO_FEATURES', 'ptest', '--enable-tests', '', d)}"
38EXTRA_OECONF += "--with-distro=${DISTRO} ${PTEST_CONF}"
39
40PACKAGECONFIG ??= "templates"
41PACKAGECONFIG[doc] = "--enable-doc --enable-api-docs,--disable-doc --disable-api-docs,,"
42PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath,,"
43PACKAGECONFIG[apparmour] = "--enable-apparmor,--disable-apparmor,apparmor,apparmor"
44PACKAGECONFIG[templates] = ",,, ${PN}-templates"
45
46inherit autotools pkgconfig ptest
47
48FILES_${PN}-doc = "${mandir} ${infodir}"
49# For LXC the docdir only contains example configuration files and should be included in the lxc package
50FILES_${PN} += "${docdir}"
51FILES_${PN}-dbg += "${libexecdir}/lxc/.debug"
52PACKAGES =+ "${PN}-templates"
53FILES_${PN}-templates += "${datadir}/lxc/templates"
54RDEPENDS_${PN}-templates += "bash"
55
56PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1"
57
58do_install_append() {
59 # The /var/cache/lxc directory created by the Makefile
60 # is wiped out in volatile, we need to create this at boot.
61 rm -rf ${D}${localstatedir}/cache
62 install -d ${D}${sysconfdir}/default/volatiles
63 echo "d root root 0755 ${localstatedir}/cache/lxc none" \
64 > ${D}${sysconfdir}/default/volatiles/99_lxc
65
66 for i in `grep -l "#! */bin/bash" ${D}${datadir}/lxc/hooks/*`; do \
67 sed -e 's|#! */bin/bash|#!/bin/sh|' -i $i; done
68}
69
70EXTRA_OEMAKE += "TEST_DIR=${D}${PTEST_PATH}/src/tests"
71
72do_install_ptest() {
73 oe_runmake -C src/tests install-ptest
74}
75
76pkg_postinst_${PN}() {
77 if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
78 /etc/init.d/populate-volatile.sh update
79 fi
80}