[Bug 558539] New: zypper does not respect the environment variable http_proxy, but uses the settings in /etc/sysconfig/proxy
http://bugzilla.novell.com/show_bug.cgi?id=558539 http://bugzilla.novell.com/show_bug.cgi?id=558539#c0 Summary: zypper does not respect the environment variable http_proxy, but uses the settings in /etc/sysconfig/proxy Classification: openSUSE Product: openSUSE 11.2 Version: Final Platform: i586 OS/Version: openSUSE 11.2 Status: NEW Severity: Normal Priority: P5 - None Component: libzypp AssignedTo: zypp-maintainers@forge.provo.novell.com ReportedBy: richard.bos@xs4all.nl QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (compatible; Konqueror/4.2; Linux) KHTML/4.2.3 (like Gecko) SUSE Coming from a network with proxy to a network without proxy, zypper starts to fail to download files. Normally it is possible to use the environment variable http_proxy to network access possible again (not only for zypper, but many proxy using applications). However, zypper does not use this variable, see the for test below: test 1: http_proxy set and PROXY_ENABLED="yes" linux-geis:~ # grep -i ^proxy /etc/sysconfig/proxy; echo $http_proxy PROXY_ENABLED="yes" proxy.company.com:8000 linux-geis:~ # zyp ref Failed to download /content from http://download.opensuse.org/distribution/11.2/repo/non-oss Abort, retry, ignore? [a/r/i/?] (a): a This is as expected. test 2: http_proxy unset and PROXY_ENABLED="yes" linux-geis:~ # grep -i ^proxy /etc/sysconfig/proxy; echo $http_proxy PROXY_ENABLED="yes" linux-geis:~ # zyp ref Failed to download /content from http://download.opensuse.org/distribution/11.2/repo/non-oss Abort, retry, ignore? [a/r/i/?] (a): a This is unexpected: the variable http_proxy is not honoured. test 3: http_proxy unset and PROXY_ENABLED="no" linux-geis:~ # grep -i ^proxy /etc/sysconfig/proxy; echo $http_proxy PROXY_ENABLED="no" linux-geis:~ # zyp ref Repository 'openSUSE 11.2 non-oss' is up to date. Repository 'openSUSE 11.2 oss' is up to date. This is unexpected: zypper should not use the values in /etc/sysconfig/proxy directly. It should use the environment variable instead. test 4: http_proxy set and PROXY_ENABLED="no" linux-geis:~ # grep -i ^proxy /etc/sysconfig/proxy; echo $http_proxy PROXY_ENABLED="no" proxy.company.com:8000 linux-geis:~ # zyp ref Repository 'openSUSE 11.2 non-oss' is up to date. Repository 'openSUSE 11.2 oss' is up to date. This should fail: as the environment variable http_proxy is not respected. It was not until I found the underneath lines in /var/log/zypper.log: 2009-11-25 22:09:32 <1> linux-geis(7415) [zypp++] Sysconfig.cc(read):31 Load '/etc/sysconfig/proxy' 2009-11-25 22:09:32 <1> linux-geis(7415) [zypp] Sysconfig.cc(read):71 done reading '/etc/sysconfig/proxy' 2009-11-25 22:09:32 <1> linux-geis(7415) [zypp++] MediaCurl.cc(attachTo):523 Proxy: -none- That I understood the variable PROXY_ENABLED had to be altered. Reproducible: Always Steps to Reproduce: See details section above Actual Results: See details section above Expected Results: The environment variable http_proxy should be respected by zypper. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=558539 http://bugzilla.novell.com/show_bug.cgi?id=558539#c1 Michael Andres <ma@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P3 - Medium CC| |ma@novell.com --- Comment #1 from Michael Andres <ma@novell.com> 2009-11-26 17:00:16 UTC --- This is related to bug #555066. We need to figure out why /etc/sysconfig/proxy overrules the environment. I guess this was done to immediately reflect changes done by the YaST proxy configuration. So we'd need a fix for that usecase. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=558539 http://bugzilla.novell.com/show_bug.cgi?id=558539#c2 --- Comment #2 from Richard Bos <richard.bos@xs4all.nl> 2009-11-28 16:28:02 UTC ---
We need to figure out why /etc/sysconfig/proxy overrules the environment. I guess this was done to immediately reflect changes done by the YaST proxy configuration. So we'd need a fix for that usecase.
Hmm, that is a good point. You don't want a user to exit YaST and its related shell, to have him or her re-enter the shell and YaST to have the proxy variable reread. Zypper should not read /etc/sysconfig/proxy, that is more a task for YaST. As YaST controls and knows when /etc/sysconfig/proxy is changed, and also knows when the related proxy variables are changed, YaST should instruct zypper how to deal with the proxy. This seems possible with aria2c --http-proxy=HOST:PORT argument. In normal cases YaST and hence Zypper should always use the environment variables, in the (rare ;) ) situation that the user changes the proxy settings, YaST should overwrite the environment settings and instruct aria2c via the --http-proxy=HOST:PORT how to deal with the proxy. Or perhaps YaST can change the value of the environment variable http_proxy while running? Hopefully this is can be implemented in YaST?! -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=558539 http://bugzilla.novell.com/show_bug.cgi?id=558539#c3 Maine Rodger <mr203010spam@gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 - Medium |P2 - High --- Comment #3 from Maine Rodger <mr203010spam@gmx.net> 2009-12-18 10:46:31 UTC --- I can confirm this bug. This is fatal in a company environent where users are forced to use an authenticating proxy. After 1.) changing the repos von 11.1 to 11.2 2.) zypper refresh 3.) zypper install zypper zypper dup will not work anymore: Failed to download /repodata/repomd.xml from http://download.opensuse.org/repositories/Emulators%3a/Wine/open SUSE_11.2/ Abort, retry, ignore? [a/r/i/?] (a): After reading this and the other bug report I changed the entry HTTP_PROXY=http://USERNAME:PW@proxy-url:PORT This is a workaround only. It worked in openSUSE 11.2. Please fix asap Thank you! -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=558539 https://bugzilla.novell.com/show_bug.cgi?id=558539#c Duncan Mac-Vicar <dmacvicar@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |655483 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=558539 https://bugzilla.novell.com/show_bug.cgi?id=558539#c Bug 558539 depends on bug 655483, which changed state. Bug 655483 Summary: [patch] libproxy support in libzypp http://bugzilla.novell.com/show_bug.cgi?id=655483 What |Old Value |New Value ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=558539 https://bugzilla.novell.com/show_bug.cgi?id=558539#c5 Duncan Mac-Vicar <dmacvicar@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P2 - High |P4 - Low CC| |dmacvicar@novell.com --- Comment #5 from Duncan Mac-Vicar <dmacvicar@novell.com> 2011-02-07 12:01:52 UTC --- In 11.4 we use libproxy (see bug:655483). We wrote a module for libproxy to use /etc/sysconfig/proxy. However libproxy modules do not have order and basically the first module that says "YES" is used. The sysconfig module gets activated if you are running as root, so the behavior will be the same as before. As in SUSE the variables _come_ from sysconfig this should not be a problem. I don't see a better way to know when sysconfig should not be used. We thought about using the YAST_IS_RUNNING variable but it is not a very clean solution. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=558539 https://bugzilla.novell.com/show_bug.cgi?id=558539#c6 Duncan Mac-Vicar <dmacvicar@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|dmacvicar@novell.com | --- Comment #6 from Duncan Mac-Vicar <dmacvicar@novell.com> 2011-02-07 12:07:20 UTC --- In 11.4 we use libproxy (see bug:655483). We wrote a module for libproxy to use /etc/sysconfig/proxy. However libproxy modules do not have order and basically the first module that says "YES" is used. The sysconfig module gets activated if you are running as root, so the behavior will be the same as before. As in SUSE the variables _come_ from sysconfig this should not be a problem. I don't see a better way to know when sysconfig should not be used. We thought about using the YAST_IS_RUNNING variable but it is not a very clean solution. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=558539 https://bugzilla.novell.com/show_bug.cgi?id=558539#c7 Michael Andres <ma@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #7 from Michael Andres <ma@suse.com> 2011-12-01 12:12:10 CET --- fixed in 11.4 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com