Re: [UG] yum, urlgrabber and no_proxy environment?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2008-12-17 at 14:25 -0500, Seth Vidal wrote:
> 
> On Wed, 17 Dec 2008, Brian Long wrote:
> 
> > Hello,
> > I've been poking around trying to get no_proxy working with yum on
> > Centos 5.2.  It appears this issue was raised 3 years ago in this
> > thread:
> > https://lists.dulug.duke.edu/pipermail/yum-devel/2005-June/001274.html
> >
> > urllib was patched upstream to support no_proxy, but urlgrabber uses
> > urllib2 and I have not yet found a patch for it or urlgrabber to fully
> > support no_proxy.
> >
> > I just came across a recent thread from Oct. 2008[1] that seems to say
> > no_proxy is still not supported by yum / urlgrabber.  What is the proper
> > way to disable proxies per repo if I cannot disable per domain using the
> > no_proxy environment variable?
> >
> > The 2005 thread mentions setting "proxy=_none_" per repo to get around
> > the problem but this does not work in v3.2.8.
> >
> > Any other ideas would be greatly appreciated.  Thank you.
> 
> proxy=_none_ works if you're not setting the proxy as a shell env 
> variable. If you set it as an env variable then the problem is urllib 
> picks it up underneath the urlgrabber layer.
> 
> If that is what you're doing then James wrote a plugin to handle just 
> that.
> 
> http://james.fedorapeople.org/yum/plugins/unset-proxy-env.py
> 
> hth.

Let me summarize what I think you're suggesting:

1. Leave my environment alone (currently set via /etc/profile.d scripts
for all users).
2. Install and enable James' plugin on machines that need yum no_proxy
to work.
3. Copy the http_proxy line from /etc/profile.d/proxy.sh
into /etc/yum.conf.
4. Add proxy=_none_ to specific repos which need no_proxy functionality.

Is that correct?

If so, I believe the only problem is that a mirrorlist would break this
in my existing case.  I manage a private mirror of Fedora, Centos and
EPEL.  Mirrorlist / MirrorManager sees my netblock and provides my
internal mirror at the top of the list.  If that mirror is up and
proxy=_none_, we're fine, but if my internal mirror is down and yum
jumps to the second mirror, it will be unable to download anything since
http_proxy IS required for the external mirror.  Is this correct?  If
so, I think I can live with that over my current situation, but I just
wanted to make sure I understand things before moving further along.

Is there any work in progress to get no_proxy working upstream in
urllib2 / urlgrabber so I can turn off http_proxy per domain instead of
per repo?

Thank you.

/Brian/
-- 
       Brian Long                             |       |
                                          . | | | . | | | .
                                              '       '
                                              C I S C O

_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxx
http://lists.baseurl.org/mailman/listinfo/yum

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux