backend/satellite_tools/repo_plugins/yum_src.py | 16 ++++++++++++++++
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 21 insertions(+), 2 deletions(-)
New commits:
commit 0265e6e9fc60ee6e93ca6384670d9978b85e938c
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Jan 21 20:42:13 2011 +0100
Automatic commit of package [spacewalk-backend] release [1.3.47-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 4ddcbce..500f8c5 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -11,7 +11,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2 and Python
-Version: 1.3.46
+Version: 1.3.47
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -684,6 +684,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Fri Jan 21 2011 Miroslav Suchý <msuchy(a)redhat.com> 1.3.47-1
+- 657091 - honor http proxy setting for spacewalk-repo-sync
+
* Fri Jan 21 2011 Miroslav Suchý <msuchy(a)redhat.com> 1.3.46-1
- 671466 - use ansi syntax in left join
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 04cba72..05dab99 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.3.46-1 backend/
+1.3.47-1 backend/
commit 6690c51c5cbdc83de9eb5989ebc63fd1cedfa1fa
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Jan 21 20:31:35 2011 +0100
657091 - honor http proxy setting for spacewalk-repo-sync
diff --git a/backend/satellite_tools/repo_plugins/yum_src.py
b/backend/satellite_tools/repo_plugins/yum_src.py
index 12f44a7..7afc6d4 100644
--- a/backend/satellite_tools/repo_plugins/yum_src.py
+++ b/backend/satellite_tools/repo_plugins/yum_src.py
@@ -16,6 +16,7 @@ import yum
import shutil
import sys
from spacewalk.satellite_tools.reposync import ContentPackage
+from spacewalk.common import CFG, initCFG
class YumWarnings:
def write(self, s):
@@ -36,6 +37,19 @@ class ContentSource:
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.proxy_url = "http://%s:%s@%s" %(self.proxy_user,
self.proxy_pass, self.proxy_addr)
+ elif (self.proxy_addr is not None):
+ self.proxy_url = "http://%s" %(self.proxy_addr)
+ else:
+ self.proxy_url = None
+
def list_packages(self):
""" list packages"""
repo = yum.yumRepo.YumRepository(self.name)
@@ -45,6 +59,8 @@ class ContentSource:
repo.mirrorlist = self.url
repo.baseurl = [self.url]
repo.basecachedir = self.cache_dir
+ if self.proxy is not None:
+ repo.proxy = self.proxy_url
warnings = YumWarnings()
warnings.disable()