Commit a5bd73ca authored by anonym's avatar anonym
Browse files

Merge remote-tracking branch 'origin/feature/11556-apt-with-onions' into devel

Fix-committed: #11556
parents a4bd4a3b e2510fae
......@@ -20,7 +20,7 @@ s{
/[0-9]{10} # serial
/?
(\s+)
}{$1tor+http://ftp.us.debian.org/debian/$2}xms;
}{$1tor+http://vwakviie2ienjx6t.onion/debian/$2}xms;
s{
^
......@@ -30,7 +30,7 @@ s{
/[0-9]{10} # serial
/?
(\s+)
}{$1tor+http://security.debian.org/$2}xms;
}{$1tor+http://sgvtcaew4bxjd7ln.onion/$2}xms;
s{
^
......@@ -40,7 +40,7 @@ s{
/[0-9]{10} # serial
/?
(\s+)
}{$1tor+http://deb.torproject.org/torproject.org/$2}xms;
}{$1tor+http://sdscoq7snqtznauu.onion/torproject.org/$2}xms;
### Tagged snapshots
......@@ -52,7 +52,7 @@ s{
/debian
/?
(\s+)
}{$1tor+http://ftp.us.debian.org/debian/$2}xms;
}{$1tor+http://vwakviie2ienjx6t.onion/debian/$2}xms;
s{
^
......@@ -62,7 +62,7 @@ s{
/debian-security
/?
(\s+)
}{$1tor+http://security.debian.org/$2}xms;
}{$1tor+http://sgvtcaew4bxjd7ln.onion/$2}xms;
s{
^
......@@ -72,6 +72,16 @@ s{
/torproject
/?
(\s+)
}{$1tor+http://deb.torproject.org/torproject.org/$2}xms;
}{$1tor+http://sdscoq7snqtznauu.onion/torproject.org/$2}xms;
### Custom APT repository
s{
^
(deb(?:-src)?\s+)
tor[+]https?://deb[.]tails[.]boum[.]org
/?
(\s+)
}{$1tor+http://jenw7xbd6tf7vfhp.onion/$2}xms;
' | perl -pi - /etc/apt/sources.list /etc/apt/sources.list.d/*.list
......@@ -9,15 +9,17 @@ Feature: Installing packages through APT
Given I have started Tails from DVD and logged in with an administration password and the network is connected
Scenario: APT sources are configured correctly
Then the only hosts in APT sources are "ftp.us.debian.org,security.debian.org,deb.tails.boum.org,deb.torproject.org"
Then the only hosts in APT sources are "vwakviie2ienjx6t.onion,sgvtcaew4bxjd7ln.onion,jenw7xbd6tf7vfhp.onion,sdscoq7snqtznauu.onion"
@check_tor_leaks
Scenario: Install packages using apt
When I update APT using apt
When I configure APT to use non-onion sources
And I update APT using apt
Then I should be able to install a package using apt
@check_tor_leaks
Scenario: Install packages using Synaptic
When I start Synaptic
When I configure APT to use non-onion sources
And I start Synaptic
And I update APT using Synaptic
Then I should be able to install a package using Synaptic
......@@ -11,6 +11,23 @@ Given /^the only hosts in APT sources are "([^"]*)"$/ do |hosts_str|
}
end
When /^I configure APT to use non-onion sources$/ do
script = <<-EOF
use strict;
use warnings FATAL => "all";
s{vwakviie2ienjx6t[.]onion}{ftp.us.debian.org};
s{sgvtcaew4bxjd7ln[.]onion}{security.debian.org};
s{sdscoq7snqtznauu[.]onion}{deb.torproject.org};
s{jenw7xbd6tf7vfhp[.]onion}{deb.tails.boum.org};
EOF
# VMCommand:s cannot handle newlines, and they're irrelevant in the
# above perl script any way
script.delete!("\n")
$vm.execute_successfully(
"perl -pi -E '#{script}' /etc/apt/sources.list /etc/apt/sources.list.d/*"
)
end
When /^I update APT using apt$/ do
recovery_proc = Proc.new do
step 'I kill the process "apt"'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment