diff options
4 files changed, 125 insertions, 0 deletions
diff --git a/recipes-containers/lxc/files/lxc-busybox-Remove-warning-for-dynamically-linked-Bu.patch b/recipes-containers/lxc/files/lxc-busybox-Remove-warning-for-dynamically-linked-Bu.patch new file mode 100644 index 00000000..c0a810b1 --- /dev/null +++ b/recipes-containers/lxc/files/lxc-busybox-Remove-warning-for-dynamically-linked-Bu.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 07e4c41f2963d73b9aedd552c74f17a33e89f020 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bogdan Purcareata <bogdan.purcareata@nxp.com> | ||
3 | Date: Thu, 24 Mar 2016 11:54:27 +0000 | ||
4 | Subject: [PATCH] lxc-busybox: Remove warning for dynamically linked Busybox | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | The warning has been present since commit 32b37181ea (with no purpose stated). | ||
10 | Support for dynamically linked Busybox has been added since commit bf6cc73696. | ||
11 | Haven't encountered any issues with dynamically linked Busybox in my last | ||
12 | 2 years' testing. | ||
13 | |||
14 | Upstream-status: Accepted | ||
15 | [https://github.com/lxc/lxc/commit/07e4c41f2963d73b9aedd552c74f17a33e89f020] | ||
16 | |||
17 | Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> | ||
18 | Acked-by: Stéphane Graber <stgraber@ubuntu.com> | ||
19 | --- | ||
20 | templates/lxc-busybox.in | 7 ------- | ||
21 | 1 file changed, 7 deletions(-) | ||
22 | |||
23 | diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in | ||
24 | index f547f9e..336fa12 100644 | ||
25 | --- a/templates/lxc-busybox.in | ||
26 | +++ b/templates/lxc-busybox.in | ||
27 | @@ -304,13 +304,6 @@ configure_busybox() | ||
28 | return 1 | ||
29 | fi | ||
30 | |||
31 | - file -L $(which busybox) | grep -q "statically linked" | ||
32 | - if [ $? -ne 0 ]; then | ||
33 | - echo "warning : busybox is not statically linked." | ||
34 | - echo "warning : The template script may not correctly" | ||
35 | - echo "warning : setup the container environment." | ||
36 | - fi | ||
37 | - | ||
38 | # copy busybox in the rootfs | ||
39 | cp $(which busybox) $rootfs/bin | ||
40 | if [ $? -ne 0 ]; then | ||
41 | -- | ||
42 | 1.9.1 | ||
43 | |||
diff --git a/recipes-containers/lxc/files/lxc-busybox-Touch-etc-fstab-in-the-container-rootfs.patch b/recipes-containers/lxc/files/lxc-busybox-Touch-etc-fstab-in-the-container-rootfs.patch new file mode 100644 index 00000000..33862ddc --- /dev/null +++ b/recipes-containers/lxc/files/lxc-busybox-Touch-etc-fstab-in-the-container-rootfs.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 6ab1ca0375feeb00070f0c0f9186551b08b1ee5e Mon Sep 17 00:00:00 2001 | ||
2 | From: Bogdan Purcareata <bogdan.purcareata@nxp.com> | ||
3 | Date: Tue, 22 Mar 2016 13:33:57 +0000 | ||
4 | Subject: [PATCH] lxc-busybox: Touch /etc/fstab in the container rootfs | ||
5 | |||
6 | Upstream-status: Accepted | ||
7 | [https://github.com/lxc/lxc/commit/6ab1ca0375feeb00070f0c0f9186551b08b1ee5e] | ||
8 | |||
9 | Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> | ||
10 | --- | ||
11 | templates/lxc-busybox.in | 3 +++ | ||
12 | 1 file changed, 3 insertions(+) | ||
13 | |||
14 | diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in | ||
15 | index c020e66..f547f9e 100644 | ||
16 | --- a/templates/lxc-busybox.in | ||
17 | +++ b/templates/lxc-busybox.in | ||
18 | @@ -330,6 +330,9 @@ configure_busybox() | ||
19 | # relink /sbin/init | ||
20 | ln $rootfs/bin/busybox $rootfs/sbin/init | ||
21 | |||
22 | + # /etc/fstab must exist for "mount -a" | ||
23 | + touch $rootfs/etc/fstab | ||
24 | + | ||
25 | # passwd exec must be setuid | ||
26 | chmod +s $rootfs/bin/passwd | ||
27 | touch $rootfs/etc/shadow | ||
28 | -- | ||
29 | 1.9.1 | ||
30 | |||
diff --git a/recipes-containers/lxc/files/open_without_symlink-Don-t-SYSERROR-on-something-els.patch b/recipes-containers/lxc/files/open_without_symlink-Don-t-SYSERROR-on-something-els.patch new file mode 100644 index 00000000..098ead7e --- /dev/null +++ b/recipes-containers/lxc/files/open_without_symlink-Don-t-SYSERROR-on-something-els.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From 88e078ba865b675f9a0dc61caa0732d7052593f8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Christian Brauner <christian.brauner@mailbox.org> | ||
3 | Date: Wed, 23 Mar 2016 16:37:09 +0100 | ||
4 | Subject: [PATCH] open_without_symlink: Don't SYSERROR on something else than | ||
5 | ELOOP | ||
6 | |||
7 | The open_without_symlink routine has been specifically created to prevent | ||
8 | mounts with synlinks as source or destination. Keep SYSERROR'ing in that | ||
9 | particular scenario, but leave error handling to calling functions for the | ||
10 | other ones - e.g. optional bind mount when the source dir doesn't exist | ||
11 | throws a nasty error. | ||
12 | |||
13 | Upstream-status: Accepted | ||
14 | [https://github.com/lxc/lxc/commit/88e078ba865b675f9a0dc61caa0732d7052593f8] | ||
15 | |||
16 | Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> | ||
17 | --- | ||
18 | src/lxc/utils.c | 7 ++++--- | ||
19 | 1 file changed, 4 insertions(+), 3 deletions(-) | ||
20 | |||
21 | diff --git a/src/lxc/utils.c b/src/lxc/utils.c | ||
22 | index 6bee698..8e7ebbc 100644 | ||
23 | --- a/src/lxc/utils.c | ||
24 | +++ b/src/lxc/utils.c | ||
25 | @@ -1621,8 +1621,6 @@ static int open_without_symlink(const char *target, const char *prefix_skip) | ||
26 | errno = saved_errno; | ||
27 | if (errno == ELOOP) | ||
28 | SYSERROR("%s in %s was a symbolic link!", nextpath, target); | ||
29 | - else | ||
30 | - SYSERROR("Error examining %s in %s", nextpath, target); | ||
31 | goto out; | ||
32 | } | ||
33 | } | ||
34 | @@ -1667,8 +1665,11 @@ int safe_mount(const char *src, const char *dest, const char *fstype, | ||
35 | |||
36 | destfd = open_without_symlink(dest, rootfs); | ||
37 | if (destfd < 0) { | ||
38 | - if (srcfd != -1) | ||
39 | + if (srcfd != -1) { | ||
40 | + saved_errno = errno; | ||
41 | close(srcfd); | ||
42 | + errno = saved_errno; | ||
43 | + } | ||
44 | return destfd; | ||
45 | } | ||
46 | |||
47 | -- | ||
48 | 1.9.1 | ||
49 | |||
diff --git a/recipes-containers/lxc/lxc_1.1.4.bb b/recipes-containers/lxc/lxc_1.1.4.bb index a4c44d22..fe7eb34a 100644 --- a/recipes-containers/lxc/lxc_1.1.4.bb +++ b/recipes-containers/lxc/lxc_1.1.4.bb | |||
@@ -37,6 +37,9 @@ SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \ | |||
37 | file://open_without_symlink-Account-when-prefix-is-empty-st.patch \ | 37 | file://open_without_symlink-Account-when-prefix-is-empty-st.patch \ |
38 | file://lxc_setup_fs-Create-dev-shm-folder-if-it-doesn-t-exi.patch \ | 38 | file://lxc_setup_fs-Create-dev-shm-folder-if-it-doesn-t-exi.patch \ |
39 | file://mount_proc_if_needed-only-safe-mount-when-rootfs-is-.patch \ | 39 | file://mount_proc_if_needed-only-safe-mount-when-rootfs-is-.patch \ |
40 | file://open_without_symlink-Don-t-SYSERROR-on-something-els.patch \ | ||
41 | file://lxc-busybox-Touch-etc-fstab-in-the-container-rootfs.patch \ | ||
42 | file://lxc-busybox-Remove-warning-for-dynamically-linked-Bu.patch \ | ||
40 | " | 43 | " |
41 | 44 | ||
42 | SRC_URI[md5sum] = "d33c4bd9c57755c0e2b0e2acbc3f171d" | 45 | SRC_URI[md5sum] = "d33c4bd9c57755c0e2b0e2acbc3f171d" |