Changes to 'refs/tags/rhnlib-2.5.14-1'
by Miroslav Suchý
Tag 'rhnlib-2.5.14-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2009-11-05 11:29 +0000
Tagging package [rhnlib] version [2.5.14-1] in directory [client/rhel/rhnlib/].
Changes since rhn-client-tools-0.7.8-1:
Miroslav Suchý (1):
Automatic commit of package [rhnlib] release [2.5.14-1].
---
client/rhel/rhnlib/rhnlib.spec | 5 ++++-
rel-eng/packages/rhnlib | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
---
14 years, 6 months
Changes to 'refs/tags/rhn-client-tools-0.7.8-1'
by Miroslav Suchý
Tag 'rhn-client-tools-0.7.8-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2009-11-05 11:27 +0000
Tagging package [rhn-client-tools] version [0.7.8-1] in directory [client/rhel/rhn-client-tools/].
Changes since rhnmd-5.3.3-1:
Joshua Roys (6):
Fix system comparison file/dir/symlink counts
Plug fd leak
Fix two more fd leaks
Add task to schedule config file comparisons
Set CompareConfigFilesTask to run at 11pm
Show number of differing config files in overview
Justin Sherrill (4):
adding gendrop back to master branch, it was removed during postgres merge
508771 - fixing incorrect sort on channel errata list page
527881 - fixed issue where set was cleared when interacting with the channel merge page
531645 - fixing query with mistaken id reference
Michael Mraka (2):
make installer questions look more consistent
532683 - optimized delete
Milan Zazrivec (2):
529688 - correctly detect Xen host
528227 - Warning in case sync would move the channel between orgs.
Miroslav Suchý (22):
optimize code
removing unnecessary condition
do not ask repeatedly if types has attribute UnicodeKey
reverting 68bed9e28e2973d3e1e30816d9090b7f5e1d4005
order test according to probability that the type will appear
do not vaste time checking if string is instance of UnicodeType
499020 - bump up proxy version to 5.3.1 to enable CDN
fix build under opensuse
hardcode MANPATH
fix build under opensuse
hardcode MANPATH
fix build under opensuse
remove leading whitespace. rpm will treat this as unknown tag
remove double slash, Mandriva do not likes it
remove no.po as Norwegian translation is for some time in nb.po, which is correct location anyway
enable build for suse 10.00 too
suse has its own macro for updating icons
call _dict_to_utf8 only once
do not check xml corectness twice
replace isinstance with has_key
save some time
Automatic commit of package [rhn-client-tools] release [0.7.8-1].
Tomas Lestach (1):
standart Red Hat header added to CompareConfigFilesTask.java
---
backend/common/rhnCache.py | 1
backend/satellite_tools/xmlSource.py | 69 +---
backend/server/importlib/backend.py | 19 +
backend/server/importlib/backendLib.py | 6
backend/server/importlib/channelImport.py | 13
client/rhel/rhn-client-tools/man/Makefile | 2
client/rhel/rhn-client-tools/rhn-client-tools.spec | 16
client/rhel/rhnlib/rhnlib.spec | 4
client/rhel/rhnsd/man/Makefile | 2
client/rhel/yum-rhn-plugin/actions/Makefile | 2
client/rhel/yum-rhn-plugin/po/no.po | 81 ----
client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec | 2
client/tools/rhn-virtualization/virtualization/support.py | 2
java/code/src/com/redhat/rhn/common/db/datasource/xml/SystemGroup_queries.xml | 6
java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml | 15
java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml | 18 +
java/code/src/com/redhat/rhn/frontend/action/audit/AuditSearchAction.java | 1
java/code/src/com/redhat/rhn/frontend/action/configuration/sdc/OverviewAction.java | 36 --
java/code/src/com/redhat/rhn/frontend/dto/SystemOverview.java | 13
java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml | 164 +++++++---
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 7
java/code/src/com/redhat/rhn/manager/audit/AuditManager.java | 4
java/code/src/com/redhat/rhn/manager/configuration/ConfigurationManager.java | 21 +
java/code/src/com/redhat/rhn/manager/system/SystemManager.java | 12
java/code/src/com/redhat/rhn/taskomatic/task/CompareConfigFilesTask.java | 103 ++++++
java/code/webapp/WEB-INF/pages/channel/erratalist.jsp | 2
java/code/webapp/WEB-INF/pages/common/fragments/systems/system_listdisplay.jspf | 17 -
java/conf/default/rhn_taskomatic.conf | 4
proxy/proxy/broker/rhnBroker.py | 2
rel-eng/packages/rhn-client-tools | 2
schema/spacewalk/gendrop.sql | 24 +
schema/spacewalk/oracle/packages/rhn_cache.pkb | 20 -
schema/spacewalk/oracle/views/rhnServerOverview.sql | 20 +
schema/spacewalk/upgrade/spacewalk-schema-0.6-to-spacewalk-schema-0.7/151-rhnServerOverview.sql | 100 ++++++
spacewalk/setup/bin/cobbler-setup | 4
spacewalk/setup/bin/spacewalk-setup | 6
web/modules/sniglets/Sniglets/ChannelEditor.pm | 11
37 files changed, 603 insertions(+), 228 deletions(-)
---
14 years, 6 months
backend/spacewalk-backend.spec rel-eng/packages
by Miroslav Suchý
backend/spacewalk-backend.spec | 15 ++++++++++++++-
rel-eng/packages/spacewalk-backend | 2 +-
2 files changed, 15 insertions(+), 2 deletions(-)
New commits:
commit 1b0ad6b595d30148d2079a40e685e9042c8c481e
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Nov 5 12:32:00 2009 +0100
Automatic commit of package [spacewalk-backend] release [0.7.12-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 31dd265..4566779 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -7,7 +7,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.7.11
+Version: 0.7.12
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -582,6 +582,19 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Thu Nov 5 2009 Miroslav Suchy <msuchy(a)redhat.com> 0.7.12-1
+- save some time
+- replace isinstance with has_key
+- do not check xml corectness twice
+- call _dict_to_utf8 only once
+- 528227 - Warning in case sync would move the channel between orgs.
+- do not vaste time checking if string is instance of UnicodeType
+- order test according to probability that the type will appear
+- reverting 68bed9e28e2973d3e1e30816d9090b7f5e1d4005
+- do not ask repeatedly if types has attribute UnicodeKey
+- removing unnecessary condition
+- optimize code
+
* Fri Oct 30 2009 Jan Pazdziora 0.7.11-1
- reporting: add column type to the errata-list report.
- removed redundant else; we call associate_package anyway (Michael M.)
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index f2cae1c..9048bf0 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.7.11-1 backend/
+0.7.12-1 backend/
14 years, 6 months
client/rhel rel-eng/packages
by Miroslav Suchý
client/rhel/rhnlib/rhnlib.spec | 5 ++++-
rel-eng/packages/rhnlib | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit ee1ddc541144686df511c2b56772aac6993759b4
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Nov 5 12:29:01 2009 +0100
Automatic commit of package [rhnlib] release [2.5.14-1].
diff --git a/client/rhel/rhnlib/rhnlib.spec b/client/rhel/rhnlib/rhnlib.spec
index 1a4ce36..8d5830f 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.13
+Version: 2.5.14
Release: 1%{?dist}
Group: Development/Libraries
@@ -54,6 +54,9 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitelib}/*
%changelog
+* Thu Nov 5 2009 Miroslav Suchy <msuchy(a)redhat.com> 2.5.14-1
+- fix build under opensuse
+
* Thu Aug 06 2009 Pradeep Kilambi <pkilambi(a)redhat.com> 2.5.13-1
-
diff --git a/rel-eng/packages/rhnlib b/rel-eng/packages/rhnlib
index b49942b..ca1bbb0 100644
--- a/rel-eng/packages/rhnlib
+++ b/rel-eng/packages/rhnlib
@@ -1 +1 @@
-2.5.13-1 client/rhel/rhnlib/
+2.5.14-1 client/rhel/rhnlib/
14 years, 6 months
client/rhel rel-eng/packages
by Miroslav Suchý
client/rhel/rhn-client-tools/rhn-client-tools.spec | 10 +++++++++-
rel-eng/packages/rhn-client-tools | 2 +-
2 files changed, 10 insertions(+), 2 deletions(-)
New commits:
commit 6a950b83169ea35e5a5f9226f7ce92602937f1c2
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Nov 5 12:27:12 2009 +0100
Automatic commit of package [rhn-client-tools] release [0.7.8-1].
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 57f05d7..939af8b 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: 0.7.7
+Version: 0.7.8
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if %{?suse_version: %{suse_version} > 1000} %{!?suse_version:1}
@@ -221,6 +221,14 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/applications/rhn_register.desktop
%changelog
+* Thu Nov 5 2009 Miroslav Suchy <msuchy(a)redhat.com> 0.7.8-1
+- suse has its own macro for updating icons
+- enable build for suse 10.00 too
+- hardcode MANPATH
+- fix build under opensuse
+- 532145 - define local variable ipaddr before it is used
+- Dont halt registration if the hardware info could not be acquired for rhnreg_ks.
+
* Fri Oct 23 2009 Miroslav Suchy <msuchy(a)redhat.com> 0.7.7-1
- 530369 - header is inmutable
diff --git a/rel-eng/packages/rhn-client-tools b/rel-eng/packages/rhn-client-tools
index fb8d3ae..2257a8b 100644
--- a/rel-eng/packages/rhn-client-tools
+++ b/rel-eng/packages/rhn-client-tools
@@ -1 +1 @@
-0.7.7-1 client/rhel/rhn-client-tools/
+0.7.8-1 client/rhel/rhn-client-tools/
14 years, 6 months
schema/spacewalk
by Michael Mraka
schema/spacewalk/oracle/packages/rhn_cache.pkb | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
New commits:
commit 948c7619c31def952d949f5b11824583c848403a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Nov 5 12:17:44 2009 +0100
532683 - optimized delete
no need to go throught rhnUserServerPerms twice
diff --git a/schema/spacewalk/oracle/packages/rhn_cache.pkb b/schema/spacewalk/oracle/packages/rhn_cache.pkb
index af6dd0e..c854a84 100644
--- a/schema/spacewalk/oracle/packages/rhn_cache.pkb
+++ b/schema/spacewalk/oracle/packages/rhn_cache.pkb
@@ -34,21 +34,21 @@ is
);
end update_perms_for_server;
+ -- update rhnUserServerPerms cache from rhnUserServerPermsDupes
procedure update_perms_for_user(
user_id_in in number
) is
begin
- delete from rhnUserServerPerms
- where user_id = user_id_in
- and server_id in
- (select server_id
- from rhnUserServerPerms
- where user_id = user_id_in
- minus
- select server_id
- from rhnUserServerPermsDupes uspd
- where uspd.user_id = user_id_in);
+ -- first delete rows which are not in rhnUserServerPermsDupes
+ delete from rhnUserServerPerms up
+ where user_id = user_id_in
+ and not exists (
+ select 1
+ from rhnUserServerPermsDupes uspd
+ where uspd.user_id = up.user_id
+ and uspd.server_id = up.server_id);
+ -- then insert rest of rows from rhnUserServerPermsDupes
insert into rhnUserServerPerms (user_id, server_id)
select distinct user_id_in, server_id
from rhnUserServerPermsDupes uspd
14 years, 6 months
4 commits - backend/satellite_tools backend/server
by Miroslav Suchý
backend/satellite_tools/xmlSource.py | 14 ++++----------
backend/server/importlib/backendLib.py | 6 ++----
2 files changed, 6 insertions(+), 14 deletions(-)
New commits:
commit 26dd1e30e7f49b56ca14f78420c44333e87f2d68
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 4 18:38:41 2009 +0100
save some time
this function is called many time, not allocating another variable will save us some time
diff --git a/backend/server/importlib/backendLib.py b/backend/server/importlib/backendLib.py
index caf0918..7be742e 100644
--- a/backend/server/importlib/backendLib.py
+++ b/backend/server/importlib/backendLib.py
@@ -25,12 +25,10 @@ from types import ListType, StringType, DictType, IntType
# A function that formats a UNIX timestamp to the session's format
def gmtime(timestamp):
- ttuple = time.gmtime(float(timestamp))
- return _format_time(ttuple)
+ return _format_time(time.gmtime(float(timestamp)))
def localtime(timestamp):
- ttuple = time.localtime(float(timestamp))
- return _format_time(ttuple)
+ return _format_time(time.localtime(float(timestamp)))
def _format_time(time_tuple):
return "%d-%02d-%02d %02d:%02d:%02d" % time_tuple[:6]
commit 272bf4b9fd886b81b74c43d9c5aa46bf7659a145
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 4 18:26:55 2009 +0100
replace isinstance with has_key
isinstance is evil and slow, it cost us 6 seconds per channel
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index bc45a31..2af35ff 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -821,7 +821,7 @@ class ContainerHandler:
# Nothing to do with this object
return
- if isinstance(item, importLib.Error):
+ if item.has_key('error'):
# Special case errors
log_debug(0, 'XML parser error: found "rhn-error" item: %s' %
item['error'])
commit 26e93d9737bba56caa4b663e10fb86b6dbe2944f
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 4 18:09:25 2009 +0100
do not check xml corectness twice
We already check if opening and closing tag match in class ContainerHandler.
And there we use tagStack for something else too, therefore deleting from this class.
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index bc52a56..bc45a31 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -110,8 +110,6 @@ class BaseDispatchHandler(ContentHandler, ErrorHandler):
self.restoreParser()
# No container at this time
self.__container = None
- # Simple tag stack, to ensure corectness
- self.tagStack = []
# Reset all the containers, to make sure previous runs don't leave
# garbage data
for container in self.container_dispatch.values():
@@ -191,7 +189,6 @@ class BaseDispatchHandler(ContentHandler, ErrorHandler):
def startElement(self, element, attrs):
log_debug(6, element)
- self.tagStack.append(element)
utf8_attrs = _dict_to_utf8(attrs)
if self.rootAttributes is None:
# First time around
@@ -214,10 +211,6 @@ class BaseDispatchHandler(ContentHandler, ErrorHandler):
def endElement(self, element):
log_debug(6, element)
- top = self.tagStack[-1]
- del self.tagStack[-1]
- if element != top:
- raise Exception("TTT")
if self.__container is None:
# End of the root attribute
# We know now the tag stack is empty
commit 1f21422260e314d1f06452cf8345974adb912b4b
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 4 18:16:55 2009 +0100
call _dict_to_utf8 only once
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index 8e17d8b..bc52a56 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -192,12 +192,13 @@ class BaseDispatchHandler(ContentHandler, ErrorHandler):
def startElement(self, element, attrs):
log_debug(6, element)
self.tagStack.append(element)
+ utf8_attrs = _dict_to_utf8(attrs)
if self.rootAttributes is None:
# First time around
if self.rootElement != element:
raise Exception("Mismatching elements; root='%s', "
"received='%s'" % (self.rootElement, element))
- self.rootAttributes = _dict_to_utf8(attrs)
+ self.rootAttributes = utf8_attrs
self._check_version()
return
@@ -205,7 +206,7 @@ class BaseDispatchHandler(ContentHandler, ErrorHandler):
# This means it's parsing a container element
self.__container = self.get_container(element)
- self.__container.startElement(element, _dict_to_utf8(attrs))
+ self.__container.startElement(element, utf8_attrs)
def characters(self, data):
if self.__container:
14 years, 6 months
backend/server
by Milan Zazrivec
backend/server/importlib/backend.py | 19 +++++++++++++++++++
backend/server/importlib/channelImport.py | 13 +++++++++++++
2 files changed, 32 insertions(+)
New commits:
commit 4187a6950eeebf51aee2ca73e3810c392fb47580
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Nov 4 18:12:05 2009 +0100
528227 - Warning in case sync would move the channel between orgs.
diff --git a/backend/server/importlib/backend.py b/backend/server/importlib/backend.py
index fffc7b4..e259f02 100644
--- a/backend/server/importlib/backend.py
+++ b/backend/server/importlib/backend.py
@@ -1185,6 +1185,25 @@ class Backend:
return
+ # bug #528227
+ def lookupChannelOrg(self, label):
+ """For given label of channel return its org_id.
+ If channel with given label does not exist or is NULL, return None.
+ """
+ statement = self.dbmodule.prepare("""
+ SELECT org_id
+ FROM rhnChannel
+ WHERE label = :label
+ """)
+
+ statement.execute(label=label)
+ org_id = statement.fetchone_dict()
+
+ if org_id:
+ return org_id
+
+ return
+
def lookupChannelProduct(self, channel):
statement = self.dbmodule.prepare("""
SELECT id
diff --git a/backend/server/importlib/channelImport.py b/backend/server/importlib/channelImport.py
index 7d2b43d..bbd5889 100644
--- a/backend/server/importlib/channelImport.py
+++ b/backend/server/importlib/channelImport.py
@@ -18,6 +18,7 @@
from importLib import Import, InvalidArchError, \
InvalidChannelError, InvalidChannelFamilyError, MissingParentChannelError
from common import CFG
+from satellite_tools.syncLib import log
class ChannelImport(Import):
def __init__(self, batch, backend):
@@ -52,6 +53,18 @@ class ChannelImport(Import):
self.arches[release['channel_arch']] = None
if not channel.has_key('receiving_updates') or channel['receiving_updates'] is None:
channel['receiving_updates'] = 'N'
+
+ # bug #528227
+ # Print a warning in case the sync would move the channel between orgs
+ if channel.has_key('org_id') and channel['org_id']:
+ org_id = self.backend.lookupChannelOrg(channel['label'])
+
+ if org_id and int(channel['org_id']) != org_id['org_id']:
+ log(1, "WARNING: Channel %s is already present in orgid %s." % \
+ (channel['label'], org_id['org_id']))
+ log(1, " Running synchronization will move the channel to orgid %s." % \
+ channel['org_id'])
+ log(1,'')
def fix(self):
self.backend.lookupChannelArches(self.arches)
14 years, 6 months
10 commits - client/rhel
by Miroslav Suchý
client/rhel/rhn-client-tools/man/Makefile | 2
client/rhel/rhn-client-tools/rhn-client-tools.spec | 6 +
client/rhel/rhnlib/rhnlib.spec | 4 -
client/rhel/rhnsd/man/Makefile | 2
client/rhel/yum-rhn-plugin/actions/Makefile | 2
client/rhel/yum-rhn-plugin/po/no.po | 81 ---------------------
client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec | 2
7 files changed, 14 insertions(+), 85 deletions(-)
New commits:
commit 398907e4785f218198fbb8717338cce3ded8a033
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Nov 3 11:18:02 2009 +0100
suse has its own macro for updating icons
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 0634c35..57f05d7 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -9,6 +9,7 @@ Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if %{?suse_version: %{suse_version} > 1000} %{!?suse_version:1}
BuildArch: noarch
+BuildRequires: update-desktop-files
%endif
Requires: rhnlib >= 2.2.7
@@ -81,6 +82,9 @@ make -f Makefile.rhn-client-tools install VERSION=%{version}-%{release} PREFIX=$
mkdir -p $RPM_BUILD_ROOT/var/lib/up2date
desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications --vendor=rhn rhn_register.desktop
+%if 0%{?suse_version}
+%suse_update_desktop_file rhn_register System
+%endif
%find_lang %{name}
commit 0a40b66a79c3b2f272c50c2b20f151fecbc2075d
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Nov 3 11:16:04 2009 +0100
enable build for suse 10.00 too
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 7cf28f4..0634c35 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -7,7 +7,7 @@ Name: rhn-client-tools
Version: 0.7.7
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
+%if %{?suse_version: %{suse_version} > 1000} %{!?suse_version:1}
BuildArch: noarch
%endif
commit 080c025b76bd3ea43f00eacd4b5a9c6651b6f2e9
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Sun Nov 1 23:07:26 2009 +0100
remove no.po as Norwegian translation is for some time in nb.po, which is correct location anyway
diff --git a/client/rhel/yum-rhn-plugin/po/no.po b/client/rhel/yum-rhn-plugin/po/no.po
deleted file mode 100644
index 8bf7a43..0000000
--- a/client/rhel/yum-rhn-plugin/po/no.po
+++ /dev/null
@@ -1,81 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-05-05 17:39-0400\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL(a)li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../rhnplugin.py:41
-msgid "There was an error communicating with RHN."
-msgstr ""
-
-#: ../rhnplugin.py:63
-msgid "RHN support will be disabled."
-msgstr ""
-
-#. If non-root notify user RHN repo not accessible
-#: ../rhnplugin.py:75
-msgid ""
-"*Note* Red Hat Network repositories are not listed below. You must run this "
-"command as root to access RHN repositories."
-msgstr ""
-
-#: ../rhnplugin.py:89
-msgid "There was an error parsing the RHN proxy settings."
-msgstr ""
-
-#: ../rhnplugin.py:100
-msgid "Cleaning"
-msgstr ""
-
-#: ../rhnplugin.py:106
-msgid "Either --version, or no commands entered"
-msgstr ""
-
-#: ../rhnplugin.py:120
-msgid "This system is not registered with RHN."
-msgstr ""
-
-#: ../rhnplugin.py:125
-msgid "RHN channel support will be disabled."
-msgstr ""
-
-#: ../rhnplugin.py:129
-msgid "This system is not subscribed to any channels."
-msgstr ""
-
-#: ../rhnplugin.py:133
-msgid ""
-"This system may not be a registered to RHN. SystemId could not be acquired.\n"
-msgstr ""
-
-#: ../rhnplugin.py:202
-msgid "Package profile information could not be sent."
-msgstr ""
-
-#. This is compensating for hosted/satellite returning back an error
-#. message instructing RHEL5 clients to run "up2date --register"
-#. bz: 438175
-#: ../rhnplugin.py:209
-msgid "Error Message:"
-msgstr ""
-
-#: ../rhnplugin.py:210
-msgid "Please run rhn_register as root on this client"
-msgstr ""
-
-#: ../rhnplugin.py:286
-#, python-format
-msgid "Missing required login information for RHN: %s"
-msgstr ""
commit dd56f51ceb384bbffafc743d663b2b48ab8abe39
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Sun Nov 1 22:48:36 2009 +0100
remove double slash, Mandriva do not likes it
diff --git a/client/rhel/yum-rhn-plugin/actions/Makefile b/client/rhel/yum-rhn-plugin/actions/Makefile
index e9367a3..80d4cd9 100644
--- a/client/rhel/yum-rhn-plugin/actions/Makefile
+++ b/client/rhel/yum-rhn-plugin/actions/Makefile
@@ -2,7 +2,7 @@ PREFIX ?= /
PYTHON ?= python
PYFILES = $(wildcard *.py)
-PKGDIR = /usr/share/rhn/actions/
+PKGDIR = usr/share/rhn/actions/
all:
echo "Nothing to do"
commit 489937ec4b85f7cbeea2be6d2b7f683b3fe0d89c
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Sep 10 12:22:54 2009 +0200
remove leading whitespace. rpm will treat this as unknown tag
diff --git a/client/rhel/rhnlib/rhnlib.spec b/client/rhel/rhnlib/rhnlib.spec
index 74a9b7b..1a4ce36 100644
--- a/client/rhel/rhnlib/rhnlib.spec
+++ b/client/rhel/rhnlib/rhnlib.spec
@@ -12,7 +12,7 @@ License: GPLv2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
- BuildArch: noarch
+BuildArch: noarch
%endif
BuildRequires: python-devel
commit 64fa3a02863d9ec8a95af4e4202ce5aeb5da8a63
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Sep 9 14:37:16 2009 +0200
fix build under opensuse
python libraries in suse could not be noarch
diff --git a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
index 342f849..ff6569a 100644
--- a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
+++ b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
@@ -7,7 +7,9 @@ Group: System Environment/Base
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
URL: https://fedorahosted.org/spacewalk
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
BuildArch: noarch
+%endif
BuildRequires: python
BuildRequires: intltool
BuildRequires: gettext
commit 750a771df4e0adce417f359a9c10de9c0e728a04
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Sep 9 12:54:33 2009 +0200
hardcode MANPATH
if MANPATH contain something else, like /usr/local/man:/usr/share/man it will not work.
So stop pretending, that we can work with something else.
diff --git a/client/rhel/rhn-client-tools/man/Makefile b/client/rhel/rhn-client-tools/man/Makefile
index b0245c6..21fc2b8 100644
--- a/client/rhel/rhn-client-tools/man/Makefile
+++ b/client/rhel/rhn-client-tools/man/Makefile
@@ -10,7 +10,7 @@ INSTALL_DATA = $(INSTALL) -m 644
all :
-MANPATH ?= /usr/share/man
+MANPATH = /usr/share/man
MANDIR = $(PREFIX)/$(MANPATH)
CAT = 8 5
LANGDIR =
commit 853461bde34f3380fe5fe2100df0446ab3bf1a59
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Sep 9 11:37:52 2009 +0200
fix build under opensuse
python libraries in suse could not be noarch
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 008993d..7cf28f4 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -7,7 +7,9 @@ Name: rhn-client-tools
Version: 0.7.7
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
BuildArch: noarch
+%endif
Requires: rhnlib >= 2.2.7
Requires: rpm >= 4.2.3-24_nonptl
commit 2c801b89f33675f90490ed03fd2d50803f434ddb
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Sep 9 11:28:02 2009 +0200
hardcode MANPATH
if MANPATH contain something else, like /usr/local/man:/usr/share/man it will not work.
So stop pretending, that we can work with something else.
diff --git a/client/rhel/rhnsd/man/Makefile b/client/rhel/rhnsd/man/Makefile
index 2099c36..388d9d5 100644
--- a/client/rhel/rhnsd/man/Makefile
+++ b/client/rhel/rhnsd/man/Makefile
@@ -10,7 +10,7 @@ INSTALL_DATA = $(INSTALL) -m 644
all :
-MANPATH ?= /usr/share/man
+MANPATH = /usr/share/man
MANDIR = $(PREFIX)/$(MANPATH)
CAT = 8
LANGDIR =
commit 8549ec672471e4f7a9786b3df6e028d782d0222e
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Sep 8 19:28:16 2009 +0200
fix build under opensuse
python libraries in suse could not be noarch
say to install to /usr, otherwise suse will install to /usr/local
diff --git a/client/rhel/rhnlib/rhnlib.spec b/client/rhel/rhnlib/rhnlib.spec
index a1af646..74a9b7b 100644
--- a/client/rhel/rhnlib/rhnlib.spec
+++ b/client/rhel/rhnlib/rhnlib.spec
@@ -11,7 +11,9 @@ Group: Development/Libraries
License: GPLv2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildArch: noarch
+%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
+ BuildArch: noarch
+%endif
BuildRequires: python-devel
Requires: pyOpenSSL
@@ -38,7 +40,7 @@ make -f Makefile.rhnlib
%install
rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT --prefix=%{_prefix}
%clean
14 years, 6 months
7 commits - backend/common backend/satellite_tools proxy/proxy
by Miroslav Suchý
backend/common/rhnCache.py | 1
backend/satellite_tools/xmlSource.py | 55 +++++++++++++++++------------------
proxy/proxy/broker/rhnBroker.py | 2 -
3 files changed, 28 insertions(+), 30 deletions(-)
New commits:
commit bebf2a2e7c133de9b1223c834d157d12c5df2767
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 4 14:50:05 2009 +0100
499020 - bump up proxy version to 5.3.1 to enable CDN
diff --git a/proxy/proxy/broker/rhnBroker.py b/proxy/proxy/broker/rhnBroker.py
index adf8f02..1c16925 100644
--- a/proxy/proxy/broker/rhnBroker.py
+++ b/proxy/proxy/broker/rhnBroker.py
@@ -37,7 +37,7 @@ import proxy.rhnProxyAuth
# the version should not be never decreased, never mind that spacewalk has different versioning
-_PROXY_VERSION = '5.3.0' # HISTORY: '0.9.7', '3.2.0', '3.5.0', '3.6.0', '4.1.0', '4.2.0', '5.0.0', '5.1.0', '5.2.0', '0.1', '5.3.0'
+_PROXY_VERSION = '5.3.1' # HISTORY: '0.9.7', '3.2.0', '3.5.0', '3.6.0', '4.1.0', '4.2.0', '5.0.0', '5.1.0', '5.2.0', '0.1', '5.3.0' '5.3.1'
class BrokerHandler(SharedHandler):
commit b6fd6226e56cf870ebe040038f7e648bf9b0c8de
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Nov 3 16:17:00 2009 +0100
do not vaste time checking if string is instance of UnicodeType
isinstance is too expensive function
both normal string and UnicodeType, has function encode - just run it
if the parameter is e.g. Int, let pass down the code.
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index aab4b17..8e17d8b 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -350,9 +350,8 @@ def _stringify(data):
if isinstance(data, types.StringType):
return data
if typesHasUnicode:
- if isinstance(data, types.UnicodeType):
- # Convert Unicode data to UTF8
- return data.encode('UTF8')
+ try: return data.encode('UTF8')
+ except AttributeError: pass
return str(data)
def _dict_to_utf8(d):
@@ -362,10 +361,10 @@ def _dict_to_utf8(d):
return d
ret = {}
for k, v in d.items():
- if isinstance(k, types.UnicodeType):
- k = k.encode('UTF8')
- if isinstance(v, types.UnicodeType):
- v = v.encode('UTF8')
+ try: k = k.encode('UTF8')
+ except AttributeError: pass
+ try: v = v.encode('UTF8')
+ except AttributeError: pass
ret[k] = v
return ret
commit 582e4a70a94068252e9d43e5a7409857cbb89955
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Nov 3 15:52:53 2009 +0100
order test according to probability that the type will appear
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index 0583493..aab4b17 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -936,20 +936,20 @@ def _normalizeAttribute(objtype, attribute):
if (objtype is None) or (objtype is types.StringType):
# (Don't know how to handle it) or (Expecting a scalar)
return attribute
-
- if not isinstance(objtype, types.ListType):
- if objtype is types.IntType:
+ elif objtype is types.IntType:
if attribute == '' or attribute == 'None':
# Treat it as NULL
return None
- return int(attribute)
- if objtype is importLib.DateType:
- return _normalizeDateType(attribute)
+ else:
+ return int(attribute)
+ elif objtype is importLib.DateType:
+ return _normalizeDateType(attribute)
+ elif isinstance(objtype, types.ListType):
+ # List type - split stuff
+ return string.split(attribute)
+ else:
raise Exception("Unhandled attribute data type %s" % objtype)
- # List type - split stuff
- return string.split(attribute)
-
def _normalizeDateType(value):
try:
value = int(value)
commit 41102051a3eb314475625c7dc92f746dfd136fb6
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Nov 3 14:23:29 2009 +0100
reverting 68bed9e28e2973d3e1e30816d9090b7f5e1d4005
that commit did not do anything usefull, it just cost us 15 seconds per channel
diff --git a/backend/common/rhnCache.py b/backend/common/rhnCache.py
index f4b31f8..8c4ad37 100644
--- a/backend/common/rhnCache.py
+++ b/backend/common/rhnCache.py
@@ -234,7 +234,6 @@ class WriteLockedFile(LockedFile):
# Set the file's mtime if necessary
self.flush()
if self.modified:
- os.system("stat %s > /dev/null" % self.fname)
os.utime(self.fname, (self.modified, self.modified))
commit e52650161c9675acded79119a133f6fa0ec6aa65
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Nov 3 13:35:46 2009 +0100
do not ask repeatedly if types has attribute UnicodeKey
once module is imported, it will not change during runtime
we will gain at least 2 second per channel
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index 251a543..0583493 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -26,6 +26,8 @@ from common import log_debug, Traceback, rhnFlags
from server.importlib import importLib, backendLib
+typesHasUnicode = hasattr(types, "UnicodeType")
+
# Terminology used throughout this file:
# Item: an atomic entity from the database's perspective.
# A channel, or a package, or an erratum is an item.
@@ -339,7 +341,7 @@ class BaseItem:
def _is_string(obj):
if isinstance(obj, types.StringType):
return 1
- if hasattr(types, "UnicodeType") and isinstance(obj, types.UnicodeType):
+ if typesHasUnicode and isinstance(obj, types.UnicodeType):
return 1
return 0
@@ -347,7 +349,7 @@ def _stringify(data):
# Accelerate the most common cases
if isinstance(data, types.StringType):
return data
- if hasattr(types, "UnicodeType"):
+ if typesHasUnicode:
if isinstance(data, types.UnicodeType):
# Convert Unicode data to UTF8
return data.encode('UTF8')
@@ -355,7 +357,7 @@ def _stringify(data):
def _dict_to_utf8(d):
# Convert the dictionary to have non-unocide key-value pairs
- if not hasattr(types, "UnicodeType"):
+ if not typesHasUnicode:
# Nothing to do
return d
ret = {}
commit 03039711351cbb1e5227349cd785f536f3f0c85c
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Nov 3 13:28:26 2009 +0100
removing unnecessary condition
this will save 3 seconds per each channel on step=rpms
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index fef07e3..251a543 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -298,10 +298,11 @@ class BaseItem:
def populateFromAttributes(self, obj, sourceDict):
# Populates dict with items from sourceDict
for key, value in sourceDict.items():
- if not obj.has_key(key) and not self.tagMap.has_key(key):
- # Unsupported key
- continue
- if self.tagMap.has_key(key):
+ if not self.tagMap.has_key(key):
+ if not obj.has_key(key):
+ # Unsupported key
+ continue
+ else:
# Have to map this key
key = self.tagMap[key]
commit bd4fae24eba89a853feef59709bd09dea45c6e11
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Nov 2 17:20:44 2009 +0100
optimize code
_normalizeAttribute is called too much time (1M call for virt channel) that even
such small optimalization is worth of
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index 0bfbda2..fef07e3 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -930,14 +930,11 @@ def _normalizeSubelements(objtype, subelements):
def _normalizeAttribute(objtype, attribute):
# Deal with simple cases first
- if objtype is None:
- # Don't know how to handle it
+ if (objtype is None) or (objtype is types.StringType):
+ # (Don't know how to handle it) or (Expecting a scalar)
return attribute
if not isinstance(objtype, types.ListType):
- # Expecting a scalar
- if objtype is types.StringType:
- return attribute
if objtype is types.IntType:
if attribute == '' or attribute == 'None':
# Treat it as NULL
14 years, 6 months