java/code
by Justin Sherrill
java/code/src/com/redhat/rhn/domain/token/ActivationKeyFactory.java | 4 ++--
java/code/src/com/redhat/rhn/manager/token/ActivationKeyManager.java | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 1d9847af191e625f6831a344947eb1371ac75997
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Wed Jan 13 13:52:00 2010 -0500
514759 - stripping space chars from activation keys
diff --git a/java/code/src/com/redhat/rhn/domain/token/ActivationKeyFactory.java b/java/code/src/com/redhat/rhn/domain/token/ActivationKeyFactory.java
index b4c3af8..c060aaa 100644
--- a/java/code/src/com/redhat/rhn/domain/token/ActivationKeyFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/token/ActivationKeyFactory.java
@@ -114,10 +114,10 @@ public class ActivationKeyFactory extends HibernateFactory {
keyToUse = generateKey();
}
else {
- validateKeyName(key.trim());
+ validateKeyName(key.trim().replace(" ", ""));
}
- keyToUse = ActivationKey.makePrefix(user.getOrg()) + keyToUse.trim();
+ keyToUse = ActivationKey.makePrefix(user.getOrg()) + keyToUse.trim().replace(" ", "");
if (server != null) {
keyToUse = "re-" + keyToUse;
diff --git a/java/code/src/com/redhat/rhn/manager/token/ActivationKeyManager.java b/java/code/src/com/redhat/rhn/manager/token/ActivationKeyManager.java
index ee4e5b4..fc13bac 100644
--- a/java/code/src/com/redhat/rhn/manager/token/ActivationKeyManager.java
+++ b/java/code/src/com/redhat/rhn/manager/token/ActivationKeyManager.java
@@ -428,7 +428,7 @@ public class ActivationKeyManager {
* @param user TODO
*/
public void changeKey(String newKey, ActivationKey key, User user) {
- newKey = newKey.trim();
+ newKey = newKey.trim().replace(" ", "");
String oldKey = key.getKey();
if (!newKey.equals(key.getKey())) {
ActivationKeyFactory.validateKeyName(newKey);
14 years, 4 months
java/code
by Justin Sherrill
java/code/webapp/WEB-INF/pages/configuration/sdc/viewdiffresult.jsp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 3c3daed9bf1bb70d9a6a9cf91f91cd922d468c5f
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Wed Jan 13 12:14:55 2010 -0500
554516 - adding better formatting for config file diffs
diff --git a/java/code/webapp/WEB-INF/pages/configuration/sdc/viewdiffresult.jsp b/java/code/webapp/WEB-INF/pages/configuration/sdc/viewdiffresult.jsp
index 8be4aef..7da2cca 100644
--- a/java/code/webapp/WEB-INF/pages/configuration/sdc/viewdiffresult.jsp
+++ b/java/code/webapp/WEB-INF/pages/configuration/sdc/viewdiffresult.jsp
@@ -73,7 +73,8 @@
</tr>
<tr>
<th><bean:message key="sdc.config.diff_result.diff"/>:</th>
- <td><c:out value="${revisionBean.configRevisionActionResult.resultContents}"/>
+ <td>
+ <pre style="overflow: scroll; width: 100%; height: 400px;"><c:out value="${revisionBean.configRevisionActionResult.resultContents}"/></pre>
</td>
</tr>
</table>
14 years, 4 months
2 commits - java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/frontend/action/channel/manage/ChannelPackagesRemoveAction.java | 1
java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java | 18 ++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
New commits:
commit 2dabdc268e97fbde25cb5b200a1a02fab322a56d
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Jan 13 18:06:01 2010 +0100
unused import removed
diff --git a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/ChannelPackagesRemoveAction.java b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/ChannelPackagesRemoveAction.java
index 920b298..cff825a 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/ChannelPackagesRemoveAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/ChannelPackagesRemoveAction.java
@@ -19,7 +19,6 @@ import com.redhat.rhn.common.localization.LocalizationService;
import com.redhat.rhn.common.security.PermissionException;
import com.redhat.rhn.domain.channel.Channel;
import com.redhat.rhn.domain.channel.ChannelFactory;
-import com.redhat.rhn.domain.rhnpackage.PackageFactory;
import com.redhat.rhn.domain.rhnset.RhnSet;
import com.redhat.rhn.domain.role.RoleFactory;
import com.redhat.rhn.domain.user.User;
commit fa26c9f9b57824c05cfb72ab4279a84474d1a011
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Jan 13 18:04:23 2010 +0100
513716 - prefix validation added when creating a user
diff --git a/java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java b/java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java
index b213931..0785f60 100644
--- a/java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java
@@ -16,6 +16,7 @@ package com.redhat.rhn.manager.user;
import com.redhat.rhn.common.conf.Config;
import com.redhat.rhn.common.hibernate.LookupException;
+import com.redhat.rhn.common.localization.LocalizationService;
import com.redhat.rhn.common.messaging.MessageQueue;
import com.redhat.rhn.common.validator.RequiredConstraint;
import com.redhat.rhn.common.validator.ValidatorError;
@@ -30,6 +31,7 @@ import org.apache.commons.lang.StringUtils;
import java.util.ArrayList;
import java.util.List;
+import java.util.SortedSet;
import java.util.regex.Pattern;
import javax.mail.internet.AddressException;
@@ -76,6 +78,7 @@ public class CreateUserCommand {
}
validateEmail();
validateLogin();
+ validatePrefix();
return (ValidatorError[]) errors.toArray(new ValidatorError[0]);
}
@@ -211,6 +214,21 @@ public class CreateUserCommand {
}
/**
+ * Private helper method to validate the user's prefix. Puts errors into the
+ * errors list.
+ */
+ private void validatePrefix() {
+ // Make sure set prefix is valid
+ SortedSet validPrefixes = LocalizationService.getInstance().availablePrefixes();
+ if (!LocalizationService.getInstance().availablePrefixes().contains(
+ user.getPrefix())) {
+ errors.add(new ValidatorError(
+ "Invalid prefix [" + user.getPrefix() + "]. Must be one of " +
+ validPrefixes.toString()));
+ }
+ }
+
+ /**
* Private helper method to validate the password. This happens when the setPassword
* method of this class is called. Puts errors into the passwordErrors list.
* @param passwordIn The password to check.
14 years, 4 months
java/code
by Justin Sherrill
java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 0432aaee4c74aa1653bcbd344bc63d075d4f901f
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Wed Jan 13 10:57:33 2010 -0500
554767 - fixing issue where file preservation list details wouldnt always show up under the correct tab
diff --git a/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml b/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml
index a5eeede..a427be3 100644
--- a/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml
+++ b/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml
@@ -82,7 +82,9 @@
<rhn-tab-url>/rhn/kickstart/TreeEdit.do</rhn-tab-url>
<rhn-tab-url>/rhn/kickstart/TreeCreate.do</rhn-tab-url>
</rhn-tab>
- <rhn-tab name="File Preservation" acl="org_entitlement(rhn_provisioning); user_role(config_admin)" url="/rhn/systems/provisioning/preservation/PreservationList.do" />
+ <rhn-tab name="File Preservation" acl="org_entitlement(rhn_provisioning); user_role(config_admin)" url="/rhn/systems/provisioning/preservation/PreservationList.do">
+ <rhn-tab-url>/rhn/systems/provisioning/preservation/PreservationListEdit.do</rhn-tab-url>
+ </rhn-tab>
<rhn-tab name="snippets.jsp.toolbar" acl="org_entitlement(rhn_provisioning); user_role(config_admin)" url="/rhn/kickstart/cobbler/CustomSnippetList.do" >
<rhn-tab-url>/rhn/kickstart/cobbler/CobblerSnippetList.do</rhn-tab-url>
<rhn-tab-url>/rhn/kickstart/cobbler/CustomSnippetList.do</rhn-tab-url>
14 years, 4 months
Changes to 'refs/tags/spacewalk-backend-0.8.25-1'
by Michael Mraka
Tag 'spacewalk-backend-0.8.25-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-01-13 15:05 +0000
Tagging package [spacewalk-backend] version [0.8.25-1] in directory [backend/].
Changes since spacewalk-backend-0.8.24-1:
Michael Mraka (2):
fixed indent
Automatic commit of package [spacewalk-backend] release [0.8.25-1].
---
backend/satellite_tools/satsync.py | 2 +-
backend/spacewalk-backend.spec | 4 ++--
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
---
14 years, 4 months
2 commits - backend/satellite_tools backend/spacewalk-backend.spec rel-eng/packages
by Michael Mraka
backend/satellite_tools/satsync.py | 2 +-
backend/spacewalk-backend.spec | 4 ++--
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 91aede8456105084c7c98cf86dd704979c151fc1
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 13 16:05:50 2010 +0100
Automatic commit of package [spacewalk-backend] release [0.8.25-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 9ffd3ef..40f4f69 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -8,7 +8,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.8.24
+Version: 0.8.25
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -609,7 +609,7 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
-* Wed Jan 13 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.8.24-1
+* Wed Jan 13 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.8.25-1
- ISS should work again
* Wed Jan 13 2010 Tomas Lestach <tlestach(a)redhat.com> 0.8.23-1
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 698e732..b18c06f 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.8.24-1 backend/
+0.8.25-1 backend/
commit 990209a13a66f9976e758f143fdd329d0782828e
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 13 16:05:17 2010 +0100
fixed indent
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 8f6d673..f25f2bd 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -1119,7 +1119,7 @@ Please contact your RHN representative""" % (generation, sat_cert.generation))
def download_srpms(self):
self._compute_unique_source_packages()
- self._diff_source_packages()
+ self._diff_source_packages()
log(1, ["", "Downloading srpm packages"])
# Lets go fetch the source packages and push them to their proper location:
for channel, missing_fs_source_packages in self._missing_fs_source_packages.items():
14 years, 4 months
Changes to 'refs/tags/spacewalk-backend-0.8.24-1'
by Michael Mraka
Tag 'spacewalk-backend-0.8.24-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-01-13 15:02 +0000
Tagging package [spacewalk-backend] version [0.8.24-1] in directory [backend/].
Changes since spacewalk-backend-0.8.23-1:
Michael Mraka (8):
fixed ISS error
fixed typo
attribute name have to be 'checksum-type' in the dump
fixed errata import over ISS
simplified md5sum handling
fixed md5sum -> checksum rewrite condition
removed redundant tags
Automatic commit of package [spacewalk-backend] release [0.8.24-1].
---
backend/satellite_tools/disk_dumper/dumper.py | 3 -
backend/satellite_tools/disk_dumper/iss.py | 2
backend/satellite_tools/exporter/exportLib.py | 2
backend/satellite_tools/xmlSource.py | 61 +++++++-------------------
backend/server/importlib/errataImport.py | 3 -
backend/server/importlib/importLib.py | 27 ++++++++---
backend/spacewalk-backend.spec | 5 +-
rel-eng/packages/spacewalk-backend | 2
8 files changed, 47 insertions(+), 58 deletions(-)
---
14 years, 4 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 b0f62b10a20dcfe8287b0fe99bdba457d30e08ff
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 13 16:02:44 2010 +0100
Automatic commit of package [spacewalk-backend] release [0.8.24-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index d47ece9..9ffd3ef 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -8,7 +8,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.8.23
+Version: 0.8.24
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -609,6 +609,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Wed Jan 13 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.8.24-1
+- ISS should work again
+
* Wed Jan 13 2010 Tomas Lestach <tlestach(a)redhat.com> 0.8.23-1
- preparations for srpm sync (tlestach(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index bc1daa3..698e732 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.8.23-1 backend/
+0.8.24-1 backend/
14 years, 4 months
7 commits - backend/satellite_tools backend/server
by Michael Mraka
backend/satellite_tools/disk_dumper/dumper.py | 3 -
backend/satellite_tools/disk_dumper/iss.py | 2
backend/satellite_tools/exporter/exportLib.py | 2
backend/satellite_tools/xmlSource.py | 61 +++++++-------------------
backend/server/importlib/errataImport.py | 3 -
backend/server/importlib/importLib.py | 27 ++++++++---
6 files changed, 42 insertions(+), 56 deletions(-)
New commits:
commit 005e7841f7ab0fc6bf5cf535760d3887cae8b342
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 13 15:52:28 2010 +0100
removed redundant tags
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index d42c53a..a8c0930 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -601,19 +601,6 @@ class FileItem(BaseChecksummedItem):
item_name = 'rhn-package-file'
item_class = importLib.File
tagMap = {
- 'rhn-package-file-device' : 'device',
- 'rhn-package-file-inode' : 'inode',
- 'rhn-package-file-file_mode': 'file_mode',
- 'rhn-package-file-username' : 'username',
- 'rhn-package-file-groupname': 'groupname',
- 'rhn-package-file-rdev' : 'rdev',
- 'rhn-package-file-file_size': 'file_size',
- 'rhn-package-file-mtime' : 'mtime',
- 'rhn-package-file-md5' : 'md5sum',
- 'rhn-package-file-linkto' : 'linkto',
- 'rhn-package-file-flags' : 'flags',
- 'rhn-package-file-verifyflags': 'verifyflags',
- 'rhn-package-file-lang' : 'lang',
'md5' : 'md5sum',
}
addItem(FileItem)
@@ -704,7 +691,6 @@ class ErrataFileItem(BaseChecksummedItem):
# Specific to XML
'package' : 'package',
'source-package' : 'source-package',
- 'checksum' : 'checksum',
'checksum-type' : 'checksum_type',
}
addItem(ErrataFileItem)
@@ -743,7 +729,6 @@ class KickstartFileItem(BaseChecksummedItem):
'relative-path' : 'relative_path',
'file-size' : 'file_size',
'last-modified' : 'last_modified',
- 'checksum' : 'checksum',
'checksum-type' : 'checksum_type',
}
addItem(KickstartFileItem)
commit 19644c46be3536a9c485523a29e75936501e2ad7
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 13 15:34:45 2010 +0100
fixed md5sum -> checksum rewrite condition
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index a151393..d42c53a 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -468,12 +468,12 @@ addItem(ChannelItem)
class BaseChecksummedItem(BaseItem):
def populate(self, attributes, elements):
item = BaseItem.populate(self, attributes, elements)
- if ('md5sum' in item and item['md5sum']
- and ('checksum' not in item or not item['checksum'])):
- # xml dumps < 3.5 (aka pre-sha256)
- item['checksum_type'] = 'md5'
- item['checksum'] = item['md5sum']
- del(item['md5sum'])
+ if 'md5sum' in item:
+ if type(item['checksum']) != types.StringType:
+ # xml dumps < 3.5 (aka pre-sha256)
+ item['checksum_type'] = 'md5'
+ item['checksum'] = item['md5sum']
+ del(item['md5sum'])
return item
addItem(BaseChecksummedItem)
@@ -614,6 +614,7 @@ class FileItem(BaseChecksummedItem):
'rhn-package-file-flags' : 'flags',
'rhn-package-file-verifyflags': 'verifyflags',
'rhn-package-file-lang' : 'lang',
+ 'md5' : 'md5sum',
}
addItem(FileItem)
diff --git a/backend/server/importlib/importLib.py b/backend/server/importlib/importLib.py
index 260b726..289b935 100644
--- a/backend/server/importlib/importLib.py
+++ b/backend/server/importlib/importLib.py
@@ -238,7 +238,7 @@ class File(Item):
'verifyflags' : IntType,
'lang' : StringType,
# those attributes are mutualy exclusive
- 'md5' : StringType, # xml dumps < 3.5
+ 'md5sum' : StringType, # xml dumps < 3.5
'filedigest' : StringType, # spacewalk-repo-sync
'checksum' : StringType, # xml dumps >= 3.5
'checksum_type' : StringType, # xml dumps >= 3.5
@@ -335,7 +335,6 @@ class Package(IncompletePackage):
'source_rpm' : StringType,
'package_size' : IntType,
'last_modified' : DateType,
- 'md5sum' : StringType,
'sigmd5' : StringType,
'sigpgp' : StringType,
'siggpg' : StringType,
@@ -343,6 +342,10 @@ class Package(IncompletePackage):
'header_start' : IntType,
'header_end' : IntType,
'path' : StringType,
+ # these attributes are mutualy exclusive
+ 'md5sum' : StringType, # xml dumps < 3.5
+ 'checksum' : StringType, # xml dumps >= 3.5
+ 'checksum_type' : StringType, # xml dumps >= 3.5
# These attributes are lists of objects
'files' : [File],
'requires' : [Dependency],
@@ -373,9 +376,12 @@ class SourcePackage(IncompletePackage):
'vendor' : StringType,
'cookie' : StringType,
'package_size' : IntType,
- 'md5sum' : StringType,
'path' : StringType,
'last_modified' : DateType,
+ # these attributes are mutualy exclusive
+ 'md5sum' : StringType, # xml dumps < 3.5
+ 'checksum' : StringType, # xml dumps >= 3.5
+ 'checksum_type' : StringType, # xml dumps >= 3.5
}
def __init__(self):
# Inherit from IncompletePackage
@@ -392,9 +398,12 @@ class SourcePackage(IncompletePackage):
class SourcePackageFile(Information):
attributeTypes = {
'file_size' : IntType,
- 'md5sum' : StringType,
'path' : StringType,
'org_id' : IntType,
+ # these attributes are mutualy exclusive
+ 'md5sum' : StringType, # xml dumps < 3.5
+ 'checksum' : StringType, # xml dumps >= 3.5
+ 'checksum_type' : StringType, # xml dumps >= 3.5
}
@@ -407,11 +416,14 @@ class Bug(Information):
class ErrataFile(Information):
attributeTypes = {
- 'md5sum' : StringType,
'filename' : StringType,
'file_type' : StringType,
'channel_list' : [StringType],
'package_id' : IntType,
+ # these attributes are mutualy exclusive
+ 'md5sum' : StringType, # xml dumps < 3.5
+ 'checksum' : StringType, # xml dumps >= 3.5
+ 'checksum_type' : StringType, # xml dumps >= 3.5
}
@@ -520,7 +532,10 @@ class KickstartFile(Information):
'relative_path' : StringType,
'last_modified' : DateType,
'file_size' : IntType,
- 'md5sum' : StringType,
+ # these attributes are mutualy exclusive
+ 'md5sum' : StringType, # xml dumps < 3.5
+ 'checksum' : StringType, # xml dumps >= 3.5
+ 'checksum_type' : StringType, # xml dumps >= 3.5
}
class KickstartableTree(Information):
commit 2da6e9eab66d7e6e84b3ede96217d1786cb58985
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 13 14:33:43 2010 +0100
simplified md5sum handling
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index a617e71..a151393 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -465,8 +465,19 @@ class ChannelItem(BaseItem):
}
addItem(ChannelItem)
+class BaseChecksummedItem(BaseItem):
+ def populate(self, attributes, elements):
+ item = BaseItem.populate(self, attributes, elements)
+ if ('md5sum' in item and item['md5sum']
+ and ('checksum' not in item or not item['checksum'])):
+ # xml dumps < 3.5 (aka pre-sha256)
+ item['checksum_type'] = 'md5'
+ item['checksum'] = item['md5sum']
+ del(item['md5sum'])
+ return item
+addItem(BaseChecksummedItem)
-class IncompletePackageItem(BaseItem):
+class IncompletePackageItem(BaseChecksummedItem):
item_name = 'rhn-package-short'
item_class = importLib.IncompletePackage
tagMap = {
@@ -477,15 +488,6 @@ class IncompletePackageItem(BaseItem):
'org-id' : 'org_id',
'checksum-type' : 'checksum_type', # xml dump 3.5 (sha256)
}
-
- def populate(self, attributes, elements):
- item = BaseItem.populate(self, attributes, elements)
- if item['md5sum']:
- # xml dumps < 3.5 (pre-sha256)
- item['checksum_type'] = 'md5'
- item['checksum'] = item['md5sum']
- del(item['md5sum'])
- return item
addItem(IncompletePackageItem)
class PackageItem(IncompletePackageItem):
@@ -595,7 +597,7 @@ class ObsoletesItem(BaseItem):
}
addItem(ObsoletesItem)
-class FileItem(BaseItem):
+class FileItem(BaseChecksummedItem):
item_name = 'rhn-package-file'
item_class = importLib.File
tagMap = {
@@ -607,21 +609,12 @@ class FileItem(BaseItem):
'rhn-package-file-rdev' : 'rdev',
'rhn-package-file-file_size': 'file_size',
'rhn-package-file-mtime' : 'mtime',
- 'rhn-package-file-md5' : 'md5',
+ 'rhn-package-file-md5' : 'md5sum',
'rhn-package-file-linkto' : 'linkto',
'rhn-package-file-flags' : 'flags',
'rhn-package-file-verifyflags': 'verifyflags',
'rhn-package-file-lang' : 'lang',
}
- def populate(self, attributes, elements):
- item = BaseItem.populate(self, attributes, elements)
- if 'md5' in item and type(item['md5']) == types.StringType:
- # xml dumps < 3.5 (pre-sha256)
- # if md5 is empty set empty checksum - e.g. for dirs and links
- item['checksum_type'] = 'md5'
- item['checksum'] = item['md5']
- del(item['md5'])
- return item
addItem(FileItem)
class DistItem(BaseItem):
@@ -701,7 +694,7 @@ class ErrorItem(BaseItem):
tagMap = {}
addItem(ErrorItem)
-class ErrataFileItem(BaseItem):
+class ErrataFileItem(BaseChecksummedItem):
item_name = 'rhn-erratum-file'
item_class = importLib.ErrataFile
tagMap = {
@@ -713,14 +706,6 @@ class ErrataFileItem(BaseItem):
'checksum' : 'checksum',
'checksum-type' : 'checksum_type',
}
- def populate(self, attributes, elements):
- item = BaseItem.populate(self, attributes, elements)
- if item['md5sum']:
- # xml dumps < 3.5 (pre-sha256)
- item['checksum_type'] = 'md5'
- item['checksum'] = item['md5sum']
- del(item['md5sum'])
- return item
addItem(ErrataFileItem)
class BlacklistObsoleteItem(BaseItem):
@@ -750,7 +735,7 @@ class KickstartableTreeItem(BaseItem):
}
addItem(KickstartableTreeItem)
-class KickstartFileItem(BaseItem):
+class KickstartFileItem(BaseChecksummedItem):
item_name = 'rhn-kickstart-file'
item_class = importLib.KickstartFile
tagMap = {
@@ -760,14 +745,6 @@ class KickstartFileItem(BaseItem):
'checksum' : 'checksum',
'checksum-type' : 'checksum_type',
}
- def populate(self, attributes, elements):
- item = BaseItem.populate(self, attributes, elements)
- if item['md5sum']:
- # xml dumps < 3.5 (pre-sha256)
- item['checksum_type'] = 'md5'
- item['checksum'] = item['md5sum']
- del(item['md5sum'])
- return item
addItem(KickstartFileItem)
#
commit 719c0c637a646f6b26e1ff27504328a633d6d4a6
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 13 14:10:37 2010 +0100
fixed errata import over ISS
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index 51ceb5f..a617e71 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -710,7 +710,17 @@ class ErrataFileItem(BaseItem):
# Specific to XML
'package' : 'package',
'source-package' : 'source-package',
+ 'checksum' : 'checksum',
+ 'checksum-type' : 'checksum_type',
}
+ def populate(self, attributes, elements):
+ item = BaseItem.populate(self, attributes, elements)
+ if item['md5sum']:
+ # xml dumps < 3.5 (pre-sha256)
+ item['checksum_type'] = 'md5'
+ item['checksum'] = item['md5sum']
+ del(item['md5sum'])
+ return item
addItem(ErrataFileItem)
class BlacklistObsoleteItem(BaseItem):
diff --git a/backend/server/importlib/errataImport.py b/backend/server/importlib/errataImport.py
index 74cfa56..b16c568 100644
--- a/backend/server/importlib/errataImport.py
+++ b/backend/server/importlib/errataImport.py
@@ -76,9 +76,6 @@ class ErrataImport(GenericPackageImport):
def _preprocessErratumFiles(self, erratum):
for f in (erratum['files'] or []):
- if 'md5sum' in f: # old pre-sha256 export
- f['checksum_type'] = 'md5'
- f['checksum'] = f['md5sum']
checksumTuple = (f['checksum_type'], f['checksum'])
if not self.checksums.has_key(checksumTuple):
self.checksums[checksumTuple] = None
commit 05cc9a45177d0f4d6bc97139ce5e83d7e9c3b397
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 13 13:43:23 2010 +0100
attribute name have to be 'checksum-type' in the dump
diff --git a/backend/satellite_tools/exporter/exportLib.py b/backend/satellite_tools/exporter/exportLib.py
index 9bdc2a7..dd833bf 100644
--- a/backend/satellite_tools/exporter/exportLib.py
+++ b/backend/satellite_tools/exporter/exportLib.py
@@ -1031,7 +1031,7 @@ class _ErratumFilesDumper(BaseDumper):
def dump_subelement(self, data):
attributes = {
- 'checksum_type' : data['checksum_type'],
+ 'checksum-type' : data['checksum_type'],
'checksum' : data['checksum'],
# XXX: band-aid - truncate to 128 chars for olde satellites.
'filename' : data['filename'][:128],
commit 4a86b6abcfe83d723df914290c8f901db083d70e
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 13 13:21:20 2010 +0100
fixed typo
diff --git a/backend/satellite_tools/disk_dumper/iss.py b/backend/satellite_tools/disk_dumper/iss.py
index 745eb19..dbc9e99 100644
--- a/backend/satellite_tools/disk_dumper/iss.py
+++ b/backend/satellite_tools/disk_dumper/iss.py
@@ -211,7 +211,7 @@ class Dumper(dumper.XML_Dumper):
###BINARY RPM INFO###
try:
query = """
- select rcp.package_id id, rp.path path,
+ select rcp.package_id id, rp.path path
from rhnChannelPackage rcp, rhnPackage rp
where rcp.package_id = rp.id
and rcp.channel_id = :channel_id
commit c7116f98bed2658e57bcfb53530ceed6fbe3eefc
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Jan 13 11:44:32 2010 +0100
fixed ISS error
Traceback (most recent call last):
...
File "/usr/share/rhn/satellite_tools/disk_dumper/dumper.py", line 869, in
+set_attributes
attributes = SatelliteDumper.set_attributes(self)
File "/usr/share/rhn/satellite_tools/disk_dumper/dumper.py", line 862, in
+set_attributes
attributes['version'] = CFG.XML_DUMP_VERSION
File "/usr/share/rhn/common/rhnConfig.py", line 336, in __getattr__
raise AttributeError(key)
AttributeError: XML_DUMP_VERSION
diff --git a/backend/satellite_tools/disk_dumper/dumper.py b/backend/satellite_tools/disk_dumper/dumper.py
index daef8ed..cc01592 100644
--- a/backend/satellite_tools/disk_dumper/dumper.py
+++ b/backend/satellite_tools/disk_dumper/dumper.py
@@ -866,8 +866,9 @@ class SatelliteDumper(exportLib.SatelliteDumper):
class SatelliteDumperEx(SatelliteDumper):
def set_attributes(self):
""" Overriding with our own version """
- attributes = SatelliteDumper.set_attributes(self)
+ attributes = exportLib.SatelliteDumper.set_attributes(self)
attributes['version'] = constants.PROTOCOL_VERSION
+ attributes['generation'] = CFG.SAT_CERT_GENERATION
return attributes
class QueryIterator:
14 years, 4 months
Changes to 'refs/tags/spacewalk-backend-0.8.23-1'
by Tomas Lestach
Tag 'spacewalk-backend-0.8.23-1' created by Tomas Lestach <tlestach(a)redhat.com> at 2010-01-13 14:22 +0000
Tagging package [spacewalk-backend] version [0.8.23-1] in directory [backend/].
Changes since spacewalk-backend-0.8.22-1:
Tomas Lestach (2):
preparations for srpm sync
Automatic commit of package [spacewalk-backend] release [0.8.23-1].
---
backend/satellite_tools/diskImportLib.py | 7 +
backend/satellite_tools/satsync.py | 143 ++++++++++++++++++++++++++-----
backend/satellite_tools/sync_handlers.py | 4
backend/satellite_tools/xmlSource.py | 2
backend/server/importlib/importLib.py | 1
backend/spacewalk-backend.spec | 5 -
rel-eng/packages/spacewalk-backend | 2
7 files changed, 139 insertions(+), 25 deletions(-)
---
14 years, 4 months