summaryrefslogtreecommitdiffstats
path: root/wiki/src/contribute/build.mdwn
diff options
context:
space:
mode:
Diffstat (limited to 'wiki/src/contribute/build.mdwn')
-rw-r--r--wiki/src/contribute/build.mdwn130
1 files changed, 99 insertions, 31 deletions
diff --git a/wiki/src/contribute/build.mdwn b/wiki/src/contribute/build.mdwn
index 5aa2005..b3affe8 100644
--- a/wiki/src/contribute/build.mdwn
+++ b/wiki/src/contribute/build.mdwn
@@ -11,22 +11,96 @@ Tails can be built easily in a virtual machine using [Rake], [Vagrant] and
[VirtualBox]. The process requires a minimum of 1 GB of free memory and a
maximum of 10 GB of free storage.
-Installing the needed tools on Debian Wheezy is a matter of:
-
- $ sudo apt-get install virtualbox vagrant rake
-
[Rake]: http://rake.rubyforge.org/
[Vagrant]: http://vagrantup.com/
[VirtualBox]: http://www.virtualbox.org/
-Then, please run:
+## Installing the dependencies in Debian
+
+### If you run Debian Jessie
+
+1. Add Debian unstable to your APT sources:
+
+ echo "deb http://ftp.us.debian.org/debian/ unstable main" | \
+ sudo tee /etc/apt/sources.list.d/unstable.list
+
+2. Pin all packages from Debian unstable at 500 (`apt_preferences(5)`):
+
+ sudo tee /etc/apt/preferences.d/unstable <<EOF
+ Package: *
+ Pin: release o=Debian,a=unstable
+ Pin-Priority: 500
+ EOF
+
+3. Install the needed tools:
+
+ sudo apt-get install git virtualbox rake ruby-childprocess \
+ ruby-erubis ruby-i18n ruby-log4r ruby-net-scp ruby bsdtar curl
+
+### If you run Debian Wheezy
+
+1. Add Debian Jessie, unstable and wheezy-backports to your APT sources:
+
+ echo "deb http://ftp.us.debian.org/debian/ jessie main" | \
+ sudo tee /etc/apt/sources.list.d/jessie.list
+ echo "deb http://ftp.us.debian.org/debian/ unstable main" | \
+ sudo tee /etc/apt/sources.list.d/unstable.list
+ echo "deb http://ftp.us.debian.org/debian/ wheezy-backports main" | \
+ sudo tee /etc/apt/sources.list.d/wheezy-backports.list
+
+2. Pin all packages from Debian Jessie and unstable at 500 (`apt_preferences(5)`):
+
+ sudo tee /etc/apt/preferences.d/jessie <<EOF
+ Package: *
+ Pin: release o=Debian,a=jessie
+ Pin-Priority: 500
+ EOF
+ sudo tee /etc/apt/preferences.d/unstable <<EOF
+ Package: *
+ Pin: release o=Debian,a=unstable
+ Pin-Priority: 500
+ EOF
+
+3. Install the needed tools:
- $ git clone git://git.tails.boum.org/tails
- $ cd tails
- $ git checkout devel
- $ export TAILS_BUILD_OPTIONS="noproxy"
- $ rake build
- $ unset TAILS_BUILD_OPTIONS
+ sudo apt-get install git virtualbox rake ruby-childprocess/jessie \
+ ruby-net-scp/jessie ruby-erubis ruby-i18n ruby-log4r bsdtar curl \
+ gettext/wheezy-backports
+
+### In both Debian Wheezy and Jessie
+
+At the moment Tails relies on a version of Vagrant (the 1.4.x series)
+that is not packaged in Debian any more. Here's a workaround for both
+Debian Wheezy and Jessie:
+
+ sudo tee /etc/apt/preferences.d/vagrant-1.4.3 <<EOF
+ Package: vagrant
+ Pin: version 1.4.3+dfsg1-3
+ Pin-Priority: 550
+
+ Package: ruby-net-ssh
+ Pin: version 1:2.6.8-2
+ Pin-Priority: 550
+ EOF
+ echo "deb http://snapshot.debian.org/archive/debian/20141010T042049Z/ unstable main" | \
+ sudo tee /etc/apt/sources.list.d/20141010T042049Z.list
+ sudo apt-get -o Acquire::Check-Valid-Until=false update
+ sudo apt-get install vagrant ruby-net-ssh
+ sudo rm /etc/apt/sources.list.d/20141010T042049Z.list
+ sudo apt-get update
+
+## Building Tails using Vagrant
+
+Once all dependencies are installed, get the Tails sources and
+checkout the development branch:
+
+ git clone git://git.tails.boum.org/tails
+ cd tails
+ git checkout devel
+
+Build Tails using Vagrant:
+
+ rake build
The first time, this can take a little while to download the base virtual
machine from Tails mirror (around 300 MB). It will then boot the machine,
@@ -36,7 +110,7 @@ should appear in the current directory.
After you are done working on Tails, do not forget to shut the virtual
machine down:
- $ rake vm:halt
+ rake vm:halt
One may also want to [[contribute/customize]] their image before building.
@@ -49,7 +123,7 @@ If you have a local HTTP proxy, the build system will use it as long as
you properly set the `http_proxy` environment variable. The easiest way to
do so is to run:
- $ export http_proxy=http://proxy.lan:3142
+ export http_proxy=http://proxy.lan:3142
This needs to be done before any other operations.
@@ -65,16 +139,16 @@ The following options are available:
### Memory build settings
Tails builds way faster when everything is done in memory. If your computer
-runs Linux and happens to have more than 6.5 GB of free memory before you
+runs Linux and happens to have more than 7 GB of free memory before you
start the virtual machine, it will automatically switch to 'build in RAM'
mode.
To force a specific behaviour please set:
- * **ram**: start the virtual machine with 6.5GB of memory, build Tails
+ * **ram**: start the virtual machine with 7 GB of memory, build Tails
inside a `tmpfs`. Build fails if the system is not in a proper state to
do so.
- * **noram**: start the virtual machine with 1GB of memory if not already
+ * **noram**: start the virtual machine with 512 MB of memory if not already
done, build Tails using the virtual machine hard disk.
### HTTP proxy settings
@@ -201,6 +275,7 @@ The following Debian packages need to be installed:
libyaml-syck-perl` so that the wiki builds smoothly.
* `dpkg-dev`
* `intltool`
+* `gettext` 0.18.3 or newer, available in wheezy-backports
Configure live-build
--------------------
@@ -216,9 +291,12 @@ Build process
Every build command must be run as `root`, at the root of a clone of the
[[`tails` repository|git]].
-In short, a build could be done using:
+In short, a build shall be done using:
- # lb clean --all && lb config && lb build
+ lb clean --all && lb config && lb build
+
+Running `lb config` or `lb build` in an environment that wasn't full
+cleaned first is not supported.
### Customize the build process if needed
@@ -233,23 +311,13 @@ The most common customizations are documented on this wiki:
build environment;
* [[using a custom Debian mirror to build Tails
images|build/custom_mirror]];
-* [[using squid-deb-proxy to build Tails images|build/squid-deb-proxy]].
+* [[using squid-deb-proxy to build Tails images|build/squid-deb-proxy]]
+ (**Note**: most Tails contributors using the manual build method
+ use [[!debpts apt-cacher-ng]] instead, nowadays.)
More documentation about this can be found in the [Debian Live
Manual](http://live.debian.net/manual-2.x/html/live-manual.en.html).
-### Initialize the Live system's configuration
-
-Initialize the Live system's configuration with `lb config` in a
-**clean** build tree. Most `lb config` options are supported, have a
-look to the `lb_config(1)` manpage for details.
-
-### Build the system
-
-You can then use the standard live-build commands as root to build
-the image (`lb build`) and to cleanup the build directory (`lb
-clean`).
-
More information
================