FS#15959 - proxy settings in 3.3.0

Attached to Project: Pacman
Opened by Georg Grabler (STiAT) - Monday, 17 August 2009, 07:23 GMT
Last edited by Xavier (shining) - Monday, 07 September 2009, 15:00 GMT
Task Type Bug Report
Category Backend/Core
Status Closed
Assigned To Xavier (shining)
Architecture i686
Severity Low
Priority Normal
Reported Version 3.3.0
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:
Exporting http_proxy or HTTP_PROXY using a http mirror does not work after I installed 3.3.0.
I couldn't find any configuration options for pacman to set a proxy properly.

Steps to Reproduce:
Install 3.3.0, and try updating being behind a proxy server.
This task depends upon

Closed by  Xavier (shining)
Monday, 07 September 2009, 15:00 GMT
Reason for closing:  Not a bug
Additional comments about closing:  this is just a libfetch limitation, not a pacman problem
Comment by Georg Grabler (STiAT) - Monday, 17 August 2009, 07:26 GMT
Can of course be worked around using wget as xfer command ...
Comment by Xavier (shining) - Monday, 17 August 2009, 13:01 GMT
This is strange.
Can anyone confirm this?

You could try to ask on irc or forums to know if anyone can use 3.3.0 behind a proxy (using internal download / libfetch)
Comment by Dan McGee (toofishes) - Monday, 17 August 2009, 13:47 GMT
libfetch behavior should still respect these variables. Are you sure they are actually in the environment (e.g. and not left behind due to use of sudo or something else)? if you run with pacman --debug, you should see these environment variables printed out right before each download attempt.
Comment by Georg Grabler (STiAT) - Tuesday, 18 August 2009, 12:47 GMT
I am sure.

