]>
Commit | Line | Data |
---|---|---|
747de3a4 | 1 | %include /usr/lib/rpm/macros.perl |
ed19a8a2 | 2 | Summary: Log parsing and notification program |
ac15b206 | 3 | Summary(pl.UTF-8): Program do analizy logów i powiadamiania |
ed19a8a2 | 4 | Name: tenshi |
b3fdaf91 | 5 | Version: 0.5.1 |
3723ed05 | 6 | Release: 3 |
a3936a6c | 7 | License: ISC |
ed19a8a2 | 8 | Group: Applications/System |
637d97a2 | 9 | Source0: http://dev.inversepath.com/tenshi/%{name}-%{version}.tar.gz |
b3fdaf91 | 10 | # Source0-md5: 44361d5d8defc5170146f467a8825413 |
ed19a8a2 ER |
11 | Source1: %{name}.init |
12 | Patch0: %{name}-root.patch | |
cc7455fe | 13 | Patch1: %{name}-config.patch |
637d97a2 | 14 | URL: http://dev.inversepath.com/trac/tenshi |
747de3a4 | 15 | BuildRequires: rpm-perlprov |
637d97a2 | 16 | BuildRequires: rpmbuild(macros) >= 1.228 |
cf14fe95 | 17 | Requires(post,preun): /sbin/chkconfig |
637d97a2 ER |
18 | Requires(post,preun): rc-scripts |
19 | Requires(postun): /usr/sbin/groupdel | |
20 | Requires(postun): /usr/sbin/userdel | |
21 | Requires(pre): /bin/id | |
22 | Requires(pre): /usr/bin/getgid | |
23 | Requires(pre): /usr/sbin/groupadd | |
24 | Requires(pre): /usr/sbin/useradd | |
ed19a8a2 | 25 | Obsoletes: wasabi |
a15cc553 | 26 | BuildArch: noarch |
ed19a8a2 ER |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
28 | ||
637d97a2 ER |
29 | %define _sysconfdir /etc/tenshi |
30 | ||
ed19a8a2 | 31 | %description |
de5b3c28 | 32 | Tenshi is a log monitoring program, designed to watch one or more log |
33 | files for lines matching user defined regular expressions and report | |
34 | on the matches. The regular expressions are assigned to queues which | |
35 | have an alert interval and a list of mail recipients. | |
ed19a8a2 | 36 | |
305959dc ER |
37 | Queues can be set to send a notification as soon as there is a log |
38 | line assigned to it, or to send periodic reports. | |
39 | ||
a15cc553 | 40 | Additionally, uninteresting fields in the log lines (such as PID |
305959dc | 41 | numbers) can be masked with the standard regular expression grouping |
a15cc553 | 42 | operators ( ). This allows cleaner and more readable reports. All |
305959dc ER |
43 | reports are separated by hostname and all messages are condensed when |
44 | possible. | |
45 | ||
ac15b206 JR |
46 | %description -l pl.UTF-8 |
47 | Tenshi to program do monitorowania logów zaprojektowany do oglądania | |
48 | jednego lub większej liczby plików logów pod kątem linii pasujących do | |
49 | zdefiniowanych przez użytkownika wyrażeń regularnych i raportowania | |
50 | tych dopasowań. Wyrażenia regularne są przypisywane do kolejek | |
51 | mających częstotliwość alarmowania i listę adresatów pocztowych. | |
a15cc553 | 52 | |
ac15b206 JR |
53 | Kolejki mogą być konfigurowane do wysyłania powiadomień zaraz po |
54 | napotkaniu linii w logu lub wysyłania regularnych raportów. | |
a15cc553 | 55 | |
ac15b206 JR |
56 | Dodatkowo nieciekawe pola z linii logów (takie jak numery procesów) |
57 | mogą być pokrywane standardowymi operatorami grupowania wyrażeń | |
a15cc553 | 58 | regularnych ( ). Daje to bardziej przejrzyste i bardziej czytelne |
ac15b206 JR |
59 | raporty. Wszystkie raporty są oddzielane nazwą hosta, a wszystkie |
60 | wiadomości są tak skondensowane, jak to tylko możliwe. | |
a15cc553 | 61 | |
ed19a8a2 ER |
62 | %prep |
63 | %setup -q | |
64 | %patch0 -p1 | |
cc7455fe | 65 | %patch1 -p1 |
ed19a8a2 | 66 | |
ed19a8a2 ER |
67 | %install |
68 | rm -rf $RPM_BUILD_ROOT | |
637d97a2 | 69 | install -d $RPM_BUILD_ROOT{%{_mandir}/man8,/var/run/tenshi} |
ed19a8a2 ER |
70 | |
71 | %{__make} install \ | |
72 | DESTDIR=$RPM_BUILD_ROOT | |
73 | ||
637d97a2 | 74 | install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
ed19a8a2 ER |
75 | |
76 | %clean | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
637d97a2 ER |
79 | %pre |
80 | %groupadd -g 175 %{name} | |
81 | %useradd -u 175 -d %{_sysconfdir} -g %{name} -c "Tenshi User" %{name} | |
82 | ||
1704837c ER |
83 | %post |
84 | /sbin/chkconfig --add %{name} | |
747de3a4 | 85 | %service %{name} restart |
1704837c ER |
86 | |
87 | %preun | |
88 | if [ "$1" = "0" ]; then | |
747de3a4 | 89 | %service -q %{name} stop |
1704837c ER |
90 | /sbin/chkconfig --del %{name} |
91 | fi | |
92 | ||
637d97a2 ER |
93 | %postun |
94 | if [ "$1" = "0" ]; then | |
95 | %userremove %{name} | |
96 | %groupremove %{name} | |
97 | fi | |
98 | ||
ed19a8a2 ER |
99 | %files |
100 | %defattr(644,root,root,755) | |
cc7455fe | 101 | %doc CREDITS Changelog README tenshi.conf |
ed19a8a2 | 102 | %attr(755,root,root) %{_sbindir}/* |
637d97a2 | 103 | %attr(750,root,tenshi) %dir %{_sysconfdir} |
cc7455fe | 104 | %attr(640,root,tenshi) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf |
a15cc553 JB |
105 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
106 | %{_mandir}/man8/* | |
637d97a2 | 107 | %dir %attr(775,root,tenshi) /var/run/tenshi |