backend/common/rhnException.py | 2 +-
backend/spacewalk-backend.spec | 5 ++++-
proxy/proxy/broker/rhnBroker.py | 25 +++++++++++++++----------
rel-eng/packages/spacewalk-backend | 2 +-
4 files changed, 21 insertions(+), 13 deletions(-)
New commits:
commit 20287b1a032397d5ee0c09a7aaeb2dcf45b79bd5
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Dec 1 09:42:17 2010 +0100
Automatic commit of package [spacewalk-backend] release [1.3.17-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index af38c4c..7c4e388 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.16
+Version: 1.3.17
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -672,6 +672,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Wed Dec 01 2010 Miroslav Suchý <msuchy(a)redhat.com> 1.3.17-1
+- fix import of xmlrpclib (msuchy(a)redhat.com)
+
* Tue Nov 30 2010 Michael Mraka <michael.mraka(a)redhat.com> 1.3.16-1
- moved db backend selection into a single place
- removed dead RegistrationNumber()
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index b4ca297..1a11cad 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.3.16-1 backend/
+1.3.17-1 backend/
commit a613a13ef501ab061cf9eced70842a8ed45f1cc2
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Dec 1 09:41:41 2010 +0100
fix import of xmlrpclib
this import was loaded by rhn.rpclib and was removed as unused in commit
46474f82bf02ce7d9b2f036758094c835762281
lets import it from origin.
diff --git a/backend/common/rhnException.py b/backend/common/rhnException.py
index e94e648..eadd5e2 100644
--- a/backend/common/rhnException.py
+++ b/backend/common/rhnException.py
@@ -15,7 +15,7 @@
import sys
import string
-from rhn.rpclib import xmlrpclib
+import xmlrpclib
from cStringIO import StringIO
commit e0bf7411b09f3b5c32b04da6df666c1d4df1f508
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Nov 30 18:01:22 2010 +0100
658527 - create _split_url function
we will need it later
diff --git a/proxy/proxy/broker/rhnBroker.py b/proxy/proxy/broker/rhnBroker.py
index 329a154..1621bf3 100644
--- a/proxy/proxy/broker/rhnBroker.py
+++ b/proxy/proxy/broker/rhnBroker.py
@@ -257,6 +257,17 @@ class BrokerHandler(SharedHandler):
""" prep handler and check PROXY_AUTH's expiration.
"""
SharedHandler._prepHandler(self)
+ def _split_url(self, req):
+ """ read url from incoming url and return (req_type, channel,
action, params)
+ URI should look something like:
+
/GET-REQ/rhel-i386-server-5/getPackage/autofs-5.0.1-0.rc2.143.el5_5.6.i386.rpm
+ """
+ args = req.path_info.split('/')
+ if len(args) < 5:
+ return (None, None, None, None)
+ else:
+ return (args[1], args[2], args[3], args[4:])
+
# --- PRIVATE METHODS ---
def __handleAction(self, headers):
@@ -287,18 +298,11 @@ class BrokerHandler(SharedHandler):
# Don't know how to handle this
return None
- # Split the URI to find out if we should take care of this.
- # URI should look something like:
- # /$RHN/redhat-linux-i386-7.1/getPackage/abiword-0.7.13.2.i386.rpm
- # NOTE: it splits to ['', '$RHN', label, channel, ...]
- args = string.split(req.path_info, '/')
- if not args or len(args) < 2 or (args[1] != '$RHN' and args[1] !=
'GET-REQ'):
+ (req_type, reqchannel, reqaction, reqparams) = self._split_url(req)
+ if req_type is None or (req_type not in ['$RHN', 'GET-REQ']):
# not a traditional RHN GET (i.e., it is an arbitrary get)
# XXX: there has to be a more elegant way to do this
return None
- reqchannel = args[2]
- reqaction = args[3]
- reqparams = args[4:]
# --- AUTH. CHECK:
# Check client authentication. If not authenticated, throw
commit debbdb9dc21954ac0907d6ddcf0f5e78d4c50526
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Nov 30 17:32:49 2010 +0100
use constant instead of hardcoded string
diff --git a/proxy/proxy/broker/rhnBroker.py b/proxy/proxy/broker/rhnBroker.py
index 9d64692..329a154 100644
--- a/proxy/proxy/broker/rhnBroker.py
+++ b/proxy/proxy/broker/rhnBroker.py
@@ -29,6 +29,7 @@ from spacewalk.common.rhnTranslate import _
# local module imports
from proxy.rhnShared import SharedHandler
+from rhnConstants import URI_PREFIX_KS_CHECKSUM
import rhnRepository
import proxy.rhnProxyAuth
@@ -101,7 +102,7 @@ class BrokerHandler(SharedHandler):
scheme = 'http'
self.httpProxy = CFG.SQUID
self.caChain = self.httpProxyUsername = self.httpProxyPassword = ''
- if CFG.HTTP_PROXY or CFG.USE_SSL or re.search('^/ty-cksm/',
self._getEffectiveURI()):
+ if CFG.HTTP_PROXY or CFG.USE_SSL or
re.search('^'+URI_PREFIX_KS_CHECKSUM, self._getEffectiveURI()):
# o if we need to go through an outside HTTP proxy, use the
# redirect
# o if an SSL request, use the redirect