java/code
by aparsons
java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java | 55 ++++++++++
1 file changed, 55 insertions(+)
New commits:
commit a9b53c6812003c33d04110404824f88d5f2dd250
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Tue Sep 21 14:07:21 2010 -0400
added a new variation of channel.software.mergeErrata API call that allows the user to pass in a list of advisory names
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 11e2b77..cc35072 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
@@ -1802,6 +1802,61 @@ public class ChannelSoftwareHandler extends BaseHandler {
return mergedErrata.toArray();
}
+ /**
+ * Merge a list of errata from one channel into another channel
+ * @param sessionKey session of the user
+ * @param mergeFromLabel the label of the channel to pull the errata from
+ * @param mergeToLabel the label of the channel to push errata into
+ * @param errataNames the list of errata to merge
+ * @return A list of errata that were merged.
+ *
+ * @xmlrpc.doc Merges a list of errata from one channel into another
+ * @xmlrpc.param #session_key()
+ * @xmlrpc.param #param_desc("string", "mergeFromLabel", "the label of the
+ * channel to pull errata from")
+ * @xmlrpc.param #param_desc("string", "mergeToLabel", "the label to push the
+ * errata into")
+ * @xmlrpc.param
+ * #array_single("string", " advisory - The advisory name of the errata to merge")
+ * @xmlrpc.returntype
+ * #array()
+ * $ErrataSerializer
+ * #array_end()
+ */
+ public Object[] mergeErrata(String sessionKey, String mergeFromLabel,
+ String mergeToLabel, List errataNames) {
+
+ User loggedInUser = getLoggedInUser(sessionKey);
+ channelAdminPermCheck(loggedInUser);
+
+ Channel mergeFrom = lookupChannelByLabel(loggedInUser, mergeFromLabel);
+ Channel mergeTo = lookupChannelByLabel(loggedInUser, mergeToLabel);
+
+ if (!UserManager.verifyChannelAdmin(loggedInUser, mergeTo)) {
+ throw new PermissionCheckFailureException();
+ }
+
+ HashSet<Errata> sourceErrata = new HashSet(mergeFrom.getErratas());
+ HashSet<Errata> errataToMerge = new HashSet();
+
+ // make sure our errata exist in the "from" channel
+ for (Iterator itr = errataNames.iterator(); itr.hasNext();) {
+ Errata toMerge = ErrataManager.lookupByAdvisory((String)itr.next());
+
+ for (Errata erratum : sourceErrata) {
+ if (erratum.getAdvisoryName() == toMerge.getAdvisoryName()) {
+ errataToMerge.add(toMerge);
+ break;
+ }
+ }
+ }
+
+ Set<Errata> mergedErrata =
+ mergeErrataToChannel(loggedInUser, errataToMerge, mergeTo, mergeFrom);
+
+ return mergedErrata.toArray();
+ }
+
private Set<Errata> mergeErrataToChannel(User user, Set<Errata> errataToMerge,
Channel toChannel, Channel fromChannel) {
13 years, 7 months
spacewalk/setup
by Milan Zazrivec
spacewalk/setup/share/upgrade/rhn-enable-monitoring.pl | 3 ---
1 file changed, 3 deletions(-)
New commits:
commit c6ffaa141ea7f95b12bb7775b550e886164ad2c2
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Tue Sep 21 18:33:08 2010 +0200
do not restart whole satellite when enabling monitoring
Restart of whole satellite needs to be a deliberate action. This script
is only supposed to update the monitoring configuration.
diff --git a/spacewalk/setup/share/upgrade/rhn-enable-monitoring.pl b/spacewalk/setup/share/upgrade/rhn-enable-monitoring.pl
index 07459e4..fb7edfe 100644
--- a/spacewalk/setup/share/upgrade/rhn-enable-monitoring.pl
+++ b/spacewalk/setup/share/upgrade/rhn-enable-monitoring.pl
@@ -114,9 +114,6 @@ my %mon_config =
RHN::SatInstall->update_monitoring_config(\%mon_config);
-print "Restarting satellite services\n";
-system("/usr/sbin/rhn-satellite", "restart");
-
exit 0;
sub find_scout_key {
13 years, 7 months
backend/httpd-conf
by Michael Mraka
backend/httpd-conf/rhn/spacewalk-backend-app.conf | 1 -
backend/httpd-conf/rhn/spacewalk-backend-applet.conf | 3 +--
backend/httpd-conf/rhn/spacewalk-backend-config-management-tool.conf | 3 +--
backend/httpd-conf/rhn/spacewalk-backend-config-management.conf | 3 +--
backend/httpd-conf/rhn/spacewalk-backend-package-push.conf | 3 +++
backend/httpd-conf/rhn/spacewalk-backend-pkg-upload.conf | 3 +++
backend/httpd-conf/rhn/spacewalk-backend-sat-export-internal.conf | 4 ++++
backend/httpd-conf/rhn/spacewalk-backend-xmlrpc.conf | 1 -
backend/httpd-conf/rhn/spacewalk-backend-xp.conf | 1 -
9 files changed, 13 insertions(+), 9 deletions(-)
New commits:
commit f6f0adb974d72677d704ee3c6a6b31065a0ded4f
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Sep 21 13:31:36 2010 +0200
fixed comments in xmlrpc handler configuration files
diff --git a/backend/httpd-conf/rhn/spacewalk-backend-app.conf b/backend/httpd-conf/rhn/spacewalk-backend-app.conf
index 78b3221..526d513 100644
--- a/backend/httpd-conf/rhn/spacewalk-backend-app.conf
+++ b/backend/httpd-conf/rhn/spacewalk-backend-app.conf
@@ -1,7 +1,6 @@
# ** DO NOT EDIT **
# Configuration for the /APP handler
#
-# $Id$
<IfModule mod_python.c>
diff --git a/backend/httpd-conf/rhn/spacewalk-backend-applet.conf b/backend/httpd-conf/rhn/spacewalk-backend-applet.conf
index 4a6cf7d..bbad10d 100644
--- a/backend/httpd-conf/rhn/spacewalk-backend-applet.conf
+++ b/backend/httpd-conf/rhn/spacewalk-backend-applet.conf
@@ -1,7 +1,6 @@
# ** DO NOT EDIT **
-# Configuration for the /XMLRPC receiver
+# Configuration for the /APPLET receiver
#
-# $Id$
<IfModule mod_python.c>
diff --git a/backend/httpd-conf/rhn/spacewalk-backend-config-management-tool.conf b/backend/httpd-conf/rhn/spacewalk-backend-config-management-tool.conf
index f3107a3..e335638 100644
--- a/backend/httpd-conf/rhn/spacewalk-backend-config-management-tool.conf
+++ b/backend/httpd-conf/rhn/spacewalk-backend-config-management-tool.conf
@@ -1,7 +1,6 @@
# ** DO NOT EDIT **
-# Configuration for the /APP handler
+# Configuration for the /CONFIG-MANAGEMENT-TOOL handler
#
-# $Id$
<IfModule mod_python.c>
diff --git a/backend/httpd-conf/rhn/spacewalk-backend-config-management.conf b/backend/httpd-conf/rhn/spacewalk-backend-config-management.conf
index 349673d..3d68481 100644
--- a/backend/httpd-conf/rhn/spacewalk-backend-config-management.conf
+++ b/backend/httpd-conf/rhn/spacewalk-backend-config-management.conf
@@ -1,7 +1,6 @@
# ** DO NOT EDIT **
-# Configuration for the /APP handler
+# Configuration for the /CONFIG-MANAGEMENT handler
#
-# $Id$
<IfModule mod_python.c>
diff --git a/backend/httpd-conf/rhn/spacewalk-backend-package-push.conf b/backend/httpd-conf/rhn/spacewalk-backend-package-push.conf
index ce9b602..4cf0dcd 100644
--- a/backend/httpd-conf/rhn/spacewalk-backend-package-push.conf
+++ b/backend/httpd-conf/rhn/spacewalk-backend-package-push.conf
@@ -1,4 +1,7 @@
# ** DO NOT EDIT **
+# Configuration for the /PACKAGE-PUSH handler
+#
+
<IfModule mod_python.c>
<Location /PACKAGE-PUSH>
diff --git a/backend/httpd-conf/rhn/spacewalk-backend-pkg-upload.conf b/backend/httpd-conf/rhn/spacewalk-backend-pkg-upload.conf
index a2b9b2e..f9ef195 100644
--- a/backend/httpd-conf/rhn/spacewalk-backend-pkg-upload.conf
+++ b/backend/httpd-conf/rhn/spacewalk-backend-pkg-upload.conf
@@ -1,4 +1,7 @@
# ** DO NOT EDIT **
+# Configuration for the /PKG-UPLOAD handler
+#
+
<IfModule mod_python.c>
<Location /PKG-UPLOAD>
diff --git a/backend/httpd-conf/rhn/spacewalk-backend-sat-export-internal.conf b/backend/httpd-conf/rhn/spacewalk-backend-sat-export-internal.conf
index 4bb1a83..7c05395 100644
--- a/backend/httpd-conf/rhn/spacewalk-backend-sat-export-internal.conf
+++ b/backend/httpd-conf/rhn/spacewalk-backend-sat-export-internal.conf
@@ -1,4 +1,8 @@
# ** DO NOT EDIT **
+# Configuration for the /SAT-DUMP-INTERNAL handler
+#
+#
+
<IfModule mod_python.c>
<Location /SAT-DUMP-INTERNAL>
diff --git a/backend/httpd-conf/rhn/spacewalk-backend-xmlrpc.conf b/backend/httpd-conf/rhn/spacewalk-backend-xmlrpc.conf
index 9e5b12b..bf1d1c0 100644
--- a/backend/httpd-conf/rhn/spacewalk-backend-xmlrpc.conf
+++ b/backend/httpd-conf/rhn/spacewalk-backend-xmlrpc.conf
@@ -1,7 +1,6 @@
# ** DO NOT EDIT **
# Configuration for the /XMLRPC receiver
#
-# $Id$
<IfModule mod_python.c>
diff --git a/backend/httpd-conf/rhn/spacewalk-backend-xp.conf b/backend/httpd-conf/rhn/spacewalk-backend-xp.conf
index 3fe0ab8..5565ddf 100644
--- a/backend/httpd-conf/rhn/spacewalk-backend-xp.conf
+++ b/backend/httpd-conf/rhn/spacewalk-backend-xp.conf
@@ -1,7 +1,6 @@
# ** DO NOT EDIT **
# Configuration for /XP receiver
#
-# $Id$
<IfModule mod_python.c>
13 years, 7 months
.gitignore java/code web/html
by Lukas Zapletal
.gitignore | 1
java/code/src/com/redhat/rhn/frontend/action/help/ChatAction.java | 28 ++++++++++
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 12 ++++
java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml | 3 -
java/code/webapp/WEB-INF/nav/sitenav.xml | 3 -
java/code/webapp/WEB-INF/pages/help/chatindex.jsp | 24 ++++++++
java/code/webapp/WEB-INF/struts-config.xml | 6 ++
web/html/nav/sitenav-authenticated.xml | 3 -
web/html/nav/sitenav.xml | 3 -
9 files changed, 75 insertions(+), 8 deletions(-)
New commits:
commit c108740c0f1e6bd52b8f8ec02541e97edd851f0e
Author: Lukas Zapletal <lzap+git(a)redhat.com>
Date: Tue Sep 21 15:54:04 2010 +0200
630585 - about-chat now points to proper channel (branding)
diff --git a/.gitignore b/.gitignore
index b8a5f20..836f5db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,3 +39,4 @@ web/html/templates
web/html/bootstrap/
web/rpm-build
web/rhn-web-*.tar.gz
+sqlnet.log
diff --git a/java/code/src/com/redhat/rhn/frontend/action/help/ChatAction.java b/java/code/src/com/redhat/rhn/frontend/action/help/ChatAction.java
new file mode 100644
index 0000000..0f6e8cf
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/action/help/ChatAction.java
@@ -0,0 +1,28 @@
+package com.redhat.rhn.frontend.action.help;
+
+import com.redhat.rhn.common.conf.Config;
+import com.redhat.rhn.common.conf.ConfigDefaults;
+import com.redhat.rhn.domain.user.User;
+import com.redhat.rhn.frontend.struts.RequestContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+
+/**
+ * Static action page.
+ *
+ * @author Lukas Zapletal
+ */
+public class ChatAction extends org.apache.struts.action.Action {
+
+ /** {@inheritDoc} */
+ public ActionForward execute(ActionMapping mapping,
+ ActionForm formIn,
+ HttpServletRequest request,
+ HttpServletResponse response) {
+
+ return mapping.findForward("default");
+ }
+}
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 8e47995..5314185 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
@@ -21465,6 +21465,18 @@ given channel.</source>
<context context-type="sourcefile">/rhn/help/Search</context>
</context-group>
</trans-unit>
+ <trans-unit id="help.jsp.chat">
+ <source>IRC Chat</source>
+ </trans-unit>
+ <trans-unit id="help.jsp.chatinfo">
+ <source>Please contact Red Hat Support for direct assistance for RHN Satellite.
+This page allows you to join an IRC chat room for discussions with other users of
+RHN Satellite and not an official means of gaining support for RHN Satellite
+from Red Hat.</source>
+ </trans-unit>
+ <trans-unit id="help.jsp.chatlink">
+ <source>Access <a href="http://webchat.freenode.net?channels=#spacewalk" target="_blank">#spacewalk</a> channel on IRC.</source>
+ </trans-unit>
<trans-unit id="help.jsp.refguide">
<source>@@PRODUCT_NAME@@ Reference Guide</source>
</trans-unit>
diff --git a/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml b/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml
index 97e2870..1cc4f2e 100644
--- a/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml
+++ b/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml
@@ -326,8 +326,7 @@
<rhn-tab name="Sample Scripts" url="/rhn/apidoc/scripts.jsp" />
</rhn-tab>
<rhn-tab name="Search" url="/rhn/help/Search.do" />
- <rhn-tab name="Chat" url="http://webchat.freenode.net/?channels=#spacewalk"
- target="_blank" />
+ <rhn-tab name="Chat" url="/rhn/help/Chat.do" />
</rhn-tab>
</rhn-navi-tree>
diff --git a/java/code/webapp/WEB-INF/nav/sitenav.xml b/java/code/webapp/WEB-INF/nav/sitenav.xml
index 719d780..88a2aa3 100644
--- a/java/code/webapp/WEB-INF/nav/sitenav.xml
+++ b/java/code/webapp/WEB-INF/nav/sitenav.xml
@@ -35,8 +35,7 @@
<rhn-tab name="Sample Scripts" url="/rhn/apidoc/scripts.jsp" />
</rhn-tab>
<rhn-tab name="Search" url="/rhn/help/Search.do" />
- <rhn-tab name="Chat"
- url="http://webchat.freenode.net?channels=#spacewalk" target="_blank" />
+ <rhn-tab name="Chat" url="/rhn/help/Chat.do" />
</rhn-tab>
diff --git a/java/code/webapp/WEB-INF/pages/help/chatindex.jsp b/java/code/webapp/WEB-INF/pages/help/chatindex.jsp
new file mode 100644
index 0000000..d0a8471
--- /dev/null
+++ b/java/code/webapp/WEB-INF/pages/help/chatindex.jsp
@@ -0,0 +1,24 @@
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn" %>
+<%@ taglib uri="http://rhn.redhat.com/tags/list" prefix="rl" %>
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
+
+<html>
+<head>
+<script type="text/javascript" src="/javascript/highlander.js"></script>
+</head>
+<body>
+
+ <h1><img src="/img/rhn-icon-help-h1.gif" alt="help" /><bean:message key="help.jsp.chat"/></h1>
+
+ <ul id="help-url-list">
+
+ <div><bean:message key="help.jsp.chatinfo"/></div>
+ <br/><br/>
+ <div><bean:message key="help.jsp.chatlink"/></div>
+
+ </ul>
+
+</body>
+</html>
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index 674b833..f7138ba 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -6884,6 +6884,12 @@
path="/help/Search.do" redirect="true"/>
</action>
+ <action path="/help/Chat"
+ scope="request"
+ type="com.redhat.rhn.frontend.action.help.ChatAction">
+ <forward name="default" path="/WEB-INF/pages/help/chatindex.jsp"/>
+ </action>
+
<action path="/help/index"
scope="request"
type="com.redhat.rhn.frontend.action.help.HelpAction">
diff --git a/web/html/nav/sitenav-authenticated.xml b/web/html/nav/sitenav-authenticated.xml
index 59db59c..6948884 100644
--- a/web/html/nav/sitenav-authenticated.xml
+++ b/web/html/nav/sitenav-authenticated.xml
@@ -255,8 +255,7 @@
</rhn-tab>
<rhn-tab name="API" url="/rhn/apidoc/index.jsp" />
<rhn-tab name="Search" url="/rhn/help/Search.do" />
- <rhn-tab name="Chat" url="http://webchat.freenode.net/?channels=#spacewalk"
- target="_blank" />
+ <rhn-tab name="Chat" url="/rhn/help/Chat.do" />
</rhn-tab>
</rhn-navi-tree>
diff --git a/web/html/nav/sitenav.xml b/web/html/nav/sitenav.xml
index 6d9e3fa..9775219 100644
--- a/web/html/nav/sitenav.xml
+++ b/web/html/nav/sitenav.xml
@@ -35,8 +35,7 @@
<rhn-tab name="Sample Scripts" url="/rhn/apidoc/scripts.jsp" />
</rhn-tab>
<rhn-tab name="Search" url="/rhn/help/Search.do" />
- <rhn-tab name="Chat"
- url="http://webchat.freenode.net?channels=#spacewalk" target="_blank" />
+ <rhn-tab name="Chat" url="/rhn/help/Chat.do" />
</rhn-tab>
13 years, 7 months
Changes to 'refs/tags/spacecmd-0.6.1-1'
by aparsons
Tag 'spacecmd-0.6.1-1' created by Aron Parsons <aparsons(a)redhat.com> at 2010-09-20 18:08 +0000
Tagging package [spacecmd] version [0.6.1-1] in directory [spacecmd/].
Changes since spacewalk-backend-1.2.14-1:
Aron Parsons (10):
spacecmd: remove prompts for summary/description when creating software channels and just use the name
spacecmd: clarify what 'Original State' means when cloning a software channel
spacecmd: show the last checkin time in report_inactivesystems
spacecmd: cleanup column headers in report_outofdatesystems
spacecmd: revert to the old-style of errata merging due to bugzilla 591291
spacecmd: allow --debug to be passed multiple times
spacecmd: avoid proxy timeouts when cloning errata by doing them individually
spacecmd: added new function softwarechannel_listallpackages
spacecmd: support symlinks, selinux contexts and revisions in configchannel_*
Automatic commit of package [spacecmd] release [0.6.1-1].
---
rel-eng/packages/spacecmd | 2
spacecmd/spacecmd.spec | 21 +++
spacecmd/src/bin/spacecmd | 6
spacecmd/src/lib/configchannel.py | 217 +++++++++++++++++++++++-------------
spacecmd/src/lib/misc.py | 6
spacecmd/src/lib/report.py | 28 ++--
spacecmd/src/lib/softwarechannel.py | 199 +++++++++++++++++++++++----------
7 files changed, 327 insertions(+), 152 deletions(-)
---
13 years, 7 months
10 commits - rel-eng/packages spacecmd/spacecmd.spec spacecmd/src
by aparsons
rel-eng/packages/spacecmd | 2
spacecmd/spacecmd.spec | 21 +++
spacecmd/src/bin/spacecmd | 6
spacecmd/src/lib/configchannel.py | 217 +++++++++++++++++++++++-------------
spacecmd/src/lib/misc.py | 6
spacecmd/src/lib/report.py | 28 ++--
spacecmd/src/lib/softwarechannel.py | 199 +++++++++++++++++++++++----------
7 files changed, 327 insertions(+), 152 deletions(-)
New commits:
commit 1d031d8166ab5c17d1481b7d23911d03126aae41
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Mon Sep 20 14:08:45 2010 -0400
Automatic commit of package [spacecmd] release [0.6.1-1].
diff --git a/rel-eng/packages/spacecmd b/rel-eng/packages/spacecmd
index 11d4954..7d89031 100644
--- a/rel-eng/packages/spacecmd
+++ b/rel-eng/packages/spacecmd
@@ -1 +1 @@
-0.5.7-1 spacecmd/
+0.6.1-1 spacecmd/
diff --git a/spacecmd/spacecmd.spec b/spacecmd/spacecmd.spec
index 90712d9..4b6362a 100644
--- a/spacecmd/spacecmd.spec
+++ b/spacecmd/spacecmd.spec
@@ -4,7 +4,7 @@
%endif
Name: spacecmd
-Version: 0.5.7
+Version: 0.6.1
Release: 1%{?dist}
Summary: Command-line interface to Spacewalk and Satellite servers
@@ -57,6 +57,25 @@ touch %{buildroot}/%{python_sitelib}/spacecmd/__init__.py
%doc %{_mandir}/man1/spacecmd.1.gz
%changelog
+* Mon Sep 20 2010 Aron Parsons <aparsons(a)redhat.com> 0.6.1-1
+- support symlinks, selinux contexts and revisions in configchannel_*
+ (aparsons(a)redhat.com)
+- added new function softwarechannel_listallpackages
+ (aparsons(a)redhat.com)
+- avoid proxy timeouts when cloning errata by doing them individually
+ (aparsons(a)redhat.com)
+- allow --debug to be passed multiple times (aparsons(a)redhat.com)
+- revert to the old-style of errata merging due to bugzilla 591291
+ (aparsons(a)redhat.com)
+- cleanup column headers in report_outofdatesystems
+ (aparsons(a)redhat.com)
+- show the last checkin time in report_inactivesystems
+ (aparsons(a)redhat.com)
+- clarify what 'Original State' means when cloning a software channel
+ (aparsons(a)redhat.com)
+- remove prompts for summary/description when creating software
+ channels and just use the name (aparsons(a)redhat.com)
+
* Fri Aug 20 2010 Aron Parsons <aparsons(a)redhat.com> 0.5.7-1
- simplify checks for debug mode (aparsons(a)redhat.com)
- enable verbose mode for xmlrpclib when debugging is enabled
commit 74084dd382d12205573a8a893def8748ac44fe41
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Mon Sep 20 14:07:12 2010 -0400
spacecmd: support symlinks, selinux contexts and revisions in configchannel_*
diff --git a/spacecmd/src/lib/configchannel.py b/spacecmd/src/lib/configchannel.py
index 600ea8d..5cf224d 100644
--- a/spacecmd/src/lib/configchannel.py
+++ b/spacecmd/src/lib/configchannel.py
@@ -99,7 +99,7 @@ def do_configchannel_listfiles(self, args, doreturn=False):
def help_configchannel_filedetails(self):
print 'configchannel_filedetails: Show the details of a file'
print 'in a configuration channel'
- print 'usage: configchannel_filedetails CHANNEL <FILE ...>'
+ print 'usage: configchannel_filedetails CHANNEL FILE [REVISION]'
def complete_configchannel_filedetails(self, text, line, beg, end):
parts = line.split(' ')
@@ -120,47 +120,60 @@ def do_configchannel_filedetails(self, args):
self.help_configchannel_filedetails()
return
- add_separator = False
-
channel = args[0]
- filenames = args[1:]
+ filename = args[1]
+ revision = None
+
+ try:
+ revision = int(args[2])
+ except:
+ pass
# the server return a null exception if an invalid file is passed
valid_files = self.do_configchannel_listfiles(channel, True)
- for f in filenames:
- if not f in valid_files:
- filenames.remove(f)
- logging.warning('%s is not in this configuration channel' % f)
- continue
+ if not filename in valid_files:
+ logging.warning('%s is not in this configuration channel' % filename)
+ return
- files = self.client.configchannel.lookupFileInfo(self.session,
- channel,
- filenames)
+ if revision:
+ details = self.client.configchannel.lookupFileInfo(self.session,
+ channel,
+ filename,
+ revision)
+ else:
+ results = self.client.configchannel.lookupFileInfo(self.session,
+ channel,
+ [ filename ])
- for f in files:
- if add_separator: print self.SEPARATOR
- add_separator = True
+ # grab the first item since we only do one file
+ details = results[0]
- print 'File: %s' % f.get('path')
- print 'Type: %s' % f.get('type')
- print 'Revision: %i' % f.get('revision')
- print 'Created: %s' % f.get('creation')
- print 'Modified: %s' % f.get('modified')
+ print 'File: %s' % details.get('path')
+ print 'Type: %s' % details.get('type')
+ print 'Revision: %i' % details.get('revision')
+ print 'Created: %s' % details.get('creation')
+ print 'Modified: %s' % details.get('modified')
+ if details.get('type') == 'symlink':
+ print
+ print 'Target Path: %s' % details.get('target_path')
+ else:
print
- print 'Owner: %s' % f.get('owner')
- print 'Group: %s' % f.get('group')
- print 'Mode: %s' % f.get('permissions_mode')
+ print 'Owner: %s' % details.get('owner')
+ print 'Group: %s' % details.get('group')
+ print 'Mode: %s' % details.get('permissions_mode')
+
+ print 'SELinux Context: %s' % details.get('selinux_ctx')
- if f.get('type') == 'file':
- print 'MD5: %s' % f.get('md5')
- print 'Binary: %s' % f.get('binary')
+ if details.get('type') == 'file':
+ print 'MD5: %s' % details.get('md5')
+ print 'Binary: %s' % details.get('binary')
- if not f.get('binary'):
- print
- print 'Contents'
- print '--------'
- print f.get('contents')
+ if not details.get('binary'):
+ print
+ print 'Contents'
+ print '--------'
+ print details.get('contents')
####################
@@ -269,11 +282,14 @@ def do_configchannel_addfile(self, args, path=''):
channel = args[0]
- # defaults
+ # defaults
owner = 'root'
group = 'root'
mode = '644'
contents = ''
+ target_path = ''
+ selinux_ctx = ''
+ symlink = False
while path == '':
path = prompt_user('Path:')
@@ -294,57 +310,104 @@ def do_configchannel_addfile(self, args, path=''):
group = info.get('group')
mode = info.get('permissions_mode')
contents = info.get('contents')
+ target_path = info.get('target_path')
+ selinux_ctx = info.get('selinux_ctx')
- userinput = prompt_user('Directory [y/N]:')
- if re.match('y', userinput, re.I):
- directory = True
- else:
- directory = False
+ if info.get('type') == 'symlink':
+ symlink = True
+
+ # if this is a new file, ask if it's a symlink
+ if not symlink:
+ userinput = prompt_user('Symlink [y/N]:')
+ if re.match('y', userinput, re.I):
+ symlink = True
+ else:
+ symlink = False
+
+ if symlink:
+ target_input = prompt_user('Target Path [%s]:' % target_path)
+ selinux_input = prompt_user('SELinux Context [%s]:' % selinux_ctx)
- owner_input = prompt_user('Owner [%s]:' % owner)
- group_input = prompt_user('Group [%s]:' % group)
- mode_input = prompt_user('Permissions [%s]:' % mode)
-
- if owner_input:
- owner = owner_input
+ if target_input:
+ target_path = target_input
- if group_input:
- group = group_input
+ if selinux_input:
+ selinux_ctx = selinux_input
- if mode_input:
- mode = mode_input
+ file_info = { 'target_path' : target_path,
+ 'selinux_ctx' : selinux_ctx }
- if not directory:
- if contents:
- template = contents
+ print 'File: %s' % path
+ print 'Target Path: %s' % target_path
+ print 'SELinux Context: %s' % selinux_ctx
+ else:
+ userinput = prompt_user('Directory [y/N]:')
+ if re.match('y', userinput, re.I):
+ directory = True
else:
- template = ''
+ directory = False
- contents = editor(template = template, delete = True)
+ owner_input = prompt_user('Owner [%s]:' % owner)
+ group_input = prompt_user('Group [%s]:' % group)
+ mode_input = prompt_user('Permissions [%s]:' % mode)
+ selinux_input = prompt_user('SELinux Context [%s]:' % selinux_ctx)
- file_info = { 'contents' : ''.join(contents),
- 'owner' : owner,
- 'group' : group,
- 'permissions' : mode }
+ if owner_input:
+ owner = owner_input
- print 'File: %s' % path
- print 'Directory: %s' % directory
- print 'Owner: %s' % file_info['owner']
- print 'Group: %s' % file_info['group']
- print 'Mode: %s' % file_info['permissions']
+ if group_input:
+ group = group_input
- if not directory:
- print
- print 'Contents'
- print '--------'
- print file_info['contents']
+ if mode_input:
+ mode = mode_input
+
+ if selinux_input:
+ selinux_ctx = selinux_input
+
+ if not directory:
+ if contents:
+ template = contents
+ else:
+ template = ''
+
+ contents = editor(template = template, delete = True)
+
+ file_info = { 'contents' : ''.join(contents),
+ 'owner' : owner,
+ 'group' : group,
+ 'selinux_ctx' : selinux_ctx,
+ 'permissions' : mode }
+
+ print 'File: %s' % path
+ print 'Directory: %s' % directory
+ print 'Owner: %s' % file_info['owner']
+ print 'Group: %s' % file_info['group']
+ print 'Mode: %s' % file_info['permissions']
+ print 'SELinux Context: %s' % selinux_ctx
+
+ if not directory:
+ print
+ print 'Contents'
+ print '--------'
+ print file_info['contents']
+
+ # selinux_ctx can't be None
+ if not file_info['selinux_ctx']:
+ file_info['selinux_ctx'] = ''
if self.user_confirm():
- self.client.configchannel.createOrUpdatePath(self.session,
- channel,
- path,
- directory,
- file_info)
+ if symlink:
+ print file_info
+ self.client.configchannel.createOrUpdateSymlink(self.session,
+ channel,
+ path,
+ file_info)
+ else:
+ self.client.configchannel.createOrUpdatePath(self.session,
+ channel,
+ path,
+ directory,
+ file_info)
####################
@@ -356,17 +419,17 @@ def complete_configchannel_updatefile(self, text, line, beg, end):
parts = line.split(' ')
if len(parts) == 2:
- return tab_completer(self.do_configchannel_list('', True),
+ return tab_completer(self.do_configchannel_list('', True),
text)
elif len(parts) > 2:
channel = parts[1]
return tab_completer(self.do_configchannel_listfiles(channel,
- True),
+ True),
text)
def do_configchannel_updatefile(self, args):
args = parse_arguments(args)
-
+
if len(args) != 2:
self.help_configchannel_updatefile()
return
@@ -383,17 +446,17 @@ def complete_configchannel_removefiles(self, text, line, beg, end):
parts = line.split(' ')
if len(parts) == 2:
- return tab_completer(self.do_configchannel_list('', True),
+ return tab_completer(self.do_configchannel_list('', True),
text)
elif len(parts) > 2:
channel = parts[1]
return tab_completer(self.do_configchannel_listfiles(channel,
- True),
+ True),
text)
def do_configchannel_removefiles(self, args):
args = parse_arguments(args)
-
+
if len(args) < 2:
self.help_configchannel_removefiles()
return
commit 439fcb1ca234c90d278b2d9bcb814bcd647654dd
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Mon Sep 20 12:51:43 2010 -0400
spacecmd: added new function softwarechannel_listallpackages
diff --git a/spacecmd/src/lib/softwarechannel.py b/spacecmd/src/lib/softwarechannel.py
index 361ac2f..dfaa035 100644
--- a/spacecmd/src/lib/softwarechannel.py
+++ b/spacecmd/src/lib/softwarechannel.py
@@ -156,6 +156,39 @@ def do_softwarechannel_listpackages(self, args, doreturn=False):
####################
+def help_softwarechannel_listallpackages(self):
+ print 'softwarechannel_listallpackages: List all packages in a channel'
+ print 'usage: softwarechannel_listallpackages CHANNEL'
+
+def complete_softwarechannel_listallpackages(self, text, line, beg, end):
+ if len(line.split(' ')) == 2:
+ return tab_completer(self.do_softwarechannel_list('', True),
+ text)
+ else:
+ return []
+
+def do_softwarechannel_listallpackages(self, args, doreturn=False):
+ args = parse_arguments(args)
+
+ if not len(args):
+ self.help_softwarechannel_listallpackages()
+ return
+
+ channel = args[0]
+
+ packages = self.client.channel.software.listAllPackages(self.session,
+ channel)
+
+ packages = build_package_names(packages)
+
+ if doreturn:
+ return packages
+ else:
+ if len(packages):
+ print '\n'.join(sorted(packages))
+
+####################
+
def help_softwarechannel_details(self):
print 'softwarechannel_details: Show the details of a software channel'
print 'usage: softwarechannel_details <CHANNEL ...>'
commit 4242977a20741ca3c6bcaaee49d0572d468df80e
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Mon Sep 20 12:47:54 2010 -0400
spacecmd: avoid proxy timeouts when cloning errata by doing them individually
diff --git a/spacecmd/src/lib/softwarechannel.py b/spacecmd/src/lib/softwarechannel.py
index b3caa1e..361ac2f 100644
--- a/spacecmd/src/lib/softwarechannel.py
+++ b/spacecmd/src/lib/softwarechannel.py
@@ -595,6 +595,12 @@ def do_softwarechannel_adderrata(self, args):
errata = filter_results([ e.get('advisory_name') for e in source_errata ],
errata_wanted)
+ # keep the details for our matching errata so we can use them later
+ errata_details = []
+ for erratum in source_errata:
+ if erratum.get('advisory_name') in errata:
+ errata_details.append(erratum)
+
# get the packages that resolve these errata so we can add them
# to the channel afterwards
package_ids = []
@@ -613,9 +619,8 @@ def do_softwarechannel_adderrata(self, args):
logging.warning('No errata to add')
return
- print 'Errata'
- print '------'
- print '\n'.join(sorted(errata))
+ # show the user which errata will be added
+ print_errata_list(errata_details)
print
print 'Packages'
@@ -628,12 +633,15 @@ def do_softwarechannel_adderrata(self, args):
if not self.user_confirm('Add these errata and packages [y/N]:'): return
- # add the errata to the destination channel
- logging.debug('Cloning errata into %s' % dest_channel)
- self.client.errata.clone(self.session, dest_channel, errata)
+ # clone each erratum individually because the process is slow and it can
+ # lead to timeouts on the server
+ logging.info('Cloning errata into %s' % dest_channel)
+ for erratum in errata:
+ logging.debug('Cloning %s' % erratum)
+ self.client.errata.clone(self.session, dest_channel, [erratum])
# add the affected packages to the channel
- logging.debug('Adding required packages to %s' % dest_channel)
+ logging.info('Adding required packages to %s' % dest_channel)
self.client.channel.software.addPackages(self.session,
dest_channel,
package_ids)
commit 5658c2cb7061a0eb4a07a12f283dd0f36cfbafaf
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Mon Sep 20 12:12:45 2010 -0400
spacecmd: allow --debug to be passed multiple times
diff --git a/spacecmd/src/bin/spacecmd b/spacecmd/src/bin/spacecmd
index efb6e4b..e0f14f3 100755
--- a/spacecmd/src/bin/spacecmd
+++ b/spacecmd/src/bin/spacecmd
@@ -43,8 +43,8 @@ if __name__ == '__main__':
help='answer yes for all questions'),
Option('-q', '--quiet', action='store_true',
help='print only error messages'),
- Option('-d', '--debug', action='store_true',
- help='print debug messages'),
+ Option('-d', '--debug', action='count',
+ help='print debug messages (can be passed multiple times)'),
]
usage = 'usage: %prog [options] [command]'
@@ -66,7 +66,7 @@ if __name__ == '__main__':
config = SafeConfigParser()
config.read(conf_file)
- boolean_opts = [ 'nossl', 'debug' ]
+ boolean_opts = [ 'nossl' ]
string_opts = [ 'server', 'username', 'password' ]
for key in boolean_opts:
diff --git a/spacecmd/src/lib/misc.py b/spacecmd/src/lib/misc.py
index c522f7e..24dc3a4 100644
--- a/spacecmd/src/lib/misc.py
+++ b/spacecmd/src/lib/misc.py
@@ -191,9 +191,13 @@ def do_login(self, args):
server_url = '%s://%s/rpc/api' % (proto, server)
+ verbose_xmlrpc = False
+ if self.options.debug > 1:
+ verbose_xmlrpc = True
+
# connect to the server
logging.debug('Connecting to %s' % (server_url))
- self.client = xmlrpclib.Server(server_url, verbose = self.options.debug)
+ self.client = xmlrpclib.Server(server_url, verbose = verbose_xmlrpc)
# check the API to verify connectivity
try:
commit 8d4544fbdab9a5dcebdcc06a364866003e0db03f
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Mon Sep 20 12:10:31 2010 -0400
spacecmd: revert to the old-style of errata merging due to bugzilla 591291
This reverts commit e499a78102642416c30bd36a88a78bf6cde28d45.
diff --git a/spacecmd/src/lib/softwarechannel.py b/spacecmd/src/lib/softwarechannel.py
index b289aa9..b3caa1e 100644
--- a/spacecmd/src/lib/softwarechannel.py
+++ b/spacecmd/src/lib/softwarechannel.py
@@ -512,89 +512,131 @@ def do_softwarechannel_removepackages(self, args):
####################
+def help_softwarechannel_adderratabydate(self):
+ print 'softwarechannel_adderratabydate: Add errata from one channel ' + \
+ 'into another channel based on a date range'
+ print 'usage: softwarechannel_adderratabydate SOURCE DEST BEGINDATE ENDDATE'
+
+def complete_softwarechannel_adderratabydate(self, text, line, beg, end):
+ parts = line.split(' ')
+
+ if len(parts) <= 3:
+ return tab_completer(self.do_softwarechannel_list('', True),
+ text)
+
+def do_softwarechannel_adderratabydate(self, args):
+ args = parse_arguments(args)
+
+ if len(args) != 4:
+ self.help_softwarechannel_adderratabydate()
+ return
+
+ source_channel = args[0]
+ dest_channel = args[1]
+ begin_date = args[2]
+ end_date = args[3]
+
+ if not re.match('\d{8}', begin_date):
+ logging.error('%s is an invalid date' % begin_date)
+ return
+
+ if not re.match('\d{8}', end_date):
+ logging.error('%s is an invalid date' % end_date)
+ return
+
+ # get the errata that are in the given date range
+ logging.debug('Retrieving list of errata from source channel')
+ errata = \
+ self.client.channel.software.listErrata(self.session,
+ source_channel,
+ parse_time_input(begin_date),
+ parse_time_input(end_date))
+
+ if not len(errata):
+ logging.warning('No errata found between the given dates')
+ return
+
+ # call adderrata with the list of errata from the date range
+ return self.do_softwarechannel_adderrata('%s %s %s' % (
+ source_channel,
+ dest_channel,
+ ' '.join([ e.get('advisory_name') for e in errata ])))
+
+####################
+
def help_softwarechannel_adderrata(self):
print 'softwarechannel_adderrata: Add errata from one channel ' + \
'into another channel'
- print 'usage: softwarechannel_adderrata SOURCE DEST [BEGINDATE] [ENDDATE]'
+ print 'usage: softwarechannel_adderrata SOURCE DEST <ERRATA:search:XXX ...>'
def complete_softwarechannel_adderrata(self, text, line, beg, end):
parts = line.split(' ')
if len(parts) <= 3:
return tab_completer(self.do_softwarechannel_list('', True), text)
+ elif len(parts) > 3:
+ return self.tab_complete_errata(text)
def do_softwarechannel_adderrata(self, args):
args = parse_arguments(args)
- if len(args) < 2:
+ if len(args) < 3:
self.help_softwarechannel_adderrata()
return
source_channel = args[0]
dest_channel = args[1]
+ errata_wanted = self.expand_errata(args[2:])
- if len(args) >= 3:
- begin_date = parse_time_input(args[2])
- if not begin_date: return
- else:
- begin_date = None
+ logging.debug('Retrieving the list of errata from source channel')
+ source_errata = self.client.channel.software.listErrata(self.session,
+ source_channel)
- if len(args) == 4:
- end_date = parse_time_input(args[3])
- if not end_date: return
- else:
- end_date = parse_time_input('now')
+ errata = filter_results([ e.get('advisory_name') for e in source_errata ],
+ errata_wanted)
- logging.debug('Retrieving the list of errata from %s' % source_channel)
+ # get the packages that resolve these errata so we can add them
+ # to the channel afterwards
+ package_ids = []
+ for erratum in errata:
+ logging.debug('Retrieving packages for errata %s' % erratum)
- if begin_date:
- source_errata = self.client.channel.software.listErrata(self.session,
- source_channel,
- begin_date,
- end_date)
- else:
- source_errata = self.client.channel.software.listErrata(self.session,
- source_channel)
+ # get the packages affected by this errata
+ packages = self.client.errata.listPackages(self.session, erratum)
- logging.debug('Retrieving the list of errata from %s' % dest_channel)
- dest_errata = self.client.channel.software.listErrata(self.session,
- dest_channel)
+ # only add packages that exist in the source channel
+ for package in packages:
+ if source_channel in package.get('providing_channels'):
+ package_ids.append(package.get('id'))
- dest_errata_names = [ e.get('advisory_name') for e in dest_errata ]
+ if not len(errata):
+ logging.warning('No errata to add')
+ return
- # generate a list of errata likely to be merged by the API call
- likely = []
- for erratum in source_errata:
- if erratum.get('advisory_name') not in dest_errata_names:
- likely.append(erratum)
+ print 'Errata'
+ print '------'
+ print '\n'.join(sorted(errata))
- if len(likely):
- print_errata_list(likely)
- else:
- logging.warning('No errata to add to the channel')
- return
+ print
+ print 'Packages'
+ print '--------'
+ print '\n'.join(sorted([ self.get_package_name(p) for p in package_ids ]))
print
- print 'Total Errata: %i' % len(likely)
+ print 'Total Errata: %s' % str(len(errata)).rjust(3)
+ print 'Total Packages: %s' % str(len(package_ids)).rjust(3)
- if not self.user_confirm('Add these errata [y/N]:'): return
+ if not self.user_confirm('Add these errata and packages [y/N]:'): return
# add the errata to the destination channel
- logging.debug('Adding errata to %s' % dest_channel)
-
- if begin_date:
- added = self.client.channel.software.mergeErrata(self.session,
- source_channel,
- dest_channel,
- begin_date,
- end_date)
- else:
- added = self.client.channel.software.mergeErrata(self.session,
- source_channel,
- dest_channel)
+ logging.debug('Cloning errata into %s' % dest_channel)
+ self.client.errata.clone(self.session, dest_channel, errata)
- logging.info('The following errata were added to the channel:')
- print_errata_list(added)
+ # add the affected packages to the channel
+ logging.debug('Adding required packages to %s' % dest_channel)
+ self.client.channel.software.addPackages(self.session,
+ dest_channel,
+ package_ids)
# regenerate the errata cache since we just cloned errata
self.generate_errata_cache(True)
commit 5252253385cbb396b4e672bbb982183ff8a223fe
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Mon Sep 20 10:50:22 2010 -0400
spacecmd: cleanup column headers in report_outofdatesystems
diff --git a/spacecmd/src/lib/report.py b/spacecmd/src/lib/report.py
index 7efc33c..4798e65 100644
--- a/spacecmd/src/lib/report.py
+++ b/spacecmd/src/lib/report.py
@@ -101,8 +101,9 @@ def do_report_outofdatesystems(self, args):
report[system.get('name')] = len(packages)
if len(report):
- print '%s Packages' % ('System'.ljust(max_size))
- print '%s --------' % ('------'.ljust(max_size))
+ print '%s %s' % ('System'.ljust(max_size), 'Packages')
+ print ('-' * max_size) + ' --------'
+
for system in sorted(report):
print '%s %s' % \
(system.ljust(max_size), str(report[system]).rjust(3))
commit 4369f02fc32be1d0cb9494dd619d59e60beea13c
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Mon Sep 20 10:44:12 2010 -0400
spacecmd: show the last checkin time in report_inactivesystems
diff --git a/spacecmd/src/lib/report.py b/spacecmd/src/lib/report.py
index d6995f2..7efc33c 100644
--- a/spacecmd/src/lib/report.py
+++ b/spacecmd/src/lib/report.py
@@ -20,6 +20,7 @@
# NOTE: the 'self' variable is an instance of SpacewalkShell
+from operator import itemgetter
from spacecmd.utils import *
def help_report_entitlements(self):
@@ -55,20 +56,28 @@ def help_report_inactivesystems(self):
def do_report_inactivesystems(self, args):
args = parse_arguments(args)
+ # allow the user to set a limit on the number of days
if len(args) == 1:
try:
days = int(args[0])
except ValueError:
- days = 365
+ # default to a week when passed a bad argument
+ days = 7
systems = self.client.system.listInactiveSystems(self.session, days)
else:
+ # use the server's default period if no argument was passed
systems = self.client.system.listInactiveSystems(self.session)
- systems = [ s.get('name') for s in systems ]
-
if len(systems):
- print '\n'.join(sorted(systems))
+ max_size = max_length([ s.get('name') for s in systems ])
+
+ print '%s %s' % ('System'.ljust(max_size), 'Last Checkin')
+ print ('-' * max_size) + ' ------------'
+
+ for s in sorted(systems, key=itemgetter('name')):
+ print '%s %s' % (s.get('name').ljust(max_size),
+ s.get('last_checkin'))
####################
@@ -79,11 +88,7 @@ def help_report_outofdatesystems(self):
def do_report_outofdatesystems(self, args):
systems = self.client.system.listOutOfDateSystems(self.session)
- #XXX: max(list, key=len) in >2.5
- max_size = 0
- for system in systems:
- size = len(system.get('name'))
- if size > max_size: max_size = size
+ max_size = max_length([ s.get('name') for s in systems ])
report = {}
for system in systems:
commit 5c8592f75a8d80dd0ccbca5c577f07c19b2c6cde
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Mon Sep 20 10:27:43 2010 -0400
spacecmd: clarify what 'Original State' means when cloning a software channel
diff --git a/spacecmd/src/lib/softwarechannel.py b/spacecmd/src/lib/softwarechannel.py
index f7f0481..b289aa9 100644
--- a/spacecmd/src/lib/softwarechannel.py
+++ b/spacecmd/src/lib/softwarechannel.py
@@ -378,7 +378,7 @@ def do_softwarechannel_clone(self, args):
details['gpg_id'] = prompt_user('GPG ID:')
details['gpg_fingerprint'] = prompt_user('GPG Fingerprint:')
- orig_state = self.user_confirm('Original State [y/N]:')
+ orig_state = self.user_confirm('Original State (No Errata) [y/N]:')
# remove empty strings from the structure
to_remove = []
commit 1842c55e29fc304eb18e0f4312f1aee3eb91073a
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Mon Sep 20 10:26:31 2010 -0400
spacecmd: remove prompts for summary/description when creating software channels and just use the name
diff --git a/spacecmd/src/lib/softwarechannel.py b/spacecmd/src/lib/softwarechannel.py
index c709d85..f7f0481 100644
--- a/spacecmd/src/lib/softwarechannel.py
+++ b/spacecmd/src/lib/softwarechannel.py
@@ -318,7 +318,7 @@ def help_softwarechannel_create(self):
def do_softwarechannel_create(self, args):
name = prompt_user('Channel Name:', noblank = True)
label = prompt_user('Channel Label:', noblank = True)
- summary = prompt_user('Summary:', noblank = True)
+ summary = name
print 'Base Channels'
print '-------------'
@@ -364,8 +364,8 @@ def do_softwarechannel_clone(self, args):
details['name'] = prompt_user('Channel Name:', noblank = True)
details['label'] = prompt_user('Channel Label:', noblank = True)
- details['summary'] = prompt_user('Summary:', noblank = True)
- details['description'] = prompt_user('Description:')
+ details['summary'] = details['name']
+ details['description'] = details['name']
print 'Base Channels:'
print '\n'.join(sorted(self.list_base_channels()))
13 years, 7 months
java/code
by Justin Sherrill
java/code/src/com/redhat/rhn/common/util/RecurringEventPicker.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 732eb98e72d51a7e28f417227efc45bcb3b91599
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon Sep 20 13:07:36 2010 -0400
634834 - fixing ISE when putting in invalid day of week
diff --git a/java/code/src/com/redhat/rhn/common/util/RecurringEventPicker.java b/java/code/src/com/redhat/rhn/common/util/RecurringEventPicker.java
index f9e5f6f..ce2507b 100644
--- a/java/code/src/com/redhat/rhn/common/util/RecurringEventPicker.java
+++ b/java/code/src/com/redhat/rhn/common/util/RecurringEventPicker.java
@@ -376,8 +376,12 @@ public class RecurringEventPicker {
if (getCronEntry() == null) {
return null;
}
+ String[] array = getCronEntry().split(WHITE_SPACE);
+ if (slot >= array.length) {
+ return null;
+ }
else {
- return getCronEntry().split(WHITE_SPACE)[slot];
+ return array[slot];
}
}
13 years, 7 months
Changes to 'refs/tags/spacewalk-remote-utils-1.0.2-1'
by Shannon Hughes
Tag 'spacewalk-remote-utils-1.0.2-1' created by Shannon Hughes <shughes(a)redhat.com> at 2010-09-20 17:05 +0000
Tagging package [spacewalk-remote-utils] version [1.0.2-1] in directory [client/tools/spacewalk-remote-utils/].
Changes since spacewalk-remote-utils-1.0.1-1:
Shannon Hughes (2):
adding docbook-utils build require
Automatic commit of package [spacewalk-remote-utils] release [1.0.2-1].
---
client/tools/spacewalk-remote-utils/spacewalk-remote-utils.spec | 6 +++++-
rel-eng/packages/spacewalk-remote-utils | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
---
13 years, 7 months
client/tools rel-eng/packages
by Shannon Hughes
client/tools/spacewalk-remote-utils/spacewalk-remote-utils.spec | 5 ++++-
rel-eng/packages/spacewalk-remote-utils | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 90729a23d7b19c2456b0965242ccbbf1e4a5e60e
Author: Shannon Hughes <shughes(a)redhat.com>
Date: Mon Sep 20 13:05:07 2010 -0400
Automatic commit of package [spacewalk-remote-utils] release [1.0.2-1].
diff --git a/client/tools/spacewalk-remote-utils/spacewalk-remote-utils.spec b/client/tools/spacewalk-remote-utils/spacewalk-remote-utils.spec
index e4b831a..ae63e2d 100644
--- a/client/tools/spacewalk-remote-utils/spacewalk-remote-utils.spec
+++ b/client/tools/spacewalk-remote-utils/spacewalk-remote-utils.spec
@@ -4,7 +4,7 @@
%endif
Name: spacewalk-remote-utils
-Version: 1.0.1
+Version: 1.0.2
Release: 1%{?dist}
Summary: Command-line interface to Spacewalk and Satellite servers
@@ -52,6 +52,9 @@ docbook2man ./spacewalk-create-channel/doc/spacewalk-create-channel.sgml -o ./sp
%doc %{_mandir}/man1/spacecwalk-create-channel.1.gz
%changelog
+* Mon Sep 20 2010 Shannon Hughes <shughes(a)redhat.com> 1.0.2-1
+- adding docbook-utils build require (shughes(a)redhat.com)
+
* Mon Sep 20 2010 Shannon Hughes <shughes(a)redhat.com> 1.0.1-1
- new package built with tito
diff --git a/rel-eng/packages/spacewalk-remote-utils b/rel-eng/packages/spacewalk-remote-utils
index 80fc33a..cfe69c0 100644
--- a/rel-eng/packages/spacewalk-remote-utils
+++ b/rel-eng/packages/spacewalk-remote-utils
@@ -1 +1 @@
-1.0.1-1 client/tools/spacewalk-remote-utils/
+1.0.2-1 client/tools/spacewalk-remote-utils/
13 years, 7 months
client/tools
by Shannon Hughes
client/tools/spacewalk-remote-utils/spacewalk-remote-utils.spec | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 85aac057fa41410386c3ad5602dea42f3c684ed1
Author: Shannon Hughes <shughes(a)redhat.com>
Date: Mon Sep 20 13:03:47 2010 -0400
adding docbook-utils build require
diff --git a/client/tools/spacewalk-remote-utils/spacewalk-remote-utils.spec b/client/tools/spacewalk-remote-utils/spacewalk-remote-utils.spec
index b248df9..e4b831a 100644
--- a/client/tools/spacewalk-remote-utils/spacewalk-remote-utils.spec
+++ b/client/tools/spacewalk-remote-utils/spacewalk-remote-utils.spec
@@ -16,6 +16,7 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch
BuildRequires: python-devel
+BuildRequires: docbook-utils
%description
spacecmd is a command-line interface to Spacewalk and Satellite servers
13 years, 7 months