rpms/setroubleshoot/F-9 setroubleshoot-purge.patch, NONE, 1.1 branch, 1.1, 1.2 setroubleshoot.spec, 1.105, 1.106

Daniel J Walsh dwalsh at fedoraproject.org
Mon Nov 10 21:28:47 UTC 2008


Author: dwalsh

Update of /cvs/extras/rpms/setroubleshoot/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5410

Modified Files:
	branch setroubleshoot.spec 
Added Files:
	setroubleshoot-purge.patch 
Log Message:
* Mon Nov 10 2008 Dan Walsh <dwalsh at redhat.com> - 2.0.12-3
- Fix analyze to purge properly without recursing


setroubleshoot-purge.patch:

--- NEW FILE setroubleshoot-purge.patch ---
diff -up setroubleshoot-2.0.12/src/analyze.py~ setroubleshoot-2.0.12/src/analyze.py
--- setroubleshoot-2.0.12/src/analyze.py~	2008-09-22 15:40:57.000000000 -0400
+++ setroubleshoot-2.0.12/src/analyze.py	2008-11-10 16:20:45.000000000 -0500
@@ -278,7 +278,7 @@ class SETroubleshootDatabase(object):
                                        self.sigs.signature_list[-1].last_seen_date.format())
                 sigs = [siginfo.sig for siginfo in self.sigs.signature_list[:keep]]
                 for sig in sigs:
-                    self.delete_signature(sig)
+                    self.delete_signature(sig, False)
 
         if self.max_alerts:
             keep = len(self.sigs.signature_list) - self.max_alerts
@@ -287,7 +287,7 @@ class SETroubleshootDatabase(object):
                 if debug:
                     log_database.debug("prune first %d alerts, len(sigs=%d sigs=%s", keep, len(sigs), sigs)
                 for sig in sigs:
-                    self.delete_signature(sig)
+                    self.delete_signature(sig, False)
 
     def set_notify(self, notify):
         self.notify = notify
@@ -412,15 +412,15 @@ class SETroubleshootDatabase(object):
         sigs.add_siginfo(siginfo)
         return sigs
 
-    def delete_signature(self, sig):
-        if debug:
-            log_database.debug("delete_signature: sig=%s", sig)
+    def delete_signature(self, sig, mark = True):
+        log_database.debug("delete_signature: sig=%s", sig)
 
         siginfo = self.lookup_signature(sig)
         self.sigs.remove_siginfo(siginfo)
         if self.notify:
             self.notify.signatures_updated('delete', siginfo.local_id)
-        self.mark_modified()
+        if mark:
+            self.mark_modified()
         
     def modify_siginfo(self, siginfo):
         if self.notify:
@@ -560,8 +560,7 @@ class LogfileAnalyzer(gobject.GObject):
             log_avc.error('%s.open()', self.__class__.__name__, e.strerror)
             self.errno = e.errno
             self.strerror = e.strerror
-            self.emit('state-changed', 'stopped')
-            return False
+            raise e
 
         self.n_bytes_read = 0
         self.line_count = 0


Index: branch
===================================================================
RCS file: /cvs/extras/rpms/setroubleshoot/F-9/branch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- branch	21 Apr 2008 20:08:43 -0000	1.1
+++ branch	10 Nov 2008 21:28:17 -0000	1.2
@@ -1 +1 @@
-F-9
+F-10


Index: setroubleshoot.spec
===================================================================
RCS file: /cvs/extras/rpms/setroubleshoot/F-9/setroubleshoot.spec,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -r1.105 -r1.106
--- setroubleshoot.spec	10 Nov 2008 17:35:14 -0000	1.105
+++ setroubleshoot.spec	10 Nov 2008 21:28:17 -0000	1.106
@@ -1,20 +1,21 @@
 Summary: Helps troubleshoot SELinux problems
 Name: setroubleshoot
 Version: 2.0.12
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv2+
 Group: Applications/System
 URL: https://fedorahosted.org/setroubleshoot
 Source0: %{name}-%{version}.tar.gz
 Source1: setroubleshoot.init
 Source2: setroubleshoot.logrotate
+Patch: setroubleshoot-purge.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch: noarch
 BuildRequires: perl-XML-Parser
 Requires: %{name}-server = %{version}-%{release} 
 Requires: %{name}-plugins >= 2.0.4
 Requires: pygtk2 >= 2.9.2
-Requires: gnome-python2, gnome-python2-canvas 
+Requires: gnome-python2-gnome, gnome-python2-canvas 
 BuildRequires: desktop-file-utils
 Requires: gnome-python2-gtkhtml2
 Requires: dbus
@@ -84,6 +85,7 @@
 
 %prep
 %setup -q
+%patch -p1 -b .purge
 
 %build
 %configure
@@ -182,8 +184,8 @@
 %attr(0755,root,root) /etc/rc.d/init.d/%{name}
 
 %changelog
-* Mon Nov 10 2008 Dan Walsh <dwalsh at redhat.com> - 2.0.12-2
-- Fix requies gnome-python2
+* Mon Nov 10 2008 Dan Walsh <dwalsh at redhat.com> - 2.0.12-3
+- Fix analyze to purge properly without recursing
 
 * Wed Oct 15 2008 Dan Walsh <dwalsh at redhat.com> - 2.0.12-1
 - Update to upstream




More information about the scm-commits mailing list