Tor Build ================= Installing build dependencies ----------------------------- To build Tor, you need a Linux distribution that has support for runc (such as Debian jessie, Ubuntu 16.04, Fedora 20, etc ...). On Debian jessie, the runc package is available in backports. On Debian stretch, the runc package is available in the main repository. Your user account should have sudo access, which is required to be able to extract container file systems, start containers and copy files to and from containers. The sources of most components are downloaded using git, which needs to be installed. You also need a few perl modules installed: - YAML::XS - File::Basename - Getopt::Long - Template - IO::Handle - IO::CaptureOutput - JSON - File::Temp - Path::Tiny - File::Path - File::Copy::Recursive - String::ShellQuote - Sort::Versions - Digest::SHA - Data::UUID - Data::Dump If you are running Debian or Ubuntu, you can install them with: # apt-get install libyaml-libyaml-perl libtemplate-perl \ libio-handle-util-perl libio-all-perl \ libio-captureoutput-perl libjson-perl libpath-tiny-perl \ libstring-shellquote-perl libsort-versions-perl \ libdigest-sha-perl libdata-uuid-perl libdata-dump-perl \ libfile-copy-recursive-perl git libgtk2.0-dev curl runc \ mercurial The build system is based on rbm, which is included as a git submodule in the rbm/ directory. You can fetch the rbm git submodule by running 'make submodule-update'. Starting a build ---------------- To start a build, run one of the following commands, depending on the channel you want to build: $ make release You can find the build result in the directory release/$version If you want to build for a specific platform only, append the platform name to the makefile target: $ make release-linux-x86_64 $ make release-linux-i686 $ make release-windows-i686 $ make release-osx-x86_64 Number of make processes ------------------------ By default the builds are run with 4 processes simultaneously (with make -j4). If you want to change the number of processes used, you can set the RBM_NUM_PROCS environment variable: $ export RBM_NUM_PROCS=8 You can also set the buildconf/num_procs option in rbm.local.conf. Automated builds ---------------- If the build fails, a shell will automatically open in the build container to help you debug the problem. You probably want to disable this if you want to do automated builds. To disable this, set the RBM_NO_DEBUG environment variable to 1: export RBM_NO_DEBUG=1 Or set the debug option to 0 in the rbm.local.conf file. Cleaning obsolete files and containers images --------------------------------------------- You can run 'make clean' to clean old build files and containers that are no longer used in current builds. Before doing that, you need to configure the branches and build targets you are using in the rbm.local.conf file. The cleaning script will check out all the configured branches to create a list of used build files, and delete the files from the 'out' directory that are not used. If you want to see the list of files and containers that would be removed without doing it, you can use 'make clean-dry-run'. Description of makefile rules ----------------------------- You can find a description of the makefile rules in the README.MAKEFILE file.