From 7605c820e49b4312f593095c17c5466845b7d9f4 Mon Sep 17 00:00:00 2001 From: "Maxin B. John" Date: Tue, 29 Jul 2014 14:46:02 +0200 Subject: lxc: Uprev to 1.0.5 Update lxc to latest available version: 1.0.5 Remove already upstreamed patches. Signed-off-by: Maxin B. John Signed-off-by: Bruce Ashfield --- ...ork_type-set-macvlan-default-mode-to-priv.patch | 43 ------------ ...-follow-symlinks-when-inspecting-busybox-.patch | 27 -------- ...-Add-missing-LXC_NET_NONE-option-refactor.patch | 38 ----------- recipes-containers/lxc/lxc_1.0.1.bb | 79 ---------------------- recipes-containers/lxc/lxc_1.0.5.bb | 74 ++++++++++++++++++++ 5 files changed, 74 insertions(+), 187 deletions(-) delete mode 100644 recipes-containers/lxc/files/config_network_type-set-macvlan-default-mode-to-priv.patch delete mode 100644 recipes-containers/lxc/files/lxc-busybox-follow-symlinks-when-inspecting-busybox-.patch delete mode 100644 recipes-containers/lxc/files/network.c-Add-missing-LXC_NET_NONE-option-refactor.patch delete mode 100644 recipes-containers/lxc/lxc_1.0.1.bb create mode 100644 recipes-containers/lxc/lxc_1.0.5.bb 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 deleted file mode 100644 index 8cb321bb..00000000 --- a/recipes-containers/lxc/files/config_network_type-set-macvlan-default-mode-to-priv.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 261658e80014c031852a024f8794dd7f2a2351ad Mon Sep 17 00:00:00 2001 -From: Bogdan Purcareata -Date: Fri, 28 Mar 2014 10:31:41 -0400 -Subject: [PATCH] config_network_type: set macvlan default mode to private - -If a default mode is not set, the container requires an explicit -mode specified in the config file, otherwise creating the -container fails. - -Signed-off-by: Bogdan Purcareata -Signed-off-by: Serge Hallyn ---- - src/lxc/confile.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/lxc/confile.c b/src/lxc/confile.c -index d6cf151..90fb344 100644 ---- a/src/lxc/confile.c -+++ b/src/lxc/confile.c -@@ -303,6 +303,8 @@ out: - return ret; - } - -+static int macvlan_mode(int *valuep, const char *value); -+ - static int config_network_type(const char *key, const char *value, - struct lxc_conf *lxc_conf) - { -@@ -337,8 +339,10 @@ static int config_network_type(const char *key, const char *value, - - if (!strcmp(value, "veth")) - netdev->type = LXC_NET_VETH; -- else if (!strcmp(value, "macvlan")) -+ else if (!strcmp(value, "macvlan")) { - netdev->type = LXC_NET_MACVLAN; -+ macvlan_mode(&netdev->priv.macvlan_attr.mode, "private"); -+ } - else if (!strcmp(value, "vlan")) - netdev->type = LXC_NET_VLAN; - else if (!strcmp(value, "phys")) --- -1.9.rc1 - 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 deleted file mode 100644 index 6882c16e..00000000 --- a/recipes-containers/lxc/files/lxc-busybox-follow-symlinks-when-inspecting-busybox-.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 50dbb8209bf65e4d24ccd06d3ca05004d0ddc63c Mon Sep 17 00:00:00 2001 -From: Bogdan Purcareata -Date: Mon, 24 Mar 2014 12:43:03 -0400 -Subject: [PATCH] lxc-busybox: follow symlinks when inspecting busybox binary - -Signed-off-by: Bogdan Purcareata -Signed-off-by: Serge Hallyn ---- - templates/lxc-busybox.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in -index e5a512a..246e743 100644 ---- a/templates/lxc-busybox.in -+++ b/templates/lxc-busybox.in -@@ -187,7 +187,7 @@ configure_busybox() - return 1 - fi - -- file $(which busybox) | grep -q "statically linked" -+ file -L $(which busybox) | grep -q "statically linked" - if [ $? -ne 0 ]; then - echo "warning : busybox is not statically linked." - echo "warning : The template script may not correctly" --- -1.9.rc1 - 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 deleted file mode 100644 index 81fde835..00000000 --- a/recipes-containers/lxc/files/network.c-Add-missing-LXC_NET_NONE-option-refactor.patch +++ /dev/null @@ -1,38 +0,0 @@ -From b343592b45c91db8c18e863fac5ab8eeb94445d6 Mon Sep 17 00:00:00 2001 -From: Bogdan Purcareata -Date: Wed, 26 Mar 2014 11:35:09 -0400 -Subject: [PATCH] network.c: Add missing LXC_NET_NONE option + refactor - -Add LXC_NET_NONE to known lxc_network_types, so parsing a config -file with lxc.network.type = none does not result in failure -(e.g. doc/examples/lxc-no-netns.conf). Options have also been -reordered to match the enum in conf.h. - -Signed-off-by: Bogdan Purcareata -Signed-off-by: Serge Hallyn ---- - src/lxc/network.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/lxc/network.c b/src/lxc/network.c -index 090b9bd..a9900de 100644 ---- a/src/lxc/network.c -+++ b/src/lxc/network.c -@@ -1202,11 +1202,12 @@ int lxc_bridge_attach(const char *bridge, const char *ifname) - } - - static const char* const lxc_network_types[LXC_NET_MAXCONFTYPE + 1] = { -+ [LXC_NET_EMPTY] = "empty", - [LXC_NET_VETH] = "veth", - [LXC_NET_MACVLAN] = "macvlan", -- [LXC_NET_VLAN] = "vlan", - [LXC_NET_PHYS] = "phys", -- [LXC_NET_EMPTY] = "empty", -+ [LXC_NET_VLAN] = "vlan", -+ [LXC_NET_NONE] = "none", - }; - - const char *lxc_net_type_to_str(int type) --- -1.9.rc1 - diff --git a/recipes-containers/lxc/lxc_1.0.1.bb b/recipes-containers/lxc/lxc_1.0.1.bb deleted file mode 100644 index 4ef80d66..00000000 --- a/recipes-containers/lxc/lxc_1.0.1.bb +++ /dev/null @@ -1,79 +0,0 @@ -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" -PR = "r4" -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://config_network_type-set-macvlan-default-mode-to-priv.patch \ - file://lxc-busybox-follow-symlinks-when-inspecting-busybox-.patch \ - file://network.c-Add-missing-LXC_NET_NONE-option-refactor.patch \ - file://runtest.patch \ - file://run-ptest \ - file://automake-ensure-VPATH-builds-work-correctly.patch \ - " -SRC_URI[md5sum] = "3c7379891e45713817ec873a167070b0" -SRC_URI[sha256sum] = "17d8e5b575207b4fb57da0b8ba2d13f3e5ee20ce8ccd1259d6eae4bd5ca575b1" - -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 ??= "" -PACKAGECONFIG[doc] = "--enable-doc,--disable-doc,," -PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath,," -PACKAGECONFIG[apparmour] = "--enable-apparmor,--disable-apparmor,apparmor,apparmor" - -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" - -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 - -} - -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 -} - diff --git a/recipes-containers/lxc/lxc_1.0.5.bb b/recipes-containers/lxc/lxc_1.0.5.bb new file mode 100644 index 00000000..bea1ad08 --- /dev/null +++ b/recipes-containers/lxc/lxc_1.0.5.bb @@ -0,0 +1,74 @@ +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-work-correctly.patch \ + " +SRC_URI[md5sum] = "9d9af9e9e69a831cd50b58d91c786013" +SRC_URI[sha256sum] = "02ac82e69a76d424e5443b9c577e84a8eaafcebf17cfd865eedee147e8ef8844" + +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 ??= "" +PACKAGECONFIG[doc] = "--enable-doc,--disable-doc,," +PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath,," +PACKAGECONFIG[apparmour] = "--enable-apparmor,--disable-apparmor,apparmor,apparmor" + +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" + +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 + +} + +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