diff -Nru lxc-2.0.8/debian/changelog lxc-2.0.8/debian/changelog --- lxc-2.0.8/debian/changelog 2017-08-29 18:40:49.000000000 +0000 +++ lxc-2.0.8/debian/changelog 2017-09-06 16:10:37.000000000 +0000 @@ -1,3 +1,10 @@ +lxc (2.0.8-0ubuntu7.1) artful; urgency=medium + + * Cherrypick fixes for netplan to fix release-regressed autopkgtests and + unblock proposed migration of reverse-dependencies. + + -- Dimitri John Ledkov Wed, 06 Sep 2017 17:10:01 +0100 + lxc (2.0.8-0ubuntu7) artful; urgency=medium * Cherry-pick upstream fix: diff -Nru lxc-2.0.8/debian/patches/649f249cd086e2417e3e79d38de526b8cf590c4d.patch lxc-2.0.8/debian/patches/649f249cd086e2417e3e79d38de526b8cf590c4d.patch --- lxc-2.0.8/debian/patches/649f249cd086e2417e3e79d38de526b8cf590c4d.patch 1970-01-01 00:00:00.000000000 +0000 +++ lxc-2.0.8/debian/patches/649f249cd086e2417e3e79d38de526b8cf590c4d.patch 2017-09-06 16:08:49.000000000 +0000 @@ -0,0 +1,65 @@ +From 649f249cd086e2417e3e79d38de526b8cf590c4d Mon Sep 17 00:00:00 2001 +From: Dimitri John Ledkov +Date: Wed, 30 Aug 2017 13:45:27 +0100 +Subject: [PATCH] templates/ubuntu: support netplan in newer releases by + default +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +If netplan is present in the container, configure default networking +with neplan instead of ifupdown. Also, do not install ifupdown when +boostrapping minbase variant, unless using currently support +non-netplan releases (trusty, zenial, zesty). + +Signed-off-by: Dimitri John Ledkov +Acked-by: Christian Brauner +Acked-by: Stéphane Graber +--- + templates/lxc-ubuntu.in | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +diff --git a/templates/lxc-ubuntu.in b/templates/lxc-ubuntu.in +index dee136f2a..ec41fcd2a 100644 +--- a/templates/lxc-ubuntu.in ++++ b/templates/lxc-ubuntu.in +@@ -92,7 +92,15 @@ configure_ubuntu() + password=$5 + + # configure the network using the dhcp +- cat < $rootfs/etc/network/interfaces ++ if [ -d $rootfs/etc/netplan ]; then ++ cat < $rootfs/etc/netplan/10-lxc.yaml ++network: ++ ethernets: ++ eth0: {dhcp4: true} ++ version: 2 ++EOF ++ else ++ cat < $rootfs/etc/network/interfaces + # This file describes the network interfaces available on your system + # and how to activate them. For more information, see interfaces(5). + +@@ -103,6 +111,7 @@ iface lo inet loopback + auto eth0 + iface eth0 inet dhcp + EOF ++ fi + + # set the hostname + cat < $rootfs/etc/hostname +@@ -366,7 +375,13 @@ download_ubuntu() + debootstrap_parameters="$debootstrap_parameters --variant=$variant" + fi + if [ "$variant" = 'minbase' ]; then +- packages_template="${packages_template},sudo,ifupdown,isc-dhcp-client" ++ packages_template="${packages_template},sudo" ++ # Newer releases use netplan, EOL releases not supported ++ case $release in ++ trusty|xenial|zesty) ++ packages_template="${packages_template},ifupdown,isc-dhcp-client" ++ ;; ++ esac + fi + + echo "Installing packages in template: ${packages_template}" diff -Nru lxc-2.0.8/debian/patches/db3c8336ac89a0c7a1ea29c613c58dd91220e4e3.patch lxc-2.0.8/debian/patches/db3c8336ac89a0c7a1ea29c613c58dd91220e4e3.patch --- lxc-2.0.8/debian/patches/db3c8336ac89a0c7a1ea29c613c58dd91220e4e3.patch 1970-01-01 00:00:00.000000000 +0000 +++ lxc-2.0.8/debian/patches/db3c8336ac89a0c7a1ea29c613c58dd91220e4e3.patch 2017-09-06 16:09:20.000000000 +0000 @@ -0,0 +1,25 @@ +From db3c8336ac89a0c7a1ea29c613c58dd91220e4e3 Mon Sep 17 00:00:00 2001 +From: Dimitri John Ledkov +Date: Thu, 31 Aug 2017 12:40:58 +0100 +Subject: [PATCH] Check that there is netplan binary, rather than just just a + config directory. + +Signed-off-by: Dimitri John Ledkov +Signed-off-by: Christian Brauner +--- + templates/lxc-ubuntu.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/templates/lxc-ubuntu.in b/templates/lxc-ubuntu.in +index ec41fcd2a..80a28fd2a 100644 +--- a/templates/lxc-ubuntu.in ++++ b/templates/lxc-ubuntu.in +@@ -92,7 +92,7 @@ configure_ubuntu() + password=$5 + + # configure the network using the dhcp +- if [ -d $rootfs/etc/netplan ]; then ++ if chroot $rootfs which netplan >/dev/null 2>&1; then + cat < $rootfs/etc/netplan/10-lxc.yaml + network: + ethernets: diff -Nru lxc-2.0.8/debian/patches/series lxc-2.0.8/debian/patches/series --- lxc-2.0.8/debian/patches/series 2017-08-29 18:40:33.000000000 +0000 +++ lxc-2.0.8/debian/patches/series 2017-09-06 16:09:20.000000000 +0000 @@ -12,3 +12,5 @@ 0012-cgroups-handle-hybrid-cgroup-layouts.patch 0013-Make-must_make_path-available-to-cgroup_utils.patch 0014-templates-ubuntu-conditionally-move-upstart-ssh-job-.patch +649f249cd086e2417e3e79d38de526b8cf590c4d.patch +db3c8336ac89a0c7a1ea29c613c58dd91220e4e3.patch