Changes to 'refs/tags/rhn-client-tools-1.3.11-1'
by Miroslav Suchý
Tag 'rhn-client-tools-1.3.11-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2011-01-28 21:55 +0000
Tagging package [rhn-client-tools] version [1.3.11-1] in directory [client/rhel/rhn-client-tools/].
Changes since osad-5.9.50-1:
Miroslav Suchý (4):
Automatic commit of package [rhncfg] release [5.9.47-1].
Automatic commit of package [rhnlib] release [2.5.32-1].
Automatic commit of package [rhnpush] release [5.5.13-1].
Automatic commit of package [rhn-client-tools] release [1.3.11-1].
---
client/rhel/rhn-client-tools/rhn-client-tools.spec | 11 ++++++++++-
client/rhel/rhnlib/rhnlib.spec | 7 ++++++-
client/tools/rhncfg/rhncfg.spec | 6 +++++-
client/tools/rhnpush/rhnpush.spec | 9 ++++++++-
rel-eng/packages/rhn-client-tools | 2 +-
rel-eng/packages/rhncfg | 2 +-
rel-eng/packages/rhnlib | 2 +-
rel-eng/packages/rhnpush | 2 +-
8 files changed, 33 insertions(+), 8 deletions(-)
---
13 years, 2 months
Changes to 'refs/tags/osad-5.9.50-1'
by Miroslav Suchý
Tag 'osad-5.9.50-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2011-01-28 21:51 +0000
Tagging package [osad] version [5.9.50-1] in directory [client/tools/osad/].
Changes since spacewalk-backend-1.3.52-1:
Miroslav Suchý (5):
648403 - on rhel4 we have no up2date_client rhnserver, on rhel4 revert to old michael code
break circular import
648403 - do not create TB even on Red Hat Enterprise Linux 4
get_server_capability() is defined twice in osad and rhncfg, merge and move to rhnlib and make it member of rpclib.Server
Automatic commit of package [osad] release [5.9.50-1].
---
client/rhel/rhn-client-tools/src/up2date_client/clientCaps.py | 4
client/rhel/rhnlib/rhn/rpclib.py | 34 +++++++
client/tools/osad/osad.spec | 8 +
client/tools/osad/src/osad.py | 31 -------
client/tools/rhncfg/config_common/repository.py | 32 -------
client/tools/rhncfg/rhncfg.spec | 2
client/tools/rhnpush/rhnpush.spec | 3
client/tools/rhnpush/uploadLib.py | 44 ++++------
rel-eng/packages/osad | 2
9 files changed, 68 insertions(+), 92 deletions(-)
---
13 years, 2 months
client/rhel rel-eng/packages
by Miroslav Suchý
client/rhel/rhn-client-tools/rhn-client-tools.spec | 11 ++++++++++-
rel-eng/packages/rhn-client-tools | 2 +-
2 files changed, 11 insertions(+), 2 deletions(-)
New commits:
commit 9d32fcb89a1b2390335239843054d42cc203a333
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Jan 28 22:55:44 2011 +0100
Automatic commit of package [rhn-client-tools] release [1.3.11-1].
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index da50a73..66e59a7 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -4,7 +4,7 @@ Group: System Environment/Base
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
URL: https://fedorahosted.org/spacewalk
Name: rhn-client-tools
-Version: 1.3.10
+Version: 1.3.11
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -292,6 +292,15 @@ make -f Makefile.rhn-client-tools test
%endif
%changelog
+* Fri Jan 28 2011 Miroslav Suchý <msuchy(a)redhat.com> 1.3.11-1
+- break circular import
+- 580479 - put new submodule into package
+- W: 28: Unused import glade
+- 580479 - Graphical firstboot should offer EUS channel selection
+- 581482 - make tui consistent with gui
+- 596108 - firstboot: don't allow multiple system registrations
+- 606222 - label could not have focus
+
* Thu Jan 20 2011 Tomas Lestach <tlestach(a)redhat.com> 1.3.10-1
- updating Copyright years for year 2011 (tlestach(a)redhat.com)
- update .po and .pot files for rhn-client-tools (tlestach(a)redhat.com)
diff --git a/rel-eng/packages/rhn-client-tools b/rel-eng/packages/rhn-client-tools
index 494b43f..97685ce 100644
--- a/rel-eng/packages/rhn-client-tools
+++ b/rel-eng/packages/rhn-client-tools
@@ -1 +1 @@
-1.3.10-1 client/rhel/rhn-client-tools/
+1.3.11-1 client/rhel/rhn-client-tools/
13 years, 2 months
4 commits - client/rhel client/tools rel-eng/packages
by Miroslav Suchý
client/rhel/rhnlib/rhnlib.spec | 7 ++++++-
client/tools/osad/osad.spec | 6 +++++-
client/tools/rhncfg/rhncfg.spec | 6 +++++-
client/tools/rhnpush/rhnpush.spec | 9 ++++++++-
rel-eng/packages/osad | 2 +-
rel-eng/packages/rhncfg | 2 +-
rel-eng/packages/rhnlib | 2 +-
rel-eng/packages/rhnpush | 2 +-
8 files changed, 28 insertions(+), 8 deletions(-)
New commits:
commit 585caf36d0250b0b8b989ece4399d5c906bad764
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Jan 28 22:54:22 2011 +0100
Automatic commit of package [rhnpush] release [5.5.13-1].
diff --git a/client/tools/rhnpush/rhnpush.spec b/client/tools/rhnpush/rhnpush.spec
index 305efbd..4a9a9ee 100644
--- a/client/tools/rhnpush/rhnpush.spec
+++ b/client/tools/rhnpush/rhnpush.spec
@@ -5,7 +5,7 @@ Summary: Common programs needed to be installed on the RHN servers/proxies
Group: Applications/System
License: GPLv2
URL: http://fedorahosted.org/spacewalk
-Version: 5.5.12
+Version: 5.5.13
Release: 1%{?dist}
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -56,6 +56,13 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/solaris2mpm.8*
%changelog
+* Fri Jan 28 2011 Miroslav Suchý <msuchy(a)redhat.com> 5.5.13-1
+- get_server_capability() is defined twice in osad and rhncfg, merge and move
+ to rhnlib and make it member of rpclib.Server
+- 648403 - do not create TB even on Red Hat Enterprise Linux 4
+- 648403 - workaround missing hasCapability() on RHEL4
+- Updating the copyright years to include 2010.
+
* Thu Dec 23 2010 Miroslav Suchý <msuchy(a)redhat.com> 5.5.12-1
- 648403 - use server given on command line rather than rhnParent
diff --git a/rel-eng/packages/rhnpush b/rel-eng/packages/rhnpush
index dcc7866..925c328 100644
--- a/rel-eng/packages/rhnpush
+++ b/rel-eng/packages/rhnpush
@@ -1 +1 @@
-5.5.12-1 client/tools/rhnpush/
+5.5.13-1 client/tools/rhnpush/
commit 08dee9b62c45824203606410b3f0d40194416ce8
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Jan 28 22:53:41 2011 +0100
Automatic commit of package [rhnlib] release [2.5.32-1].
diff --git a/client/rhel/rhnlib/rhnlib.spec b/client/rhel/rhnlib/rhnlib.spec
index bb14f72..00aeb84 100644
--- a/client/rhel/rhnlib/rhnlib.spec
+++ b/client/rhel/rhnlib/rhnlib.spec
@@ -4,7 +4,7 @@ Summary: Python libraries for the RHN project
Name: rhnlib
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 2.5.31
+Version: 2.5.32
Release: 1%{?dist}
Group: Development/Libraries
@@ -61,6 +61,11 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitelib}/*
%changelog
+* Fri Jan 28 2011 Miroslav Suchý <msuchy(a)redhat.com> 2.5.32-1
+- get_server_capability() is defined twice in osad and rhncfg, merge and move
+ to rhnlib and make it member of rpclib.Server
+- Updating the copyright years to include 2010.
+
* Mon Dec 20 2010 Michael Mraka <michael.mraka(a)redhat.com> 2.5.31-1
- put crypto back
diff --git a/rel-eng/packages/rhnlib b/rel-eng/packages/rhnlib
index 21ab0b1..409fd67 100644
--- a/rel-eng/packages/rhnlib
+++ b/rel-eng/packages/rhnlib
@@ -1 +1 @@
-2.5.31-1 client/rhel/rhnlib/
+2.5.32-1 client/rhel/rhnlib/
commit 2f62bf0cacfc86a390c00cd584bdbb2a47e9d659
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Jan 28 22:52:10 2011 +0100
Automatic commit of package [rhncfg] release [5.9.47-1].
diff --git a/client/tools/rhncfg/rhncfg.spec b/client/tools/rhncfg/rhncfg.spec
index 9fe4065..f8525c6 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.46
+Version: 5.9.47
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -100,6 +100,10 @@ rm -rf $RPM_BUILD_ROOT
# $Id$
%changelog
+* Fri Jan 28 2011 Miroslav Suchý <msuchy(a)redhat.com> 5.9.47-1
+- get_server_capability() is defined twice in osad and rhncfg, merge and move
+ to rhnlib and make it member of rpclib.Server
+
* Thu Jan 20 2011 Tomas Lestach <tlestach(a)redhat.com> 5.9.46-1
- updating Copyright years for year 2011 (tlestach(a)redhat.com)
- 628920 - rhel4 does not support selinux (msuchy(a)redhat.com)
diff --git a/rel-eng/packages/rhncfg b/rel-eng/packages/rhncfg
index 0706d26..f6ecab1 100644
--- a/rel-eng/packages/rhncfg
+++ b/rel-eng/packages/rhncfg
@@ -1 +1 @@
-5.9.46-1 client/tools/rhncfg/
+5.9.47-1 client/tools/rhncfg/
commit ddb4060dcaefbd77927f20fd2ba2b8174a8a297f
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Jan 28 22:51:59 2011 +0100
Automatic commit of package [osad] release [5.9.50-1].
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index 4bdfa60..cbd0791 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -9,7 +9,7 @@ Group: System Environment/Daemons
License: GPLv2
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 5.9.49
+Version: 5.9.50
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -246,6 +246,10 @@ rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvi {}
# $Id$
%changelog
+* Fri Jan 28 2011 Miroslav Suchý <msuchy(a)redhat.com> 5.9.50-1
+- get_server_capability() is defined twice in osad and rhncfg, merge and move
+ to rhnlib and make it member of rpclib.Server
+
* Mon Jan 17 2011 Jan Pazdziora 5.9.49-1
- Silence InstantClient 11g-related AVCs in osa-dispatcher.
- Silence diagnostics which was causing AVC denials.
diff --git a/rel-eng/packages/osad b/rel-eng/packages/osad
index 41c5f72..eb29f0e 100644
--- a/rel-eng/packages/osad
+++ b/rel-eng/packages/osad
@@ -1 +1 @@
-5.9.49-1 client/tools/osad/
+5.9.50-1 client/tools/osad/
13 years, 2 months
client/rhel client/tools
by Miroslav Suchý
client/rhel/rhnlib/rhn/rpclib.py | 34 ++++++++++++++++++++++++
client/tools/osad/osad.spec | 2 -
client/tools/osad/src/osad.py | 31 ---------------------
client/tools/rhncfg/config_common/repository.py | 32 ----------------------
client/tools/rhncfg/rhncfg.spec | 2 -
client/tools/rhnpush/rhnpush.spec | 3 +-
client/tools/rhnpush/uploadLib.py | 4 --
7 files changed, 41 insertions(+), 67 deletions(-)
New commits:
commit 7fd26bd46f506d416146485cb80ab0f11f298b5b
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Jan 28 22:44:52 2011 +0100
get_server_capability() is defined twice in osad and rhncfg, merge and move to rhnlib and make it member of rpclib.Server
diff --git a/client/rhel/rhnlib/rhn/rpclib.py b/client/rhel/rhnlib/rhn/rpclib.py
index 1f3b0c6..05921e8 100644
--- a/client/rhel/rhnlib/rhn/rpclib.py
+++ b/client/rhel/rhnlib/rhn/rpclib.py
@@ -524,6 +524,40 @@ class Server:
self._transport.close()
self._transport = None
+ def get_server_capability(self):
+ """ Return dictionary of server capabilities.
+
+ It is in form of:
+ {{'registration.finish_message': {'version': '1', 'name': 'registration.finish_message', 'value': '1'}, ...}
+ """
+ headers = self.get_response_headers()
+ if headers is None:
+ # No request done yet
+ return {}
+ cap_headers = headers.getallmatchingheaders("X-RHN-Server-Capability")
+ if not cap_headers:
+ return {}
+ regexp = re.compile(
+ r"^(?P<name>[^(]*)\((?P<version>[^)]*)\)\s*=\s*(?P<value>.*)$")
+ vals = {}
+ for h in cap_headers:
+ arr = string.split(h, ':', 1)
+ assert len(arr) == 2
+ val = string.strip(arr[1])
+ if not val:
+ continue
+
+ mo = regexp.match(val)
+ if not mo:
+ # XXX Just ignoring it, for now
+ continue
+ vdict = mo.groupdict()
+ for k, v in vdict.items():
+ vdict[k] = string.strip(v)
+
+ vals[vdict['name']] = vdict
+ return vals
+
# RHN GET server
class GETServer(Server):
def __init__(self, uri, transport=None, proxy=None, username=None,
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index ac060e6..4bdfa60 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -15,7 +15,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-devel
Requires: python
-Requires: rhnlib >= 1.8-3
+Requires: rhnlib >= 2.5.31
Requires: jabberpy
%if 0%{?rhel} <= 5
Requires: python-hashlib
diff --git a/client/tools/osad/src/osad.py b/client/tools/osad/src/osad.py
index 8e95f47..bd5fb9d 100644
--- a/client/tools/osad/src/osad.py
+++ b/client/tools/osad/src/osad.py
@@ -138,7 +138,7 @@ class Runner(jabber_lib.Runner):
s.add_trusted_cert(osa_ssl_cert)
s.registration.welcome_message()
- server_capabilities = get_server_capability(s)
+ server_capabilities = s.get_server_capability()
if not server_capabilities.has_key('registration.register_osad'):
die("Server does not support OSAD registration")
@@ -370,34 +370,5 @@ class OldUp2dateConfig:
def __getitem__(self, name):
return self._config_obj.readEntry(name)
-def get_server_capability(s):
- headers = s.get_response_headers()
- if headers is None:
- # No request done yet
- return {}
- cap_headers = headers.getallmatchingheaders("X-RHN-Server-Capability")
- if not cap_headers:
- return {}
- regexp = re.compile(
- r"^(?P<name>[^(]*)\((?P<version>[^)]*)\)\s*=\s*(?P<value>.*)$")
- vals = {}
- for h in cap_headers:
- arr = string.split(h, ':', 1)
- assert len(arr) == 2
- val = string.strip(arr[1])
- if not val:
- continue
-
- mo = regexp.match(val)
- if not mo:
- # XXX Just ignoring it, for now
- continue
- vdict = mo.groupdict()
- for k, v in vdict.items():
- vdict[k] = string.strip(v)
-
- vals[vdict['name']] = vdict
- return vals
-
if __name__ == '__main__':
sys.exit(main() or 0)
diff --git a/client/tools/rhncfg/config_common/repository.py b/client/tools/rhncfg/config_common/repository.py
index a90acc0..72dd92e 100644
--- a/client/tools/rhncfg/config_common/repository.py
+++ b/client/tools/rhncfg/config_common/repository.py
@@ -297,7 +297,7 @@ class RPC_Repository(Repository):
sys.stderr.write("XML-RPC error while talking to %s:\n %s\n" % (self.__server_url, e))
sys.exit(2)
- self._server_capabilities = get_server_capability(x_server)
+ self._server_capabilities = x_server.get_server_capability()
del x_server
# 6/29/05 wregglej 152388
@@ -392,33 +392,3 @@ class RPC_Repository(Repository):
params['file_contents'] = file_contents
return params
-
-def get_server_capability(s):
- headers = s.get_response_headers()
- if headers is None:
- # No request done yet
- return {}
- cap_headers = headers.getallmatchingheaders("X-RHN-Server-Capability")
- if not cap_headers:
- return {}
- regexp = re.compile(
- r"^(?P<name>[^(]*)\((?P<version>[^)]*)\)\s*=\s*(?P<value>.*)$")
- vals = {}
- for h in cap_headers:
- arr = string.split(h, ':', 1)
- assert len(arr) == 2
- val = string.strip(arr[1])
- if not val:
- continue
-
- mo = regexp.match(val)
- if not mo:
- # XXX Just ignoring it, for now
- continue
- vdict = mo.groupdict()
- for k, v in vdict.items():
- vdict[k] = string.strip(v)
-
- vals[vdict['name']] = vdict
- return vals
-
diff --git a/client/tools/rhncfg/rhncfg.spec b/client/tools/rhncfg/rhncfg.spec
index 2085678..9fe4065 100644
--- a/client/tools/rhncfg/rhncfg.spec
+++ b/client/tools/rhncfg/rhncfg.spec
@@ -15,7 +15,7 @@ BuildArch: noarch
BuildRequires: docbook-utils
BuildRequires: python
Requires: python
-Requires: rhnlib
+Requires: rhnlib >= 2.5.32
# If this is rhel 4 or less we need up2date.
%if 0%{?rhel} && "%rhel" < "5"
Requires: up2date
diff --git a/client/tools/rhnpush/rhnpush.spec b/client/tools/rhnpush/rhnpush.spec
index dea49b9..305efbd 100644
--- a/client/tools/rhnpush/rhnpush.spec
+++ b/client/tools/rhnpush/rhnpush.spec
@@ -10,7 +10,8 @@ Release: 1%{?dist}
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
-Requires: rpm-python, rhnlib, rhncfg
+Requires: rpm-python
+Requires: rhnlib >= 2.5.32
Requires: spacewalk-backend-libs >= 0.8.3
%if 0%{?rhel} && 0%{?rhel} <= 5
Requires: up2date
diff --git a/client/tools/rhnpush/uploadLib.py b/client/tools/rhnpush/uploadLib.py
index 7bc7e41..a69d0c4 100644
--- a/client/tools/rhnpush/uploadLib.py
+++ b/client/tools/rhnpush/uploadLib.py
@@ -25,8 +25,6 @@ import struct
import xmlrpclib
from spacewalk.common import rhn_mpm
from spacewalk.common.checksum import getFileChecksum
-from config_common.repository import get_server_capability
-
try:
from up2date_client import rhnserver
rhnserver_available = True
@@ -727,7 +725,7 @@ def exists_getPackageChecksumBySession(rpc_server):
server._server = rpc_server
result = server.capabilities.hasCapability('xmlrpc.packages.extended_profile', 2)
else: # rhel4 has no rhnserver
- server_capabilities = get_server_capability(rpc_server)
+ server_capabilities = rpc_server.get_server_capability()
if 'xmlrpc.packages.extended_profile' in server_capabilities:
# that capability can be '1' or '1-2', this is hackish
result = server_capabilities['xmlrpc.packages.extended_profile']['version'] > '1' and \
13 years, 2 months
2 commits - client/rhel client/tools
by Miroslav Suchý
client/rhel/rhn-client-tools/src/up2date_client/clientCaps.py | 4 -
client/tools/rhnpush/rhnpush.spec | 2
client/tools/rhnpush/uploadLib.py | 25 ++++------
3 files changed, 13 insertions(+), 18 deletions(-)
New commits:
commit 8bdb009008bf6161fb5808c8c29f5ae273cce461
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Jan 28 22:11:24 2011 +0100
648403 - do not create TB even on Red Hat Enterprise Linux 4
diff --git a/client/tools/rhnpush/rhnpush.spec b/client/tools/rhnpush/rhnpush.spec
index fe155ba..dea49b9 100644
--- a/client/tools/rhnpush/rhnpush.spec
+++ b/client/tools/rhnpush/rhnpush.spec
@@ -10,7 +10,7 @@ Release: 1%{?dist}
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
-Requires: rpm-python, rhnlib
+Requires: rpm-python, rhnlib, rhncfg
Requires: spacewalk-backend-libs >= 0.8.3
%if 0%{?rhel} && 0%{?rhel} <= 5
Requires: up2date
diff --git a/client/tools/rhnpush/uploadLib.py b/client/tools/rhnpush/uploadLib.py
index a6e96ee..7bc7e41 100644
--- a/client/tools/rhnpush/uploadLib.py
+++ b/client/tools/rhnpush/uploadLib.py
@@ -15,6 +15,7 @@
# system imports
import os
+import re
import sys
import string
import fnmatch
@@ -24,6 +25,8 @@ import struct
import xmlrpclib
from spacewalk.common import rhn_mpm
from spacewalk.common.checksum import getFileChecksum
+from config_common.repository import get_server_capability
+
try:
from up2date_client import rhnserver
rhnserver_available = True
@@ -724,21 +727,13 @@ def exists_getPackageChecksumBySession(rpc_server):
server._server = rpc_server
result = server.capabilities.hasCapability('xmlrpc.packages.extended_profile', 2)
else: # rhel4 has no rhnserver
- result = True
- try: # if server do not have this function we will create TB :(
- raw_call(rpc_server.packages.getPackageChecksumBySession, '', {})
- except xmlrpclib.Fault, e:
- if e.faultCode in [-2, -33]:
- # Fault -33: session token is invalid
- # i.e. function exists but we supplied wrong data
- # Fault -2 session is unknown - expected when empty
- pass
- elif e.faultCode == -1:
- # Fault -1: function invalid
- result = False
- else:
- # pass through anything else
- raise
+ server_capabilities = get_server_capability(rpc_server)
+ if 'xmlrpc.packages.extended_profile' in server_capabilities:
+ # that capability can be '1' or '1-2', this is hackish
+ result = server_capabilities['xmlrpc.packages.extended_profile']['version'] > '1' and \
+ server_capabilities['xmlrpc.packages.extended_profile']['value'] # usually '1'
+ else:
+ result = False
return result
# compare two package [n,v,r,e] tuples
commit ec1a072fd191069bfb4f798b119d6a4fd856c2d3
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Jan 28 21:34:13 2011 +0100
break circular import
addressing:
Traceback (most recent call last):
File "/usr/bin/rhnpush", line 12, in ?
mod = __import__("rhnpush." + mod_name)
File "rhnpush.py", line 50, in ?
File "/usr/share/rhn/rhnpush/uploadLib.py", line 28, in ?
from up2date_client.capabilities import Capabilities
File "/usr/share/rhn/up2date_client/capabilities.py", line 12, in ?
import rpcServer
File "/usr/share/rhn/up2date_client/rpcServer.py", line 15, in ?
import clientCaps
File "/usr/share/rhn/up2date_client/clientCaps.py", line 70, in ?
loadLocalCaps()
File "/usr/share/rhn/up2date_client/clientCaps.py", line 63, in loadLocalCaps
caplist = capabilities.parseCap(line)
AttributeError: module object has no attribute parseCap
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/clientCaps.py b/client/rhel/rhn-client-tools/src/up2date_client/clientCaps.py
index 7442dbd..3981475 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/clientCaps.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/clientCaps.py
@@ -7,7 +7,7 @@ import glob
import os
import string
-import capabilities
+from capabilities import parseCap
class ClientCapabilities(UserDict.UserDict):
def __init__(self):
@@ -51,7 +51,7 @@ def loadLocalCaps(capsDir = "/etc/sysconfig/rhn/clientCaps.d"):
string.strip(line)
if line[0] == "#":
continue
- caplist = capabilities.parseCap(line)
+ caplist = parseCap(line)
for (cap,data) in caplist:
caps.data[cap] = data
13 years, 2 months
client/tools
by Miroslav Suchý
client/tools/rhnpush/uploadLib.py | 51 ++++++++++++++++++++------------------
1 file changed, 27 insertions(+), 24 deletions(-)
New commits:
commit 21e8133dfc50256e5a6034ff721d916678276d8d
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Jan 28 18:15:38 2011 +0100
648403 - on rhel4 we have no up2date_client rhnserver, on rhel4 revert to old michael code
diff --git a/client/tools/rhnpush/uploadLib.py b/client/tools/rhnpush/uploadLib.py
index e43a0fc..a6e96ee 100644
--- a/client/tools/rhnpush/uploadLib.py
+++ b/client/tools/rhnpush/uploadLib.py
@@ -24,7 +24,11 @@ import struct
import xmlrpclib
from spacewalk.common import rhn_mpm
from spacewalk.common.checksum import getFileChecksum
-from up2date_client import rhnserver
+try:
+ from up2date_client import rhnserver
+ rhnserver_available = True
+except ImportError:
+ rhnserver_available = False
try:
from rhn import rpclib
@@ -710,32 +714,31 @@ def getServer(uri, proxy=None, username=None, password=None, ca_chain=None):
s.add_trusted_cert(ca_chain)
return s
-def __hasCapability(self, capability, version=None):
- """Checks if the server supports a capability and optionally a version.
- Returns True or False.
- Copy from client/rhel/rhn-client-tools/src/up2date_client/capabilities.py
- """
- assert version is None or str(version).isdigit()
-
- if not self.data.has_key(capability):
- return False
- if version:
- data = self.data[capability]
- if int(version) not in self.parseCapVersion(data['version']):
- return False
- return True
-
def exists_getPackageChecksumBySession(rpc_server):
""" check whether server supports getPackageChecksumBySession function"""
- # unfortunatelly we do not have capability for getPackageChecksumBySession function,
- # but extended_profile in version 2 has been created just 2 months before getPackageChecksumBySession
- # lets use it instead
- server = rhnserver.RhnServer()
- server._server = rpc_server
- try:
+ if rhnserver_available:
+ # unfortunatelly we do not have capability for getPackageChecksumBySession function,
+ # but extended_profile in version 2 has been created just 2 months before
+ # getPackageChecksumBySession lets use it instead
+ server = rhnserver.RhnServer()
+ server._server = rpc_server
result = server.capabilities.hasCapability('xmlrpc.packages.extended_profile', 2)
- except AttributeError: # workaround for rhel4
- result = __hasCapability(server.capabilities, 'xmlrpc.packages.extended_profile', 2)
+ else: # rhel4 has no rhnserver
+ result = True
+ try: # if server do not have this function we will create TB :(
+ raw_call(rpc_server.packages.getPackageChecksumBySession, '', {})
+ except xmlrpclib.Fault, e:
+ if e.faultCode in [-2, -33]:
+ # Fault -33: session token is invalid
+ # i.e. function exists but we supplied wrong data
+ # Fault -2 session is unknown - expected when empty
+ pass
+ elif e.faultCode == -1:
+ # Fault -1: function invalid
+ result = False
+ else:
+ # pass through anything else
+ raise
return result
# compare two package [n,v,r,e] tuples
13 years, 2 months
Changes to 'refs/tags/spacewalk-backend-1.3.52-1'
by Michael Mraka
Tag 'spacewalk-backend-1.3.52-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2011-01-28 12:59 +0000
Tagging package [spacewalk-backend] version [1.3.52-1] in directory [backend/].
Changes since oracle-selinux-0.1.23.24-1:
Michael Mraka (2):
671465 - fixed signature import
Automatic commit of package [spacewalk-backend] release [1.3.52-1].
---
backend/satellite_tools/satsync.py | 22 ----------------------
backend/server/importlib/packageImport.py | 13 ++++++++++++-
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
4 files changed, 17 insertions(+), 25 deletions(-)
---
13 years, 2 months
backend/spacewalk-backend.spec rel-eng/packages
by Michael Mraka
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 94fca6ae0899f036a61b2479818b5870245dde04
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Jan 28 13:59:18 2011 +0100
Automatic commit of package [spacewalk-backend] release [1.3.52-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index af50977..87d8aad 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.51
+Version: 1.3.52
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 28 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.3.52-1
+- 671465 - fixed signature import
+
* Thu Jan 27 2011 Michael Mraka <michael.mraka(a)redhat.com> 1.3.51-1
- 671464 - get right keyid for new Fedora keys
- 671464 - get right keyid for new RHEL6 rpms
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index cfae9bc..d3654e7 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.3.51-1 backend/
+1.3.52-1 backend/
13 years, 2 months
backend/satellite_tools backend/server
by Michael Mraka
backend/satellite_tools/satsync.py | 22 ----------------------
backend/server/importlib/packageImport.py | 13 ++++++++++++-
2 files changed, 12 insertions(+), 23 deletions(-)
New commits:
commit f7d42e8e79aeca2c43da2cc47fd4b9f7ca3308b7
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Jan 28 13:27:03 2011 +0100
671465 - fixed signature import
and also moved signature / content provider import to PackageImport
where we already know package_id thus needn't go to database for it
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 0db1594..bf6fa44 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -1600,30 +1600,8 @@ Please contact your RHN representative""") % (generation, sat_cert.generation))
self._import_packages_process,
_('Importing: '),
[sources])
- self._import_package_signatures(packages, channel)
return self._link_channel_packages()
- def _import_package_signatures(self, packages, channel):
- for pkg in packages:
- pkg_dicts = self._lookup_pkgs_by_path(pkg[1])
- if not pkg_dicts:
- continue
- for pkgd in pkg_dicts:
- full_path = os.path.join(CFG.MOUNT_POINT, pkgd['path'])
- if os.path.exists(full_path):
- header = rhn_rpm.get_package_header(filename=full_path)
- server_packages.processPackageKeyAssociations(header,
- pkgd['checksum_type'], pkgd['checksum'])
-
- def _lookup_pkgs_by_path(self, path):
- h = rhnSQL.prepare("""select P.id, P.path, CV.checksum, CV.checksum_type
- from rhnPackage P left join
- rhnPackageKeyAssociation PA on PA.package_id = P.id inner join
- rhnChecksumView CV on CV.id = P.checksum_id
- where p.path = :path and PA.key_id is null""")
- h.execute(path=path)
- return h.fetchall_dict()
-
def _link_channel_packages(self):
log(1, ["", messages.link_channel_packages])
short_package_collection = sync_handlers.ShortPackageCollection()
diff --git a/backend/server/importlib/packageImport.py b/backend/server/importlib/packageImport.py
index 04fd3c4..f57fd30 100644
--- a/backend/server/importlib/packageImport.py
+++ b/backend/server/importlib/packageImport.py
@@ -17,11 +17,13 @@
#
import sys
+import os.path
from importLib import GenericPackageImport, IncompletePackage, \
Import, InvalidArchError, InvalidChannelError, \
IncompatibleArchError
+from spacewalk.common import CFG, rhn_rpm
from spacewalk.server import taskomatic
-from spacewalk.common import CFG
+from spacewalk.server.rhnServer import server_packages
class ChannelPackageSubscription(GenericPackageImport):
def __init__(self, batch, backend, caller=None, strict=0, repogen=True):
@@ -292,6 +294,7 @@ class PackageImport(ChannelPackageSubscription):
forceVerify=self.forceVerify,
ignoreUploaded=self.ignoreUploaded,
transactional=self.transactional)
+ self._import_signatures()
except:
# Oops
self.backend.rollback()
@@ -475,6 +478,14 @@ class PackageImport(ChannelPackageSubscription):
if object.ignored:
object.id = object.first_package.id
+ def _import_signatures(self):
+ for package in self.batch:
+ full_path = os.path.join(CFG.MOUNT_POINT, package['path'])
+ if os.path.exists(full_path):
+ header = rhn_rpm.get_package_header(filename=full_path)
+ server_packages.processPackageKeyAssociations(header,
+ package['checksum_type'], package['checksum'])
+
class SourcePackageImport(Import):
def __init__(self, batch, backend, caller=None, update_last_modified=0):
Import.__init__(self, batch, backend)
13 years, 2 months