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: http://kent.dl.sourceforge.net/project/%{name}/stable/%{version}/%{name}-%{version}.tar.gz
18 # Source0-md5: b418a667ce42665557329a7ac3bd1b93
19 Source1: %{name}-node.init
21 Source3: %{name}-apache.conf
22 Source4: %{name}.logrotate
23 Source5: %{name}-node.logrotate
24 Source6: %{name}-lighttpd.conf
25 Source8: %{name}-httpd.conf
26 Source11: %{name}-asyncd.init
27 Patch0: %{name}-Makefile.patch
28 Patch1: %{name}-plugins.patch
29 Patch2: %{name}-templatedir.patch
30 Patch3: %{name}-separate-configs.patch
31 Patch4: %{name}-timeout.patch
32 URL: http://munin.sourceforge.net/
33 BuildRequires: perl-Encode
34 BuildRequires: perl-Net-SNMP
35 BuildRequires: perl-devel
36 BuildRequires: rpm-perlprov
37 BuildRequires: rpm-pythonprov
38 BuildRequires: rpmbuild(macros) >= 1.671
40 Requires(triggerpostun): sed >= 4.0
41 Requires: %{name}-common = %{version}-%{release}
42 Requires: fonts-TTF-DejaVu
43 Requires: perl-Date-Manip
45 Requires: perl-HTML-Template
46 Requires: perl-Net-Server
47 Requires: rrdtool >= 1.3.0
49 Requires: webserver(alias)
50 Requires: webserver(auth)
51 Requires: webserver(cgi)
52 Requires: webserver(expires)
54 Conflicts: apache-base < 2.4.0-1
55 Conflicts: logrotate < 3.8.0
57 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59 %define _noautoreq_perl DBD::Pg
61 %define _sysconfdir /etc/%{name}
62 %define _webapps /etc/webapps
63 %define _webapp %{name}
64 %define _appdir %{_datadir}/%{_webapp}
65 %define _htmldir /var/lib/%{name}/html
68 Munin, formerly known as The Linpro RRD server, queries a number of
69 nodes, and processes the data using RRDtool and presents it on web
72 %description -l pl.UTF-8
73 Munin, znany poprzednio jako serwer RRD Linpro, odpytuje wiele węzłów
74 i przetwarza dane przy użyciu RRDtoola, a następnie prezentuje je na
78 Summary: Munin - the Linpro RRD data agent - common files
79 Summary(pl.UTF-8): Munin - agent danych RRD Linpro - wspólne pliki
81 Requires(postun): /usr/sbin/groupdel
82 Requires(postun): /usr/sbin/userdel
83 Requires(pre): /bin/id
84 Requires(pre): /usr/bin/getgid
85 Requires(pre): /usr/sbin/groupadd
86 Requires(pre): /usr/sbin/useradd
89 Munin, formerly known as The Linpro RRD server, queries a number of
90 nodes, and processes the data using RRDtool and presents it on web
93 %description common -l pl.UTF-8
94 Munin, znany poprzednio jako serwer RRD Linpro, odpytuje wiele węzłów
95 i przetwarza dane przy użyciu RRDtoola, a następnie prezentuje je na
99 Summary: Linpro RRD data agent
100 Summary(pl.UTF-8): Agent danych RRD Linpro
102 Requires(post,preun): /sbin/chkconfig
103 Requires: %{name}-common = %{version}-%{release}
106 #Requires: perl-Config-General
107 Requires: perl-Net-Netmask
108 Requires: perl-Net-SNMP
109 Requires: perl-Net-Server
110 Requires: perl-libwww
111 Requires: procps >= 2.0.7
112 Requires: rc-scripts >= 0.4.0.15
114 Suggests: perl-DBD-Pg
115 Conflicts: logrotate < 3.7-4
118 The Munin node package returns statistical data on the request of a
121 %description node -l pl.UTF-8
122 Pakiet Munin dla węzła zwraca dane statystyczne na żądanie serwera
134 %{__make} -j1 build \
135 PERL_MB_OPT="perl=%{__perl}" \
139 rm -rf $RPM_BUILD_ROOT
140 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,cron.d,logrotate.d},%{_bindir},%{_sbindir}} \
141 $RPM_BUILD_ROOT/var/log/archive/munin \
142 $RPM_BUILD_ROOT%{_webapps}/%{_webapp}
144 %{__make} -j1 install \
147 DESTDIR=$RPM_BUILD_ROOT
149 # move asyncd daemon do sbin
150 %{__mv} $RPM_BUILD_ROOT{%{_datadir}/munin,%{_sbindir}}/munin-asyncd
152 install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/munin-asyncd
153 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/munin-node
154 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/munin
155 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/munin
156 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/munin-node
158 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
159 cp -p %{SOURCE8} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
160 cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/lighttpd.conf
162 cp -p dists/tarball/plugins.conf $RPM_BUILD_ROOT%{_sysconfdir}
163 ln -sf %{_sysconfdir}/plugins.conf $RPM_BUILD_ROOT%{_sysconfdir}/plugin-conf.d/munin-node
165 for f in cgi-graph cgi-html graph html limits update ; do
166 touch $RPM_BUILD_ROOT/var/log/munin/munin-$f.log
170 rm -rf $RPM_BUILD_ROOT
172 %triggerin -- apache1 < 1.3.37-3, apache1-base
173 %webapp_register apache %{_webapp}
175 %triggerun -- apache1 < 1.3.37-3, apache1-base
176 %webapp_unregister apache %{_webapp}
178 %triggerin -- apache-base
179 %webapp_register httpd %{_webapp}
181 %triggerun -- apache-base
182 %webapp_unregister httpd %{_webapp}
184 %triggerin -- lighttpd
185 %webapp_register lighttpd %{_webapp}
187 %triggerun -- lighttpd
188 %webapp_unregister lighttpd %{_webapp}
190 %triggerpostun -- munin < 1.3.4-5
192 if [ -f /etc/munin/munin.conf.rpmsave ]; then
193 mv -f %{_webapps}/%{_webapp}/munin.conf{,.rpmnew}
194 mv -f /etc/munin/munin.conf.rpmsave %{_webapps}/%{_webapp}/munin.conf
196 # fix paths in munin.conf
197 sed -i -e 's|dbdir.*|dbdir /var/lib/munin/db|' \
198 -e 's|tmpldir.*|tmpldir %{_webapps}/%{_webapp}/templates|' \
199 %{_webapps}/%{_webapp}/munin.conf
201 # move RRDs to new location
205 db|html|plugin-state) ;;
211 for f in cgi-graph cgi-html graph html limits update ; do
212 touch /var/log/munin/munin-$f.log
213 chmod 660 /var/log/munin/munin-$f.log
214 chown munin:http /var/log/munin/munin-$f.log
218 if [ "$1" = "1" ] ; then
219 /sbin/chkconfig --add munin-node
220 %{_sbindir}/munin-node-configure --shell | sh
222 %service munin-node restart "Munin Node agent"
223 %service munin-asyncd try-restart "Munin Asyncd agent"
226 if [ "$1" = "0" ] ; then
227 %service munin-asyncd stop
228 %service munin-node stop
229 /sbin/chkconfig --del munin-node
230 /sbin/chkconfig --del munin-asyncd
234 %groupadd -g 158 munin
235 %useradd -o -u 158 -s /bin/false -g munin -c "Munin Node agent" -d /var/lib/munin munin
238 if [ "$1" = "0" ]; then
244 %defattr(644,root,root,755)
245 %dir %attr(750,munin,http) %{_webapps}/%{_webapp}
246 %dir %attr(750,munin,http) %{_webapps}/%{_webapp}/munin-conf.d
247 %dir %{_webapps}/%{_webapp}/templates
248 %{_webapps}/%{_webapp}/templates/*.tmpl
249 %dir %{_webapps}/%{_webapp}/templates/static
250 %{_webapps}/%{_webapp}/templates/static/*.css
251 %{_webapps}/%{_webapp}/templates/static/*.html
252 %{_webapps}/%{_webapp}/templates/static/*.ico
253 %{_webapps}/%{_webapp}/templates/static/*.js
254 %{_webapps}/%{_webapp}/templates/static/*.png
255 %dir %{_webapps}/%{_webapp}/templates/partial
256 %{_webapps}/%{_webapp}/templates/partial/*.tmpl
257 %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/munin.conf
258 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/apache.conf
259 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/httpd.conf
260 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/lighttpd.conf
261 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/munin
262 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/munin
263 %attr(755,root,root) %{_sbindir}/munin-cron
264 %attr(755,root,root) %{_datadir}/munin/munin-check
265 %attr(755,root,root) %{_datadir}/munin/munin-graph
266 %attr(755,root,root) %{_datadir}/munin/munin-html
267 %attr(755,root,root) %{_datadir}/munin/munin-limits
268 %attr(755,root,root) %{_datadir}/munin/munin-update
269 %attr(755,root,root) %{_datadir}/munin/munin-datafile2storable
270 %attr(755,root,root) %{_datadir}/munin/munin-storable2datafile
271 %attr(755,munin,root) %dir %{_datadir}/munin/cgi
272 %attr(755,munin,root) %{_datadir}/munin/cgi/munin-cgi-graph
273 %attr(755,munin,root) %{_datadir}/munin/cgi/munin-cgi-html
274 %attr(755,munin,root) %dir %{_htmldir}
275 %{perl_vendorlib}/Munin/Master
276 %{_mandir}/man3/Munin::Master*
277 %{_mandir}/man5/munin.conf*
278 %{_mandir}/man8/munin-check*
279 %{_mandir}/man8/munin-cron*
280 %{_mandir}/man8/munin-graph*
281 %{_mandir}/man8/munin-html*
282 %{_mandir}/man8/munin-limits*
283 %{_mandir}/man8/munin-update*
284 %{_mandir}/man8/munin.*
285 %attr(771,munin,munin) %dir /var/lib/munin/db
286 %attr(770,munin,http) %dir /var/lib/munin/db/cgi-tmp
287 %attr(660,munin,http) %ghost /var/log/munin/munin-cgi-graph.log
288 %attr(660,munin,http) %ghost /var/log/munin/munin-cgi-html.log
289 %attr(660,munin,http) %ghost /var/log/munin/munin-graph.log
290 %attr(660,munin,http) %ghost /var/log/munin/munin-html.log
291 %attr(660,munin,http) %ghost /var/log/munin/munin-limits.log
292 %attr(660,munin,http) %ghost /var/log/munin/munin-update.log
295 %defattr(644,root,root,755)
296 %doc README ChangeLog logo* Checklist
297 %dir %{_datadir}/munin
298 %attr(770,munin,http) %dir /var/log/munin
299 %attr(750,munin,http) %dir /var/log/archive/munin
300 %attr(771,munin,munin) %dir /var/lib/munin
301 %attr(770,munin,http) %dir /var/run/munin
302 %dir %{perl_vendorlib}/Munin
303 %{perl_vendorlib}/Munin/Common
304 %{_mandir}/man3/Munin::Common*
307 %defattr(644,root,root,755)
309 %dir %{_sysconfdir}/plugins
310 %dir %{_sysconfdir}/plugin-conf.d
311 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/munin-node.conf
312 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugins.conf
313 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugin-conf.d/munin-node
314 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/munin-node
315 %attr(754,root,root) /etc/rc.d/init.d/munin-asyncd
316 %attr(754,root,root) /etc/rc.d/init.d/munin-node
317 %attr(755,root,root) %{_bindir}/munindoc
318 %attr(755,root,root) %{_sbindir}/munin-asyncd
319 %attr(755,root,root) %{_sbindir}/munin-node
320 %attr(755,root,root) %{_sbindir}/munin-node-configure
321 %attr(755,root,root) %{_sbindir}/munin-run
322 %attr(755,root,root) %{_sbindir}/munin-sched
323 %{perl_vendorlib}/Munin/Node
324 %{perl_vendorlib}/Munin/Plugin
325 %{perl_vendorlib}/Munin/Plugin.pm
326 %attr(755,root,root) %{_datadir}/munin/munin-async
327 %dir %{_datadir}/munin/plugins
328 %attr(755,root,root) %{_datadir}/munin/plugins/*
330 %exclude %{_datadir}/munin/plugins/sybase_space
332 %dir %attr(770,munin,munin) /var/lib/munin/plugin-state
333 %dir %attr(770,munin,munin) /var/spool/munin
334 %{_mandir}/man1/munin-node*
335 %{_mandir}/man1/munin-run*
336 %{_mandir}/man1/munin-sched*
337 %{_mandir}/man1/munindoc*
338 %{_mandir}/man3/Munin::Node*
339 %{_mandir}/man3/Munin::Plugin*
340 %{_mandir}/man5/munin-node.conf*
343 #%defattr(644,root,root,755)
344 #%{_datadir}/munin/munin-jmx-plugins.jar