From ddb59df2a039d1326122e3b0ed1a22fbf1c42a52 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Thu, 8 Oct 2015 22:53:03 +0200 Subject: initial commit for Enea Linux 5.0 arm Signed-off-by: Tudor Florea --- .../criu-1.2/0001-Makefile-Fix-hardcoding.patch | 42 ++++++++++ recipes-containers/criu/criu_1.2.bb | 39 +++++++++ recipes-containers/criu/criu_git.bb | 29 +++++++ .../criu/files/0001-Fixed-hardcoding.patch | 47 +++++++++++ recipes-containers/criu/files/disable_tests.patch | 19 +++++ ...llow-running-python-scripts-from-anywhere.patch | 38 +++++++++ recipes-containers/criu/files/run-ptest | 32 ++++++++ recipes-containers/criu/protobuf-c_0.15.bb | 20 +++++ recipes-containers/criu/protobuf-native_2.5.0.bb | 21 +++++ recipes-containers/criu/protobuf_2.5.0.bb | 93 ++++++++++++++++++++++ .../automake-ensure-VPATH-builds-correctly.patch | 26 ++++++ ...1.0.0-disable-udhcp-from-busybox-template.patch | 24 ++++++ recipes-containers/lxc/files/run-ptest | 4 + recipes-containers/lxc/files/runtest.patch | 32 ++++++++ recipes-containers/lxc/lxc_1.0.6.bb | 80 +++++++++++++++++++ 15 files changed, 546 insertions(+) create mode 100644 recipes-containers/criu/criu-1.2/0001-Makefile-Fix-hardcoding.patch create mode 100644 recipes-containers/criu/criu_1.2.bb create mode 100644 recipes-containers/criu/criu_git.bb create mode 100644 recipes-containers/criu/files/0001-Fixed-hardcoding.patch create mode 100644 recipes-containers/criu/files/disable_tests.patch create mode 100644 recipes-containers/criu/files/protobuf-allow-running-python-scripts-from-anywhere.patch create mode 100755 recipes-containers/criu/files/run-ptest create mode 100644 recipes-containers/criu/protobuf-c_0.15.bb create mode 100644 recipes-containers/criu/protobuf-native_2.5.0.bb create mode 100644 recipes-containers/criu/protobuf_2.5.0.bb create mode 100644 recipes-containers/lxc/files/automake-ensure-VPATH-builds-correctly.patch create mode 100644 recipes-containers/lxc/files/lxc-1.0.0-disable-udhcp-from-busybox-template.patch create mode 100644 recipes-containers/lxc/files/run-ptest create mode 100644 recipes-containers/lxc/files/runtest.patch create mode 100644 recipes-containers/lxc/lxc_1.0.6.bb (limited to 'recipes-containers') 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 @@ +From fa785bb1eb9cb0039d77836f4658c7bcccae5999 Mon Sep 17 00:00:00 2001 +From: Alexey Firago +Date: Wed, 9 Jul 2014 02:01:11 +0400 +Subject: [PATCH] Makefile: Fix hardcoding + +Signed-off-by: Alexey Firago +--- + Makefile | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/Makefile b/Makefile +index bda808d..4614ae2 100644 +--- a/Makefile ++++ b/Makefile +@@ -23,15 +23,15 @@ export VERSION_SO_MAJOR VERSION_SO_MINOR + # Common definitions + # + +-FIND := find +-CSCOPE := cscope +-RM := rm -f +-LD := $(CROSS_COMPILE)ld +-CC := $(CROSS_COMPILE)gcc +-NM := $(CROSS_COMPILE)nm +-SH := bash +-MAKE := make +-OBJCOPY := $(CROSS_COMPILE)objcopy ++FIND ?= find ++CSCOPE ?= cscope ++RM ?= rm -f ++LD ?= $(CROSS_COMPILE)ld ++CC ?= $(CROSS_COMPILE)gcc ++NM ?= $(CROSS_COMPILE)nm ++SH ?= bash ++MAKE ?= make ++OBJCOPY ?= $(CROSS_COMPILE)objcopy + + CFLAGS += $(USERCFLAGS) + +-- +1.9.1 + 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 @@ +SUMMARY = "CRIU" +DESCRIPTION = "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" +HOMEPAGE = "http://criu.org" +SECTION = "console/tools" +LICENSE = "GPLv2" + +LIC_FILES_CHKSUM = "file://COPYING;md5=5cc804625b8b491b6b4312f0c9cb5efa" + +SRCREV = "v1.2" +PR = "r0" +PV = "1.2" + +SRC_URI = "git://git.criu.org/crtools.git;protocol=git \ + file://0001-Makefile-Fix-hardcoding.patch" + +DEPENDS += "protobuf-c-native protobuf-c" + +S = "${WORKDIR}/git" + +ARMV_armv7a = "ARMV=7" +ARMV_armv6 = "ARMV=6" +ARMV ?= "" +EXTRA_OEMAKE += "ARCH=${TARGET_ARCH} WERROR=0 ${ARMV}" + +do_compile () { + unset CFLAGS + unset LDFLAGS + oe_runmake +} + +do_install () { + mkdir -p ${D}/${bindir} + install -m 755 ${S}/criu ${D}/${bindir}/criu +} 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 @@ +SUMMARY = "CRIU" +DESCRIPTION = "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" +HOMEPAGE = "http://criu.org" +SECTION = "console/tools" +LICENSE = "GPLv2" + +LIC_FILES_CHKSUM = "file://COPYING;md5=12920dfe6b35a0758155f0e62878b366" + +SRCREV = "d81c9a4618db2f618bdb8e207b7f0fec631c7142" +PR = "r0" +PV = "0.2+git${SRCPV}" + +SRC_URI = "git://git.criu.org/crtools.git;protocol=git \ + file://0001-Fixed-hardcoding.patch" + +DEPENDS += "protobuf-c-native protobuf-c" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE += "ARCH=${TARGET_ARCH} WERROR=0" + +do_compile () { + oe_runmake +} + +do_install () { + mkdir -p ${D}/${bindir} + install -m 755 ${S}/crtools ${D}/${bindir}/crtools +} \ 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 @@ +From 32c6c037a6de0a0972e16949ebb64ffebb5b7bcc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?David=20Nystr=C3=B6m?= +Date: Wed, 28 Nov 2012 15:07:27 +0100 +Subject: [PATCH] Fixed hardcoding + +--- + Makefile.inc | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +diff --git a/Makefile.inc b/Makefile.inc +index 722cbfc..3ae693e 100644 +--- a/Makefile.inc ++++ b/Makefile.inc +@@ -11,18 +11,18 @@ else + endif + export E Q + +-FIND := find +-CSCOPE := cscope +-TAGS := ctags +-RM := rm +-LD := ld +-HEXDUMP := hexdump +-CC := gcc +-ECHO := echo +-NM := nm +-AWK := awk +-SH := sh +-MAKE := make ++FIND ?= find ++CSCOPE ?= cscope ++TAGS ?= ctags ++RM ?= rm ++LD ?= ld ++HEXDUMP ?= hexdump ++CC ?= gcc ++ECHO ?= echo ++NM ?= nm ++AWK ?= awk ++SH ?= sh ++MAKE ?= make + + # Additional ARCH settings for x86 + ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ +-- +1.7.9.5 + 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 @@ +diff -Naur protobuf-c-0.15.old/src/Makefile.am protobuf-c-0.15/src/Makefile.am +--- protobuf-c-0.15.old/src/Makefile.am 2012-11-28 14:59:57.845251943 +0100 ++++ protobuf-c-0.15/src/Makefile.am 2012-11-28 15:00:23.549252632 +0100 +@@ -1,5 +1,5 @@ + if BUILD_PROTOC_C +-SUBDIRS = . test ++ + bin_PROGRAMS = protoc-c + protoc_c_SOURCES = \ + google/protobuf/compiler/c/c_service.cc \ +@@ -23,7 +23,7 @@ + lib_LTLIBRARIES = libprotobuf-c.la + protobufcincludedir = $(includedir)/google/protobuf-c + +-EXTRA_DIST = CMakeLists.txt test/CMakeLists.txt ++EXTRA_DIST = CMakeLists.txt + + libprotobuf_c_la_SOURCES = \ + 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 @@ +From 46e331263eb92e47510e88478b255f226d30245c Mon Sep 17 00:00:00 2001 +From: Keith Holman +Date: Mon, 18 Aug 2014 15:19:35 -0400 +Subject: [PATCH] protobuf: allow running python scripts from anywhere + +The Makefile to generate the examples with Google Protocol Buffers +generates some scripts for python. However, these generated scripts +only work if they are ran in the same directory as the source files. +This fix generates scripts to execute from anywhere on the system. + +Signed-off-by: Keith Holman +--- + examples/Makefile | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/examples/Makefile b/examples/Makefile +index 8dc9083..a993d63 100644 +--- a/examples/Makefile ++++ b/examples/Makefile +@@ -48,11 +48,13 @@ list_people_java: javac_middleman + add_person_python: add_person.py protoc_middleman + @echo "Writing shortcut script add_person_python..." + @echo '#! /bin/sh' > add_person_python +- @echo './add_person.py "$$@"' >> add_person_python ++ @echo 'SCRIPT_DIR=$$(dirname $$0)' >> add_person_python ++ @echo '$$SCRIPT_DIR/add_person.py "$$@"' >> add_person_python + @chmod +x add_person_python + + list_people_python: list_people.py protoc_middleman + @echo "Writing shortcut script list_people_python..." + @echo '#! /bin/sh' > list_people_python +- @echo './list_people.py "$$@"' >> list_people_python ++ @echo 'SCRIPT_DIR=$$(dirname $$0)' >> list_people_python ++ @echo '$$SCRIPT_DIR/list_people.py "$$@"' >> list_people_python + @chmod +x list_people_python +-- +1.9.3 + 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 @@ +#!/bin/bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +TEST_FILE="/tmp/test.data" + +RETVAL=0 +# Test every writing test application +for write_exe_full_path in ${DIR}/add_person_*; do + if [ -x "${write_exe_full_path}" ]; then + write_exe=`basename ${write_exe_full_path}` + echo "Generating new test file using ${write_exe}..." + ${write_exe_full_path} "${TEST_FILE}" + RETVAL=$? + + # Test every reading test application + for read_exe_full_path in ${DIR}/list_people_*; do + read_exe=`basename ${read_exe_full_path}` + echo "Test: Write with ${write_exe}; Read with ${read_exe}..." + if [ -x "${read_exe_full_path}" ]; then + ${read_exe_full_path} "${TEST_FILE}" + RETVAL=$? + fi + done + + # Cleanup... + if [ -e "${TEST_FILE}" ]; then + rm "${TEST_FILE}" + fi + fi +done + +exit $RETVAL + 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 @@ +SUMMARY = "protobuf-c" +DESCRIPTION = "This package provides a code generator and runtime libraries to use Protocol Buffers from pure C" +HOMEPAGE = "http://code.google.com/p/protobuf-c/" +SECTION = "console/tools" +LICENSE = "Apache-2.0" + +LIC_FILES_CHKSUM = "file://src/google/protobuf-c/protobuf-c.c;endline=33;md5=333140fae7cf8a38dc5f980ddb63704b" + +PR = "r0" + +DEPENDS = "protobuf" + +SRC_URI[md5sum] = "73ff0c8df50d2eee75269ad8f8c07dc8" +SRC_URI[sha256sum] = "8fcb538e13a5431c46168fc8f2e6ad2574e2db9b684c0c72b066e24f010a0036" +SRC_URI = "http://protobuf-c.googlecode.com/files/protobuf-c-${PV}.tar.gz \ + file://disable_tests.patch" + +inherit autotools + +BBCLASSEXTEND = "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 @@ +SUMMARY = "protobuf" +DESCRIPTION = "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." +HOMEPAGE = "http://code.google.com/p/protobuf/" +SECTION = "console/tools" +LICENSE = "BSD-3-Clause" + +LIC_FILES_CHKSUM = "file://COPYING.txt;md5=af6809583bfde9a31595a58bb4a24514" + +PR = "r0" + +SRC_URI[md5sum] = "b751f772bdeb2812a2a8e7202bf1dae8" +SRC_URI[sha256sum] = "c55aa3dc538e6fd5eaf732f4eb6b98bdcb7cedb5b91d3b5bdcf29c98c293f58e" +SRC_URI = "http://protobuf.googlecode.com/files/protobuf-${PV}.tar.gz \ + " + +EXTRA_OECONF += " --with-protoc=echo --disable-shared" + +inherit native autotools + 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 @@ +SUMMARY = "protobuf" +DESCRIPTION = "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." +HOMEPAGE = "http://code.google.com/p/protobuf/" +SECTION = "console/tools" +LICENSE = "BSD-3-Clause" + +LIC_FILES_CHKSUM = "file://COPYING.txt;md5=af6809583bfde9a31595a58bb4a24514" + +PR = "r0" + +SRC_URI[md5sum] = "b751f772bdeb2812a2a8e7202bf1dae8" +SRC_URI[sha256sum] = "c55aa3dc538e6fd5eaf732f4eb6b98bdcb7cedb5b91d3b5bdcf29c98c293f58e" +SRC_URI = "http://protobuf.googlecode.com/files/protobuf-${PV}.tar.gz \ + file://protobuf-allow-running-python-scripts-from-anywhere.patch \ + file://run-ptest" + +EXTRA_OECONF += " --with-protoc=${STAGING_BINDIR_NATIVE}/protoc" +inherit autotools setuptools ptest + +DEPENDS += "protobuf-native" + +PYTHON_SRC_DIR="python" +TEST_SRC_DIR="examples" +LANG_SUPPORT="cpp python" + +do_compile() { + # Compile protoc compiler + base_do_compile +} + +do_compile_ptest() { + # Modify makefile to use the cross-compiler + sed -e "s|c++|${CXX}|g" -i "${S}/${TEST_SRC_DIR}/Makefile" + + mkdir -p "${B}/${TEST_SRC_DIR}" + + # Add the location of the cross-compiled header and library files + # which haven't been installed yet. + cp "${B}/protobuf.pc" "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Cflags:|Cflags: -I${S}/src|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -L${B}/src/.libs|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + export PKG_CONFIG_PATH="${B}/${TEST_SRC_DIR}" + + # Save the pkgcfg sysroot variable, and update it to nothing so + # that it doesn't append the sysroot to the beginning of paths. + # The header and library files aren't installed to the target + # system yet. So the absolute paths were specified above. + save_pkg_config_sysroot_dir=$PKG_CONFIG_SYSROOT_DIR + export PKG_CONFIG_SYSROOT_DIR= + + # Compile the tests + for lang in ${LANG_SUPPORT}; do + oe_runmake -C "${S}/${TEST_SRC_DIR}" ${lang} + done + + # Restore the pkgconfig sysroot variable + export PKG_CONFIG_SYSROOT_DIR=$save_pkg_config_sysroot_dir +} + +do_install() { + local olddir=`pwd` + + # Install protoc compiler + autotools_do_install + + # Install header files + export PROTOC="${STAGING_BINDIR_NATIVE}/protoc" + cd "${S}/${PYTHON_SRC_DIR}" + distutils_do_install + + cd "$olddir" +} + +do_install_ptest() { + local olddir=`pwd` + + cd "${S}/${TEST_SRC_DIR}" + install -d "${D}/${PTEST_PATH}" + for i in add_person* list_people*; do + if [ -x "$i" ]; then + install "$i" "${D}/${PTEST_PATH}" + fi + done + cp "${S}/${TEST_SRC_DIR}/addressbook_pb2.py" "${D}/${PTEST_PATH}" + + cd "$olddir" +} + +BBCLASSEXTEND = "nativesdk" + 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 @@ +From fe23085d9a40d6d78387d9ce8ddb65785fe8d6e5 Mon Sep 17 00:00:00 2001 +From: Bogdan Purcareata +Date: Thu, 2 Oct 2014 18:31:50 -0400 +Subject: [PATCH] automake: ensure VPATH builds correctly + +Signed-off-by: Bogdan Purcareata +--- + src/tests/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am +index d74c10d..6225f78 100644 +--- a/src/tests/Makefile.am ++++ b/src/tests/Makefile.am +@@ -66,7 +66,7 @@ buildtest-TESTS: $(TESTS) + install-ptest: + install -d $(TEST_DIR) + install -D ../lxc/liblxc.so $(TEST_DIR)/../lxc/liblxc.so +- install -D ../../config/test-driver $(TEST_DIR)/../../config/test-driver ++ install -D $(top_srcdir)/config/test-driver $(TEST_DIR)/../../config/test-driver + cp Makefile $(TEST_DIR) + @(for file in $(TESTS); do install $$file $(TEST_DIR); done;) + sed -i 's|^Makefile:|_Makefile:|' $(TEST_DIR)/Makefile +-- +1.7.10.4 + 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 @@ +From d7e07e7acb1cbad33806f49143a2a30b4468c369 Mon Sep 17 00:00:00 2001 +From: Bogdan Purcareata +Date: Mon, 8 Apr 2013 18:30:19 +0300 +Subject: [PATCH] lxc-0.9.0-disable-udhcp-from-busybox-template + +--- + templates/lxc-busybox.in | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in +index cb425ec..bb8c951 100644 +--- a/templates/lxc-busybox.in ++++ b/templates/lxc-busybox.in +@@ -84,7 +84,6 @@ EOF + #!/bin/sh + /bin/syslogd + /bin/mount -a +-/bin/udhcpc + EOF + + # executable +-- +1.7.11.7 + 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 @@ +#!/bin/sh + +make -C src/tests -k check-TESTS + 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 @@ +Add install-ptest rule. + +Signed-off-by: Mihaela Sendrea +Upstream-status: Pending + +diff -uNr a/src/tests/Makefile.am b/src/tests/Makefile.am +--- a/src/tests/Makefile.am 2014-04-07 16:25:59.246238815 +0300 ++++ b/src/tests/Makefile.am 2014-04-10 18:09:43.195772467 +0300 +@@ -54,6 +54,23 @@ + + endif + ++TESTS = lxc-test-containertests lxc-test-locktests \ ++ lxc-test-getkeys lxc-test-lxcpath lxc-test-cgpath lxc-test-console \ ++ lxc-test-snapshot lxc-test-concurrent lxc-test-may-control \ ++ lxc-test-reboot lxc-test-list lxc-test-attach lxc-test-device-add-remove ++ ++buildtest-TESTS: $(TESTS) ++ ++install-ptest: ++ install -d $(TEST_DIR) ++ install -D ../lxc/liblxc.so $(TEST_DIR)/../lxc/liblxc.so ++ install -D ../../config/test-driver $(TEST_DIR)/../../config/test-driver ++ cp Makefile $(TEST_DIR) ++ @(for file in $(TESTS); do install $$file $(TEST_DIR); done;) ++ sed -i 's|^Makefile:|_Makefile:|' $(TEST_DIR)/Makefile ++ sed -i 's|^all-am:|_all-am:|' $(TEST_DIR)/Makefile ++ sed -i -e 's|^\(.*\.log:\) \(.*EXEEXT.*\)|\1|g' $(TEST_DIR)/Makefile ++ + EXTRA_DIST = \ + cgpath.c \ + 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 @@ +DESCRIPTION = "lxc aims to use these new functionnalities to provide an userspace container object" +SECTION = "console/utils" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" +PRIORITY = "optional" +DEPENDS = "libxml2 libcap" +RDEPENDS_${PN} = " \ + rsync \ + gzip \ + libcap-bin \ + bridge-utils \ + dnsmasq \ + perl-module-strict \ + perl-module-getopt-long \ + perl-module-vars \ + perl-module-warnings-register \ + perl-module-exporter \ + perl-module-constant \ + perl-module-overload \ + perl-module-exporter-heavy \ +" +RDEPENDS_${PN}-ptest += "file make" + +SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \ + file://lxc-1.0.0-disable-udhcp-from-busybox-template.patch \ + file://runtest.patch \ + file://run-ptest \ + file://automake-ensure-VPATH-builds-correctly.patch \ + " +SRC_URI[md5sum] = "4aad3aee84b42faa194e44091d723a3b" +SRC_URI[sha256sum] = "fc6bffa750f00daaa92aa33d719c1cc235146aa779ebd2a64a0c24423977cf14" + +S = "${WORKDIR}/${BPN}-${PV}" + +# Let's not configure for the host distro. +# +PTEST_CONF = "${@base_contains('DISTRO_FEATURES', 'ptest', '--enable-tests', '', d)}" +EXTRA_OECONF += "--with-distro=${DISTRO} ${PTEST_CONF}" + +PACKAGECONFIG ??= "templates" +PACKAGECONFIG[doc] = "--enable-doc --enable-api-docs,--disable-doc --disable-api-docs,," +PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath,," +PACKAGECONFIG[apparmour] = "--enable-apparmor,--disable-apparmor,apparmor,apparmor" +PACKAGECONFIG[templates] = ",,, ${PN}-templates" + +inherit autotools pkgconfig ptest + +FILES_${PN}-doc = "${mandir} ${infodir}" +# For LXC the docdir only contains example configuration files and should be included in the lxc package +FILES_${PN} += "${docdir}" +FILES_${PN}-dbg += "${libexecdir}/lxc/.debug" +PACKAGES =+ "${PN}-templates" +FILES_${PN}-templates += "${datadir}/lxc/templates" +RDEPENDS_${PN}-templates += "bash" + +PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1" + +do_install_append() { + # The /var/cache/lxc directory created by the Makefile + # is wiped out in volatile, we need to create this at boot. + rm -rf ${D}${localstatedir}/cache + install -d ${D}${sysconfdir}/default/volatiles + echo "d root root 0755 ${localstatedir}/cache/lxc none" \ + > ${D}${sysconfdir}/default/volatiles/99_lxc + + for i in `grep -l "#! */bin/bash" ${D}${datadir}/lxc/hooks/*`; do \ + sed -e 's|#! */bin/bash|#!/bin/sh|' -i $i; done +} + +EXTRA_OEMAKE += "TEST_DIR=${D}${PTEST_PATH}/src/tests" + +do_install_ptest() { + oe_runmake -C src/tests install-ptest +} + +pkg_postinst_${PN}() { + if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then + /etc/init.d/populate-volatile.sh update + fi +} -- cgit v1.2.3-54-g00ecf