From 550562cf6f45d77e9803ef3f99036fbd4ff4a0fd Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Fri, 21 Sep 2018 08:05:39 +0200 Subject: [PATCH] rudimentary support for tor:// URIs --- mmdebstrap | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mmdebstrap b/mmdebstrap index c120d4e..faa6112 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -788,9 +788,15 @@ sub setup { open(my $pipe_apt, '-|', 'apt-get', 'indextargets', '--format', '$(URI)', 'Created-By: Packages') or die "cannot start apt-get indextargets: $!"; while (my $uri = <$pipe_apt>) { if ($uri =~ /^https:\/\//) { + # FIXME: support for https is part of apt >= 1.5 $pkgs_to_install_from_outside{'apt-transport-https'} = (); $pkgs_to_install_from_outside{'ca-certificates'} = (); last; + } elsif ($uri =~ /^tor(\+[a-z]+)*:\/\//) { + # tor URIs can be tor+http://, tor+https:// or even + # tor+mirror+file:// + $pkgs_to_install_from_outside{'apt-transport-tor'} = (); + last; } } close $pipe_apt;