diff -Nru lxc-1.0.0~alpha1/debian/changelog lxc-1.0.0~alpha1/debian/changelog --- lxc-1.0.0~alpha1/debian/changelog 2013-11-12 17:46:36.000000000 +0000 +++ lxc-1.0.0~alpha1/debian/changelog 2013-11-26 17:58:06.000000000 +0000 @@ -1,8 +1,16 @@ -lxc (1.0.0~alpha1-0ubuntu13~ubuntu12.04.1) precise-backports; urgency=low +lxc (1.0.0~alpha1-0ubuntu14~ubuntu12.04.1) precise-backports; urgency=low - * No-change backport to precise (LP: #1250510) + * No-change backport to precise (LP: #1254874) - -- Iain Lane Tue, 12 Nov 2013 17:46:36 +0000 + -- Iain Lane Tue, 26 Nov 2013 17:58:06 +0000 + +lxc (1.0.0~alpha1-0ubuntu14) saucy-proposed; urgency=low + + * d/p/0014-lxc-start-if-we-pass-in-a-config-file-then-don-t-use.patch + fix lxc-start -with -f option to not use multiple configuration + files (LP: #1251352) + + -- Serge Hallyn Mon, 18 Nov 2013 10:08:53 -0600 lxc (1.0.0~alpha1-0ubuntu13) saucy-proposed; urgency=low diff -Nru lxc-1.0.0~alpha1/debian/patches/0014-lxc-start-if-we-pass-in-a-config-file-then-don-t-use.patch lxc-1.0.0~alpha1/debian/patches/0014-lxc-start-if-we-pass-in-a-config-file-then-don-t-use.patch --- lxc-1.0.0~alpha1/debian/patches/0014-lxc-start-if-we-pass-in-a-config-file-then-don-t-use.patch 1970-01-01 00:00:00.000000000 +0000 +++ lxc-1.0.0~alpha1/debian/patches/0014-lxc-start-if-we-pass-in-a-config-file-then-don-t-use.patch 2013-11-18 16:08:49.000000000 +0000 @@ -0,0 +1,86 @@ +commit 4df7f012b9994ea54b1ad68176d8d45a57fa02f3 +Author: Serge Hallyn +Date: Thu Nov 14 12:48:41 2013 -0600 + + lxc-start: if we pass in a config file, then don't use any loaded config + + To do this, add a c->clear_config() helper to the api. + + (this fixes the bug https://bugs.launchpad.net/bugs/1251352) + + Signed-off-by: Serge Hallyn + Acked-by: Stéphane Graber + +Index: lxc-1.0.0~alpha1/src/lxc/lxc_start.c +=================================================================== +--- lxc-1.0.0~alpha1.orig/src/lxc/lxc_start.c 2013-11-18 10:08:45.997286000 -0600 ++++ lxc-1.0.0~alpha1/src/lxc/lxc_start.c 2013-11-18 10:08:45.977286000 -0600 +@@ -187,6 +187,7 @@ + ERROR("Failed to create lxc_container"); + return err; + } ++ c->clear_config(c); + if (!c->load_config(c, rcfile)) { + ERROR("Failed to load rcfile"); + lxc_container_put(c); +Index: lxc-1.0.0~alpha1/src/lxc/lxccontainer.c +=================================================================== +--- lxc-1.0.0~alpha1.orig/src/lxc/lxccontainer.c 2013-11-18 10:08:45.997286000 -0600 ++++ lxc-1.0.0~alpha1/src/lxc/lxccontainer.c 2013-11-18 10:08:45.977286000 -0600 +@@ -972,6 +972,14 @@ + return true; + } + ++static void lxcapi_clear_config(struct lxc_container *c) ++{ ++ if (c && c->lxc_conf) { ++ lxc_conf_free(c->lxc_conf); ++ c->lxc_conf = NULL; ++ } ++} ++ + static bool lxcapi_destroy(struct lxc_container *c); + /* + * lxcapi_create: +@@ -1067,9 +1075,7 @@ + + // now clear out the lxc_conf we have, reload from the created + // container +- if (c->lxc_conf) +- lxc_conf_free(c->lxc_conf); +- c->lxc_conf = NULL; ++ lxcapi_clear_config(c); + + if (!prepend_lxc_header(c->configfile, tpath, argv)) { + ERROR("Error prepending header to configuration file"); +@@ -2269,8 +2275,7 @@ + if (ongoing_create(c) == 2) { + ERROR("Error: %s creation was not completed", c->name); + lxcapi_destroy(c); +- lxc_conf_free(c->lxc_conf); +- c->lxc_conf = NULL; ++ lxcapi_clear_config(c); + } + + // assign the member functions +@@ -2297,6 +2302,7 @@ + c->createl = lxcapi_createl; + c->shutdown = lxcapi_shutdown; + c->reboot = lxcapi_reboot; ++ c->clear_config = lxcapi_clear_config; + c->clear_config_item = lxcapi_clear_config_item; + c->get_config_item = lxcapi_get_config_item; + c->get_cgroup_item = lxcapi_get_cgroup_item; +Index: lxc-1.0.0~alpha1/src/lxc/lxccontainer.h +=================================================================== +--- lxc-1.0.0~alpha1.orig/src/lxc/lxccontainer.h 2013-11-18 10:08:45.997286000 -0600 ++++ lxc-1.0.0~alpha1/src/lxc/lxccontainer.h 2013-11-18 10:08:45.987286000 -0600 +@@ -82,6 +82,8 @@ + bool (*reboot)(struct lxc_container *c); + /* send SIGPWR. if timeout is not 0 or -1, do a hard stop after timeout seconds */ + bool (*shutdown)(struct lxc_container *c, int timeout); ++ /* completely clear a configuration */ ++ void (*clear_config)(struct lxc_container *c); + /* clear all network or capability items in the in-memory configuration */ + bool (*clear_config_item)(struct lxc_container *c, const char *key); + /* print a config item to a in-memory string allocated by the caller. Return diff -Nru lxc-1.0.0~alpha1/debian/patches/series lxc-1.0.0~alpha1/debian/patches/series --- lxc-1.0.0~alpha1/debian/patches/series 2013-10-25 20:44:24.000000000 +0000 +++ lxc-1.0.0~alpha1/debian/patches/series 2013-11-18 16:08:43.000000000 +0000 @@ -13,3 +13,4 @@ 0011-ubuntu-cloud-prep-hook-fix-debug-helper-to-not-inapp.patch 0012-ubuntu-Improper-pty-permissions.patch 0013-get-rid-of-lxcpath_anon-idea.patch +0014-lxc-start-if-we-pass-in-a-config-file-then-don-t-use.patch