summaryrefslogtreecommitdiffstats
path: root/recipes-containers/lxc/files/Generate-lxc-restore-net-properly.patch
diff options
context:
space:
mode:
authorJim Somerville <Jim.Somerville@windriver.com>2015-07-09 09:58:28 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2015-07-14 14:32:07 -0400
commitfb380fd60f31edf9786e1ad82c1e76eefad82697 (patch)
tree126edee52d6551362299a5a5382e15c26a862567 /recipes-containers/lxc/files/Generate-lxc-restore-net-properly.patch
parenta89c11a3d89601f6d8499bd7d0f265cf4512d772 (diff)
downloadmeta-virtualization-fb380fd60f31edf9786e1ad82c1e76eefad82697.tar.gz
lxc: upgrade to version 1.1.2
This version has better support for unprivileged containers. Two patches are deleted as they are now included. One new patch is introduced to fix a file not found error at the install build step. Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-containers/lxc/files/Generate-lxc-restore-net-properly.patch')
-rw-r--r--recipes-containers/lxc/files/Generate-lxc-restore-net-properly.patch121
1 files changed, 121 insertions, 0 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
new file mode 100644
index 00000000..5adb730c
--- /dev/null
+++ b/recipes-containers/lxc/files/Generate-lxc-restore-net-properly.patch
@@ -0,0 +1,121 @@
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