java/spacewalk-java.spec rel-eng/packages
by Tomas Lestach
java/spacewalk-java.spec | 8 +++++++-
rel-eng/packages/spacewalk-java | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
New commits:
commit 11aae4f2eceaf10aee23ecd26b2f0100d8e25872
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Tue Aug 31 17:23:41 2010 +0200
Automatic commit of package [spacewalk-java] release [1.2.19-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index fc6984d..321ddbb 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -19,7 +19,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.2.18
+Version: 1.2.19
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -335,6 +335,12 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Tue Aug 31 2010 Tomas Lestach <tlestach(a)redhat.com> 1.2.19-1
+- 626741 - do not allow two repos with same label or repository url
+ (tlestach(a)redhat.com)
+- As 00-spacewalk-mod_jk.conf which referenced workers.properties is gone,
+ remove it now as well. (jpazdziora(a)redhat.com)
+
* Mon Aug 30 2010 Partha Aji <paji(a)redhat.com> 1.2.18-1
- 628100 - fix for Activation Keys - Config channels issue (paji(a)redhat.com)
- cleaned up KickstartData object a bit (paji(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 75532cd..7b5053b 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.2.18-1 java/
+1.2.19-1 java/
13 years, 8 months
java/code schema/spacewalk
by Tomas Lestach
java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java | 31 +++++
java/code/src/com/redhat/rhn/domain/channel/ContentSource.hbm.xml | 11 +
java/code/src/com/redhat/rhn/frontend/action/channel/manage/repo/RepoDeleteAction.java | 4
java/code/src/com/redhat/rhn/frontend/action/channel/manage/repo/RepoDetailsAction.java | 58 +++++++---
java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml | 6 +
java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/repo/InvalidRepoLabelException.java | 40 ++++++
java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/repo/InvalidRepoUrlException.java | 39 ++++++
java/code/src/com/redhat/rhn/manager/channel/repo/BaseRepoCommand.java | 52 ++++----
java/code/src/com/redhat/rhn/manager/channel/repo/CreateRepoCommand.java | 9 -
java/code/src/com/redhat/rhn/manager/channel/repo/EditRepoCommand.java | 20 +--
schema/spacewalk/common/tables/rhnContentSource.sql | 11 +
schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/053-rhnContectSource.sql | 52 ++++++++
12 files changed, 269 insertions(+), 64 deletions(-)
New commits:
commit 76e23abbf7a17eabb86ec358cf150fa971419438
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Tue Aug 31 17:14:21 2010 +0200
626741 - do not allow two repos with same label or repository url
+ defined sql constraints
+ added upgrade scripts
+ defined necessary checks, excpetions, messages
+ fixed some small repo issues
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 95770ce..d44f730 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java
@@ -158,6 +158,37 @@ public class ChannelFactory extends HibernateFactory {
"ContentSource.findByOrgandChannel", params);
}
+ /**
+ * Lookup a content source by org and label
+ * @param org the org to lookup
+ * @param label repo label
+ * @return the ContentSource(s)
+ */
+ public static List<ContentSource> lookupContentSourceByOrgAndLabel(Org org,
+ String label) {
+ Map params = new HashMap();
+ params.put("org", org);
+ params.put("label", label);
+ return singleton.listObjectsByNamedQuery(
+ "ContentSource.findByOrgAndLabel", params);
+ }
+
+ /**
+ * Lookup a content source by org and repo
+ * @param org the org to lookup
+ * @param repoType repo type
+ * @param repoUrl repo url
+ * @return the ContentSource(s)
+ */
+ public static List<ContentSource> lookupContentSourceByOrgAndRepo(Org org,
+ ContentSourceType repoType, String repoUrl) {
+ Map params = new HashMap();
+ params.put("org", org);
+ params.put("type_id", repoType.getId());
+ params.put("url", repoUrl);
+ return singleton.listObjectsByNamedQuery(
+ "ContentSource.findByOrgAndRepo", params);
+ }
/**
* lookup content source by id and org
diff --git a/java/code/src/com/redhat/rhn/domain/channel/ContentSource.hbm.xml b/java/code/src/com/redhat/rhn/domain/channel/ContentSource.hbm.xml
index 2c4e58e..6c36fc6 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/ContentSource.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/channel/ContentSource.hbm.xml
@@ -47,6 +47,17 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
<query name="ContentSource.findByOrg">
<![CDATA[from com.redhat.rhn.domain.channel.ContentSource as c where c.org = :org]]>
</query>
+ <query name="ContentSource.findByOrgAndLabel">
+ <![CDATA[FROM com.redhat.rhn.domain.channel.ContentSource AS c
+ WHERE c.org = :org
+ AND c.label = :label]]>
+ </query>
+ <query name="ContentSource.findByOrgAndRepo">
+ <![CDATA[FROM com.redhat.rhn.domain.channel.ContentSource AS c
+ WHERE c.org = :org
+ AND c.type.id = :type_id
+ AND c.sourceUrl = :url]]>
+ </query>
<query name="ContentSource.findByOrgandChannel">
<![CDATA[SELECT cs from com.redhat.rhn.domain.channel.ContentSource as cs,
com.redhat.rhn.domain.channel.Channel as c
diff --git a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/repo/RepoDeleteAction.java b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/repo/RepoDeleteAction.java
index e237bfe..7e98fa9 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/repo/RepoDeleteAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/repo/RepoDeleteAction.java
@@ -44,7 +44,7 @@ public class RepoDeleteAction extends RhnAction {
EditRepoCommand cmd = new EditRepoCommand(context.getLoggedInUser(),
context.getParamAsLong("id"));
- ContentSource src = cmd.getNewRepo();
+ ContentSource src = cmd.getRepo();
request.setAttribute(RepoDetailsAction.LABEL, src.getLabel());
request.setAttribute(RepoDetailsAction.URL, src.getSourceUrl());
@@ -54,7 +54,7 @@ public class RepoDeleteAction extends RhnAction {
try {
ChannelFactory.remove(src);
createSuccessMessage(request,
- "repos.delete.success", cmd.getLabel());
+ "repos.delete.success", src.getLabel());
return mapping.findForward("success");
}
catch (ValidatorException ve) {
diff --git a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/repo/RepoDetailsAction.java b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/repo/RepoDetailsAction.java
index 65fae34..029e55b 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/repo/RepoDetailsAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/repo/RepoDetailsAction.java
@@ -20,9 +20,12 @@ import java.util.Map;
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.validator.ValidatorException;
@@ -33,6 +36,8 @@ import com.redhat.rhn.frontend.struts.RequestContext;
import com.redhat.rhn.frontend.struts.RhnAction;
import com.redhat.rhn.frontend.struts.RhnHelper;
import com.redhat.rhn.frontend.struts.RhnValidationHelper;
+import com.redhat.rhn.frontend.xmlrpc.channel.repo.InvalidRepoLabelException;
+import com.redhat.rhn.frontend.xmlrpc.channel.repo.InvalidRepoUrlException;
import com.redhat.rhn.manager.channel.repo.BaseRepoCommand;
import com.redhat.rhn.manager.channel.repo.CreateRepoCommand;
import com.redhat.rhn.manager.channel.repo.EditRepoCommand;
@@ -74,20 +79,29 @@ public class RepoDetailsAction extends RhnAction {
}
else {
try {
- ContentSource repo = submit(request, form);
- if (isCreateMode(request)) {
- createSuccessMessage(request,
- "repos.jsp.create.success", repo.getLabel());
+ ActionErrors errors = new ActionErrors();
+ ContentSource repo = submit(request, errors, form);
+ if (!errors.isEmpty()) {
+ addErrors(request, errors);
+ return getStrutsDelegate().forwardParams(
+ mapping.findForward("default"),
+ new HashMap());
}
else {
- createSuccessMessage(request,
- "repos.jsp.update.success", repo.getLabel());
- }
-
- request.removeAttribute(CREATE_MODE);
- setupRepo(request, form, repo);
- return getStrutsDelegate().forwardParam(mapping.findForward("success"),
- "id", repo.getId().toString());
+ if (isCreateMode(request)) {
+ createSuccessMessage(request,
+ "repos.jsp.create.success", repo.getLabel());
+ }
+ else {
+ createSuccessMessage(request,
+ "repos.jsp.update.success", repo.getLabel());
+ }
+ request.removeAttribute(CREATE_MODE);
+ setupRepo(request, form, repo);
+ return getStrutsDelegate().forwardParam(
+ mapping.findForward("success"), "id",
+ repo.getId().toString());
+ }
}
catch (ValidatorException ve) {
getStrutsDelegate().saveMessages(request, ve.getResult());
@@ -117,7 +131,7 @@ public class RepoDetailsAction extends RhnAction {
RequestContext context = new RequestContext(request);
EditRepoCommand cmd = new EditRepoCommand(context.getLoggedInUser(),
context.getParamAsLong("id"));
- setupRepo(request, form, cmd.getNewRepo());
+ setupRepo(request, form, cmd.getRepo());
}
private void setupRepo(HttpServletRequest request, DynaActionForm form,
@@ -138,7 +152,8 @@ public class RepoDetailsAction extends RhnAction {
request.setAttribute(REPO, repo);
}
- private ContentSource submit(HttpServletRequest request, DynaActionForm form) {
+ private ContentSource submit(HttpServletRequest request, ActionErrors errors,
+ DynaActionForm form) {
RequestContext context = new RequestContext(request);
String url = form.getString(URL);
String label = form.getString(LABEL);
@@ -154,8 +169,19 @@ public class RepoDetailsAction extends RhnAction {
repoCmd.setLabel(label);
repoCmd.setUrl(url);
- repoCmd.store();
- return repoCmd.getNewRepo();
+ try {
+ repoCmd.store();
+ }
+ catch (InvalidRepoUrlException e) {
+ errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
+ "edit.channel.repo.repourlinuse", null));
+ }
+ catch (InvalidRepoLabelException e) {
+ errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
+ "edit.channel.repo.repolabelinuse", repoCmd.getLabel()));
+ }
+
+ return repoCmd.getRepo();
}
}
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
index 57ecfef..c1e6408 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
@@ -8578,6 +8578,12 @@ Follow this url to see the full list of inactive systems:
<trans-unit id="channel.edit.repo.updated">
<source>{0} repository information was successfully updated</source>
</trans-unit>
+ <trans-unit id="edit.channel.repo.repolabelinuse">
+ <source>The repository label '{0}' is already in use, please choose a different label</source>
+ </trans-unit>
+ <trans-unit id="edit.channel.repo.repourlinuse">
+ <source>There's already a defined repository with given url, please reuse it.</source>
+ </trans-unit>
<trans-unit id="ssm.provision.scheduled">
<source>Successfully scheduled {0} system(s) for provisioning.</source>
</trans-unit>
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/repo/InvalidRepoLabelException.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/repo/InvalidRepoLabelException.java
new file mode 100644
index 0000000..c8175eb
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/repo/InvalidRepoLabelException.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) 2010 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.frontend.xmlrpc.channel.repo;
+
+import com.redhat.rhn.FaultException;
+
+
+/**
+ * InvalidRepoLabelException
+ * @version $Rev$
+ */
+public class InvalidRepoLabelException extends FaultException {
+
+ /**
+ * Comment for <code>serialVersionUID</code>
+ */
+ private static final long serialVersionUID = -8506595413724954752L;
+
+ /**
+ * Constructor
+ * @param repoLabel Repository label already in use
+ */
+ public InvalidRepoLabelException(String repoLabel) {
+ super(2, "Repo label already in use", "edit.channel.repo.repolabelinuse",
+ new Object[] {repoLabel});
+ }
+
+}
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/repo/InvalidRepoUrlException.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/repo/InvalidRepoUrlException.java
new file mode 100644
index 0000000..bba9056
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/repo/InvalidRepoUrlException.java
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2010 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.frontend.xmlrpc.channel.repo;
+
+import com.redhat.rhn.FaultException;
+
+
+/**
+ * InvalidRepoUrlException
+ * @version $Rev$
+ */
+public class InvalidRepoUrlException extends FaultException {
+
+ /**
+ * Comment for <code>serialVersionUID</code>
+ */
+ private static final long serialVersionUID = 7189002795067633123L;
+
+ /**
+ * Constructor
+ * @param repoUrl Repository url already in use
+ */
+ public InvalidRepoUrlException(String repoUrl) {
+ super(1, "Repo url already defined", "edit.channel.repo.repourlinuse",
+ new Object[] {repoUrl});
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/manager/channel/repo/BaseRepoCommand.java b/java/code/src/com/redhat/rhn/manager/channel/repo/BaseRepoCommand.java
index f620c24..849459e 100644
--- a/java/code/src/com/redhat/rhn/manager/channel/repo/BaseRepoCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/channel/repo/BaseRepoCommand.java
@@ -14,13 +14,14 @@
*/
package com.redhat.rhn.manager.channel.repo;
-import java.util.ArrayList;
import java.util.List;
import com.redhat.rhn.common.validator.ValidatorError;
import com.redhat.rhn.domain.channel.ChannelFactory;
import com.redhat.rhn.domain.channel.ContentSource;
import com.redhat.rhn.domain.org.Org;
+import com.redhat.rhn.frontend.xmlrpc.channel.repo.InvalidRepoLabelException;
+import com.redhat.rhn.frontend.xmlrpc.channel.repo.InvalidRepoUrlException;
/**
* CreateRepoCommand - Command to create a repo
@@ -91,39 +92,38 @@ public class BaseRepoCommand {
/**
* Check for errors and store Org to db.
- * @return ValidatorError[] array if there are errors
+ * @throws InvalidRepoUrlException in case repo wih given url already exists
+ * in the org
+ * @throws InvalidRepoLabelException in case repo witch given label already exists
+ * in the org
*/
- public ValidatorError[] store() {
- ValidatorError[] errorst = validate();
- if (errorst != null && errorst.length > 0) {
- return errorst;
- }
- else {
- // Create repo
+ public void store() throws InvalidRepoUrlException, InvalidRepoLabelException {
+ repo.setOrg(org);
+ repo.setType(ChannelFactory.CONTENT_SOURCE_TYPE_YUM);
+
+ if (!this.label.equals(repo.getLabel())) {
+ if (!ChannelFactory.lookupContentSourceByOrgAndLabel(org, label).isEmpty()) {
+ throw new InvalidRepoLabelException(label);
+ }
repo.setLabel(this.label);
+ }
+
+ if (!this.url.equals(repo.getSourceUrl())) {
+ if (!ChannelFactory.lookupContentSourceByOrgAndRepo(org,
+ ChannelFactory.CONTENT_SOURCE_TYPE_YUM, url).isEmpty()) {
+ throw new InvalidRepoUrlException(url);
+ }
repo.setSourceUrl(this.url);
- repo.setType(ChannelFactory.CONTENT_SOURCE_TYPE_YUM);
- ChannelFactory.save(repo);
}
- return null;
- }
- /**
- * Get the newly created org.
- * @return Org that was stored to DB
- */
- public ContentSource getNewRepo() {
- return this.repo;
+ ChannelFactory.save(repo);
}
/**
- * Validates the repo object.
- * @return an Object array of ValidatorErrors.
+ * Get the repo
+ * @return repo
*/
- public ValidatorError[] validate() {
- errors = new ArrayList(); //clear validation errors
- return (ValidatorError[]) errors.toArray(new ValidatorError[0]);
+ public ContentSource getRepo() {
+ return this.repo;
}
-
-
}
diff --git a/java/code/src/com/redhat/rhn/manager/channel/repo/CreateRepoCommand.java b/java/code/src/com/redhat/rhn/manager/channel/repo/CreateRepoCommand.java
index 8e4a0f5..772fb9e 100644
--- a/java/code/src/com/redhat/rhn/manager/channel/repo/CreateRepoCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/channel/repo/CreateRepoCommand.java
@@ -28,9 +28,8 @@ public class CreateRepoCommand extends BaseRepoCommand {
* @param orgIn org for repo
*/
public CreateRepoCommand(Org orgIn) {
- super();
- this.repo = ChannelFactory.createRepo();
- this.repo.setOrg(orgIn);
- }
-
+ super();
+ this.setOrg(orgIn);
+ this.repo = ChannelFactory.createRepo();
+ }
}
diff --git a/java/code/src/com/redhat/rhn/manager/channel/repo/EditRepoCommand.java b/java/code/src/com/redhat/rhn/manager/channel/repo/EditRepoCommand.java
index ad0ee68..62faa74 100644
--- a/java/code/src/com/redhat/rhn/manager/channel/repo/EditRepoCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/channel/repo/EditRepoCommand.java
@@ -23,14 +23,14 @@ import com.redhat.rhn.domain.user.User;
*/
public class EditRepoCommand extends BaseRepoCommand {
- /**
- *
- * @param currentUser logged in user
- * @param repoId id of content source object
- */
- public EditRepoCommand(User currentUser, Long repoId) {
- super();
- this.repo = ChannelFactory.lookupContentSource(repoId, currentUser.getOrg());
- }
-
+ /**
+ *
+ * @param currentUser logged in user
+ * @param repoId id of content source object
+ */
+ public EditRepoCommand(User currentUser, Long repoId) {
+ super();
+ this.setOrg(currentUser.getOrg());
+ this.repo = ChannelFactory.lookupContentSource(repoId, currentUser.getOrg());
+ }
}
diff --git a/schema/spacewalk/common/tables/rhnContentSource.sql b/schema/spacewalk/common/tables/rhnContentSource.sql
index 347aa12..dc93a27 100644
--- a/schema/spacewalk/common/tables/rhnContentSource.sql
+++ b/schema/spacewalk/common/tables/rhnContentSource.sql
@@ -38,9 +38,10 @@ rhnContentSource
create sequence rhn_chan_content_src_id_seq start with 500;
-
-create unique index rhn_cs_uq
- on rhnContentSource(id, type_id, source_url)
- tablespace [[64k_tbs]]
- ;
+CREATE UNIQUE INDEX rhn_cs_label_uq
+ ON rhnContentSource(org_id, label)
+ tablespace [[64k_tbs]];
+CREATE UNIQUE INDEX rhn_cs_repo_uq
+ ON rhnContentSource(org_id, type_id, source_url)
+ tablespace [[64k_tbs]];
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/053-rhnContectSource.sql b/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/053-rhnContectSource.sql
new file mode 100644
index 0000000..f7dea7d
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/053-rhnContectSource.sql
@@ -0,0 +1,52 @@
+DROP INDEX rhn_cs_uq;
+
+
+BEGIN
+FOR i IN
+ (SELECT cs.id, keep.min_id
+ FROM rhnContentSource cs,
+ (SELECT org_id, type_id, source_url, min(id) min_id
+ FROM rhnContentSource
+ GROUP BY org_id, type_id, source_url
+ HAVING count(*) > 1) keep
+ WHERE cs.org_id = keep.org_id
+ AND cs.type_id = keep.type_id
+ AND cs.source_url = keep.source_url
+ AND cs.id > keep.min_id)
+LOOP
+-- remap duplicate repo referencies in rhnChannelContentSource to the lowest one
+ DELETE FROM rhnChannelContentSource
+ WHERE source_id = i.id
+ AND EXISTS
+ (SELECT 1 FROM rhnChannelContentSource
+ WHERE source_id = i.min_id);
+ UPDATE rhnChannelContentSource
+ SET source_id = i.min_id
+ WHERE source_id = i.id;
+-- delete repo duplicates
+ DELETE FROM rhnContentSource
+ WHERE id = i.id;
+END LOOP;
+END;
+/
+
+-- rename label duplicates
+UPDATE rhnContentSource cs
+ SET label = cs.label || cs.id
+ WHERE cs.id IN
+ (SELECT id FROM rhnContentSource cs,
+ (SELECT org_id, label, min(id) min_id
+ FROM rhnContentSource
+ GROUP BY org_id, label
+ HAVING count(*) > 1) keep
+ WHERE cs.org_id = keep.org_id
+ AND cs.label = keep.label
+ AND cs.id > keep.min_id);
+
+
+CREATE UNIQUE INDEX rhn_cs_label_uq
+ ON rhnContentSource(org_id, label)
+ tablespace [[64k_tbs]];
+CREATE UNIQUE INDEX rhn_cs_repo_uq
+ ON rhnContentSource(org_id, type_id, source_url)
+ tablespace [[64k_tbs]];
13 years, 8 months
spacewalk/setup
by Jan Pazdziora
spacewalk/setup/share/server.xml.xsl | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 78a69fafa3e3d97535cf7efb6727bb26198d8bfe
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Aug 31 17:16:00 2010 +0200
594513 - only listen on localhost (connectors at 8080 and 8009).
diff --git a/spacewalk/setup/share/server.xml.xsl b/spacewalk/setup/share/server.xml.xsl
index a0292b8..aeb034d 100644
--- a/spacewalk/setup/share/server.xml.xsl
+++ b/spacewalk/setup/share/server.xml.xsl
@@ -13,6 +13,7 @@
<xsl:element name="Connector">
<xsl:copy-of select="@*" />
<xsl:attribute name="URIEncoding">UTF-8</xsl:attribute>
+ <xsl:attribute name="address">127.0.0.1</xsl:attribute>
</xsl:element>
</xsl:template>
13 years, 8 months
2 commits - java/conf spacewalk/config
by Jan Pazdziora
java/conf/workers.properties | 8 ----
spacewalk/config/etc/httpd/conf.d/00-spacewalk-mod_jk.conf | 19 ----------
spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf | 4 ++
spacewalk/config/etc/rhn/satellite-httpd/conf/workers.properties | 8 ----
spacewalk/config/spacewalk-config.spec | 2 -
5 files changed, 4 insertions(+), 37 deletions(-)
New commits:
commit 6402d9916a65e5283a0c80f658871c74bf95e126
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Aug 31 17:00:49 2010 +0200
As 00-spacewalk-mod_jk.conf which referenced workers.properties is gone, remove it now as well.
diff --git a/java/conf/workers.properties b/java/conf/workers.properties
deleted file mode 100644
index e266824..0000000
--- a/java/conf/workers.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-workers.tomcat.home=/usr/share/tomcat5
-
-worker.list=ajp13
-
-worker.ajp13.port=8009
-worker.ajp13.host=localhost
-worker.ajp13.type=ajp13
-
diff --git a/spacewalk/config/etc/rhn/satellite-httpd/conf/workers.properties b/spacewalk/config/etc/rhn/satellite-httpd/conf/workers.properties
deleted file mode 100644
index e266824..0000000
--- a/spacewalk/config/etc/rhn/satellite-httpd/conf/workers.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-workers.tomcat.home=/usr/share/tomcat5
-
-worker.list=ajp13
-
-worker.ajp13.port=8009
-worker.ajp13.host=localhost
-worker.ajp13.type=ajp13
-
diff --git a/spacewalk/config/spacewalk-config.spec b/spacewalk/config/spacewalk-config.spec
index 78d424d..777f9c3 100644
--- a/spacewalk/config/spacewalk-config.spec
+++ b/spacewalk/config/spacewalk-config.spec
@@ -60,7 +60,6 @@ rm -rf $RPM_BUILD_ROOT
%attr(0755,root,root) %{_sysconfdir}/rhn/satellite-httpd/conf/startup.pl
%config(noreplace) %{_sysconfdir}/rhn/satellite-httpd/conf/rhn/rhn_monitoring.conf
%config(noreplace) %{_sysconfdir}/httpd/conf.d/zz-spacewalk-www.conf
-%config(noreplace) %{_sysconfdir}/rhn/satellite-httpd/conf/workers.properties
%config(noreplace) %{_sysconfdir}/webapp-keyring.gpg
%config(noreplace) %{_var}/lib/cobbler/kickstarts/spacewalk-sample.ks
%config(noreplace) %{_var}/lib/cobbler/snippets/spacewalk_file_preservation
commit 90d53bd2b1542543e603a24453d7dfc8e9eb9d4b
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Aug 31 16:55:57 2010 +0200
The 00-spacewalk-mod_jk.conf is no more needed as all Spacewalks are now on Apache 2.2+.
We needed to move loading of mod_version to zz-spacewalk-www.conf thou.
diff --git a/spacewalk/config/etc/httpd/conf.d/00-spacewalk-mod_jk.conf b/spacewalk/config/etc/httpd/conf.d/00-spacewalk-mod_jk.conf
deleted file mode 100644
index 6ed2090..0000000
--- a/spacewalk/config/etc/httpd/conf.d/00-spacewalk-mod_jk.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-<IfModule !mod_version.c>
-LoadModule version_module modules/mod_version.so
-</IfModule>
-
-<IfVersion < 2.1>
- LoadModule jk_module modules/mod_jk.so
-</IfVersion>
-
-<IfModule mod_jk.c>
- JkWorkersFile /etc/rhn/satellite-httpd/conf/workers.properties
- JkLogLevel info
- JkLogFile /var/log/httpd/mod_jk.log
- JkMount /rhn/* ajp13
- JkMount /rhn ajp13
- JkMount /*.do ajp13
- JkMount /*.jsp ajp13
- JkHTTPSIndicator HTTPS
-</IfModule>
-
diff --git a/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf b/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf
index 928f893..e9d3619 100644
--- a/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf
+++ b/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf
@@ -55,6 +55,10 @@ AddType text/pxt .pxt
Satisfy All
</Files>
+<IfModule !mod_version.c>
+LoadModule version_module modules/mod_version.so
+</IfModule>
+
<IfVersion >= 2.1>
<IfModule !proxy_ajp_module>
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
diff --git a/spacewalk/config/spacewalk-config.spec b/spacewalk/config/spacewalk-config.spec
index d37aeb0..78d424d 100644
--- a/spacewalk/config/spacewalk-config.spec
+++ b/spacewalk/config/spacewalk-config.spec
@@ -60,7 +60,6 @@ rm -rf $RPM_BUILD_ROOT
%attr(0755,root,root) %{_sysconfdir}/rhn/satellite-httpd/conf/startup.pl
%config(noreplace) %{_sysconfdir}/rhn/satellite-httpd/conf/rhn/rhn_monitoring.conf
%config(noreplace) %{_sysconfdir}/httpd/conf.d/zz-spacewalk-www.conf
-%config(noreplace) %{_sysconfdir}/httpd/conf.d/00-spacewalk-mod_jk.conf
%config(noreplace) %{_sysconfdir}/rhn/satellite-httpd/conf/workers.properties
%config(noreplace) %{_sysconfdir}/webapp-keyring.gpg
%config(noreplace) %{_var}/lib/cobbler/kickstarts/spacewalk-sample.ks
13 years, 8 months
branding/templates
by Colin Coe
branding/templates/footer.pxt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit a3ecb3a91e53dc54f5f3cd15a3f2bf865db5f045
Author: Colin Coe <coec(a)war.coesta.com>
Date: Tue Aug 31 20:43:36 2010 +0800
567885 - "Spacewalk release 0.9" leads to 404
diff --git a/branding/templates/footer.pxt b/branding/templates/footer.pxt
index 0a059b5..ba15734 100644
--- a/branding/templates/footer.pxt
+++ b/branding/templates/footer.pxt
@@ -6,7 +6,7 @@
<div id="footer">
Copyright © 2002-10 Red Hat, Inc. All rights reserved. <a href="https://www.redhat.com/legal/privacy_statement.html">Privacy statement</a> : <a href="http://www.redhat.com/legal/legal_statement.html">Legal statement</a> : <a href="http://www.redhat.com/">redhat.com</a>
<div style="color: black">
- Spacewalk release <a href="/rhn/help/release-notes/satellite/index.jsp"><pxt-config var="version" /></a>
+ Spacewalk release <a href="/rhn/help/dispatcher/release_notes"><pxt-config var="version" /></a>
</div>
<p><rhn-bugzilla-link /></p>
</div>
13 years, 8 months
Changes to 'refs/tags/rhn-client-tools-1.2.6-1'
by Jan Pazdziora
Tag 'rhn-client-tools-1.2.6-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2010-08-31 12:08 +0000
Tagging package [rhn-client-tools] version [1.2.6-1] in directory [client/rhel/rhn-client-tools/].
Changes since rhn-client-tools-1.2.5-1:
Jan Pazdziora (2):
603028 - when checking package architecture during errata update, allow transition to and from noarch.
Automatic commit of package [rhn-client-tools] release [1.2.6-1].
---
client/rhel/rhn-client-tools/rhn-client-tools.spec | 6 +++++-
client/rhel/rhn-client-tools/src/actions/errata.py | 4 ++++
rel-eng/packages/rhn-client-tools | 2 +-
3 files changed, 10 insertions(+), 2 deletions(-)
---
13 years, 8 months
client/rhel rel-eng/packages
by Jan Pazdziora
client/rhel/rhn-client-tools/rhn-client-tools.spec | 6 +++++-
rel-eng/packages/rhn-client-tools | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit de1574df90291f3ed26edcddb43e9fa93f4f865a
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Aug 31 14:08:06 2010 +0200
Automatic commit of package [rhn-client-tools] release [1.2.6-1].
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 13e80f4..046ecbf 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.2.5
+Version: 1.2.6
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -281,6 +281,10 @@ make -f Makefile.rhn-client-tools test
%endif
%changelog
+* Tue Aug 31 2010 Jan Pazdziora 1.2.6-1
+- 603028 - when checking package architecture during errata update, allow
+ transition to and from noarch.
+
* Tue Aug 31 2010 Michael Mraka <michael.mraka(a)redhat.com> 1.2.5-1
- 621135 - report resonable cpuinfo in s390(x)
diff --git a/rel-eng/packages/rhn-client-tools b/rel-eng/packages/rhn-client-tools
index befd0fa..d495483 100644
--- a/rel-eng/packages/rhn-client-tools
+++ b/rel-eng/packages/rhn-client-tools
@@ -1 +1 @@
-1.2.5-1 client/rhel/rhn-client-tools/
+1.2.6-1 client/rhel/rhn-client-tools/
13 years, 8 months
client/rhel
by Jan Pazdziora
client/rhel/rhn-client-tools/src/actions/errata.py | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 4da050d299f45cfdaaad643eff8be750eb9a8555
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Aug 31 13:55:09 2010 +0200
603028 - when checking package architecture during errata update, allow transition to and from noarch.
diff --git a/client/rhel/rhn-client-tools/src/actions/errata.py b/client/rhel/rhn-client-tools/src/actions/errata.py
index 6d928bf..74236e8 100644
--- a/client/rhel/rhn-client-tools/src/actions/errata.py
+++ b/client/rhel/rhn-client-tools/src/actions/errata.py
@@ -49,6 +49,10 @@ def update(errataidlist, cache_only=None):
for p in packagelist:
if current_packages_with_arch.has_key(p[0]+p[4]):
u[p[0]+p[4]] = p
+ elif current_packages_with_arch.has_key(p[0]+"noarch"):
+ u[p[0]+p[4]] = p
+ elif p[4] == "noarch" and current_packages.has_key(p[0]):
+ u[p[0]] = p
else:
# 5.2 and older sats + hosted dont send arch
for p in packagelist:
13 years, 8 months
Changes to 'refs/tags/rhn-client-tools-1.2.5-1'
by Michael Mraka
Tag 'rhn-client-tools-1.2.5-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-08-31 11:30 +0000
Tagging package [rhn-client-tools] version [1.2.5-1] in directory [client/rhel/rhn-client-tools/].
Changes since spacewalk-java-1.2.18-1:
Jan Pazdziora (1):
628640 - turn the wrapper into java_t upon runtime, it calls java anyway.
Michael Mraka (2):
621135 - report resonable cpuinfo in s390(x)
Automatic commit of package [rhn-client-tools] release [1.2.5-1].
ttrinks (1):
l10n: Updates to German (de) translation
---
client/rhel/rhn-client-tools/po/de.po | 1121 +++---------
client/rhel/rhn-client-tools/rhn-client-tools.spec | 5
client/rhel/rhn-client-tools/src/up2date_client/hardware.py | 22
rel-eng/packages/rhn-client-tools | 2
selinux/spacewalk-selinux/spacewalk-selinux-enable | 2
selinux/spacewalk-selinux/spacewalk-selinux.spec | 4
selinux/spacewalk-selinux/spacewalk.fc | 2
7 files changed, 329 insertions(+), 829 deletions(-)
---
13 years, 8 months
client/rhel rel-eng/packages
by Michael Mraka
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 4b1a6aac873bd9e256f00e10d37d2fcf4c839d44
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Aug 31 13:30:35 2010 +0200
Automatic commit of package [rhn-client-tools] release [1.2.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 c773bd7..13e80f4 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.2.4
+Version: 1.2.5
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -281,6 +281,9 @@ make -f Makefile.rhn-client-tools test
%endif
%changelog
+* Tue Aug 31 2010 Michael Mraka <michael.mraka(a)redhat.com> 1.2.5-1
+- 621135 - report resonable cpuinfo in s390(x)
+
* Mon Aug 30 2010 Michael Mraka <michael.mraka(a)redhat.com> 1.2.4-1
- 559797 - fixed configuration file name
- Sort the available channels so that the listing is not random.
diff --git a/rel-eng/packages/rhn-client-tools b/rel-eng/packages/rhn-client-tools
index 5a801e0..befd0fa 100644
--- a/rel-eng/packages/rhn-client-tools
+++ b/rel-eng/packages/rhn-client-tools
@@ -1 +1 @@
-1.2.4-1 client/rhel/rhn-client-tools/
+1.2.5-1 client/rhel/rhn-client-tools/
13 years, 8 months