2 %bcond_with sybase # add Sybase support to munin-node
4 Summary: Munin - the Linpro RRD data agent
5 Summary(pl.UTF-8): Munin - agent danych RRD Linpro
10 Group: Applications/WWW
11 Source0: https://github.com/munin-monitoring/munin/archive/%{version}.tar.gz
12 # Source0-md5: e793d7d139df7cd7730089186a3afc28
13 Source1: %{name}-node.init
15 Source3: %{name}-apache.conf
16 Source4: %{name}.logrotate
17 Source5: %{name}-node.logrotate
18 Source6: %{name}-lighttpd.conf
19 Source8: %{name}-httpd.conf
20 Source11: %{name}-asyncd.init
21 Source12: %{name}-asyncd.sysconfig
22 Source13: plugins.conf
23 Patch0: %{name}-Makefile.patch
24 Patch1: %{name}-plugins.patch
25 Patch2: %{name}-templatedir.patch
26 Patch3: %{name}-separate-configs.patch
27 Patch4: %{name}-timeout.patch
29 URL: http://munin.sourceforge.net/
30 BuildRequires: perl-Encode
31 BuildRequires: perl-Module-Build
32 BuildRequires: perl-Net-SNMP
33 BuildRequires: perl-devel
34 BuildRequires: rpm-perlprov
35 BuildRequires: rpm-pythonprov
36 BuildRequires: rpmbuild(macros) >= 1.671
38 Requires(postun): sed >= 4.0
39 Requires: %{name}-common = %{version}-%{release}
40 Requires: fonts-TTF-DejaVu
41 Requires: perl-Date-Manip
43 Requires: perl-HTML-Template
44 Requires: perl-Net-Server
45 Requires: rrdtool >= 1.3.0
47 Requires: webserver(alias)
48 Requires: webserver(auth)
49 Requires: webserver(cgi)
50 Requires: webserver(expires)
52 Conflicts: apache-base < 2.4.0-1
53 Conflicts: logrotate < 3.8.0
55 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 %define _noautoreq_perl DBD::Pg
59 %define _sysconfdir /etc/%{name}
60 %define _webapps /etc/webapps
61 %define _webapp %{name}
62 %define _appdir %{_datadir}/%{_webapp}
63 %define _htmldir /var/lib/%{name}/html
66 Munin, formerly known as The Linpro RRD server, queries a number of
67 nodes, and processes the data using RRDtool and presents it on web
70 %description -l pl.UTF-8
71 Munin, znany poprzednio jako serwer RRD Linpro, odpytuje wiele węzłów
72 i przetwarza dane przy użyciu RRDtoola, a następnie prezentuje je na
76 Summary: Munin asynchronous proxy client/server
77 Summary(pl.UTF-8): Klient/serwer asynchronicznego proxy dla Munina
79 Requires(post,preun): /sbin/chkconfig
80 Requires: %{name}-node = %{version}-%{release}
83 Asynchronous proxy client/server for Munin node.
85 %description async -l pl.UTF-8
86 Klient/serwer asynchronicznego proxy dla węzła Munina.
89 Summary: Munin - the Linpro RRD data agent - common files
90 Summary(pl.UTF-8): Munin - agent danych RRD Linpro - wspólne pliki
92 Requires(postun): /usr/sbin/groupdel
93 Requires(postun): /usr/sbin/userdel
94 Requires(pre): /bin/id
95 Requires(pre): /usr/bin/getgid
96 Requires(pre): /usr/sbin/groupadd
97 Requires(pre): /usr/sbin/useradd
100 Munin, formerly known as The Linpro RRD server, queries a number of
101 nodes, and processes the data using RRDtool and presents it on web
104 %description common -l pl.UTF-8
105 Munin, znany poprzednio jako serwer RRD Linpro, odpytuje wiele węzłów
106 i przetwarza dane przy użyciu RRDtoola, a następnie prezentuje je na
110 Summary: Linpro RRD data agent
111 Summary(pl.UTF-8): Agent danych RRD Linpro
113 Requires(post,preun): /sbin/chkconfig
114 Requires: %{name}-common = %{version}-%{release}
117 #Requires: perl-Config-General
118 Requires: perl-Net-Netmask
119 Requires: perl-Net-SNMP
120 Requires: perl-Net-Server
121 Requires: perl-libwww
122 Requires: procps >= 2.0.7
123 Requires: rc-scripts >= 0.4.0.15
125 Suggests: perl-DBD-Pg
126 Conflicts: logrotate < 3.7-4
129 The Munin node package returns statistical data on the request of a
132 %description node -l pl.UTF-8
133 Pakiet Munin dla węzła zwraca dane statystyczne na żądanie serwera
146 %{__make} -j1 build \
147 PERL_MB_OPT="perl=%{__perl}" \
151 rm -rf $RPM_BUILD_ROOT
152 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,cron.d,logrotate.d,sysconfig},%{_bindir},%{_sbindir}} \
153 $RPM_BUILD_ROOT/var/log/archive/munin \
154 $RPM_BUILD_ROOT%{_webapps}/%{_webapp}
156 %{__make} -j1 install \
159 DESTDIR=$RPM_BUILD_ROOT
161 # move asyncd daemon do sbin
162 %{__mv} $RPM_BUILD_ROOT{%{_datadir}/munin,%{_sbindir}}/munin-asyncd
164 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/munin-node
165 install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/munin-asyncd
166 install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/munin-asyncd
168 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/munin
169 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/munin
170 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/munin-node
172 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
173 cp -p %{SOURCE8} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
174 cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/lighttpd.conf
177 cp -p %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}
178 ln -sf %{_sysconfdir}/plugins.conf $RPM_BUILD_ROOT%{_sysconfdir}/plugin-conf.d/munin-node
180 for f in cgi-graph cgi-html graph html limits update ; do
181 touch $RPM_BUILD_ROOT/var/log/munin/munin-$f.log
185 rm -rf $RPM_BUILD_ROOT
187 %triggerin -- apache1 < 1.3.37-3, apache1-base
188 %webapp_register apache %{_webapp}
190 %triggerun -- apache1 < 1.3.37-3, apache1-base
191 %webapp_unregister apache %{_webapp}
193 %triggerin -- apache-base
194 %webapp_register httpd %{_webapp}
196 %triggerun -- apache-base
197 %webapp_unregister httpd %{_webapp}
199 %triggerin -- lighttpd
200 %webapp_register lighttpd %{_webapp}
202 %triggerun -- lighttpd
203 %webapp_unregister lighttpd %{_webapp}
205 %triggerpostun -- munin < 1.3.4-5
207 if [ -f /etc/munin/munin.conf.rpmsave ]; then
208 mv -f %{_webapps}/%{_webapp}/munin.conf{,.rpmnew}
209 mv -f /etc/munin/munin.conf.rpmsave %{_webapps}/%{_webapp}/munin.conf
211 # fix paths in munin.conf
212 sed -i -e 's|dbdir.*|dbdir /var/lib/munin/db|' \
213 -e 's|tmpldir.*|tmpldir %{_webapps}/%{_webapp}/templates|' \
214 %{_webapps}/%{_webapp}/munin.conf
216 # move RRDs to new location
220 db|html|plugin-state) ;;
226 for f in cgi-graph cgi-html graph html limits update ; do
227 touch /var/log/munin/munin-$f.log
228 chmod 660 /var/log/munin/munin-$f.log
229 chown munin:http /var/log/munin/munin-$f.log
233 if [ "$1" = "1" ] ; then
234 /sbin/chkconfig --add munin-asyncd
236 %service munin-asyncd try-restart "Munin Asyncd"
239 if [ "$1" = "0" ] ; then
240 %service munin-asyncd stop
241 /sbin/chkconfig --del munin-asyncd
245 if [ "$1" = "1" ] ; then
246 /sbin/chkconfig --add munin-node
247 %{_sbindir}/munin-node-configure --shell | sh
249 %service munin-node restart "Munin Node"
252 if [ "$1" = "0" ] ; then
253 %service munin-node stop
254 /sbin/chkconfig --del munin-node
258 %groupadd -g 158 munin
259 %useradd -o -u 158 -s /bin/false -g munin -c "Munin Node" -d /var/lib/munin munin
262 if [ "$1" = "0" ]; then
268 %defattr(644,root,root,755)
269 %dir %attr(750,munin,http) %{_webapps}/%{_webapp}
270 %dir %attr(750,munin,http) %{_webapps}/%{_webapp}/munin-conf.d
271 %dir %{_webapps}/%{_webapp}/templates
272 %{_webapps}/%{_webapp}/templates/*.tmpl
273 %dir %{_webapps}/%{_webapp}/templates/static
274 %{_webapps}/%{_webapp}/templates/static/*.css
275 %{_webapps}/%{_webapp}/templates/static/*.html
276 %{_webapps}/%{_webapp}/templates/static/*.ico
277 %{_webapps}/%{_webapp}/templates/static/*.js
278 %{_webapps}/%{_webapp}/templates/static/*.png
279 %dir %{_webapps}/%{_webapp}/templates/partial
280 %{_webapps}/%{_webapp}/templates/partial/*.tmpl
281 %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/munin.conf
282 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/apache.conf
283 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/httpd.conf
284 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/lighttpd.conf
285 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/munin
286 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/munin
287 %attr(755,root,root) %{_sbindir}/munin-cron
288 %attr(755,root,root) %{_datadir}/munin/munin-check
289 %attr(755,root,root) %{_datadir}/munin/munin-graph
290 %attr(755,root,root) %{_datadir}/munin/munin-html
291 %attr(755,root,root) %{_datadir}/munin/munin-limits
292 %attr(755,root,root) %{_datadir}/munin/munin-update
293 %attr(755,root,root) %{_datadir}/munin/munin-datafile2storable
294 %attr(755,root,root) %{_datadir}/munin/munin-storable2datafile
295 %attr(755,munin,root) %dir %{_datadir}/munin/cgi
296 %attr(755,munin,root) %{_datadir}/munin/cgi/munin-cgi-graph
297 %attr(755,munin,root) %{_datadir}/munin/cgi/munin-cgi-html
298 %attr(755,munin,root) %dir %{_htmldir}
299 %{perl_vendorlib}/Munin/Master
300 %{_mandir}/man3/Munin::Master*
301 %{_mandir}/man5/munin.conf*
302 %{_mandir}/man8/munin-check*
303 %{_mandir}/man8/munin-cron*
304 %{_mandir}/man8/munin-graph*
305 %{_mandir}/man8/munin-html*
306 %{_mandir}/man8/munin-limits*
307 %{_mandir}/man8/munin-update*
308 %{_mandir}/man8/munin.*
309 %attr(771,munin,munin) %dir /var/lib/munin/db
310 %attr(770,munin,http) %dir /var/lib/munin/db/cgi-tmp
311 %attr(660,munin,http) %ghost /var/log/munin/munin-cgi-graph.log
312 %attr(660,munin,http) %ghost /var/log/munin/munin-cgi-html.log
313 %attr(660,munin,http) %ghost /var/log/munin/munin-graph.log
314 %attr(660,munin,http) %ghost /var/log/munin/munin-html.log
315 %attr(660,munin,http) %ghost /var/log/munin/munin-limits.log
316 %attr(660,munin,http) %ghost /var/log/munin/munin-update.log
319 %defattr(644,root,root,755)
320 %doc README ChangeLog logo* Checklist
321 %dir %{_datadir}/munin
322 %attr(770,munin,http) %dir /var/log/munin
323 %attr(750,munin,http) %dir /var/log/archive/munin
324 %attr(771,munin,munin) %dir /var/lib/munin
325 %attr(770,munin,http) %dir /var/run/munin
326 %dir %{perl_vendorlib}/Munin
327 %{perl_vendorlib}/Munin/Common
328 %{_mandir}/man3/Munin::Common*
331 %defattr(644,root,root,755)
332 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/munin-asyncd
333 %attr(754,root,root) /etc/rc.d/init.d/munin-asyncd
334 %attr(755,root,root) %{_sbindir}/munin-asyncd
335 %attr(755,root,root) %{_datadir}/munin/munin-async
338 %defattr(644,root,root,755)
340 %dir %{_sysconfdir}/plugins
341 %dir %{_sysconfdir}/plugin-conf.d
342 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/munin-node.conf
343 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugins.conf
344 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugin-conf.d/munin-node
345 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/munin-node
346 %attr(754,root,root) /etc/rc.d/init.d/munin-node
347 %attr(755,root,root) %{_bindir}/munin-get
348 %attr(755,root,root) %{_bindir}/munindoc
349 %attr(755,root,root) %{_sbindir}/munin-node
350 %attr(755,root,root) %{_sbindir}/munin-node-configure
351 %attr(755,root,root) %{_sbindir}/munin-run
352 %{perl_vendorlib}/Munin/Node
353 %{perl_vendorlib}/Munin/Plugin
354 %{perl_vendorlib}/Munin/Plugin.pm
355 %dir %{_datadir}/munin/plugins
356 %attr(755,root,root) %{_datadir}/munin/plugins/*
358 %exclude %{_datadir}/munin/plugins/sybase_space
360 %dir %attr(770,munin,munin) /var/lib/munin/plugin-state
361 %dir %attr(770,munin,munin) /var/spool/munin
362 %{_mandir}/man1/munin-get*
363 %{_mandir}/man1/munin-node*
364 %{_mandir}/man1/munin-run*
365 %{_mandir}/man1/munindoc*
366 %{_mandir}/man3/Munin::Node*
367 %{_mandir}/man3/Munin::Plugin*
368 %{_mandir}/man5/munin-node.conf*