1.) I have http_proxy and HTTP_PROXY set.
2.) I used sudo -E
3.) I logged in as root, setting the variables by hand (well, they get set in my profile.d, so they are set)
------
[n501931@n501931-arch ~]$ echo $http_proxy
proxy.it-austria.com:8080
[n501931@n501931-arch ~]$ echo $HTTP_PROXY
proxy.it-austria.com:8080
[n501931@n501931-arch ~]$
[n501931@n501931-arch ~]$
[n501931@n501931-arch ~]$ sudo -E pacman -Syu
:: Synchronizing package databases...
error: failed retrieving file 'kdemod-core.db.tar.gz' from chakra-project.org : No address record
error: failed to update kdemod-core (No address record)
error: failed retrieving file 'core.db.tar.gz' from ftp.gigabit.nu : No address record
error: failed to update core (No address record)
error: failed retrieving file 'extra.db.tar.gz' from ftp.gigabit.nu : No address record
error: failed to update extra (No address record)
error: failed retrieving file 'community.db.tar.gz' from ftp.gigabit.nu : No address record
error: failed to update community (No address record)
error: failed to synchronize any databases
[n501931@n501931-arch ~]$
[n501931@n501931-arch ~]$
[n501931@n501931-arch ~]$ su -
Password:
[root@n501931-arch ~]# echo $http_proxy
http://proxy.it-austria.com:8080
[root@n501931-arch ~]# echo $HTTP_PROXY
proxy.it-austria.com:8080
[root@n501931-arch ~]#
[root@n501931-arch ~]#
[root@n501931-arch ~]# pacman -Syu
:: Synchronizing package databases...
error: failed retrieving file 'kdemod-core.db.tar.gz' from chakra-project.org : No address record
error: failed to update kdemod-core (No address record)
error: failed retrieving file 'core.db.tar.gz' from ftp.gigabit.nu : No address record
error: failed to update core (No address record)
error: failed retrieving file 'extra.db.tar.gz' from ftp.gigabit.nu : No address record
error: failed to update extra (No address record)
error: failed retrieving file 'community.db.tar.gz' from ftp.gigabit.nu : No address record
error: failed to update community (No address record)
error: failed to synchronize any databases
Comment by Georg Grabler (STiAT) - Tuesday, 18 August 2009, 12:49 GMT
ops, there was a http:// in the bashrc, doesn't matter if it's there or not, I just deleted the bashrc giving me a proxy.it-austria.com:8080, still with the same result.
Comment by Georg Grabler (STiAT) - Tuesday, 18 August 2009, 12:50 GMT
[root@n501931-arch ~]# echo $http_proxy
proxy.it-austria.com:8080
[root@n501931-arch ~]#
[root@n501931-arch ~]#
[root@n501931-arch ~]# pacman -Syu
:: Synchronizing package databases...
error: failed retrieving file 'kdemod-core.db.tar.gz' from chakra-project.org : No address record
error: failed to update kdemod-core (No address record)
error: failed retrieving file 'core.db.tar.gz' from ftp.gigabit.nu : No address record
error: failed to update core (No address record)
error: failed retrieving file 'extra.db.tar.gz' from ftp.gigabit.nu : No address record
error: failed to update extra (No address record)
error: failed retrieving file 'community.db.tar.gz' from ftp.gigabit.nu : No address record
error: failed to update community (No address record)
error: failed to synchronize any databases
Comment by Xavier (shining) - Tuesday, 18 August 2009, 12:55 GMT
read dan message again :
"if you run with pacman --debug, you should see these environment variables printed out right before each download attempt."
Comment by Georg Grabler (STiAT) - Wednesday, 19 August 2009, 07:19 GMT
[n501931@n501931-arch ~]$ sudo -E pacman --debug -Syu
debug: config: attempting to read file /etc/pacman.conf
debug: config: new section 'options'
debug: config: HoldPkg: pacman
debug: config: HoldPkg: glibc
debug: config: SyncFirst: pacman
debug: config: new section 'kdemod-core'
debug: setlibpaths() called
debug: option 'cachedir' = /var/cache/pacman/pkg/
debug: registering sync database 'kdemod-core'
debug: adding new server URL to database 'kdemod-core': http://chakra-project.org/repo/core/i686
debug: config: new section 'core'
debug: registering sync database 'core'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server URL to database 'core': http://ftp.gigabit.nu/core/os/i686
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: new section 'extra'
debug: registering sync database 'extra'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server URL to database 'extra': http://ftp.gigabit.nu/extra/os/i686
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: new section 'community'
debug: registering sync database 'community'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server URL to database 'community': http://ftp.gigabit.nu/community/os/i686
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: finished parsing /etc/pacman.conf
debug: registering local database
:: Synchronizing package databases...
debug: failed to get lastupdate time for kdemod-core
debug: using 'kdemod-core.db.tar.gz' for download progress
debug: HTTP_PROXY: proxy.it-austria.com:8080
debug: http_proxy: proxy.it-austria.com:8080
debug: FTP_PROXY: proxy.it-austria.com:8080
debug: ftp_proxy: proxy.it-austria.com:8080
error: failed retrieving file 'kdemod-core.db.tar.gz' from chakra-project.org : No address record
debug: failed to sync db: No address record
error: failed to update kdemod-core (No address record)
debug: failed to get lastupdate time for core
debug: using 'core.db.tar.gz' for download progress
debug: HTTP_PROXY: proxy.it-austria.com:8080
debug: http_proxy: proxy.it-austria.com:8080
debug: FTP_PROXY: proxy.it-austria.com:8080
debug: ftp_proxy: proxy.it-austria.com:8080
error: failed retrieving file 'core.db.tar.gz' from ftp.gigabit.nu : No address record
debug: failed to sync db: No address record
error: failed to update core (No address record)
debug: failed to get lastupdate time for extra
debug: using 'extra.db.tar.gz' for download progress
debug: HTTP_PROXY: proxy.it-austria.com:8080
debug: http_proxy: proxy.it-austria.com:8080
debug: FTP_PROXY: proxy.it-austria.com:8080
debug: ftp_proxy: proxy.it-austria.com:8080
error: failed retrieving file 'extra.db.tar.gz' from ftp.gigabit.nu : No address record
debug: failed to sync db: No address record
error: failed to update extra (No address record)
debug: failed to get lastupdate time for community
debug: using 'community.db.tar.gz' for download progress
debug: HTTP_PROXY: proxy.it-austria.com:8080
debug: http_proxy: proxy.it-austria.com:8080
debug: FTP_PROXY: proxy.it-austria.com:8080
debug: ftp_proxy: proxy.it-austria.com:8080
error: failed retrieving file 'community.db.tar.gz' from ftp.gigabit.nu : No address record
debug: failed to sync db: No address record
error: failed to update community (No address record)
error: failed to synchronize any databases
debug: unregistering database 'local'
debug: unregistering database 'kdemod-core'
debug: unregistering database 'core'
debug: unregistering database 'extra'
debug: unregistering database 'community'
Comment by Xavier (shining) - Monday, 07 September 2009, 12:45 GMT
"ops, there was a http:// in the bashrc, doesn't matter if it's there or not, I just deleted the bashrc giving me a proxy.it-austria.com:8080, still with the same result."

Well, in fact this mattered a lot as this was the very problem.
libfetch requires a valid scheme for proxy, otherwise proxy settings are ignored (unfortunately silently).

Anyway, it's hard to tell whether this is really a libfetch issue or not (in most cases you can simply specify full proxy url). but in any cases, there is nothing pacman can do about it. I would not like to have pacman mess with user proxy settings.

Georg and I discussed this issue with libfetch developer, but libfetch might stay like it is.
Comment by Georg Grabler (STiAT) - Monday, 07 September 2009, 14:52 GMT
Just close it Xavier. It's something to discuss with Jörg, and the day he answers we may can continue discussing.

Well, even if it stays like that, it's not that bad (proxy settings for the ONE application which requires no http:// in front of the proxy can be loaded via bash script as well).

I still think this has to be cleaned out in libfetch, since most libraries and applications don't require the http:// in front of it (and it's quite wide-spread not to put http:// in front of the proxy url, if you read all the tutorials on the net).

The patch of mine probably is an ugly hack, and I'd like to let Jörg review, and either accept it or not.

Loading...