diff --git a/install_files/ansible-base/group_vars/all/securedrop b/install_files/ansible-base/group_vars/all/securedrop index 8bacd2117fa..36808559c7a 100644 --- a/install_files/ansible-base/group_vars/all/securedrop +++ b/install_files/ansible-base/group_vars/all/securedrop @@ -51,3 +51,5 @@ appserver_dependencies: - apparmor-utils - redis-server - supervisor + +tor_apt_repo_url: http://tor-apt.freedom.press diff --git a/install_files/ansible-base/roles/common/templates/security.list b/install_files/ansible-base/roles/common/templates/security.list index 3da170bbda0..c78d12a7900 100644 --- a/install_files/ansible-base/roles/common/templates/security.list +++ b/install_files/ansible-base/roles/common/templates/security.list @@ -3,4 +3,4 @@ deb-src http://security.ubuntu.com/ubuntu trusty-security main deb http://security.ubuntu.com/ubuntu trusty-security universe deb-src http://security.ubuntu.com/ubuntu trusty-security universe deb [arch=amd64] {{ apt_repo_url }} trusty main -deb http://deb.torproject.org/torproject.org trusty main +deb {{ tor_apt_repo_url }} trusty main diff --git a/install_files/ansible-base/roles/tor-hidden-services/tasks/install_tor.yml b/install_files/ansible-base/roles/tor-hidden-services/tasks/install_tor.yml index d5c55348aab..2a0cb7e58e3 100644 --- a/install_files/ansible-base/roles/tor-hidden-services/tasks/install_tor.yml +++ b/install_files/ansible-base/roles/tor-hidden-services/tasks/install_tor.yml @@ -9,7 +9,8 @@ - name: Setup Tor apt repo. apt_repository: - repo: deb http://deb.torproject.org/torproject.org {{ ansible_lsb.codename }} main + filename: deb_torproject_org_torproject_org + repo: deb {{ tor_apt_repo_url }} {{ ansible_lsb.codename }} main state: present register: add_tor_apt_repo tags: diff --git a/install_files/securedrop-app-code/DEBIAN/postinst b/install_files/securedrop-app-code/DEBIAN/postinst index 4948873494e..81ccfbedd23 100755 --- a/install_files/securedrop-app-code/DEBIAN/postinst +++ b/install_files/securedrop-app-code/DEBIAN/postinst @@ -58,6 +58,13 @@ case "$1" in rm /tmp/securedrop_custom_logo.png fi + # Repoint tor repositories to FPF mirror + for file in "sources.list.d/deb_torproject_org_torproject_org.list" "security.list" + do + if [ -f "/etc/apt/$file" ]; then + sed -i 's/deb.torproject.org\/torproject.org/tor-apt.ops.freedom.press/g' "/etc/apt/$file" + fi + done ;; abort-upgrade|abort-remove|abort-deconfigure)