-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello,
Follow a patch to honor proxy_configuration in /etc/rhn/rhn.conf for spacewalk-repo-sync. There is a BZ#657091 opened for that (Satellite) Best Regards, Marcelo Moreira de Mello - -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG http://people.redhat.com/mdemello Mobile: +55 11 9321-0854 gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNOc/EAAoJEL1C0JX9sRDlUskIAJt4ss4oCr102muTxB1faxgL plUIBstRtoKIEBfVapH5E/UEsUpVlbHna9EqmgamUusDP7AOAdDfTr40Nt4QutKg KLsUn6mWUA0TmoGXUN6RxKj8Ukjhxc52mGOyUpOYjvkYJpLYeJ1RMANRd6Bti1Rg JbDbQSGWOXqPp/YuCHpNZIHdH3QyqMEcSZQ4g0OIKjcCZlJ4Z7xe78/GuuiSB00k aErdQaQ6zK6HYVPJ0D/V1Fy8tbQM3mYqHbmk0EMHI7E7W5PiFHXV/HQdkVAVwgFo fkFd206GNs1xGWkkPzHBuI/LfPwLbDAcNwpwvsjEdLlU1IFswbySQXU7ggRB5Vs= =Nkbv -----END PGP SIGNATURE-----
Signed-off-by: Marcelo Moreira de Mello <mme...@redhat.com> --- backend/satellite_tools/repo_plugins/yum_src.py | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/backend/satellite_tools/repo_plugins/yum_src.py b/backend/satellite_tools/repo_plugins/yum_src.py index 12f44a7..48ad4a1 100644 --- a/backend/satellite_tools/repo_plugins/yum_src.py +++ b/backend/satellite_tools/repo_plugins/yum_src.py @@ -17,6 +17,9 @@ import shutil import sys from spacewalk.satellite_tools.reposync import ContentPackage +sys.path.append("/usr/share/rhn/") +from common import CFG, initCFG + class YumWarnings: def write(self, s): pass @@ -35,6 +38,17 @@ class ContentSource: self.url = url self.name = name self._clean_cache(self.cache_dir + name) + + # read the proxy configuration in /etc/rhn/rhn.conf + initCFG('server.satellite') + self.proxy_addr = CFG.http_proxy + self.proxy_user = CFG.http_proxy_username + self.proxy_pass = CFG.http_proxy_password + + if (self.proxy_user is not None and self.proxy_pass is not None and self.proxy_addr is not None): + self.proxies = "http://%s:%s@%s" %(self.proxy_user, self.proxy_pass, self.proxy_addr) + elif (self.proxy_addr is not None): + self.proxies = "http://%s" %(self.proxy_addr) def list_packages(self): """ list packages""" @@ -45,6 +59,8 @@ class ContentSource: repo.mirrorlist = self.url repo.baseurl = [self.url] repo.basecachedir = self.cache_dir + if self.proxies is not None: + repo.proxy = self.proxies warnings = YumWarnings() warnings.disable()
_______________________________________________ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel