1 From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
2 Date: Wed, 24 Feb 2016 20:04:03 +0100
3 Subject: [PATCH] Add arm64 deb repositories setup
6 build/f_isoroot/f_kscfg/ks.cfg | 1 +
7 build/install/apt-ftparchive-deb.conf | 8 +++++++-
8 build/install/apt-ftparchive-release.conf | 2 +-
9 build/install/apt-ftparchive-udeb.conf | 7 ++++++-
10 build/install/install.sh | 22 ++++++++++++++++++----
11 build/install/uninstall.sh | 20 +++++++++++---------
12 6 files changed, 44 insertions(+), 16 deletions(-)
14 diff --git a/build/f_isoroot/f_kscfg/ks.cfg b/build/f_isoroot/f_kscfg/ks.cfg
15 index c93babe..30bad1d 100644
16 --- a/build/f_isoroot/f_kscfg/ks.cfg
17 +++ b/build/f_isoroot/f_kscfg/ks.cfg
18 @@ -448,6 +448,7 @@ cp -r ${SOURCE}/extra-repos ${repodir}/
19 cp ${SOURCE}/.treeinfo ${repodir}/centos/x86_64
21 # Copying Ubuntu files
22 +# FIXME: This is missleading as dist/pool may contain multiple arch!
23 mkdir -p ${repodir}/ubuntu/x86_64/images
24 cp -r ${SOURCE}/ubuntu/dists ${repodir}/ubuntu/x86_64
25 cp -r ${SOURCE}/ubuntu/pool ${repodir}/ubuntu/x86_64
26 diff --git a/build/install/apt-ftparchive-deb.conf b/build/install/apt-ftparchive-deb.conf
27 index 0d15aec..e6392f8 100644
28 --- a/build/install/apt-ftparchive-deb.conf
29 +++ b/build/install/apt-ftparchive-deb.conf
30 @@ -16,12 +16,18 @@ TreeDefault {
34 -BinDirectory "pool/main" {
35 +BinDirectory "pool/main/binary-amd64" {
36 Packages "dists/trusty/main/binary-amd64/Packages";
37 BinOverride "./indices/override.trusty.main";
38 ExtraOverride "./indices/override.trusty.extra.main";
41 +BinDirectory "pool/main/binary-arm64" {
42 + Packages "dists/trusty/main/binary-arm64/Packages";
43 + BinOverride "./indices/override.trusty.main";
44 + ExtraOverride "./indices/override.trusty.extra.main";
50 diff --git a/build/install/apt-ftparchive-release.conf b/build/install/apt-ftparchive-release.conf
51 index 02706bd..2838714 100644
52 --- a/build/install/apt-ftparchive-release.conf
53 +++ b/build/install/apt-ftparchive-release.conf
54 @@ -13,6 +13,6 @@ APT::FTPArchive::Release::Label "Ubuntu";
55 APT::FTPArchive::Release::Suite "trusty";
56 APT::FTPArchive::Release::Version "1.04";
57 APT::FTPArchive::Release::Codename "trusty";
58 -APT::FTPArchive::Release::Architectures "amd64";
59 +APT::FTPArchive::Release::Architectures "amd64 arm64";
60 APT::FTPArchive::Release::Components "main";
61 APT::FTPArchive::Release::Description "Ubuntu Trusty Tahr 14.04 LTS";
62 diff --git a/build/install/apt-ftparchive-udeb.conf b/build/install/apt-ftparchive-udeb.conf
63 index 3b5b239..c6ab4fb 100644
64 --- a/build/install/apt-ftparchive-udeb.conf
65 +++ b/build/install/apt-ftparchive-udeb.conf
66 @@ -16,11 +16,16 @@ TreeDefault {
70 -BinDirectory "pool/debian-installer" {
71 +BinDirectory "pool/debian-installer/binary-amd64" {
72 Packages "dists/trusty/main/debian-installer/binary-amd64/Packages";
73 BinOverride "./indices/override.trusty.main.debian-installer";
76 +BinDirectory "pool/debian-installer/binary-arm64" {
77 + Packages "dists/trusty/main/debian-installer/binary-arm64/Packages";
78 + BinOverride "./indices/override.trusty.main.debian-installer";
84 diff --git a/build/install/install.sh b/build/install/install.sh
85 index 4e0389e..8c29e08 100755
86 --- a/build/install/install.sh
87 +++ b/build/install/install.sh
88 @@ -122,12 +122,24 @@ prep_make_live() {
89 ssh-copy-id root@$FUELHOST
90 sshfs root@1${FUELHOST}:/ $TMP_HOSTMOUNT
92 - if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then
93 + for arch in arm64 amd64; do
94 + if [ -f $REPO/dists/trusty/main/binary-${arch}/Packages.backup ]; then
95 + echo "Error - found backup file for Packages for ${arch}!"
99 + if [ -f $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup ]; then
100 + echo "Error - found backup file for Packages.gz for ${arch}!"
105 + if [ -f $REPO/dists/trusty/main/binary-arm64/Packages.backup ]; then
106 echo "Error - found backup file for Packages!"
110 - if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then
111 + if [ -f $REPO/dists/trusty/main/binary-arm64/Packages.gz.backup ]; then
112 echo "Error - found backup file for Packages.gz!"
115 @@ -142,8 +154,10 @@ prep_make_live() {
119 - cp $REPO/dists/trusty/main/binary-amd64/Packages $REPO/dists/trusty/main/binary-amd64/Packages.backup
120 - cp $REPO/dists/trusty/main/binary-amd64/Packages.gz $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup
121 + for arch in arm64 amd64; do
122 + cp $REPO/dists/trusty/main/binary-${arch}/Packages $REPO/dists/trusty/main/binary-${arch}/Packages.backup
123 + cp $REPO/dists/trusty/main/binary-${arch}/Packages.gz $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup
125 cp $REPO/dists/trusty/Release $REPO/dists/trusty/Release.backup
126 cp -Rvp $DEST/etc/puppet $DEST/etc/puppet.backup
128 diff --git a/build/install/uninstall.sh b/build/install/uninstall.sh
129 index a9e74bc..0266e17 100755
130 --- a/build/install/uninstall.sh
131 +++ b/build/install/uninstall.sh
132 @@ -31,15 +31,17 @@ DEST=$MOUNT
133 REPO=$DEST/var/www/nailgun/ubuntu/fuelweb/x86_64
136 -if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then
137 - echo "Error - didn't find backup file for Packages!"
141 -if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then
142 - echo "Error - didn't find backup file for Packages.gz!"
145 +for arch in arm64 amd64; do
146 + if [ ! -f $REPO/dists/trusty/main/binary-${arch}/Packages.backup ]; then
147 + echo "Error - didn't find backup file for Packages for ${arch}!"
151 + if [ ! -f $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup ]; then
152 + echo "Error - didn't find backup file for Packages.gz for ${arch}!"
157 if [ ! -f $REPO/dists/trusty/Release.backup ]; then
158 echo "Error - didn't find backup file for Release!"