[ARVADOS] updated: 3bd6252a86bc5fc8697c9d4accb12ff3d43ca021

git at public.curoverse.com git at public.curoverse.com
Mon Mar 10 17:13:51 EDT 2014


Summary of changes:
 docker/build.rb |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

       via  3bd6252a86bc5fc8697c9d4accb12ff3d43ca021 (commit)
      from  57b36a0ec32ba48689089bce6b8c449da2e57c40 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 3bd6252a86bc5fc8697c9d4accb12ff3d43ca021
Author: Tim Pierce <twp at curoverse.com>
Date:   Mon Mar 10 17:14:44 2014 -0400

    Fix bugs for Ubunto 12.04 and 13.10. (refs #2221)

diff --git a/docker/build.rb b/docker/build.rb
index 906178c..cf39da7 100755
--- a/docker/build.rb
+++ b/docker/build.rb
@@ -24,7 +24,15 @@ end
 #   Returns 'true' if IP forwarding is enabled in the kernel
 #
 def ip_forwarding_enabled?
-  %x(/sbin/sysctl --values net.ipv4.ip_forward) == "1\n"
+  %x(/sbin/sysctl -n net.ipv4.ip_forward) == "1\n"
+end
+
+def debootstrap_ok?
+  return system '/usr/sbin/debootstrap --version > /dev/null 2>&1'
+end
+
+def docker_ok?
+  return system 'docker images > /dev/null 2>&1'
 end
 
 def find_ssh_key key_name
@@ -68,12 +76,19 @@ if docker_path.empty?
   warn "Installation instructions for a variety of platforms can be found at"
   warn "http://docs.docker.io/en/latest/installation/"
   exit
-elsif not system 'docker images > /dev/null 2>&1'
+elsif not docker_ok?
   warn "WARNING: docker could not be run."
   warn "Please make sure that:"
   warn "  * You have permission to read and write /var/run/docker.sock"
   warn "  * a 'cgroup' volume is mounted on your machine"
   warn "  * the docker daemon is running"
+  exit
+end
+
+# Check that debootstrap is installed.
+if not debootstrap_ok?
+  warn "Installing debootstrap."
+  sudo '/usr/bin/apt-get', 'install', 'debootstrap'
 end
 
 # Generate a config.yml if it does not exist
@@ -108,7 +123,8 @@ end
 
 # If all prerequisites are met, go ahead and build.
 if ip_forwarding_enabled? and
-    not docker_path.empty? and
+    docker_ok? and
+    debootstrap_ok? and
     File.exists? 'config.yml'
   warn "Building Arvados."
   system '/usr/bin/make', *ARGV

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list