[pve-devel] Applied: [PATCH lxc] update to lxc-2.0.5
Wolfgang Bumiller
w.bumiller at proxmox.com
Thu Oct 6 13:56:16 CEST 2016
---
Last patch series went upstream
Makefile | 4 +-
debian/changelog | 6 +
...ls-move-rcfile-to-the-common-options-list.patch | 415 ---------------------
...02-tools-set-configfile-after-load_config.patch | 245 ------------
.../0003-doc-add-rcfile-to-common-opts.patch | 39 --
debian/patches/series | 3 -
lxc.tgz | Bin 13466186 -> 13858280 bytes
7 files changed, 8 insertions(+), 704 deletions(-)
delete mode 100644 debian/patches/0001-tools-move-rcfile-to-the-common-options-list.patch
delete mode 100644 debian/patches/0002-tools-set-configfile-after-load_config.patch
delete mode 100644 debian/patches/0003-doc-add-rcfile-to-common-opts.patch
diff --git a/Makefile b/Makefile
index d6c67b6..62093ba 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
-RELEASE=4.2
+RELEASE=4.3
PACKAGE=lxc-pve
-LXCVER=2.0.4
+LXCVER=2.0.5
DEBREL=1
SRCDIR=lxc
diff --git a/debian/changelog b/debian/changelog
index ff4794a..f1e2814 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+lxc (2.0.5-1) unstable; urgency=medium
+
+ * update to lxc-2.0.5
+
+ -- Proxmox Support Team <support at proxmox.com> Thu, 06 Oct 2016 12:16:27 +0200
+
lxc (2.0.4-1) unstable; urgency=medium
* update to lxc-2.0.4
diff --git a/debian/patches/0001-tools-move-rcfile-to-the-common-options-list.patch b/debian/patches/0001-tools-move-rcfile-to-the-common-options-list.patch
deleted file mode 100644
index e84a981..0000000
--- a/debian/patches/0001-tools-move-rcfile-to-the-common-options-list.patch
+++ /dev/null
@@ -1,415 +0,0 @@
-From dacc363d7d21434b764d95e4bd3d740c8995e951 Mon Sep 17 00:00:00 2001
-From: Wolfgang Bumiller <w.bumiller at proxmox.com>
-Date: Fri, 12 Aug 2016 12:21:22 +0200
-Subject: [PATCH 1/3] tools: move --rcfile to the common options list
-
-In almost all commands it's a useful addition to the -n
-switch which is a common option, too.
-
-Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
----
- src/lxc/arguments.c | 1 +
- src/lxc/arguments.h | 2 ++
- src/lxc/tools/lxc_attach.c | 1 -
- src/lxc/tools/lxc_cgroup.c | 12 +++++++++++-
- src/lxc/tools/lxc_checkpoint.c | 10 ++++++++++
- src/lxc/tools/lxc_console.c | 12 +++++++++++-
- src/lxc/tools/lxc_copy.c | 11 ++++++++++-
- src/lxc/tools/lxc_destroy.c | 12 +++++++++++-
- src/lxc/tools/lxc_device.c | 11 ++++++++++-
- src/lxc/tools/lxc_freeze.c | 12 +++++++++++-
- src/lxc/tools/lxc_info.c | 12 +++++++++++-
- src/lxc/tools/lxc_snapshot.c | 12 +++++++++++-
- src/lxc/tools/lxc_stop.c | 11 ++++++++++-
- src/lxc/tools/lxc_unfreeze.c | 12 +++++++++++-
- src/lxc/tools/lxc_wait.c | 12 +++++++++++-
- 15 files changed, 131 insertions(+), 12 deletions(-)
-
-diff --git a/src/lxc/arguments.c b/src/lxc/arguments.c
-index c2f7b67..0d2b203 100644
---- a/src/lxc/arguments.c
-+++ b/src/lxc/arguments.c
-@@ -203,6 +203,7 @@ extern int lxc_arguments_parse(struct lxc_arguments *args,
- case 'o': args->log_file = optarg; break;
- case 'l': args->log_priority = optarg; break;
- case 'q': args->quiet = 1; break;
-+ case OPT_RCFILE: args->rcfile = optarg; break;
- case 'P':
- remove_trailing_slashes(optarg);
- ret = lxc_arguments_lxcpath_add(args, optarg);
-diff --git a/src/lxc/arguments.h b/src/lxc/arguments.h
-index f68f8ab..39bedf5 100644
---- a/src/lxc/arguments.h
-+++ b/src/lxc/arguments.h
-@@ -151,11 +151,13 @@ struct lxc_arguments {
- {"logfile", required_argument, 0, 'o'}, \
- {"logpriority", required_argument, 0, 'l'}, \
- {"lxcpath", required_argument, 0, 'P'}, \
-+ {"rcfile", required_argument, 0, OPT_RCFILE}, \
- {0, 0, 0, 0}
-
- /* option keys for long only options */
- #define OPT_USAGE 0x1000
- #define OPT_VERSION OPT_USAGE-1
-+#define OPT_RCFILE OPT_USAGE-2
-
- extern int lxc_arguments_parse(struct lxc_arguments *args,
- int argc, char *const argv[]);
-diff --git a/src/lxc/tools/lxc_cgroup.c b/src/lxc/tools/lxc_cgroup.c
-index dd60fd1..c644501 100644
---- a/src/lxc/tools/lxc_cgroup.c
-+++ b/src/lxc/tools/lxc_cgroup.c
-@@ -56,7 +56,8 @@ Get or set the value of a state object (for example, 'cpuset.cpus')\n\
- in the container's cgroup for the corresponding subsystem.\n\
- \n\
- Options :\n\
-- -n, --name=NAME NAME of the container",
-+ -n, --name=NAME NAME of the container\n\
-+ --rcfile=FILE Load configuration file FILE\n",
- .options = my_longopts,
- .parser = NULL,
- .checker = my_checker,
-@@ -84,6 +85,15 @@ int main(int argc, char *argv[])
- if (!c)
- return 1;
-
-+ if (my_args.rcfile) {
-+ c->clear_config(c);
-+ if (!c->load_config(c, my_args.rcfile)) {
-+ ERROR("Failed to load rcfile");
-+ lxc_container_put(c);
-+ return 1;
-+ }
-+ }
-+
- if (!c->may_control(c)) {
- ERROR("Insufficent privileges to control %s:%s", my_args.lxcpath[0], my_args.name);
- lxc_container_put(c);
-diff --git a/src/lxc/tools/lxc_checkpoint.c b/src/lxc/tools/lxc_checkpoint.c
-index 7130245..bc18b80 100644
---- a/src/lxc/tools/lxc_checkpoint.c
-+++ b/src/lxc/tools/lxc_checkpoint.c
-@@ -114,6 +114,7 @@ Options :\n\
- Restore options:\n\
- -d, --daemon Daemonize the container (default)\n\
- -F, --foreground Start with the current tty attached to /dev/console\n\
-+ --rcfile=FILE Load configuration file FILE\n\
- ",
- .options = my_longopts,
- .parser = my_parser,
-@@ -214,6 +215,15 @@ int main(int argc, char *argv[])
- exit(1);
- }
-
-+ if (my_args.rcfile) {
-+ c->clear_config(c);
-+ if (!c->load_config(c, my_args.rcfile)) {
-+ fprintf(stderr, "Failed to load rcfile\n");
-+ lxc_container_put(c);
-+ exit(1);
-+ }
-+ }
-+
- if (!c->may_control(c)) {
- fprintf(stderr, "Insufficent privileges to control %s\n", my_args.name);
- lxc_container_put(c);
-diff --git a/src/lxc/tools/lxc_console.c b/src/lxc/tools/lxc_console.c
-index adbd7e0..8a4d1c0 100644
---- a/src/lxc/tools/lxc_console.c
-+++ b/src/lxc/tools/lxc_console.c
-@@ -80,7 +80,8 @@ lxc-console logs on the container with the identifier NAME\n\
- Options :\n\
- -n, --name=NAME NAME of the container\n\
- -t, --tty=NUMBER console tty number\n\
-- -e, --escape=PREFIX prefix for escape command\n",
-+ -e, --escape=PREFIX prefix for escape command\n\
-+ --rcfile=FILE Load configuration file FILE\n",
- .options = my_longopts,
- .parser = my_parser,
- .checker = NULL,
-@@ -112,6 +113,15 @@ int main(int argc, char *argv[])
- exit(EXIT_FAILURE);
- }
-
-+ if (my_args.rcfile) {
-+ c->clear_config(c);
-+ if (!c->load_config(c, my_args.rcfile)) {
-+ fprintf(stderr, "Failed to load rcfile\n");
-+ lxc_container_put(c);
-+ exit(EXIT_FAILURE);
-+ }
-+ }
-+
- if (!c->may_control(c)) {
- fprintf(stderr, "Insufficent privileges to control %s\n", my_args.name);
- lxc_container_put(c);
-diff --git a/src/lxc/tools/lxc_copy.c b/src/lxc/tools/lxc_copy.c
-index 3257ab7..c81c077 100644
---- a/src/lxc/tools/lxc_copy.c
-+++ b/src/lxc/tools/lxc_copy.c
-@@ -126,7 +126,8 @@ Options :\n\
- -D, --keedata pass together with -e start a persistent snapshot \n\
- -K, --keepname keep the hostname of the original container\n\
- -- hook options arguments passed to the hook program\n\
-- -M, --keepmac keep the MAC address of the original container\n",
-+ -M, --keepmac keep the MAC address of the original container\n\
-+ --rcfile=FILE Load configuration file FILE\n",
- .options = my_longopts,
- .parser = my_parser,
- .task = CLONE,
-@@ -210,6 +211,14 @@ int main(int argc, char *argv[])
- if (!c)
- exit(ret);
-
-+ if (my_args.rcfile) {
-+ c->clear_config(c);
-+ if (!c->load_config(c, my_args.rcfile)) {
-+ fprintf(stderr, "Failed to load rcfile\n");
-+ goto out;
-+ }
-+ }
-+
- if (!c->may_control(c)) {
- if (!my_args.quiet)
- fprintf(stderr, "Insufficent privileges to control %s\n", c->name);
-diff --git a/src/lxc/tools/lxc_destroy.c b/src/lxc/tools/lxc_destroy.c
-index b521739..50fd708 100644
---- a/src/lxc/tools/lxc_destroy.c
-+++ b/src/lxc/tools/lxc_destroy.c
-@@ -53,7 +53,8 @@ lxc-destroy destroys a container with the identifier NAME\n\
- Options :\n\
- -n, --name=NAME NAME of the container\n\
- -s, --snapshots destroy including all snapshots\n\
-- -f, --force wait for the container to shut down\n",
-+ -f, --force wait for the container to shut down\n\
-+ --rcfile=FILE Load configuration file FILE\n",
- .options = my_longopts,
- .parser = my_parser,
- .checker = NULL,
-@@ -88,6 +89,15 @@ int main(int argc, char *argv[])
- exit(EXIT_FAILURE);
- }
-
-+ if (my_args.rcfile) {
-+ c->clear_config(c);
-+ if (!c->load_config(c, my_args.rcfile)) {
-+ fprintf(stderr, "Failed to load rcfile\n");
-+ lxc_container_put(c);
-+ exit(EXIT_FAILURE);
-+ }
-+ }
-+
- if (!c->may_control(c)) {
- if (!quiet)
- fprintf(stderr, "Insufficent privileges to control %s\n", my_args.name);
-diff --git a/src/lxc/tools/lxc_device.c b/src/lxc/tools/lxc_device.c
-index 0c9e066..0f1ee8b 100644
---- a/src/lxc/tools/lxc_device.c
-+++ b/src/lxc/tools/lxc_device.c
-@@ -53,7 +53,8 @@ static struct lxc_arguments my_args = {
- lxc-device attach or detach DEV to or from container.\n\
- \n\
- Options :\n\
-- -n, --name=NAME NAME of the container",
-+ -n, --name=NAME NAME of the container\n\
-+ --rcfile=FILE Load configuration file FILE\n",
- .options = my_longopts,
- .parser = NULL,
- .checker = NULL,
-@@ -125,6 +126,14 @@ int main(int argc, char *argv[])
- goto err;
- }
-
-+ if (my_args.rcfile) {
-+ c->clear_config(c);
-+ if (!c->load_config(c, my_args.rcfile)) {
-+ ERROR("Failed to load rcfile");
-+ goto err1;
-+ }
-+ }
-+
- if (!c->is_running(c)) {
- ERROR("Container %s is not running.", c->name);
- goto err1;
-diff --git a/src/lxc/tools/lxc_freeze.c b/src/lxc/tools/lxc_freeze.c
-index ea8bd3e..d0239bf 100644
---- a/src/lxc/tools/lxc_freeze.c
-+++ b/src/lxc/tools/lxc_freeze.c
-@@ -47,7 +47,8 @@ static struct lxc_arguments my_args = {
- lxc-freeze freezes a container with the identifier NAME\n\
- \n\
- Options :\n\
-- -n, --name=NAME NAME of the container",
-+ -n, --name=NAME NAME of the container\n\
-+ --rcfile=FILE Load configuration file FILE\n",
- .options = my_longopts,
- .parser = NULL,
- .checker = NULL,
-@@ -74,6 +75,15 @@ int main(int argc, char *argv[])
- exit(1);
- }
-
-+ if (my_args.rcfile) {
-+ c->clear_config(c);
-+ if (!c->load_config(c, my_args.rcfile)) {
-+ ERROR("Failed to load rcfile");
-+ lxc_container_put(c);
-+ exit(1);
-+ }
-+ }
-+
- if (!c->may_control(c)) {
- ERROR("Insufficent privileges to control %s:%s", my_args.lxcpath[0], my_args.name);
- lxc_container_put(c);
-diff --git a/src/lxc/tools/lxc_info.c b/src/lxc/tools/lxc_info.c
-index 58ff619..e833697 100644
---- a/src/lxc/tools/lxc_info.c
-+++ b/src/lxc/tools/lxc_info.c
-@@ -93,7 +93,8 @@ Options :\n\
- -p, --pid shows the process id of the init container\n\
- -S, --stats shows usage stats\n\
- -H, --no-humanize shows stats as raw numbers, not humanized\n\
-- -s, --state shows the state of the container\n",
-+ -s, --state shows the state of the container\n\
-+ --rcfile=FILE Load configuration file FILE\n",
- .name = NULL,
- .options = my_longopts,
- .parser = my_parser,
-@@ -295,6 +296,15 @@ static int print_info(const char *name, const char *lxcpath)
- return -1;
- }
-
-+ if (my_args.rcfile) {
-+ c->clear_config(c);
-+ if (!c->load_config(c, my_args.rcfile)) {
-+ fprintf(stderr, "Failed to load rcfile\n");
-+ lxc_container_put(c);
-+ return -1;
-+ }
-+ }
-+
- if (!c->may_control(c)) {
- fprintf(stderr, "Insufficent privileges to control %s\n", c->name);
- lxc_container_put(c);
-diff --git a/src/lxc/tools/lxc_snapshot.c b/src/lxc/tools/lxc_snapshot.c
-index 8f44891..aa9b6fe 100644
---- a/src/lxc/tools/lxc_snapshot.c
-+++ b/src/lxc/tools/lxc_snapshot.c
-@@ -62,7 +62,8 @@ Options :\n\
- -d, --destroy=NAME destroy snapshot NAME, e.g. 'snap0'\n\
- use ALL to destroy all snapshots\n\
- -c, --comment=FILE add FILE as a comment\n\
-- -C, --showcomments show snapshot comments\n",
-+ -C, --showcomments show snapshot comments\n\
-+ --rcfile=FILE Load configuration file FILE\n",
- .options = my_longopts,
- .parser = my_parser,
- .checker = NULL,
-@@ -107,6 +108,15 @@ int main(int argc, char *argv[])
- exit(EXIT_FAILURE);
- }
-
-+ if (my_args.rcfile) {
-+ c->clear_config(c);
-+ if (!c->load_config(c, my_args.rcfile)) {
-+ fprintf(stderr, "Failed to load rcfile\n");
-+ lxc_container_put(c);
-+ exit(EXIT_FAILURE);
-+ }
-+ }
-+
- if (!c->may_control(c)) {
- fprintf(stderr, "Insufficent privileges to control %s\n",
- my_args.name);
-diff --git a/src/lxc/tools/lxc_stop.c b/src/lxc/tools/lxc_stop.c
-index 10ddce6..bbe1f1c 100644
---- a/src/lxc/tools/lxc_stop.c
-+++ b/src/lxc/tools/lxc_stop.c
-@@ -75,7 +75,8 @@ Options :\n\
- -t, --timeout=T wait T seconds before hard-stopping\n\
- -k, --kill kill container rather than request clean shutdown\n\
- --nolock Avoid using API locks\n\
-- --nokill Only request clean shutdown, don't force kill after timeout\n",
-+ --nokill Only request clean shutdown, don't force kill after timeout\n\
-+ --rcfile=FILE Load configuration file FILE\n",
- .options = my_longopts,
- .parser = my_parser,
- .checker = NULL,
-@@ -203,6 +204,14 @@ int main(int argc, char *argv[])
- goto out;
- }
-
-+ if (my_args.rcfile) {
-+ c->clear_config(c);
-+ if (!c->load_config(c, my_args.rcfile)) {
-+ fprintf(stderr, "Failed to load rcfile\n");
-+ goto out;
-+ }
-+ }
-+
- if (!c->may_control(c)) {
- fprintf(stderr, "Insufficent privileges to control %s\n", c->name);
- goto out;
-diff --git a/src/lxc/tools/lxc_unfreeze.c b/src/lxc/tools/lxc_unfreeze.c
-index 3a13d37..b7bbea6 100644
---- a/src/lxc/tools/lxc_unfreeze.c
-+++ b/src/lxc/tools/lxc_unfreeze.c
-@@ -45,7 +45,8 @@ static struct lxc_arguments my_args = {
- lxc-unfreeze unfreezes a container with the identifier NAME\n\
- \n\
- Options :\n\
-- -n, --name=NAME NAME of the container\n",
-+ -n, --name=NAME NAME of the container\n\
-+ --rcfile=FILE Load configuration file FILE\n",
- .options = my_longopts,
- .parser = NULL,
- .checker = NULL,
-@@ -78,6 +79,15 @@ int main(int argc, char *argv[])
- exit(1);
- }
-
-+ if (my_args.rcfile) {
-+ c->clear_config(c);
-+ if (!c->load_config(c, my_args.rcfile)) {
-+ ERROR("Failed to load rcfile");
-+ lxc_container_put(c);
-+ exit(1);
-+ }
-+ }
-+
- if (!c->unfreeze(c)) {
- ERROR("Failed to unfreeze %s:%s", my_args.lxcpath[0], my_args.name);
- lxc_container_put(c);
-diff --git a/src/lxc/tools/lxc_wait.c b/src/lxc/tools/lxc_wait.c
-index 712ba52..deeff98 100644
---- a/src/lxc/tools/lxc_wait.c
-+++ b/src/lxc/tools/lxc_wait.c
-@@ -72,7 +72,8 @@ Options :\n\
- -s, --state=STATE ORed states to wait for\n\
- STOPPED, STARTING, RUNNING, STOPPING,\n\
- ABORTING, FREEZING, FROZEN, THAWED\n\
-- -t, --timeout=TMO Seconds to wait for state changes\n",
-+ -t, --timeout=TMO Seconds to wait for state changes\n\
-+ --rcfile=FILE Load configuration file FILE\n",
- .options = my_longopts,
- .parser = my_parser,
- .checker = my_checker,
-@@ -104,6 +105,15 @@ int main(int argc, char *argv[])
- return 1;
- }
-
-+ if (my_args.rcfile) {
-+ c->clear_config(c);
-+ if (!c->load_config(c, my_args.rcfile)) {
-+ fprintf(stderr, "Failed to load rcfile\n");
-+ lxc_container_put(c);
-+ return 1;
-+ }
-+ }
-+
- if (!c->wait(c, my_args.states, my_args.timeout)) {
- lxc_container_put(c);
- return 1;
---
-2.1.4
-
diff --git a/debian/patches/0002-tools-set-configfile-after-load_config.patch b/debian/patches/0002-tools-set-configfile-after-load_config.patch
deleted file mode 100644
index b32b49e..0000000
--- a/debian/patches/0002-tools-set-configfile-after-load_config.patch
+++ /dev/null
@@ -1,245 +0,0 @@
-From fb259e5b431260c61a2afcee862f7e836d7d8cf9 Mon Sep 17 00:00:00 2001
-From: Wolfgang Bumiller <w.bumiller at proxmox.com>
-Date: Fri, 12 Aug 2016 14:49:37 +0200
-Subject: [PATCH 2/3] tools: set configfile after load_config
-
-In order to cause c->is_defined() to become true.
-
-Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
----
- src/lxc/tools/lxc_attach.c | 6 ++++++
- src/lxc/tools/lxc_cgroup.c | 6 ++++++
- src/lxc/tools/lxc_checkpoint.c | 6 ++++++
- src/lxc/tools/lxc_console.c | 6 ++++++
- src/lxc/tools/lxc_copy.c | 5 +++++
- src/lxc/tools/lxc_destroy.c | 6 ++++++
- src/lxc/tools/lxc_device.c | 5 +++++
- src/lxc/tools/lxc_freeze.c | 6 ++++++
- src/lxc/tools/lxc_info.c | 6 ++++++
- src/lxc/tools/lxc_snapshot.c | 6 ++++++
- src/lxc/tools/lxc_stop.c | 5 +++++
- src/lxc/tools/lxc_unfreeze.c | 6 ++++++
- src/lxc/tools/lxc_wait.c | 6 ++++++
- 13 files changed, 75 insertions(+)
-
-diff --git a/src/lxc/tools/lxc_attach.c b/src/lxc/tools/lxc_attach.c
-index 14c724a..e436ae9 100644
---- a/src/lxc/tools/lxc_attach.c
-+++ b/src/lxc/tools/lxc_attach.c
-@@ -384,6 +384,12 @@ int main(int argc, char *argv[])
- lxc_container_put(c);
- exit(EXIT_FAILURE);
- }
-+ c->configfile = strdup(my_args.rcfile);
-+ if (!c->configfile) {
-+ ERROR("Out of memory setting new config filename");
-+ lxc_container_put(c);
-+ exit(EXIT_FAILURE);
-+ }
- }
-
- if (!c->may_control(c)) {
-diff --git a/src/lxc/tools/lxc_cgroup.c b/src/lxc/tools/lxc_cgroup.c
-index c644501..4dc2682 100644
---- a/src/lxc/tools/lxc_cgroup.c
-+++ b/src/lxc/tools/lxc_cgroup.c
-@@ -92,6 +92,12 @@ int main(int argc, char *argv[])
- lxc_container_put(c);
- return 1;
- }
-+ c->configfile = strdup(my_args.rcfile);
-+ if (!c->configfile) {
-+ ERROR("Out of memory setting new config filename");
-+ lxc_container_put(c);
-+ return 1;
-+ }
- }
-
- if (!c->may_control(c)) {
-diff --git a/src/lxc/tools/lxc_checkpoint.c b/src/lxc/tools/lxc_checkpoint.c
-index bc18b80..6de3d23 100644
---- a/src/lxc/tools/lxc_checkpoint.c
-+++ b/src/lxc/tools/lxc_checkpoint.c
-@@ -222,6 +222,12 @@ int main(int argc, char *argv[])
- lxc_container_put(c);
- exit(1);
- }
-+ c->configfile = strdup(my_args.rcfile);
-+ if (!c->configfile) {
-+ fprintf(stderr, "Out of memory setting new config filename\n");
-+ lxc_container_put(c);
-+ exit(1);
-+ }
- }
-
- if (!c->may_control(c)) {
-diff --git a/src/lxc/tools/lxc_console.c b/src/lxc/tools/lxc_console.c
-index 8a4d1c0..829c908 100644
---- a/src/lxc/tools/lxc_console.c
-+++ b/src/lxc/tools/lxc_console.c
-@@ -120,6 +120,12 @@ int main(int argc, char *argv[])
- lxc_container_put(c);
- exit(EXIT_FAILURE);
- }
-+ c->configfile = strdup(my_args.rcfile);
-+ if (!c->configfile) {
-+ fprintf(stderr, "Out of memory setting new config filename\n");
-+ lxc_container_put(c);
-+ exit(EXIT_FAILURE);
-+ }
- }
-
- if (!c->may_control(c)) {
-diff --git a/src/lxc/tools/lxc_copy.c b/src/lxc/tools/lxc_copy.c
-index c81c077..f7dc8b2 100644
---- a/src/lxc/tools/lxc_copy.c
-+++ b/src/lxc/tools/lxc_copy.c
-@@ -217,6 +217,11 @@ int main(int argc, char *argv[])
- fprintf(stderr, "Failed to load rcfile\n");
- goto out;
- }
-+ c->configfile = strdup(my_args.rcfile);
-+ if (!c->configfile) {
-+ fprintf(stderr, "Out of memory setting new config filename\n");
-+ goto out;
-+ }
- }
-
- if (!c->may_control(c)) {
-diff --git a/src/lxc/tools/lxc_destroy.c b/src/lxc/tools/lxc_destroy.c
-index 50fd708..3f46415 100644
---- a/src/lxc/tools/lxc_destroy.c
-+++ b/src/lxc/tools/lxc_destroy.c
-@@ -96,6 +96,12 @@ int main(int argc, char *argv[])
- lxc_container_put(c);
- exit(EXIT_FAILURE);
- }
-+ c->configfile = strdup(my_args.rcfile);
-+ if (!c->configfile) {
-+ fprintf(stderr, "Out of memory setting new config filename\n");
-+ lxc_container_put(c);
-+ exit(EXIT_FAILURE);
-+ }
- }
-
- if (!c->may_control(c)) {
-diff --git a/src/lxc/tools/lxc_device.c b/src/lxc/tools/lxc_device.c
-index 0f1ee8b..49af062 100644
---- a/src/lxc/tools/lxc_device.c
-+++ b/src/lxc/tools/lxc_device.c
-@@ -132,6 +132,11 @@ int main(int argc, char *argv[])
- ERROR("Failed to load rcfile");
- goto err1;
- }
-+ c->configfile = strdup(my_args.rcfile);
-+ if (!c->configfile) {
-+ ERROR("Out of memory setting new config filename");
-+ goto err1;
-+ }
- }
-
- if (!c->is_running(c)) {
-diff --git a/src/lxc/tools/lxc_freeze.c b/src/lxc/tools/lxc_freeze.c
-index d0239bf..ac0802e 100644
---- a/src/lxc/tools/lxc_freeze.c
-+++ b/src/lxc/tools/lxc_freeze.c
-@@ -82,6 +82,12 @@ int main(int argc, char *argv[])
- lxc_container_put(c);
- exit(1);
- }
-+ c->configfile = strdup(my_args.rcfile);
-+ if (!c->configfile) {
-+ ERROR("Out of memory setting new config filename");
-+ lxc_container_put(c);
-+ exit(1);
-+ }
- }
-
- if (!c->may_control(c)) {
-diff --git a/src/lxc/tools/lxc_info.c b/src/lxc/tools/lxc_info.c
-index e833697..08c698d 100644
---- a/src/lxc/tools/lxc_info.c
-+++ b/src/lxc/tools/lxc_info.c
-@@ -303,6 +303,12 @@ static int print_info(const char *name, const char *lxcpath)
- lxc_container_put(c);
- return -1;
- }
-+ c->configfile = strdup(my_args.rcfile);
-+ if (!c->configfile) {
-+ fprintf(stderr, "Out of memory setting new config filename\n");
-+ lxc_container_put(c);
-+ return -1;
-+ }
- }
-
- if (!c->may_control(c)) {
-diff --git a/src/lxc/tools/lxc_snapshot.c b/src/lxc/tools/lxc_snapshot.c
-index aa9b6fe..a1166bc 100644
---- a/src/lxc/tools/lxc_snapshot.c
-+++ b/src/lxc/tools/lxc_snapshot.c
-@@ -115,6 +115,12 @@ int main(int argc, char *argv[])
- lxc_container_put(c);
- exit(EXIT_FAILURE);
- }
-+ c->configfile = strdup(my_args.rcfile);
-+ if (!c->configfile) {
-+ fprintf(stderr, "Out of memory setting new config filename\n");
-+ lxc_container_put(c);
-+ exit(EXIT_FAILURE);
-+ }
- }
-
- if (!c->may_control(c)) {
-diff --git a/src/lxc/tools/lxc_stop.c b/src/lxc/tools/lxc_stop.c
-index bbe1f1c..cb7cfe2 100644
---- a/src/lxc/tools/lxc_stop.c
-+++ b/src/lxc/tools/lxc_stop.c
-@@ -210,6 +210,11 @@ int main(int argc, char *argv[])
- fprintf(stderr, "Failed to load rcfile\n");
- goto out;
- }
-+ c->configfile = strdup(my_args.rcfile);
-+ if (!c->configfile) {
-+ fprintf(stderr, "Out of memory setting new config filename\n");
-+ goto out;
-+ }
- }
-
- if (!c->may_control(c)) {
-diff --git a/src/lxc/tools/lxc_unfreeze.c b/src/lxc/tools/lxc_unfreeze.c
-index b7bbea6..24faf5e 100644
---- a/src/lxc/tools/lxc_unfreeze.c
-+++ b/src/lxc/tools/lxc_unfreeze.c
-@@ -86,6 +86,12 @@ int main(int argc, char *argv[])
- lxc_container_put(c);
- exit(1);
- }
-+ c->configfile = strdup(my_args.rcfile);
-+ if (!c->configfile) {
-+ ERROR("Out of memory setting new config filename");
-+ lxc_container_put(c);
-+ exit(1);
-+ }
- }
-
- if (!c->unfreeze(c)) {
-diff --git a/src/lxc/tools/lxc_wait.c b/src/lxc/tools/lxc_wait.c
-index deeff98..61fd869 100644
---- a/src/lxc/tools/lxc_wait.c
-+++ b/src/lxc/tools/lxc_wait.c
-@@ -112,6 +112,12 @@ int main(int argc, char *argv[])
- lxc_container_put(c);
- return 1;
- }
-+ c->configfile = strdup(my_args.rcfile);
-+ if (!c->configfile) {
-+ fprintf(stderr, "Out of memory setting new config filename\n");
-+ lxc_container_put(c);
-+ return 1;
-+ }
- }
-
- if (!c->wait(c, my_args.states, my_args.timeout)) {
---
-2.1.4
-
diff --git a/debian/patches/0003-doc-add-rcfile-to-common-opts.patch b/debian/patches/0003-doc-add-rcfile-to-common-opts.patch
deleted file mode 100644
index 7b974cc..0000000
--- a/debian/patches/0003-doc-add-rcfile-to-common-opts.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 2e62657e65daad24f4c11744ce133e8c4d75df02 Mon Sep 17 00:00:00 2001
-From: Wolfgang Bumiller <w.bumiller at proxmox.com>
-Date: Fri, 12 Aug 2016 14:55:42 +0200
-Subject: [PATCH 3/3] doc: add --rcfile to common opts
-
-Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
----
- doc/common_options.sgml.in | 15 +++++++++++++++
- 1 file changed, 15 insertions(+)
-
-diff --git a/doc/common_options.sgml.in b/doc/common_options.sgml.in
-index 38783dd..978c0ba 100644
---- a/doc/common_options.sgml.in
-+++ b/doc/common_options.sgml.in
-@@ -107,6 +107,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- </varlistentry>
-
- <varlistentry>
-+ <term><option>--rcfile=<replaceable>FILE</replaceable></option></term>
-+ <listitem>
-+ <para>
-+ Specify the configuration file to configure the virtualization
-+ and isolation functionalities for the container.
-+ </para>
-+ <para>
-+ This configuration file if present will be used even if there is
-+ already a configuration file present in the previously created
-+ container (via lxc-create).
-+ </para>
-+ </listitem>
-+ </varlistentry>
-+
-+ <varlistentry>
- <term><option>--version</option></term>
- <listitem>
- <para>
---
-2.1.4
-
diff --git a/debian/patches/series b/debian/patches/series
index 4a9c82a..3737812 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,6 +6,3 @@ include-linux-sched.patch
use-var-lib-vz-as-default-dir.patch
#do-not-use-config-path-for-rootfs.patch
run-lxcnetaddbr.patch
-0001-tools-move-rcfile-to-the-common-options-list.patch
-0002-tools-set-configfile-after-load_config.patch
-0003-doc-add-rcfile-to-common-opts.patch
diff --git a/lxc.tgz b/lxc.tgz
index 0bbda7a..efa36c3 100644
Binary files a/lxc.tgz and b/lxc.tgz differ
--
2.1.4
More information about the pve-devel
mailing list