rpms/audit-viewer/devel audit-viewer-0.6.2-chart-labels.patch, NONE, 1.1 audit-viewer-0.6.2-date-field.patch, NONE, 1.1 audit-viewer.spec, 1.14, 1.15
Miloslav Trmac
mitr at fedoraproject.org
Wed Mar 31 15:21:42 UTC 2010
Author: mitr
Update of /cvs/pkgs/rpms/audit-viewer/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv21720
Modified Files:
audit-viewer.spec
Added Files:
audit-viewer-0.6.2-chart-labels.patch
audit-viewer-0.6.2-date-field.patch
Log Message:
* Wed Mar 31 2010 Miloslav Trmač <mitr at redhat.com> - 0.6.2-2
- Fix chart display if any of the labels contain '/'
- Include 'date' among field names for making reports
audit-viewer-0.6.2-chart-labels.patch:
report_tab.py | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
--- NEW FILE audit-viewer-0.6.2-chart-labels.patch ---
Quote escape sequences in pychart labels (e.g. '/')
2010-03-31 Miloslav Trmač <mitr at redhat.com>
* src/report_tab.py (ReportTab.__repaint_chart): Quote all strings
to protect against pychart escape sequences.
diff -r 467bd1382d59 -r 22497aedc623 src/report_tab.py
--- a/src/report_tab.py Wed Mar 31 14:22:34 2010 +0200
+++ b/src/report_tab.py Wed Mar 31 14:42:17 2010 +0200
@@ -30,6 +30,7 @@
import pychart.canvas
import pychart.category_coord
import pychart.fill_style
+import pychart.font
import pychart.legend
import pychart.theme
import rsvg
@@ -339,12 +340,12 @@
return # Nothing to do
if self.column_statistic is None:
- data = [(row_range.get_label(), self.counts[row_range])
- for row_range in self.row_ranges]
+ data = [(pychart.font.quotemeta(row_range.get_label()),
+ self.counts[row_range]) for row_range in self.row_ranges]
else:
data = []
for row_range in self.row_ranges:
- row = ([row_range.get_label()] +
+ row = ([pychart.font.quotemeta(row_range.get_label())] +
[self.counts.get((row_range, column_range))
for column_range in self.column_ranges])
data.append(row)
@@ -375,10 +376,9 @@
legend = None
else:
legend = pychart.legend.T()
+ x_axis_label = pychart.font.quotemeta(self.row_statistic.field_name)
area = pychart.area.T(size = (width, height),
- x_axis = pychart.axis.X(label =
- self.row_statistic.
- field_name),
+ x_axis = pychart.axis.X(label = x_axis_label),
y_axis = pychart.axis.Y(format = '%d', label=''),
legend = legend,
x_coord = pychart.category_coord.T(data, 0),
@@ -393,9 +393,11 @@
else:
fill_it = pychart.fill_style.color_standards.iterate()
for (col, column_range) in enumerate(self.column_ranges):
+ column_plot_label = pychart.font.quotemeta(column_range.
+ get_label())
plot = pychart.bar_plot.T(data = data, hcol = col + 1,
fill_style = fill_it.next(),
- label = column_range.get_label(),
+ label = column_plot_label,
cluster =
(col, len(self.column_ranges)))
area.add_plot(plot)
audit-viewer-0.6.2-date-field.patch:
report_properties.py | 4 ++--
tab_properties.py | 13 ++++++++++---
2 files changed, 12 insertions(+), 5 deletions(-)
--- NEW FILE audit-viewer-0.6.2-date-field.patch ---
Offer the 'date' field for report statistics.
2010-03-31 Miloslav Trmač <mitr at redhat.com>
* src/report_properties.py (ReportProperties.__init__): Include the
synthetic 'date' field when offering fields for statistics.
* src/tab_properties.py (TabProperties._init_field_combo): New parameter
add_date.
diff -r 09812a1ae574 -r 467bd1382d59 src/report_properties.py
--- a/src/report_properties.py Fri Mar 26 15:42:48 2010 +0100
+++ b/src/report_properties.py Wed Mar 31 14:22:34 2010 +0200
@@ -44,7 +44,7 @@
super(ReportProperties, self).__gobject_init__()
self.__old_row_field = None
- self._init_field_combo(self.report_row_field)
+ self._init_field_combo(self.report_row_field, add_date=True)
# String first is assumed by util.set_combo_option
self.row_grouping_store = gtk.ListStore(gobject.TYPE_STRING,
gobject.TYPE_PYOBJECT)
@@ -59,7 +59,7 @@
util.connect_and_run(self.report_use_column, 'toggled',
self.__report_use_column_toggled)
self.__old_column_field = None
- self._init_field_combo(self.report_column_field)
+ self._init_field_combo(self.report_column_field, add_date=True)
self.column_grouping_store = gtk.ListStore(gobject.TYPE_STRING,
gobject.TYPE_PYOBJECT)
util.connect_and_run(self.report_column_field, 'changed',
diff -r 09812a1ae574 -r 467bd1382d59 src/tab_properties.py
--- a/src/tab_properties.py Fri Mar 26 15:42:48 2010 +0100
+++ b/src/tab_properties.py Wed Mar 31 14:22:34 2010 +0200
@@ -406,10 +406,17 @@
return None
@staticmethod
- def _init_field_combo(combo):
- '''Initialize a GtkComboBoxEntry with known field names.'''
+ def _init_field_combo(combo, add_date=False):
+ '''Initialize a GtkComboBoxEntry with known field names.
+
+ Add 'date' if add_date.
+
+ '''
store = gtk.ListStore(gobject.TYPE_STRING)
- for field in lists.field_names:
+ fields = lists.field_names
+ if add_date:
+ fields = fields + ('date',)
+ for field in sorted(fields):
store.append((field,))
combo.set_model(store)
combo.set_text_column(0)
Index: audit-viewer.spec
===================================================================
RCS file: /cvs/pkgs/rpms/audit-viewer/devel/audit-viewer.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -r1.14 -r1.15
--- audit-viewer.spec 26 Mar 2010 15:01:54 -0000 1.14
+++ audit-viewer.spec 31 Mar 2010 15:21:42 -0000 1.15
@@ -1,11 +1,15 @@
Summary: Audit event viewer
Name: audit-viewer
Version: 0.6.2
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2
Group: Applications/System
URL: https://fedorahosted.org/audit-viewer/
Source0: https://fedorahosted.org/releases/a/u/audit-viewer/audit-viewer-%{version}.tar.xz
+# Upstream changeset 467bd1382d592b29c6e2d20afd91c64ea2a3c81a
+Patch0: audit-viewer-0.6.2-date-field.patch
+# Upstream changeset 22497aedc623722e09af8687b600d83b5c990a4d
+Patch1: audit-viewer-0.6.2-chart-labels.patch
BuildRequires: desktop-file-utils, gettext, intltool, python
Requires: audit-libs-python, gnome-python2-gnome, gnome-python2-rsvg
Requires: pygtk2-libglade, pychart, python-gtkextra, python-sexy, usermode
@@ -16,6 +20,8 @@ A graphical utility for viewing and summ
%prep
%setup -q
+%patch0 -p1 -b .date-field
+%patch1 -p1 -b .chart-labels
%build
%configure --disable-update-mimedb
@@ -55,6 +61,10 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace) %{_sysconfdir}/security/console.apps/audit-viewer-server
%changelog
+* Wed Mar 31 2010 Miloslav Trmač <mitr at redhat.com> - 0.6.2-2
+- Fix chart display if any of the labels contain '/'
+- Include 'date' among field names for making reports
+
* Fri Mar 26 2010 Miloslav Trmač <mitr at redhat.com> - 0.6.2-1
- Update to audit-viewer-0.6.2
More information about the scm-commits
mailing list