~savilerow-team/savilerow/rtm-custom-tools

« back to all changes in this revision

Viewing changes to make_custom.sh

  • Committer: Chris Wayne
  • Date: 2014-09-23 00:36:57 UTC
  • Revision ID: chris.wayne@canonical.com-20140923003657-44hpbeluxo4ti7rg
Tools to create RTM custom tarball initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
set -ex
 
3
 
 
4
rm -rf out ||true
 
5
mkdir -p out
 
6
 
 
7
#get the closest thing i have to an RTM pbuilder
 
8
wget -nc http://people.canonical.com/~cwayne/rtm-armhf.tgz
 
9
 
 
10
#copy over features file to compile apparmor cache and sources.list pointing to RTM archives
 
11
cp features out/
 
12
cp sources.list out/
 
13
 
 
14
./click-sync.py --credentials-file ./auth s-jenkins.ubuntu-ci .
 
15
 
 
16
 
 
17
for i in `cat click_list`;do
 
18
        echo "copything $i to out/clicks"
 
19
        cp $i out/
 
20
done
 
21
 
 
22
#run the build.sh script from within a clean utopic/rtm armhf chroot
 
23
sudo pbuilder --execute --basetgz ./rtm-armhf.tgz  --bindmounts out -- build.sh
 
24
 
 
25
bzr branch lp:~savilerow-team/savilerow/mako-core-apps-rtm
 
26
 
 
27
cd out/mako-core-apps/src/system
 
28
 
 
29
#unpack the bits from the pbuilder step above (this should be cleaned up a bit)
 
30
tar zxvf ../../../custom.tgz
 
31
cd ../..
 
32
 
 
33
 
 
34
#build the custom tarball
 
35
mkdir build
 
36
# save the build ID as epoch seconds inside the tarball to facilitate updates
 
37
HMS=`echo $BUILD_ID | awk -F_ '{ print $2 }' | sed 's/-/:/g'`
 
38
DATE=`echo $BUILD_ID | awk -F_ ' { print $1 }'`
 
39
date -d "$DATE $HMS" +%s > build_id
 
40
cp build_id src/system/custom/
 
41
tar Jcvf build/custom.tar.xz --owner=root --group=root -C src/ system/
 
42
mv build_id build
 
43
cp src/ubuntu_command build