summaryrefslogtreecommitdiffstats
path: root/Rakefile
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2012-09-07 12:27:18 +0200
committerTails developers <amnesia@boum.org>2012-09-07 17:47:25 +0200
commit7368ccf6727201b307add122016385e5ecd7a7c2 (patch)
tree2febad43b7afe63ab0982f3ce78fc10df8ead8ce /Rakefile
parent115a83d35b1e113f94a2685f3d916a7f809fb6ae (diff)
vagrant: store {stages,packages}_bootstrap on disk.
This will reduce the amount of ram needed when building inside a tmpfs by (currently) ~200 MiB, and may even speed up the build somewhat since the bootstrap stage can be restored.
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index 9a4f4b6..3c9fe33 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
@@ -32,7 +33,7 @@ VAGRANT_PATH = File.expand_path('../vagrant', __FILE__)
STABLE_BRANCH_NAMES = ['stable', 'testing']
# Environment variables that will be exported to the build script
-EXPORTED_VARIABLES = ['http_proxy', 'MKSQUASHFS_OPTIONS', 'TAILS_RAM_BUILD', 'TAILS_CLEAN_BUILD']
+EXPORTED_VARIABLES = ['http_proxy', 'MKSQUASHFS_OPTIONS', 'TAILS_RAM_BUILD', 'TAILS_CLEAN_BUILD', 'TAILS_BOOTSTRAP_CACHE']
# Let's save the http_proxy set before playing with it
EXTERNAL_HTTP_PROXY = ENV['http_proxy']
@@ -89,6 +90,9 @@ task :parse_build_options do
# Use in-VM proxy unless an external proxy is set
options += 'vmproxy ' unless EXTERNAL_HTTP_PROXY
+ # Use bootstrap cache by default
+ options += 'cache '
+
# Default to fast compression on development branches
options += 'gzipcomp ' unless stable_branch?
@@ -105,6 +109,11 @@ task :parse_build_options do
ENV['TAILS_RAM_BUILD'] = '1'
when 'noram'
ENV['TAILS_RAM_BUILD'] = nil
+ # Bootstrap cache settings
+ when 'cache'
+ ENV['TAILS_BOOTSTRAP_CACHE'] = '1'
+ when 'nocache'
+ ENV['TAILS_BOOTSTRAP_CACHE'] = nil
# HTTP proxy settings
when 'extproxy'
abort "No HTTP proxy set, but one is required by TAILS_BUILD_OPTIONS. Aborting." unless EXTERNAL_HTTP_PROXY