proxy/proxy
by Miroslav Suchý
proxy/proxy/rhnAuthCacheClient.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit bb95c36bd8959915229edf3fccb0b393088a1017
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Nov 30 17:02:32 2010 +0100
import Fault from different class
object Fault has been previously imported by rhnAuthProtocol,
this import has been removed in commit 94addd571f4538d4351e0b436edb6d1a10c087e3
so our import fail
addressing:
[Tue Nov 30 17:58:26 2010] [error] [client 10.34.26.6] PythonCleanupHandler proxy.apacheServer::CleanupHandler: File "/usr/share/rhn/proxy/rhnAuthCacheClient.py", line 28, in ?\n from rhnAuthProtocol import CommunicationError, Fault, send, recv
[Tue Nov 30 17:58:26 2010] [error] [client 10.34.26.6] PythonCleanupHandler proxy.apacheServer::CleanupHandler: ImportError: cannot import name Fault
diff --git a/proxy/proxy/rhnAuthCacheClient.py b/proxy/proxy/rhnAuthCacheClient.py
index d9feb6d..df20cc5 100644
--- a/proxy/proxy/rhnAuthCacheClient.py
+++ b/proxy/proxy/rhnAuthCacheClient.py
@@ -25,7 +25,8 @@ import socket
## local imports
from spacewalk.common import log_debug, log_error, Traceback, rhnFault
from spacewalk.common.rhnTranslate import _
-from rhnAuthProtocol import CommunicationError, Fault, send, recv
+from rhnAuthProtocol import CommunicationError, send, recv
+from xxmlrpclib import Fault
#
# Protocol description:
12 years, 6 months
Changes to 'refs/tags/spacewalk-backend-1.3.16-1'
by Michael Mraka
Tag 'spacewalk-backend-1.3.16-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-11-30 14:51 +0000
Tagging package [spacewalk-backend] version [1.3.16-1] in directory [backend/].
Changes since spacecmd-1.3.2-1:
Michael Mraka (6):
python 2.4+ (RHEL5+) has hasattr(gettext, 'GNUTranslations') == True; removing dead code
removed dead code together with its invalid comment
RegistrationNumber() is dead after if data.has_key('registrationNumber') block removal
moved db backend selection into a single place
moved backend.init() into a single place
Automatic commit of package [spacewalk-backend] release [1.3.16-1].
---
backend/common/rhnTranslate.py | 81 ++++-------------
backend/satellite_exporter/handlers/non_auth_dumper.py | 10 --
backend/satellite_tools/diskImportLib.py | 12 --
backend/satellite_tools/reposync.py | 11 --
backend/server/handlers/app/packages.py | 11 --
backend/server/handlers/xmlrpc/registration.py | 21 ----
backend/server/importlib/backendOracle.py | 9 +
backend/server/importlib/packageUpload.py | 10 --
backend/server/rhnPackageUpload.py | 10 --
backend/spacewalk-backend.spec | 8 +
rel-eng/packages/spacewalk-backend | 2
11 files changed, 48 insertions(+), 137 deletions(-)
---
12 years, 6 months
backend/spacewalk-backend.spec rel-eng/packages
by Michael Mraka
backend/spacewalk-backend.spec | 8 +++++++-
rel-eng/packages/spacewalk-backend | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
New commits:
commit a4dd43fe8137433d11737c432528c20df20aa63c
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Nov 30 15:51:16 2010 +0100
Automatic commit of package [spacewalk-backend] release [1.3.16-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 6aaeec3..af38c4c 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.15
+Version: 1.3.16
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -672,6 +672,12 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* 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()
+- removed dead code together with its invalid comment
+- python 2.4+ (RHEL5+) has hasattr(gettext, 'GNUTranslations') == True
+
* Mon Nov 29 2010 Michael Mraka <michael.mraka(a)redhat.com> 1.3.15-1
- fixed unit tests
- run backend unit test in rpm build time
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index b905dc6..b4ca297 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.3.15-1 backend/
+1.3.16-1 backend/
12 years, 6 months
5 commits - backend/common backend/satellite_exporter backend/satellite_tools backend/server
by Michael Mraka
backend/common/rhnTranslate.py | 81 ++++-------------
backend/satellite_exporter/handlers/non_auth_dumper.py | 10 --
backend/satellite_tools/diskImportLib.py | 12 --
backend/satellite_tools/reposync.py | 11 --
backend/server/handlers/app/packages.py | 11 --
backend/server/handlers/xmlrpc/registration.py | 21 ----
backend/server/importlib/backendOracle.py | 9 +
backend/server/importlib/packageUpload.py | 10 --
backend/server/rhnPackageUpload.py | 10 --
9 files changed, 40 insertions(+), 135 deletions(-)
New commits:
commit 47d8e2df7879d024a50c294e7f033a1e553616ff
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Nov 30 14:15:12 2010 +0100
moved backend.init() into a single place
diff --git a/backend/satellite_tools/diskImportLib.py b/backend/satellite_tools/diskImportLib.py
index 5fd2db5..4610f32 100644
--- a/backend/satellite_tools/diskImportLib.py
+++ b/backend/satellite_tools/diskImportLib.py
@@ -37,7 +37,6 @@ class Backend:
return self.__backend
Backend.__backend = SQLBackend()
- Backend.__backend.init()
return Backend.__backend
# get_backend() returns a shared instance of an Oracle backend
diff --git a/backend/satellite_tools/reposync.py b/backend/satellite_tools/reposync.py
index 1d97319..955c051 100644
--- a/backend/satellite_tools/reposync.py
+++ b/backend/satellite_tools/reposync.py
@@ -232,7 +232,6 @@ class RepoSync:
def associate_package(self, pack):
caller = "server.app.yumreposync"
backend = SQLBackend()
- backend.init()
package = {}
package['name'] = pack.name
package['version'] = pack.version
diff --git a/backend/server/handlers/app/packages.py b/backend/server/handlers/app/packages.py
index db6ad23..8f6120f 100644
--- a/backend/server/handlers/app/packages.py
+++ b/backend/server/handlers/app/packages.py
@@ -383,7 +383,6 @@ class Packages(RPC_Base):
caller = "server.app.channelPackageSubscription"
backend = SQLBackend()
- backend.init()
importer = ChannelPackageSubscription(batch, backend, caller=caller)
try:
importer.run()
diff --git a/backend/server/importlib/backendOracle.py b/backend/server/importlib/backendOracle.py
index f15dddc..9576755 100644
--- a/backend/server/importlib/backendOracle.py
+++ b/backend/server/importlib/backendOracle.py
@@ -599,4 +599,5 @@ def SQLBackend():
backend = OracleBackend()
elif CFG.DB_BACKEND == POSTGRESQL:
backend = PostgresqlBackend()
+ backend.init()
return backend
diff --git a/backend/server/importlib/packageUpload.py b/backend/server/importlib/packageUpload.py
index ccf5ef8..f913bdc 100644
--- a/backend/server/importlib/packageUpload.py
+++ b/backend/server/importlib/packageUpload.py
@@ -46,7 +46,6 @@ def uploadPackages(info, source=0, force=0, caller=None):
batch.append(p)
backend = SQLBackend()
- backend.init()
importer = packageImporter(batch, backend, source, caller=caller)
importer.setUploadForce(force)
diff --git a/backend/server/rhnPackageUpload.py b/backend/server/rhnPackageUpload.py
index 7138ff9..1694b46 100644
--- a/backend/server/rhnPackageUpload.py
+++ b/backend/server/rhnPackageUpload.py
@@ -153,7 +153,6 @@ def push_package(header, payload_stream, checksum_type, checksum, org_id=None, f
batch.append(pkg)
backend = SQLBackend()
- backend.init()
if force:
upload_force = 4
commit 7d5ed504e7e809fdcc7c82f8b5e82c37279200dd
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Nov 30 14:04:06 2010 +0100
moved db backend selection into a single place
diff --git a/backend/satellite_tools/diskImportLib.py b/backend/satellite_tools/diskImportLib.py
index 0462c7b..5fd2db5 100644
--- a/backend/satellite_tools/diskImportLib.py
+++ b/backend/satellite_tools/diskImportLib.py
@@ -18,12 +18,11 @@
import os
-from spacewalk.common import CFG
from spacewalk.common.rhnLib import hash_object_id
-from spacewalk.server.rhnSQL.const import ORACLE, POSTGRESQL
import xmlSource
import xmlDiskSource
+from spacewalk.server.importlib.backendOracle import SQLBackend
from spacewalk.server.importlib.channelImport import ChannelImport, ChannelFamilyImport
from spacewalk.server.importlib.packageImport import PackageImport, SourcePackageImport
from spacewalk.server.importlib import archImport
@@ -37,13 +36,7 @@ class Backend:
if self.__backend:
return self.__backend
-
- if CFG.DB_BACKEND == ORACLE:
- from spacewalk.server.importlib.backendOracle import OracleBackend
- Backend.__backend = OracleBackend()
- elif CFG.DB_BACKEND == POSTGRESQL:
- from spacewalk.server.importlib.backendOracle import PostgresqlBackend
- Backend.__backend = PostgresqlBackend()
+ Backend.__backend = SQLBackend()
Backend.__backend.init()
return Backend.__backend
diff --git a/backend/satellite_tools/reposync.py b/backend/satellite_tools/reposync.py
index 9ef4319..1d97319 100644
--- a/backend/satellite_tools/reposync.py
+++ b/backend/satellite_tools/reposync.py
@@ -20,10 +20,9 @@ from spacewalk.common import CFG, initCFG, rhnLog
from spacewalk.common.checksum import getFileChecksum
from spacewalk.server.importlib.importLib import IncompletePackage
from spacewalk.server.importlib.packageImport import ChannelPackageSubscription
+from spacewalk.server.importlib.backendOracle import SQLBackend
from spacewalk.server import taskomatic
-from spacewalk.server.rhnSQL.const import ORACLE, POSTGRESQL
-
default_log_location = '/var/log/rhn/reposync/'
default_hash = 'sha256'
@@ -232,12 +231,7 @@ class RepoSync:
def associate_package(self, pack):
caller = "server.app.yumreposync"
- if CFG.DB_BACKEND == ORACLE:
- from spacewalk.server.importlib.backendOracle import OracleBackend
- backend = OracleBackend()
- elif CFG.DB_BACKEND == POSTGRESQL:
- from spacewalk.server.importlib.backendOracle import PostgresqlBackend
- backend = PostgresqlBackend()
+ backend = SQLBackend()
backend.init()
package = {}
package['name'] = pack.name
diff --git a/backend/server/handlers/app/packages.py b/backend/server/handlers/app/packages.py
index c1b7f0e..db6ad23 100644
--- a/backend/server/handlers/app/packages.py
+++ b/backend/server/handlers/app/packages.py
@@ -26,6 +26,7 @@ from spacewalk.common import RPC_Base, rhnFault, log_debug, log_error, CFG
from spacewalk.server import rhnSQL, rhnPackageUpload, rhnUser, rhnSession
+from spacewalk.server.importlib.backendOracle import SQLBackend
from spacewalk.server.importlib.importLib import Collection, IncompatibleArchError,\
Channel, IncompletePackage, InvalidChannelError
from spacewalk.server.importlib.packageImport import ChannelPackageSubscription
@@ -34,7 +35,6 @@ from spacewalk.server.importlib.packageUpload import uploadPackages, listChannel
from spacewalk.server.importlib.userAuth import UserAuth
from spacewalk.server.importlib.errataCache import schedule_errata_cache_update
from spacewalk.common.checksum import getFileChecksum
-from spacewalk.server.rhnSQL.const import ORACLE, POSTGRESQL
#12/22/05 wregglej 173287
#I made a decent number of changes to this file to implement session authentication.
@@ -382,13 +382,7 @@ class Packages(RPC_Base):
caller = "server.app.channelPackageSubscription"
- if CFG.DB_BACKEND == ORACLE:
- from spacewalk.server.importlib.backendOracle import OracleBackend
- backend = OracleBackend()
- elif CFG.DB_BACKEND == POSTGRESQL:
- from spacewalk.server.importlib.backendOracle import PostgresqlBackend
- backend = PostgresqlBackend()
-
+ backend = SQLBackend()
backend.init()
importer = ChannelPackageSubscription(batch, backend, caller=caller)
try:
diff --git a/backend/server/importlib/backendOracle.py b/backend/server/importlib/backendOracle.py
index 233390c..f15dddc 100644
--- a/backend/server/importlib/backendOracle.py
+++ b/backend/server/importlib/backendOracle.py
@@ -22,6 +22,8 @@ from backend import Backend
from backendLib import DBint, DBstring, DBdateTime, DBblob, Table, \
TableCollection
from spacewalk.server import rhnSQL
+from spacewalk.server.rhnSQL.const import ORACLE, POSTGRESQL
+from spacewalk.common import CFG
class OracleBackend(Backend):
tables = TableCollection(
@@ -592,3 +594,9 @@ class PostgresqlBackend(OracleBackend):
"""
return Backend.init(self)
+def SQLBackend():
+ if CFG.DB_BACKEND == ORACLE:
+ backend = OracleBackend()
+ elif CFG.DB_BACKEND == POSTGRESQL:
+ backend = PostgresqlBackend()
+ return backend
diff --git a/backend/server/importlib/packageUpload.py b/backend/server/importlib/packageUpload.py
index 771a33b..ccf5ef8 100644
--- a/backend/server/importlib/packageUpload.py
+++ b/backend/server/importlib/packageUpload.py
@@ -19,6 +19,7 @@
from spacewalk.common import rhnFault, log_debug, rhn_rpm, CFG
from spacewalk.server import rhnChannel, taskomatic, rhnSQL
+from spacewalk.server.importlib.backendOracle import SQLBackend
from spacewalk.server.importlib.headerSource import createPackage
from spacewalk.server.importlib.importLib import Collection
from spacewalk.server.importlib.packageImport import packageImporter
@@ -44,13 +45,7 @@ def uploadPackages(info, source=0, force=0, caller=None):
p = __processPackage(package, org_id, channelList, source)
batch.append(p)
- if CFG.DB_BACKEND == ORACLE:
- from spacewalk.server.importlib.backendOracle import OracleBackend
- backend = OracleBackend()
- elif CFG.DB_BACKEND == POSTGRESQL:
- from spacewalk.server.importlib.backendOracle import PostgresqlBackend
- backend = PostgresqlBackend()
-
+ backend = SQLBackend()
backend.init()
importer = packageImporter(batch, backend, source, caller=caller)
diff --git a/backend/server/rhnPackageUpload.py b/backend/server/rhnPackageUpload.py
index ab6e88e..7138ff9 100644
--- a/backend/server/rhnPackageUpload.py
+++ b/backend/server/rhnPackageUpload.py
@@ -22,12 +22,12 @@ from spacewalk.common import CFG, log_debug, rhnFault, rhn_mpm, \
from spacewalk.common.rhn_rpm import get_header_byte_range
from spacewalk.server import rhnSQL
+from spacewalk.server.importlib.backendOracle import SQLBackend
from spacewalk.server.importlib import importLib, userAuth, mpmSource, \
packageImport, errataCache
from spacewalk.server.rhnLib import get_package_path, \
get_package_path_without_package_name
from spacewalk.server.rhnServer import server_packages
-from spacewalk.server.rhnSQL.const import ORACLE, POSTGRESQL
def write_temp_file(req, buffer_size, packaging=None):
@@ -152,12 +152,7 @@ def push_package(header, payload_stream, checksum_type, checksum, org_id=None, f
batch = importLib.Collection()
batch.append(pkg)
- if CFG.DB_BACKEND == ORACLE:
- from spacewalk.server.importlib.backendOracle import OracleBackend
- backend = OracleBackend()
- elif CFG.DB_BACKEND == POSTGRESQL:
- from spacewalk.server.importlib.backendOracle import PostgresqlBackend
- backend = PostgresqlBackend()
+ backend = SQLBackend()
backend.init()
if force:
commit 9060ca4e3318d479c2724dcda1d78474c84df514
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Nov 30 12:10:39 2010 +0100
RegistrationNumber() is dead after if data.has_key('registrationNumber') block removal
diff --git a/backend/server/handlers/xmlrpc/registration.py b/backend/server/handlers/xmlrpc/registration.py
index 336036e..d0aa0f6 100644
--- a/backend/server/handlers/xmlrpc/registration.py
+++ b/backend/server/handlers/xmlrpc/registration.py
@@ -39,27 +39,6 @@ def hash_validate(data, *keylist):
return 0
return 1
-def RegistrationNumber(nr):
- """ process a registration number for sanitization purposes """
- if not nr:
- return None
- if not type(nr) == type(""):
- log_debug(3, "Got unparseable registration Number: %s" % nr)
- return None
- mynr = string.lower(nr)
- # prepare the translation table
- t = string.maketrans("los", "105")
- # and strip out unwanted chars
- mynr = string.translate(mynr, t, "_- ")
- # keep only hexdigits
- ret = ""
- for r in mynr:
- if r in string.hexdigits:
- ret = ret + r
- if not ret:
- return None
- return ret
-
def parse_smbios(smbios):
vendor = smbios.get('smbios.bios.vendor')
serial = smbios.get('smbios.system.serial', '')
commit a914b22bda4d2fa31cb5090a8568150f276f7b5f
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Nov 29 23:58:38 2010 +0100
removed dead code together with its invalid comment
- the code is dead because otherwise it must fail to execute according to
E0602:587:_get_path_from_cursor: Undefined variable '_none2emptyString'
- there can't be two packages with different epoch because we
explicitely set :epoch in query
diff --git a/backend/satellite_exporter/handlers/non_auth_dumper.py b/backend/satellite_exporter/handlers/non_auth_dumper.py
index 7187a17..ac2109e 100644
--- a/backend/satellite_exporter/handlers/non_auth_dumper.py
+++ b/backend/satellite_exporter/handlers/non_auth_dumper.py
@@ -576,17 +576,7 @@ def _get_path_from_cursor(h):
if not rs:
raise InvalidPackageError
- # It is unlikely for this query to return more than one row,
- # but it is possible
- # (having two packages with the same n, v, r, a and different epoch in
- # the same channel is prohibited by the RPM naming scheme; but extra
- # care won't hurt)
max_row = rs[0]
- for each in rs[1:]:
- # Compare the epoch as string
- if _none2emptyString(each['epoch']) > _none2emptyString(
- max_row['epoch']):
- max_row = each
if max_row['path'] is None:
commit f3b87b069a2d51fb36cc40e5fac13f101cff1bd1
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Sun Nov 28 20:56:50 2010 +0100
python 2.4+ (RHEL5+) has hasattr(gettext, 'GNUTranslations') == True; removing dead code
diff --git a/backend/common/rhnTranslate.py b/backend/common/rhnTranslate.py
index 89ce058..f89641b 100644
--- a/backend/common/rhnTranslate.py
+++ b/backend/common/rhnTranslate.py
@@ -18,28 +18,27 @@ import types
import gettext
import string
-if hasattr(gettext, 'GNUTranslations'):
- class RHN_Translations(gettext.GNUTranslations):
- # Defining our own class, since we'd like to save the language we use
- # Determining the language is not very pretty - we parse the file name
- # which is supposed to be something like
- # .../<lang>/LC_MESSAGES/<domain>.po
- def _parse(self, fp):
- gettext.GNUTranslations._parse(self, fp)
- filename = fp.name
- filename = os.path.normpath(filename)
- # Extract the language
- self.lang = string.split(filename, '/')[-3]
+class RHN_Translations(gettext.GNUTranslations):
+ # Defining our own class, since we'd like to save the language we use
+ # Determining the language is not very pretty - we parse the file name
+ # which is supposed to be something like
+ # .../<lang>/LC_MESSAGES/<domain>.po
+ def _parse(self, fp):
+ gettext.GNUTranslations._parse(self, fp)
+ filename = fp.name
+ filename = os.path.normpath(filename)
+ # Extract the language
+ self.lang = string.split(filename, '/')[-3]
- def getlangs(self):
- # Return all languages
- #pkilambi:bug#158561,170819,170821: the gettext object in python 2.2.3 has no attribute
- #_fallback so add a check if __dict__ has key
- #if not self._fallback or not hasattr(self._fallback, 'getlangs'):
- if not self.__dict__.has_key("_fallback") or not self._fallback or not hasattr(self._fallback, 'getlangs'):
- return [ self.lang, 'C' ]
- # Recursive call
- return [ self.lang ] + self._fallback.getlangs()
+ def getlangs(self):
+ # Return all languages
+ #pkilambi:bug#158561,170819,170821: the gettext object in python 2.2.3 has no attribute
+ #_fallback so add a check if __dict__ has key
+ #if not self._fallback or not hasattr(self._fallback, 'getlangs'):
+ if not self.__dict__.has_key("_fallback") or not self._fallback or not hasattr(self._fallback, 'getlangs'):
+ return [ self.lang, 'C' ]
+ # Recursive call
+ return [ self.lang ] + self._fallback.getlangs()
class i18n:
_default_langs = ['en', 'en_US', 'C']
@@ -79,47 +78,9 @@ class i18n:
if localedir: self.localedir = localedir
self._set_catalog()
-# Old-style gettext
-class i18n_old(i18n):
- def _set_catalog(self):
- self.cat = gettext.Catalog(self.domain, localedir=self.localedir)
-
- def getlangs(self):
- return gettext.lang
-
- def setlangs(self, langs):
- if isinstance(langs, types.StringType):
- langs = [ langs ]
- # Build the list of languages
- _added_langs = []
- # Aargh - on python 1.5, gettext removes os and string - so subsequent
- # calls to _expandLang fail - so add the string module back
- gettext.string = string
- for l in langs:
- _added_langs.extend(gettext._expandLang(l))
- # Adding some defaults
- _added_langs.extend(self._default_langs)
- # Remove duplicates
- h = {}
- del gettext.lang[:]
- for l in _added_langs:
- if l == 'C':
- # We'll add it back later
- continue
- if h.has_key(l):
- # Already loaded it
- continue
- gettext.lang.append(l)
- h[l] = None
- if "C" not in gettext.lang:
- gettext.lang.append("C")
- self._set_catalog()
def N_(str):
return str
-if hasattr(gettext, 'GNUTranslations'):
- cat = i18n()
-else:
- cat = i18n_old()
+cat = i18n()
_ = cat.gettext
12 years, 6 months
Changes to 'refs/tags/spacecmd-1.3.2-1'
by aparsons
Tag 'spacecmd-1.3.2-1' created by Aron Parsons <aparsons(a)redhat.com> at 2010-11-30 13:04 +0000
Tagging package [spacecmd] version [1.3.2-1] in directory [spacecmd/].
Changes since spacewalk-proxy-1.3.4-1:
Aron Parsons (3):
spacecmd: don't use a cached session if username and password are passed as arguments
spacecmd: added get_session function
Automatic commit of package [spacecmd] release [1.3.2-1].
---
rel-eng/packages/spacecmd | 2 +-
spacecmd/spacecmd.spec | 6 +++++-
spacecmd/src/lib/misc.py | 24 +++++++++++++++++++-----
3 files changed, 25 insertions(+), 7 deletions(-)
---
12 years, 6 months
3 commits - rel-eng/packages spacecmd/spacecmd.spec spacecmd/src
by aparsons
rel-eng/packages/spacecmd | 2 +-
spacecmd/spacecmd.spec | 6 +++++-
spacecmd/src/lib/misc.py | 24 +++++++++++++++++++-----
3 files changed, 25 insertions(+), 7 deletions(-)
New commits:
commit 0cafb161e2c1aa9a6a2f28b9f6ef07db15be7f8d
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Tue Nov 30 08:04:58 2010 -0500
Automatic commit of package [spacecmd] release [1.3.2-1].
diff --git a/rel-eng/packages/spacecmd b/rel-eng/packages/spacecmd
index 2aacda1..2c67658 100644
--- a/rel-eng/packages/spacecmd
+++ b/rel-eng/packages/spacecmd
@@ -1 +1 @@
-1.3.1-1 spacecmd/
+1.3.2-1 spacecmd/
diff --git a/spacecmd/spacecmd.spec b/spacecmd/spacecmd.spec
index fbf4692..8c001fd 100644
--- a/spacecmd/spacecmd.spec
+++ b/spacecmd/spacecmd.spec
@@ -4,7 +4,7 @@
%endif
Name: spacecmd
-Version: 1.3.1
+Version: 1.3.2
Release: 1%{?dist}
Summary: Command-line interface to Spacewalk and Satellite servers
@@ -57,6 +57,10 @@ touch %{buildroot}/%{python_sitelib}/spacecmd/__init__.py
%doc %{_mandir}/man1/spacecmd.1.gz
%changelog
+* Tue Nov 30 2010 Aron Parsons <aparsons(a)redhat.com> 1.3.2-1
+- don't use a cached session if username and password are passed as arguments
+- added get_session function
+
* Mon Nov 22 2010 Aron Parsons <aparsons(a)redhat.com> 1.3.1-1
- fix uninitialized variable in snippet_create
- 655055 - honor the quiet flag when generating caches in spacecmd
commit ceecbf871898e3580cd10e11a4b2bea49f4d831e
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Tue Nov 30 08:01:30 2010 -0500
spacecmd: added get_session function
diff --git a/spacecmd/src/lib/misc.py b/spacecmd/src/lib/misc.py
index 6dd05a8..31fa9c7 100644
--- a/spacecmd/src/lib/misc.py
+++ b/spacecmd/src/lib/misc.py
@@ -109,7 +109,6 @@ def help_get_apiversion(self):
print 'get_apiversion: Display the API version of the server'
print 'usage: get_apiversion'
-
def do_get_apiversion(self, args):
print self.client.api.getVersion()
@@ -135,6 +134,18 @@ def do_get_certificateexpiration(self, args):
####################
+def help_get_session(self):
+ print 'get_session: Show the current session string'
+ print 'usage: get_session'
+
+def do_get_session(self, args):
+ if self.session:
+ print self.session
+ else:
+ logging.error('No session found')
+
+####################
+
def help_help(self):
print 'help: Show help for the given command'
print 'usage: help COMMAND'
commit 76f84d43911e63393a58caff6f4aec75f64643a8
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Tue Nov 30 07:55:38 2010 -0500
spacecmd: don't use a cached session if username and password are passed as arguments
diff --git a/spacecmd/src/lib/misc.py b/spacecmd/src/lib/misc.py
index 8ed89d2..6dd05a8 100644
--- a/spacecmd/src/lib/misc.py
+++ b/spacecmd/src/lib/misc.py
@@ -227,11 +227,14 @@ def do_login(self, args):
session_file = os.path.join(self.conf_dir, server, 'session')
# retrieve a cached session
- if os.path.isfile(session_file):
+ # (skip this if username and password are provided)
+ if os.path.isfile(session_file) \
+ and not self.options.username \
+ and not self.options.password:
try:
sessionfile = open(session_file, 'r')
- # read the session (format = server:username:session)
+ # read the session (format = username:session)
for line in sessionfile:
parts = line.split(':')
@@ -263,7 +266,7 @@ def do_login(self, args):
# attempt to login if we don't have a valid session yet
if not len(self.session):
if len(username):
- print 'Spacewalk Username: %s' % username
+ logging.info('Spacewalk Username: %s' % username)
else:
if self.options.username:
username = self.options.username
@@ -305,7 +308,7 @@ def do_login(self, args):
sessionfile.write(line)
sessionfile.close()
except IOError:
- logging.error('Could not write cache file')
+ logging.error('Could not write session file')
# load the system/package/errata caches
self.load_caches(server)
12 years, 6 months
Changes to 'refs/tags/spacewalk-proxy-1.3.4-1'
by Miroslav Suchý
Tag 'spacewalk-proxy-1.3.4-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2010-11-30 12:50 +0000
Tagging package [spacewalk-proxy] version [1.3.4-1] in directory [proxy/proxy/].
Changes since python-gzipstream-1.4.3-1:
Miroslav Suchý (2):
658303 - do not forward Host header, it will confuse target Satellite (and VirtualHosts)
Automatic commit of package [spacewalk-proxy] release [1.3.4-1].
---
proxy/proxy/rhnShared.py | 4 ++--
proxy/proxy/spacewalk-proxy.spec | 5 ++++-
rel-eng/packages/spacewalk-proxy | 2 +-
3 files changed, 7 insertions(+), 4 deletions(-)
---
12 years, 6 months
2 commits - proxy/proxy rel-eng/packages
by Miroslav Suchý
proxy/proxy/rhnShared.py | 4 ++--
proxy/proxy/spacewalk-proxy.spec | 5 ++++-
rel-eng/packages/spacewalk-proxy | 2 +-
3 files changed, 7 insertions(+), 4 deletions(-)
New commits:
commit dce0e03f8eb2c539b5523da82dbbfc47cc8d9de3
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Nov 30 13:50:56 2010 +0100
Automatic commit of package [spacewalk-proxy] release [1.3.4-1].
diff --git a/proxy/proxy/spacewalk-proxy.spec b/proxy/proxy/spacewalk-proxy.spec
index 7a1d4fb..ecc2a1c 100644
--- a/proxy/proxy/spacewalk-proxy.spec
+++ b/proxy/proxy/spacewalk-proxy.spec
@@ -4,7 +4,7 @@ Group: Applications/Internet
License: GPLv2
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 1.3.3
+Version: 1.3.4
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python
@@ -332,6 +332,9 @@ fi
%changelog
+* Tue Nov 30 2010 Miroslav Suchý <msuchy(a)redhat.com> 1.3.4-1
+- 658303 - do not forward Host header, it will confuse target Satellite
+
* Mon Nov 29 2010 Miroslav Suchý <msuchy(a)redhat.com> 1.3.3-1
- 657956 - fix condrestart option (msuchy(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-proxy b/rel-eng/packages/spacewalk-proxy
index c0faec8..bf22327 100644
--- a/rel-eng/packages/spacewalk-proxy
+++ b/rel-eng/packages/spacewalk-proxy
@@ -1 +1 @@
-1.3.3-1 proxy/proxy/
+1.3.4-1 proxy/proxy/
commit 64021b958db3bff2688c89ab8d22ec471e132272
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Nov 30 13:49:07 2010 +0100
658303 - do not forward Host header, it will confuse target Satellite (and VirtualHosts)
We alredy set Host header previously, so it is already populated.
diff --git a/proxy/proxy/rhnShared.py b/proxy/proxy/rhnShared.py
index 5871f76..7e8785e 100644
--- a/proxy/proxy/rhnShared.py
+++ b/proxy/proxy/rhnShared.py
@@ -328,12 +328,12 @@ class SharedHandler:
# mod_wsgi modifies incoming headers so we have to transform them back
k = k.replace('_','-')
if not (string.lower(k)[:2] == 'x-' or
- string.lower(k) in [
+ string.lower(k) in [ #all but 'host'
'accept', 'accept-charset', 'accept-encoding', 'accept-language',
'accept-ranges', 'age', 'allow', 'authorization', 'cache-control',
'connection', 'content-encoding', 'content-language', 'content-length',
'content-location', 'content-md5', 'content-range', 'content-type',
- 'date', 'etag', 'expect', 'expires', 'from', 'host', 'if-match',
+ 'date', 'etag', 'expect', 'expires', 'from', 'if-match',
'if-modified-since', 'if-none-match', 'if-range', 'if-unmodified-since',
'last-modified', 'location', 'max-forwards', 'pragma', 'proxy-authenticate',
'proxy-authorization', 'range', 'referer', 'retry-after', 'server',
12 years, 6 months
Changes to 'refs/tags/python-gzipstream-1.4.3-1'
by Miroslav Suchý
Tag 'python-gzipstream-1.4.3-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2010-11-30 09:36 +0000
Tagging package [python-gzipstream] version [1.4.3-1] in directory [projects/python-gzipstream/].
Changes since spacewalk-proxy-1.3.3-1:
Miroslav Suchý (2):
657531 - correct condition for defining the python_sitelib macro
Automatic commit of package [python-gzipstream] release [1.4.3-1].
Tomas Lestach (2):
516570 - just unify channel dates format
658167 - fix cases, when quartz triggers a job earlier, than the job info lands in the DB
---
java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java | 2
java/code/src/com/redhat/rhn/taskomatic/TaskoQuartzHelper.java | 24 +++++++++-
java/code/src/com/redhat/rhn/taskomatic/TaskoXmlRpcHandler.java | 13 +++--
projects/python-gzipstream/python-gzipstream.spec | 8 ++-
projects/python-gzipstream/setup.py | 2
rel-eng/packages/python-gzipstream | 2
6 files changed, 42 insertions(+), 9 deletions(-)
---
12 years, 6 months
2 commits - projects/python-gzipstream rel-eng/packages
by Miroslav Suchý
projects/python-gzipstream/python-gzipstream.spec | 8 +++++++-
projects/python-gzipstream/setup.py | 2 +-
rel-eng/packages/python-gzipstream | 2 +-
3 files changed, 9 insertions(+), 3 deletions(-)
New commits:
commit eb882372fb34bfef786d4bfc40be46f65f3a6491
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Nov 30 10:36:32 2010 +0100
Automatic commit of package [python-gzipstream] release [1.4.3-1].
diff --git a/projects/python-gzipstream/python-gzipstream.spec b/projects/python-gzipstream/python-gzipstream.spec
index 62975a1..b710d06 100644
--- a/projects/python-gzipstream/python-gzipstream.spec
+++ b/projects/python-gzipstream/python-gzipstream.spec
@@ -4,7 +4,7 @@
Summary: Streaming zlib (gzip) support for python
Name: python-gzipstream
-Version: 1.4.2
+Version: 1.4.3
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/python-gzipstream-%{versi...
@@ -40,6 +40,10 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE
%changelog
+* Tue Nov 30 2010 Miroslav Suchý <msuchy(a)redhat.com> 1.4.3-1
+- 657531 - correct condition for defining the python_sitelib macro
+ (msuchy(a)redhat.com)
+
* Fri Nov 26 2010 Miroslav Suchý <msuchy(a)redhat.com> 1.4.2-1
- put license into doc section (msuchy(a)redhat.com)
- make setup quiet (msuchy(a)redhat.com)
diff --git a/projects/python-gzipstream/setup.py b/projects/python-gzipstream/setup.py
index 7a40eb6..20bb7dd 100644
--- a/projects/python-gzipstream/setup.py
+++ b/projects/python-gzipstream/setup.py
@@ -6,7 +6,7 @@
from distutils.core import setup
setup(name = "gzipstream",
- version = "1.4.2",
+ version = "1.4.3",
description = "Streaming zlib (gzip) support for python",
long_description = """\
A streaming gzip handler.
diff --git a/rel-eng/packages/python-gzipstream b/rel-eng/packages/python-gzipstream
index 58ea78a..2e3ef41 100644
--- a/rel-eng/packages/python-gzipstream
+++ b/rel-eng/packages/python-gzipstream
@@ -1 +1 @@
-1.4.2-1 projects/python-gzipstream/
+1.4.3-1 projects/python-gzipstream/
commit 5365998b3f72ca432648ca60b4b2874f08974b38
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Nov 30 10:35:07 2010 +0100
657531 - correct condition for defining the python_sitelib macro
diff --git a/projects/python-gzipstream/python-gzipstream.spec b/projects/python-gzipstream/python-gzipstream.spec
index fd1f60b..62975a1 100644
--- a/projects/python-gzipstream/python-gzipstream.spec
+++ b/projects/python-gzipstream/python-gzipstream.spec
@@ -1,4 +1,6 @@
+%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%endif
Summary: Streaming zlib (gzip) support for python
Name: python-gzipstream
12 years, 6 months