summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-containers/lxc/files/lxc-busybox-Remove-warning-for-dynamically-linked-Bu.patch43
-rw-r--r--recipes-containers/lxc/files/lxc-busybox-Touch-etc-fstab-in-the-container-rootfs.patch30
-rw-r--r--recipes-containers/lxc/files/open_without_symlink-Don-t-SYSERROR-on-something-els.patch49
-rw-r--r--recipes-containers/lxc/lxc_1.1.4.bb3
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 @@
1From 07e4c41f2963d73b9aedd552c74f17a33e89f020 Mon Sep 17 00:00:00 2001
2From: Bogdan Purcareata <bogdan.purcareata@nxp.com>
3Date: Thu, 24 Mar 2016 11:54:27 +0000
4Subject: [PATCH] lxc-busybox: Remove warning for dynamically linked Busybox
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9The warning has been present since commit 32b37181ea (with no purpose stated).
10Support for dynamically linked Busybox has been added since commit bf6cc73696.
11Haven't encountered any issues with dynamically linked Busybox in my last
122 years' testing.
13
14Upstream-status: Accepted
15[https://github.com/lxc/lxc/commit/07e4c41f2963d73b9aedd552c74f17a33e89f020]
16
17Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
18Acked-by: Stéphane Graber <stgraber@ubuntu.com>
19---
20 templates/lxc-busybox.in | 7 -------
21 1 file changed, 7 deletions(-)
22
23diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in
24index 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--
421.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 @@
1From 6ab1ca0375feeb00070f0c0f9186551b08b1ee5e Mon Sep 17 00:00:00 2001
2From: Bogdan Purcareata <bogdan.purcareata@nxp.com>
3Date: Tue, 22 Mar 2016 13:33:57 +0000
4Subject: [PATCH] lxc-busybox: Touch /etc/fstab in the container rootfs
5
6Upstream-status: Accepted
7[https://github.com/lxc/lxc/commit/6ab1ca0375feeb00070f0c0f9186551b08b1ee5e]
8
9Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
10---
11 templates/lxc-busybox.in | 3 +++
12 1 file changed, 3 insertions(+)
13
14diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in
15index 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--
291.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 @@
1From 88e078ba865b675f9a0dc61caa0732d7052593f8 Mon Sep 17 00:00:00 2001
2From: Christian Brauner <christian.brauner@mailbox.org>
3Date: Wed, 23 Mar 2016 16:37:09 +0100
4Subject: [PATCH] open_without_symlink: Don't SYSERROR on something else than
5 ELOOP
6
7The open_without_symlink routine has been specifically created to prevent
8mounts with synlinks as source or destination. Keep SYSERROR'ing in that
9particular scenario, but leave error handling to calling functions for the
10other ones - e.g. optional bind mount when the source dir doesn't exist
11throws a nasty error.
12
13Upstream-status: Accepted
14[https://github.com/lxc/lxc/commit/88e078ba865b675f9a0dc61caa0732d7052593f8]
15
16Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
17---
18 src/lxc/utils.c | 7 ++++---
19 1 file changed, 4 insertions(+), 3 deletions(-)
20
21diff --git a/src/lxc/utils.c b/src/lxc/utils.c
22index 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--
481.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
42SRC_URI[md5sum] = "d33c4bd9c57755c0e2b0e2acbc3f171d" 45SRC_URI[md5sum] = "d33c4bd9c57755c0e2b0e2acbc3f171d"