chiark / gitweb /
Various changes to get makebuildserver to work with a 64 bit base box
authorCiaran Gultnieks <ciaran@ciarang.com>
Fri, 1 Jul 2016 12:00:38 +0000 (12:00 +0000)
committerCiaran Gultnieks <ciaran@ciarang.com>
Fri, 1 Jul 2016 12:00:38 +0000 (12:00 +0000)
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.

buildserver/cookbooks/fdroidbuild-general/recipes/default.rb
fdroidserver/build.py

index 119c19e54a7619e537ea40414ec809af9f38e9af..9ea5f5085a747184537057b4a570eaf23b8ba5ed 100644 (file)
@@ -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
index 818f6c1f53fe8ef4890d11201f0620616c8e984a..eea35f0a8aa07a580ca19648635cf512508ddba2 100644 (file)
@@ -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)