2 # - R: perl* should be autogenerated?
3 # - add plugins-java package and proper BRs
6 %bcond_with sybase # add Sybase support to munin-node
8 %include /usr/lib/rpm/macros.perl
9 Summary: Munin - the Linpro RRD data agent
10 Summary(pl.UTF-8): Munin - agent danych RRD Linpro
15 Group: Applications/WWW
16 Source0: http://downloads.sourceforge.net/munin/%{name}-%{version}.tar.gz
17 # Source0-md5: b418a667ce42665557329a7ac3bd1b93
18 Source1: %{name}-node.init
20 Source3: %{name}-apache.conf
21 Source4: %{name}.logrotate
22 Source5: %{name}-node.logrotate
23 Source6: %{name}-lighttpd.conf
24 Source8: %{name}-httpd.conf
25 Source11: %{name}-asyncd.init
26 Patch0: %{name}-Makefile.patch
27 Patch1: %{name}-plugins.patch
28 Patch2: %{name}-templatedir.patch
29 Patch3: %{name}-separate-configs.patch
30 Patch4: %{name}-timeout.patch
31 URL: http://munin.sourceforge.net/
32 BuildRequires: perl-Encode
33 BuildRequires: perl-Net-SNMP
34 BuildRequires: perl-devel
35 BuildRequires: rpm-perlprov
36 BuildRequires: rpm-pythonprov
37 BuildRequires: rpmbuild(macros) >= 1.671
39 Requires(triggerpostun): sed >= 4.0
40 Requires: %{name}-common = %{version}-%{release}
41 Requires: fonts-TTF-DejaVu
42 Requires: perl-Date-Manip
44 Requires: perl-HTML-Template
45 Requires: perl-Net-Server
46 Requires: rrdtool >= 1.3.0
48 Requires: webserver(alias)
49 Requires: webserver(auth)
50 Requires: webserver(cgi)
51 Requires: webserver(expires)
53 Conflicts: apache-base < 2.4.0-1
54 Conflicts: logrotate < 3.8.0
56 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58 %define _noautoreq_perl DBD::Pg
60 %define _sysconfdir /etc/%{name}
61 %define _webapps /etc/webapps
62 %define _webapp %{name}
63 %define _appdir %{_datadir}/%{_webapp}
64 %define _htmldir /var/lib/%{name}/html
67 Munin, formerly known as The Linpro RRD server, queries a number of
68 nodes, and processes the data using RRDtool and presents it on web
71 %description -l pl.UTF-8
72 Munin, znany poprzednio jako serwer RRD Linpro, odpytuje wiele węzłów
73 i przetwarza dane przy użyciu RRDtoola, a następnie prezentuje je na
77 Summary: Munin - the Linpro RRD data agent - common files
78 Summary(pl.UTF-8): Munin - agent danych RRD Linpro - wspólne pliki
80 Requires(postun): /usr/sbin/groupdel
81 Requires(postun): /usr/sbin/userdel
82 Requires(pre): /bin/id
83 Requires(pre): /usr/bin/getgid
84 Requires(pre): /usr/sbin/groupadd
85 Requires(pre): /usr/sbin/useradd
88 Munin, formerly known as The Linpro RRD server, queries a number of
89 nodes, and processes the data using RRDtool and presents it on web
92 %description common -l pl.UTF-8
93 Munin, znany poprzednio jako serwer RRD Linpro, odpytuje wiele węzłów
94 i przetwarza dane przy użyciu RRDtoola, a następnie prezentuje je na
98 Summary: Linpro RRD data agent
99 Summary(pl.UTF-8): Agent danych RRD Linpro
101 Requires(post,preun): /sbin/chkconfig
102 Requires: %{name}-common = %{version}-%{release}
105 #Requires: perl-Config-General
106 Requires: perl-Net-Netmask
107 Requires: perl-Net-SNMP
108 Requires: perl-Net-Server
109 Requires: perl-libwww
110 Requires: procps >= 2.0.7
111 Requires: rc-scripts >= 0.4.0.15
113 Suggests: perl-DBD-Pg
114 Conflicts: logrotate < 3.7-4
117 The Munin node package returns statistical data on the request of a
120 %description node -l pl.UTF-8
121 Pakiet Munin dla węzła zwraca dane statystyczne na żądanie serwera
133 %{__make} -j1 build \
134 PERL_MB_OPT="perl=%{__perl}" \
138 rm -rf $RPM_BUILD_ROOT
139 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,cron.d,logrotate.d},%{_bindir},%{_sbindir}} \
140 $RPM_BUILD_ROOT/var/log/archive/munin \
141 $RPM_BUILD_ROOT%{_webapps}/%{_webapp}
143 %{__make} -j1 install \
146 DESTDIR=$RPM_BUILD_ROOT
148 # move asyncd daemon do sbin
149 %{__mv} $RPM_BUILD_ROOT{%{_datadir}/munin,%{_sbindir}}/munin-asyncd
151 install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/munin-asyncd
152 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/munin-node
153 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/munin
154 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/munin
155 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/munin-node
157 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
158 cp -p %{SOURCE8} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
159 cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/lighttpd.conf
161 cp -p dists/tarball/plugins.conf $RPM_BUILD_ROOT%{_sysconfdir}
162 ln -sf %{_sysconfdir}/plugins.conf $RPM_BUILD_ROOT%{_sysconfdir}/plugin-conf.d/munin-node
164 for f in cgi-graph cgi-html graph html limits update ; do
165 touch $RPM_BUILD_ROOT/var/log/munin/munin-$f.log
169 rm -rf $RPM_BUILD_ROOT
171 %triggerin -- apache1 < 1.3.37-3, apache1-base
172 %webapp_register apache %{_webapp}
174 %triggerun -- apache1 < 1.3.37-3, apache1-base
175 %webapp_unregister apache %{_webapp}
177 %triggerin -- apache-base
178 %webapp_register httpd %{_webapp}
180 %triggerun -- apache-base
181 %webapp_unregister httpd %{_webapp}
183 %triggerin -- lighttpd
184 %webapp_register lighttpd %{_webapp}
186 %triggerun -- lighttpd
187 %webapp_unregister lighttpd %{_webapp}
189 %triggerpostun -- munin < 1.3.4-5
191 if [ -f /etc/munin/munin.conf.rpmsave ]; then
192 mv -f %{_webapps}/%{_webapp}/munin.conf{,.rpmnew}
193 mv -f /etc/munin/munin.conf.rpmsave %{_webapps}/%{_webapp}/munin.conf
195 # fix paths in munin.conf
196 sed -i -e 's|dbdir.*|dbdir /var/lib/munin/db|' \
197 -e 's|tmpldir.*|tmpldir %{_webapps}/%{_webapp}/templates|' \
198 %{_webapps}/%{_webapp}/munin.conf
200 # move RRDs to new location
204 db|html|plugin-state) ;;
210 for f in cgi-graph cgi-html graph html limits update ; do
211 touch /var/log/munin/munin-$f.log
212 chmod 660 /var/log/munin/munin-$f.log
213 chown munin:http /var/log/munin/munin-$f.log
217 if [ "$1" = "1" ] ; then
218 /sbin/chkconfig --add munin-node
219 %{_sbindir}/munin-node-configure --shell | sh
221 %service munin-node restart "Munin Node agent"
222 %service munin-asyncd try-restart "Munin Asyncd agent"
225 if [ "$1" = "0" ] ; then
226 %service munin-asyncd stop
227 %service munin-node stop
228 /sbin/chkconfig --del munin-node
229 /sbin/chkconfig --del munin-asyncd
233 %groupadd -g 158 munin
234 %useradd -o -u 158 -s /bin/false -g munin -c "Munin Node agent" -d /var/lib/munin munin
237 if [ "$1" = "0" ]; then
243 %defattr(644,root,root,755)
244 %dir %attr(750,munin,http) %{_webapps}/%{_webapp}
245 %dir %attr(750,munin,http) %{_webapps}/%{_webapp}/munin-conf.d
246 %dir %{_webapps}/%{_webapp}/templates
247 %{_webapps}/%{_webapp}/templates/*.tmpl
248 %dir %{_webapps}/%{_webapp}/templates/static
249 %{_webapps}/%{_webapp}/templates/static/*.css
250 %{_webapps}/%{_webapp}/templates/static/*.html
251 %{_webapps}/%{_webapp}/templates/static/*.ico
252 %{_webapps}/%{_webapp}/templates/static/*.js
253 %{_webapps}/%{_webapp}/templates/static/*.png
254 %dir %{_webapps}/%{_webapp}/templates/partial
255 %{_webapps}/%{_webapp}/templates/partial/*.tmpl
256 %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/munin.conf
257 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/apache.conf
258 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/httpd.conf
259 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/lighttpd.conf
260 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/munin
261 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/munin
262 %attr(755,root,root) %{_sbindir}/munin-cron
263 %attr(755,root,root) %{_datadir}/munin/munin-check
264 %attr(755,root,root) %{_datadir}/munin/munin-graph
265 %attr(755,root,root) %{_datadir}/munin/munin-html
266 %attr(755,root,root) %{_datadir}/munin/munin-limits
267 %attr(755,root,root) %{_datadir}/munin/munin-update
268 %attr(755,root,root) %{_datadir}/munin/munin-datafile2storable
269 %attr(755,root,root) %{_datadir}/munin/munin-storable2datafile
270 %attr(755,munin,root) %dir %{_datadir}/munin/cgi
271 %attr(755,munin,root) %{_datadir}/munin/cgi/munin-cgi-graph
272 %attr(755,munin,root) %{_datadir}/munin/cgi/munin-cgi-html
273 %attr(755,munin,root) %dir %{_htmldir}
274 %{perl_vendorlib}/Munin/Master
275 %{_mandir}/man3/Munin::Master*
276 %{_mandir}/man5/munin.conf*
277 %{_mandir}/man8/munin-check*
278 %{_mandir}/man8/munin-cron*
279 %{_mandir}/man8/munin-graph*
280 %{_mandir}/man8/munin-html*
281 %{_mandir}/man8/munin-limits*
282 %{_mandir}/man8/munin-update*
283 %{_mandir}/man8/munin.*
284 %attr(771,munin,munin) %dir /var/lib/munin/db
285 %attr(770,munin,http) %dir /var/lib/munin/db/cgi-tmp
286 %attr(660,munin,http) %ghost /var/log/munin/munin-cgi-graph.log
287 %attr(660,munin,http) %ghost /var/log/munin/munin-cgi-html.log
288 %attr(660,munin,http) %ghost /var/log/munin/munin-graph.log
289 %attr(660,munin,http) %ghost /var/log/munin/munin-html.log
290 %attr(660,munin,http) %ghost /var/log/munin/munin-limits.log
291 %attr(660,munin,http) %ghost /var/log/munin/munin-update.log
294 %defattr(644,root,root,755)
295 %doc README ChangeLog logo* Checklist
296 %dir %{_datadir}/munin
297 %attr(770,munin,http) %dir /var/log/munin
298 %attr(750,munin,http) %dir /var/log/archive/munin
299 %attr(771,munin,munin) %dir /var/lib/munin
300 %attr(770,munin,http) %dir /var/run/munin
301 %dir %{perl_vendorlib}/Munin
302 %{perl_vendorlib}/Munin/Common
303 %{_mandir}/man3/Munin::Common*
306 %defattr(644,root,root,755)
308 %dir %{_sysconfdir}/plugins
309 %dir %{_sysconfdir}/plugin-conf.d
310 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/munin-node.conf
311 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugins.conf
312 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugin-conf.d/munin-node
313 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/munin-node
314 %attr(754,root,root) /etc/rc.d/init.d/munin-asyncd
315 %attr(754,root,root) /etc/rc.d/init.d/munin-node
316 %attr(755,root,root) %{_bindir}/munindoc
317 %attr(755,root,root) %{_sbindir}/munin-asyncd
318 %attr(755,root,root) %{_sbindir}/munin-node
319 %attr(755,root,root) %{_sbindir}/munin-node-configure
320 %attr(755,root,root) %{_sbindir}/munin-run
321 %attr(755,root,root) %{_sbindir}/munin-sched
322 %{perl_vendorlib}/Munin/Node
323 %{perl_vendorlib}/Munin/Plugin
324 %{perl_vendorlib}/Munin/Plugin.pm
325 %attr(755,root,root) %{_datadir}/munin/munin-async
326 %dir %{_datadir}/munin/plugins
327 %attr(755,root,root) %{_datadir}/munin/plugins/*
329 %exclude %{_datadir}/munin/plugins/sybase_space
331 %dir %attr(770,munin,munin) /var/lib/munin/plugin-state
332 %dir %attr(770,munin,munin) /var/spool/munin
333 %{_mandir}/man1/munin-node*
334 %{_mandir}/man1/munin-run*
335 %{_mandir}/man1/munin-sched*
336 %{_mandir}/man1/munindoc*
337 %{_mandir}/man3/Munin::Node*
338 %{_mandir}/man3/Munin::Plugin*
339 %{_mandir}/man5/munin-node.conf*
342 #%defattr(644,root,root,755)
343 #%{_datadir}/munin/munin-jmx-plugins.jar