java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit ad01b27ae671336e99be355cf8b9155b1789b624
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri Mar 11 16:02:20 2011 +0100
644880 - fix Long comparism
diff --git a/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java b/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java
index b217d17..d205939 100644
--- a/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java
+++ b/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java
@@ -1386,7 +1386,7 @@ public class PackageManager extends BaseManager {
if (m.get("package_arch_id") == null) {
archNonCompat.add((Long)m.get("id"));
}
- if (m.get("org_package") != orgId &&
+ if (orgId.compareTo((Long)m.get("org_package")) != 0 &&
m.get("org_access") == null &&
m.get("shared_access") == null) {
orgNoAccess.add((Long)m.get("id"));
13 years, 1 month
Changes to 'refs/tags/rhnlib-2.5.35-1'
by Miroslav Suchý
Tag 'rhnlib-2.5.35-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2011-03-11 14:44 +0000
Tagging package [rhnlib] version [2.5.35-1] in directory [client/rhel/rhnlib/].
Changes since rhn-client-tools-1.4.5-1:
Miroslav Suchý (2):
683200 - create idn_ascii_to_pune() and idn_pune_to_unicode(), which will take care about corner cases of encodings.idna
Automatic commit of package [rhnlib] release [2.5.35-1].
---
client/rhel/rhnlib/rhn/connections.py | 19 +++++++++++++++++++
client/rhel/rhnlib/rhnlib.spec | 6 +++++-
rel-eng/packages/rhnlib | 2 +-
3 files changed, 25 insertions(+), 2 deletions(-)
---
13 years, 1 month
2 commits - client/rhel rel-eng/packages
by Miroslav Suchý
client/rhel/rhnlib/rhn/connections.py | 19 +++++++++++++++++++
client/rhel/rhnlib/rhnlib.spec | 6 +++++-
rel-eng/packages/rhnlib | 2 +-
3 files changed, 25 insertions(+), 2 deletions(-)
New commits:
commit c74e181ee9ef5c84fb5b26f02bc378d10c1f0222
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Mar 11 15:44:22 2011 +0100
Automatic commit of package [rhnlib] release [2.5.35-1].
diff --git a/client/rhel/rhnlib/rhnlib.spec b/client/rhel/rhnlib/rhnlib.spec
index 4618aaf..07554f4 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.34
+Version: 2.5.35
Release: 1%{?dist}
Group: Development/Libraries
@@ -61,6 +61,10 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitelib}/*
%changelog
+* Fri Mar 11 2011 Miroslav Suchý <msuchy(a)redhat.com> 2.5.35-1
+- 683200 - create idn_ascii_to_pune() and idn_pune_to_unicode(), which will
+ take care about corner cases of encodings.idna
+
* Wed Feb 16 2011 Miroslav Suchý <msuchy(a)redhat.com> 2.5.34-1
- Revert "Revert "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/rel-eng/packages/rhnlib b/rel-eng/packages/rhnlib
index 1913841..6cfdd9f 100644
--- a/rel-eng/packages/rhnlib
+++ b/rel-eng/packages/rhnlib
@@ -1 +1 @@
-2.5.34-1 client/rhel/rhnlib/
+2.5.35-1 client/rhel/rhnlib/
commit 4342cb5b600dd2ce9785fd471769ca357601c7fc
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Mar 10 17:28:32 2011 +0100
683200 - create idn_ascii_to_pune() and idn_pune_to_unicode(), which will take care about corner cases of encodings.idna
diff --git a/client/rhel/rhnlib/rhn/connections.py b/client/rhel/rhnlib/rhn/connections.py
index 19e2250..884de9e 100644
--- a/client/rhel/rhnlib/rhn/connections.py
+++ b/client/rhel/rhnlib/rhn/connections.py
@@ -12,6 +12,7 @@ import SSL
import nonblocking
import httplib
import xmlrpclib
+import encodings.idna
# Import into the local namespace some httplib-related names
_CS_REQ_SENT = httplib._CS_REQ_SENT
@@ -244,3 +245,21 @@ class HTTPSProxyConnection(HTTPProxyConnection):
HTTPProxyConnection._add_proxy_headers(self)
# Add a User-Agent header
self.putheader("User-Agent", self._user_agent)
+
+def idn_pune_to_unicode(hostname):
+ """ Convert Internationalized domain name from Pune encoding to Unicode """
+ if hostname is None:
+ return None
+ elif hostname == '':
+ return u''
+ else:
+ return u'.'.join([encodings.idna.ToUnicode(x) for x in hostname.split('.')])
+
+def idn_ascii_to_pune(hostname):
+ """ Convert domain name to Pune encoding. Hostname can be instance of string or Unicode """
+ if hostname is None:
+ return None
+ else:
+ if not isinstance(hostname, unicode):
+ hostname = unicode(hostname, 'utf-8')
+ return u'.'.join([encodings.idna.ToASCII(x) for x in hostname.split('.')])
13 years, 1 month
Changes to 'refs/tags/rhn-client-tools-1.4.5-1'
by Miroslav Suchý
Tag 'rhn-client-tools-1.4.5-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2011-03-11 13:40 +0000
Tagging package [rhn-client-tools] version [1.4.5-1] in directory [client/rhel/rhn-client-tools/].
Changes since spacewalk-java-1.4.16-1:
Jan Pazdziora (3):
Adding the AS keyword to column aliases (for PostgreSQL).
Fixing is_eoled, replacing sysdate with current_timestamp.
Casting compare in rhn_probe to string.
Miroslav Suchý (2):
declare that we are using utf-8
Automatic commit of package [rhn-client-tools] release [1.4.5-1].
Tomas Lestach (1):
644880 - fix permission check to packages
Uwe Gansert (1):
fixed virtual KVM machines in the webui
---
backend/server/handlers/xmlrpc/registration.py | 3 +++
client/rhel/rhn-client-tools/rhn-client-tools.spec | 5 ++++-
client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py | 4 ++--
java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml | 4 ++--
java/code/src/com/redhat/rhn/common/db/datasource/xml/Task_queries.xml | 2 +-
java/code/src/com/redhat/rhn/frontend/xmlrpc/PermissionCheckFailureException.java | 10 ++++++++++
java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java | 2 +-
java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java | 7 ++++---
rel-eng/packages/rhn-client-tools | 2 +-
web/modules/rhn/RHN/DB/Channel.pm | 2 +-
10 files changed, 29 insertions(+), 12 deletions(-)
---
13 years, 1 month
client/rhel rel-eng/packages
by Miroslav Suchý
client/rhel/rhn-client-tools/rhn-client-tools.spec | 5 ++++-
rel-eng/packages/rhn-client-tools | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 45b9ed847d2500f5af35948913d72aa244a317e2
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Mar 11 14:40:56 2011 +0100
Automatic commit of package [rhn-client-tools] release [1.4.5-1].
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index ae940cb..89ff635 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.4.4
+Version: 1.4.5
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -292,6 +292,9 @@ make -f Makefile.rhn-client-tools test
%endif
%changelog
+* Fri Mar 11 2011 Miroslav Suchý <msuchy(a)redhat.com> 1.4.5-1
+- declare that we are using utf-8
+
* Thu Mar 10 2011 Miroslav Suchý <msuchy(a)redhat.com> 1.4.4-1
- 683546 - optparse isn't friendly to translations in unicode
- update .po files
diff --git a/rel-eng/packages/rhn-client-tools b/rel-eng/packages/rhn-client-tools
index de5541d..7b848c2 100644
--- a/rel-eng/packages/rhn-client-tools
+++ b/rel-eng/packages/rhn-client-tools
@@ -1 +1 @@
-1.4.4-1 client/rhel/rhn-client-tools/
+1.4.5-1 client/rhel/rhn-client-tools/
13 years, 1 month
client/rhel
by Miroslav Suchý
client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 590a50b3ed5d579206d666e9e84cb9c3b6a25648
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Mar 11 14:39:31 2011 +0100
declare that we are using utf-8
addressing:
File "/usr/sbin/rhnreg_ks", line 32, in ?
from up2date_client import rhnreg
File "/usr/share/rhn/up2date_client/rhnreg.py", line 21, in ?
import rhnreg_constants
File "/usr/share/rhn/up2date_client/rhnreg_constants.py", line 14, in ?
COPYRIGHT_TEXT = _("Copyright © 2006--2010 Red Hat, Inc. All rights reserved.")
File "/usr/lib64/python2.4/gettext.py", line 217, in ugettext
return unicode(message)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 10: ordinal not in range(128)
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py
index ba9a9d9..e3e6f7a 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py
@@ -1,4 +1,4 @@
-# This Python file uses the following encoding: utf-8
+# -*- coding: utf-8 -*-
#
# String constants for the RHN Register TUI/GUI.
# Copyright (c) 2000--2010 Red Hat, Inc.
@@ -11,7 +11,7 @@ import gettext
t = gettext.translation('rhn-client-tools', fallback=True)
_ = t.ugettext
-COPYRIGHT_TEXT = _("Copyright © 2006--2010 Red Hat, Inc. All rights reserved.")
+COPYRIGHT_TEXT = _(u"Copyright © 2006--2010 Red Hat, Inc. All rights reserved.")
# Connect Window
CONNECT_WINDOW = _("Attempting to contact the Red Hat Network server.")
13 years, 1 month
java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/frontend/xmlrpc/PermissionCheckFailureException.java | 10 ++++++++++
java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java | 2 +-
java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java | 7 ++++---
3 files changed, 15 insertions(+), 4 deletions(-)
New commits:
commit 422e43146ee29c4afaeb20819fee2ce1ce124d71
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri Mar 11 10:38:56 2011 +0100
644880 - fix permission check to packages
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/PermissionCheckFailureException.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/PermissionCheckFailureException.java
index 1bed558..017b901 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/PermissionCheckFailureException.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/PermissionCheckFailureException.java
@@ -94,6 +94,16 @@ public class PermissionCheckFailureException extends FaultException {
"perform this action for system id[" + server.getId() + "]");
// begin member variable initialization
}
+
+ /**
+ * Contructor
+ * @param message use it as exception message
+ */
+ public PermissionCheckFailureException(String message) {
+ super(-23, "permissionCheckFailure" , message);
+ }
+
+
/////////////////////////
// Getters/Setters
/////////////////////////
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java
index 7f0a7d1..6863d6e 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java
@@ -1125,7 +1125,7 @@ public class ChannelSoftwareHandler extends BaseHandler {
ChannelEditor.getInstance().addPackages(loggedInUser, channel, longPackageIds);
}
catch (PermissionException e) {
- throw new PermissionCheckFailureException();
+ throw new PermissionCheckFailureException(e.getMessage());
}
catch (LookupException le) {
//This shouldn't happen, but if it does, it is because one of the packages
diff --git a/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java b/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java
index 5bc0e60..b217d17 100644
--- a/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java
+++ b/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java
@@ -1376,8 +1376,9 @@ public class PackageManager extends BaseManager {
*/
public static void verifyPackagesChannelArchCompatAndOrgAccess(
User user, Channel channel, List<Long> packageIds, boolean checkArchCompat) {
+ Long orgId = user.getOrg().getId();
DataResult dr = PackageFactory.getPackagesChannelArchCompatAndOrgAccess(
- user.getOrg().getId(), channel.getId(), packageIds);
+ orgId, channel.getId(), packageIds);
List<Long> archNonCompat = new ArrayList<Long>();
List<Long> orgNoAccess = new ArrayList<Long>();
for (Iterator i = dr.iterator(); i.hasNext();) {
@@ -1385,10 +1386,10 @@ public class PackageManager extends BaseManager {
if (m.get("package_arch_id") == null) {
archNonCompat.add((Long)m.get("id"));
}
- if (m.get("org_package") == null &&
+ if (m.get("org_package") != orgId &&
m.get("org_access") == null &&
m.get("shared_access") == null) {
- archNonCompat.add((Long)m.get("id"));
+ orgNoAccess.add((Long)m.get("id"));
}
}
if (!orgNoAccess.isEmpty()) {
13 years, 1 month
java/code
by Jan Pazdziora
java/code/src/com/redhat/rhn/common/db/datasource/xml/Task_queries.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit f37d00cc5c66bdec79f2ac9aaa9da0d2e5ea2cb5
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Mar 11 11:00:28 2011 +0100
Casting compare in rhn_probe to string.
Addressing
INFO | jvm 1 | 2011/03/10 17:00:11 | 2011-03-10 17:00:11,192 [DefaultQuartzScheduler_Worker-2] ERROR com.redhat.rhn.taskomatic.task.TimeSeriesCleanUp - org.postgresql.util.PSQLException: ERROR: operator does not exist: text = numeric
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Task_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Task_queries.xml
index 603d2f7..db36ebb 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Task_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Task_queries.xml
@@ -239,7 +239,7 @@ SELECT id, channel_label, client, reason, force, bypass_filters, next_action
WHERE substr(time_series.o_id, instr(time_series.o_id,'-')+1,
(instr(time_series.o_id,'-',
instr(time_series.o_id,'-')+1)-instr(time_series.o_id,'-'))-1)
- = rhn_probe.recid)
+ = rhn_probe.recid || '')
</query>
</write-mode>
13 years, 1 month
2 commits - java/code web/modules
by Jan Pazdziora
java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml | 4 ++--
web/modules/rhn/RHN/DB/Channel.pm | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 4ae162939c8578741aaf4a397a2e29b087ab84e5
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Mar 11 10:36:28 2011 +0100
Fixing is_eoled, replacing sysdate with current_timestamp.
Addressing
DBD::Pg::st execute failed: ERROR: column "sysdate" does not exist
LINE 4: AND sysdate - end_of_life > 0
^
RHN::DB /usr/share/perl5/vendor_perl/RHN/DB.pm 228 RHN::Exception::DB::throw
RHN::DB::st /usr/share/perl5/vendor_perl/RHN/DB.pm 564 RHN::DB::handle_error
RHN::DB::Channel /usr/share/perl5/vendor_perl/RHN/DB/Channel.pm 134 RHN::DB::st::execute_h
RHN::Access::Channel /usr/share/perl5/vendor_perl/RHN/Access/Channel.pm 77 RHN::DB::Channel::is_eoled
PXT::ACL /usr/share/perl5/vendor_perl/PXT/ACL.pm 93 RHN::Access::Channel::channel_eoled
Sniglets::Users /usr/share/perl5/vendor_perl/Sniglets/Users.pm 383 PXT::ACL::eval_acl
diff --git a/web/modules/rhn/RHN/DB/Channel.pm b/web/modules/rhn/RHN/DB/Channel.pm
index 2dfabb7..532025f 100644
--- a/web/modules/rhn/RHN/DB/Channel.pm
+++ b/web/modules/rhn/RHN/DB/Channel.pm
@@ -128,7 +128,7 @@ sub is_eoled {
SELECT 1
FROM rhnChannel
WHERE id = :channel_id
- AND sysdate - end_of_life > 0
+ AND current_timestamp > end_of_life
EOQ
$sth->execute_h(channel_id => $self->id);
commit 15153dcc0a164992f691d3f465563d4dc678ebb8
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Mar 11 10:29:06 2011 +0100
Adding the AS keyword to column aliases (for PostgreSQL).
Addressing
ERROR com.redhat.rhn.common.db.datasource.CachedStatement - Error while processing cached statement sql: SELECT P.id, CS.checksum, CS.checksum_type checksum_type,
PN.name || '-' || PE.version
|| '-' || PE.release || (CASE WHEN PE.epoch IS NULL THEN '' ELSE ':' || PE.epoch END)
|| '-' || PA.label name
from rhnPackage P inner join
rhnChannelPackage CP on P.id = CP.package_id inner join
rhnErrataPackage EP on EP.package_id = CP.package_id inner join
rhnPackageName PN on P.name_id = PN.id inner join
rhnPackageEvr PE on P.evr_id = PE.id inner join
rhnPackageArch PA on P.package_arch_id = PA.id inner join
rhnChecksumView CS on P.checksum_id = CS.id
where CP.channel_id = ?
and EP.errata_id = ?
ORDER by name
com.redhat.rhn.common.db.WrappedSQLException: ERROR: syntax error at or near "name"
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
index 5923567..d719886 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
@@ -1085,10 +1085,10 @@ GROUP BY C.id, C.name
<mode name="channel_errata_packages" class="com.redhat.rhn.frontend.dto.PackageDto">
<query params="eid, cid">
- SELECT P.id, CS.checksum, CS.checksum_type checksum_type,
+ SELECT P.id, CS.checksum, CS.checksum_type as checksum_type,
PN.name || '-' || PE.version
|| '-' || PE.release || (CASE WHEN PE.epoch IS NULL THEN '' ELSE ':' || PE.epoch END)
- || '-' || PA.label name
+ || '-' || PA.label as name
from rhnPackage P inner join
rhnChannelPackage CP on P.id = CP.package_id inner join
rhnErrataPackage EP on EP.package_id = CP.package_id inner join
13 years, 1 month
backend/server
by Jan Pazdziora
backend/server/handlers/xmlrpc/registration.py | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 0ca6c3f34ab11258aa090ab514a4b0cfac5fcbc0
Author: Uwe Gansert <ug(a)suse.de>
Date: Wed Feb 23 16:46:41 2011 +0100
fixed virtual KVM machines in the webui
diff --git a/backend/server/handlers/xmlrpc/registration.py b/backend/server/handlers/xmlrpc/registration.py
index 076bce3..1bc0099 100644
--- a/backend/server/handlers/xmlrpc/registration.py
+++ b/backend/server/handlers/xmlrpc/registration.py
@@ -54,6 +54,9 @@ def parse_smbios(smbios):
if vendor == "QEMU" and uuid is not None:
return (rhnVirtualization.VirtualizationType.QEMU, uuid)
+ elif manufacturer == 'Bochs' and product == 'Bochs' and uuid is not None:
+ # Bochs, Bochs is a virtual SUSE KVM machine
+ return (rhnVirtualization.VirtualizationType.QEMU, uuid)
elif manufacturer == 'Red Hat' and product == 'KVM' and uuid is not None:
return (rhnVirtualization.VirtualizationType.QEMU, uuid)
elif (manufacturer == 'Red Hat' and product == 'RHEV Hypervisor' and uuid is
13 years, 2 months