From 1da89dc1f13182556233dbd69635fb5b9cbbeb9b Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Fri, 1 Jul 2016 12:00:38 +0000 Subject: [PATCH] Various changes to get makebuildserver to work with a 64 bit base box Note that the apt packages are split into two halves, because it takes too long (on 64 bit!) to install them all. The sensible fix would be to simply up the timeout on the package installation section, but this is completely broken in chef. --- .../fdroidbuild-general/recipes/default.rb | 23 +++++++++++++++++-- fdroidserver/build.py | 2 +- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/buildserver/cookbooks/fdroidbuild-general/recipes/default.rb b/buildserver/cookbooks/fdroidbuild-general/recipes/default.rb index 119c19e5..9ea5f508 100644 --- a/buildserver/cookbooks/fdroidbuild-general/recipes/default.rb +++ b/buildserver/cookbooks/fdroidbuild-general/recipes/default.rb @@ -11,6 +11,12 @@ execute "jessie_backports" do only_if "grep jessie /etc/apt/sources.list" end +if node['kernel']['machine'] == "x86_64" + execute "archi386" do + command "dpkg --add-architecture i386" + end +end + execute "apt-get-update" do command "apt-get update" end @@ -49,6 +55,13 @@ end libtool-bin make maven + }.each do |pkg| + package pkg do + action :install + end +end + +%w{ mercurial nasm openjdk-8-jdk-headless @@ -96,8 +109,14 @@ easy_install_package "compare-locales" do action :install end -execute "set-default-java" do - command "update-java-alternatives --set java-1.8.0-openjdk-i386" +if node['kernel']['machine'] == "x86_64" + execute "set-default-java" do + command "update-java-alternatives --set java-1.8.0-openjdk-amd64" + end +else + execute "set-default-java" do + command "update-java-alternatives --set java-1.8.0-openjdk-i386" + end end # Ubuntu trusty 14.04's paramiko does not work with jessie's openssh's default settings diff --git a/fdroidserver/build.py b/fdroidserver/build.py index 818f6c1f..eea35f0a 100644 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@ -271,7 +271,7 @@ def build_server(app, build, vcs, build_dir, output_dir, force): # Get an SFTP connection... ftp = sshs.open_sftp() - ftp.get_channel().settimeout(15) + ftp.get_channel().settimeout(60) # Put all the necessary files in place... ftp.chdir(homedir)