rpms/setroubleshoot/F-10 setroubleshoot-purge.patch, NONE, 1.1 setroubleshoot.spec, 1.108, 1.109

Daniel J Walsh dwalsh at fedoraproject.org
Mon Nov 10 21:23:36 UTC 2008


Author: dwalsh

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

Modified Files:
	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: setroubleshoot.spec
===================================================================
RCS file: /cvs/extras/rpms/setroubleshoot/F-10/setroubleshoot.spec,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -r1.108 -r1.109
--- setroubleshoot.spec	15 Oct 2008 21:33:06 -0000	1.108
+++ setroubleshoot.spec	10 Nov 2008 21:23:05 -0000	1.109
@@ -1,13 +1,14 @@
 Summary: Helps troubleshoot SELinux problems
 Name: setroubleshoot
 Version: 2.0.12
-Release: 1%{?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
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch: noarch
 BuildRequires: perl-XML-Parser
@@ -84,6 +85,7 @@
 
 %prep
 %setup -q
+%patch -p1 -b .purge
 
 %build
 %configure
@@ -182,6 +184,9 @@
 %attr(0755,root,root) /etc/rc.d/init.d/%{name}
 
 %changelog
+* 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
   - 2008-10-06  Dan Walsh <dwalsh at redhat.com>




More information about the fedora-extras-commits mailing list