{{Header}} {{#seo: |description={{non_q_project_name_long}} Build Configuration. APT Repository, Onion Sources, APT Cache, VM Settings, Skip Steps, Source Code Changes |image=Buildconfiguration12354.png }} [[File:Buildconfiguration12354.png|thumb]] {{intro| {{non_q_project_name_short}} Build Configuration. APT Repository, Onion Sources, APT Cache, VM Settings, Skip Steps, Source Code Changes }} Note: All of the following build configuration steps are optional. {{#widget:Expand or Collapse All}} =Introduction=
sudo rm -r /etc/buildconfig-dist.dAlternatively, experts can manually examine the {{Code2|/etc/buildconfig-dist.d}} folder and change its contents to suit their preferences. {{Code2|/etc/buildconfig-dist.d}} is a [[Configuration_Files|modular flexible .d style configuration folder]]. Less popular build configurations are documented in the {{Code2|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.
7.3.3
for builds from source code for reasons of [[Trust]]. Users can decide to update {{project_name_short}} Debian packages by building them from source code (greater security). Alternatively, {{project_name_short}} APT repository can be enabled right after building or after booting the build for the first time (greater convenience) using [[Project-APT-Repository|{{project_name_short}} repository tool]]. To use the latter method which sacrifices security for convenience, click on Expand on the right side.
stable
repository the following command line option can be used.
{{CodeSelect|code=
--repo true
}}
Other settings can be set using an environment variable or [[Dev/Source_Code_Intro#Build_Configuration|build configuration]]. Below are examples using an environment variable.
{{CodeSelect|code=
DERIVATIVE_APT_REPOSITORY_OPTS='--enable --repository stable'
}}
{{CodeSelect|code=
DERIVATIVE_APT_REPOSITORY_OPTS='--enable --repository testers'
}}
{{CodeSelect|code=
DERIVATIVE_APT_REPOSITORY_OPTS='--enable --repository developers'
}}
{{CodeSelect|code=
DERIVATIVE_APT_REPOSITORY_OPTS='--enable --codename {{Stable_project_version_based_on_Debian_codename}}'
}}
Add an environment variable as one normally does on that specific Linux platform. For example, to enable the {{project_name_short}} stable repository during build, you could set DERIVATIVE_APT_REPOSITORY_OPTS
by interjecting it between sudo
and the ./derivative-maker
command. Below is an example. Do not use [...]
. Replace it with other chosen build parameters (such as --build
, --target
etc.) after ./derivative-maker
.
{{CodeSelect|code=
sudo DERIVATIVE_APT_REPOSITORY_OPTS='--enable --repository stable' ./derivative-maker [...]
}}
--connection onion
--connection onion
.
* When building inside [[Whonix]], this is not required.
{{mbox
| image = [[File:Ambox_warning_pn.svg.png|40px]]
| text =
Note, this neither torifies all of the build script's connections nor hides Tor from your ISP! See {{whonix_wiki
|wikipage=Dev/Build Anonymity
|text=Build Anonymity
}}.
}}
The goal of this is to torify apt-cacher-ng
using torsocks
so it will be able to connect to onions.
'''Note:''' This is currently broken. No fix available. [[Undocumented]].
'''1.''' Install apt-cacher-ng
, torsocks
and tor
.
sudo apt install apt-cacher-ng torsocks tor'''2.''' Create folder apt-cacher-ng systemd drop-in folder
/lib/systemd/system/apt-cacher-ng.service.d
.
sudo mkdir -p /lib/systemd/system/apt-cacher-ng.service.d'''3.''' {{Open with root rights| filename=/lib/systemd/system/apt-cacher-ng.service.d/50_user.conf }} '''4.''' Add. * The first {{CodeSelect|code=ExecStart=|inline=true}} is to disable the default
ExecStart
in /lib/systemd/system/apt-cacher-ng.service
.
* This is based on {{CodeSelect|code=/lib/systemd/system/apt-cacher-ng.service|inline=true}}.
* Only {{CodeSelect|code=torsocks|inline=true}} is prepended in front of {{CodeSelect|code=/usr/sbin/apt-cacher-ng|inline=true}}
* No other changes.
{{CodeSelect|code=
[Service]
ExecStart=
ExecStart=torsocks /usr/sbin/apt-cacher-ng SocketPath=/run/apt-cacher-ng/socket -c /etc/apt-cacher-ng ForeGround=1
}}
'''5.''' Save.
'''6.''' Reload systemd.
{{CodeSelect|code=
sudo systemctl daemon-reload
}}
'''7.''' Restart apt-cacher-ng.
{{CodeSelect|code=
sudo systemctl restart apt-cacher-ng
}}
'''8.''' Done.
The process of torification of apt-cacher-ng has been completed.
'''9.''' Broken!
{{CodeSelect|code=/etc/tor/torsocks.conf}} add:
{{CodeSelect|code=
AllowInbound 1
AllowOutboundLocalhost 1
}}
But this is also insufficient.
{{CodeSelect|code=sudo journalctl -f -u apt-cacher-ng}}
shows errors:
WARNING torsocks[17645]: Config file not found: /etc/tor/torsocks.conf. Using default for Tor (in config_file_read() at config-file.c:583) Couldn't listen on socket: Operation not permitted Error creating socket: Function not implementedNo fix available. Help welcome. }} }} {{Box|text= '''host apt-cacher-ng''' This is probably only useful for developers. Most users will not need the complexity of an apt-cacher-ng running outside of the VM which runs derivative-maker or on another computer. {{Box|text= Be sure to have a firewall, so the whole internet cannot use the apt-cacher-ng service. When building inside a non-Whonix VM, an apt cache can be used on the host. In that case, adjust the IP accordingly and manually test that it is reachable. When building inside a ({{project_name_short}}) VM, just install the apt cache inside the VM and point to a localhost apt cache. Prepend
REPO_PROXY=http://127.0.0.1:3142
before the build command.
Replace the IP 127.0.0.1
with the IP address of your host. For security reasons, this should only be done over LAN and not over the internet.
sudo REPO_PROXY=http://127.0.0.1:3142 ./derivative-maker ...}} }}