Gentoo Archives: gentoo-user

From: David W Noon <dwnoon@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Portage through a proxy
Date: Thu, 11 Oct 2007 01:00:28
Message-Id: 20071011004131.F20848804F@memphis.local
1 On Wednesday 10 Oct 2007 14:40 in article <9cJXe-6oU-7@×××××××××××××.it>
2 of linux.gentoo.user, Neil Bothwick(neil@××××××××××.uk) wrote:
3
4 > On Wed, 10 Oct 2007 09:11:42 -0400, James Colby wrote:
5 >
6 >> Does anyone know if it possible to configure emerge to use the value
7 >> of
8 >> $http_proxy as my proxy? I use my laptop both at home and at work, I
9 >> have a script that sets the $http_proxy env variable depending on
10 >> where
11 >> I am, and I would like to have emerge use that value. I have tried
12 >> setting http_proxy in make.conf to $http_proxy but that did not work.
13 >
14 > Portage uses wget by default, and wget respects $http_proxy. According
15 > to /etc/make.conf.example
16 >
17 > # Fetching files
18 > # ==============
19 > #
20 > # If you need to set a proxy for wget or lukemftp, add the appropriate
21 > # "export ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to
22 > # /etc/profile if all users on your system should use them.
23
24 Just to expand on this a bit, the /etc/make.conf file probably needs to
25 define the rsync proxy too, although you can use websync. For all my
26 proxy work I use Squid. To this end I use the following lines in the
27 named files:
28
29 /etc/make.conf
30 http_proxy="http://localhost:8080"
31 ftp_proxy="http://localhost:8080"
32 RSYNC_PROXY="localhost:8080"
33
34 /etc/wget/wgetrc
35 http_proxy = http://localhost:8080/
36 ftp_proxy = http://localhost:8080/
37 no_proxy = .local
38
39 /etc/squid/squid.conf
40 acl SSL_ports port 443 563 873 # 873 for rsync
41 acl Safe_ports port 873 # rsync
42
43 Note that the above are just extracts from the configuration files, not
44 the complete things. Note also that I allow my Gentoo boxes to query
45 each other's /usr/portage/distfiles before downloading from a mirror,
46 and my internal top-level domain name is .local; as a result, wget is
47 told to bypass the proxy on such connections.
48
49 Moreover, the above were taken from the machine that runs Squid, which
50 is why all the proxy connections use localhost. On other machines, the
51 domain name of the proxy server is memphis.local.
52
53 --
54 Regards
55
56 Dave [RLU#314465]
57 ======================================================
58 dwnoon@××××××××.com (David W Noon)
59 ======================================================
60
61
62 --
63 gentoo-user@g.o mailing list