1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
From: Stanislaw Kardach <stanislaw.kardach@cavium.com>
Date: Wed, 24 Feb 2016 20:04:03 +0100
Subject: [PATCH] build/install: Add arm64 deb repositories setup
If local MOS mirror patching is enabled, we need to regenerate the
repo metadata using apt-ftparchive.
[ Alexandru Avadanii ]
Fixed non-existing paths for deb files, slightly refactoring our
approach.
FIXME: Use UBUNTU_ARCH env var instead of hardcoding the arch list.
While fixing that, also take care of missed s/trusty/mos9.0/g
in {un,}install.sh.
Closes-bug: ARMBAND-163
Signed-off-by: Stanislaw Kardach <stanislaw.kardach@cavium.com>
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
---
build/f_isoroot/f_kscfg/ks.cfg.patch | 10 ++++++++++
build/install/apt-ftparchive-deb.conf | 9 ++++-----
build/install/apt-ftparchive-release.conf | 2 +-
build/install/apt-ftparchive-udeb.conf | 10 ++++------
build/install/install.sh | 22 ++++++++++++++++++----
build/install/uninstall.sh | 18 ++++++++++--------
6 files changed, 47 insertions(+), 24 deletions(-)
diff --git a/build/f_isoroot/f_kscfg/ks.cfg.patch b/build/f_isoroot/f_kscfg/ks.cfg.patch
index a6840e4..84a241f 100644
--- a/build/f_isoroot/f_kscfg/ks.cfg.patch
+++ b/build/f_isoroot/f_kscfg/ks.cfg.patch
@@ -1,5 +1,15 @@
*** /dev/null 2016-04-26 10:10:11.481587709 +0200
--- ks.cfg 2016-04-26 10:10:11.481587709 +0200
***************
+*** 448,453 ****
+--- 448,454 ----
+ cp ${SOURCE}/.treeinfo ${repodir}/centos/x86_64
+
+ # Copying Ubuntu files
++ # FIXME: This is missleading as dist/pool may contain multiple arch!
+ mkdir -p ${repodir}/ubuntu/x86_64/images
+ cp -r ${SOURCE}/ubuntu/dists ${repodir}/ubuntu/x86_64
+ cp -r ${SOURCE}/ubuntu/pool ${repodir}/ubuntu/x86_64
+***************
*** 579,584 ****
--- 579,592 ----
diff --git a/build/install/apt-ftparchive-deb.conf b/build/install/apt-ftparchive-deb.conf
index edcb1f2..81ead2b 100644
--- a/build/install/apt-ftparchive-deb.conf
+++ b/build/install/apt-ftparchive-deb.conf
@@ -10,14 +10,13 @@
Dir {
ArchiveDir ".";
+ CacheDir "/tmp";
};
-TreeDefault {
+Tree "dists/mos9.0" {
+ Architectures "amd64 arm64";
Directory "pool";
-};
-
-BinDirectory "pool/main" {
- Packages "dists/mos9.0/main/binary-amd64/Packages";
+ Sections "main";
};
Default {
diff --git a/build/install/apt-ftparchive-release.conf b/build/install/apt-ftparchive-release.conf
index e40ff68..ceaf71a 100644
--- a/build/install/apt-ftparchive-release.conf
+++ b/build/install/apt-ftparchive-release.conf
@@ -13,6 +13,6 @@ APT::FTPArchive::Release::Label "mos9.0";
APT::FTPArchive::Release::Suite "mos9.0";
APT::FTPArchive::Release::Version "14.04";
APT::FTPArchive::Release::Codename "mos9.0";
-APT::FTPArchive::Release::Architectures "amd64";
APT::FTPArchive::Release::Components "main";
APT::FTPArchive::Release::Description "Ubuntu Trusty Tahr 14.04 LTS";
+APT::FTPArchive::Contents "no";
diff --git a/build/install/apt-ftparchive-udeb.conf b/build/install/apt-ftparchive-udeb.conf
index 3b5b239..8852db7 100644
--- a/build/install/apt-ftparchive-udeb.conf
+++ b/build/install/apt-ftparchive-udeb.conf
@@ -10,15 +10,13 @@
Dir {
ArchiveDir ".";
+ CacheDir "/tmp";
};
-TreeDefault {
+Tree "dists/mos9.0" {
+ Architectures "amd64 arm64";
Directory "pool";
-};
-
-BinDirectory "pool/debian-installer" {
- Packages "dists/trusty/main/debian-installer/binary-amd64/Packages";
- BinOverride "./indices/override.trusty.main.debian-installer";
+ Sections "main";
};
Default {
diff --git a/build/install/install.sh b/build/install/install.sh
index d1a49f3..0561207 100755
--- a/build/install/install.sh
+++ b/build/install/install.sh
@@ -122,12 +122,24 @@ prep_make_live() {
ssh-copy-id root@$FUELHOST
sshfs root@1${FUELHOST}:/ $TMP_HOSTMOUNT
- if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then
+ for arch in arm64 amd64; do
+ if [ -f $REPO/dists/trusty/main/binary-${arch}/Packages.backup ]; then
+ echo "Error - found backup file for Packages for ${arch}!"
+ exit 1
+ fi
+
+ if [ -f $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup ]; then
+ echo "Error - found backup file for Packages.gz for ${arch}!"
+ exit 1
+ fi
+ done
+
+ if [ -f $REPO/dists/trusty/main/binary-arm64/Packages.backup ]; then
echo "Error - found backup file for Packages!"
exit 1
fi
- if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then
+ if [ -f $REPO/dists/trusty/main/binary-arm64/Packages.gz.backup ]; then
echo "Error - found backup file for Packages.gz!"
exit 1
fi
@@ -142,8 +154,10 @@ prep_make_live() {
exit 1
fi
- cp $REPO/dists/trusty/main/binary-amd64/Packages $REPO/dists/trusty/main/binary-amd64/Packages.backup
- cp $REPO/dists/trusty/main/binary-amd64/Packages.gz $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup
+ for arch in arm64 amd64; do
+ cp $REPO/dists/trusty/main/binary-${arch}/Packages $REPO/dists/trusty/main/binary-${arch}/Packages.backup
+ cp $REPO/dists/trusty/main/binary-${arch}/Packages.gz $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup
+ done
cp $REPO/dists/trusty/Release $REPO/dists/trusty/Release.backup
cp -Rvp $DEST/etc/puppet $DEST/etc/puppet.backup
}
diff --git a/build/install/uninstall.sh b/build/install/uninstall.sh
index a9e74bc..e90c632 100755
--- a/build/install/uninstall.sh
+++ b/build/install/uninstall.sh
@@ -31,15 +31,17 @@ DEST=$MOUNT
REPO=$DEST/var/www/nailgun/ubuntu/fuelweb/x86_64
cd $REPO
-if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then
- echo "Error - didn't find backup file for Packages!"
- exit 1
-fi
+for arch in arm64 amd64; do
+ if [ ! -f $REPO/dists/trusty/main/binary-${arch}/Packages.backup ]; then
+ echo "Error - didn't find backup file for Packages for ${arch}!"
+ exit 1
+ fi
-if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then
- echo "Error - didn't find backup file for Packages.gz!"
- exit 1
-fi
+ if [ ! -f $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup ]; then
+ echo "Error - didn't find backup file for Packages.gz for ${arch}!"
+ exit 1
+ fi
+done
if [ ! -f $REPO/dists/trusty/Release.backup ]; then
echo "Error - didn't find backup file for Release!"
|