4 if [ `dirname $0` != "." ]; then
5 echo "only run this script like ./`basename $0`"
9 if [ -z $WORKSPACE ]; then
13 # make sure that no VirtualBox processes are left running
16 echo "$(date -u) - cleanup in progress..."
17 ps auxww | grep -e VBox -e qemu
18 cd $WORKSPACE/buildserver
23 killall -9 VBoxHeadless
24 echo "$(date -u) - cleanup done."
26 trap cleanup_all INT TERM EXIT
31 # make sure we have the vagrant box image cached
32 test -e ~/.cache/fdroidserver || mkdir -p ~/.cache/fdroidserver
33 cd ~/.cache/fdroidserver
34 wget --tries=1 --timeout=5 --continue https://f-droid.org/jessie64.box || true
35 echo "de3e3c4a9c13e8c015e30edeea0f583b195d1ee8ff9ad4814e933bbfb560200f jessie64.box" > jessie64.box.sha256
36 sha256sum -c jessie64.box.sha256
38 # redirect homes to be in the git repo, so they'll get cleaned and reset
39 export XDG_CONFIG_HOME=$WORKSPACE
40 export VBOX_USER_HOME=$WORKSPACE/VirtualBox
42 if which VBoxManage; then
43 VBoxManage setproperty machinefolder $WORKSPACE/virtualbox.d
44 VBoxManage setproperty logginglevel debug
46 export VAGRANT_HOME=$WORKSPACE/vagrant.d
50 echo "debian_mirror = 'http://ftp.uk.debian.org/debian/'" > $WORKSPACE/makebuildserver.config.py
51 echo "boot_timeout = 1200" >> $WORKSPACE/makebuildserver.config.py
52 echo "apt_package_cache = True" >> $WORKSPACE/makebuildserver.config.py
53 ./makebuildserver --verbose --clean
55 # this can be handled in the jenkins job, or here:
56 if [ -e fdroiddata ]; then
62 git clone --depth 1 https://gitlab.com/fdroid/fdroiddata.git fdroiddata
66 echo "build_server_always = True" > config.py
67 # if it can't build fdroid, then its really broken
68 ../fdroid build --verbose --stop --latest org.fdroid.fdroid
69 # Gradle, JNI, preassemble
70 ../fdroid build --verbose --stop org.adaway:55
72 ../fdroid build --verbose --stop info.guardianproject.checkey:101
73 # building old versions should still work
74 ../fdroid build --verbose --stop org.fdroid.fdroid:96150