2 commits - backend/rhn-conf backend/spacewalk-backend.spec rel-eng/packages
by Michael Mraka
backend/rhn-conf/rhn_server.conf | 1 +
backend/spacewalk-backend.spec | 6 +++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 36fcbb123cd6f3857ad648f1422cbd9c9f10100c
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Aug 6 14:48:50 2013 +0200
Automatic commit of package [spacewalk-backend] release [2.1.6-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index b1077ff..a4ab192 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -12,7 +12,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 2.1.5
+Version: 2.1.6
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -639,6 +639,10 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Tue Aug 06 2013 Michael Mraka <michael.mraka(a)redhat.com> 2.1.6-1
+- set default value for disconnected
+- 959923 - change (hopefully improve) usage guide.
+
* Tue Aug 06 2013 Tomas Kasparek <tkasparek(a)redhat.com> 2.1.5-1
- Branding clean-up of proxy stuff in backend dir
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 38ad1cf..a632905 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-2.1.5-1 backend/
+2.1.6-1 backend/
commit a9b31040f24ee422dcac12b7f46db6bebc6c3262
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Aug 6 14:38:43 2013 +0200
set default value for disconnected
fixing
Traceback (most recent call last):
File "/usr/bin/rhn-satellite-activate", line 42, in <module>
sys.exit(abs(mod.main() or 0))
File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/rhn_satellite_activate.py", line 553, in main
options = processCommandline()
File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/rhn_satellite_activate.py", line 495, in processCommandline
if CFG.DISCONNECTED and not options.disconnected:
File "/usr/lib/python2.6/site-packages/spacewalk/common/rhnConfig.py", line 222, in __getattr__
raise AttributeError(key)
AttributeError: DISCONNECTED
diff --git a/backend/rhn-conf/rhn_server.conf b/backend/rhn-conf/rhn_server.conf
index db51476..d1b13cc 100644
--- a/backend/rhn-conf/rhn_server.conf
+++ b/backend/rhn-conf/rhn_server.conf
@@ -110,6 +110,7 @@ session_secret_4 =
# Satellite install?
satellite = 1
+disconnected = 0
# Maximum size for a config file
maximum_config_file_size = 131072
10 years, 9 months
Changes to 'refs/tags/spacewalk-utils-2.1.4-1'
by Jan Dobes
Tag 'spacewalk-utils-2.1.4-1' created by Jan Dobes <jdobes(a)redhat.com> at 2013-08-06 10:53 +0000
Tagging package [spacewalk-utils] version [2.1.4-1] in directory [utils/].
Changes since spacecmd-2.1.3-1:
Jan Dobes (2):
972626 - multiple tries if db will not start quick enough
Automatic commit of package [spacewalk-utils] release [2.1.4-1].
---
rel-eng/packages/spacewalk-utils | 2 +-
utils/spacewalk-hostname-rename | 27 +++++++++++++++++++--------
utils/spacewalk-utils.spec | 5 ++++-
3 files changed, 24 insertions(+), 10 deletions(-)
---
10 years, 9 months
2 commits - rel-eng/packages utils/spacewalk-hostname-rename utils/spacewalk-utils.spec
by Jan Dobes
rel-eng/packages/spacewalk-utils | 2 +-
utils/spacewalk-hostname-rename | 27 +++++++++++++++++++--------
utils/spacewalk-utils.spec | 5 ++++-
3 files changed, 24 insertions(+), 10 deletions(-)
New commits:
commit 03ace9f16f3c68a1191f88057a912fa6dc0dab4c
Author: Jan Dobes <jdobes(a)redhat.com>
Date: Tue Aug 6 12:53:09 2013 +0200
Automatic commit of package [spacewalk-utils] release [2.1.4-1].
diff --git a/rel-eng/packages/spacewalk-utils b/rel-eng/packages/spacewalk-utils
index 415dbea..1011483 100644
--- a/rel-eng/packages/spacewalk-utils
+++ b/rel-eng/packages/spacewalk-utils
@@ -1 +1 @@
-2.1.3-1 utils/
+2.1.4-1 utils/
diff --git a/utils/spacewalk-utils.spec b/utils/spacewalk-utils.spec
index 19d0292..a14a602 100644
--- a/utils/spacewalk-utils.spec
+++ b/utils/spacewalk-utils.spec
@@ -1,7 +1,7 @@
%define rhnroot %{_prefix}/share/rhn
Name: spacewalk-utils
-Version: 2.1.3
+Version: 2.1.4
Release: 1%{?dist}
Summary: Utilities that may be run against a Spacewalk server.
@@ -88,6 +88,9 @@ spacewalk-pylint $RPM_BUILD_ROOT%{rhnroot}
%changelog
+* Tue Aug 06 2013 Jan Dobes 2.1.4-1
+- 972626 - multiple tries if db will not start quick enough
+
* Mon Aug 05 2013 Grant Gainey <ggainey(a)redhat.com> 2.1.3-1
- 993254 - Script to enable us to purge audit-log tables
commit 16363d4fdce1a9712c998b25aa17c4134c4b7a27
Author: Jan Dobes <jdobes(a)redhat.com>
Date: Tue Aug 6 10:44:40 2013 +0200
972626 - multiple tries if db will not start quick enough
diff --git a/utils/spacewalk-hostname-rename b/utils/spacewalk-hostname-rename
index 455062c..eddb4bc 100755
--- a/utils/spacewalk-hostname-rename
+++ b/utils/spacewalk-hostname-rename
@@ -439,14 +439,25 @@ then
fi
fi
-SQL_RET=$(
-echo "$DBSHELL_QUIET
-select 0 from dual;
-$DBSHELL_QUIT
-" | spacewalk-sql --select-mode -
-)
-# SQL_RET="${SQL_RET#"${SQL_RET%%[![:space:]]*}"}"
-print_status "${SQL_RET}" "Your database isn't running."
+DB_MAX_TRIES=3;
+
+for (( i=1;;i++ )) do
+ SQL_RET=$(
+ echo "$DBSHELL_QUIET
+ select 0 from dual;
+ $DBSHELL_QUIT
+ " | spacewalk-sql --select-mode -
+ )
+ SQL_RET="${SQL_RET#"${SQL_RET%%[![:space:]]*}"}" # remove spaces
+ if [ "$SQL_RET" != "0" ] && [ $i -lt $DB_MAX_TRIES ]
+ then
+ echo_err "Your database isn't running. Trying again..."
+ sleep 3
+ else
+ print_status "${SQL_RET}" "Your database isn't running."
+ break # if success
+ fi
+done
echo -n "Updating /etc/rhn/rhn.conf ... " | tee -a $LOG
update_rhn_conf
10 years, 9 months
Changes to 'refs/tags/spacecmd-2.1.3-1'
by Tomáš Kašpárek
Tag 'spacecmd-2.1.3-1' created by Tomas Kasparek <tkasparek(a)redhat.com> at 2013-08-06 09:33 +0000
Tagging package [spacecmd] version [2.1.3-1] in directory [spacecmd/].
Changes since yum-rhn-plugin-2.1.1-1:
Gregor Gruener (1):
Added new scap features into spacecmd
Simon Lukasik (4):
982354 - enable easy comparison between various SCAP scans.
Refactor: Use static-final instead of magic constant.
982354 - Show Scan's ID (xid) on scan's details page.
959923 - change (hopefully improve) usage guide.
Tomas Kasparek (1):
Automatic commit of package [spacecmd] release [2.1.3-1].
---
backend/common/spacewalk-cfg-get | 5
java/code/src/com/redhat/rhn/frontend/action/audit/scap/XccdfDiffSubmitAction.java | 8
java/code/src/com/redhat/rhn/frontend/action/systems/audit/ListScapAction.java | 31 +
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 9
java/code/webapp/WEB-INF/pages/common/fragments/audit/scap-list.jspf | 5
java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp | 4
java/code/webapp/WEB-INF/struts-config.xml | 2
rel-eng/packages/spacecmd | 2
spacecmd/spacecmd.spec | 13
spacecmd/src/lib/scap.py | 158 ++++++++++
spacecmd/src/lib/shell.py | 2
11 files changed, 227 insertions(+), 12 deletions(-)
---
10 years, 9 months
2 commits - rel-eng/packages spacecmd/spacecmd.spec spacecmd/src
by Tomáš Kašpárek
rel-eng/packages/spacecmd | 2
spacecmd/spacecmd.spec | 13 ++-
spacecmd/src/lib/scap.py | 158 ++++++++++++++++++++++++++++++++++++++++++++++
spacecmd/src/lib/shell.py | 2
4 files changed, 170 insertions(+), 5 deletions(-)
New commits:
commit e33b95c87db52865dd6fce68c1137e801602f97f
Author: Tomas Kasparek <tkasparek(a)redhat.com>
Date: Tue Aug 6 11:33:53 2013 +0200
Automatic commit of package [spacecmd] release [2.1.3-1].
diff --git a/rel-eng/packages/spacecmd b/rel-eng/packages/spacecmd
index c88f653..d9f9424 100644
--- a/rel-eng/packages/spacecmd
+++ b/rel-eng/packages/spacecmd
@@ -1 +1 @@
-2.1.2-1 spacecmd/
+2.1.3-1 spacecmd/
diff --git a/spacecmd/spacecmd.spec b/spacecmd/spacecmd.spec
index ecb6b23..960c1f9 100644
--- a/spacecmd/spacecmd.spec
+++ b/spacecmd/spacecmd.spec
@@ -4,7 +4,7 @@
%endif
Name: spacecmd
-Version: 2.1.2
+Version: 2.1.3
Release: 1%{?dist}
Summary: Command-line interface to Spacewalk and Satellite servers
@@ -64,8 +64,15 @@ touch %{buildroot}/%{python_sitelib}/spacecmd/__init__.py
%doc %{_mandir}/man1/spacecmd.1.gz
%changelog
-* Mon Aug 05 2013 Gregor Gruener <ggruner(a)redhat.com>
-- spacecmd - add new function is_monitoringenabled and list_proxies
+* Tue Aug 06 2013 Gregor Gruener <ggruner(a)redhat.com> 2.1.3-1
+- add new function scap_listxccdfscans
+- add new function scap_getxccdfscandetails
+- add new function scap_getxccdfscanruleresults
+- add new function scap_schedulexccdfscan
+
+* Mon Aug 05 2013 Gregor Gruener <ggruner(a)redhat.com> 2.1.2-1
+- add new function is_monitoringenabled
+- add new function list_proxies
* Mon Jul 22 2013 Gregor Gruener <ggruner(a)redhat.com> 2.1.1-1
- add new function custominfo_updatekey
commit 58dc4b990d6e94a73935c318d6fd8d39f25de1c6
Author: Gregor Gruener <ggruner(a)redhat.com>
Date: Tue Aug 6 09:41:44 2013 +0200
Added new scap features into spacecmd
diff --git a/spacecmd/src/lib/scap.py b/spacecmd/src/lib/scap.py
new file mode 100644
index 0000000..28b3e1b
--- /dev/null
+++ b/spacecmd/src/lib/scap.py
@@ -0,0 +1,158 @@
+#
+# Licensed under the GNU General Public License Version 3
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
+# Copyright (c) 2013 Red Hat, Inc.
+#
+
+# NOTE: the 'self' variable is an instance of SpacewalkShell
+
+from optparse import Option
+from spacecmd.utils import *
+
+def help_scap_listxccdfscans(self):
+ print 'scap_listxccdfscans: Return a list of finished OpenSCAP scans for given systems'
+ print 'usage: scap_listxccdfscans <SYSTEMS>'
+
+def complete_system_scap_listxccdfscans(self, text, line, beg, end):
+ return self.tab_complete_systems(text)
+
+def do_scap_listxccdfscans(self, args):
+ (args, options) = parse_arguments(args)
+
+ if not len(args):
+ self.help_scap_listxccdfscans()
+ return
+
+ # use the systems listed in the SSM
+ if re.match('ssm', args[0], re.I):
+ systems = self.ssm.keys()
+ else:
+ systems = self.expand_systems(args)
+
+ add_separator = False
+
+ for system in sorted(systems):
+ if add_separator: print self.SEPARATOR
+ add_separator = True
+
+ if len(systems) > 1:
+ print 'System: %s' % system
+ print
+
+ system_id = self.get_system_id(system)
+ if not system_id: continue
+
+ scan_list = self.client.system.scap.listXccdfScans(self.session, system_id)
+
+ for s in scan_list:
+ print 'XID: %d Profile: %s Path: (%s) Completed: %s' % (s['xid'], s['profile'], s['path'], s['completed'])
+
+####################
+
+def help_scap_getxccdfscanruleresults(self):
+ print 'scap_getxccdfscanruleresults: Return a full list of RuleResults for given OpenSCAP XCCDF scan'
+ print 'usage: scap_getxccdfscanruleresults <XID>'
+
+def do_scap_getxccdfscanruleresults(self, args):
+ (args, options) = parse_arguments(args)
+
+ if not len(args):
+ self.help_scap_getxccdfscanruleresults()
+ return
+
+ add_separator = False
+
+ for xid in args:
+ if add_separator: print self.SEPARATOR
+ add_separator = True
+
+ if len(args) > 1:
+ print 'XID: %s' % xid
+ print
+
+ xid = int(xid)
+ scan_results = self.client.system.scap.getXccdfScanRuleResults(self.session, xid)
+
+ for s in scan_results:
+ print 'IDref: %s Result: %s Idents: (%s)' % (s['idref'], s['result'], s['idents'])
+
+####################
+
+def help_scap_getxccdfscandetails(self):
+ print 'scap_getxccdfscandetails: Get details of given OpenSCAP XCCDF scan'
+ print 'usage: scap_getxccdfscandetails <XID>'
+
+def do_scap_getxccdfscandetails(self, args):
+ (args, options) = parse_arguments(args)
+
+ if not len(args):
+ self.help_scap_getxccdfscandetails()
+ return
+
+ add_separator = False
+
+ for xid in args:
+ if add_separator: print self.SEPARATOR
+ add_separator = True
+
+ if len(args) > 1:
+ print 'XID: %s' % xid
+ print
+
+ xid = int(xid)
+ scan_details = self.client.system.scap.getXccdfScanDetails(self.session, xid)
+
+ print "XID:",scan_details['xid'],"SID:",scan_details['sid'],"Action_ID:",scan_details['action_id'],"Path:",scan_details['path'],\
+ "OSCAP_Parameters:",scan_details['oscap_parameters'],"Test_Result:",scan_details['test_result'],\
+ "Benchmark:",scan_details['benchmark'],"Benchmark_Version:",scan_details['benchmark_version'],\
+ "Profile:",scan_details['profile'],"Profile_Title:",scan_details['profile_title'],"Start_Time:",scan_details['start_time'],\
+ "End_Time:",scan_details['end_time'],"Errors:",scan_details['errors']
+
+####################
+
+def help_scap_schedulexccdfscan(self):
+ print 'scap_schedulexccdfscan: Schedule Scap XCCDF scan'
+ print 'usage: scap_schedulexccdfscan PATH_TO_XCCDF_FILE XCCDF_OPTIONS SYSTEMS'
+ print
+ print 'Example:'
+ print '> scap_schedulexccdfscan \'/usr/share/openscap/scap-security-xccdf.xml\' \'profile Web-Default\' system-scap.example.com'
+
+def do_scap_schedulexccdfscan(self, args):
+ (args, options) = parse_arguments(args)
+
+ if len(args) < 3:
+ self.help_scap_schedulexccdfscan()
+ return
+
+ path = args[0]
+ param = "--"
+ param += args[1]
+
+ # use the systems listed in the SSM
+ if re.match('ssm', args[0], re.I):
+ systems = self.ssm.keys()
+ else:
+ systems = self.expand_systems(args[2:])
+
+ for system in systems:
+ system_id = self.get_system_id(system)
+ if not system_id: continue
+
+ scan_schedule = self.client.system.scap.scheduleXccdfScan(self.session, system_id, path, param)
+
+# vim:ts=4:expandtab:
diff --git a/spacecmd/src/lib/shell.py b/spacecmd/src/lib/shell.py
index 64bcbee..4417d7e 100644
--- a/spacecmd/src/lib/shell.py
+++ b/spacecmd/src/lib/shell.py
@@ -30,7 +30,7 @@ class SpacewalkShell(Cmd):
'filepreservation', 'group', 'kickstart',
'misc', 'org', 'package', 'repo', 'report', 'schedule',
'snippet', 'softwarechannel', 'ssm', 'api',
- 'system', 'user', 'utils' ]
+ 'system', 'user', 'utils', 'scap' ]
# a SyntaxError is thrown if we don't wrap this in an 'exec'
for module in __module_list:
10 years, 9 months
backend/common
by Šimon Lukašík
backend/common/spacewalk-cfg-get | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit e12d9f2dbf0a4a8bc65770e0a59d53d2442d42ea
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Tue Aug 6 10:07:15 2013 +0200
959923 - change (hopefully improve) usage guide.
diff --git a/backend/common/spacewalk-cfg-get b/backend/common/spacewalk-cfg-get
index 0bc841b..f2155e4 100644
--- a/backend/common/spacewalk-cfg-get
+++ b/backend/common/spacewalk-cfg-get
@@ -15,8 +15,9 @@ elif len(sys.argv) == 2:
comp = ''
key = sys.argv[1]
else:
- print "Usage: spacewalk-cfg-get [ { get | list } component [ key ]"
- print " spacewalk-cfg-get key"
+ print "Usage: spacewalk-cfg-get list COMPONENT"
+ print " spacewalk-cfg-get get COMPONENT KEY"
+ print " spacewalk-cfg-get KEY"
sys.exit(1)
cfg = RHNOptions(comp)
10 years, 9 months
3 commits - java/code
by Šimon Lukašík
java/code/src/com/redhat/rhn/frontend/action/audit/scap/XccdfDiffSubmitAction.java | 8 +-
java/code/src/com/redhat/rhn/frontend/action/systems/audit/ListScapAction.java | 31 +++++++++-
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 9 ++
java/code/webapp/WEB-INF/pages/common/fragments/audit/scap-list.jspf | 5 +
java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp | 4 +
java/code/webapp/WEB-INF/struts-config.xml | 2
6 files changed, 54 insertions(+), 5 deletions(-)
New commits:
commit 8eb0228abc050c9295605260a0de16a92fdc2b7c
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Tue Aug 6 09:21:36 2013 +0200
982354 - Show Scan's ID (xid) on scan's details page.
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 1362909..be2f763 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
@@ -11103,6 +11103,9 @@ the <strong>Red Hat Enterprise Linux System Administration Guide.</stro
<trans-unit id="system.audit.xccdfdetails.jsp.header">
<source>Details of XCCDF Scan</source>
</trans-unit>
+ <trans-unit id="system.audit.xccdfdetails.jsp.id">
+ <source>Scan ID (xid)</source>
+ </trans-unit>
<trans-unit id="system.audit.xccdfdetails.jsp.path">
<source>File System Path</source>
</trans-unit>
diff --git a/java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp b/java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp
index 771c10d..9fc9e40 100644
--- a/java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp
@@ -49,6 +49,10 @@
<table class="details">
<tr>
+ <th><bean:message key="system.audit.xccdfdetails.jsp.id"/>:</th>
+ <td><c:out value="${testResult.id}"/></td>
+ </tr>
+ <tr>
<th><bean:message key="system.audit.xccdfdetails.jsp.path"/>:</th>
<td><c:out value="${testResult.scapActionDetails.path}"/></td>
</tr>
commit 0a730e63d9458faf3d83d7c494443cb5537b0cd5
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Mon Aug 5 18:35:18 2013 +0200
Refactor: Use static-final instead of magic constant.
diff --git a/java/code/src/com/redhat/rhn/frontend/action/audit/scap/XccdfDiffSubmitAction.java b/java/code/src/com/redhat/rhn/frontend/action/audit/scap/XccdfDiffSubmitAction.java
index 0dcb31d..d39dc36 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/audit/scap/XccdfDiffSubmitAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/audit/scap/XccdfDiffSubmitAction.java
@@ -46,11 +46,11 @@ import com.redhat.rhn.manager.audit.scap.TestResultDiffer;
* Static action page.
*/
public class XccdfDiffSubmitAction extends RhnAction implements Listable {
- private static final String FIRST = "first";
- private static final String SECOND = "second";
- private static final String VIEW = "view";
+ public static final String FIRST = "first";
+ public static final String SECOND = "second";
+ public static final String VIEW = "view";
+ public static final String CHANGED = "changed";
private static final String FULL = "full";
- private static final String CHANGED = "changed";
private static final String MISSING_MSG = "message.xccdfdiff.missing";
/** {@inheritDoc} */
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ListScapAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ListScapAction.java
index 81ae8c0..1ac704e 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ListScapAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ListScapAction.java
@@ -32,6 +32,7 @@ import com.redhat.rhn.common.db.datasource.DataResult;
import com.redhat.rhn.domain.rhnset.RhnSet;
import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.domain.user.User;
+import com.redhat.rhn.frontend.action.audit.scap.XccdfDiffSubmitAction;
import com.redhat.rhn.frontend.struts.RequestContext;
import com.redhat.rhn.frontend.struts.RhnHelper;
import com.redhat.rhn.frontend.struts.RhnListSetHelper;
@@ -97,14 +98,14 @@ public class ListScapAction extends ScapSetupAction {
else if (context.wasDispatched(DIFF_BUT)) {
if (selectionSize == 2) {
Map<String, Object> params = new HashMap<String, Object>();
- params.put("view", "changed");
+ params.put(XccdfDiffSubmitAction.VIEW, XccdfDiffSubmitAction.CHANGED);
Set<Long> scanIds = (Set<Long>) set.getElementValues();
Iterator<Long> it = scanIds.iterator();
if (it.hasNext()) {
- params.put("first", it.next());
+ params.put(XccdfDiffSubmitAction.FIRST, it.next());
}
if (it.hasNext()) {
- params.put("second", it.next());
+ params.put(XccdfDiffSubmitAction.SECOND, it.next());
}
return getStrutsDelegate().forwardParams(mapping.findForward("submitDiff"),
params);
commit 4510a00e7f866c209e450afb0b959d8b17057b08
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Mon Aug 5 18:01:14 2013 +0200
982354 - enable easy comparison between various SCAP scans.
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ListScapAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ListScapAction.java
index 8335883..81ae8c0 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ListScapAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ListScapAction.java
@@ -15,7 +15,9 @@
package com.redhat.rhn.frontend.action.systems.audit;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.Map;
+import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -23,6 +25,8 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionMessage;
+import org.apache.struts.action.ActionMessages;
import com.redhat.rhn.common.db.datasource.DataResult;
import com.redhat.rhn.domain.rhnset.RhnSet;
@@ -45,6 +49,7 @@ import com.redhat.rhn.manager.rhnset.RhnSetManager;
public class ListScapAction extends ScapSetupAction {
private static final String LIST_NAME = "xccdfScans";
private static final String DELET_BUT = "system.audit.listscap.jsp.removebut";
+ private static final String DIFF_BUT = "system.audit.listscap.jsp.diffbut";
/**
* {@inheritDoc}
@@ -82,12 +87,35 @@ public class ListScapAction extends ScapSetupAction {
request.getRequestURI() + "?sid=" + sid);
request.setAttribute(RequestContext.PAGE_LIST, result);
- if (context.wasDispatched(DELET_BUT) && getSetDecl(sid).get(user).size() > 0) {
+ int selectionSize = set.size();
+ if (context.wasDispatched(DELET_BUT) && selectionSize > 0) {
Map<String, Long> params = new HashMap<String, Long>();
params.put("sid", sid);
return getStrutsDelegate().forwardParams(mapping.findForward("submitDelete"),
params);
}
+ else if (context.wasDispatched(DIFF_BUT)) {
+ if (selectionSize == 2) {
+ Map<String, Object> params = new HashMap<String, Object>();
+ params.put("view", "changed");
+ Set<Long> scanIds = (Set<Long>) set.getElementValues();
+ Iterator<Long> it = scanIds.iterator();
+ if (it.hasNext()) {
+ params.put("first", it.next());
+ }
+ if (it.hasNext()) {
+ params.put("second", it.next());
+ }
+ return getStrutsDelegate().forwardParams(mapping.findForward("submitDiff"),
+ params);
+ }
+ else {
+ ActionMessages msg = new ActionMessages();
+ msg.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
+ "system.audit.listscap.jsp.diffmessage"));
+ getStrutsDelegate().saveMessages(request, msg);
+ }
+ }
return mapping.findForward(RhnHelper.DEFAULT_FORWARD);
}
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 5a8b772..1362909 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
@@ -11072,6 +11072,12 @@ the <strong>Red Hat Enterprise Linux System Administration Guide.</stro
<trans-unit id="system.audit.listscap.jsp.removebut">
<source>Remove Selected Scans</source>
</trans-unit>
+ <trans-unit id="system.audit.listscap.jsp.diffbut">
+ <source>Compare Selected Scans</source>
+ </trans-unit>
+ <trans-unit id="system.audit.listscap.jsp.diffmessage">
+ <source>To make comparison please select exactly two scans.</source>
+ </trans-unit>
</group>
<group>
<context-group name="ctx">
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/audit/scap-list.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/audit/scap-list.jspf
index e38e9bd..9a02d5a 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/audit/scap-list.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/audit/scap-list.jspf
@@ -44,6 +44,11 @@
exportColumns="xid,testResult,completed,pass,fail,error,unknown,notapplicable,notchecked,notselected,informational,fixed,sum"/>
<p align="right">
+ <input type="submit" name="dispatch" value="<bean:message key="system.audit.listscap.jsp.diffbut"/>"
+ <c:choose>
+ <c:when test="${empty pageList}">disabled</c:when>
+ </c:choose>
+ >
<input type="submit" name="dispatch" value="<bean:message key="system.audit.listscap.jsp.removebut"/>"
<c:choose>
<c:when test="${empty pageList}">disabled</c:when>
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index e6059c6..8682ba5 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -3002,6 +3002,8 @@
path="/WEB-INF/pages/systems/details/audit/listscap.jsp"/>
<forward name="submitDelete"
path="/systems/details/audit/XccdfDeleteConfirm.do" redirect="true"/>
+ <forward name="submitDiff"
+ path="/audit/scap/DiffSubmit.do" redirect="true"/>
</action>
<action path="/systems/details/audit/XccdfDeleteConfirm"
10 years, 9 months
Changes to 'refs/tags/yum-rhn-plugin-2.1.1-1'
by Tomáš Kašpárek
Tag 'yum-rhn-plugin-2.1.1-1' created by Tomas Kasparek <tkasparek(a)redhat.com> at 2013-08-06 07:30 +0000
Tagging package [yum-rhn-plugin] version [2.1.1-1] in directory [client/rhel/yum-rhn-plugin/].
Changes since spacewalk-web-2.1.3-1:
Tomas Kasparek (1):
Automatic commit of package [yum-rhn-plugin] release [2.1.1-1].
---
client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec | 6 +++++-
rel-eng/packages/yum-rhn-plugin | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
---
10 years, 9 months
client/rhel rel-eng/packages
by Tomáš Kašpárek
client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec | 6 +++++-
rel-eng/packages/yum-rhn-plugin | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 72fd6819ae2d92a670af6f651b0e6eb7c6d3e788
Author: Tomas Kasparek <tkasparek(a)redhat.com>
Date: Tue Aug 6 09:30:55 2013 +0200
Automatic commit of package [yum-rhn-plugin] release [2.1.1-1].
diff --git a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
index 12294b2..b773507 100644
--- a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
+++ b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
@@ -1,6 +1,6 @@
Summary: Spacewalk support for yum
Name: yum-rhn-plugin
-Version: 2.1.0
+Version: 2.1.1
Release: 1%{?dist}
License: GPLv2
Group: System Environment/Base
@@ -70,6 +70,10 @@ fi
%doc LICENSE
%changelog
+* Tue Aug 06 2013 Tomas Kasparek <tkasparek(a)redhat.com> 2.1.1-1
+- Branding clean-up of proxy stuff in client dir
+- Bumping package versions for 2.1.
+
* Wed Jul 17 2013 Tomas Kasparek <tkasparek(a)redhat.com> 2.0.1-1
- Bumping package versions for 2.0.
diff --git a/rel-eng/packages/yum-rhn-plugin b/rel-eng/packages/yum-rhn-plugin
index 44e762d..8c243f0 100644
--- a/rel-eng/packages/yum-rhn-plugin
+++ b/rel-eng/packages/yum-rhn-plugin
@@ -1 +1 @@
-2.0.1-1 client/rhel/yum-rhn-plugin/
+2.1.1-1 client/rhel/yum-rhn-plugin/
10 years, 9 months
Changes to 'refs/tags/spacewalk-web-2.1.3-1'
by Tomáš Kašpárek
Tag 'spacewalk-web-2.1.3-1' created by Tomas Kasparek <tkasparek(a)redhat.com> at 2013-08-06 07:29 +0000
Tagging package [spacewalk-web] version [2.1.3-1] in directory [web/].
Changes since spacewalk-proxy-installer-2.1.1-1:
Tomas Kasparek (1):
Automatic commit of package [spacewalk-web] release [2.1.3-1].
---
rel-eng/packages/spacewalk-web | 2 +-
web/spacewalk-web.spec | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
---
10 years, 9 months