[lxc-devel] [lxc/master] lxc-ubuntu: Fix building on secondary architectures

stgraber on Github lxc-bot at linuxcontainers.org
Wed Mar 30 05:26:39 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 353 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160330/40c92dfe/attachment.bin>
-------------- next part --------------
From aec6a20578095967baa4dc5095a95098824f013e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 30 Mar 2016 01:25:53 -0400
Subject: [PATCH] lxc-ubuntu: Fix building on secondary architectures
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 templates/lxc-ubuntu.in | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/templates/lxc-ubuntu.in b/templates/lxc-ubuntu.in
index 2e1eb55..06ce8ce 100644
--- a/templates/lxc-ubuntu.in
+++ b/templates/lxc-ubuntu.in
@@ -39,8 +39,6 @@ export PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
 
 set -e
 
-MIRROR=${MIRROR:-http://archive.ubuntu.com/ubuntu}
-SECURITY_MIRROR=${SECURITY_MIRROR:-http://security.ubuntu.com/ubuntu}
 LOCALSTATEDIR="@LOCALSTATEDIR@"
 LXC_TEMPLATE_CONFIG="@LXCTEMPLATECONFIG@"
 # Allows the lxc-cache directory to be set by environment variable
@@ -333,6 +331,17 @@ download_ubuntu()
     arch=$2
     release=$3
 
+    case $2 in
+      amd64|i386)
+            MIRROR=${MIRROR:-http://archive.ubuntu.com/ubuntu}
+            SECURITY_MIRROR=${SECURITY_MIRROR:-http://security.ubuntu.com/ubuntu}
+            ;;
+      *)
+            MIRROR=${MIRROR:-http://ports.ubuntu.com/ubuntu-ports}
+            SECURITY_MIRROR=${SECURITY_MIRROR:-http://ports.ubuntu.com/ubuntu-ports}
+            ;;
+    esac
+
     packages_template=${packages_template:-"ssh,vim"}
     debootstrap_parameters=
 


More information about the lxc-devel mailing list