summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang Qiyu <huangqy.fnst@cn.fujitsu.com>2017-06-06 14:46:54 +0800
committerBruce Ashfield <bruce.ashfield@windriver.com>2017-06-13 18:26:15 -0400
commite73608d56e498a7075e7a3e5550aafd76987d7aa (patch)
tree4a1381c102f0f81513e90b119342f66cb7e13709
parent3c427eafce21c615d5da76f261329497f7fcfeac (diff)
downloadmeta-virtualization-e73608d56e498a7075e7a3e5550aafd76987d7aa.tar.gz
lxc: 2.0.0 -> 2.0.8
1)Upgrade lxc from 2.0.0 to 2.0.8. 2)Delete two patches, since it is integrated upstream. Delete Generate-lxc-restore-net-properly.patch,this script has already been rearchitected out of existence by cba98d127bf490b018a016b792ae05fd2d29c5ee Delete Use-AC_HEADER_MAJOR-to-detect-major-minor-makedev.patch,this script has already been rearchitected out of existence by af6824fce9c9536fbcabef8d5547f6c486f55fdf from git://github.com/lxc/lxc.git 3)Modify two patches, since the data has been changed. automake-ensure-VPATH-builds-correctly.patch runtest.patch Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--recipes-containers/lxc/files/Generate-lxc-restore-net-properly.patch121
-rw-r--r--recipes-containers/lxc/files/Use-AC_HEADER_MAJOR-to-detect-major-minor-makedev.patch119
-rw-r--r--recipes-containers/lxc/files/automake-ensure-VPATH-builds-correctly.patch2
-rw-r--r--recipes-containers/lxc/files/runtest.patch2
-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 @@
1From e08f3573b3561f1f0490624f7ca95b7ccd8157cb Mon Sep 17 00:00:00 2001
2Message-Id: <e08f3573b3561f1f0490624f7ca95b7ccd8157cb.1435177418.git.Jim.Somerville@windriver.com>
3From: Jim Somerville <Jim.Somerville@windriver.com>
4Date: Wed, 24 Jun 2015 16:16:38 -0400
5Subject: [PATCH 1/1] Generate lxc-restore-net properly
6
7It's a script that should be run through the configure
8mechanism the same as the others. We simply rename it
9to have a .in extension and add it to configure.ac .
10
11Also, by generating the script from a .in file, it gets
12placed into the build directory. This plays nice with
13build systems that keep the src separate from the build
14directory. Without this change, the install step won't
15find the lxc-restore-net script as it still just resides
16in the src directory and not in the build directory.
17
18Upstream-Status: Not applicable. This script has already
19been rearchitected out of existence by
20cba98d127bf490b018a016b792ae05fd2d29c5ee:
21"c/r: use criu option instead of lxc-restore-net
22
23As of criu 1.5, the --veth-pair argument supports an additional parameter that
24is the bridge name to attach to. This enables us to get rid of the goofy
25action-script hack that passed bridge names as environment variables.
26
27This patch is on top of the systemd/lxcfs mount rework patch, as we probably
28want to wait to use 1.5 options until it has been out for a while and is in
29distros.
30
31Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
32Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>"
33
34Signed-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
43diff --git a/configure.ac b/configure.ac
44index 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
55diff --git a/src/lxc/lxc-restore-net b/src/lxc/lxc-restore-net
56deleted file mode 100755
57index 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
87diff --git a/src/lxc/lxc-restore-net.in b/src/lxc/lxc-restore-net.in
88new file mode 100755
89index 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--
1201.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 @@
1From 5c957671a511441b112b137b88bf0b1f31adac20 Mon Sep 17 00:00:00 2001
2From: Sergei Trofimovich <siarheit@google.com>
3Date: Sat, 21 Jan 2017 11:57:13 +0000
4Subject: [PATCH] Use AC_HEADER_MAJOR to detect major()/minor()/makedev()
5
6commit af6824fce9c9536fbcabef8d5547f6c486f55fdf from
7git://github.com/lxc/lxc.git
8
9Before 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
19glibc plans to remove <sys/sysmacros.h> from glibc's <sys/types.h>:
20 https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html
21
22Gentoo already applied glibc patch to experimental glibc-2.24
23to start preparingfor the change.
24
25Autoconf has AC_HEADER_MAJOR to find out which header defines
26reqiured macros:
27 https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Particular-Headers.html
28
29This change should also increase portability across other libcs.
30
31Bug: https://bugs.gentoo.org/604360
32Signed-off-by: Sergei Trofimovich <siarheit@google.com>
33Signed-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
41diff --git a/configure.ac b/configure.ac
42index 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
55diff --git a/src/lxc/bdev/lxclvm.c b/src/lxc/bdev/lxclvm.c
56index 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,
79diff --git a/src/lxc/conf.c b/src/lxc/conf.c
80index 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
98diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
99index 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--
1182.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
2SECTION = "console/utils" 2SECTION = "console/utils"
3LICENSE = "GPLv2" 3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" 4LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
5PRIORITY = "optional"
6DEPENDS = "libxml2 libcap" 5DEPENDS = "libxml2 libcap"
7RDEPENDS_${PN} = " \ 6RDEPENDS_${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"
23RDEPENDS_${PN}_append_libc-glibc = "\ 21RDEPENDS_${PN}-ptest += "file make gmp nettle gnutls"
24 glibc-utils \
25"
26
27RDEPENDS_${PN}-ptest += "file make"
28 22
29SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \ 23SRC_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
40SRC_URI[md5sum] = "04a7245a614cd3296b0ae9ceeeb83fbb" 33SRC_URI[md5sum] = "7bfd95280522d7936c0979dfea92cdb5"
41SRC_URI[sha256sum] = "5b737e114d8ef1feb193fba936d77a5697a7c8a10199a068cdd90d1bd27c10e4" 34SRC_URI[sha256sum] = "0d8e34b302cfe4c40c6c9ae5097096aa5cc2c1dfceea3f0f22e3e16c4a4e8494"
42 35
43S = "${WORKDIR}/${BPN}-${PV}" 36S = "${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
88FILES_${PN} += "${docdir}" 81FILES_${PN} += "${docdir}"
89FILES_${PN} += "${libdir}/python3*" 82FILES_${PN} += "${libdir}/python3*"
90FILES_${PN} += "${datadir}/lua/*" 83FILES_${PN} += "${datadir}/bash-completion"
91FILES_${PN} += "${libdir}/lua/lxc/*" 84FILES_${PN}-dbg += "${libexecdir}/lxc/.debug"
92FILES_${PN}-dbg += "${libdir}/lua/lxc/.debug" 85FILES_${PN}-dbg += "${libexecdir}/lxc/hooks/.debug"
93FILES_${PN}-dbg += "${libexecdir}/lxc/.debug ${libexecdir}/lxc/hooks/.debug" 86PACKAGES =+ "${PN}-templates ${PN}-setup ${PN}-networking ${PN}-lua"
94PACKAGES =+ "${PN}-templates ${PN}-setup ${PN}-networking" 87FILES_lua-${PN} = "${datadir}/lua ${libdir}/lua"
88FILES_lua-${PN}-dbg += "${libdir}/lua/lxc/.debug"
95FILES_${PN}-templates += "${datadir}/lxc/templates" 89FILES_${PN}-templates += "${datadir}/lxc/templates"
96RDEPENDS_${PN}-templates += "bash" 90RDEPENDS_${PN}-templates += "bash"
97 91
98ALLOW_EMPTY_${PN}-networking = "1" 92ALLOW_EMPTY_${PN}-networking = "1"
99 93
100FILES_${PN}-setup += "${sysconfdir}/tmpfiles.d" 94FILES_${PN}-setup += "/etc/tmpfiles.d"
101FILES_${PN}-setup += "${systemd_system_unitdir}" 95FILES_${PN}-setup += "/lib/systemd/system"
102FILES_${PN}-setup += "${sysconfdir}/init.d" 96FILES_${PN}-setup += "/usr/lib/systemd/system"
97FILES_${PN}-setup += "/etc/init.d"
103 98
104PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1" 99PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1"
105 100