This section may not be in tested and working shape as all active developers use Vagrant.

In order to build Tails manually, you need a running Debian Jessie system and some backports. Anything else will fail.

Dependencies

The following Debian packages need to be installed:

  • our live-build 2.x package, adapted for Wheezy and later. Its version is something like 3.0.5+really+is+2.0.12-0.tails2. One can install it from:

    deb http://deb.tails.boum.org/ builder-jessie main
    

    This APT repository's signing key can be found:

    It is certified by the Tails signing key, and its fingerprint is:

    221F 9A3C 6FA3 E09E 182E  060B C798 8EA7 A358 D82E
    

    You should pin that repository, so that live-build isn't upgraded to the version of jessie.

    #/etc/apt/preferences.d/00-builder-jessie-pinning
    Package: *
    Pin: release o=Debian,a=stable
    Pin-Priority: 700
    
    Package: *
    Pin: origin deb.tails.boum.org
    Pin-Priority: 800
    

    Then install these dependencies from Jessie:

    apt install \
      dpkg-dev \
      gettext \
      intltool \
      libfile-slurp-perl \
      liblist-moreutils-perl \
      libyaml-libyaml-perl \
      libyaml-perl \
      libyaml-syck-perl \
      perlmagick \
      po4a \
      syslinux-utils \
      time \
      whois
    

    And install these dependencies from jessie-backports (please verify manually that the following command actually does install the expected versions):

    apt install \
      debootstrap/jessie-backports \
      ikiwiki/jessie-backports
    

Configure live-build

Remove any line matching /^[[:space:]]*LB.*MIRROR.*=/ in /etc/live/build.conf.

Build process

Every build command must be run as root, at the root of a clone of the tails repository. A local HTTP proxy is required.

In short, a build shall be done using:

lb clean --all && lb config --apt-http-proxy http://localhost:3142 && 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

If you need to set custom build settings that are specific to your local environment, such as a custom Debian mirror or APT proxy, you probably want to configure live-build a bit.

The most common customizations are documented on this wiki:

  • to avoid compressing the SquashFS using XZ (efficient, but very slow), export MKSQUASHFS_OPTIONS='-comp gzip' in your build environment;
  • to avoid downloading lots of Debian packages during every build, you can use apt-cacher-ng; however, the build system constantly switches APT sources for our APT repositories, so some custom configuration is needed to make apt-cacher-ng useful: see the bits about apt-cacher-ng in vagrant/provision/assets/build-tails.

More documentation about this can be found in the Debian Live Manual.