Build Configuration

From Whonix
Jump to navigation Jump to search

Non-Qubes-Whonix Build Configuration. APT Repository, Onion Sources, APT Cache, VM Settings, Skip Steps, Source Code Changes

Introduction[edit]

Usually the build configuration does not need to be changed. Whonix built from source code comes with safe defaults. The Derivative APT Repository will not be used.

The most interesting build configurations are documented in the following chapters.

If build configurations were used earlier, it might be better to delete the build configuration folder. A few example filenames may have changed since the last build.

Click = Copy Copied to clipboard! sudo rm -r /etc/buildconfig-dist.d

/etc/buildconfig-dist.d is a modular flexible .d style configuration folder.

Less popular build configurations are documented in the derivative-maker buildconfig.d folder and on the Dev/Source_Code_Intro#Build_Configuration page, but it is less user-friendly.

To avoid typos, it is best to copy and paste text when creating build configuration files. Take care that editors do not capitalize variable names which are supposed to be lower case during copy and paste procedures.

Note: All of the following build configuration steps are optional.

Platforms Choice[edit]

Advanced users can create 32-bit instead of 64-bit builds.

If you are interested, click on Expand on the right.

Derivative APT Repository[edit]

Non-Qubes-Whonix:
Whonix APT Repository is disabled by default [6] for builds from source code for reasons of Trust. Users can decide to update Whonix Debian packages by building them from source code (greater security). Alternatively, Whonix APT repository can be enabled right after building or after booting the build for the first time (greater convenience) using Whonix repository tool. To use the latter method which sacrifices security for convenience, click on Expand on the right side.

APT Onion Build Sources[edit]

For better build security, you can also use onions apt sources for building Whonix.

If you are interested, click on Expand on the right.

Torified or Host APT Cache[edit]

Using an apt cache will greatly improve build speed when building several times in a row (e.g. when debugging, during development). Whonix build script sets up an apt cache by default.

If you are interested in a torified apt-cacher-ng or host apt-cacher-ng, click on Expand on the right.

VM Settings[edit]

Various VM settings can optionally be changed.

tested: Virtual RAM, virtual video RAM, hard drive size

untested: filesystem, hostname, password This is only relevant for VM builds.

Build Variables Changes[edit]

It is possible to add build configuration files snippets which can change build variables.

Build Variables[edit]

build results binary folder (derivative-binary) | Click = Copy Copied to clipboard! binary_build_folder_dist | default: $HOMEVAR/derivative-binary

See #Build Variables Changes on how to set build variables.

Skip Steps[edit]

Advanced users can opt-in to skip certain build steps and/or Debian maintenance scripts (postinst, preinst, ...).

Source Code Changes[edit]

If changes were made to the derivative-maker source code folder, it is the easiest to use the following build parameter.


Footnotes[edit]

  1. State of official 64-bit buildsarchive.org iconarchive.today icon.
  2. Don't get confused by the term amd64. It runs on both, Intel and AMD. amd64 is only how Debian names the kernel. It works equally well on Intel and AMD.
  3. kFreeBSD (32-bit).
    --arch kfreebsd-i386 --kernel kfreebsd-image --headers kfreebsd-headers
    

    kFreeBSD (64-bit).

    --arch kfreebsd-amd64 --kernel kfreebsd-image --headers kfreebsd-headers
    
  4. https://github.com/grml/grml-debootstrap/pull/13archive.org iconarchive.today icon
  5. In this case, try installing the packages linux-image-amd64 and linux-headers-amd64 on your host, then boot the amd64 kernel by choosing it in the boot menu. The whole system does not require re-installation; just be sure to boot with an amd64 kernel. Alternatively, consider to re-install your host using amd64.
  6. Since Whonix 7.3.3
    • The first Click = Copy Copied to clipboard! ExecStart= is to disable the default ExecStart in /lib/systemd/system/apt-cacher-ng.service.
    • This is based on Click = Copy Copied to clipboard! /lib/systemd/system/apt-cacher-ng.service .
    • Only Click = Copy Copied to clipboard! torsocks is prepended in front of Click = Copy Copied to clipboard! /usr/sbin/apt-cacher-ng
    • No other changes.
  7. The anon-base-filesarchive.org iconarchive.today icon package will change this later on.
  8. Since you would have to either:
    • A) git commit your build config files, OR,
    • B) See chapter source code changes below.
  9. This is because .. means "one level below this folder".
  10. We are expanding a bash array.

We believe security software like Whonix needs to remain open source and independent. Would you help sustain and grow the project? Learn more about our 13 year success story and maybe DONATE!