Changes to 'refs/tags/spacewalk-backend-1.3.19-1'
by Lukas Zapletal
Tag 'spacewalk-backend-1.3.19-1' created by Lukas Zapletal <lzap+git(a)redhat.com> at 2010-12-01 13:11 +0000
Tagging package [spacewalk-backend] version [1.3.19-1] in directory [backend/].
Changes since spacewalk-backend-1.3.18-1:
Lukas Zapletal (4):
Correcting indentation for rhn_main.py
Correcting indentation for configFilesHandler.py
644985 - SELinux context cleared from RHEL4 rhncfg-client
Automatic commit of package [spacewalk-backend] release [1.3.19-1].
Michael Mraka (1):
656294 - sync channels only from rhn_parent
---
backend/satellite_tools/rhn_satellite_activate.py | 2
backend/server/configFilesHandler.py | 102 +++++++++++++---------
backend/spacewalk-backend.spec | 7 +
client/tools/rhncfg/config_common/repository.py | 16 ++-
client/tools/rhncfg/config_common/rhn_main.py | 2
rel-eng/packages/spacewalk-backend | 2
6 files changed, 83 insertions(+), 48 deletions(-)
---
13 years, 5 months
Changes to 'refs/tags/rhncfg-5.9.36-1'
by Lukas Zapletal
Tag 'rhncfg-5.9.36-1' created by Lukas Zapletal <lzap+git(a)redhat.com> at 2010-12-01 13:11 +0000
Tagging package [rhncfg] version [5.9.36-1] in directory [client/tools/rhncfg/].
Changes since spacewalk-backend-1.3.18-1:
Lukas Zapletal (5):
Correcting indentation for rhn_main.py
Correcting indentation for configFilesHandler.py
644985 - SELinux context cleared from RHEL4 rhncfg-client
Automatic commit of package [spacewalk-backend] release [1.3.19-1].
Automatic commit of package [rhncfg] release [5.9.36-1].
Michael Mraka (1):
656294 - sync channels only from rhn_parent
---
backend/satellite_tools/rhn_satellite_activate.py | 2
backend/server/configFilesHandler.py | 102 +++++++++++++---------
backend/spacewalk-backend.spec | 7 +
client/tools/rhncfg/config_common/repository.py | 16 ++-
client/tools/rhncfg/config_common/rhn_main.py | 2
client/tools/rhncfg/rhncfg.spec | 6 +
rel-eng/packages/rhncfg | 2
rel-eng/packages/spacewalk-backend | 2
8 files changed, 89 insertions(+), 50 deletions(-)
---
13 years, 5 months
5 commits - backend/server backend/spacewalk-backend.spec client/tools rel-eng/packages
by Lukas Zapletal
backend/server/configFilesHandler.py | 102 +++++++++++++++---------
backend/spacewalk-backend.spec | 7 +
client/tools/rhncfg/config_common/repository.py | 16 ++-
client/tools/rhncfg/config_common/rhn_main.py | 2
client/tools/rhncfg/rhncfg.spec | 6 +
rel-eng/packages/rhncfg | 2
rel-eng/packages/spacewalk-backend | 2
7 files changed, 88 insertions(+), 49 deletions(-)
New commits:
commit 3462fc38314ecdea7b3e41283c6b7d963b9c23ba
Author: Lukas Zapletal <lzap+git(a)redhat.com>
Date: Wed Dec 1 14:11:34 2010 +0100
Automatic commit of package [rhncfg] release [5.9.36-1].
diff --git a/client/tools/rhncfg/rhncfg.spec b/client/tools/rhncfg/rhncfg.spec
index e6cc553..58b7360 100644
--- a/client/tools/rhncfg/rhncfg.spec
+++ b/client/tools/rhncfg/rhncfg.spec
@@ -8,7 +8,7 @@ Group: Applications/System
License: GPLv2 and Python
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 5.9.35
+Version: 5.9.36
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -99,6 +99,10 @@ rm -rf $RPM_BUILD_ROOT
# $Id$
%changelog
+* Wed Dec 01 2010 Lukas Zapletal 5.9.36-1
+- 644985 - SELinux context cleared from RHEL4 rhncfg-client
+- Correcting indentation for rhn_main.py
+
* Fri Nov 26 2010 Jan Pazdziora 5.9.35-1
- 656895 - fixing other instances of two-parameter utils.startswith.
- 656895 - Need to call startswith on string.
diff --git a/rel-eng/packages/rhncfg b/rel-eng/packages/rhncfg
index a1d9463..f767f8d 100644
--- a/rel-eng/packages/rhncfg
+++ b/rel-eng/packages/rhncfg
@@ -1 +1 @@
-5.9.35-1 client/tools/rhncfg/
+5.9.36-1 client/tools/rhncfg/
commit f6ed2ed71cc5bdbbee169a4f7fa1f05de3729cb6
Author: Lukas Zapletal <lzap+git(a)redhat.com>
Date: Wed Dec 1 14:11:20 2010 +0100
Automatic commit of package [spacewalk-backend] release [1.3.19-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 377fd7e..9956363 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.18
+Version: 1.3.19
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -678,6 +678,11 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Wed Dec 01 2010 Lukas Zapletal 1.3.19-1
+- 644985 - SELinux context cleared from RHEL4 rhncfg-client
+- Correcting indentation for configFilesHandler.py
+- 656294 - sync channels only from rhn_parent
+
* Wed Dec 01 2010 Miroslav Suchý <msuchy(a)redhat.com> 1.3.18-1
- add BuildRequires: python-hashlib (msuchy(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index d897bfd..13018f5 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.3.18-1 backend/
+1.3.19-1 backend/
commit 274465b3a0872ff3d69cf36c1428fbd86bf269e7
Author: Lukas Zapletal <lzap+git(a)redhat.com>
Date: Fri Nov 26 09:58:45 2010 +0100
644985 - SELinux context cleared from RHEL4 rhncfg-client
Tested on RHEL4 and also RHEL5/6 with disabled SELinux
diff --git a/backend/server/configFilesHandler.py b/backend/server/configFilesHandler.py
index d64fb62..c79751a 100644
--- a/backend/server/configFilesHandler.py
+++ b/backend/server/configFilesHandler.py
@@ -137,6 +137,17 @@ class ConfigFilesHandler(rhnHandler):
def _is_link(self, file):
return str(file['config_file_type_id']) == '3'
+ _query_current_selinux_lookup = rhnSQL.Statement("""
+ select ci.selinux_ctx from rhnConfigInfo ci, rhnConfigRevision cr, rhnConfigFile cf
+ where ci.id = cr.config_info_id
+ and cf.id = cr.config_file_id
+ and cf.config_file_name_id = lookup_config_filename(:path)
+ and cr.revision = (
+ select max(mcr.revision) from rhnConfigRevision mcr, rhnConfigFile mcf
+ where mcf.id = mcr.config_file_id
+ and mcf.config_file_name_id = cf.config_file_name_id
+ )
+ """)
def _push_file(self, config_channel_id, file):
if not file:
# Nothing to do
@@ -164,7 +175,22 @@ class ConfigFilesHandler(rhnHandler):
file['username'] = file.get('user','')
file['groupname'] = file.get('group','')
file['file_mode'] = file.get('mode','')
- file['selinux_ctx'] = file.get('selinux_ctx','')
+ # if the selinux flag is not sent by the client it is set to the last file revision
+ # (or to the empty string in case of first revision) - see the bug
+ # 644985 - SELinux context cleared from RHEL4 rhncfg-client
+ selinux_ctx_or_none = file.get('selinux_ctx', None)
+ if selinux_ctx_or_none is None:
+ # RHEL4 or RHEL5+ with disabled selinux - set from the last revision
+ h = rhnSQL.prepare(self._query_current_selinux_lookup)
+ apply(h.execute, (), file)
+ row = h.fetchone_dict()
+ if row:
+ file['selinux_ctx'] = row['selinux_ctx']
+ else:
+ file['selinux_ctx'] = ''
+ else:
+ # RHEL5+ with enabled selinux - set from the incoming request
+ file['selinux_ctx'] = selinux_ctx_or_none
result = {}
try:
diff --git a/client/tools/rhncfg/config_common/repository.py b/client/tools/rhncfg/config_common/repository.py
index 6be429d..6c094bc 100644
--- a/client/tools/rhncfg/config_common/repository.py
+++ b/client/tools/rhncfg/config_common/repository.py
@@ -28,12 +28,13 @@ import utils
from rhn_log import log_debug
try:
- from selinux import lgetfilecon
+ from selinux import lgetfilecon, is_selinux_enabled
except:
# on rhel4 we do not support selinux
def lgetfilecon(path):
- return [0, ''];
-
+ return [0, '']
+ def is_selinux_enabled():
+ return 0
#6/29/05 rpc_wrapper implements the failover logic.
import rpc_wrapper
@@ -132,9 +133,12 @@ class Repository:
ret['group'] = gr_name
self._gid_cache[gid] = gr_name
- ret['selinux_ctx'] = lgetfilecon(path)[1]
- if ret['selinux_ctx'] == None:
- ret['selinux_ctx'] = ''
+ # if selinux is disabled or on RHEL4 we do not send the selinux_ctx
+ # flag at all - see bug 644985 - SELinux context cleared from
+ # RHEL4 rhncfg-client
+ selinux_ctx = lgetfilecon(path)[1]
+ if is_selinux_enabled():
+ ret['selinux_ctx'] = selinux_ctx
return ret
commit 6c629fcf55793e913cc177fcf45e73782c3babf5
Author: Lukas Zapletal <lzap+git(a)redhat.com>
Date: Fri Nov 26 09:40:59 2010 +0100
Correcting indentation for configFilesHandler.py
diff --git a/backend/server/configFilesHandler.py b/backend/server/configFilesHandler.py
index ad6ba14..d64fb62 100644
--- a/backend/server/configFilesHandler.py
+++ b/backend/server/configFilesHandler.py
@@ -51,7 +51,7 @@ class ConfigFileMissingDelimError(ConfigFileError):
class ConfigFileMissingInfoError(ConfigFileError):
pass
-
+
class ConfigFileMissingContentError(ConfigFileError):
pass
@@ -68,7 +68,7 @@ class ConfigFilePathIncomplete(ConfigFileError):
class ConfigFilesHandler(rhnHandler):
def __init__(self):
log_debug(3)
- rhnHandler.__init__(self)
+ rhnHandler.__init__(self)
self.functions = {
'rhn_login' : 'login',
'test_session' : 'test_session',
@@ -97,7 +97,7 @@ class ConfigFilesHandler(rhnHandler):
self.user = rhnUser.search(username)
if not self.user or not (self.user.check_password(password)):
raise rhnFault(2)
-
+
# Good to go
session = self.user.create_session()
return session.get_session()
@@ -145,14 +145,14 @@ class ConfigFilesHandler(rhnHandler):
# Check for full path on the file
path = file.get('path')
if not (path[0] == os.sep):
- raise ConfigFilePathIncomplete(file)
+ raise ConfigFilePathIncomplete(file)
if not file.has_key('config_file_type_id'):
- log_debug(4, "Client does not support config directories, so set file_type_id to 1")
- file['config_file_type_id'] = '1'
+ log_debug(4, "Client does not support config directories, so set file_type_id to 1")
+ file['config_file_type_id'] = '1'
# Check if delimiters are present
if self._is_file(file) and \
- not (file.get('delim_start') and file.get('delim_end')):
+ not (file.get('delim_start') and file.get('delim_end')):
# Need delimiters
raise ConfigFileMissingDelimError(file)
@@ -166,7 +166,7 @@ class ConfigFilesHandler(rhnHandler):
file['file_mode'] = file.get('mode','')
file['selinux_ctx'] = file.get('selinux_ctx','')
result = {}
-
+
try:
if self._is_file(file):
@@ -193,30 +193,30 @@ class ConfigFilesHandler(rhnHandler):
# for the specified action
raise ConfigFileExceedsQuota(file)
raise
-
+
return {}
-
+
# A wrapper around _push_file, that also catches exceptions
def push_file(self, config_channel_id, file):
try:
result = self._push_file(config_channel_id, file)
- except ConfigFilePathIncomplete, e:
- raise rhnFault(4015,
- "Full path of file '%s' must be specified" % e.file.get('path'),
- explain=0)
+ except ConfigFilePathIncomplete, e:
+ raise rhnFault(4015,
+ "Full path of file '%s' must be specified" % e.file.get('path'),
+ explain=0)
except ConfigFileExistsError, e:
raise rhnFault(4013,
- "File %s already uploaded" % e.file.get('path'),
- explain=0)
+ "File %s already uploaded" % e.file.get('path'),
+ explain=0)
except ConfigFileVersionMismatchError, e:
raise rhnFault(4012, "File %s uploaded with a different "
- "version" % e.file.get('path'), explain=0)
+ "version" % e.file.get('path'), explain=0)
except ConfigFileMissingDelimError, e:
raise rhnFault(4008, "Delimiter not specified for file %s" %
- e.file.get('path'), explain=0)
+ e.file.get('path'), explain=0)
except ConfigFileMissingContentError, e:
raise rhnFault(4007, "No content sent for file %s" %
- e.file.get('path'), explain=0)
+ e.file.get('path'), explain=0)
except ConfigFileExceedsQuota, e:
raise rhnFault(4014, "File size of %s exceeds free quota space" %
e.file.get('path'), explain=0)
@@ -265,15 +265,15 @@ class ConfigFilesHandler(rhnHandler):
file['file_size'] = 0
file['is_binary'] = 'N'
-
+
file_path = file.get('path')
file_contents = file.get('file_contents') or ''
if file.has_key('enc64') and file_contents:
file_contents = base64.decodestring(file_contents)
- if not file.has_key('config_file_type_id'):
- log_debug(4, "Client does not support config directories, so set file_type_id to 1")
+ if not file.has_key('config_file_type_id'):
+ log_debug(4, "Client does not support config directories, so set file_type_id to 1")
file['config_file_type_id'] = '1'
file['checksum_type'] = checksum_type
@@ -316,13 +316,13 @@ class ConfigFilesHandler(rhnHandler):
h = rhnSQL.prepare(self._query_insert_content)
else:
h = rhnSQL.prepare(self._query_insert_null_content)
-
+
apply(h.execute, (), file)
# Row should be there now
h = rhnSQL.prepare(self._query_get_content_row)
apply(h.execute, (), file)
-
+
row = h.fetchone_dict()
if not row:
# Ouch
@@ -381,7 +381,7 @@ class ConfigFilesHandler(rhnHandler):
#h = rhnSQL.prepare(self._query_insert_config_file)
#apply(h.execute, (), file)
insert_call = rhnSQL.Function("rhn_config.insert_file",
- rhnSQL.types.NUMBER())
+ rhnSQL.types.NUMBER())
file['config_file_id'] = insert_call(file['config_channel_id'], file['path'])
_query_lookup_revision = rhnSQL.Statement("""
@@ -391,7 +391,7 @@ class ConfigFilesHandler(rhnHandler):
where config_file_id = :config_file_id
order by revision desc
""")
-
+
def _push_revision(self, file):
# Assume we don't have any revision for now
file['revision'] = 1
@@ -402,10 +402,10 @@ class ConfigFilesHandler(rhnHandler):
# Is it the same revision as this one?
fields = ['config_content_id', 'config_info_id', 'config_file_type_id']
-
- if not file.has_key('config_file_type_id'):
- log_debug(4, "Client does not support config directories, so set file_type_id to 1")
- file['config_file_type_id'] = '1'
+
+ if not file.has_key('config_file_type_id'):
+ log_debug(4, "Client does not support config directories, so set file_type_id to 1")
+ file['config_file_type_id'] = '1'
for f in fields:
if file.get(f) != row.get(f):
@@ -429,8 +429,8 @@ class ConfigFilesHandler(rhnHandler):
if self.user and hasattr(self.user, 'getid'):
self._add_author(file, self.user)
self._update_config_file(file)
-
-
+
+
_query_update_revision = rhnSQL.Statement("""
update rhnConfigRevision
set modified = sysdate
@@ -441,15 +441,15 @@ class ConfigFilesHandler(rhnHandler):
h = rhnSQL.prepare(self._query_update_revision)
apply(h.execute, (), file)
-
+
def _insert_revision(self, file):
insert_call = rhnSQL.Function("rhn_config.insert_revision",
- rhnSQL.types.NUMBER())
+ rhnSQL.types.NUMBER())
file['config_revision_id'] = insert_call(file['revision'],
file['config_file_id'],
file.get('config_content_id',''),
file['config_info_id'],
- file['config_file_type_id'])
+ file['config_file_type_id'])
_query_update_revision_add_author = rhnSQL.Statement("""
update rhnConfigRevision
@@ -480,7 +480,7 @@ class ConfigFilesHandler(rhnHandler):
server = var_interp_prep(self.server)
return format_file_results(row, server=server)
-
+
def _get_maximum_file_size(self):
return CFG.maximum_config_file_size
@@ -505,7 +505,7 @@ def format_file_results(row, server=None):
if client_caps and client_caps.has_key('configfiles.base64_enc'):
encoding = 'base64'
contents = base64.encodestring(contents)
-
+
return {
'path' : row['path'],
'config_channel': row['config_channel'],
commit ba493d259a4094f35304997f8b1243579ca7ac0b
Author: Lukas Zapletal <lzap+git(a)redhat.com>
Date: Fri Nov 26 09:13:39 2010 +0100
Correcting indentation for rhn_main.py
diff --git a/client/tools/rhncfg/config_common/rhn_main.py b/client/tools/rhncfg/config_common/rhn_main.py
index dbb93c0..54ef899 100644
--- a/client/tools/rhncfg/config_common/rhn_main.py
+++ b/client/tools/rhncfg/config_common/rhn_main.py
@@ -115,7 +115,7 @@ class BaseMain:
try:
module = __import__(full_module_name)
except ImportError, e:
- rhn_log.die(1, "Unable to load plugin for mode '%s': %s" % (mode, e))
+ rhn_log.die(1, "Unable to load plugin for mode '%s': %s" % (mode, e))
module = getattr(module, module_name)
13 years, 5 months
backend/satellite_tools
by Michael Mraka
backend/satellite_tools/rhn_satellite_activate.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 45240b4bd4b9fdf6ba5b6ba000c84fdc59ff07b3
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Dec 1 10:13:16 2010 +0100
656294 - sync channels only from rhn_parent
diff --git a/backend/satellite_tools/rhn_satellite_activate.py b/backend/satellite_tools/rhn_satellite_activate.py
index 00686f4..82e24fb 100644
--- a/backend/satellite_tools/rhn_satellite_activate.py
+++ b/backend/satellite_tools/rhn_satellite_activate.py
@@ -626,7 +626,7 @@ def main():
return 89
# channel family stuff
- if not options.disconnected:
+ if not options.disconnected and CFG.RHN_PARENT and not CFG.ISS_PARENT:
try:
populateChannelFamilies(options)
except PopulateChannelFamiliesException, e:
13 years, 5 months
Changes to 'refs/tags/spacewalk-backend-1.3.18-1'
by Miroslav Suchý
Tag 'spacewalk-backend-1.3.18-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2010-12-01 09:21 +0000
Tagging package [spacewalk-backend] version [1.3.18-1] in directory [backend/].
Changes since spacewalk-backend-1.3.17-1:
Miroslav Suchý (2):
add BuildRequires: python-hashlib
Automatic commit of package [spacewalk-backend] release [1.3.18-1].
---
backend/spacewalk-backend.spec | 11 ++++++++++-
rel-eng/packages/spacewalk-backend | 2 +-
2 files changed, 11 insertions(+), 2 deletions(-)
---
13 years, 5 months
2 commits - backend/spacewalk-backend.spec rel-eng/packages
by Miroslav Suchý
backend/spacewalk-backend.spec | 11 ++++++++++-
rel-eng/packages/spacewalk-backend | 2 +-
2 files changed, 11 insertions(+), 2 deletions(-)
New commits:
commit 0811e539eb94398e28c2f15bcb9070bbce93c02f
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Dec 1 10:21:37 2010 +0100
Automatic commit of package [spacewalk-backend] release [1.3.18-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index e3c20d9..377fd7e 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.17
+Version: 1.3.18
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -678,6 +678,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Wed Dec 01 2010 Miroslav Suchý <msuchy(a)redhat.com> 1.3.18-1
+- add BuildRequires: python-hashlib (msuchy(a)redhat.com)
+
* Wed Dec 01 2010 Miroslav Suchý <msuchy(a)redhat.com> 1.3.17-1
- fix import of xmlrpclib (msuchy(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 1a11cad..d897bfd 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.3.17-1 backend/
+1.3.18-1 backend/
commit 66e0357fef2fa7f3a118e9c28746828817042e5c
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Dec 1 10:21:09 2010 +0100
add BuildRequires: python-hashlib
we now run test during builds, so we need BuildRequires: python-hashlib
addressing:
File "/usr/lib/python2.4/site-packages/spacewalk/common/checksum.py", line 22, in ?
ImportError: No module named Crypto.Hash
additionaly if we build on el4 where is not hashlib we have to require python-crypto
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 7c4e388..e3c20d9 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -182,7 +182,13 @@ This package contains listener for the Server XML dumper.
Summary: Spacewalk server and client tools libraries
Group: Applications/Internet
BuildRequires: python2-devel
+%if 0%{?rhel} && 0%{?rhel} < 5
+Requires: python-crypto
+BuildRequires: python-crypto
+%else
Requires: python-hashlib
+BuildRequires: python-hashlib
+%endif
%description libs
Libraries required by both Spacewalk server and Spacewalk client tools.
13 years, 5 months
Changes to 'refs/tags/spacewalk-backend-1.3.17-1'
by Miroslav Suchý
Tag 'spacewalk-backend-1.3.17-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2010-12-01 08:42 +0000
Tagging package [spacewalk-backend] version [1.3.17-1] in directory [backend/].
Changes since spacewalk-backend-1.3.16-1:
Miroslav Suchý (5):
import Fault from different class
use constant instead of hardcoded string
658527 - create _split_url function
fix import of xmlrpclib
Automatic commit of package [spacewalk-backend] release [1.3.17-1].
---
backend/common/rhnException.py | 2 +-
backend/spacewalk-backend.spec | 5 ++++-
proxy/proxy/broker/rhnBroker.py | 25 +++++++++++++++----------
proxy/proxy/rhnAuthCacheClient.py | 3 ++-
rel-eng/packages/spacewalk-backend | 2 +-
5 files changed, 23 insertions(+), 14 deletions(-)
---
13 years, 5 months
4 commits - backend/common backend/spacewalk-backend.spec proxy/proxy rel-eng/packages
by Miroslav Suchý
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
13 years, 5 months