1 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2 : Copyright (c) 2017 Enea AB, Cavium and others.
4 : All rights reserved. This program and the accompanying materials
5 : are made available under the terms of the Apache License, Version 2.0
6 : which accompanies this distribution, and is available at
7 : http://www.apache.org/licenses/LICENSE-2.0
8 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
9 From: Stanislaw Kardach <stanislaw.kardach@cavium.com>
10 Date: Wed, 24 Feb 2016 20:04:03 +0100
11 Subject: [PATCH] build/install: Add arm64 deb repositories setup
13 If local MOS mirror patching is enabled, we need to regenerate the
14 repo metadata using apt-ftparchive.
16 [ Alexandru Avadanii ]
17 Fixed non-existing paths for deb files, slightly refactoring our
20 FIXME: Use UBUNTU_ARCH env var instead of hardcoding the arch list.
21 While fixing that, also take care of missed s/trusty/mos9.0/g
22 and/or s/xenial/mos10.0/g in {un,}install.sh.
24 Closes-bug: ARMBAND-163
26 Signed-off-by: Stanislaw Kardach <stanislaw.kardach@cavium.com>
27 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
29 build/f_isoroot/f_kscfg/ks.cfg.patch | 10 ++++++++++
30 build/install/apt-ftparchive-deb.conf | 9 ++++-----
31 build/install/apt-ftparchive-release.conf | 2 +-
32 build/install/apt-ftparchive-udeb.conf | 10 ++++------
33 build/install/install.sh | 22 ++++++++++++++++++----
34 build/install/uninstall.sh | 18 ++++++++++--------
35 6 files changed, 47 insertions(+), 24 deletions(-)
37 diff --git a/build/f_isoroot/f_kscfg/ks.cfg.patch b/build/f_isoroot/f_kscfg/ks.cfg.patch
38 index a6840e4..84a241f 100644
39 --- a/build/f_isoroot/f_kscfg/ks.cfg.patch
40 +++ b/build/f_isoroot/f_kscfg/ks.cfg.patch
42 *** /dev/null 2016-04-26 10:10:11.481587709 +0200
43 --- ks.cfg 2016-04-26 10:10:11.481587709 +0200
47 + cp ${SOURCE}/.treeinfo ${repodir}/centos/x86_64
49 + # Copying Ubuntu files
50 ++ # FIXME: This is missleading as dist/pool may contain multiple arch!
51 + mkdir -p ${repodir}/ubuntu/x86_64/images
52 + cp -r ${SOURCE}/ubuntu/dists ${repodir}/ubuntu/x86_64
53 + cp -r ${SOURCE}/ubuntu/pool ${repodir}/ubuntu/x86_64
57 diff --git a/build/install/apt-ftparchive-deb.conf b/build/install/apt-ftparchive-deb.conf
58 index edcb1f2..81ead2b 100644
59 --- a/build/install/apt-ftparchive-deb.conf
60 +++ b/build/install/apt-ftparchive-deb.conf
69 +Tree "dists/mos10.0" {
70 + Architectures "amd64 arm64";
74 -BinDirectory "pool/main" {
75 - Packages "dists/mos10.0/main/binary-amd64/Packages";
80 diff --git a/build/install/apt-ftparchive-release.conf b/build/install/apt-ftparchive-release.conf
81 index e40ff68..ceaf71a 100644
82 --- a/build/install/apt-ftparchive-release.conf
83 +++ b/build/install/apt-ftparchive-release.conf
84 @@ -13,6 +13,7 @@ APT::FTPArchive::Release::Label "mos10.0";
85 APT::FTPArchive::Release::Suite "mos10.0";
86 APT::FTPArchive::Release::Version "16.04";
87 APT::FTPArchive::Release::Codename "mos10.0";
88 -APT::FTPArchive::Release::Architectures "amd64";
89 +APT::FTPArchive::Release::Architectures "amd64 arm64";
90 APT::FTPArchive::Release::Components "main";
91 APT::FTPArchive::Release::Description "Ubuntu 16.04.1 LTS";
92 +APT::FTPArchive::Contents "no";
93 diff --git a/build/install/apt-ftparchive-udeb.conf b/build/install/apt-ftparchive-udeb.conf
94 index 3b5b239..8852db7 100644
95 --- a/build/install/apt-ftparchive-udeb.conf
96 +++ b/build/install/apt-ftparchive-udeb.conf
105 +Tree "dists/mos10.0" {
106 + Architectures "amd64 arm64";
110 -BinDirectory "pool/debian-installer" {
111 - Packages "dists/xenial/main/debian-installer/binary-amd64/Packages";
112 - BinOverride "./indices/override.xenial.main.debian-installer";
117 diff --git a/build/install/install.sh b/build/install/install.sh
118 index d1a49f3..0561207 100755
119 --- a/build/install/install.sh
120 +++ b/build/install/install.sh
121 @@ -122,12 +122,24 @@ prep_make_live() {
122 ssh-copy-id root@$FUELHOST
123 sshfs root@1${FUELHOST}:/ $TMP_HOSTMOUNT
125 - if [ -f $REPO/dists/xenial/main/binary-amd64/Packages.backup ]; then
126 + for arch in arm64 amd64; do
127 + if [ -f $REPO/dists/xenial/main/binary-${arch}/Packages.backup ]; then
128 + echo "Error - found backup file for Packages for ${arch}!"
132 + if [ -f $REPO/dists/xenial/main/binary-${arch}/Packages.gz.backup ]; then
133 + echo "Error - found backup file for Packages.gz for ${arch}!"
138 + if [ -f $REPO/dists/xenial/main/binary-arm64/Packages.backup ]; then
139 echo "Error - found backup file for Packages!"
143 - if [ -f $REPO/dists/xenial/main/binary-amd64/Packages.gz.backup ]; then
144 + if [ -f $REPO/dists/xenial/main/binary-arm64/Packages.gz.backup ]; then
145 echo "Error - found backup file for Packages.gz!"
148 @@ -142,8 +154,10 @@ prep_make_live() {
152 - cp $REPO/dists/xenial/main/binary-amd64/Packages $REPO/dists/xenial/main/binary-amd64/Packages.backup
153 - cp $REPO/dists/xenial/main/binary-amd64/Packages.gz $REPO/dists/xenial/main/binary-amd64/Packages.gz.backup
154 + for arch in arm64 amd64; do
155 + cp $REPO/dists/xenial/main/binary-${arch}/Packages $REPO/dists/xenial/main/binary-${arch}/Packages.backup
156 + cp $REPO/dists/xenial/main/binary-${arch}/Packages.gz $REPO/dists/xenial/main/binary-${arch}/Packages.gz.backup
158 cp $REPO/dists/xenial/Release $REPO/dists/xenial/Release.backup
159 cp -Rvp $DEST/etc/puppet $DEST/etc/puppet.backup
161 diff --git a/build/install/uninstall.sh b/build/install/uninstall.sh
162 index a9e74bc..e90c632 100755
163 --- a/build/install/uninstall.sh
164 +++ b/build/install/uninstall.sh
165 @@ -31,15 +31,17 @@ DEST=$MOUNT
166 REPO=$DEST/var/www/nailgun/ubuntu/fuelweb/x86_64
169 -if [ ! -f $REPO/dists/xenial/main/binary-amd64/Packages.backup ]; then
170 - echo "Error - didn't find backup file for Packages!"
173 +for arch in arm64 amd64; do
174 + if [ ! -f $REPO/dists/xenial/main/binary-${arch}/Packages.backup ]; then
175 + echo "Error - didn't find backup file for Packages for ${arch}!"
179 -if [ ! -f $REPO/dists/xenial/main/binary-amd64/Packages.gz.backup ]; then
180 - echo "Error - didn't find backup file for Packages.gz!"
183 + if [ ! -f $REPO/dists/xenial/main/binary-${arch}/Packages.gz.backup ]; then
184 + echo "Error - didn't find backup file for Packages.gz for ${arch}!"
189 if [ ! -f $REPO/dists/xenial/Release.backup ]; then
190 echo "Error - didn't find backup file for Release!"