Commit 428b94d9 authored by Tails developers's avatar Tails developers

Remove bootstrap stage usage option from Vagrant (Will-fix: #8725)

It introduces complexity and potential for strange build
inconsistencies for a meager reduction in build time.
parent ecb75555
......@@ -34,7 +34,7 @@ VAGRANT_PATH = File.expand_path('../vagrant', __FILE__)
STABLE_BRANCH_NAMES = ['stable', 'testing']
# Environment variables that will be exported to the build script
# Let's save the http_proxy set before playing with it
......@@ -167,10 +167,6 @@ task :parse_build_options do
when 'noram'
# Bootstrap cache settings
when 'cache'
when 'nocache'
# HTTP proxy settings
when 'extproxy'
abort "No HTTP proxy set, but one is required by TAILS_BUILD_OPTIONS. Aborting." unless EXTERNAL_HTTP_PROXY
......@@ -20,15 +20,6 @@ usable_memory() {
free -b | awk '/cache:/ { print $4 }'
bootstrap_stage_is_ok() {
[ -d "$1" ] || return 1
[ "$(sudo du -sm $1 | cut -f1)" -ge 100 ] || return 1
for dir in bin dev etc lib proc root sbin sys usr var; do
[ -d "$1/$dir" ] || return 1
return 0
cleanup() {
[ -n "$BUILD_DIR" ] || return 0
cd /
......@@ -95,7 +86,6 @@ install -m 0755 -d "$ARTIFACTS_DIR"
if [ "$TAILS_CLEAN_BUILD" ]; then
as_root_do lb clean --all
sudo rm -rf /var/cache/stages_bootstrap
......@@ -111,16 +101,6 @@ fi
as_root_do lb config --cache-packages false
bootstrap_stage_is_ok /var/cache/stages_bootstrap; then
# restore bootstrap stage and make live-build use it
sudo mkdir -p "$BUILD_DIR"/cache/stages_bootstrap
sudo mount --bind /var/cache/stages_bootstrap \
sudo touch "$BUILD_DIR"/.stage/bootstrap
sudo touch "$BUILD_DIR"/.stage/
as_root_do lb build
if [ -n "$JENKINS_URL" ]; then
......@@ -152,11 +132,3 @@ if [ -n "$JENKINS_URL" ]; then
ln -sf "${ISO}${EXT}" "$ARTIFACTS_DIR/latest.iso${EXT}"
! sudo umount "$BUILD_DIR"/cache/stages_bootstrap 2>/dev/null; then
# the cached bootstrap stage wasn't used (maybe it hadn't been
# cached yet?) so we save the good one from the current build.
sudo rsync -a --delete "$BUILD_DIR"/cache/stages_bootstrap/ \
......@@ -166,26 +166,6 @@ The following flags can be used to force a specific behaviour:
if a local HTTP proxy is set.
* **noproxy**: do not use any HTTP proxy.
### Bootstrap cache settings
A Tails build starts with `debootstrap`:ing a minimal Debian system
which then is modified into a full Tails system. This is a rather time
consuming step that usually does not have to be done: the packages used
in it rarely get updated and hence the result is exactly the same most
of the time.
The following flags can be used to force a specific behaviour:
* **cache**: re-use a cached bootstrap stage (if available), and saves
the bootstrap stage to disk on successful build. This will also
reduce the amount of memory required for in-memory builds by around
150 MiB (see the **ram** option above). **Warning:** this option may
create subtle differences between builds from the exact same Tails
source which are hard to track to track and understand. Use this
option only if you know what you are doing, and if you are not
building an actual release.
* **nocache**: do the bootstrap stage from scratch (default).
### SquashFS compression settings
One of the most expensive operations when building Tails is the creation
......@@ -204,7 +184,6 @@ Forcing a specific behaviour can be done using:
Some operations are preserved accross builds. Currently they are:
* The wiki (for documentation).
* The bootstrap stage cache (see the **cache** option above).
In case you want to delete all these, the following option is available:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment