Changes to 'refs/tags/spacewalk-java-0.6.35-1'
by Pradeep Kilambi
Tag 'spacewalk-java-0.6.35-1' created by Pradeep Kilambi <pkilambi(a)redhat.com> at 2009-07-23 19:11 +0000
Tagging package [spacewalk-java] version [0.6.35-1] in directory [java/].
Changes since spacewalk-backend-0.6.23-1:
Pradeep Kilambi (1):
Automatic commit of package [spacewalk-java] release [0.6.35-1].
---
java/spacewalk-java.spec | 7 ++++++-
rel-eng/packages/spacewalk-java | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
---
14 years, 11 months
java/spacewalk-java.spec rel-eng/packages
by Pradeep Kilambi
java/spacewalk-java.spec | 7 ++++++-
rel-eng/packages/spacewalk-java | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
New commits:
commit c5347c63d83b4d5ad0a5146dca7d13bde98d8879
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Thu Jul 23 15:11:57 2009 -0400
Automatic commit of package [spacewalk-java] release [0.6.35-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 6aba9bc..220d838 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -12,7 +12,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 0.6.34
+Version: 0.6.35
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -250,6 +250,11 @@ fi
%attr(644, root, root) %{_datadir}/rhn/lib/rhn.jar
%changelog
+* Thu Jul 23 2009 Pradeep Kilambi <pkilambi(a)redhat.com> 0.6.35-1
+- Sha256 support for channel creation: (pkilambi(a)redhat.com)
+- checkstyle (mmccune(a)redhat.com)
+- 512814 - unit test fix (mmccune(a)redhat.com)
+
* Wed Jul 22 2009 John Matthews <jmatthew(a)redhat.com> 0.6.34-1
- 512814 - adding spot to add 'upgrade' logic to our startup of tomact.
(mmccune(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 20a093c..ad5d5c7 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-0.6.34-1 java/
+0.6.35-1 java/
14 years, 11 months
Changes to 'refs/tags/spacewalk-backend-0.6.23-1'
by Pradeep Kilambi
Tag 'spacewalk-backend-0.6.23-1' created by Pradeep Kilambi <pkilambi(a)redhat.com> at 2009-07-23 19:09 +0000
Tagging package [spacewalk-backend] version [0.6.23-1] in directory [backend/].
Changes since osad-5.9.18-1:
Pradeep Kilambi (1):
Automatic commit of package [spacewalk-backend] release [0.6.23-1].
---
backend/spacewalk-backend.spec | 35 ++++++++++++++++++++++++++++++++++-
rel-eng/packages/spacewalk-backend | 2 +-
2 files changed, 35 insertions(+), 2 deletions(-)
---
14 years, 11 months
backend/spacewalk-backend.spec rel-eng/packages
by Pradeep Kilambi
backend/spacewalk-backend.spec | 35 ++++++++++++++++++++++++++++++++++-
rel-eng/packages/spacewalk-backend | 2 +-
2 files changed, 35 insertions(+), 2 deletions(-)
New commits:
commit a7d5a732f095a646bc473d6c7fbb54651bf0d7f7
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Thu Jul 23 15:09:14 2009 -0400
Automatic commit of package [spacewalk-backend] release [0.6.23-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index bdaeca6..4e89aa2 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.6.22
+Version: 0.6.23
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -571,6 +571,39 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Thu Jul 23 2009 Pradeep Kilambi <pkilambi(a)redhat.com> 0.6.23-1
+- 513432, 513435 : Our channel family import is written such that we compare
+ and resync the red hat channel families. But in iss case we can have provate
+ channel family ties to a channel ebing imported that will not match whats on
+ the slave as slaves default to org 1. This fix should only post process the
+ channel families if its a non custom one. (pkilambi(a)redhat.com)
+- reporting: add report option for listing fields for report.
+ (jpazdziora(a)redhat.com)
+- reporting: after having parsed the common options, put the rest back to
+ sys.argv. (jpazdziora(a)redhat.com)
+- reporting: show error message when unknown report is specified.
+ (jpazdziora(a)redhat.com)
+- reporting: change structure of the report definition file to also include
+ column names. (jpazdziora(a)redhat.com)
+- reporting: add channel(s) to which the server is registered.
+ (jpazdziora(a)redhat.com)
+- reporting: add number of out-of-date packages and errata.
+ (jpazdziora(a)redhat.com)
+- reporting: add kernel version to the report. (jpazdziora(a)redhat.com)
+- reporting: when report name is not specified on the command line, show list
+ of available reports. (jpazdziora(a)redhat.com)
+- reporting: move the SQL to definition file, to allow for multiple reports.
+ (jpazdziora(a)redhat.com)
+- reporting: add registration time and last check-in time.
+ (jpazdziora(a)redhat.com)
+- reporting: add the registered by information. (jpazdziora(a)redhat.com)
+- reporting: add hostname and IP address to the report. (jpazdziora(a)redhat.com)
+- reporting: output field names as the first row. (jpazdziora(a)redhat.com)
+- reporting: output formatted as csv. (jpazdziora(a)redhat.com)
+- reporting: initial prepare, execute, and fetch loop. (jpazdziora(a)redhat.com)
+- reporting: add spacewalk-report to the rpm package. (jpazdziora(a)redhat.com)
+- reporting: a stub for new script, spacewalk-report. (jpazdziora(a)redhat.com)
+
* Wed Jul 22 2009 John Matthews <jmatthew(a)redhat.com> 0.6.22-1
- 511283 - Package compare between db and cache should see if the db is newer
than cache and only then import the content. (pkilambi(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index b232b7a..bfb1562 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.6.22-1 backend/
+0.6.23-1 backend/
14 years, 11 months
Changes to 'refs/tags/osad-5.9.18-1'
by Devan Goodwin
Tag 'osad-5.9.18-1' created by Devan Goodwin <dgoodwin(a)redhat.com> at 2009-07-23 19:07 +0000
Tagging package [osad] version [5.9.18-1] in directory [client/tools/osad/].
Changes since perl-NOCpulse-Probe-1.183.9-1:
Devan Goodwin (3):
508187 - Fix jabberd configs on x86_64.
Remove osad Requires python-optik.
Automatic commit of package [osad] release [5.9.18-1].
Jan Pazdziora (14):
reporting: output formatted as csv.
reporting: output field names as the first row.
reporting: add hostname and IP address to the report.
reporting: add the registered by information.
reporting: add registration time and last check-in time.
reporting: move the SQL to definition file, to allow for multiple reports.
reporting: when report name is not specified on the command line, show list of available reports.
reporting: add kernel version to the report.
reporting: add number of out-of-date packages and errata.
reporting: add channel(s) to which the server is registered.
reporting: change structure of the report definition file to also include column names.
reporting: show error message when unknown report is specified.
reporting: after having parsed the common options, put the rest back to sys.argv.
reporting: add report option for listing fields for report.
Milan Zazrivec (1):
512457 - remove xml-commons-apis before rhel-4 upgrade
Miroslav Suchý (1):
493060 - do not send email "RHN Monitoring Scout started" by default
Pradeep Kilambi (3):
513432, 513435 : Our channel family import is written such that we compare and resync the red hat channel families. But in iss case we can have provate channel family ties to a channel ebing imported that will not match whats on the slave as slaves default to org 1. This fix should only post process the channel families if its a non custom one.
Sha256 support for channel creation:
fixing descritpion on checksums
---
backend/Makefile.defs | 14 +
backend/satellite_tools/Makefile | 8
backend/satellite_tools/reports.py | 59 +++++
backend/satellite_tools/reports/data/inventory | 44 ++++
backend/satellite_tools/spacewalk-report | 76 +++++--
backend/server/importlib/backend.py | 5
backend/spacewalk-backend.spec | 2
client/tools/osad/osad.spec | 6
java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml | 5
java/code/src/com/redhat/rhn/domain/channel/Channel.java | 39 ++-
java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java | 58 +++--
java/code/src/com/redhat/rhn/domain/channel/test/ChannelFactoryTest.java | 16 +
java/code/src/com/redhat/rhn/domain/common/ChecksumType.hbm.xml | 32 +++
java/code/src/com/redhat/rhn/domain/common/ChecksumType.java | 105 ++++++++++
java/code/src/com/redhat/rhn/domain/common/test/ChecksumTypeTest.java | 42 ++++
java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java | 46 ++--
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 15 +
java/code/src/com/redhat/rhn/manager/channel/CreateChannelCommand.java | 16 +
java/code/src/com/redhat/rhn/manager/channel/UpdateChannelCommand.java | 11 +
java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepomdIndexData.java | 8
java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java | 28 ++
java/code/webapp/WEB-INF/pages/channel/manage/edit.jsp | 13 +
java/code/webapp/WEB-INF/struts-config.xml | 1
monitoring/SatConfig/bootstrap/npBootstrap.pl | 3
proxy/installer/cluster.ini | 1
rel-eng/packages/osad | 2
satellite/install/install.pl | 3
schema/spacewalk/rhnsat/tables/rhnChannel.sql | 2
schema/spacewalk/rhnsat/tables/rhnChecksumType.sql | 44 ++++
schema/spacewalk/rhnsat/tables/rhnChecksumType_data.sql | 37 +++
schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/125-rhnChecksumType.sql | 44 ++++
schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/126-rhnChecksumType_data.sql | 37 +++
schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/191-rhnChannel.sql | 7
spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/c2s.xml | 2
spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/sm.xml | 4
spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/rhn/cluster.ini | 1
spacewalk/setup/bin/spacewalk-setup | 7
web/html/applications/rhn-proxy/5.3/cluster.ini | 1
38 files changed, 760 insertions(+), 84 deletions(-)
---
14 years, 11 months
2 commits - client/tools rel-eng/packages
by Devan Goodwin
client/tools/osad/osad.spec | 6 ++++--
rel-eng/packages/osad | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
New commits:
commit d478fbdfe058ee3846a798ab4b5208a63fca0c8d
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Thu Jul 23 16:07:56 2009 -0300
Automatic commit of package [osad] release [5.9.18-1].
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index 89c15b7..6ce5303 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.17
+Version: 5.9.18
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -240,6 +240,9 @@ rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvvi {}
# $Id$
%changelog
+* Thu Jul 23 2009 Devan Goodwin <dgoodwin(a)redhat.com> 5.9.18-1
+- Remove Requires python-optik. (dgoodwin(a)redhat.com)
+
* Wed Jul 22 2009 Devan Goodwin <dgoodwin(a)redhat.com> 5.9.17-1
- Disable osad selinux for Fedora 11. (dgoodwin(a)redhat.com)
diff --git a/rel-eng/packages/osad b/rel-eng/packages/osad
index 5d08fc4..7d7a99e 100644
--- a/rel-eng/packages/osad
+++ b/rel-eng/packages/osad
@@ -1 +1 @@
-5.9.17-1 client/tools/osad/
+5.9.18-1 client/tools/osad/
commit c4ffe28c7bab3101f379743a13b5ab0c4166c71e
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Thu Jul 23 16:02:40 2009 -0300
Remove osad Requires python-optik.
This is only required for RHEL 4 and earlier, which is not built from
this source code.
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index 621b971..89c15b7 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -17,7 +17,6 @@ BuildRequires: python-devel
Requires: python
Requires: rhnlib >= 1.8-3
Requires: jabberpy
-Requires: python-optik
# This should have been required by rhnlib
Requires: PyXML
%if "%{pythongen}" == "1.5"
14 years, 11 months
schema/spacewalk
by Pradeep Kilambi
schema/spacewalk/rhnsat/tables/rhnChecksumType_data.sql | 2 +-
schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/126-rhnChecksumType_data.sql | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 8c44a17c0fdf5bb35a50c6cc1e6bde9d3db0c892
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Thu Jul 23 15:06:33 2009 -0400
fixing descritpion on checksums
diff --git a/schema/spacewalk/rhnsat/tables/rhnChecksumType_data.sql b/schema/spacewalk/rhnsat/tables/rhnChecksumType_data.sql
index 627d4ee..a788487 100644
--- a/schema/spacewalk/rhnsat/tables/rhnChecksumType_data.sql
+++ b/schema/spacewalk/rhnsat/tables/rhnChecksumType_data.sql
@@ -18,7 +18,7 @@
insert into rhnChecksumType (id, label, description) values
- (rhn_checksum_id_seq.nextval, 'md5', 'md5sum' );
+ (rhn_checksum_id_seq.nextval, 'md5', 'md5' );
insert into rhnChecksumType (id, label, description) values
(rhn_checksum_id_seq.nextval, 'sha1', 'sha' );
insert into rhnChecksumType (id, label, description) values
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/126-rhnChecksumType_data.sql b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/126-rhnChecksumType_data.sql
index 0977588..a788487 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/126-rhnChecksumType_data.sql
+++ b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/126-rhnChecksumType_data.sql
@@ -18,9 +18,9 @@
insert into rhnChecksumType (id, label, description) values
- (rhn_checksum_id_seq.nextval, 'md5', 'md5sum' );
+ (rhn_checksum_id_seq.nextval, 'md5', 'md5' );
insert into rhnChecksumType (id, label, description) values
- (rhn_checksum_id_seq.nextval, 'sha1', 'sha1' );
+ (rhn_checksum_id_seq.nextval, 'sha1', 'sha' );
insert into rhnChecksumType (id, label, description) values
(rhn_checksum_id_seq.nextval, 'sha-256', 'sha256' );
insert into rhnChecksumType (id, label, description) values
14 years, 11 months
java/code schema/spacewalk
by Pradeep Kilambi
java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml | 5
java/code/src/com/redhat/rhn/domain/channel/Channel.java | 39 ++-
java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java | 58 +++--
java/code/src/com/redhat/rhn/domain/channel/test/ChannelFactoryTest.java | 16 +
java/code/src/com/redhat/rhn/domain/common/ChecksumType.hbm.xml | 32 +++
java/code/src/com/redhat/rhn/domain/common/ChecksumType.java | 105 ++++++++++
java/code/src/com/redhat/rhn/domain/common/test/ChecksumTypeTest.java | 42 ++++
java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java | 46 ++--
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 15 +
java/code/src/com/redhat/rhn/manager/channel/CreateChannelCommand.java | 16 +
java/code/src/com/redhat/rhn/manager/channel/UpdateChannelCommand.java | 11 +
java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepomdIndexData.java | 8
java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java | 28 ++
java/code/webapp/WEB-INF/pages/channel/manage/edit.jsp | 13 +
java/code/webapp/WEB-INF/struts-config.xml | 1
schema/spacewalk/rhnsat/tables/rhnChannel.sql | 2
schema/spacewalk/rhnsat/tables/rhnChecksumType.sql | 44 ++++
schema/spacewalk/rhnsat/tables/rhnChecksumType_data.sql | 37 +++
schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/125-rhnChecksumType.sql | 44 ++++
schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/126-rhnChecksumType_data.sql | 37 +++
schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/191-rhnChannel.sql | 7
21 files changed, 548 insertions(+), 58 deletions(-)
New commits:
commit a39bf26b3a479712458f103c7e05bc58c49458e9
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Thu Jul 23 14:30:00 2009 -0400
Sha256 support for channel creation:
- Added the ablility for user to specify a yum repository checksum type at the channel creation time.
- Added a new table lookup table called rhnChecksumType
- Added a new column to rhnChannel checksum_type_id
- Channel creation sets the checksum_type_id and stores it for further lookup for repo generation to pick the user specified checksum.
- Edit channel page should reset the checksum_type_id value and trigger the repo generation with new checksum type.
diff --git a/java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml b/java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml
index f4ecff3..c5ac8f3 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/channel/Channel.hbm.xml
@@ -45,6 +45,11 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
class="com.redhat.rhn.domain.channel.ChannelArch"
column="channel_arch_id"/>
+ <many-to-one
+ name="checksum"
+ class="com.redhat.rhn.domain.common.ChecksumType"
+ column="checksum_type_id"/>
+
<set name="distChannelMaps">
<key column="channel_id"/>
<one-to-many class="com.redhat.rhn.domain.channel.DistChannelMap"/>
diff --git a/java/code/src/com/redhat/rhn/domain/channel/Channel.java b/java/code/src/com/redhat/rhn/domain/channel/Channel.java
index ca5071e..9a40950 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/Channel.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/Channel.java
@@ -20,6 +20,7 @@ import com.redhat.rhn.domain.org.Org;
import com.redhat.rhn.domain.rhnpackage.Package;
import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.domain.user.User;
+import com.redhat.rhn.domain.common.ChecksumType;
import com.redhat.rhn.manager.channel.ChannelManager;
import com.redhat.rhn.manager.system.IncompatibleArchException;
import com.redhat.rhn.manager.system.SystemManager;
@@ -50,8 +51,8 @@ public class Channel extends BaseDomainHelper implements Comparable {
public static final String PUBLIC = "public";
public static final String PROTECTED = "protected";
public static final String PRIVATE = "private";
- private static final String CHECKSUM_SHA_1 = "SHA1";
- private static final String CHECKSUM_SHA_256 = "SHA-256";
+ private static final String CHECKSUM_SHA_1 = "sha1";
+ private static final String CHECKSUM_SHA_256 = "sha-256";
private static List<String> releaseToSkipRepodata = new ArrayList<String>(Arrays
.asList("2.1AS", "2.1ES", "2.1WS", "3AS", "3ES", "3WS", "3Desktop", "4AS",
@@ -63,6 +64,8 @@ public class Channel extends BaseDomainHelper implements Comparable {
.asList("5Server", "5Client"));
private String baseDir;
private ChannelArch channelArch;
+ private ChecksumType checksum;
+
private String description;
private Date endOfLife;
private String GPGKeyUrl;
@@ -159,6 +162,21 @@ public class Channel extends BaseDomainHelper implements Comparable {
public void setChannelArch(ChannelArch c) {
this.channelArch = c;
}
+
+ /**
+ * @return Returns the channelChecksum.
+ */
+ public ChecksumType getChecksum() {
+ return checksum;
+ }
+
+ /**
+ * @param checksumIn The checksum to set.
+ */
+ public void setChecksum(ChecksumType checksumIn) {
+ this.checksum = checksumIn;
+ }
+
/**
* @param compsIn The Comps to set.
@@ -798,12 +816,14 @@ public class Channel extends BaseDomainHelper implements Comparable {
/**
* get the compatible checksum type to be used for repomd.xml
- * based on channel release. If its RHEL-5 we use sha1
- * anything newer will be sha256.
+ * based on channel release.
+ * If its a custom channel use the checksum_type_id from db set at creation time
+ * If its RHEL-5 we use sha1 anything newer will be sha256.
* @return checksumType
*/
public String getChecksumType() {
Channel toConsider = this;
+
while (toConsider.getParentChannel() != null) {
toConsider = toConsider.getParentChannel();
}
@@ -811,13 +831,16 @@ public class Channel extends BaseDomainHelper implements Comparable {
if (channelDist != null) {
String release = channelDist.getRelease();
// If channel or parent is RHEL-5 use sha1, else use sha256
- if (toConsider.isCustom() || sha1compatiblechannels.contains(release)) {
+ if (sha1compatiblechannels.contains(release)) {
return CHECKSUM_SHA_1;
}
- else {
- return CHECKSUM_SHA_256;
- }
}
+
+ // IF its custom use the one set at channel creation time
+ if (toConsider.isCustom()) {
+ return toConsider.getChecksum().getLabel();
+ }
+
// default to sha256
return CHECKSUM_SHA_256;
}
diff --git a/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java b/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
index aff50d6..ec8d52c 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
@@ -14,6 +14,22 @@
*/
package com.redhat.rhn.domain.channel;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.log4j.Logger;
+import org.hibernate.Criteria;
+import org.hibernate.HibernateException;
+import org.hibernate.Session;
+import org.hibernate.criterion.CriteriaSpecification;
+import org.hibernate.criterion.Projections;
+import org.hibernate.criterion.Restrictions;
+
import com.redhat.rhn.common.db.datasource.CallableMode;
import com.redhat.rhn.common.db.datasource.DataResult;
import com.redhat.rhn.common.db.datasource.ModeFactory;
@@ -21,28 +37,13 @@ import com.redhat.rhn.common.db.datasource.SelectMode;
import com.redhat.rhn.common.db.datasource.WriteMode;
import com.redhat.rhn.common.hibernate.HibernateFactory;
import com.redhat.rhn.common.hibernate.HibernateRuntimeException;
+import com.redhat.rhn.domain.common.ChecksumType;
import com.redhat.rhn.domain.kickstart.KickstartableTree;
import com.redhat.rhn.domain.org.Org;
import com.redhat.rhn.domain.rhnpackage.Package;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.manager.channel.ChannelManager;
-import org.apache.log4j.Logger;
-import org.hibernate.Criteria;
-import org.hibernate.HibernateException;
-import org.hibernate.Session;
-import org.hibernate.criterion.CriteriaSpecification;
-import org.hibernate.criterion.Projections;
-import org.hibernate.criterion.Restrictions;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
/**
* ChannelFactory
* @version $Rev$
@@ -223,7 +224,6 @@ public class ChannelFactory extends HibernateFactory {
c.add(Restrictions.in("label", labels));
return c.list();
}
-
/**
* Returns list of channel architectures
@@ -234,7 +234,7 @@ public class ChannelFactory extends HibernateFactory {
Criteria criteria = session.createCriteria(ChannelArch.class);
return criteria.list();
}
-
+
/**
* returns a ChannelArch by label
* @param label ChannelArch label
@@ -530,7 +530,27 @@ public class ChannelFactory extends HibernateFactory {
"KickstartableTree.findTreesForChannel", params);
}
-
+ /**
+ * Find yum supported checksum types
+ * @return List of ChecksumTypes instances
+ */
+ public static List<ChecksumType> listYumSupportedChecksums() {
+ return singleton.listObjectsByNamedQuery(
+ "ChecksumType.loadAllForYum", Collections.EMPTY_MAP);
+ }
+
+ /**
+ * Find checksumtype by label
+ * @param checksum checksum label
+ * @return ChecksumType instance for given label
+ */
+ public static ChecksumType findChecksumByLabel(String checksum) {
+ Map params = new HashMap();
+ params.put("label", checksum);
+ return (ChecksumType)
+ singleton.lookupObjectByNamedQuery("ChecksumType.findByLabel", params);
+ }
+
/**
* Get a list of packages ids that are in a channel
* and in a list of errata. (The errata do not
diff --git a/java/code/src/com/redhat/rhn/domain/channel/test/ChannelFactoryTest.java b/java/code/src/com/redhat/rhn/domain/channel/test/ChannelFactoryTest.java
index a9e9f24..fe901d9 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/test/ChannelFactoryTest.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/test/ChannelFactoryTest.java
@@ -22,6 +22,7 @@ import com.redhat.rhn.domain.channel.ChannelFamily;
import com.redhat.rhn.domain.channel.ChannelFamilyFactory;
import com.redhat.rhn.domain.channel.ClonedChannel;
import com.redhat.rhn.domain.channel.ProductName;
+import com.redhat.rhn.domain.common.ChecksumType;
import com.redhat.rhn.domain.org.Org;
import com.redhat.rhn.domain.rhnpackage.Package;
import com.redhat.rhn.domain.rhnpackage.test.PackageTest;
@@ -382,7 +383,22 @@ public class ChannelFactoryTest extends RhnBaseTestCase {
fileNameChild);
assertNotNull(lookedUpChild);
assertEquals(cp.getId(), lookedUpChild.getId());
+
+ }
+
+ public void testfindChecksumByLabel() {
+ assertNull("Checksum found for null label",
+ ChannelFactory.findChecksumByLabel(null));
+ assertNull("Checksum found for invalid label",
+ ChannelFactory.findChecksumByLabel("some-invalid_checksum"));
+ ChecksumType ct = ChannelFactory.findChecksumByLabel("sha-256");
+ assertNotNull(ct);
+ assertEquals("sha-256", ct.getLabel());
+ ChecksumType ct2 = ChannelFactory.findChecksumByLabel("sha1");
+ assertNotNull(ct2);
+ assertEquals("sha1", ct2.getLabel());
}
+
}
diff --git a/java/code/src/com/redhat/rhn/domain/common/ChecksumType.hbm.xml b/java/code/src/com/redhat/rhn/domain/common/ChecksumType.hbm.xml
new file mode 100644
index 0000000..dea8be7
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/domain/common/ChecksumType.hbm.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-mapping
+PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="com.redhat.rhn.domain.common.ChecksumType"
+ table="rhnChecksumType" mutable="false">
+ <cache usage="read-only"/>
+ <id name="id" type="long" column="id">
+ <meta attribute="scope-set">protected</meta>
+ <generator class="assigned" />
+ </id>
+ <property name="label" type="string" column="label" />
+ <property name="description" type="string" column="description" />
+ <property name="created" type="date" column="created" />
+ <property name="modified" type="date" column="modified" />
+ </class>
+
+ <query name="ChecksumType.loadAll">
+ <![CDATA[from com.redhat.rhn.domain.common.ChecksumType]]>
+ </query>
+ <query name="ChecksumType.loadAllForYum">
+ <![CDATA[from com.redhat.rhn.domain.common.ChecksumType as t
+ where t.label = 'sha-256' or t.label = 'sha1']]>
+ </query>
+ <query name="ChecksumType.findById">
+ <![CDATA[from com.redhat.rhn.domain.common.ChecksumType as t where t.id = :id]]>
+ </query>
+ <query name="ChecksumType.findByLabel">
+ <![CDATA[from com.redhat.rhn.domain.common.ChecksumType as t where t.label = :label]]>
+ </query>
+</hibernate-mapping>
diff --git a/java/code/src/com/redhat/rhn/domain/common/ChecksumType.java b/java/code/src/com/redhat/rhn/domain/common/ChecksumType.java
new file mode 100644
index 0000000..3e41435
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/domain/common/ChecksumType.java
@@ -0,0 +1,105 @@
+/**
+ * Copyright (c) 2009 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+package com.redhat.rhn.domain.common;
+
+import com.redhat.rhn.domain.BaseDomainHelper;
+
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+/**
+ * ArchType
+ * @version $Rev$
+ */
+public class ChecksumType extends BaseDomainHelper {
+
+ private Long id;
+ private String label;
+ private String description;
+
+ /**
+ * @return Returns the id.
+ */
+ public Long getId() {
+ return id;
+ }
+
+ /**
+ * @param i The id to set.
+ */
+ public void setId(Long i) {
+ this.id = i;
+ }
+
+ /**
+ * @return Returns the label.
+ */
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * @param l The label to set.
+ */
+ public void setLabel(String l) {
+ this.label = l;
+ }
+
+ /**
+ * @return Returns the description.
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * @param n The name to set.
+ */
+ public void setDescription(String n) {
+ this.description = n;
+ }
+
+ /** {@inheritDoc} */
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+
+ ChecksumType checksumType = (ChecksumType) o;
+
+ if (id != null ? !id.equals(checksumType.id) : checksumType.id != null) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /** {@inheritDoc} */
+ public int hashCode() {
+ return id != null ? id.hashCode() : 0;
+ }
+
+ /** {@inheritDoc} */
+ public String toString() {
+ ToStringBuilder builder = new ToStringBuilder(this);
+
+ builder.append("id", id);
+ builder.append("label", label);
+
+ return builder.toString();
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/domain/common/test/ChecksumTypeTest.java b/java/code/src/com/redhat/rhn/domain/common/test/ChecksumTypeTest.java
new file mode 100644
index 0000000..a0fd478
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/domain/common/test/ChecksumTypeTest.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2009 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+package com.redhat.rhn.domain.common.test;
+
+import com.redhat.rhn.domain.common.ChecksumType;
+import com.redhat.rhn.testing.RhnBaseTestCase;
+import com.redhat.rhn.testing.TestUtils;
+
+/**
+ * ArchTypeTest
+ * @version $Rev$
+ */
+public class ChecksumTypeTest extends RhnBaseTestCase {
+
+ public void testChecksumType() throws Exception {
+
+ Long testid = new Long(1);
+ String query = "ChecksumType.findById";
+
+ ChecksumType at1 = (ChecksumType) TestUtils.lookupFromCacheById(testid, query);
+ assertNotNull(at1);
+ assertEquals(at1.getId(), testid);
+
+ ChecksumType at2 = (ChecksumType) TestUtils.lookupFromCacheById(at1.getId(), query);
+ assertEquals(at1.getLabel(), at2.getLabel());
+
+ ChecksumType at3 = (ChecksumType) TestUtils.lookupFromCacheById(at1.getId(), query);
+ }
+
+}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java
index 929dfc2..09d500e 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java
@@ -14,6 +14,24 @@
*/
package com.redhat.rhn.frontend.action.channel.manage;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts.action.ActionErrors;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionMessage;
+import org.apache.struts.action.ActionMessages;
+import org.apache.struts.action.DynaActionForm;
+
import com.redhat.rhn.common.db.datasource.DataResult;
import com.redhat.rhn.common.localization.LocalizationService;
import com.redhat.rhn.common.security.PermissionException;
@@ -41,24 +59,6 @@ import com.redhat.rhn.manager.channel.UpdateChannelCommand;
import com.redhat.rhn.manager.system.SystemManager;
import com.redhat.rhn.manager.user.UserManager;
-import org.apache.struts.action.ActionErrors;
-import org.apache.struts.action.ActionForm;
-import org.apache.struts.action.ActionForward;
-import org.apache.struts.action.ActionMapping;
-import org.apache.struts.action.ActionMessage;
-import org.apache.struts.action.ActionMessages;
-import org.apache.struts.action.DynaActionForm;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
/**
* EditChannelAction
@@ -158,6 +158,7 @@ public class EditChannelAction extends RhnAction implements Listable {
request.setAttribute("channel_name", form.getString("name"));
request.setAttribute("channel_arch", form.get("arch_name"));
request.setAttribute("channel_arch_label", form.get("arch"));
+ request.setAttribute("checksum_label", form.get("checksum"));
addErrors(request, errors);
prepDropdowns(new RequestContext(request));
return getStrutsDelegate().forwardParams(
@@ -197,6 +198,7 @@ public class EditChannelAction extends RhnAction implements Listable {
request.setAttribute("label", form.get("label"));
request.setAttribute("parent", form.get("parent"));
request.setAttribute("arch", form.get("arch"));
+ request.setAttribute("checksum", form.get("checksum"));
request.setAttribute("arch_name", form.get("arch_name"));
request.setAttribute("summary", form.get("summary"));
request.setAttribute("description", form.get("description"));
@@ -319,6 +321,7 @@ public class EditChannelAction extends RhnAction implements Listable {
// times where python would make this SOOOO much easier.
UpdateChannelCommand ucc = new UpdateChannelCommand();
ucc.setArchLabel((String)form.get("arch"));
+ ucc.setChecksum((String)form.get("checksum"));
ucc.setLabel((String)form.get("label"));
ucc.setName((String)form.get("name"));
ucc.setSummary((String)form.get("summary"));
@@ -388,6 +391,7 @@ public class EditChannelAction extends RhnAction implements Listable {
// times where python would make this SOOOO much easier.
CreateChannelCommand ccc = new CreateChannelCommand();
ccc.setArchLabel((String)form.get("arch"));
+ ccc.setChecksum((String)form.get("checksum"));
ccc.setLabel((String)form.get("label"));
ccc.setName((String)form.get("name"));
ccc.setSummary((String)form.get("summary"));
@@ -546,6 +550,7 @@ public class EditChannelAction extends RhnAction implements Listable {
form.set("maintainer_phone", c.getMaintainerPhone());
form.set("maintainer_email", c.getMaintainerEmail());
form.set("support_policy", c.getSupportPolicy());
+ form.set("checksum", c.getChecksum().getLabel());
if (c.isGloballySubscribable(ctx.getLoggedInUser().getOrg())) {
form.set("per_user_subscriptions", "all");
}
@@ -569,6 +574,7 @@ public class EditChannelAction extends RhnAction implements Listable {
request.setAttribute("channel_name", c.getName());
request.setAttribute("channel_arch", c.getChannelArch().getName());
request.setAttribute("channel_arch_label", c.getChannelArch().getLabel());
+
}
else {
// default settings
@@ -601,6 +607,10 @@ public class EditChannelAction extends RhnAction implements Listable {
addOption(channelArches, arch.getName(), arch.getLabel());
}
ctx.getRequest().setAttribute("channelArches", channelArches);
+ // set the list of yum supported checksums
+ ctx.getRequest().setAttribute("checksums",
+ ChannelFactory.listYumSupportedChecksums());
+
}
/**
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index aab7a1f..af98b30 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -20940,6 +20940,21 @@ given channel.</source>
<context context-type="sourcefile">/rhn/channels/manage/Edit.do</context>
</context-group>
</trans-unit>
+ <trans-unit id="channel.edit.jsp.checksum">
+ <source>Yum Repository Checksum Type</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/channels/manage/Edit.do</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="channel.edit.jsp.checksumtip">
+ <source><strong> Tip:</strong>
+ sha1 offers the widest compatibility with clients. sha-256 offers higher security,
+ but is compatible only with newer clients: Fedora 11 and newer, or Enterprise Linux 6 and newer.
+ </source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/channels/manage/Edit.do</context>
+ </context-group>
+ </trans-unit>
<trans-unit id="channel.edit.jsp.summary">
<source>Channel Summary</source>
<context-group name="ctx">
diff --git a/java/code/src/com/redhat/rhn/manager/channel/CreateChannelCommand.java b/java/code/src/com/redhat/rhn/manager/channel/CreateChannelCommand.java
index 0b94bfe..a078105 100644
--- a/java/code/src/com/redhat/rhn/manager/channel/CreateChannelCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/channel/CreateChannelCommand.java
@@ -17,6 +17,7 @@ package com.redhat.rhn.manager.channel;
import com.redhat.rhn.domain.channel.Channel;
import com.redhat.rhn.domain.channel.ChannelArch;
import com.redhat.rhn.domain.channel.ChannelFactory;
+import com.redhat.rhn.domain.common.ChecksumType;
import com.redhat.rhn.domain.role.RoleFactory;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.xmlrpc.InvalidChannelLabelException;
@@ -62,6 +63,9 @@ public class CreateChannelCommand {
protected String gpgKeyUrl;
protected String gpgKeyId;
protected String gpgKeyFp;
+ protected String checksum;
+
+
protected String maintainerName;
protected String maintainerEmail;
protected String maintainerPhone;
@@ -77,6 +81,7 @@ public class CreateChannelCommand {
name = null;
summary = null;
archLabel = null;
+ checksum = null;
parentLabel = null;
parentId = null;
}
@@ -103,6 +108,13 @@ public class CreateChannelCommand {
}
/**
+ * @param checksumIn The name to set.
+ */
+ public void setChecksum(String checksumIn) {
+ this.checksum = checksumIn;
+ }
+
+ /**
* @param parentLabelIn The parentLabel to set.
*/
public void setParentLabel(String parentLabelIn) {
@@ -239,6 +251,9 @@ public class CreateChannelCommand {
throw new IllegalArgumentException("Invalid architecture label");
}
+ ChecksumType ct = ChannelFactory.findChecksumByLabel(checksum);
+
+
Channel c = ChannelFactory.createChannel();
c.setLabel(label);
c.setName(name);
@@ -247,6 +262,7 @@ public class CreateChannelCommand {
c.setOrg(user.getOrg());
c.setBaseDir("/dev/null");
c.setChannelArch(ca);
+ c.setChecksum(ct);
c.setGPGKeyId(gpgKeyId);
c.setGPGKeyUrl(gpgKeyUrl);
c.setGPGKeyFp(gpgKeyFp);
diff --git a/java/code/src/com/redhat/rhn/manager/channel/UpdateChannelCommand.java b/java/code/src/com/redhat/rhn/manager/channel/UpdateChannelCommand.java
index 576fcc9..6447deb 100644
--- a/java/code/src/com/redhat/rhn/manager/channel/UpdateChannelCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/channel/UpdateChannelCommand.java
@@ -17,6 +17,7 @@ package com.redhat.rhn.manager.channel;
import com.redhat.rhn.domain.channel.Channel;
import com.redhat.rhn.domain.channel.ChannelFactory;
+import com.redhat.rhn.domain.common.ChecksumType;
import com.redhat.rhn.frontend.xmlrpc.InvalidChannelLabelException;
import com.redhat.rhn.frontend.xmlrpc.InvalidChannelNameException;
import com.redhat.rhn.frontend.xmlrpc.InvalidParentChannelException;
@@ -63,6 +64,15 @@ public class UpdateChannelCommand extends CreateChannelCommand {
if (ChannelFactory.findArchByLabel(archLabel) == null) {
throw new IllegalArgumentException("Invalid architecture label");
}
+
+ ChecksumType ct = ChannelFactory.findChecksumByLabel(checksum);
+
+ if (!ct.getLabel().equals(c.getChecksum().getLabel()) && c.getPackageCount() > 0) {
+ // schedule repo re generation if the checksum type changed
+ // and the channel has packages
+ ChannelManager.queueChannelChange(c.getLabel(),
+ "java::updateChannelCommon", null);
+ }
c.setName(name);
c.setSummary(summary);
@@ -72,6 +82,7 @@ public class UpdateChannelCommand extends CreateChannelCommand {
c.setGPGKeyId(gpgKeyId);
c.setGPGKeyUrl(gpgKeyUrl);
c.setGPGKeyFp(gpgKeyFp);
+ c.setChecksum(ct);
c.setAccess(access);
c.setMaintainerName(maintainerName);
c.setMaintainerEmail(maintainerEmail);
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepomdIndexData.java b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepomdIndexData.java
index a29ff41..bbcffad 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepomdIndexData.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepomdIndexData.java
@@ -27,6 +27,7 @@ public class RepomdIndexData {
private String openChecksum;
private Date timestamp;
private String type;
+
/**
*
@@ -53,12 +54,7 @@ public class RepomdIndexData {
* @param typeIn checksum type
*/
public void setType(String typeIn) {
- if (typeIn == "SHA1") {
- this.type = "sha";
- }
- else if (typeIn == "SHA-256") {
- this.type = "sha256";
- }
+ this.type = typeIn;
}
/**
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
index ab91812..37ba643 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
@@ -56,6 +56,7 @@ public class RepositoryWriter {
private String pathPrefix;
private String mountPoint;
private String checksumtype;
+ private String checksumname;
/**
* Constructor takes in pathprefix and mountpoint
@@ -105,6 +106,9 @@ public class RepositoryWriter {
// Get compatible checksumType
this.checksumtype = channel.getChecksumType();
+ this.checksumname = channel.getChecksum().getDescription();
+
+ log.info("Checksum Type Value" + this.checksumtype);
try {
primaryFile = new CompressingDigestOutputWriter(
@@ -177,18 +181,28 @@ public class RepositoryWriter {
log.info("Starting updateinfo generation for '" + channel.getLabel() +
'"');
+ log.info("Checksum Type Value for generate updateinfo" + this.checksumtype);
RepomdIndexData updateinfoData = generateUpdateinfo(channel, prefix,
this.checksumtype);
RepomdIndexData groupsData = loadCompsFile(channel);
-
+
//Set the type so yum can read and perform checksum
- primaryData.setType(this.checksumtype);
- filelistsData.setType(this.checksumtype);
- otherData.setType(this.checksumtype);
- updateinfoData.setType(this.checksumtype);
- groupsData.setType(this.checksumtype);
-
+ primaryData.setType(this.checksumname);
+ filelistsData.setType(this.checksumname);
+ otherData.setType(this.checksumname);
+ if (updateinfoData != null) {
+ updateinfoData.setType(this.checksumname);
+ }
+
+ if (groupsData != null) {
+ groupsData.setType(this.checksumname);
+ }
+
+ log.info("Primary xml's type" + primaryData.getType());
+ log.info("filelists xml's type" + filelistsData.getType());
+ log.info("other xml's type" + otherData.getType());
+
FileWriter indexFile;
try {
diff --git a/java/code/webapp/WEB-INF/pages/channel/manage/edit.jsp b/java/code/webapp/WEB-INF/pages/channel/manage/edit.jsp
index d7c45e4..57ff58a 100644
--- a/java/code/webapp/WEB-INF/pages/channel/manage/edit.jsp
+++ b/java/code/webapp/WEB-INF/pages/channel/manage/edit.jsp
@@ -93,6 +93,19 @@
</tr>
<tr>
<th nowrap="nowrap">
+ <bean:message key="channel.edit.jsp.checksum"/>:
+ </th>
+ <td class="small-form">
+ <html:select property="checksum">
+ <html:options collection="checksums"
+ property="label"
+ labelProperty="label" />
+ </html:select><br/>
+ <span class="small-text"><bean:message key="channel.edit.jsp.checksumtip"/></span>
+ </td>
+ </tr>
+ <tr>
+ <th nowrap="nowrap">
<rhn:required-field key="channel.edit.jsp.summary"/>:
</th>
<td class="small-form">
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index a7966a9..daa9e20 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -842,6 +842,7 @@
<form-property name="gpg_key_url" type="java.lang.String" />
<form-property name="gpg_key_id" type="java.lang.String" />
<form-property name="gpg_key_fingerprint" type="java.lang.String" />
+ <form-property name="checksum" type="java.lang.String" />
</form-bean>
<form-bean name="channelDeleteForm"
diff --git a/schema/spacewalk/rhnsat/tables/rhnChannel.sql b/schema/spacewalk/rhnsat/tables/rhnChannel.sql
index 95a54dc..b4e1fab 100644
--- a/schema/spacewalk/rhnsat/tables/rhnChannel.sql
+++ b/schema/spacewalk/rhnsat/tables/rhnChannel.sql
@@ -49,6 +49,8 @@ rhnChannel
gpg_key_id varchar2(14),
gpg_key_fp varchar2(50),
end_of_life date,
+ checksum_type_id number constraint rhn_channel_checksum_fk
+ references rhnChecksumType(id),
receiving_updates char(1)
default 'Y'
constraint rhn_channel_ru_nn not null
diff --git a/schema/spacewalk/rhnsat/tables/rhnChecksumType.sql b/schema/spacewalk/rhnsat/tables/rhnChecksumType.sql
new file mode 100644
index 0000000..8d88905
--- /dev/null
+++ b/schema/spacewalk/rhnsat/tables/rhnChecksumType.sql
@@ -0,0 +1,44 @@
+create sequence rhn_checksum_id_seq;
+
+create table
+rhnChecksumType
+(
+ id number
+ constraint rhn_checksumtype_id_nn not null,
+ label varchar2(32)
+ constraint rhn_checksumtype_label_nn not null,
+ description varchar2(64)
+ constraint rhn_checksumtype_desc_nn not null,
+ created date default(sysdate)
+ constraint rhn_checksumtype_creat_nn not null,
+ modified date default(sysdate)
+ constraint rhn_checksumtype_mod_nn not null
+)
+ enable row movement
+ ;
+
+create index rhn_checksumtype_label_id_idx
+ on rhnChecksumType( label, id )
+ tablespace [[64k_tbs]]
+ ;
+alter table rhnChecksumType add constraint rhn_checksumtype_id_pk
+ primary key ( id );
+alter table rhnChecksumType add constraint rhn_checksumtype_label_uq
+ unique ( label );
+
+create or replace trigger
+rhn_checksumtype_mod_trig
+before insert or update on rhnChecksumType
+for each row
+begin
+ :new.modified := sysdate;
+end;
+/
+show errors
+
+--
+--
+-- Revision 1.1 2009/06/26 10:39:17 pkilambi
+-- add schema to hold checksum types
+--
+
diff --git a/schema/spacewalk/rhnsat/tables/rhnChecksumType_data.sql b/schema/spacewalk/rhnsat/tables/rhnChecksumType_data.sql
new file mode 100644
index 0000000..627d4ee
--- /dev/null
+++ b/schema/spacewalk/rhnsat/tables/rhnChecksumType_data.sql
@@ -0,0 +1,37 @@
+--
+-- Copyright (c) 2008 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+--
+--
+--
+
+
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'md5', 'md5sum' );
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'sha1', 'sha' );
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'sha-256', 'sha256' );
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'sha-384', 'sha384' );
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'sha-512', 'sha512' );
+
+commit;
+
+--
+--
+-- Revision 1.1 2009/06/26 11:00:17 pkilambi
+--
+
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/125-rhnChecksumType.sql b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/125-rhnChecksumType.sql
new file mode 100644
index 0000000..8d88905
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/125-rhnChecksumType.sql
@@ -0,0 +1,44 @@
+create sequence rhn_checksum_id_seq;
+
+create table
+rhnChecksumType
+(
+ id number
+ constraint rhn_checksumtype_id_nn not null,
+ label varchar2(32)
+ constraint rhn_checksumtype_label_nn not null,
+ description varchar2(64)
+ constraint rhn_checksumtype_desc_nn not null,
+ created date default(sysdate)
+ constraint rhn_checksumtype_creat_nn not null,
+ modified date default(sysdate)
+ constraint rhn_checksumtype_mod_nn not null
+)
+ enable row movement
+ ;
+
+create index rhn_checksumtype_label_id_idx
+ on rhnChecksumType( label, id )
+ tablespace [[64k_tbs]]
+ ;
+alter table rhnChecksumType add constraint rhn_checksumtype_id_pk
+ primary key ( id );
+alter table rhnChecksumType add constraint rhn_checksumtype_label_uq
+ unique ( label );
+
+create or replace trigger
+rhn_checksumtype_mod_trig
+before insert or update on rhnChecksumType
+for each row
+begin
+ :new.modified := sysdate;
+end;
+/
+show errors
+
+--
+--
+-- Revision 1.1 2009/06/26 10:39:17 pkilambi
+-- add schema to hold checksum types
+--
+
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/126-rhnChecksumType_data.sql b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/126-rhnChecksumType_data.sql
new file mode 100644
index 0000000..0977588
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/126-rhnChecksumType_data.sql
@@ -0,0 +1,37 @@
+--
+-- Copyright (c) 2008 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+-- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+--
+--
+--
+
+
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'md5', 'md5sum' );
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'sha1', 'sha1' );
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'sha-256', 'sha256' );
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'sha-384', 'sha384' );
+insert into rhnChecksumType (id, label, description) values
+ (rhn_checksum_id_seq.nextval, 'sha-512', 'sha512' );
+
+commit;
+
+--
+--
+-- Revision 1.1 2009/06/26 11:00:17 pkilambi
+--
+
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/191-rhnChannel.sql b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/191-rhnChannel.sql
new file mode 100644
index 0000000..8842689
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-0.5-to-spacewalk-schema-0.6/191-rhnChannel.sql
@@ -0,0 +1,7 @@
+-- Add a checksum_type_id column, and fk to rhnChecksumType
+ALTER TABLE rhnChannel
+ ADD checksum_type_id number
+CONSTRAINT rhn_channel_checksum_fk
+ REFERENCES rhnChecksumType(id);
+
+show errors
14 years, 11 months
Branch 'VADER' - backend/server
by Pradeep Kilambi
backend/server/importlib/backend.py | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit aba90a67ac0a9f1c5cd78792a8e26718af579bea
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Thu Jul 23 14:21:11 2009 -0400
513432, 513435 : Our channel family import is written such that we compare and resync the red hat channel families. But in iss case we can have provate channel family ties to a channel ebing imported that will not match whats on the slave as slaves default to org 1. This fix should only post process the channel families if its a non custom one.
diff --git a/backend/server/importlib/backend.py b/backend/server/importlib/backend.py
index fdb737d..39d65f9 100644
--- a/backend/server/importlib/backend.py
+++ b/backend/server/importlib/backend.py
@@ -905,6 +905,11 @@ class Backend:
cf_ids = []
c_ids = []
for cf in channel_families:
+ if 'private-channel-family' in cf['label']:
+ # Its a private channel family and channel family members
+ # will be different from server as this is most likely ISS
+ # sync. Don't compare and delete custom channel families.
+ continue
for cid in cf['channel_ids']:
# Look up channel families for this channel
h_lookup_cfid.execute(channel_id=cid)
14 years, 11 months
backend/server
by Pradeep Kilambi
backend/server/importlib/backend.py | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit c88ce52e8cd8761c66ac236ee415b539fa5a9a00
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Thu Jul 23 14:21:11 2009 -0400
513432, 513435 : Our channel family import is written such that we compare and resync the red hat channel families. But in iss case we can have provate channel family ties to a channel ebing imported that will not match whats on the slave as slaves default to org 1. This fix should only post process the channel families if its a non custom one.
diff --git a/backend/server/importlib/backend.py b/backend/server/importlib/backend.py
index fdb737d..39d65f9 100644
--- a/backend/server/importlib/backend.py
+++ b/backend/server/importlib/backend.py
@@ -905,6 +905,11 @@ class Backend:
cf_ids = []
c_ids = []
for cf in channel_families:
+ if 'private-channel-family' in cf['label']:
+ # Its a private channel family and channel family members
+ # will be different from server as this is most likely ISS
+ # sync. Don't compare and delete custom channel families.
+ continue
for cid in cf['channel_ids']:
# Look up channel families for this channel
h_lookup_cfid.execute(channel_id=cid)
14 years, 11 months