]> git.pld-linux.org Git - packages/bigsister.git/blob - bigsister.spec
- fixed perms for init script, unified
[packages/bigsister.git] / bigsister.spec
1 #TODO
2 # - package bigsister --> bigsister-agent
3 #/TODO
4 %include        /usr/lib/rpm/macros.perl
5 Summary:        The Big Sister Network and System Monitor
6 Summary(pl):    Wielka Siostra - monitor sieci i systemów
7 Name:           bigsister
8 Version:        0.99b2
9 Release:        0.1
10 License:        GPL
11 Group:          Networking
12 Source0:        http://dl.sourceforge.net/bigsister/big-sister-%{version}.tar.gz
13 # Source0-md5:  ef4bc0ccb9a8f91e13f40eaa198a37ca
14 Source1:        %{name}.init
15 Source2:        %{name}.sysconfig
16 Patch1:         %{name}-memory.patch
17 Patch2:         %{name}-logfile-notranslated.patch
18 Patch3:         %{name}-dubleinstall.patch
19 Patch4:         %{name}-not_user_check.patch
20 URL:            http://bigsister.graeff.com/
21 BuildRequires:  perl-libnet
22 BuildRequires:  perl-libwww
23 BuildRequires:  rpm-perlprov >= 4.0.2-104
24 BuildRequires:  rpmbuild(macros) >= 1.159
25 Requires(pre):  /bin/id
26 Requires(pre):  /usr/bin/getgid
27 Requires(pre):  /usr/sbin/groupadd
28 Requires(pre):  /usr/sbin/useradd
29 Requires(postun):       /usr/sbin/groupdel
30 Requires(postun):       /usr/sbin/userdel
31 Requires(post,preun):   /sbin/chkconfig
32 Provides:       group(bs)
33 Provides:       user(bs)
34 Provides:       perl(Monitor::uxmon)
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 # 'common' and 'parse' are files provided with bigsister
39 # perl-GD is optional (for generating maps)
40 # perl-FCGI is recommended, but not required
41 # perl-SNMP_Session is requires only for SNMP checks, but snmp.pm module
42 # (which tests if SNMP_Session exists) must be present in base package
43 %define         _noautoreq      'perl(common)' 'perl(parse)' 'perl(GD)' 'perl(FCGI)' 'perl(SNMP_Session)' 'perl(SNMP_util)' 'perl(BER)'
44
45 %description
46 Big Sister - a Big Brother clone.
47
48 %description -l pl
49 Wielka Siostra - klon Wielkiego Brata.
50
51 %package server
52 Summary:        Big Sister server
53 Summary(pl):    Serwer Big Sister
54 Group:          Networking
55 Requires(post,postun):  %{name} = %{version}-%{release}
56 Requires:       %{name} = %{version}-%{release}
57
58 %description server
59 Big Sister server part: display, status collector, alarm generator.
60
61 %description server -l pl
62 Czê¶æ serwerowa Big Sister: wy¶wietlaj±ca, zbieraj±ca dane i
63 generuj±ca alarmy.
64
65 %package ldap
66 Summary:        Big Sister plugin for monitoring LDAP
67 Summary(pl):    Wtyczka Big Sister do monitorowania LDAP
68 Group:          Networking
69 Requires:       %{name} = %{version}-%{release}
70
71 %description ldap
72 Big Sister plugin for monitoring LDAP.
73
74 %description ldap -l pl
75 Wtyczka Big Sister do monitorowania LDAP.
76
77 %package ldap_mozilla
78 Summary:        Big Sister plugin for minitoring LDAP using Mozilla::LDAP
79 Summary(pl):    Wtyczka Big Sister do monitorowania LDAP przy u¿yciu Mozilla::LDAP
80 Group:          Networking
81 Requires:       %{name} = %{version}-%{release}
82
83 %description ldap_mozilla
84 Big Sister plugin for monitoring LDAP using Mozilla::LDAP.
85
86 %description ldap_mozilla -l pl
87 Wtyczka Big Sister do monitorowania LDAP przy u¿yciu Mozilla::LDAP.
88
89 %package oracle
90 Summary:        Big Sister plugin for monitoring Oracle
91 Summary(pl):    Wtyczka Big Sister do monitorowania Oracle
92 Group:          Networking
93 Requires:       %{name} = %{version}-%{release}
94 Requires:       perl-DBD-Oracle
95
96 %description oracle
97 Big Sister plugin for monitoring Oracle.
98
99 %description oracle -l pl
100 Wtyczka Big Sister do monitorowania Oracle.
101
102 %package radius
103 Summary:        Big Sister plugin for monitoring radius server
104 Summary(pl):    Wtyczka Big Sister do monitorowania serwera radius
105 Group:          Networking
106 Requires:       %{name} = %{version}-%{release}
107 Requires:       perl-Authen-Radius
108
109 %description radius
110 Big Sister plugin for monitoring radius server.
111
112 %description radius -l pl
113 Wtyczka Big Sister do monitorowania serwera radius.
114
115 %package snmp
116 Summary:        Big Sister plugin for monitoring using SNMP
117 Summary(pl):    Wtyczka Big Sister do monitorowania z u¿yciem SNMP
118 Group:          Networking
119 Requires:       %{name} = %{version}-%{release}
120
121 %description snmp
122 Big Sister plugin for monitoring using SNMP.
123
124 %description snmp -l pl
125 Wtyczka Big Sister do monitorowania z u¿yciem SNMP.
126
127 %prep
128 %setup -q -n bs-%{version}
129 %patch1 -p1
130 %patch2 -p1
131 %patch3 -p1
132 %patch4 -p1
133
134 %build
135 ./configure \
136         --with-user=bs \
137         --enable-FHS 
138
139 %install
140 rm -rf $RPM_BUILD_ROOT
141 install -d $RPM_BUILD_ROOT%{_sysconfdir}{/rc.d/init.d,/sysconfig,/httpd/httpd.conf}
142
143 %{__make} install-server install-client install-reporting install-modules install-doc \
144         DESTDIR=$RPM_BUILD_ROOT
145
146 mv -f   $RPM_BUILD_ROOT%{_sbindir}/* \
147         $RPM_BUILD_ROOT%{_bindir}
148 rm -rf  $RPM_BUILD_ROOT%{_sbindir}
149
150 rm -rf  $RPM_BUILD_ROOT%{_sysconfdir}/init.d
151
152 mv -f   $RPM_BUILD_ROOT%{_sysconfdir}/bigsister/httpd.conf \
153         $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf/92_bigsister.conf 
154
155 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
156 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
157
158 %clean
159 rm -rf $RPM_BUILD_ROOT
160
161 %pre
162 if [ -n "`/usr/bin/getgid bs`" ]; then
163         if [ "`/usr/bin/getgid bs`" != 77 ]; then
164                 echo "Error: group bs doesn't have gid=77. Correct this before installing bigsister." 1>&2
165                 exit 1
166         fi
167 else
168         /usr/sbin/groupadd -g 77 bs
169 fi
170 if [ -n "`/bin/id -u bs 2>/dev/null`" ]; then
171         if [ "`/bin/id -u bs`" != "77" ]; then
172                 echo "Error: user bs doesn't have uid=77. Correct this before installing bigsister." 1>&2
173                 exit 1
174         fi
175 else
176         /usr/sbin/useradd -u 77 -d %{_var}/lib/bigsister/www \
177         -s /bin/false -c "Big Sister" -g bs bs 1>&2
178 fi
179
180 %post
181 /sbin/chkconfig --add bigsister
182 if [ -f /var/lock/subsys/bigsister ]; then
183         /etc/rc.d/init.d/bigsister restart >&2
184 else
185         echo "Run \"/etc/rc.d/init.d/bigsister start\" to start Big Sister." >&2
186 fi
187
188 %preun
189 if [ "$1" = "0" ]; then
190         if [ -f /var/lock/subsys/bigsister ]; then
191                 /etc/rc.d/init.d/bigsister stop >&2
192         fi
193         /sbin/chkconfig --del bigsister
194 fi
195
196 %postun
197 if [ "$1" = "0" ]; then
198         %userremove bs
199         %groupremove bs
200 fi
201
202 %post server
203 if [ -f /var/lock/subsys/bigsister ]; then
204         /etc/rc.d/init.d/bigsister restart >&2
205 else
206         echo "Run \"/etc/rc.d/init.d/bigsister start\" to start Big Sister." >&2
207 fi
208
209 %postun server
210 if [ -f /var/lock/subsys/bigsister ]; then
211         /etc/rc.d/init.d/bigsister restart >&2
212 else
213         echo "Run \"/etc/rc.d/init.d/bigsister start\" to start Big Sister." >&2
214 fi
215
216 %files
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{_bindir}/bs*
219 %dir %{_usr}/share/doc/bigsister
220 %doc %{_usr}/share/doc/bigsister/*
221 %{_sysconfdir}/httpd/httpd.conf/92_bigsister.conf
222 %attr(755,root,root) /etc/cron.weekly/bigsister_logs
223 %attr(754,root,bs) /etc/rc.d/init.d/bigsister
224 %{_mandir}/man*/*
225 %attr(750,root,bs) %dir %{_sysconfdir}/bigsister
226 %attr(660,root,bs) %config(noreplace) %verify(not size mtime md5) %{_usr}/share/bigsister/etc/resources
227 %attr(660,root,bs) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/bigsister/uxmon-net
228 %attr(660,root,bs) %config(noreplace) %verify(not size mtime md5) %{_usr}/share/bigsister/etc/OV
229 %attr(660,root,bs) %config(noreplace) %verify(not size mtime md5) %{_usr}/share/bigsister/etc/syslog
230 %attr(660,root,bs) %config(noreplace) %verify(not size mtime md5) %{_usr}/share/bigsister/etc/eventlog
231 %attr(660,root,bs) %config(noreplace) %verify(not size mtime md5) %{_usr}/share/bigsister/etc/tests.cfg
232 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sysconfig/bigsister
233 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/bigsister/resources
234 %attr(775,root,bs) %dir %{_usr}/share/bigsister/bin
235 %attr(775,root,bs) %dir %{_usr}/share/bigsister/bin/Monitor
236 %attr(775,root,bs) %dir %{_usr}/share/bigsister/bin/Reader
237 %attr(775,root,bs) %dir %{_usr}/share/bigsister/bin/BigSister
238 %{_usr}/share/bigsister/bin/BS_unix.pm
239 %{_usr}/share/bigsister/bin/BigSister/common.pm
240 %{_usr}/share/bigsister/bin/[CHPRSTcp]*.pm
241 %{_usr}/share/bigsister/bin/Monitor/*.pm
242 %{_usr}/share/bigsister/bin/MicroTime.pm
243 %{_usr}/share/bigsister/bin/Reader/*pm
244 %{_usr}/share/bigsister/bin/BS_win32.pm
245 %{_usr}/share/bigsister/bin/snmp.pm
246 %attr(755,root,root) %{_usr}/share/bigsister/bin/bb_start
247 %attr(755,root,root) %{_usr}/share/bigsister/bin/bb_start32
248 %attr(755,root,root) %{_usr}/share/bigsister/bin/bb_stop32
249 %attr(755,root,root) %{_usr}/share/bigsister/bin/report*
250 %attr(755,root,root) %{_usr}/share/bigsister/bin/smtpmail
251 %attr(755,root,root) %{_usr}/share/bigsister/bin/testers
252 %attr(755,root,root) %{_usr}/share/bigsister/bin/bbecho
253 %dir %{_usr}/share/bigsister
254 %dir %{_usr}/share/bigsister/uxmon
255 %dir %{_usr}/share/bigsister/uxmon/Config
256 %{_usr}/share/bigsister/uxmon/Config/_perflib
257 %{_usr}/share/bigsister/uxmon/Config/noFQDN
258 %{_usr}/share/bigsister/uxmon/Config/[FObdfimpty]*
259 %{_usr}/share/bigsister/uxmon/Config/_[ert]*
260 %{_usr}/share/bigsister/uxmon/Config/c[op]*
261 %{_usr}/share/bigsister/uxmon/Config/http
262 %{_usr}/share/bigsister/uxmon/Config/lo*
263 %{_usr}/share/bigsister/uxmon/Config/n[Fefln]*
264 %{_usr}/share/bigsister/uxmon/Config/ntp
265 %{_usr}/share/bigsister/uxmon/Config/r[ep]*
266 %{_usr}/share/bigsister/uxmon/Config/s[mty]*
267 %dir %{_usr}/share/bigsister/uxmon/Monitor
268 %{_usr}/share/bigsister/uxmon/Monitor/PerfLib.pm
269 %{_usr}/share/bigsister/uxmon/Monitor/eventlog.pm
270 %{_usr}/share/bigsister/uxmon/Monitor/[EMOTb-dfmpt-u]*
271 %{_usr}/share/bigsister/uxmon/Monitor/l[ox]*
272 %{_usr}/share/bigsister/uxmon/Monitor/r[ep]*
273 %{_usr}/share/bigsister/uxmon/Monitor/s[aty]*
274 %dir %{_usr}/share/bigsister/uxmon/Requester
275 %{_usr}/share/bigsister/uxmon/Requester/[A-Za-rt-z]*
276 %{_usr}/share/bigsister/uxmon/Requester/s[oy]*
277 %attr(755,root,root) %{_usr}/share/bigsister/uxmon/uxmon
278 %{_usr}/share/bigsister/uxmon/uxmon-rules.pl
279
280 %files server
281 %defattr(644,root,root,755)
282 %dir %{_sysconfdir}/bigsister/
283 %attr(660,root,bs) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/bigsister/bb-display.cfg
284 %attr(660,root,bs) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/bigsister/bb_event_generator.cfg
285 %attr(660,root,bs) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/bigsister/bsmon_site.cfg
286 %attr(660,root,bs) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/bigsister/notify.cfg
287 %attr(660,root,bs) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/bigsister/permissions
288 %attr(750,root,bs) %dir %{_sysconfdir}/bigsister/reporting
289 %{_sysconfdir}/bigsister/reporting/*
290 %attr(770,root,bs) %dir %{_usr}/share/bigsister/etc
291 %attr(660,root,bs) %config(noreplace) %verify(not size mtime md5) %{_usr}/share/bigsister/etc/bsmon.cfg
292 %attr(660,root,bs) %config(noreplace) %verify(not size mtime md5) %{_usr}/share/bigsister/etc/graphtemplates
293 %attr(660,root,bs) %config(noreplace) %verify(not size mtime md5) %{_usr}/share/bigsister/etc/keys
294 %attr(750,root,bs) %dir %{_usr}/share/bigsister/etc/graphdef
295 %{_usr}/share/bigsister/etc/graphdef/*
296 %attr(750,root,bs) %dir %{_usr}/share/bigsister/etc/moduleinfo
297 %{_usr}/share/bigsister/etc/moduleinfo/*
298 %attr(750,root,bs) %dir %{_usr}/share/bigsister/etc/testdef
299 %{_usr}/share/bigsister/etc/testdef/*
300 %attr(755,root,root) %dir %{_usr}/share/bigsister/cgi
301 %attr(755,root,root) %{_usr}/share/bigsister/cgi/bs*
302 %attr(775,root,bs) %dir %{_var}/lib/bigsister
303 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www
304 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www/html
305 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www/logs
306 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www/logs/history
307 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www/help
308 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www/help/images
309 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www/skins
310 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www/skins/techie
311 %attr(664,root,bs) %{_var}/lib/bigsister/www/skins/techie/*
312 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www/skins/title_in_table
313 %attr(664,root,bs) %{_var}/lib/bigsister/www/skins/title_in_table/*
314 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www/skins/twocolumn
315 %attr(664,root,bs) %{_var}/lib/bigsister/www/skins/twocolumn/*
316 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www/skins/webadmin
317 %attr(664,root,bs) %{_var}/lib/bigsister/www/skins/webadmin/*
318 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www/skins/white_bg
319 %attr(664,root,bs) %{_var}/lib/bigsister/www/skins/white_bg/*
320 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www/skins/default
321 %attr(664,root,bs) %{_var}/lib/bigsister/www/skins/default/*
322 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www/skins/static_lamps
323 %attr(664,root,bs) %{_var}/lib/bigsister/www/skins/static_lamps/*
324 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www/skins/structured_bg
325 %attr(664,root,bs) %{_var}/lib/bigsister/www/skins/structured_bg/*
326 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www/skins/alt_contentsicons
327 %attr(664,root,bs) %{_var}/lib/bigsister/www/skins/alt_contentsicons/*
328 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www/skins/bigbro13
329 %attr(664,root,bs) %{_var}/lib/bigsister/www/skins/bigbro13/*
330 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www/skins/bsdoc
331 %attr(664,root,bs) %{_var}/lib/bigsister/www/skins/bsdoc/*
332 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www/skins/compactmenu
333 %attr(664,root,bs) %{_var}/lib/bigsister/www/skins/compactmenu/*
334 %attr(775,root,bs) %dir %{_var}/lib/bigsister/www/skins/frames
335 %attr(664,root,bs) %{_var}/lib/bigsister/www/skins/frames/*
336 %{_var}/lib/bigsister/www/help/*.html
337 %{_var}/lib/bigsister/www/help/*.jpg
338 %{_var}/lib/bigsister/www/help/images/*png
339 %attr(775,root,bs) %dir %{_usr}/share/bigsister/bin
340 %attr(775,root,bs) %dir %{_usr}/share/bigsister/bin/Statusmon
341 %{_usr}/share/bigsister/bin/Statusmon/[BDGHRSTght]*.pm
342 %{_usr}/share/bigsister/bin/Statusmon/bs_evgen.pm
343 %{_usr}/share/bigsister/bin/access.pm
344 %{_usr}/share/bigsister/bin/bbdisp.pm
345 %{_usr}/share/bigsister/bin/bscgi.pm
346 %{_usr}/share/bigsister/bin/display_map.pm
347 #te dwa tutaj powinny byc???
348 %{_usr}/share/bigsister/bin/BER.pm
349 %{_usr}/share/bigsister/bin/IPCFile.pm
350 #
351 %attr(755,root,root) %{_usr}/share/bigsister/bin/bbd
352 %attr(755,root,root) %{_usr}/share/bigsister/bin/bsmon
353 %attr(755,root,root) %{_usr}/share/bigsister/bin/log_mail
354 %attr(755,root,root) %{_usr}/share/bigsister/bin/notify
355 %attr(755,root,root) %{_usr}/share/bigsister/bin/compile_skin
356 %attr(755,root,root) %{_usr}/share/bigsister/bin/page_meridian
357
358 %files ldap
359 %defattr(644,root,root,755)
360 %{_usr}/share/bigsister/uxmon/Config/ldap
361 %{_usr}/share/bigsister/uxmon/Monitor/ldap.pm
362
363 %files ldap_mozilla
364 %defattr(644,root,root,755)
365 %{_usr}/share/bigsister/uxmon/Config/ldap_mozilla
366 %{_usr}/share/bigsister/uxmon/Monitor/ldap_mozilla.pm
367
368 %files oracle
369 %defattr(644,root,root,755)
370 %{_usr}/share/bigsister/uxmon/Config/oracle
371 %{_usr}/share/bigsister/uxmon/Monitor/oracle.pm
372
373 %files radius
374 %defattr(644,root,root,755)
375 %{_usr}/share/bigsister/uxmon/Config/radius
376 %{_usr}/share/bigsister/uxmon/Monitor/radius.pm
377
378 %files snmp
379 %defattr(644,root,root,755)
380 %{_usr}/share/bigsister/etc/mibs.txt
381 %{_usr}/share/bigsister/etc/perf*
382 %{_usr}/share/bigsister/etc/snmp_trap
383 %attr(755,root,root) %{_usr}/share/bigsister/bin/bstrapd
384 %{_usr}/share/bigsister/bin/snmp.pm
385 %{_usr}/share/bigsister/uxmon/Config/_snmp
386 %{_usr}/share/bigsister/uxmon/Config/_storage
387 %{_usr}/share/bigsister/uxmon/Config/atmport
388 %{_usr}/share/bigsister/uxmon/Config/caty
389 %{_usr}/share/bigsister/uxmon/Config/etherport
390 %{_usr}/share/bigsister/uxmon/Config/hub
391 %{_usr}/share/bigsister/uxmon/Config/novell
392 %{_usr}/share/bigsister/uxmon/Config/nt
393 %{_usr}/share/bigsister/uxmon/Config/snmp
394 %{_usr}/share/bigsister/uxmon/Config/snmp_trap
395 %{_usr}/share/bigsister/uxmon/Config/snmpvar
396 %{_usr}/share/bigsister/uxmon/Config/software
397 %{_usr}/share/bigsister/uxmon/Config/ups
398 %{_usr}/share/bigsister/uxmon/Config/qmqueue
399 %{_usr}/share/bigsister/uxmon/Config/sendmail
400 %{_usr}/share/bigsister/uxmon/Monitor/atmport.pm
401 %{_usr}/share/bigsister/uxmon/Monitor/etherport.pm
402 %{_usr}/share/bigsister/uxmon/Monitor/snmp.pm
403 %{_usr}/share/bigsister/uxmon/Monitor/qmqueue.pm
404 %{_usr}/share/bigsister/uxmon/Monitor/sendmail.pm
405 %{_usr}/share/bigsister/uxmon/Monitor/snmp_trap.pm
406 %{_usr}/share/bigsister/uxmon/Requester/snmp.pm
This page took 0.202631 seconds and 3 git commands to generate.