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