1 From: Stanislaw Kardach <stanislaw.kardach@cavium.com>
2 Date: Thu, 25 Feb 2016 13:31:19 +0100
3 Subject: repo mirror: Allow multi-arch local mirrors
5 This patch allows specifying multiple architectures via UBUNTU_ARCH in
6 form of a list of space separated architectures. The first architecture
7 in the list is considered primary and will be used for building all the
8 deb packages by fuel-main. Additional architectures are added to allow
9 targets of other architectures to use the mirror.
10 NOTE: this imposes a requirement that all packages built are arch
11 independent (which is true so far).
13 Signed-off-by: Stanislaw Kardach <stanislaw.kardach@cavium.com>
14 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
16 mirror/ubuntu/module.mk | 2 +-
19 3 files changed, 3 insertions(+), 3 deletions(-)
21 diff --git a/mirror/ubuntu/module.mk b/mirror/ubuntu/module.mk
22 index 7a9466e..fe1ada2 100644
23 --- a/mirror/ubuntu/module.mk
24 +++ b/mirror/ubuntu/module.mk
25 @@ -81,7 +81,7 @@ $(BUILD_DIR)/mirror/ubuntu/mirror.done:
26 --root=$(MIRROR_MOS_UBUNTU_ROOT) \
27 --dist=$(MIRROR_MOS_UBUNTU_SUITE) \
28 --section=$(subst $(space),$(comma),$(MIRROR_MOS_UBUNTU_SECTION)) \
29 - --arch=$(UBUNTU_ARCH) \
30 + --arch=$(shell echo $(UBUNTU_ARCH) | tr ' ' ',') \
31 $(LOCAL_MIRROR_UBUNTU)/
32 rm -rf $(LOCAL_MIRROR_UBUNTU)/.temp $(LOCAL_MIRROR_UBUNTU)/project
34 diff --git a/sandbox.mk b/sandbox.mk
35 index 4bc3962..5ffddbd 100644
38 @@ -188,7 +188,7 @@ touch $(SANDBOX_UBUNTU)/etc/init.d/.legacy-bootordering
39 mkdir -p $(SANDBOX_UBUNTU)/usr/sbin
40 cp -a $(BUILD_DIR)/policy-rc.d $(SANDBOX_UBUNTU)/usr/sbin
41 echo "Running debootstrap"
42 -sudo debootstrap --no-check-gpg --include=ca-certificates --arch=$(UBUNTU_ARCH) $(MIRROR_UBUNTU_SUITE) $(SANDBOX_UBUNTU) $(MIRROR_UBUNTU_METHOD)://$(MIRROR_UBUNTU)$(MIRROR_UBUNTU_ROOT)
43 +sudo debootstrap --no-check-gpg --include=ca-certificates --arch=$(word 1,$(UBUNTU_ARCH)) $(MIRROR_UBUNTU_SUITE) $(SANDBOX_UBUNTU) $(MIRROR_UBUNTU_METHOD)://$(MIRROR_UBUNTU)$(MIRROR_UBUNTU_ROOT)
44 if [ -e $(SANDBOX_UBUNTU)/etc/resolv.conf ]; then sudo cp -a $(SANDBOX_UBUNTU)/etc/resolv.conf $(SANDBOX_UBUNTU)/etc/resolv.conf.orig; fi
45 sudo cp /etc/resolv.conf $(SANDBOX_UBUNTU)/etc/resolv.conf
46 if [ -e $(SANDBOX_UBUNTU)/etc/hosts ]; then sudo cp -a $(SANDBOX_UBUNTU)/etc/hosts $(SANDBOX_UBUNTU)/etc/hosts.orig; fi
47 diff --git a/config.mk b/config.mk
48 index 74ee039..45a3b30 100644
51 @@ -49,7 +49,7 @@ UBUNTU_MINOR:=04
52 UBUNTU_RELEASE_NUMBER:=$(UBUNTU_MAJOR).$(UBUNTU_MINOR)
53 UBUNTU_KERNEL_FLAVOR?=lts-trusty
54 UBUNTU_NETBOOT_FLAVOR?=netboot
57 UBUNTU_IMAGE_RELEASE:=$(UBUNTU_MAJOR)$(UBUNTU_MINOR)
58 SEPARATE_IMAGES?=/boot,ext2 /,ext4