1 From: Stanislaw Kardach <stanislaw.kardach@cavium.com>
2 Date: Wed, 24 Feb 2016 20:04:03 +0100
3 Subject: [PATCH] build/install: Add arm64 deb repositories setup
5 If local MOS mirror patching is enabled, we need to regenerate the
6 repo metadata using apt-ftparchive.
9 Fixed non-existing paths for deb files, slightly refactoring our
12 FIXME: Use UBUNTU_ARCH env var instead of hardcoding the arch list.
13 While fixing that, also take care of missed s/trusty/mos9.0/g
16 Closes-bug: ARMBAND-163
18 Signed-off-by: Stanislaw Kardach <stanislaw.kardach@cavium.com>
19 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
21 build/f_isoroot/f_kscfg/ks.cfg.patch | 10 ++++++++++
22 build/install/apt-ftparchive-deb.conf | 9 ++++-----
23 build/install/apt-ftparchive-release.conf | 2 +-
24 build/install/apt-ftparchive-udeb.conf | 10 ++++------
25 build/install/install.sh | 22 ++++++++++++++++++----
26 build/install/uninstall.sh | 18 ++++++++++--------
27 6 files changed, 47 insertions(+), 24 deletions(-)
29 diff --git a/build/f_isoroot/f_kscfg/ks.cfg.patch b/build/f_isoroot/f_kscfg/ks.cfg.patch
30 index a6840e4..84a241f 100644
31 --- a/build/f_isoroot/f_kscfg/ks.cfg.patch
32 +++ b/build/f_isoroot/f_kscfg/ks.cfg.patch
34 *** /dev/null 2016-04-26 10:10:11.481587709 +0200
35 --- ks.cfg 2016-04-26 10:10:11.481587709 +0200
39 + cp ${SOURCE}/.treeinfo ${repodir}/centos/x86_64
41 + # Copying Ubuntu files
42 ++ # FIXME: This is missleading as dist/pool may contain multiple arch!
43 + mkdir -p ${repodir}/ubuntu/x86_64/images
44 + cp -r ${SOURCE}/ubuntu/dists ${repodir}/ubuntu/x86_64
45 + cp -r ${SOURCE}/ubuntu/pool ${repodir}/ubuntu/x86_64
49 diff --git a/build/install/apt-ftparchive-deb.conf b/build/install/apt-ftparchive-deb.conf
50 index edcb1f2..81ead2b 100644
51 --- a/build/install/apt-ftparchive-deb.conf
52 +++ b/build/install/apt-ftparchive-deb.conf
61 +Tree "dists/mos9.0" {
62 + Architectures "amd64 arm64";
66 -BinDirectory "pool/main" {
67 - Packages "dists/mos9.0/main/binary-amd64/Packages";
72 diff --git a/build/install/apt-ftparchive-release.conf b/build/install/apt-ftparchive-release.conf
73 index e40ff68..ceaf71a 100644
74 --- a/build/install/apt-ftparchive-release.conf
75 +++ b/build/install/apt-ftparchive-release.conf
76 @@ -13,6 +13,7 @@ APT::FTPArchive::Release::Label "mos9.0";
77 APT::FTPArchive::Release::Suite "mos9.0";
78 APT::FTPArchive::Release::Version "14.04";
79 APT::FTPArchive::Release::Codename "mos9.0";
80 -APT::FTPArchive::Release::Architectures "amd64";
81 +APT::FTPArchive::Release::Architectures "amd64 arm64";
82 APT::FTPArchive::Release::Components "main";
83 APT::FTPArchive::Release::Description "Ubuntu Trusty Tahr 14.04 LTS";
84 +APT::FTPArchive::Contents "no";
85 diff --git a/build/install/apt-ftparchive-udeb.conf b/build/install/apt-ftparchive-udeb.conf
86 index 3b5b239..8852db7 100644
87 --- a/build/install/apt-ftparchive-udeb.conf
88 +++ b/build/install/apt-ftparchive-udeb.conf
97 +Tree "dists/mos9.0" {
98 + Architectures "amd64 arm64";
102 -BinDirectory "pool/debian-installer" {
103 - Packages "dists/trusty/main/debian-installer/binary-amd64/Packages";
104 - BinOverride "./indices/override.trusty.main.debian-installer";
109 diff --git a/build/install/install.sh b/build/install/install.sh
110 index d1a49f3..0561207 100755
111 --- a/build/install/install.sh
112 +++ b/build/install/install.sh
113 @@ -122,12 +122,24 @@ prep_make_live() {
114 ssh-copy-id root@$FUELHOST
115 sshfs root@1${FUELHOST}:/ $TMP_HOSTMOUNT
117 - if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then
118 + for arch in arm64 amd64; do
119 + if [ -f $REPO/dists/trusty/main/binary-${arch}/Packages.backup ]; then
120 + echo "Error - found backup file for Packages for ${arch}!"
124 + if [ -f $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup ]; then
125 + echo "Error - found backup file for Packages.gz for ${arch}!"
130 + if [ -f $REPO/dists/trusty/main/binary-arm64/Packages.backup ]; then
131 echo "Error - found backup file for Packages!"
135 - if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then
136 + if [ -f $REPO/dists/trusty/main/binary-arm64/Packages.gz.backup ]; then
137 echo "Error - found backup file for Packages.gz!"
140 @@ -142,8 +154,10 @@ prep_make_live() {
144 - cp $REPO/dists/trusty/main/binary-amd64/Packages $REPO/dists/trusty/main/binary-amd64/Packages.backup
145 - cp $REPO/dists/trusty/main/binary-amd64/Packages.gz $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup
146 + for arch in arm64 amd64; do
147 + cp $REPO/dists/trusty/main/binary-${arch}/Packages $REPO/dists/trusty/main/binary-${arch}/Packages.backup
148 + cp $REPO/dists/trusty/main/binary-${arch}/Packages.gz $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup
150 cp $REPO/dists/trusty/Release $REPO/dists/trusty/Release.backup
151 cp -Rvp $DEST/etc/puppet $DEST/etc/puppet.backup
153 diff --git a/build/install/uninstall.sh b/build/install/uninstall.sh
154 index a9e74bc..e90c632 100755
155 --- a/build/install/uninstall.sh
156 +++ b/build/install/uninstall.sh
157 @@ -31,15 +31,17 @@ DEST=$MOUNT
158 REPO=$DEST/var/www/nailgun/ubuntu/fuelweb/x86_64
161 -if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then
162 - echo "Error - didn't find backup file for Packages!"
165 +for arch in arm64 amd64; do
166 + if [ ! -f $REPO/dists/trusty/main/binary-${arch}/Packages.backup ]; then
167 + echo "Error - didn't find backup file for Packages for ${arch}!"
171 -if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then
172 - echo "Error - didn't find backup file for Packages.gz!"
175 + if [ ! -f $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup ]; then
176 + echo "Error - didn't find backup file for Packages.gz for ${arch}!"
181 if [ ! -f $REPO/dists/trusty/Release.backup ]; then
182 echo "Error - didn't find backup file for Release!"