diff options
4 files changed, 14 insertions, 183 deletions
diff --git a/recipes-containers/lxc/files/0001-lxc-test-usernic-drop-cgroup-handling.patch b/recipes-containers/lxc/files/0001-lxc-test-usernic-drop-cgroup-handling.patch deleted file mode 100644 index 162e8f9d..00000000 --- a/recipes-containers/lxc/files/0001-lxc-test-usernic-drop-cgroup-handling.patch +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | From ec85e5ca4953292c4341497704ce738669a79b64 Mon Sep 17 00:00:00 2001 | ||
2 | From: Serge Hallyn <serge@hallyn.com> | ||
3 | Date: Fri, 2 Feb 2024 10:41:11 -0600 | ||
4 | Subject: [PATCH] lxc-test-usernic: drop cgroup handling | ||
5 | |||
6 | This stuff is not needed in a modern systemd based system, and in fact | ||
7 | breaks. It would probably be better to detect such a system so that a | ||
8 | non-systemd box can still run this test. But I'm not sure what would be | ||
9 | reliable. | ||
10 | |||
11 | Upstream-Status: Backport from | ||
12 | [https://github.com/lxc/lxc/commit/ec85e5ca4953292c4341497704ce738669a79b64] | ||
13 | |||
14 | Signed-off-by: Serge Hallyn <serge@hallyn.com> | ||
15 | Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> | ||
16 | --- | ||
17 | src/tests/lxc-test-usernic.in | 28 ---------------------------- | ||
18 | 1 file changed, 28 deletions(-) | ||
19 | |||
20 | diff --git a/src/tests/lxc-test-usernic.in b/src/tests/lxc-test-usernic.in | ||
21 | index 9af8678f3..49fd5e3f7 100755 | ||
22 | --- a/src/tests/lxc-test-usernic.in | ||
23 | +++ b/src/tests/lxc-test-usernic.in | ||
24 | @@ -80,34 +80,6 @@ lxc.idmap = u 0 910000 10000 | ||
25 | lxc.idmap = g 0 910000 10000 | ||
26 | EOF | ||
27 | |||
28 | -if command -v cgm >/dev/null 2>&1; then | ||
29 | - cgm create all usernic-user | ||
30 | - cgm chown all usernic-user $(id -u usernic-user) $(id -g usernic-user) | ||
31 | - cgm movepid all usernic-user $$ | ||
32 | -elif [ -e /sys/fs/cgroup/cgmanager/sock ]; then | ||
33 | - for d in $(cut -d : -f 2 /proc/self/cgroup); do | ||
34 | - dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock \ | ||
35 | - --type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.Create \ | ||
36 | - string:$d string:usernic-user >/dev/null | ||
37 | - | ||
38 | - dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock \ | ||
39 | - --type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.Chown \ | ||
40 | - string:$d string:usernic-user int32:$(id -u usernic-user) int32:$(id -g usernic-user) >/dev/null | ||
41 | - | ||
42 | - dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock \ | ||
43 | - --type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.MovePid \ | ||
44 | - string:$d string:usernic-user int32:$$ >/dev/null | ||
45 | - done | ||
46 | -else | ||
47 | - for d in /sys/fs/cgroup/*; do | ||
48 | - [ "$d" = "/sys/fs/cgroup/unified" ] && continue | ||
49 | - [ -f $d/cgroup.clone_children ] && echo 1 > $d/cgroup.clone_children | ||
50 | - [ ! -d $d/lxctest ] && mkdir $d/lxctest | ||
51 | - chown -R usernic-user: $d/lxctest | ||
52 | - echo $$ > $d/lxctest/tasks | ||
53 | - done | ||
54 | -fi | ||
55 | - | ||
56 | mkdir -p /run/user/$(id -u usernic-user) | ||
57 | chown -R usernic-user: /run/user/$(id -u usernic-user) /home/usernic-user | ||
58 | |||
59 | -- | ||
60 | 2.35.5 | ||
61 | |||
diff --git a/recipes-containers/lxc/files/0001-tests-remove-old-and-broken-cgroup-handling-code-fro.patch b/recipes-containers/lxc/files/0001-tests-remove-old-and-broken-cgroup-handling-code-fro.patch deleted file mode 100644 index bf8df795..00000000 --- a/recipes-containers/lxc/files/0001-tests-remove-old-and-broken-cgroup-handling-code-fro.patch +++ /dev/null | |||
@@ -1,103 +0,0 @@ | |||
1 | From 8f9733d756361ff8f8d8d589f286c0e064b1195d Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> | ||
3 | Date: Thu, 15 Feb 2024 18:13:05 +0100 | ||
4 | Subject: [PATCH] tests: remove old and broken cgroup handling code from tests | ||
5 | |||
6 | We have removed the same piece of code in | ||
7 | ec85e5ca495 ("lxc-test-usernic: drop cgroup handling") | ||
8 | let's do the same for two other tests. | ||
9 | |||
10 | This fixes autopkgtests. | ||
11 | |||
12 | Upstream-Status: Backport from | ||
13 | [https://github.com/lxc/lxc/commit/8f9733d756361ff8f8d8d589f286c0e064b1195d] | ||
14 | |||
15 | Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> | ||
16 | Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> | ||
17 | --- | ||
18 | src/tests/lxc-test-apparmor-mount | 29 ----------------------------- | ||
19 | src/tests/lxc-test-unpriv | 28 ---------------------------- | ||
20 | 2 files changed, 57 deletions(-) | ||
21 | |||
22 | diff --git a/src/tests/lxc-test-apparmor-mount b/src/tests/lxc-test-apparmor-mount | ||
23 | index 7c9d9ad50..ddf783d4b 100755 | ||
24 | --- a/src/tests/lxc-test-apparmor-mount | ||
25 | +++ b/src/tests/lxc-test-apparmor-mount | ||
26 | @@ -119,35 +119,6 @@ chown -R $TUSER: /run/user/$(id -u $TUSER) | ||
27 | |||
28 | cd $HDIR | ||
29 | |||
30 | -if command -v cgm >/dev/null 2>&1; then | ||
31 | - cgm create all $TUSER | ||
32 | - cgm chown all $TUSER $(id -u $TUSER) $(id -g $TUSER) | ||
33 | - cgm movepid all $TUSER $$ | ||
34 | -elif [ -e /sys/fs/cgroup/cgmanager/sock ]; then | ||
35 | - for d in $(cut -d : -f 2 /proc/self/cgroup); do | ||
36 | - dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock \ | ||
37 | - --type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.Create \ | ||
38 | - string:$d string:$TUSER >/dev/null | ||
39 | - | ||
40 | - dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock \ | ||
41 | - --type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.Chown \ | ||
42 | - string:$d string:$TUSER int32:$(id -u $TUSER) int32:$(id -g $TUSER) >/dev/null | ||
43 | - | ||
44 | - dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock \ | ||
45 | - --type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.MovePid \ | ||
46 | - string:$d string:$TUSER int32:$$ >/dev/null | ||
47 | - done | ||
48 | -else | ||
49 | - for d in /sys/fs/cgroup/*; do | ||
50 | - [ "$d" = "/sys/fs/cgroup/unified" ] && continue | ||
51 | - [ -f $d/cgroup.clone_children ] && echo 1 > $d/cgroup.clone_children | ||
52 | - [ ! -d $d/lxctest ] && mkdir $d/lxctest | ||
53 | - chown -R $TUSER: $d/lxctest | ||
54 | - echo $$ > $d/lxctest/tasks | ||
55 | - done | ||
56 | -fi | ||
57 | - | ||
58 | - | ||
59 | run_cmd lxc-create -t busybox -n $cname | ||
60 | |||
61 | echo "test default confined container" | ||
62 | diff --git a/src/tests/lxc-test-unpriv b/src/tests/lxc-test-unpriv | ||
63 | index 8fb9106d6..426add9da 100755 | ||
64 | --- a/src/tests/lxc-test-unpriv | ||
65 | +++ b/src/tests/lxc-test-unpriv | ||
66 | @@ -130,34 +130,6 @@ chown -R $TUSER: /run/user/$(id -u $TUSER) | ||
67 | |||
68 | cd $HDIR | ||
69 | |||
70 | -if command -v cgm >/dev/null 2>&1; then | ||
71 | - cgm create all $TUSER | ||
72 | - cgm chown all $TUSER $(id -u $TUSER) $(id -g $TUSER) | ||
73 | - cgm movepid all $TUSER $$ | ||
74 | -elif [ -e /sys/fs/cgroup/cgmanager/sock ]; then | ||
75 | - for d in $(cut -d : -f 2 /proc/self/cgroup); do | ||
76 | - dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock \ | ||
77 | - --type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.Create \ | ||
78 | - string:$d string:$TUSER >/dev/null | ||
79 | - | ||
80 | - dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock \ | ||
81 | - --type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.Chown \ | ||
82 | - string:$d string:$TUSER int32:$(id -u $TUSER) int32:$(id -g $TUSER) >/dev/null | ||
83 | - | ||
84 | - dbus-send --print-reply --address=unix:path=/sys/fs/cgroup/cgmanager/sock \ | ||
85 | - --type=method_call /org/linuxcontainers/cgmanager org.linuxcontainers.cgmanager0_0.MovePid \ | ||
86 | - string:$d string:$TUSER int32:$$ >/dev/null | ||
87 | - done | ||
88 | -else | ||
89 | - for d in /sys/fs/cgroup/*; do | ||
90 | - [ "$d" = "/sys/fs/cgroup/unified" ] && continue | ||
91 | - [ -f $d/cgroup.clone_children ] && echo 1 > $d/cgroup.clone_children | ||
92 | - [ ! -d $d/lxctest ] && mkdir $d/lxctest | ||
93 | - chown -R $TUSER: $d/lxctest | ||
94 | - echo $$ > $d/lxctest/tasks | ||
95 | - done | ||
96 | -fi | ||
97 | - | ||
98 | run_cmd lxc-create -t busybox -n c1 -l trace -o "${UNPRIV_LOG}" | ||
99 | |||
100 | # Make sure we can start it - twice | ||
101 | -- | ||
102 | 2.35.5 | ||
103 | |||
diff --git a/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch b/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch index e9af8335..76704bb3 100644 --- a/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch +++ b/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch | |||
@@ -14,11 +14,11 @@ Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | |||
14 | templates/lxc-download.in | 8 ++++---- | 14 | templates/lxc-download.in | 8 ++++---- |
15 | 1 file changed, 4 insertions(+), 4 deletions(-) | 15 | 1 file changed, 4 insertions(+), 4 deletions(-) |
16 | 16 | ||
17 | diff --git a/templates/lxc-download.in b/templates/lxc-download.in | 17 | Index: git/templates/lxc-download.in |
18 | index a62ddf482..690307338 100755 | 18 | =================================================================== |
19 | --- a/templates/lxc-download.in | 19 | --- git.orig/templates/lxc-download.in |
20 | +++ b/templates/lxc-download.in | 20 | +++ git/templates/lxc-download.in |
21 | @@ -59,9 +59,9 @@ cleanup() { | 21 | @@ -45,9 +45,9 @@ |
22 | fi | 22 | fi |
23 | } | 23 | } |
24 | 24 | ||
@@ -30,16 +30,16 @@ index a62ddf482..690307338 100755 | |||
30 | return 0 | 30 | return 0 |
31 | fi | 31 | fi |
32 | done | 32 | done |
33 | @@ -70,7 +70,7 @@ wget_wrapper() { | 33 | @@ -59,7 +59,7 @@ |
34 | } | 34 | if [ "${DOWNLOAD_VERBOSE}" = "true" ]; then |
35 | 35 | echo "Download file: https://${DOWNLOAD_SERVER}$1" | |
36 | download_file() { | 36 | fi |
37 | - if ! wget_wrapper --user-agent="lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -T 30 -q "https://${DOWNLOAD_SERVER}/$1" -O "$2" >/dev/null 2>&1; then | 37 | - if ! wget_wrapper --user-agent="lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -T 30 -q "https://${DOWNLOAD_SERVER}/$1" -O "$2" >/dev/null 2>&1; then |
38 | + if ! curl_wrapper -L --user-agent "lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -m 30 -s "https://${DOWNLOAD_SERVER}/$1" -o "$2" >/dev/null 2>&1; then | 38 | + if ! curl_wrapper -L --user-agent "lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -m 30 -s "https://${DOWNLOAD_SERVER}/$1" -o "$2" >/dev/null 2>&1; then |
39 | if [ "$3" = "noexit" ]; then | 39 | if [ "$3" = "noexit" ]; then |
40 | return 1 | 40 | return 1 |
41 | else | 41 | else |
42 | @@ -176,7 +176,7 @@ while :; do | 42 | @@ -167,7 +167,7 @@ |
43 | done | 43 | done |
44 | 44 | ||
45 | # Check for required binaries | 45 | # Check for required binaries |
@@ -48,6 +48,3 @@ index a62ddf482..690307338 100755 | |||
48 | if ! command -V "${bin}" >/dev/null 2>&1; then | 48 | if ! command -V "${bin}" >/dev/null 2>&1; then |
49 | echo "ERROR: Missing required tool: ${bin}" 1>&2 | 49 | echo "ERROR: Missing required tool: ${bin}" 1>&2 |
50 | exit 1 | 50 | exit 1 |
51 | -- | ||
52 | 2.25.1 | ||
53 | |||
diff --git a/recipes-containers/lxc/lxc_git.bb b/recipes-containers/lxc/lxc_git.bb index 550f910e..09d5a05e 100644 --- a/recipes-containers/lxc/lxc_git.bb +++ b/recipes-containers/lxc/lxc_git.bb | |||
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c | |||
5 | file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ | 5 | file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ |
6 | " | 6 | " |
7 | 7 | ||
8 | DEPENDS = "libxml2 libcap" | 8 | DEPENDS = "libxml2 libcap dbus" |
9 | RDEPENDS:${PN} = " \ | 9 | RDEPENDS:${PN} = " \ |
10 | rsync \ | 10 | rsync \ |
11 | curl \ | 11 | curl \ |
@@ -36,7 +36,7 @@ RDEPENDS:${PN}-ptest += "file make gmp nettle gnutls bash libgcc" | |||
36 | 36 | ||
37 | RDEPENDS:${PN}-networking += "iptables" | 37 | RDEPENDS:${PN}-networking += "iptables" |
38 | 38 | ||
39 | SRC_URI = "git://github.com/lxc/lxc.git;branch=stable-5.0;protocol=https \ | 39 | SRC_URI = "git://github.com/lxc/lxc.git;branch=stable-6.0;protocol=https \ |
40 | file://lxc-1.0.0-disable-udhcp-from-busybox-template.patch \ | 40 | file://lxc-1.0.0-disable-udhcp-from-busybox-template.patch \ |
41 | file://run-ptest \ | 41 | file://run-ptest \ |
42 | file://templates-actually-create-DOWNLOAD_TEMP-directory.patch \ | 42 | file://templates-actually-create-DOWNLOAD_TEMP-directory.patch \ |
@@ -47,12 +47,10 @@ SRC_URI = "git://github.com/lxc/lxc.git;branch=stable-5.0;protocol=https \ | |||
47 | file://0001-template-if-busybox-contains-init-use-it-in-containe.patch \ | 47 | file://0001-template-if-busybox-contains-init-use-it-in-containe.patch \ |
48 | file://dnsmasq.conf \ | 48 | file://dnsmasq.conf \ |
49 | file://lxc-net \ | 49 | file://lxc-net \ |
50 | file://0001-lxc-test-usernic-drop-cgroup-handling.patch \ | ||
51 | file://0001-tests-remove-old-and-broken-cgroup-handling-code-fro.patch \ | ||
52 | " | 50 | " |
53 | 51 | ||
54 | SRCREV = "cb8e38aca27a23964941f0f011a8919aab8bebab" | 52 | SRCREV = "3dee5fb88c6f77496dbcab46f31bcd891c9ee4e0" |
55 | PV = "5.0.3+git" | 53 | PV = "6.0.0+git" |
56 | 54 | ||
57 | S = "${WORKDIR}/git" | 55 | S = "${WORKDIR}/git" |
58 | 56 | ||