Tails and its website are developed in numerous Git repositories.

Git is a distributed version control system. It allows several people to work on the same source code and handle changes in a distributed and efficient way.

Learn Git

To learn more about Git, refer to its homepage, and official documentation.

Here are a couple of links to get started with Git:

General information

GitLab

Most of our repositories live in our GitLab.

See the documentation about how we're using GitLab.

Git hosting setup at immerda

Some of our historical Git repositories live on https://git.tails.boum.org/, which is hosted by the immerda collective.

Documentation for our Git hosting setup at immerda:

Merge policy

See our merge policy.

Repositories

Main repository

This repository contains the Tails source code and the source of the website.

For instructions about cloning and forking this repository, visit it on GitLab.

We use Git submodules, so after cloning this repository, in your new Git clone's directory, run:

git submodule update --init

For more information about our usage of Git submodules, see the dedicated section.

Configuration

Developers with write access to the repositories should:

git config --global url.git@gitlab-ssh.tails.boum.org:.insteadOf \
   https://gitlab.tails.boum.org/

We also recommend the following setting in your Tails clone since it otherwise is too easy to forget pushing updated submodules:

git config push.recurseSubmodules check

Branches

Tails development uses several branches modeled a bit like the Debian development process. Here they are.

master

The master branch is mostly used to build the website. It is merged into devel and stable from time to time. We merge into master:

stable

The stable branch is intended to contain:

  • the state of the code tagged for the last stable release
  • fixes for security or important bugs.

Its purpose is to prepare bugfix releases.

testing

The testing branch is used to prepare an imminent major release: at some point of the development process, the devel branch code is merged into testing, frozen, and endures careful testing and bug-fixing until this branch is considered good enough to become a stable release. The testing branch is then merged into the stable and master ones, images built and shipped and we go back to code shiny new stuff in the devel branch.

Please note that the testing branch generally has not been granted the same testing and attention as code that has made it into a stable release: please use it for testing purposes but do not rely on it for anything. No guarantee, blablabla.

devel

Most of the development work that is done in Tails, is done in the devel branch. This branch will never get released; instead, code from it will be merged into testing and then into a real release.

Please note that the devel branch can be broken, have awful security problems and so on. No guarantee, blablabla.

The master branch is merged into devel from time to time.

Topic branches

We use topic branches called bugfix/* and feature/*, respectively aimed at fixing a single bug and implementing a single new feature. Once ready, a topic branch is merged (with --no-ff) into the appropriate branch (generally devel). Until it has been merged, a topic branch's history may be rewritten, e.g. it may be rebased on top of devel.

Unless there are good reasons to do otherwise, bugfix branches must be forked off the stable branch, while feature branches should be forked off the devel branch.

If you intend to work on a branch not really meant to be proposed to a merge at first, like an experimenting branch that you still want to push to share with other developers, you can prefix its name by the keyword wip/. It will make it clear to everyone that this branch shouldn't be merged before being renamed, and our Jenkins instance will not build nor test it, so you won't get notifications for a branch that you know is breaking the build and/or the test suite.

Promotion material

This repository contains Tails promotion material.

For instructions about cloning and forking this repository, visit it on GitLab.

Puppet code

Puppet manifests

Only Tails system administrators have access to our Puppet manifests. If you are not a member of that team, please skip to the Puppet modules section below.

  1. Configure your SSH client:

     Host git.puppet.tails.boum.org
         HostName d53ykjpeekuikgoq.onion
         ProxyCommand torsocks monkeysphere ssh-proxycommand %h %p
    
  2. Clone our private Puppet manifests repository:

     git clone gitolite@git.puppet.tails.boum.org:puppet-lizard-manifests && \
     git submodule update --init
    

All the Puppet modules we use are tracked as Git submodules in this repository.

Puppet modules

We use and publish a lot of other Puppet modules. Each of them is stored in a Git repository called puppet-$module. For example, puppet-tails is the main public Puppet module we use to manage Tails infrastructure, including classes such as tails::reprepro and tails::whisperback::relay.

If you are on the Tails system administration team, use the authoritative repositories for these modules at git.puppet.tails.boum.org:

  • They are referenced as Git submodules in our private Puppet manifests repository so you should have a local clone of them already.
  • Anything you push to these repositories (except tails_secrets_*) is automatically synchronized to public mirrors on our GitLab.
  • Do not push to the public mirrors: your changes would be overwritten by the next automatic synchronization.

Otherwise, you can list, browse and fork these repositories using their public mirrors.

Other repositories

Most other public Tails Git repositories are on our GitLab.

Submodules

We use Git submodules to track external repositories from the main Tails source tree.

The main practical consequence thereof so far, for most Tails contributors, is that one should generally run the following command after checking out a branch:

git submodule update --init

For more information, see:

Creating a new repository

In the vast majority of cases, your new repository will be hosted our GitLab.

If you want to modify files that are already in one of our Git repositories, create your own fork of this repository from your account on our GitLab.

Else, if you want a new repository for a different project or a new team, request it from the Tails system administrators. Include the following information in your request:

  • your GitLab user name
  • the preferred name of the new repository
  • which teams and individuals should have read access to this new repository
  • which teams and individuals should have write access to this new repository

Once your repository has been created, clone it:

  • If you want to encrypt the content of your new Git repository with OpenPGP, go through some arcane initialization ritual to reach wisdom, bliss and enlightenment.
  • Otherwise (lucky you!), find your new repository and instructions to clone it on GitLab.

Initializing a git-remote-gcrypt repository

Clone the new, empty repository in a way that tells Git it's going to be encrypted:

git clone gcrypt::git@gitlab.tails.boum.org:$REPOSITORY

Change directory into the newly cloned repository:

cd $REPOSITORY

Decide whether you want to hide to the immerda administrators which OpenPGP keys this repository will be encrypted for (note that this has severe usability drawbacks). Skip to the next step if you really want that. Otherwise:

git config gcrypt.publish-participants true

Tell Git which OpenPGP keys the repository will be encrypted for:

git config gcrypt.participants "LIST OF OPENPGP FINGERPRINTS"

Write some setup instructions for your team-mates, e.g. copy and paste the git config command(s) you have just run:

editor README

Add these setup instructions to the repository and commit:

git add README && git commit -m 'Add setup documentation.'

Push:

git push -u origin master

Troubleshooting

First, check with your team-mates: in some cases they can help you troubleshoot your problem, and confirm whether the problem is on your side or on the server side. If that is not enough, get in touch with the Tails system administrators.