FS#25610 - Broken arch install via proxy

Attached to Project: Release Engineering
Opened by Mike (gnomiik) - Tuesday, 16 August 2011, 17:21 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Monday, 26 November 2012, 04:53 GMT
Task Type Bug Report
Category AIF
Status Closed
Assigned To Dieter Plaetinck (Dieter_be)
Architecture All
Severity High
Priority Normal
Reported Version 2010.05
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

When using a proxy Pacman will fail to download packages unless you:

vi /sbin/aif
replace --config /tmp/pacman.conf with --config /etc/pacman.conf

when pacman.conf gets written to /tmp/pacman.conf it does not include the xfer definition to use wget so packages will fail to install via proxy.

Additional info:
* package version(s)
* config and/or log files etc.


Steps to reproduce:

Set up proxy
export http_proxy=blah
export ftp_proxy=blah

vi /etc/pacman.conf
uncomment xfer command with wget

run /arch/setup, attempt to download packages -> fail

Fix:
in /sbin/aif
replace --config /tmp/pacman.conf with --config /etc/pacman.conf
This task depends upon

Closed by  Gerardo Exequiel Pozzi (djgera)
Monday, 26 November 2012, 04:53 GMT
Reason for closing:  Deferred
Comment by Dieter Plaetinck (Dieter_be) - Wednesday, 17 August 2011, 20:33 GMT
Well, you're doing it the wrong way:
* /etc/pacman.conf is meant to work in the runtime environment (=live), /tmp/pacman.conf to work in the target (=installed system) environment.
* no need to change Xfer command (in fact, the arch installer / aif never did this). All that's needed is to export http_proxy and/or ftp_proxy variables. Wget honors them. (see man wget, search for _proxy).

When you configure the network (in AIF, that's interactive_runtime_network()) AIF will set the right env vars, but only if you set them manually. It doesn't do anything special if you used dhcp, but then again I don't know if a dhcp server can tell a client about proxies. If not, maybe we should allow user to setup proxy after doing dhcp.

Did you use dhcp? and if so, is the dhcp server supposed to tell the client which proxy to use?
How did you choose your proxy? From your report it looks as if you didn't tell AIF, and just edited some files. which ones? first 3 lines of your "Steps to reproduce", where did you do this?
Comment by Mike (gnomiik) - Wednesday, 17 August 2011, 20:53 GMT
wget honors exportation of proxy,
but without the xfer line in pacman.conf,
pacman is unable to download the packages.

I have tried this many times.

Yes, i used dhcp. No the dhcp server does not tell the client which proxy to use.

Here are my test cases:
1.
dhcpcd eth0
export http_proxy=blah
export ftp_proxy=blah

/arch/setup
Download packages fails

2.
dhcpcd eth0
export http_proxy=blah
export ftp_proxy=blah

vi /etc/pacman.conf
uncomment xfer command with wget

/arch/setup
Download packages fails

3.
dhcpcd eth0
export http_proxy=blah
export ftp_proxy=blah

vi /etc/pacman.conf
uncomment xfer command with wget

vi /sbin/aif
replace --config /tmp/pacman.conf with --config /etc/pacman.conf (towards of of file just search for pacman.conf)

/arch/setup
Download packages success!

Comment by Dieter Plaetinck (Dieter_be) - Thursday, 18 August 2011, 08:32 GMT
Like I said, don't use /etc/pacman.conf, use /tmp/pacman.conf

What I gather from this ticket is, AIF should support asking for ftp/http proxy when you tell AIF to use dhcp.

Then, it seems pacman ignores http_proxy and ftp_proxy (even though `man fetch` suggests it should work) but you should file a pacman ticket for that. (In fact i believe pacman 4.0 fixes this)
Comment by Mike (gnomiik) - Thursday, 18 August 2011, 17:04 GMT
Ok, thanks.

Loading...