mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
Merge branch 'buildserver-fixes-pre-kvm' into 'master'
buildserver fixes pre-KVM This is a collection of little fixes to the buildserver setup that I did while implementing the QEMU+KVM support. Since I was running the whole process repeatedly, I had opportunity to find and fix little things like this. See merge request !165
This commit is contained in:
commit
352c1ff448
7 changed files with 13 additions and 83 deletions
12
buildserver/Vagrantfile
vendored
12
buildserver/Vagrantfile
vendored
|
|
@ -4,7 +4,8 @@ configfile = YAML.load_file('Vagrantfile.yaml')
|
||||||
|
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
|
|
||||||
if Vagrant.has_plugin?("vagrant-cachier")
|
# these two caching methods conflict, so only use one at a time
|
||||||
|
if Vagrant.has_plugin?("vagrant-cachier") and not configfile.has_key? "aptcachedir"
|
||||||
config.cache.scope = :box
|
config.cache.scope = :box
|
||||||
config.cache.auto_detect = false
|
config.cache.auto_detect = false
|
||||||
config.cache.enable :apt
|
config.cache.enable :apt
|
||||||
|
|
@ -22,8 +23,6 @@ Vagrant.configure("2") do |config|
|
||||||
|
|
||||||
config.vm.boot_timeout = configfile['boot_timeout']
|
config.vm.boot_timeout = configfile['boot_timeout']
|
||||||
|
|
||||||
config.vm.provision :shell, :path => "fixpaths.sh"
|
|
||||||
|
|
||||||
if configfile.has_key? "aptproxy"
|
if configfile.has_key? "aptproxy"
|
||||||
config.vm.provision :shell, path: "provision-apt-proxy",
|
config.vm.provision :shell, path: "provision-apt-proxy",
|
||||||
args: [configfile["aptproxy"]]
|
args: [configfile["aptproxy"]]
|
||||||
|
|
@ -46,13 +45,6 @@ Vagrant.configure("2") do |config|
|
||||||
args: ["/home/vagrant/android-sdk"]
|
args: ["/home/vagrant/android-sdk"]
|
||||||
config.vm.provision "shell", path: "provision-apt-get-install",
|
config.vm.provision "shell", path: "provision-apt-get-install",
|
||||||
args: [configfile['debian_mirror']]
|
args: [configfile['debian_mirror']]
|
||||||
|
|
||||||
config.vm.provision :chef_solo do |chef|
|
|
||||||
chef.cookbooks_path = "cookbooks"
|
|
||||||
chef.log_level = :debug
|
|
||||||
chef.add_recipe "kivy"
|
|
||||||
end
|
|
||||||
|
|
||||||
config.vm.provision "shell", path: "provision-android-sdk"
|
config.vm.provision "shell", path: "provision-android-sdk"
|
||||||
config.vm.provision "shell", path: "provision-android-ndk",
|
config.vm.provision "shell", path: "provision-android-ndk",
|
||||||
args: ["/home/vagrant/android-ndk"]
|
args: ["/home/vagrant/android-ndk"]
|
||||||
|
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
|
|
||||||
%w{cython python-pygame python-pip python-virtualenv python-opengl python-gst0.10 python-enchant libgl1-mesa-dev libgles2-mesa-dev}.each do |pkg|
|
|
||||||
package pkg do
|
|
||||||
action :install
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
script "install-kivy" do
|
|
||||||
cwd "/tmp"
|
|
||||||
interpreter "bash"
|
|
||||||
code "
|
|
||||||
tar xf /vagrant/cache/Kivy-1.7.2.tar.gz
|
|
||||||
cd Kivy-1.7.2
|
|
||||||
python setup.py install
|
|
||||||
cd ..
|
|
||||||
rm -rf Kivy*
|
|
||||||
"
|
|
||||||
not_if "python -c 'import kivy'"
|
|
||||||
end
|
|
||||||
|
|
||||||
script "install-p4a" do
|
|
||||||
cwd "/home/vagrant"
|
|
||||||
interpreter "bash"
|
|
||||||
code "
|
|
||||||
git clone https://github.com/kivy/python-for-android
|
|
||||||
chown -R vagrant:vagrant python-for-android
|
|
||||||
cd python-for-android
|
|
||||||
git checkout ca369d774e2
|
|
||||||
"
|
|
||||||
not_if "test -d /home/vagrant/python-for-android"
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
echo $0
|
|
||||||
|
|
||||||
fixit()
|
|
||||||
{
|
|
||||||
#Fix sudoers so the PATH gets passed through, otherwise chef
|
|
||||||
#provisioning doesn't work.
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
export EDITOR=$0 && sudo -E visudo
|
|
||||||
else
|
|
||||||
echo "Fix sudoers"
|
|
||||||
echo "Defaults exempt_group=admin" >> $1
|
|
||||||
fi
|
|
||||||
#Stick the gems bin onto root's path as well.
|
|
||||||
sudo echo "PATH=$PATH:/var/lib/gems/1.8/bin" >>/root/.bashrc
|
|
||||||
# Restart sudo so it gets the changes straight away
|
|
||||||
sudo /etc/init.d/sudo restart
|
|
||||||
}
|
|
||||||
|
|
||||||
sudo grep "exempt_group" /etc/sudoers -q
|
|
||||||
if [ "$?" -eq "1" ]; then
|
|
||||||
fixit
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
@ -8,6 +8,9 @@ debian_mirror=$1
|
||||||
|
|
||||||
sed -i "s,http://ftp.uk.debian.org/debian/,${debian_mirror},g" /etc/apt/sources.list
|
sed -i "s,http://ftp.uk.debian.org/debian/,${debian_mirror},g" /etc/apt/sources.list
|
||||||
|
|
||||||
|
printf 'APT::Install-Recommends "0";\nAPT::Install-Suggests "0";\n' \
|
||||||
|
> /etc/apt/apt.conf.d/99no-install-recommends
|
||||||
|
|
||||||
if grep --quiet jessie /etc/apt/sources.list; then
|
if grep --quiet jessie /etc/apt/sources.list; then
|
||||||
echo "deb $debian_mirror jessie-backports main" > /etc/apt/sources.list.d/backports.list
|
echo "deb $debian_mirror jessie-backports main" > /etc/apt/sources.list.d/backports.list
|
||||||
fi
|
fi
|
||||||
|
|
@ -15,6 +18,7 @@ fi
|
||||||
dpkg --add-architecture i386
|
dpkg --add-architecture i386
|
||||||
|
|
||||||
apt-get -y update
|
apt-get -y update
|
||||||
|
apt-get -y upgrade --download-only
|
||||||
apt-get -y upgrade
|
apt-get -y upgrade
|
||||||
|
|
||||||
packages="
|
packages="
|
||||||
|
|
@ -50,7 +54,6 @@ packages="
|
||||||
librsvg2-bin
|
librsvg2-bin
|
||||||
libsaxonb-java
|
libsaxonb-java
|
||||||
libssl-dev
|
libssl-dev
|
||||||
libssl1.0.0
|
|
||||||
libstdc++6:i386
|
libstdc++6:i386
|
||||||
libtool
|
libtool
|
||||||
libtool-bin
|
libtool-bin
|
||||||
|
|
@ -88,8 +91,8 @@ packages="
|
||||||
zip
|
zip
|
||||||
zlib1g:i386
|
zlib1g:i386
|
||||||
"
|
"
|
||||||
|
apt-get install --yes $packages --download-only
|
||||||
apt-get install --yes --no-install-recommends $packages
|
apt-get install --yes $packages
|
||||||
|
|
||||||
highestjava=`update-java-alternatives --list | sort -n | tail -1 | cut -d ' ' -f 1`
|
highestjava=`update-java-alternatives --list | sort -n | tail -1 | cut -d ' ' -f 1`
|
||||||
update-java-alternatives --set $highestjava
|
update-java-alternatives --set $highestjava
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ if [ -z "$files" ]; then
|
||||||
PY_TEST_FILES="tests/*.TestCase"
|
PY_TEST_FILES="tests/*.TestCase"
|
||||||
SH_FILES="hooks/pre-commit"
|
SH_FILES="hooks/pre-commit"
|
||||||
BASH_FILES="fd-commit jenkins-build docs/update.sh completion/bash-completion buildserver/provision-*"
|
BASH_FILES="fd-commit jenkins-build docs/update.sh completion/bash-completion buildserver/provision-*"
|
||||||
RB_FILES="buildserver/cookbooks/*/recipes/*.rb buildserver/Vagrantfile"
|
RB_FILES="buildserver/Vagrantfile"
|
||||||
else
|
else
|
||||||
# if actually committing right now, then only run on the files
|
# if actually committing right now, then only run on the files
|
||||||
# that are going to be committed at this moment
|
# that are going to be committed at this moment
|
||||||
|
|
|
||||||
|
|
@ -63,12 +63,8 @@ echo "build_server_always = True" > config.py
|
||||||
# if it can't build fdroid, then its really broken
|
# if it can't build fdroid, then its really broken
|
||||||
../fdroid build --verbose --stop --latest org.fdroid.fdroid
|
../fdroid build --verbose --stop --latest org.fdroid.fdroid
|
||||||
# Gradle, JNI, preassemble
|
# Gradle, JNI, preassemble
|
||||||
../fdroid build --stop org.adaway:55
|
../fdroid build --verbose --stop org.adaway:55
|
||||||
# Maven
|
|
||||||
#../fdroid build --stop org.quantumbadger.redreader:55
|
|
||||||
# Custom build (make)
|
|
||||||
#../fdroid build --stop com.amaze.filemanager:29
|
|
||||||
# Uses verification
|
# Uses verification
|
||||||
#../fdroid build --stop info.guardianproject.checkey:101
|
../fdroid build --verbose --stop info.guardianproject.checkey:101
|
||||||
# Gradle with retrolambda (JDK7 and JDK8)
|
# building old versions should still work
|
||||||
#../fdroid build --stop com.moez.QKSMS:124
|
../fdroid build --verbose --stop org.fdroid.fdroid:96150
|
||||||
|
|
|
||||||
|
|
@ -243,8 +243,6 @@ cachefiles = [
|
||||||
'cfc61eda71f2d12a572822644ce13d2919407595c2aec3e3566d2aab6f97ef39'),
|
'cfc61eda71f2d12a572822644ce13d2919407595c2aec3e3566d2aab6f97ef39'),
|
||||||
('https://services.gradle.org/distributions/gradle-3.0-bin.zip',
|
('https://services.gradle.org/distributions/gradle-3.0-bin.zip',
|
||||||
'39c906941a474444afbddc38144ed44166825acb0a57b0551dddb04bbf157f80'),
|
'39c906941a474444afbddc38144ed44166825acb0a57b0551dddb04bbf157f80'),
|
||||||
('https://pypi.python.org/packages/source/K/Kivy/Kivy-1.7.2.tar.gz',
|
|
||||||
'0485e2ef97b5086df886eb01f8303cb542183d2d71a159466f99ad6c8a1d03f1'),
|
|
||||||
('https://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin',
|
('https://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin',
|
||||||
'102d6723f67ff1384330d12c45854315d6452d6510286f4e5891e00a5a8f1d5a'),
|
'102d6723f67ff1384330d12c45854315d6452d6510286f4e5891e00a5a8f1d5a'),
|
||||||
('https://dl.google.com/android/ndk/android-ndk-r9b-linux-x86_64.tar.bz2',
|
('https://dl.google.com/android/ndk/android-ndk-r9b-linux-x86_64.tar.bz2',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue