Merge "submodule: Kill fuel-astute"
[armband.git] / patches / opnfv-fuel / 0020-Add-arm64-deb-repositories-setup.patch
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
4
5 ---
6  build/f_isoroot/f_kscfg/ks.cfg.patch      | 10 ++++++++++
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                | 18 ++++++++++--------
12  6 files changed, 52 insertions(+), 15 deletions(-)
13
14 diff --git a/build/f_isoroot/f_kscfg/ks.cfg.patch b/build/f_isoroot/f_kscfg/ks.cfg.patch
15 index a6840e4..e1ae8fc 100644
16 --- a/build/f_isoroot/f_kscfg/ks.cfg.patch
17 +++ b/build/f_isoroot/f_kscfg/ks.cfg.patch
18 @@ -1,6 +1,16 @@
19  *** /dev/null  2016-04-26 10:10:11.481587709 +0200
20  --- ks.cfg     2016-04-26 10:10:11.481587709 +0200
21  ***************
22 +*** 448,453 ****
23 +--- 448,454 ----
24 +  cp ${SOURCE}/.treeinfo ${repodir}/centos/x86_64
25 +  
26 +  # Copying Ubuntu files
27 ++ # FIXME: This is missleading as dist/pool may contain multiple arch!
28 +  mkdir -p ${repodir}/ubuntu/x86_64/images
29 +  cp -r ${SOURCE}/ubuntu/dists ${repodir}/ubuntu/x86_64
30 +  cp -r ${SOURCE}/ubuntu/pool ${repodir}/ubuntu/x86_64
31 +***************
32  *** 579,584 ****
33  --- 579,592 ----
34    
35 diff --git a/build/install/apt-ftparchive-deb.conf b/build/install/apt-ftparchive-deb.conf
36 index 0d15aec..e6392f8 100644
37 --- a/build/install/apt-ftparchive-deb.conf
38 +++ b/build/install/apt-ftparchive-deb.conf
39 @@ -16,12 +16,18 @@ TreeDefault {
40    Directory "pool";
41  };
42  
43 -BinDirectory "pool/main" {
44 +BinDirectory "pool/main/binary-amd64" {
45    Packages "dists/trusty/main/binary-amd64/Packages";
46    BinOverride "./indices/override.trusty.main";
47    ExtraOverride "./indices/override.trusty.extra.main";
48  };
49  
50 +BinDirectory "pool/main/binary-arm64" {
51 +  Packages "dists/trusty/main/binary-arm64/Packages";
52 +  BinOverride "./indices/override.trusty.main";
53 +  ExtraOverride "./indices/override.trusty.extra.main";
54 +};
55 +
56  Default {
57    Packages {
58      Extensions ".deb";
59 diff --git a/build/install/apt-ftparchive-release.conf b/build/install/apt-ftparchive-release.conf
60 index 02706bd..2838714 100644
61 --- a/build/install/apt-ftparchive-release.conf
62 +++ b/build/install/apt-ftparchive-release.conf
63 @@ -13,6 +13,6 @@ APT::FTPArchive::Release::Label "Ubuntu";
64  APT::FTPArchive::Release::Suite "trusty";
65  APT::FTPArchive::Release::Version "1.04";
66  APT::FTPArchive::Release::Codename "trusty";
67 -APT::FTPArchive::Release::Architectures "amd64";
68 +APT::FTPArchive::Release::Architectures "amd64 arm64";
69  APT::FTPArchive::Release::Components "main";
70  APT::FTPArchive::Release::Description "Ubuntu Trusty Tahr 14.04 LTS";
71 diff --git a/build/install/apt-ftparchive-udeb.conf b/build/install/apt-ftparchive-udeb.conf
72 index 3b5b239..c6ab4fb 100644
73 --- a/build/install/apt-ftparchive-udeb.conf
74 +++ b/build/install/apt-ftparchive-udeb.conf
75 @@ -16,11 +16,16 @@ TreeDefault {
76    Directory "pool";
77  };
78  
79 -BinDirectory "pool/debian-installer" {
80 +BinDirectory "pool/debian-installer/binary-amd64" {
81    Packages "dists/trusty/main/debian-installer/binary-amd64/Packages";
82    BinOverride "./indices/override.trusty.main.debian-installer";
83  };
84  
85 +BinDirectory "pool/debian-installer/binary-arm64" {
86 +  Packages "dists/trusty/main/debian-installer/binary-arm64/Packages";
87 +  BinOverride "./indices/override.trusty.main.debian-installer";
88 +};
89 +
90  Default {
91    Packages {
92      Extensions ".udeb";
93 diff --git a/build/install/install.sh b/build/install/install.sh
94 index 4e0389e..8c29e08 100755
95 --- a/build/install/install.sh
96 +++ b/build/install/install.sh
97 @@ -122,12 +122,24 @@ prep_make_live() {
98      ssh-copy-id root@$FUELHOST
99      sshfs root@1${FUELHOST}:/ $TMP_HOSTMOUNT
100  
101 -    if [ -f  $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then
102 +    for arch in arm64 amd64; do
103 +    if [ -f  $REPO/dists/trusty/main/binary-${arch}/Packages.backup ]; then
104 +        echo "Error - found backup file for Packages for ${arch}!"
105 +        exit 1
106 +    fi
107 +
108 +    if [ -f  $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup ]; then
109 +        echo "Error - found backup file for Packages.gz for ${arch}!"
110 +        exit 1
111 +    fi
112 +    done
113 +
114 +    if [ -f  $REPO/dists/trusty/main/binary-arm64/Packages.backup ]; then
115          echo "Error - found backup file for Packages!"
116          exit 1
117      fi
118  
119 -    if [ -f  $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then
120 +    if [ -f  $REPO/dists/trusty/main/binary-arm64/Packages.gz.backup ]; then
121          echo "Error - found backup file for Packages.gz!"
122          exit 1
123      fi
124 @@ -142,8 +154,10 @@ prep_make_live() {
125          exit 1
126      fi
127  
128 -    cp $REPO/dists/trusty/main/binary-amd64/Packages $REPO/dists/trusty/main/binary-amd64/Packages.backup
129 -    cp $REPO/dists/trusty/main/binary-amd64/Packages.gz $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup
130 +    for arch in arm64 amd64; do
131 +        cp $REPO/dists/trusty/main/binary-${arch}/Packages $REPO/dists/trusty/main/binary-${arch}/Packages.backup
132 +        cp $REPO/dists/trusty/main/binary-${arch}/Packages.gz $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup
133 +    done
134      cp $REPO/dists/trusty/Release $REPO/dists/trusty/Release.backup
135      cp -Rvp $DEST/etc/puppet $DEST/etc/puppet.backup
136  }
137 diff --git a/build/install/uninstall.sh b/build/install/uninstall.sh
138 index a9e74bc..e90c632 100755
139 --- a/build/install/uninstall.sh
140 +++ b/build/install/uninstall.sh
141 @@ -31,15 +31,17 @@ DEST=$MOUNT
142  REPO=$DEST/var/www/nailgun/ubuntu/fuelweb/x86_64
143  
144  cd $REPO
145 -if [ ! -f  $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then
146 -    echo "Error - didn't find backup file for Packages!"
147 -    exit 1
148 -fi
149 +for arch in arm64 amd64; do
150 +    if [ ! -f  $REPO/dists/trusty/main/binary-${arch}/Packages.backup ]; then
151 +        echo "Error - didn't find backup file for Packages for ${arch}!"
152 +        exit 1
153 +    fi
154  
155 -if [ ! -f  $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then
156 -    echo "Error - didn't find backup file for Packages.gz!"
157 -    exit 1
158 -fi
159 +    if [ ! -f  $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup ]; then
160 +        echo "Error - didn't find backup file for Packages.gz for ${arch}!"
161 +        exit 1
162 +    fi
163 +done
164  
165  if [ ! -f  $REPO/dists/trusty/Release.backup ]; then
166      echo "Error - didn't find backup file for Release!"