Revert "Makefile: Finalize RPM repo switch."
[armband.git] / patches / fuel-main / 0002-Allow-multi-arch-debian-mirrors.patch
1 From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
2 Date: Thu, 25 Feb 2016 23:58:58 +0100
3 Subject: [PATCH] Allow multi-arch debian mirrors
4
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).
12 ---
13  mirror/ubuntu/module.mk | 2 +-
14  sandbox.mk              | 2 +-
15  2 files changed, 2 insertions(+), 2 deletions(-)
16
17 diff --git a/mirror/ubuntu/module.mk b/mirror/ubuntu/module.mk
18 index 7a9466e..fe1ada2 100644
19 --- a/mirror/ubuntu/module.mk
20 +++ b/mirror/ubuntu/module.mk
21 @@ -81,7 +81,7 @@ $(BUILD_DIR)/mirror/ubuntu/mirror.done:
22         --root=$(MIRROR_MOS_UBUNTU_ROOT) \
23         --dist=$(MIRROR_MOS_UBUNTU_SUITE) \
24         --section=$(subst $(space),$(comma),$(MIRROR_MOS_UBUNTU_SECTION)) \
25 -       --arch=$(UBUNTU_ARCH) \
26 +       --arch=$(shell echo $(UBUNTU_ARCH) | tr ' ' ',') \
27         $(LOCAL_MIRROR_UBUNTU)/
28         rm -rf $(LOCAL_MIRROR_UBUNTU)/.temp $(LOCAL_MIRROR_UBUNTU)/project
29         $(ACTION.TOUCH)
30 diff --git a/sandbox.mk b/sandbox.mk
31 index cf3704b..18757a1 100644
32 --- a/sandbox.mk
33 +++ b/sandbox.mk
34 @@ -183,7 +183,7 @@ touch $(SANDBOX_UBUNTU)/etc/init.d/.legacy-bootordering
35  mkdir -p $(SANDBOX_UBUNTU)/usr/sbin
36  cp -a $(BUILD_DIR)/policy-rc.d $(SANDBOX_UBUNTU)/usr/sbin
37  echo "Running qemu-debootstrap"
38 -sudo qemu-debootstrap --no-check-gpg --include=ca-certificates --arch=$(UBUNTU_ARCH) $(MIRROR_UBUNTU_SUITE) $(SANDBOX_UBUNTU) $(MIRROR_UBUNTU_METHOD)://$(MIRROR_UBUNTU)$(MIRROR_UBUNTU_ROOT)
39 +sudo qemu-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)
40  if [ -e $(SANDBOX_UBUNTU)/etc/resolv.conf ]; then sudo cp -a $(SANDBOX_UBUNTU)/etc/resolv.conf $(SANDBOX_UBUNTU)/etc/resolv.conf.orig; fi
41  sudo cp /etc/resolv.conf $(SANDBOX_UBUNTU)/etc/resolv.conf
42  if [ -e $(SANDBOX_UBUNTU)/etc/hosts ]; then sudo cp -a $(SANDBOX_UBUNTU)/etc/hosts $(SANDBOX_UBUNTU)/etc/hosts.orig; fi