summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeath Caldwell <hncaldwell@gentoo.org>2008-12-02 20:46:54 +0000
committerHeath Caldwell <hncaldwell@gentoo.org>2008-12-02 20:46:54 +0000
commit23826be503254dc551bbe8f0616aa7e068afd9f4 (patch)
tree4be6305316a05e6c19c41dd820b5311429414493 /app-admin/tenshi/files
parentstable ppc64, bug 245096 (diff)
downloadgentoo-2-23826be503254dc551bbe8f0616aa7e068afd9f4.tar.gz
gentoo-2-23826be503254dc551bbe8f0616aa7e068afd9f4.tar.bz2
gentoo-2-23826be503254dc551bbe8f0616aa7e068afd9f4.zip
Add tenshi-0.10-r3 with solo-queue-escalation and warn-logfile patches (fixes bug #243082)
(Portage version: 2.1.6_rc2/cvs/Linux 2.6.25-gentoo-r6-grey01 x86_64)
Diffstat (limited to 'app-admin/tenshi/files')
-rw-r--r--app-admin/tenshi/files/tenshi-0.10-solo-queue-escalation.patch48
-rw-r--r--app-admin/tenshi/files/tenshi-0.10-warn-logfile.patch34
2 files changed, 82 insertions, 0 deletions
diff --git a/app-admin/tenshi/files/tenshi-0.10-solo-queue-escalation.patch b/app-admin/tenshi/files/tenshi-0.10-solo-queue-escalation.patch
new file mode 100644
index 000000000000..a588ec18f131
--- /dev/null
+++ b/app-admin/tenshi/files/tenshi-0.10-solo-queue-escalation.patch
@@ -0,0 +1,48 @@
+Submitted by: Heath Caldwell <hncaldwell@gentoo.org>
+Date: 2008-10-21
+Initial Package Version: 0.10
+Upstream Status: Accepted to be included in next release
+Description: Allows the leftmost queue to have an escalation number if it is the only queue mentioned.
+
+diff -ur tenshi-0.10/tenshi tenshi-0.10.new/tenshi
+--- tenshi-0.10/tenshi 2008-10-06 16:55:37.000000000 -0700
++++ tenshi-0.10.new/tenshi 2008-10-06 17:18:07.000000000 -0700
+@@ -522,7 +522,7 @@
+ }
+ }
+
+- if ($queue[0] =~ /:/) {
++ if (@queue > 1 and $queue[0] =~ /:/) {
+ die RED "[ERROR] Left most queue in a multiple queue declaration can not have an escalation number\n";
+ }
+
+diff -ur tenshi-0.10/tenshi.8 tenshi-0.10.new/tenshi.8
+--- tenshi-0.10/tenshi.8 2008-03-13 04:31:12.000000000 -0700
++++ tenshi-0.10.new/tenshi.8 2008-10-06 17:09:36.000000000 -0700
+@@ -337,16 +337,16 @@
+ regexp. The queue will receive the message that matched the regexp at the time
+ of escalation, with a count equal to the escalation number. The count of
+ messages matching the regexp will be reset when the left most queue mentioned
+-in the queue list is mailed.The left most queue cannot have an escalation
+-number. When the number of messages that match the regexp reaches the greatest
+-escalation number mentioned, escalation will begin again into the escalation
+-queues, modulus the greatest escalation number. For example, using the queues
+-`a,b:10,c:50', when 10 messages match the regexp, a message will go into b,
+-when 50 match, one will go into c. At 60, another will go into b, and at 100,
+-another into c, 110 to b, 150 to c, and so on. Escalation numbers must be
+-positive integers greater than zero and must be listed in increasing order from
+-left to right. All queues without escalation numbers must be listed more left
+-than the queues with escalation numbers.
++in the queue list is mailed. The left most queue cannot have an escalation
++number unless it is the only queue listed. When the number of messages that
++match the regexp reaches the greatest escalation number mentioned, escalation
++will begin again into the escalation queues, modulus the greatest escalation
++number. For example, using the queues `a,b:10,c:50', when 10 messages match the
++regexp, a message will go into b, when 50 match, one will go into c. At 60,
++another will go into b, and at 100, another into c, 110 to b, 150 to c, and so
++on. Escalation numbers must be positive integers greater than zero and must be
++listed in increasing order from left to right. All queues without escalation
++numbers must be listed more left than the queues with escalation numbers.
+
+ .br
+ The standard grouping operators
diff --git a/app-admin/tenshi/files/tenshi-0.10-warn-logfile.patch b/app-admin/tenshi/files/tenshi-0.10-warn-logfile.patch
new file mode 100644
index 000000000000..4a0f33be7aed
--- /dev/null
+++ b/app-admin/tenshi/files/tenshi-0.10-warn-logfile.patch
@@ -0,0 +1,34 @@
+Submitted by: Heath Caldwell <hncaldwell@gentoo.org>
+Date: 2008-10-21
+Initial Package Version: 0.10
+Upstream Status: No response
+Description: Warns on log files that tenshi can't open and continues monitoring the ones that it can, instead of just exiting.
+
+diff -ur tenshi-0.10/tenshi tenshi-0.10.new/tenshi
+--- tenshi-0.10/tenshi 2008-10-06 16:55:37.000000000 -0700
++++ tenshi-0.10.new/tenshi 2008-10-07 11:46:06.000000000 -0700
+@@ -141,10 +141,22 @@
+ die RED "[ERROR] $main{'csv'}{'path'}: not executable";
+ }
+
++ my @good_log_files;
+ foreach my $log (@log_files) {
+- die RED "[ERROR] $log: no such file" if (! -f $log);
+- die RED "[ERROR] $log: file not readable" if (! -r $log);
++ unless (-f $log) {
++ print STDERR RED "[WARNING] $log: no such file\n";
++ next;
++ }
++
++ unless (-r $log) {
++ print STDERR RED "[WARNING] $log: file not readable\n";
++ next;
++ }
++
++ push @good_log_files, $log;
+ }
++ @good_log_files > 0 or die RED "[ERROR] no readable log files";
++ @log_files = @good_log_files;
+ }
+
+ #