Changes to 'refs/tags/spacewalk-java-0.9.6-1'
by Justin Sherrill
Tag 'spacewalk-java-0.9.6-1' created by Justin Sherrill <jsherril(a)redhat.com> at 2010-02-15 20:49 +0000
Tagging package [spacewalk-java] version [0.9.6-1] in directory [java/].
Changes since spacewalk-utils-0.9.1-1:
Jan Pazdziora (5):
rpcServer not used in tui, removing the import.
Change 0ec1a12e made import stat not needed, removing.
up2dateUtils not used in gui, removing the import.
Remove trailing spaces in gui.py.
types and libxml2 not called in hardware, removing the imports.
Justin Sherrill (2):
Automatic commit of package [spacewalk-java] release [0.9.5-1].
Automatic commit of package [spacewalk-java] release [0.9.6-1].
Michael Mraka (2):
added centos4 and epel4 to spacewalk-common-channels.ini
removed debug code
Tomas Lestach (2):
562559 - extending channel.software.getDetails API call
562463 - adding one more channel.software.create API call
---
client/rhel/rhn-client-tools/src/up2date_client/gui.py | 97 ++++-----
client/rhel/rhn-client-tools/src/up2date_client/hardware.py | 3
client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py | 1
client/rhel/rhn-client-tools/src/up2date_client/tui.py | 1
java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java | 98 +++++++++-
java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ChannelSerializer.java | 34 ++-
java/spacewalk-java.spec | 14 +
rel-eng/packages/spacewalk-java | 2
utils/spacewalk-common-channels | 7
utils/spacewalk-common-channels.ini | 69 +++++--
10 files changed, 234 insertions(+), 92 deletions(-)
---
14 years, 3 months
Changes to 'refs/tags/spacewalk-java-0.9.5-1'
by Justin Sherrill
Tag 'spacewalk-java-0.9.5-1' created by Justin Sherrill <jsherril(a)redhat.com> at 2010-02-15 20:49 +0000
Tagging package [spacewalk-java] version [0.9.5-1] in directory [java/].
Changes since rhnlib-2.5.22-1:
Justin Sherrill (3):
510100 - adding the ability to set a config file to a certain revision
changing new rev number to be one more than latest, not one more than current
Automatic commit of package [spacewalk-java] release [0.9.5-1].
---
java/code/src/com/redhat/rhn/frontend/action/configuration/ConfigFileForm.java | 4 +
java/code/src/com/redhat/rhn/frontend/action/configuration/files/FileDetailsAction.java | 3
java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml | 6 +
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 6 +
java/code/src/com/redhat/rhn/manager/configuration/ConfigFileBuilder.java | 32 ++++++++++
java/code/src/com/redhat/rhn/manager/configuration/file/ConfigFileData.java | 17 +++++
java/code/webapp/WEB-INF/pages/common/fragments/configuration/files/details.jspf | 9 ++
java/code/webapp/WEB-INF/struts-config.xml | 1
java/spacewalk-java.spec | 14 ++++
rel-eng/packages/spacewalk-java | 2
10 files changed, 91 insertions(+), 3 deletions(-)
---
14 years, 3 months
2 commits - java/spacewalk-java.spec rel-eng/packages
by Justin Sherrill
java/spacewalk-java.spec | 14 +++++++++++++-
rel-eng/packages/spacewalk-java | 2 +-
2 files changed, 14 insertions(+), 2 deletions(-)
New commits:
commit 802c50c814e90b7b6cb95af5751b637ad8fcf8e5
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Feb 15 15:49:54 2010 -0500
Automatic commit of package [spacewalk-java] release [0.9.6-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index d934a05..8e9d1f7 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: 0.9.5
+Version: 0.9.6
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -304,7 +304,7 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
-* Mon Feb 15 2010 Justin Sherrill <jsherril(a)redhat.com> 0.9.5-1
+* Mon Feb 15 2010 Justin Sherrill <jsherril(a)redhat.com> 0.9.6-1
- changing new rev number to be one more than latest, not one more than current
(jsherril(a)redhat.com)
- 510100 - adding the ability to set a config file to a certain revision
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 197f748..6bf7d15 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-0.9.5-1 java/
+0.9.6-1 java/
commit 9cb74f258fdd8fd9328f3a45c455fd683c17df19
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Feb 15 15:49:22 2010 -0500
Automatic commit of package [spacewalk-java] release [0.9.5-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 13eb1aa..d934a05 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: 0.9.4
+Version: 0.9.5
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -304,6 +304,18 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Mon Feb 15 2010 Justin Sherrill <jsherril(a)redhat.com> 0.9.5-1
+- changing new rev number to be one more than latest, not one more than current
+ (jsherril(a)redhat.com)
+- 510100 - adding the ability to set a config file to a certain revision
+ (jsherril(a)redhat.com)
+- making timezone still null errors a bit quieter. Maybe once we really add
+ all the timezones we can really do a warning (jsherril(a)redhat.com)
+- Automatic commit of package [spacewalk-java] release [0.9.4-1].
+ (jsherril(a)redhat.com)
+- fixing rhn.xml for tomcat6 (jsherril(a)redhat.com)
+- 562881 - new api calls introduced (tlestach(a)redhat.com)
+
* Thu Feb 11 2010 Justin Sherrill <jsherril(a)redhat.com> 0.9.4-1
- adding snippet api unit tests (jsherril(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 66dd0a1..197f748 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-0.9.4-1 java/
+0.9.5-1 java/
14 years, 3 months
2 commits - java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java | 98 +++++++++-
java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ChannelSerializer.java | 34 ++-
2 files changed, 119 insertions(+), 13 deletions(-)
New commits:
commit 2e32402b98827780c9e21e0a7fbff687f31f8691
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 15 19:53:28 2010 +0100
562463 - adding one more channel.software.create API call
to be able to set:
repository url
repository label
sync repo
gpg key url
gpg key id
gpg key fingerprint
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java
index 27931c3..e91dbd9 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java
@@ -26,6 +26,7 @@ import com.redhat.rhn.common.security.PermissionException;
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.channel.ContentSource;
import com.redhat.rhn.domain.channel.InvalidChannelRoleException;
import com.redhat.rhn.domain.channel.NewChannelHelper;
import com.redhat.rhn.domain.errata.Errata;
@@ -37,6 +38,7 @@ import com.redhat.rhn.domain.role.Role;
import com.redhat.rhn.domain.role.RoleFactory;
import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.domain.server.ServerFactory;
+import com.redhat.rhn.domain.task.TaskFactory;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.dto.ErrataOverview;
import com.redhat.rhn.frontend.events.UpdateErrataCacheEvent;
@@ -61,6 +63,7 @@ import com.redhat.rhn.manager.errata.cache.ErrataCacheManager;
import com.redhat.rhn.manager.system.IncompatibleArchException;
import com.redhat.rhn.manager.system.SystemManager;
import com.redhat.rhn.manager.user.UserManager;
+import com.redhat.rhn.taskomatic.task.RepoSyncTask;
import com.redhat.rhn.taskomatic.task.TaskConstants;
import org.apache.commons.lang.BooleanUtils;
@@ -561,7 +564,7 @@ public class ChannelSoftwareHandler extends BaseHandler {
* #options_end()
* @xmlrpc.param #param_desc("string", "parentLabel", "label of the parent of this
* channel, an empty string if it does not have one")
- * @xmlrpc.param #param_desc("string", "checksumtype", "checksum type for this channel,
+ * @xmlrpc.param #param_desc("string", "checksumType", "checksum type for this channel,
* used for yum repository metadata generation")
* #options()
* #item_desc ("sha1", "Offers widest compatibility with clients")
@@ -569,13 +572,21 @@ public class ChannelSoftwareHandler extends BaseHandler {
* only with newer clients: Fedora 11 and newer,
* or Enterprise Linux 6 and newer.")
* #options_end()
+ * @xmlrpc.param #param_desc("string", "gpgKeyUrl", "GPG key URL")
+ * @xmlrpc.param #param_desc("string", "gpgKeyId", "GPG key ID")
+ * @xmlrpc.param #param_desc("string", "gpgKeyFingerprint", "GPG key Fingerprint")
+ * @xmlrpc.param #param_desc("string", "yumrepoUrl", "Associated Yum Repository URL")
+ * @xmlrpc.param #param_desc("string", "yumrepoLabel", "Associated Yum Repository Label")
+ * @xmlrpc.param #param_desc("boolean", "syncYumRepo", "Sync Yum Repository")
* @xmlrpc.returntype int - 1 if the creation operation succeeded, 0 otherwise
*/
public int create(String sessionKey, String label, String name,
- String summary, String archLabel, String parentlabel, String checksumtype)
+ String summary, String archLabel, String parentLabel, String checksumType,
+ String gpgKeyUrl, String gpgKeyId, String gpgKeyFingerprint,
+ String yumrepoUrl, String yumrepoLabel, Boolean syncYumrepo)
throws PermissionCheckFailureException, InvalidChannelLabelException,
InvalidChannelNameException, InvalidParentChannelException {
-
+
User user = getLoggedInUser(sessionKey);
if (!user.hasRole(RoleFactory.CHANNEL_ADMIN)) {
throw new PermissionCheckFailureException();
@@ -585,12 +596,85 @@ public class ChannelSoftwareHandler extends BaseHandler {
ccc.setLabel(label);
ccc.setName(name);
ccc.setSummary(summary);
- ccc.setParentLabel(parentlabel);
+ ccc.setParentLabel(parentLabel);
ccc.setUser(user);
- ccc.setChecksum(checksumtype);
+ ccc.setChecksum(checksumType);
+ ccc.setGpgKeyUrl(gpgKeyUrl);
+ ccc.setGpgKeyId(gpgKeyId);
+ ccc.setGpgKeyFp(gpgKeyFingerprint);
+ ccc.setYumUrl(yumrepoUrl);
+ ccc.setRepoLabel(yumrepoLabel);
+ ccc.setSyncRepo(syncYumrepo);
return (ccc.create() != null) ? 1 : 0;
}
+
+ /**
+ * Creates a software channel, parent_channel_label can be empty string
+ * @param sessionKey WebSession containing User information.
+ * @param label Channel label to be created
+ * @param name Name of Channel
+ * @param summary Channel Summary
+ * @param archLabel Architecture label
+ * @param parentlabel Parent Channel label (may be null)
+ * @param checksumtype checksum type for this channel
+ * @return 1 if creation of channel succeeds.
+ * @since 10.9
+ * @throws PermissionCheckFailureException thrown if user does not have
+ * permission to create the channel.
+ * @throws InvalidChannelNameException thrown if given name is in use or
+ * otherwise, invalid.
+ * @throws InvalidChannelLabelException throw if given label is in use or
+ * otherwise, invalid.
+ * @throws InvalidParentChannelException thrown if parent label is for a
+ * channel that is not a base channel.
+ *
+ * @xmlrpc.doc Creates a software channel
+ * @xmlrpc.param #session_key()
+ * @xmlrpc.param #param_desc("string", "label", "label of the new channel")
+ * @xmlrpc.param #param_desc("string", "name", "name of the new channel")
+ * @xmlrpc.param #param_desc("string", "summary" "summary of the channel")
+ * @xmlrpc.param #param_desc("string", "archLabel",
+ * "the label of the architecture the channel corresponds to")
+ * #options()
+ * #item_desc ("channel-ia32", "For 32 bit channel architecture")
+ * #item_desc ("channel-ia64", "For 64 bit channel architecture")
+ * #item_desc ("channel-sparc", "For Sparc channel architecture")
+ * #item_desc ("channel-alpha", "For Alpha channel architecture")
+ * #item_desc ("channel-s390", "For s390 channel architecture")
+ * #item_desc ("channel-s390x", "For s390x channel architecture")
+ * #item_desc ("channel-iSeries", "For i-Series channel architecture")
+ * #item_desc ("channel-pSeries", "For p-Series channel architecture")
+ * #item_desc ("channel-x86_64", "For x86_64 channel architecture")
+ * #item_desc ("channel-ppc", "For PPC channel architecture")
+ * #item_desc ("channel-sparc-sun-solaris",
+ * "For Sparc Solaris channel architecture")
+ * #item_desc ("channel-i386-sun-solaris",
+ * "For i386 Solaris channel architecture")
+ * #options_end()
+ * @xmlrpc.param #param_desc("string", "parentLabel", "label of the parent of this
+ * channel, an empty string if it does not have one")
+ * @xmlrpc.param #param_desc("string", "checksumType", "checksum type for this channel,
+ * used for yum repository metadata generation")
+ * #options()
+ * #item_desc ("sha1", "Offers widest compatibility with clients")
+ * #item_desc ("sha256", "Offers highest security, but is compatible
+ * only with newer clients: Fedora 11 and newer,
+ * or Enterprise Linux 6 and newer.")
+ * #options_end()
+ * @xmlrpc.returntype int - 1 if the creation operation succeeded, 0 otherwise
+ */
+
+ public int create(String sessionKey, String label, String name,
+ String summary, String archLabel, String parentLabel, String checksumType)
+ throws PermissionCheckFailureException, InvalidChannelLabelException,
+ InvalidChannelNameException, InvalidParentChannelException {
+
+ return create(sessionKey, label, name,
+ summary, archLabel, parentLabel, checksumType,
+ null, null, null,
+ null, null, Boolean.FALSE);
+ }
/**
* Creates a software channel, parent_channel_label can be empty string
@@ -638,11 +722,11 @@ public class ChannelSoftwareHandler extends BaseHandler {
* @xmlrpc.returntype int - 1 if the creation operation succeeded, 0 otherwise
*/
public int create(String sessionKey, String label, String name,
- String summary, String archLabel, String parentlabel)
+ String summary, String archLabel, String parentLabel)
throws PermissionCheckFailureException, InvalidChannelLabelException,
InvalidChannelNameException, InvalidParentChannelException {
- return create(sessionKey, label, name, summary, archLabel, parentlabel, "sha1");
+ return create(sessionKey, label, name, summary, archLabel, parentLabel, "sha1");
}
/**
commit af724a125e8adda2cd1dbdccf1f6691e161f50d7
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 15 18:13:58 2010 +0100
562559 - extending channel.software.getDetails API call
with:
checksum type label
repository url
repository label
last repository sync date
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ChannelSerializer.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ChannelSerializer.java
index b5778ca..ed116be 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ChannelSerializer.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ChannelSerializer.java
@@ -15,6 +15,7 @@
package com.redhat.rhn.frontend.xmlrpc.serializer;
import com.redhat.rhn.domain.channel.Channel;
+import com.redhat.rhn.domain.channel.ContentSource;
import com.redhat.rhn.frontend.xmlrpc.serializer.util.SerializerHelper;
import org.apache.commons.lang.StringUtils;
@@ -38,15 +39,19 @@ import redstone.xmlrpc.XmlRpcSerializer;
* #prop("string", "label")
* #prop("string", "arch_name")
* #prop("string", "summary")
- * #prop("string", "description")
+ * #prop("string", "description")
+ * #prop("string", "checksum_label")
* #prop("string", "maintainer_name")
* #prop("string", "maintainer_email")
* #prop("string", "maintainer_phone")
* #prop("string", "support_policy")
- * #prop("string", "gpg_key_url")
- * #prop("string", "gpg_key_id")
- * #prop("string", "gpg_key_fp")
- * #prop("string", "end_of_life")
+ * #prop("string", "gpg_key_url")
+ * #prop("string", "gpg_key_id")
+ * #prop("string", "gpg_key_fp")
+ * #prop("string", "yumrepo_source_url")
+ * #prop("string", "yumrepo_label")
+ * #prop("dateTime.iso8601", "yumrepo_last_sync")
+ * #prop("string", "end_of_life")
* #prop("string", "parent_channel_label")
* #struct_end()
*
@@ -77,7 +82,7 @@ public class ChannelSerializer implements XmlRpcCustomSerializer {
helper.add("summary", StringUtils.defaultString(c.getSummary()));
helper.add("description",
StringUtils.defaultString(c.getDescription()));
-
+ helper.add("checksum_label", c.getChecksumTypeLabel());
helper.add("maintainer_name", c.getMaintainerName());
helper.add("maintainer_email", c.getMaintainerEmail());
helper.add("maintainer_phone", c.getMaintainerPhone());
@@ -90,6 +95,23 @@ public class ChannelSerializer implements XmlRpcCustomSerializer {
helper.add("gpg_key_fp",
StringUtils.defaultString(c.getGPGKeyFp()));
+ if (c.getContentSources().isEmpty()) {
+ helper.add("yumrepo_source_url", "");
+ helper.add("yumrepo_label", "");
+ helper.add("yumrepo_last_sync", "");
+ }
+ else {
+ ContentSource cs = c.getContentSources().iterator().next();
+ helper.add("yumrepo_source_url", cs.getSourceUrl());
+ helper.add("yumrepo_label", cs.getLabel());
+ if (cs.getLastSynced() != null) {
+ helper.add("yumrepo_last_sync", cs.getLastSynced());
+ }
+ else {
+ helper.add("yumrepo_last_sync", "");
+ }
+ }
+
if (c.getEndOfLife() != null) {
helper.add("end_of_life", c.getEndOfLife().toString());
}
14 years, 3 months
3 commits - client/rhel
by Jan Pazdziora
client/rhel/rhn-client-tools/src/up2date_client/gui.py | 97 +++++-------
client/rhel/rhn-client-tools/src/up2date_client/hardware.py | 3
2 files changed, 48 insertions(+), 52 deletions(-)
New commits:
commit f0fddcd6e7bdbb3b25a9ae36705f10a0b6bdcb2b
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Feb 15 16:54:15 2010 +0100
types and libxml2 not called in hardware, removing the imports.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
index e2413b1..6c2c110 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
@@ -22,8 +22,6 @@ import socket
import os
import sys
import string
-import types
-
import config
import ethtool
@@ -33,7 +31,6 @@ from haltree import HalTree, HalDevice
import dbus
import dmidecode
-import libxml2
import up2dateLog
#PCI DEVICE DEFINES
commit ade5f6887d9cd76f39ba300b4ed51de94c1d6a33
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Feb 15 16:47:41 2010 +0100
Remove trailing spaces in gui.py.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/gui.py b/client/rhel/rhn-client-tools/src/up2date_client/gui.py
index 127376d..b5767c7 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/gui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/gui.py
@@ -44,15 +44,15 @@ import rhnregGui
-class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
- rhnregGui.ChooseOrgPage, rhnregGui.ActivateSubscriptionPage,
- rhnregGui.ReviewSubscriptionPage, rhnregGui.CreateProfilePage,
+class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
+ rhnregGui.ChooseOrgPage, rhnregGui.ActivateSubscriptionPage,
+ rhnregGui.ReviewSubscriptionPage, rhnregGui.CreateProfilePage,
rhnregGui.ProvideCertificatePage, rhnregGui.FinishPage,
rhnregGui.ChooseChannelPage):
def __init__(self):
self.cfg = config.initUp2dateConfig()
-
+
if cfg['development']:
gladeFile = "../../data/gui.glade"
else:
@@ -85,7 +85,7 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
"onFinishPagePrepare" : self.onFinishPagePrepare,
"onFinishPageFinish" : self.onFinishPageFinish,
} )
-
+
rhnregGui.StartPage.__init__(self)
rhnregGui.ChooseServerPage.__init__(self)
rhnregGui.LoginPage.__init__(self)
@@ -96,7 +96,7 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
rhnregGui.ReviewSubscriptionPage.__init__(self)
rhnregGui.ProvideCertificatePage.__init__(self)
rhnregGui.FinishPage.__init__(self)
-
+
# Pack all the pages into the empty druid screens
contents = self.startPageVbox()
container = self.xml.get_widget("startPageVbox")
@@ -128,19 +128,19 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
contents = self.finishPageVbox()
container = self.xml.get_widget("finishPageVbox")
container.pack_start(contents, True)
-
+
self.initProfile = False
self.oemInfo = {}
self.productInfo = {}
self.showedChooseOrgPage = False
self.showedActivateSubscriptionPage = False
-
+
self.druid = self.xml.get_widget("druid")
self.mainWin = self.xml.get_widget("mainWin")
self.mainWin.connect("delete-event", gtk.main_quit)
self.mainWin.connect("hide", gtk.main_quit)
-
- # It's better to get widgets in advance so bugs don't hide in get_widget
+
+ # It's better to get widgets in advance so bugs don't hide in get_widget
# calls that only get executed periodically.
self.startPage = self.xml.get_widget("startPage")
self.chooseServerPage = self.xml.get_widget("chooseServerPage")
@@ -154,9 +154,9 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
self.reviewSubscriptionPage = \
self.xml.get_widget("reviewSubscriptionPage")
self.finishPage = self.xml.get_widget("finishPage")
-
+
# Set up cursor changing functions. Overriding functions that aren't in
- # classes like this could be called a hack, but I think it's the best
+ # classes like this could be called a hack, but I think it's the best
# we can do with the current overall setup and isn't too bad.
def mySetBusyCursor():
cursor = gtk.gdk.Cursor(gtk.gdk.WATCH)
@@ -170,7 +170,7 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
gtk.main_iteration(False)
rhnregGui.setBusyCursor = mySetBusyCursor
rhnregGui.setArrowCursor = mySetArrowCursor
-
+
self.mainWin.show_all()
# Druid doesn't signal prepare to the first page when starting up
self.onStartPagePrepare(None, None, manualPrepare=True)
@@ -207,16 +207,16 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
dialog = rhnregGui.AlreadyRegisteredDialog()
if dialog.rc == 0:
sys.exit(0)
-
+
def onStartPageNext(self, page, dummy):
self.druid.set_buttons_sensitive(True, True, True, False)
-
-
+
+
def onChooseServerPagePrepare(self, page, dummy):
self.chooseServerPage.emit_stop_by_name("prepare")
self.mainWin.set_title(_("Registering for software updates"))
self.chooseServerPagePrepare()
-
+
def onChooseServerPageNext(self, page, dummy):
try:
ret = self.chooseServerPageApply()
@@ -226,13 +226,13 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
up2dateErrors.SSLCertificateFileNotFound):
self.druid.set_page(self.provideCertificatePage)
return True
-
-
+
+
def onLoginPagePrepare(self, page, dummy):
self.loginPage.emit_stop_by_name("prepare")
self.loginXml.get_widget("loginUserEntry").grab_focus()
self.loginPagePrepare()
-
+
def onLoginPageNext(self, page, dummy):
"""This must manually switch pages because another function calls it to
advance the druid. It returns True to inform the druid of this.
@@ -240,17 +240,17 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
ret = self.loginPageVerify()
if ret:
return ret
-
+
ret = self.loginPageApply()
if ret:
return ret
-
+
self.goToPageAfterLogin()
return True
def goToPageAfterLogin(self):
- """This function is used by the create new account dialog so it doesn't
+ """This function is used by the create new account dialog so it doesn't
need to have any knowledge of the screen mechanism or order.
"""
self.showedChooseOrgPage = False
@@ -263,12 +263,12 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
self.druid.set_page(self.chooseChannelPage)
else:
self.druid.set_page(self.createProfilePage)
-
-
+
+
def onChooseOrgPagePrepare(self, page, dummy):
self.showedChooseOrgPage = True
self.chooseOrgPagePrepare(useCachedOrgs=True)
-
+
def onChooseOrgPageNext(self, page, dummy):
self.chooseOrgPageApply()
if rhnregGui.activateSubscriptionShouldBeShown():
@@ -276,11 +276,11 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
else:
self.druid.set_page(self.createProfilePage)
return True
-
+
def onActivateSubscriptionPagePrepare(self, page, dummy):
self.showedActivateSubscriptionPage = True
self.activateSubscriptionPagePrepare()
-
+
def onActivateSubscriptionPageBack(self, page, dummy):
if self.showedChooseOrgPage:
self.druid.set_page(self.chooseOrgPage)
@@ -297,7 +297,7 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
status = self.activateSubscriptionPageApply()
if status is True:
return True
-
+
def onChooseChannelPageBack(self, page, dummy):
if self.showedActivateSubscriptionPage == True:
self.druid.set_page(self.activateSubscriptionPage)
@@ -305,7 +305,7 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
self.druid.set_page(self.chooseOrgPage)
else:
self.druid.set_page(self.loginPage)
-
+
return True
def onChooseChannelPageNext(self, page, dummy):
@@ -319,17 +319,17 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
else:
self.druid.set_page(self.createProfilePage)
return True
-
+
def onChooseChannelPagePrepare(self, page, dummy):
self.chooseChannelPagePrepare()
self.druid.set_buttons_sensitive(True, True, True, False)
self.chooseChannelPage.emit_stop_by_name("prepare")
-
+
def onCreateProfilePagePrepare(self, page, dummy):
self.createProfilePagePrepare()
self.druid.set_buttons_sensitive(False, True, False, False)
self.createProfilePage.emit_stop_by_name("prepare")
-
+
def onCreateProfilePageNext(self, page, dummy):
ret = self.createProfilePageVerify()
if ret:
@@ -337,18 +337,18 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
ret = self.createProfilePageApply()
if ret:
return ret
-
-
+
+
def onReviewSubscriptionPagePrepare(self, page, dummy):
self.reviewSubscriptionPagePrepare()
self.druid.set_buttons_sensitive(False, True, False, False)
self.reviewSubscriptionPage.emit_stop_by_name("prepare")
-
+
def onReviewSubscriptionPageNext(self, page, dummy):
self.druid.set_page(self.finishPage)
return True
-
-
+
+
## def onRegFinishPagePrepare(self, page, dummy):
## # Disable the next button and enable the finish one
## self.druid.set_buttons_sensitive(False, False, False, False)
@@ -366,8 +366,8 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
## page = self.xml.get_widget("regFinishPage")
##
## page.set_title(titleText)
-## # TODO These cases used to be different when this wasn't the end of the
-## # druid (I think only one changed the buttons). Figure out if we still
+## # TODO These cases used to be different when this wasn't the end of the
+## # druid (I think only one changed the buttons). Figure out if we still
## # need to do something different based on returnCode
## if returnCode == 1:
## buffer = gtk.TextBuffer(None)
@@ -377,14 +377,14 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
## buffer = gtk.TextBuffer(None)
## buffer.set_text(messageText)
## textArea.set_buffer(buffer)
-##
-## def onFinishPageFinish(self, page, dummy=None):
+##
+## def onFinishPageFinish(self, page, dummy=None):
## gtk.main_quit()
-
+
def onProvideCertificatePageBack(self, page=None, dummy=None):
self.druid.set_page(self.chooseServerPage)
return True
-
+
def onProvideCertificatePageNext(self, page=None, dummy=None):
status = self.provideCertificatePageApply()
if status == 0:
@@ -397,8 +397,8 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
assert status == 2
pass
return True
-
-
+
+
def onFinishPagePrepare(self, page=None, dummy=None):
self.druid.set_buttons_sensitive(False, False, False, False)
self.druid.set_show_finish(True)
@@ -415,7 +415,7 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
self.mainWin.set_title(title)
self.finishPage.set_title(title)
- def onFinishPageFinish(self, page, dummy=None):
+ def onFinishPageFinish(self, page, dummy=None):
gtk.main_quit()
@@ -437,7 +437,7 @@ def main():
gui = Gui()
gtk.main()
-
+
if __name__ == "__main__":
try:
main()
commit 565aafebf942287d9b9720c607d964fb76cfe54a
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Feb 15 16:46:22 2010 +0100
up2dateUtils not used in gui, removing the import.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/gui.py b/client/rhel/rhn-client-tools/src/up2date_client/gui.py
index 06aaa39..127376d 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/gui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/gui.py
@@ -37,7 +37,6 @@ _ = gettext.gettext
import up2dateErrors
import config
-import up2dateUtils
import rhnreg
import messageWindow
14 years, 3 months
2 commits - client/rhel
by Jan Pazdziora
client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py | 1 -
client/rhel/rhn-client-tools/src/up2date_client/tui.py | 1 -
2 files changed, 2 deletions(-)
New commits:
commit ceb30c4237d6925c81de607535fff4a2fb7056ca
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Feb 15 16:35:55 2010 +0100
Change 0ec1a12e made import stat not needed, removing.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py b/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
index badb6c5..e77ec5f 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
@@ -40,7 +40,6 @@ import gtk.glade
import gobject
import sys
import os
-import stat
import gettext
_ = gettext.gettext
gettext.textdomain("rhn-client-tools")
commit 3d40494f7daa77df4be739c70f7b689075988b60
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Feb 15 16:30:30 2010 +0100
rpcServer not used in tui, removing the import.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/tui.py b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
index a6cca19..11344de 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/tui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
@@ -30,7 +30,6 @@ import rhnreg, hardware
import up2dateErrors
import up2dateUtils
import rpmUtils
-import rpcServer
import up2dateLog
import config
import up2dateAuth
14 years, 3 months
2 commits - utils/spacewalk-common-channels utils/spacewalk-common-channels.ini
by Michael Mraka
utils/spacewalk-common-channels | 7 ---
utils/spacewalk-common-channels.ini | 69 +++++++++++++++++++++++++++---------
2 files changed, 53 insertions(+), 23 deletions(-)
New commits:
commit 26a3a1b40271ac0c5edec33853b972227f099df0
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Feb 15 12:01:06 2010 +0100
removed debug code
diff --git a/utils/spacewalk-common-channels b/utils/spacewalk-common-channels
index 233de74..f8e00f1 100755
--- a/utils/spacewalk-common-channels
+++ b/utils/spacewalk-common-channels
@@ -136,13 +136,6 @@ if __name__ == "__main__":
channel = setup_channel(section, arch)
channels.update(channel)
-# FIXME debug
- for (k,v) in channels.items():
- print k
- for (kk, vv) in v.items():
- print " ", kk, "=", vv
-# /FIXME debug
-
# list of base_channels to create
base_channels = {}
# list of child_channels for given base_channel
commit c8b1da7c64ac385bca085499a1a95bc464291571
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Feb 15 12:00:12 2010 +0100
added centos4 and epel4 to spacewalk-common-channels.ini
diff --git a/utils/spacewalk-common-channels.ini b/utils/spacewalk-common-channels.ini
old mode 100755
new mode 100644
index 95ad603..ebbc2af
--- a/utils/spacewalk-common-channels.ini
+++ b/utils/spacewalk-common-channels.ini
@@ -9,6 +9,7 @@ _f11_archs = i386, x86_64, ppc, s390x, sparc
#_f12_archs = i386, x86_64, ppc, ppc64
_f12_archs = i386, x86_64, ppc
_x86_archs = i386, x86_64
+_centos4_archs = alpha, i386, ia64, s390, s390x, x86_64
[fedora11]
checksum = sha256
@@ -64,7 +65,7 @@ base_channels = fedora12-%(arch)s fedora11-%(arch)s centos5-%(arch)s
[centos5]
archs = %(_x86_archs)s
-name = CentOS-5 (%(arch)s)
+name = CentOS 5 (%(arch)s)
[centos5-addons]
@@ -110,19 +111,55 @@ name = EPEL 5 (%(arch)s)
archs = i386, x86_64, ppc
base_channels = centos5-%(arch)s
-# epel5 - for centos
-# vmware tools
-# 'centos4' : [ '',
-# ['alpha', 'i386', 'ia64', 's390', 's390x', 'x86_64'],
-# ['centos4', 'CentOS-4', 'CentOS-4'],
-# [ ['centos4-addons', 'CentOS 4 Addons', 'CentOS 4 Addons'],
-# ['centos4-centosplus', 'CentOS 4 Plus', 'CentOS 4 Plus'],
-# ['centos4-contrib', 'CentOS 4 Contrib', 'CentOS 4 Contrib'],
-# ['centos4-csgfs', 'CentOS 4 CS/GFS', 'CentOS 4 CS/GFS'],
-# ['centos4-extras', 'CentOS 4 Extras', 'CentOS 4 Extras'],
-# ['centos4-fasttrack', 'CentOS 4 FastTrack', 'CentOS 4 FastTrack'],
-# ['centos4-updates', 'CentOS 4 Updates', 'CentOS 4 Updates'],
-# ],
-# ],
-# }
+[centos4]
+archs = %(_centos4_archs)s
+name = CentOS 4 (%(arch)s)
+
+[centos4-addons]
+label = %(base_channel)s-addons
+archs = %(_centos4_archs)s
+name = CentOS 4 Addons (%(arch)s)
+base_channels = centos4-%(arch)s
+
+[centos4-centosplus]
+label = %(base_channel)s-centosplus
+archs = %(_centos4_archs)s
+name = CentOS 4 Plus (%(arch)s)
+base_channels = centos4-%(arch)s
+
+[centos4-contrib]
+label = %(base_channel)s-contrib
+archs = %(_centos4_archs)s
+name = CentOS 4 Contrib (%(arch)s)
+base_channels = centos4-%(arch)s
+
+[centos4-csgfs]
+label = %(base_channel)s-csgfs
+archs = %(_centos4_archs)s
+name = CentOS 4 CS/GFS (%(arch)s)
+base_channels = centos4-%(arch)s
+
+[centos4-extras]
+label = %(base_channel)s-extras
+archs = %(_centos4_archs)s
+name = CentOS 4 Extras (%(arch)s)
+base_channels = centos4-%(arch)s
+
+[centos4-fasttrack]
+label = %(base_channel)s-fasttrack
+archs = %(_centos4_archs)s
+name = CentOS 4 FastTrack (%(arch)s)
+base_channels = centos4-%(arch)s
+
+[centos4-updates]
+label = %(base_channel)s-updates
+archs = %(_centos4_archs)s
+name = CentOS 4 Updates (%(arch)s)
+base_channels = centos4-%(arch)s
+
+[epel4]
+label = epel4-%(base_channel)s
+name = EPEL 4 (%(arch)s)
+archs = i386, x86_64, ppc
+base_channels = centos4-%(arch)s
14 years, 3 months
Changes to 'refs/tags/spacewalk-utils-0.9.1-1'
by Michael Mraka
Tag 'spacewalk-utils-0.9.1-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-02-15 10:38 +0000
Tagging package [spacewalk-utils] version [0.9.1-1] in directory [utils/].
Changes since rhnlib-2.5.22-1:
Justin Sherrill (2):
510100 - adding the ability to set a config file to a certain revision
changing new rev number to be one more than latest, not one more than current
Michael Mraka (4):
added spacewalk-common-channels utility
packed spacewalk-common-channels into rpm
fixed installation dirs
Automatic commit of package [spacewalk-utils] release [0.9.1-1].
---
java/code/src/com/redhat/rhn/frontend/action/configuration/ConfigFileForm.java | 4
java/code/src/com/redhat/rhn/frontend/action/configuration/files/FileDetailsAction.java | 3
java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml | 6
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 6
java/code/src/com/redhat/rhn/manager/configuration/ConfigFileBuilder.java | 32 +
java/code/src/com/redhat/rhn/manager/configuration/file/ConfigFileData.java | 17
java/code/webapp/WEB-INF/pages/common/fragments/configuration/files/details.jspf | 9
java/code/webapp/WEB-INF/struts-config.xml | 1
rel-eng/packages/spacewalk-utils | 2
utils/Makefile | 9
utils/spacewalk-common-channels | 269 ++++++++++
utils/spacewalk-common-channels.ini | 128 ++++
utils/spacewalk-utils.spec | 6
13 files changed, 487 insertions(+), 5 deletions(-)
---
14 years, 3 months
rel-eng/packages utils/spacewalk-utils.spec
by Michael Mraka
rel-eng/packages/spacewalk-utils | 2 +-
utils/spacewalk-utils.spec | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 1330384854e015febf92d758a266d1a8abba720f
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Feb 15 11:38:25 2010 +0100
Automatic commit of package [spacewalk-utils] release [0.9.1-1].
diff --git a/rel-eng/packages/spacewalk-utils b/rel-eng/packages/spacewalk-utils
index 48eae4e..72002e3 100644
--- a/rel-eng/packages/spacewalk-utils
+++ b/rel-eng/packages/spacewalk-utils
@@ -1 +1 @@
-0.8.3-1 utils/
+0.9.1-1 utils/
diff --git a/utils/spacewalk-utils.spec b/utils/spacewalk-utils.spec
index 8976d1c..4de45bd 100644
--- a/utils/spacewalk-utils.spec
+++ b/utils/spacewalk-utils.spec
@@ -1,7 +1,7 @@
%define rhnroot %{_prefix}/share/rhn
Name: spacewalk-utils
-Version: 0.9.0
+Version: 0.9.1
Release: 1%{?dist}
Summary: Utilities that may be run against a Spacewalk server.
@@ -57,6 +57,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Mon Feb 15 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.9.1-1
+- added spacewalk-common-channels utility
+
* Thu Feb 04 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.8.3-1
- updated copyrights
14 years, 3 months
3 commits - utils/Makefile utils/spacewalk-common-channels utils/spacewalk-common-channels.ini utils/spacewalk-utils.spec
by Michael Mraka
utils/Makefile | 9 -
utils/spacewalk-common-channels | 269 ++++++++++++++++++++++++++++++++++++
utils/spacewalk-common-channels.ini | 128 +++++++++++++++++
utils/spacewalk-utils.spec | 1
4 files changed, 405 insertions(+), 2 deletions(-)
New commits:
commit 4dc38ecd932b66f98721773ac217adaf8cb84078
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Feb 15 11:36:44 2010 +0100
fixed installation dirs
diff --git a/utils/Makefile b/utils/Makefile
index ad6fd80..821d310 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -20,7 +20,7 @@ BINDIR = /usr/bin
MANDIR ?= /usr/man
CONFDIR = /etc/rhn
-EXTRA_DIRS = $(MANDIR)/man8 $(BINDIR)
+EXTRA_DIRS = $(MANDIR)/man8 $(BINDIR) $(CONFDIR)
include Makefile.defs
diff --git a/utils/spacewalk-utils.spec b/utils/spacewalk-utils.spec
index d13f03f..8976d1c 100644
--- a/utils/spacewalk-utils.spec
+++ b/utils/spacewalk-utils.spec
@@ -47,7 +47,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
-%config %{_sysconfdir}/spacewalk-common-channels.ini
+%config %{_sysconfdir}/rhn/spacewalk-common-channels.ini
%attr(755,root,root) %{_bindir}/*
%dir %{rhnroot}/utils
%{rhnroot}/utils/__init__.py*
commit e0ca94a12ab338d3c4040f9ec73d740260e35e76
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Feb 15 11:27:09 2010 +0100
packed spacewalk-common-channels into rpm
diff --git a/utils/Makefile b/utils/Makefile
index 0fd05ea..ad6fd80 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -7,7 +7,9 @@ NAME := spacewalk-utils
SUBDIR = utils
FILES = __init__ systemSnapshot migrateSystemProfile
-SCRIPTS = sw-system-snapshot migrate-system-profile spacewalk-api apply_errata scr.cgi
+SCRIPTS = sw-system-snapshot migrate-system-profile spacewalk-api apply_errata \
+ scr.cgi spacewalk-common-channels
+CONFIGS = spacewalk-common-channels.ini
DOCBOOK = $(wildcard /usr/bin/docbook2man)
@@ -16,6 +18,7 @@ MANS = $(patsubst %.sgml,%.8,$(SGMLS) )
BINDIR = /usr/bin
MANDIR ?= /usr/man
+CONFDIR = /etc/rhn
EXTRA_DIRS = $(MANDIR)/man8 $(BINDIR)
@@ -32,6 +35,8 @@ all :: $(MANS)
pod2man --section=8 spacewalk-api spacewalk-api.8
install :: $(MANS) $(PREFIX)/$(MANDIR)
$(INSTALL_DATA) $(MANS) spacewalk-api.8* $(PREFIX)/$(MANDIR)/man8
+install :: $(CONFIGS) $(PREFIX)/$(CONFDIR)
+ $(INSTALL_DATA) $(CONFIGS) $(PREFIX)/$(CONFDIR)
endif
%.new : %
diff --git a/utils/spacewalk-utils.spec b/utils/spacewalk-utils.spec
index 93c9569..d13f03f 100644
--- a/utils/spacewalk-utils.spec
+++ b/utils/spacewalk-utils.spec
@@ -47,6 +47,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
+%config %{_sysconfdir}/spacewalk-common-channels.ini
%attr(755,root,root) %{_bindir}/*
%dir %{rhnroot}/utils
%{rhnroot}/utils/__init__.py*
commit f3edba4d6942018eefe8362a3f9b3a8d585ffa8b
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Feb 15 11:19:56 2010 +0100
added spacewalk-common-channels utility
diff --git a/utils/spacewalk-common-channels b/utils/spacewalk-common-channels
new file mode 100755
index 0000000..233de74
--- /dev/null
+++ b/utils/spacewalk-common-channels
@@ -0,0 +1,269 @@
+#!/usr/bin/python
+#
+# 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.
+#
+
+import sys
+import xmlrpclib
+import fnmatch
+import ConfigParser
+from optparse import OptionParser, Option
+import re
+
+DEFAULT_SERVER = "localhost"
+DEFAULT_USER = "spacewalk"
+DEFAULT_PASSWORD = "spacewalk"
+
+DEFAULT_CONFIG = '/etc/rhn/spacewalk-common-channels.ini'
+
+channel_arch = {
+ 'i386': 'channel-ia32',
+ 'x86_64': 'channel-x86_64',
+ 'ia64': 'channel-ia64',
+ 'sparc': 'channel-sparc',
+ 'sparc64': 'channel-sparc64',
+ 'alpha': 'channel-alpha',
+ 's390': 'channel-s390',
+ 's390x': 'channel-s390x',
+ 'iSeries': 'channel-iSeries',
+ 'pSeries': 'channel-pSeries',
+ 'x86_64': 'channel-x86_64',
+ 'ppc': 'channel-ppc',
+ 'ppc64': 'channel-ppc64',
+ 'sparc-sun-solaris': 'channel-sparc-sun-solaris',
+ 'i386-sun-solaris': 'channel-i386-sun-solaris',
+ }
+
+SPLIT_PATTERN = '[ ,]+'
+
+def connect(user, password, server):
+ server_url = "http://%s/rpc/api" % server
+
+ if options.verbose > 2:
+ client_verbose = options.verbose - 2
+ else:
+ client_verbose = 0
+ if options.verbose:
+ sys.stdout.write("Connecting to %s\n" % server_url)
+ client = xmlrpclib.Server(server_url, verbose=client_verbose)
+ key = client.auth.login(user, password)
+ return client, key
+
+def setup_channel(section, arch):
+ channels = {}
+ base_channels = ['']
+ optional = ['activationkey']
+ mandatory = ['label', 'name', 'summary', 'checksum', 'arch', 'base_channel']
+
+ if config.has_option(section, 'base_channels'):
+ base_channels = re.split(SPLIT_PATTERN, config.get(section, 'base_channels', 1))
+
+ config.set(section, 'arch', arch)
+ config.set(section, 'section', section)
+ for base_channel in base_channels:
+ channel = {}
+ config.set(section, 'base_channel', base_channel)
+
+ for k in optional:
+ if config.has_option(section,k):
+ channel[k] = config.get(section, k)
+ for k in mandatory:
+ channel[k] = config.get(section, k)
+ channels[channel['label']] = channel
+ return channels
+
+if __name__ == "__main__":
+ # options parsing
+ usage = "usage: %prog [options] <channel1 glob> [<channel2 glob> ... ]"
+
+ option_list = [
+ Option("-c", "--config", help="configuration file", default=DEFAULT_CONFIG),
+ Option("-u", "--user", help="username", default=DEFAULT_USER),
+ Option("-p", "--password", help="password", default=DEFAULT_PASSWORD),
+ Option("-s", "--server", help="your spacewalk server", default=DEFAULT_SERVER),
+ Option("-k", "--keys", help="activation key limit (unlimited/number)"),
+ Option("-n", "--dry-run", help="perform a trial run with no changes made",
+ action="store_true"),
+ Option("-a", "--archs", help="list of architectures"),
+ Option("-v", "--verbose", help="verbose", action="count"),
+ Option("-l", "--list", help="print list of available channels",
+ action="store_true"),
+ ]
+
+ parser = OptionParser(usage=usage, option_list=option_list, description="")
+ (options, args) = parser.parse_args()
+ config = ConfigParser.ConfigParser()
+ config.read(options.config)
+
+ if options.list:
+ print "Available channels:"
+ channel_list = config.sections()
+ if channel_list:
+ for channel in sorted(channel_list):
+ print " %-20s %s" % (channel + ":",
+ "i386, x86_64") # FIXME: list of archs
+ else:
+ print " [no channel available]"
+ sys.exit(0)
+
+ if not args:
+ print parser.print_help()
+ parser.exit()
+
+ key = None
+ client = None
+ channels = {}
+
+ # read matching channels from config and sort them, base channels first
+ for pattern in args:
+ for section in fnmatch.filter(config.sections(), pattern):
+ archs = re.split(SPLIT_PATTERN, config.get(section, 'archs'))
+ if options.archs:
+ # filter out archs not set on commandline
+ archs = filter(lambda a: a in options.archs, archs)
+ for arch in archs:
+ channel = setup_channel(section, arch)
+ channels.update(channel)
+
+# FIXME debug
+ for (k,v) in channels.items():
+ print k
+ for (kk, vv) in v.items():
+ print " ", kk, "=", vv
+# /FIXME debug
+
+ # list of base_channels to create
+ base_channels = {}
+ # list of child_channels for given base_channel
+ child_channels = {}
+ for (name, attr) in channels.items():
+ if attr['base_channel']:
+ if attr['base_channel'] not in base_channels:
+ base_channels[attr['base_channel']] = False
+ if attr['base_channel'] in child_channels:
+ child_channels[attr['base_channel']].append(name)
+ else:
+ child_channels[attr['base_channel']] = [name]
+ else:
+ # this channel is base channel
+ base_channels[name] = True
+ if name not in child_channels:
+ child_channels[name] = []
+
+
+ for (base_channel_label, create_channel) in sorted(base_channels.items()):
+
+ if key == None:
+ client, key = connect(options.user, options.password, options.server)
+ user_info = client.user.getDetails(key, options.user)
+ org_id = user_info['org_id']
+
+ activationkey = None
+ if create_channel:
+ base_info = channels[base_channel_label]
+ if options.verbose:
+ sys.stdout.write("Base channel '%s' - creating...\n" % base_info['name'])
+ if options.verbose > 1:
+ sys.stdout.write("* label=%s, summary=%s, arch=%s, checksum=%s\n" % (
+ base_info['label'], base_info['summary'],
+ base_info['arch'], base_info['checksum']))
+
+ if not options.dry_run:
+ try:
+ # create base channel
+ client.channel.software.create(key,
+ base_info['label'], base_info['name'], base_info['summary'],
+ channel_arch[base_info['arch']], '', base_info['checksum'])
+ except xmlrpclib.Fault, e:
+ if e.faultCode != 1200: # ignore if channel exists
+ sys.stderr.write("ERROR: %s: %s\n" % (
+ base_info['label'], e.faultString))
+ continue
+
+ if options.keys is not None:
+ if options.verbose:
+ sys.stdout.write("* Activation key '%s' - creating...\n" % (
+ base_info['label']))
+ if not options.dry_run:
+ # create activation key
+ if options.keys == 'unlimited':
+ ak_args = (key, base_info['activationkey'], base_info['name'],
+ base_info['label'], [], False)
+ else:
+ ak_args = (key, base_info['activationkey'], base_info['name'],
+ base_info['label'], int(options.keys), [], False)
+ try:
+ client.activationkey.create(*ak_args)
+ activationkey = "%s-%s" % (org_id, base_info['activationkey'])
+ except xmlrpclib.Fault, e:
+ sys.stderr.write("ERROR: %s: %s\n" % (
+ base_info['label'], e.faultString))
+ else:
+ # set this in dry run
+ activationkey = base_info['activationkey']
+ else:
+ # check whether channel exists
+ try:
+ base_info = client.channel.software.getDetails(key, base_channel_label)
+ if options.verbose:
+ sys.stdout.write("Base channel '%s' - exists\n" % base_info['name'])
+ except xmlrpclib.Fault, e:
+ if e.faultCode != -210: # don't report 'No such channel'
+ sys.stderr.write("ERROR: %s: %s\n" % (
+ base_channel_label, e.faultString))
+ continue
+
+ for child_channel_label in child_channels[base_channel_label]:
+ child_info = channels[child_channel_label]
+ if options.verbose:
+ sys.stdout.write("* Child channel '%s' - creating...\n" % child_info['name'])
+ if options.verbose > 1:
+ sys.stdout.write("** label=%s, summary=%s, arch=%s, parent=%s, checksum=%s\n" % (
+ child_info['label'], child_info['summary'],
+ child_info['arch'], base_channel_label,
+ child_info['checksum']))
+
+ if not options.dry_run:
+ try:
+ # create child channels
+ client.channel.software.create(key,
+ child_info['label'], child_info['name'], child_info['summary'],
+ channel_arch[child_info['arch']], base_channel_label,
+ child_info['checksum'])
+ except xmlrpclib.Fault, e:
+ if e.faultCode != 1200: # ignore if channel exists
+ sys.stderr.write("ERROR: %s: %s\n" % (
+ child_info['label'], e.faultString))
+
+ if options.keys is not None:
+ if activationkey:
+ if options.verbose:
+ sys.stdout.write("** Activation key '%s' - adding child channel...\n" % (
+ activationkey))
+ if not options.dry_run:
+ try:
+ client.activationkey.addChildChannels(key, activationkey,
+ child_info['label'])
+ except xmlrpclib.Fault, e:
+ sys.stderr.write("ERROR: %s: %s\n" % (
+ child_info['label'], e.faultString))
+
+ if options.verbose:
+ # an empty line after channel group
+ sys.stdout.write("\n")
+
+ if client is not None:
+ # logout
+ client.auth.logout(key)
+
diff --git a/utils/spacewalk-common-channels.ini b/utils/spacewalk-common-channels.ini
new file mode 100755
index 0000000..95ad603
--- /dev/null
+++ b/utils/spacewalk-common-channels.ini
@@ -0,0 +1,128 @@
+[DEFAULT]
+label = %(section)s-%(arch)s
+checksum = sha1
+summary = %(name)s
+activationkey = %(label)s
+## now define some "macros"
+#_f11_archs = i386, x86_64, ppc, ppc64, s390x, sparc, sparc64
+_f11_archs = i386, x86_64, ppc, s390x, sparc
+#_f12_archs = i386, x86_64, ppc, ppc64
+_f12_archs = i386, x86_64, ppc
+_x86_archs = i386, x86_64
+
+[fedora11]
+checksum = sha256
+archs = %(_f11_archs)s
+checksum = sha256
+name = Fedora 11 (%(arch)s)
+
+[fedora11-updates]
+label = %(base_channel)s-updates
+name = Fedora 11 Updates (%(arch)s)
+archs = %(_f11_archs)s
+checksum = sha256
+base_channels = fedora11-%(arch)s
+
+[fedora11-debug]
+label = %(base_channel)s-debug
+name = Fedora 11 Debug (%(arch)s)
+archs = %(_f11_archs)s
+checksum = sha256
+base_channels = fedora11-%(arch)s
+
+[fedora12]
+checksum = sha256
+archs = %(_f12_archs)s
+checksum = sha256
+name = Fedora 12 (%(arch)s)
+
+[fedora12-updates]
+label = %(base_channel)s-updates
+name = Fedora 12 Updates (%(arch)s)
+archs = %(_f12_archs)s
+checksum = sha256
+base_channels = fedora12-%(arch)s
+
+[fedora12-debug]
+label = %(base_channel)s-debug
+name = Fedora 12 Debug (%(arch)s)
+archs = %(_f12_archs)s
+checksum = sha256
+base_channels = fedora12-%(arch)s
+
+[spacewalk08-server]
+label = spacewalk08-server-%(base_channel)s
+name = Spacewalk Server 0.8 (%(arch)s)
+archs = i386, x86_64
+base_channels = fedora12-%(arch)s fedora11-%(arch)s centos5-%(arch)s
+
+[spacewalk08-client]
+label = spacewalk08-client-%(base_channel)s
+name = Spacewalk Client 0.8 (%(arch)s)
+archs = i386, x86_64
+base_channels = fedora12-%(arch)s fedora11-%(arch)s centos5-%(arch)s
+
+[centos5]
+archs = %(_x86_archs)s
+name = CentOS-5 (%(arch)s)
+
+
+[centos5-addons]
+label = %(base_channel)s-addons
+archs = %(_x86_archs)s
+name = CentOS 5 Addons (%(arch)s)
+base_channels = centos5-%(arch)s
+
+[centos5-centosplus]
+label = %(base_channel)s-centosplus
+archs = %(_x86_archs)s
+name = CentOS 5 Plus (%(arch)s)
+base_channels = centos5-%(arch)s
+
+[centos5-contrib]
+label = %(base_channel)s-contrib
+archs = %(_x86_archs)s
+name = CentOS 5 Contrib (%(arch)s)
+base_channels = centos5-%(arch)s
+
+[centos5-extras]
+label = %(base_channel)s-extras
+archs = %(_x86_archs)s
+name = CentOS 5 Extras (%(arch)s)
+base_channels = centos5-%(arch)s
+
+[centos5-fasttrack]
+label = %(base_channel)s-fasttrack
+archs = %(_x86_archs)s
+name = CentOS 5 FastTrack (%(arch)s)
+base_channels = centos5-%(arch)s
+
+[centos5-updates]
+label = %(base_channel)s-updates
+archs = %(_x86_archs)s
+name = CentOS 5 Updates (%(arch)s)
+base_channels = centos5-%(arch)s
+
+
+[epel5]
+label = epel5-%(base_channel)s
+name = EPEL 5 (%(arch)s)
+archs = i386, x86_64, ppc
+base_channels = centos5-%(arch)s
+
+# epel5 - for centos
+# vmware tools
+# 'centos4' : [ '',
+# ['alpha', 'i386', 'ia64', 's390', 's390x', 'x86_64'],
+# ['centos4', 'CentOS-4', 'CentOS-4'],
+# [ ['centos4-addons', 'CentOS 4 Addons', 'CentOS 4 Addons'],
+# ['centos4-centosplus', 'CentOS 4 Plus', 'CentOS 4 Plus'],
+# ['centos4-contrib', 'CentOS 4 Contrib', 'CentOS 4 Contrib'],
+# ['centos4-csgfs', 'CentOS 4 CS/GFS', 'CentOS 4 CS/GFS'],
+# ['centos4-extras', 'CentOS 4 Extras', 'CentOS 4 Extras'],
+# ['centos4-fasttrack', 'CentOS 4 FastTrack', 'CentOS 4 FastTrack'],
+# ['centos4-updates', 'CentOS 4 Updates', 'CentOS 4 Updates'],
+# ],
+# ],
+# }
+
14 years, 3 months