Skip to content

Commit

Permalink
Swap tor apt repo to point to our mirror
Browse files Browse the repository at this point in the history
This addresses issue #2106 - mitigate side-effects from a tor package
breaking securedrop instances in the field.

The actual logic that creates our mirror is in source control in another repo.
  • Loading branch information
msheiny authored and Conor Schaefer committed Sep 28, 2017
1 parent e3fea98 commit 1957c6d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions install_files/ansible-base/group_vars/all/securedrop
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ appserver_dependencies:
- redis-server
- supervisor

tor_apt_repo_url: http://tor-apt.ops.freedom.press
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions install_files/securedrop-app-code/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,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)
Expand Down

0 comments on commit 1957c6d

Please sign in to comment.