Use proxy in phase 1 of bootstrap #13

Closed
akhansen opened this Issue Nov 20, 2011 · 4 comments

2 participants

@akhansen
Fink member

Here's the text from a bug report:

The proxy information has just been gathered, but since the phase 1 download uses the bare download method rather than going through the whole fink tool, this information isn't getting passed along to curl.

@fingolfin
Fink member

I am not quite sure I understand what you mean with "bare download method". As far as I know, all downloaded (even those during bootstrap) are handled by fetch_url_to_file(), which of course does know about proxies.

Naively, once the proxy settings have been set by Fink::Configure::configure() (by means of choose_misc()), it should "just work". I just glanced at the code, and it is not obvious to me where we "loose" the proxy settings... If you know more, I'd love to hear it :).

@akhansen
Fink member

Sure, fetch_url_to_file() knows, but Fink::Configure::configure() isn't being used here since there is no 'fink' yet. That's what I mean by bare download method.

I put this up in direct response to a bug report:
http://article.gmane.org/gmane.os.apple.fink.core/2604/match=proxy

@akhansen
Fink member

Ah, I think I may have been wrong:

I did a little investigation, by setting up squid on a box and having
one of my Macs use it as a proxy.

The bootstrap download commands don't display e.g "--proxy" or "-x"
but nevertheless the proxy appears to be used:

squid on, Mac using proxy:
curl --connect-timeout 30 -f -L -A 'fink/0.31.99.git' -O
http://distfiles.master.finkmirrors.net/dpkg_1.10.21.tar.gz
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 1643k 100 1643k 0 0 311k 0 0:00:05 0:00:05
--:--:-- 383k

squid off, Mac using proxy:
curl --connect-timeout 30 -f -L -A 'fink/0.31.99.git' -O
http://distfiles.master.finkmirrors.net/dpkg_1.10.21.tar.gz
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:--
--:--:-- 0
curl: (7) couldn't connect to host

Mac set not to use proxies:
curl --connect-timeout 30 -f -L -A 'fink/0.31.99.git' -O
http://distfiles.master.finkmirrors.net/dpkg_1.10.21.tar.gz

% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 1643k 100 1643k 0 0 266k 0 0:00:06 0:00:06
--:--:-- 345k

This isn't an exhaustive test, of course...

@akhansen
Fink member

I'm going to close this out. I don't think it's actually a problem in bootstrap.

@akhansen akhansen closed this Jan 24, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment