diff options
4 files changed, 112 insertions, 1 deletions
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 @@ | |||
1 | From 261658e80014c031852a024f8794dd7f2a2351ad Mon Sep 17 00:00:00 2001 | ||
2 | From: Bogdan Purcareata <bogdan.purcareata@freescale.com> | ||
3 | Date: Fri, 28 Mar 2014 10:31:41 -0400 | ||
4 | Subject: [PATCH] config_network_type: set macvlan default mode to private | ||
5 | |||
6 | If a default mode is not set, the container requires an explicit | ||
7 | mode specified in the config file, otherwise creating the | ||
8 | container fails. | ||
9 | |||
10 | Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com> | ||
11 | Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> | ||
12 | --- | ||
13 | src/lxc/confile.c | 6 +++++- | ||
14 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/src/lxc/confile.c b/src/lxc/confile.c | ||
17 | index 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 | -- | ||
42 | 1.9.rc1 | ||
43 | |||
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 @@ | |||
1 | From 50dbb8209bf65e4d24ccd06d3ca05004d0ddc63c Mon Sep 17 00:00:00 2001 | ||
2 | From: Bogdan Purcareata <bogdan.purcareata@freescale.com> | ||
3 | Date: Mon, 24 Mar 2014 12:43:03 -0400 | ||
4 | Subject: [PATCH] lxc-busybox: follow symlinks when inspecting busybox binary | ||
5 | |||
6 | Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com> | ||
7 | Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> | ||
8 | --- | ||
9 | templates/lxc-busybox.in | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in | ||
13 | index 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 | -- | ||
26 | 1.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 @@ | |||
1 | From b343592b45c91db8c18e863fac5ab8eeb94445d6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bogdan Purcareata <bogdan.purcareata@freescale.com> | ||
3 | Date: Wed, 26 Mar 2014 11:35:09 -0400 | ||
4 | Subject: [PATCH] network.c: Add missing LXC_NET_NONE option + refactor | ||
5 | |||
6 | Add LXC_NET_NONE to known lxc_network_types, so parsing a config | ||
7 | file with lxc.network.type = none does not result in failure | ||
8 | (e.g. doc/examples/lxc-no-netns.conf). Options have also been | ||
9 | reordered to match the enum in conf.h. | ||
10 | |||
11 | Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com> | ||
12 | Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> | ||
13 | --- | ||
14 | src/lxc/network.c | 5 +++-- | ||
15 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/src/lxc/network.c b/src/lxc/network.c | ||
18 | index 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 | -- | ||
37 | 1.9.rc1 | ||
38 | |||
diff --git a/recipes-containers/lxc/lxc_1.0.0.bb b/recipes-containers/lxc/lxc_1.0.0.bb index 36ac78df..d5fc680a 100644 --- a/recipes-containers/lxc/lxc_1.0.0.bb +++ b/recipes-containers/lxc/lxc_1.0.0.bb | |||
@@ -3,7 +3,7 @@ SECTION = "console/utils" | |||
3 | LICENSE = "GPLv2" | 3 | LICENSE = "GPLv2" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" |
5 | PRIORITY = "optional" | 5 | PRIORITY = "optional" |
6 | PR = "r3" | 6 | PR = "r4" |
7 | DEPENDS = "libxml2 libcap" | 7 | DEPENDS = "libxml2 libcap" |
8 | RDEPENDS_${PN} = " \ | 8 | RDEPENDS_${PN} = " \ |
9 | rsync \ | 9 | rsync \ |
@@ -23,6 +23,9 @@ RDEPENDS_${PN} = " \ | |||
23 | 23 | ||
24 | SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \ | 24 | SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \ |
25 | file://lxc-1.0.0-disable-udhcp-from-busybox-template.patch \ | 25 | file://lxc-1.0.0-disable-udhcp-from-busybox-template.patch \ |
26 | file://config_network_type-set-macvlan-default-mode-to-priv.patch \ | ||
27 | file://lxc-busybox-follow-symlinks-when-inspecting-busybox-.patch \ | ||
28 | file://network.c-Add-missing-LXC_NET_NONE-option-refactor.patch \ | ||
26 | " | 29 | " |
27 | SRC_URI[md5sum] = "87a9d168a6e55326303cce3b2cb7f82e" | 30 | SRC_URI[md5sum] = "87a9d168a6e55326303cce3b2cb7f82e" |
28 | SRC_URI[sha256sum] = "0992212ddaad01dfe8c048e130566b73dd5f34191585f36bdac07a4f8a91f3bd" | 31 | SRC_URI[sha256sum] = "0992212ddaad01dfe8c048e130566b73dd5f34191585f36bdac07a4f8a91f3bd" |