diff options
-rw-r--r-- | recipes-containers/lxc/files/Generate-lxc-restore-net-properly.patch | 121 | ||||
-rw-r--r-- | recipes-containers/lxc/files/Use-AC_HEADER_MAJOR-to-detect-major-minor-makedev.patch | 119 | ||||
-rw-r--r-- | recipes-containers/lxc/files/automake-ensure-VPATH-builds-correctly.patch | 2 | ||||
-rw-r--r-- | recipes-containers/lxc/files/runtest.patch | 2 | ||||
-rw-r--r-- | recipes-containers/lxc/lxc_2.0.8.bb (renamed from recipes-containers/lxc/lxc_2.0.0.bb) | 31 |
5 files changed, 15 insertions, 260 deletions
diff --git a/recipes-containers/lxc/files/Generate-lxc-restore-net-properly.patch b/recipes-containers/lxc/files/Generate-lxc-restore-net-properly.patch deleted file mode 100644 index 5adb730c..00000000 --- a/recipes-containers/lxc/files/Generate-lxc-restore-net-properly.patch +++ /dev/null | |||
@@ -1,121 +0,0 @@ | |||
1 | From e08f3573b3561f1f0490624f7ca95b7ccd8157cb Mon Sep 17 00:00:00 2001 | ||
2 | Message-Id: <e08f3573b3561f1f0490624f7ca95b7ccd8157cb.1435177418.git.Jim.Somerville@windriver.com> | ||
3 | From: Jim Somerville <Jim.Somerville@windriver.com> | ||
4 | Date: Wed, 24 Jun 2015 16:16:38 -0400 | ||
5 | Subject: [PATCH 1/1] Generate lxc-restore-net properly | ||
6 | |||
7 | It's a script that should be run through the configure | ||
8 | mechanism the same as the others. We simply rename it | ||
9 | to have a .in extension and add it to configure.ac . | ||
10 | |||
11 | Also, by generating the script from a .in file, it gets | ||
12 | placed into the build directory. This plays nice with | ||
13 | build systems that keep the src separate from the build | ||
14 | directory. Without this change, the install step won't | ||
15 | find the lxc-restore-net script as it still just resides | ||
16 | in the src directory and not in the build directory. | ||
17 | |||
18 | Upstream-Status: Not applicable. This script has already | ||
19 | been rearchitected out of existence by | ||
20 | cba98d127bf490b018a016b792ae05fd2d29c5ee: | ||
21 | "c/r: use criu option instead of lxc-restore-net | ||
22 | |||
23 | As of criu 1.5, the --veth-pair argument supports an additional parameter that | ||
24 | is the bridge name to attach to. This enables us to get rid of the goofy | ||
25 | action-script hack that passed bridge names as environment variables. | ||
26 | |||
27 | This patch is on top of the systemd/lxcfs mount rework patch, as we probably | ||
28 | want to wait to use 1.5 options until it has been out for a while and is in | ||
29 | distros. | ||
30 | |||
31 | Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com> | ||
32 | Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>" | ||
33 | |||
34 | Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com> | ||
35 | --- | ||
36 | configure.ac | 1 + | ||
37 | src/lxc/lxc-restore-net | 26 -------------------------- | ||
38 | src/lxc/lxc-restore-net.in | 26 ++++++++++++++++++++++++++ | ||
39 | 3 files changed, 27 insertions(+), 26 deletions(-) | ||
40 | delete mode 100755 src/lxc/lxc-restore-net | ||
41 | create mode 100755 src/lxc/lxc-restore-net.in | ||
42 | |||
43 | diff --git a/configure.ac b/configure.ac | ||
44 | index 574b2cd..4972803 100644 | ||
45 | --- a/configure.ac | ||
46 | +++ b/configure.ac | ||
47 | @@ -768,6 +768,7 @@ AC_CONFIG_FILES([ | ||
48 | src/lxc/legacy/lxc-ls | ||
49 | src/lxc/lxc.functions | ||
50 | src/lxc/version.h | ||
51 | + src/lxc/lxc-restore-net | ||
52 | src/python-lxc/Makefile | ||
53 | src/python-lxc/setup.py | ||
54 | |||
55 | diff --git a/src/lxc/lxc-restore-net b/src/lxc/lxc-restore-net | ||
56 | deleted file mode 100755 | ||
57 | index 6ae3c19..0000000 | ||
58 | --- a/src/lxc/lxc-restore-net | ||
59 | +++ /dev/null | ||
60 | @@ -1,26 +0,0 @@ | ||
61 | -#!/bin/sh | ||
62 | - | ||
63 | -set -e | ||
64 | - | ||
65 | -i=0 | ||
66 | -while true; do | ||
67 | - eval "bridge=\$LXC_CRIU_BRIDGE$i" | ||
68 | - eval "veth=\$LXC_CRIU_VETH$i" | ||
69 | - | ||
70 | - if [ -z "$bridge" ] || [ -z "$veth" ]; then | ||
71 | - exit 0 | ||
72 | - fi | ||
73 | - | ||
74 | - if [ "$CRTOOLS_SCRIPT_ACTION" = "network-lock" ]; then | ||
75 | - brctl delif $bridge $veth | ||
76 | - fi | ||
77 | - | ||
78 | - if [ "$CRTOOLS_SCRIPT_ACTION" = "network-unlock" ]; then | ||
79 | - brctl addif $bridge $veth | ||
80 | - ip link set dev $veth up | ||
81 | - fi | ||
82 | - | ||
83 | - i=$((i+1)) | ||
84 | -done | ||
85 | - | ||
86 | -exit 1 | ||
87 | diff --git a/src/lxc/lxc-restore-net.in b/src/lxc/lxc-restore-net.in | ||
88 | new file mode 100755 | ||
89 | index 0000000..6ae3c19 | ||
90 | --- /dev/null | ||
91 | +++ b/src/lxc/lxc-restore-net.in | ||
92 | @@ -0,0 +1,26 @@ | ||
93 | +#!/bin/sh | ||
94 | + | ||
95 | +set -e | ||
96 | + | ||
97 | +i=0 | ||
98 | +while true; do | ||
99 | + eval "bridge=\$LXC_CRIU_BRIDGE$i" | ||
100 | + eval "veth=\$LXC_CRIU_VETH$i" | ||
101 | + | ||
102 | + if [ -z "$bridge" ] || [ -z "$veth" ]; then | ||
103 | + exit 0 | ||
104 | + fi | ||
105 | + | ||
106 | + if [ "$CRTOOLS_SCRIPT_ACTION" = "network-lock" ]; then | ||
107 | + brctl delif $bridge $veth | ||
108 | + fi | ||
109 | + | ||
110 | + if [ "$CRTOOLS_SCRIPT_ACTION" = "network-unlock" ]; then | ||
111 | + brctl addif $bridge $veth | ||
112 | + ip link set dev $veth up | ||
113 | + fi | ||
114 | + | ||
115 | + i=$((i+1)) | ||
116 | +done | ||
117 | + | ||
118 | +exit 1 | ||
119 | -- | ||
120 | 1.8.3.2 | ||
121 | |||
diff --git a/recipes-containers/lxc/files/Use-AC_HEADER_MAJOR-to-detect-major-minor-makedev.patch b/recipes-containers/lxc/files/Use-AC_HEADER_MAJOR-to-detect-major-minor-makedev.patch deleted file mode 100644 index f9cecc07..00000000 --- a/recipes-containers/lxc/files/Use-AC_HEADER_MAJOR-to-detect-major-minor-makedev.patch +++ /dev/null | |||
@@ -1,119 +0,0 @@ | |||
1 | From 5c957671a511441b112b137b88bf0b1f31adac20 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sergei Trofimovich <siarheit@google.com> | ||
3 | Date: Sat, 21 Jan 2017 11:57:13 +0000 | ||
4 | Subject: [PATCH] Use AC_HEADER_MAJOR to detect major()/minor()/makedev() | ||
5 | |||
6 | commit af6824fce9c9536fbcabef8d5547f6c486f55fdf from | ||
7 | git://github.com/lxc/lxc.git | ||
8 | |||
9 | Before the change build failed on Gentoo as: | ||
10 | |||
11 | bdev/lxclvm.c: In function 'lvm_detect': | ||
12 | bdev/lxclvm.c:140:4: error: implicit declaration of function 'major' [-Werror=implicit-function-declaration] | ||
13 | major(statbuf.st_rdev), minor(statbuf.st_rdev)); | ||
14 | ^~~~~ | ||
15 | bdev/lxclvm.c:140:28: error: implicit declaration of function 'minor' [-Werror=implicit-function-declaration] | ||
16 | major(statbuf.st_rdev), minor(statbuf.st_rdev)); | ||
17 | ^~~~~ | ||
18 | |||
19 | glibc plans to remove <sys/sysmacros.h> from glibc's <sys/types.h>: | ||
20 | https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html | ||
21 | |||
22 | Gentoo already applied glibc patch to experimental glibc-2.24 | ||
23 | to start preparingfor the change. | ||
24 | |||
25 | Autoconf has AC_HEADER_MAJOR to find out which header defines | ||
26 | reqiured macros: | ||
27 | https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Particular-Headers.html | ||
28 | |||
29 | This change should also increase portability across other libcs. | ||
30 | |||
31 | Bug: https://bugs.gentoo.org/604360 | ||
32 | Signed-off-by: Sergei Trofimovich <siarheit@google.com> | ||
33 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
34 | --- | ||
35 | configure.ac | 3 +++ | ||
36 | src/lxc/bdev/lxclvm.c | 9 +++++++++ | ||
37 | src/lxc/conf.c | 8 ++++++++ | ||
38 | src/lxc/lxccontainer.c | 8 ++++++++ | ||
39 | 4 files changed, 28 insertions(+) | ||
40 | |||
41 | diff --git a/configure.ac b/configure.ac | ||
42 | index 8f31c29..924baa1 100644 | ||
43 | --- a/configure.ac | ||
44 | +++ b/configure.ac | ||
45 | @@ -601,6 +601,9 @@ AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>]) | ||
46 | # Check for some headers | ||
47 | AC_CHECK_HEADERS([sys/signalfd.h pty.h ifaddrs.h sys/capability.h sys/personality.h utmpx.h sys/timerfd.h]) | ||
48 | |||
49 | +# lookup major()/minor()/makedev() | ||
50 | +AC_HEADER_MAJOR | ||
51 | + | ||
52 | # Check for some syscalls functions | ||
53 | AC_CHECK_FUNCS([setns pivot_root sethostname unshare rand_r confstr faccessat]) | ||
54 | |||
55 | diff --git a/src/lxc/bdev/lxclvm.c b/src/lxc/bdev/lxclvm.c | ||
56 | index 3d41b10..419d1c2 100644 | ||
57 | --- a/src/lxc/bdev/lxclvm.c | ||
58 | +++ b/src/lxc/bdev/lxclvm.c | ||
59 | @@ -32,10 +32,19 @@ | ||
60 | #include <sys/wait.h> | ||
61 | |||
62 | #include "bdev.h" | ||
63 | +#include "config.h" | ||
64 | #include "log.h" | ||
65 | #include "lxclvm.h" | ||
66 | #include "utils.h" | ||
67 | |||
68 | +/* major()/minor() */ | ||
69 | +#ifdef MAJOR_IN_MKDEV | ||
70 | +# include <sys/mkdev.h> | ||
71 | +#endif | ||
72 | +#ifdef MAJOR_IN_SYSMACROS | ||
73 | +# include <sys/sysmacros.h> | ||
74 | +#endif | ||
75 | + | ||
76 | lxc_log_define(lxclvm, lxc); | ||
77 | |||
78 | extern char *dir_new_path(char *src, const char *oldname, const char *name, | ||
79 | diff --git a/src/lxc/conf.c b/src/lxc/conf.c | ||
80 | index 3b023ef..53406ca 100644 | ||
81 | --- a/src/lxc/conf.c | ||
82 | +++ b/src/lxc/conf.c | ||
83 | @@ -39,6 +39,14 @@ | ||
84 | #include <grp.h> | ||
85 | #include <time.h> | ||
86 | |||
87 | +/* makedev() */ | ||
88 | +#ifdef MAJOR_IN_MKDEV | ||
89 | +# include <sys/mkdev.h> | ||
90 | +#endif | ||
91 | +#ifdef MAJOR_IN_SYSMACROS | ||
92 | +# include <sys/sysmacros.h> | ||
93 | +#endif | ||
94 | + | ||
95 | #ifdef HAVE_STATVFS | ||
96 | #include <sys/statvfs.h> | ||
97 | #endif | ||
98 | diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c | ||
99 | index 9f12ca2..aa02833 100644 | ||
100 | --- a/src/lxc/lxccontainer.c | ||
101 | +++ b/src/lxc/lxccontainer.c | ||
102 | @@ -61,6 +61,14 @@ | ||
103 | #include "utils.h" | ||
104 | #include "version.h" | ||
105 | |||
106 | +/* major()/minor() */ | ||
107 | +#ifdef MAJOR_IN_MKDEV | ||
108 | +# include <sys/mkdev.h> | ||
109 | +#endif | ||
110 | +#ifdef MAJOR_IN_SYSMACROS | ||
111 | +# include <sys/sysmacros.h> | ||
112 | +#endif | ||
113 | + | ||
114 | #if HAVE_IFADDRS_H | ||
115 | #include <ifaddrs.h> | ||
116 | #else | ||
117 | -- | ||
118 | 2.7.4 | ||
119 | |||
diff --git a/recipes-containers/lxc/files/automake-ensure-VPATH-builds-correctly.patch b/recipes-containers/lxc/files/automake-ensure-VPATH-builds-correctly.patch index 2b5c853c..61c0e293 100644 --- a/recipes-containers/lxc/files/automake-ensure-VPATH-builds-correctly.patch +++ b/recipes-containers/lxc/files/automake-ensure-VPATH-builds-correctly.patch | |||
@@ -15,7 +15,7 @@ index d74c10d..6225f78 100644 | |||
15 | @@ -66,7 +66,7 @@ buildtest-TESTS: $(TESTS) | 15 | @@ -66,7 +66,7 @@ buildtest-TESTS: $(TESTS) |
16 | install-ptest: | 16 | install-ptest: |
17 | install -d $(TEST_DIR) | 17 | install -d $(TEST_DIR) |
18 | install -D ../lxc/liblxc.so $(TEST_DIR)/../lxc/liblxc.so | 18 | install -D ../lxc/.libs/liblxc.so $(TEST_DIR)/../lxc/liblxc.so |
19 | - install -D ../../config/test-driver $(TEST_DIR)/../../config/test-driver | 19 | - install -D ../../config/test-driver $(TEST_DIR)/../../config/test-driver |
20 | + install -D $(top_srcdir)/config/test-driver $(TEST_DIR)/../../config/test-driver | 20 | + install -D $(top_srcdir)/config/test-driver $(TEST_DIR)/../../config/test-driver |
21 | cp Makefile $(TEST_DIR) | 21 | cp Makefile $(TEST_DIR) |
diff --git a/recipes-containers/lxc/files/runtest.patch b/recipes-containers/lxc/files/runtest.patch index e4e034b2..6572265f 100644 --- a/recipes-containers/lxc/files/runtest.patch +++ b/recipes-containers/lxc/files/runtest.patch | |||
@@ -19,7 +19,7 @@ diff -uNr a/src/tests/Makefile.am b/src/tests/Makefile.am | |||
19 | + | 19 | + |
20 | +install-ptest: | 20 | +install-ptest: |
21 | + install -d $(TEST_DIR) | 21 | + install -d $(TEST_DIR) |
22 | + install -D ../lxc/liblxc.so $(TEST_DIR)/../lxc/liblxc.so | 22 | + install -D ../lxc/.libs/liblxc.so $(TEST_DIR)/../lxc/liblxc.so |
23 | + install -D ../../config/test-driver $(TEST_DIR)/../../config/test-driver | 23 | + install -D ../../config/test-driver $(TEST_DIR)/../../config/test-driver |
24 | + cp Makefile $(TEST_DIR) | 24 | + cp Makefile $(TEST_DIR) |
25 | + @(for file in $(TESTS); do install $$file $(TEST_DIR); done;) | 25 | + @(for file in $(TESTS); do install $$file $(TEST_DIR); done;) |
diff --git a/recipes-containers/lxc/lxc_2.0.0.bb b/recipes-containers/lxc/lxc_2.0.8.bb index c98d1a7f..80c8da73 100644 --- a/recipes-containers/lxc/lxc_2.0.0.bb +++ b/recipes-containers/lxc/lxc_2.0.8.bb | |||
@@ -2,7 +2,6 @@ DESCRIPTION = "lxc aims to use these new functionnalities to provide an userspac | |||
2 | SECTION = "console/utils" | 2 | 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" | ||
6 | DEPENDS = "libxml2 libcap" | 5 | DEPENDS = "libxml2 libcap" |
7 | RDEPENDS_${PN} = " \ | 6 | RDEPENDS_${PN} = " \ |
8 | rsync \ | 7 | rsync \ |
@@ -10,7 +9,6 @@ RDEPENDS_${PN} = " \ | |||
10 | libcap-bin \ | 9 | libcap-bin \ |
11 | bridge-utils \ | 10 | bridge-utils \ |
12 | dnsmasq \ | 11 | dnsmasq \ |
13 | initscripts \ | ||
14 | perl-module-strict \ | 12 | perl-module-strict \ |
15 | perl-module-getopt-long \ | 13 | perl-module-getopt-long \ |
16 | perl-module-vars \ | 14 | perl-module-vars \ |
@@ -20,11 +18,7 @@ RDEPENDS_${PN} = " \ | |||
20 | perl-module-overload \ | 18 | perl-module-overload \ |
21 | perl-module-exporter-heavy \ | 19 | perl-module-exporter-heavy \ |
22 | " | 20 | " |
23 | RDEPENDS_${PN}_append_libc-glibc = "\ | 21 | RDEPENDS_${PN}-ptest += "file make gmp nettle gnutls" |
24 | glibc-utils \ | ||
25 | " | ||
26 | |||
27 | RDEPENDS_${PN}-ptest += "file make" | ||
28 | 22 | ||
29 | SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \ | 23 | SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \ |
30 | file://lxc-1.0.0-disable-udhcp-from-busybox-template.patch \ | 24 | file://lxc-1.0.0-disable-udhcp-from-busybox-template.patch \ |
@@ -34,11 +28,10 @@ SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \ | |||
34 | file://lxc-fix-B-S.patch \ | 28 | file://lxc-fix-B-S.patch \ |
35 | file://lxc-doc-upgrade-to-use-docbook-3.1-DTD.patch \ | 29 | file://lxc-doc-upgrade-to-use-docbook-3.1-DTD.patch \ |
36 | file://logs-optionally-use-base-filenames-to-report-src-fil.patch \ | 30 | file://logs-optionally-use-base-filenames-to-report-src-fil.patch \ |
37 | file://Use-AC_HEADER_MAJOR-to-detect-major-minor-makedev.patch \ | ||
38 | " | 31 | " |
39 | 32 | ||
40 | SRC_URI[md5sum] = "04a7245a614cd3296b0ae9ceeeb83fbb" | 33 | SRC_URI[md5sum] = "7bfd95280522d7936c0979dfea92cdb5" |
41 | SRC_URI[sha256sum] = "5b737e114d8ef1feb193fba936d77a5697a7c8a10199a068cdd90d1bd27c10e4" | 34 | SRC_URI[sha256sum] = "0d8e34b302cfe4c40c6c9ae5097096aa5cc2c1dfceea3f0f22e3e16c4a4e8494" |
42 | 35 | ||
43 | S = "${WORKDIR}/${BPN}-${PV}" | 36 | S = "${WORKDIR}/${BPN}-${PV}" |
44 | 37 | ||
@@ -87,19 +80,21 @@ FILES_${PN}-doc = "${mandir} ${infodir}" | |||
87 | # For LXC the docdir only contains example configuration files and should be included in the lxc package | 80 | # For LXC the docdir only contains example configuration files and should be included in the lxc package |
88 | FILES_${PN} += "${docdir}" | 81 | FILES_${PN} += "${docdir}" |
89 | FILES_${PN} += "${libdir}/python3*" | 82 | FILES_${PN} += "${libdir}/python3*" |
90 | FILES_${PN} += "${datadir}/lua/*" | 83 | FILES_${PN} += "${datadir}/bash-completion" |
91 | FILES_${PN} += "${libdir}/lua/lxc/*" | 84 | FILES_${PN}-dbg += "${libexecdir}/lxc/.debug" |
92 | FILES_${PN}-dbg += "${libdir}/lua/lxc/.debug" | 85 | FILES_${PN}-dbg += "${libexecdir}/lxc/hooks/.debug" |
93 | FILES_${PN}-dbg += "${libexecdir}/lxc/.debug ${libexecdir}/lxc/hooks/.debug" | 86 | PACKAGES =+ "${PN}-templates ${PN}-setup ${PN}-networking ${PN}-lua" |
94 | PACKAGES =+ "${PN}-templates ${PN}-setup ${PN}-networking" | 87 | FILES_lua-${PN} = "${datadir}/lua ${libdir}/lua" |
88 | FILES_lua-${PN}-dbg += "${libdir}/lua/lxc/.debug" | ||
95 | FILES_${PN}-templates += "${datadir}/lxc/templates" | 89 | FILES_${PN}-templates += "${datadir}/lxc/templates" |
96 | RDEPENDS_${PN}-templates += "bash" | 90 | RDEPENDS_${PN}-templates += "bash" |
97 | 91 | ||
98 | ALLOW_EMPTY_${PN}-networking = "1" | 92 | ALLOW_EMPTY_${PN}-networking = "1" |
99 | 93 | ||
100 | FILES_${PN}-setup += "${sysconfdir}/tmpfiles.d" | 94 | FILES_${PN}-setup += "/etc/tmpfiles.d" |
101 | FILES_${PN}-setup += "${systemd_system_unitdir}" | 95 | FILES_${PN}-setup += "/lib/systemd/system" |
102 | FILES_${PN}-setup += "${sysconfdir}/init.d" | 96 | FILES_${PN}-setup += "/usr/lib/systemd/system" |
97 | FILES_${PN}-setup += "/etc/init.d" | ||
103 | 98 | ||
104 | PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1" | 99 | PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1" |
105 | 100 | ||