SHA256
1
0
forked from pool/munin
munin/munin.spec

374 lines
13 KiB
RPMSpec
Raw Normal View History

# norootforbuild
%define htmldir /srv/www/htdocs/munin
%define cgidir /srv/www/cgi-bin
%define dbdir /var/lib/munin
%define logdir /var/log/munin
%define statedir /var/run/munin
Name: munin
Version: 1.4.7
Release: 1
Summary: Network-wide graphing framework (grapher/gatherer)
License: GPL
Group: System/Monitoring
URL: http://munin.sourceforge.net
Source0: http://heanet.dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.gz
Source1: Makefile.config
Source2: munin-node.rc
Source3: munin.cron.d
Source4: munin.logrotate
Source5: munin-node.logrotate
Source6: munin-node.cron.d
Source7: plugins.conf
Patch0: munin-CVE-2012-2147.patch
Requires: perl-base = %{perl_version}
Requires: perl-HTML-Template perl-Log-Log4perl perl-Net-Server perl-Net-SNMP
%if %suse_version >= 1110
Requires: perl-Net-SSLeay
%endif
Requires: pwdutils rrdtool
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: html2text htmldoc perl-HTML-Template perl-Log-Log4perl perl-Net-Server
BuildRequires: perl-Net-SNMP pwdutils sysvinit
%if %suse_version >= 1110
BuildRequires: perl-Net-SSLeay
%endif
%description
Munin is a highly flexible and powerful solution used to create graphs of
virtually everything imaginable throughout your network, while still
maintaining a rattling ease of installation and configuration.
This package contains the grapher/gatherer. You will only need one instance of
it in your network. It will periodically poll all the nodes in your network
it's aware of for data, which it in turn will use to create graphs and HTML
pages, suitable for viewing with your graphical web browser of choice.
Munin is written in Perl, and relies heavily on Tobi Oetiker's excellent
RRDtool.
%package node
Group: System/Monitoring
Summary: Network-wide graphing framework (node)
BuildArch: noarch
Requires: perl-base = %{perl_version}
Requires: perl-HTML-Template perl-Log-Log4perl perl-Net-Server perl-Net-SNMP
%if %suse_version >= 1110
Requires: perl-Net-SSLeay
%endif
Requires: pwdutils ps sysstat
%description node
Munin is a highly flexible and powerful solution used to create graphs of
virtually everything imaginable throughout your network, while still
maintaining a rattling ease of installation and configuration.
This package contains node software. You should install it on all the nodes
in your network. It will know how to extract all sorts of data from the
node it runs on, and will wait for the gatherer to request this data for
further processing.
It includes a range of plugins capable of extracting common values such as
cpu usage, network usage, load average, and so on. Creating your own plugins
which are capable of extracting other system-specific values is very easy,
and is often done in a matter of minutes. You can also create plugins which
relay information from other devices in your network that can't run Munin,
such as a switch or a server running another operating system, by using
SNMP or similar technology.
Munin is written in Perl, and relies heavily on Tobi Oetiker's excellent
RRDtool. To see a real example of Munin in action, take a peek at
<http://www.linpro.no/projects/munin/example/>.
%prep
%setup -q
cp %{SOURCE1} .
%patch0 -p1
%build
%__make
%install
%makeinstall
%__mkdir_p %{buildroot}/%{_sysconfdir}/munin/plugins
%__mkdir_p %{buildroot}/%{_sysconfdir}/munin/munin-conf.d
%__mkdir_p %{buildroot}/%{_sysconfdir}/init.d
%__install -m0755 %{SOURCE2} %{buildroot}/%{_sysconfdir}/init.d/munin-node
%__mkdir_p %{buildroot}/%{_sysconfdir}/cron.d
%__install -m0644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/cron.d/munin
%__install -m0644 %{SOURCE6} %{buildroot}/%{_sysconfdir}/cron.d/munin-node
%__mkdir_p %{buildroot}/etc/logrotate.d
%__install -m0644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/logrotate.d/munin
%__install -m0644 %{SOURCE5} %{buildroot}/%{_sysconfdir}/logrotate.d/munin-node
%__install -m0644 %{SOURCE7} %{buildroot}/%{_sysconfdir}/munin/plugin-conf.d/munin-node
mkdir -p %{buildroot}/sbin
%__ln_s ../etc/init.d/munin-node $RPM_BUILD_ROOT/sbin/rcmunin-node
%clean
%{__rm} -rf %{buildroot}
%pre
/usr/sbin/groupadd -r munin &>/dev/null || :
/usr/sbin/useradd -o -g munin -s /bin/false -r -c "munin monitoring" -d /var/lib/munin munin &>/dev/null || :
%post
mkdir -p %{htmldir}
mkdir -p %{logdir}
mkdir -p %{dbdir}
chown -R munin:munin %{htmldir}
chown -R munin:munin %{logdir}
chown -R munin:munin %{statedir}
chown -R munin:munin %{dbdir}
## Node
%pre node
getent group munin >/dev/null || /usr/sbin/groupadd -r munin
getent passwd munin > /dev/null || /usr/sbin/useradd -r -d %{dbdir} -g munin munin
%post node
if [ $1 = 1 ]
then
/sbin/chkconfig --add munin-node
/usr/sbin/munin-node-configure --shell | sh
fi
mkdir -p %{logdir}
mkdir -p %{dbdir}/plugin-state
chown -R munin:munin %{logdir}
chown -R munin:munin %{dbdir}
chmod g+w %{dbdir}/plugin-state
/etc/init.d/munin-node status >/dev/null 2>&1 || /etc/init.d/munin-node start
%preun node
if [ $1 = 0 ]
then
/sbin/service munin-node stop > /dev/null 2>&1
/sbin/chkconfig --del munin-node
rmdir %{logdir} 2>/dev/null || true
fi
%stop_on_removal munin-node
%postun node
%restart_on_update munin-node
%{insserv_cleanup}
%files
%defattr(-, root, root)
%doc ChangeLog COPYING README UPGRADING
%{_bindir}/munin-check
%{_bindir}/munin-cron
%{_bindir}/munindoc
%dir %{_prefix}/lib/munin
%{_prefix}/lib/munin/munin-graph
%{_prefix}/lib/munin/munin-html
%{_prefix}/lib/munin/munin-limits
%{_prefix}/lib/munin/munin-update
%{_prefix}/lib/munin/DejaVuSans.ttf
%{_prefix}/lib/munin/DejaVuSansMono.ttf
%{cgidir}/munin-cgi-graph
%{cgidir}/munin-fastcgi-graph
%dir %{htmldir}
%{htmldir}/.htaccess
%dir %{_sysconfdir}/munin
%dir %{_sysconfdir}/munin/munin-conf.d
%dir %{_sysconfdir}/munin/templates
%config %{_sysconfdir}/munin/templates/*
%config %{_sysconfdir}/cron.d/munin
%config(noreplace) %{_sysconfdir}/munin/munin.conf
%config %{_sysconfdir}/logrotate.d/munin
%dir %{statedir}
%dir %{perl_vendorlib}/Munin
%dir %{perl_vendorlib}/Munin/Master
%{perl_vendorlib}/Munin/Master/Config.pm
%{perl_vendorlib}/Munin/Master/GraphOld.pm
%{perl_vendorlib}/Munin/Master/Group.pm
%{perl_vendorlib}/Munin/Master/GroupRepository.pm
%{perl_vendorlib}/Munin/Master/HTMLOld.pm
%{perl_vendorlib}/Munin/Master/Host.pm
%{perl_vendorlib}/Munin/Master/LimitsOld.pm
%{perl_vendorlib}/Munin/Master/Logger.pm
%{perl_vendorlib}/Munin/Master/Node.pm
%{perl_vendorlib}/Munin/Master/ProcessManager.pm
%{perl_vendorlib}/Munin/Master/Update.pm
%{perl_vendorlib}/Munin/Master/UpdateWorker.pm
%{perl_vendorlib}/Munin/Master/Utils.pm
%{perl_vendorlib}/Munin/Master/Worker.pm
%{_mandir}/man3/Munin::Master::Config.3pm.gz
%{_mandir}/man3/Munin::Master::Group.3pm.gz
%{_mandir}/man3/Munin::Master::GroupRepository.3pm.gz
%{_mandir}/man3/Munin::Master::HTMLOld.3pm.gz
%{_mandir}/man3/Munin::Master::Host.3pm.gz
%{_mandir}/man3/Munin::Master::Logger.3pm.gz
%{_mandir}/man3/Munin::Master::Node.3pm.gz
%{_mandir}/man3/Munin::Master::ProcessManager.3pm.gz
%{_mandir}/man3/Munin::Master::Update.3pm.gz
%{_mandir}/man3/Munin::Master::UpdateWorker.3pm.gz
%{_mandir}/man3/Munin::Master::Utils.3pm.gz
%{_mandir}/man3/Munin::Master::Worker.3pm.gz
%{_mandir}/man5/munin-node.conf.5.gz
%{_mandir}/man5/munin.conf.5.gz
%{_mandir}/man8/munin-check.8.gz
%{_mandir}/man8/munin-cron.8.gz
%{_mandir}/man8/munin-graph.8.gz
%{_mandir}/man8/munin-html.8.gz
%{_mandir}/man8/munin-limits.8.gz
%{_mandir}/man8/munin-update.8.gz
%{_mandir}/man8/munin.8.gz
%files node
%defattr(-, root, root)
%{_sbindir}/munin-run
%{_sbindir}/munin-node
%{_sbindir}/munin-node-configure
%dir %{_prefix}/lib/munin
%dir %{_prefix}/lib/munin/plugins
%{_prefix}/lib/munin/plugins/*
/sbin/rcmunin-node
%dir %{_sysconfdir}/munin/plugin-conf.d
%dir %{_sysconfdir}/munin/plugins
%config(noreplace) %{_sysconfdir}/munin/plugin-conf.d/munin-node
%config(noreplace) %{_sysconfdir}/munin/munin-node.conf
%config %{_sysconfdir}/init.d/munin-node
%config %{_sysconfdir}/cron.d/munin-node
%config %{_sysconfdir}/logrotate.d/munin-node
%dir %{perl_vendorlib}/Munin/Common
%{perl_vendorlib}/Munin/Common/Config.pm
%{perl_vendorlib}/Munin/Common/Defaults.pm
%{perl_vendorlib}/Munin/Common/TLS.pm
%{perl_vendorlib}/Munin/Common/TLSClient.pm
%{perl_vendorlib}/Munin/Common/TLSServer.pm
%{perl_vendorlib}/Munin/Common/Timeout.pm
%dir %{perl_vendorlib}/Munin/Node
%{perl_vendorlib}/Munin/Node/Config.pm
%dir %{perl_vendorlib}/Munin/Node/Configure
%{perl_vendorlib}/Munin/Node/Configure/Debug.pm
%{perl_vendorlib}/Munin/Node/Configure/History.pm
%{perl_vendorlib}/Munin/Node/Configure/HostEnumeration.pm
%{perl_vendorlib}/Munin/Node/Configure/Plugin.pm
%{perl_vendorlib}/Munin/Node/Configure/PluginList.pm
%{perl_vendorlib}/Munin/Node/Logger.pm
%{perl_vendorlib}/Munin/Node/OS.pm
%{perl_vendorlib}/Munin/Node/SNMPConfig.pm
%{perl_vendorlib}/Munin/Node/Server.pm
%{perl_vendorlib}/Munin/Node/Service.pm
%{perl_vendorlib}/Munin/Node/Session.pm
%{perl_vendorlib}/Munin/Node/Utils.pm
%{perl_vendorlib}/Munin/Plugin.pm
%dir %{perl_vendorlib}/Munin/Plugin
%{perl_vendorlib}/Munin/Plugin/Pgsql.pm
%{perl_vendorlib}/Munin/Plugin/SNMP.pm
%{_mandir}/man1/munin-node-configure.1.gz
%{_mandir}/man1/munin-node.1.gz
%{_mandir}/man1/munin-run.1.gz
%{_mandir}/man1/munindoc.1.gz
%{_mandir}/man3/Munin::Common::Config.3pm.gz
%{_mandir}/man3/Munin::Common::Defaults.3pm.gz
%{_mandir}/man3/Munin::Common::TLS.3pm.gz
%{_mandir}/man3/Munin::Common::TLSClient.3pm.gz
%{_mandir}/man3/Munin::Common::TLSServer.3pm.gz
%{_mandir}/man3/Munin::Common::Timeout.3pm.gz
%{_mandir}/man3/Munin::Node::Config.3pm.gz
%{_mandir}/man3/Munin::Node::Configure::Debug.3pm.gz
%{_mandir}/man3/Munin::Node::Configure::History.3pm.gz
%{_mandir}/man3/Munin::Node::Configure::HostEnumeration.3pm.gz
%{_mandir}/man3/Munin::Node::Configure::Plugin.3pm.gz
%{_mandir}/man3/Munin::Node::Configure::PluginList.3pm.gz
%{_mandir}/man3/Munin::Node::Logger.3pm.gz
%{_mandir}/man3/Munin::Node::OS.3pm.gz
%{_mandir}/man3/Munin::Node::SNMPConfig.3pm.gz
%{_mandir}/man3/Munin::Node::Server.3pm.gz
%{_mandir}/man3/Munin::Node::Service.3pm.gz
%{_mandir}/man3/Munin::Node::Session.3pm.gz
%{_mandir}/man3/Munin::Node::Utils.3pm.gz
%{_mandir}/man3/Munin::Plugin.3pm.gz
%{_mandir}/man3/Munin::Plugin::Pgsql.3pm.gz
%{_mandir}/man3/Munin::Plugin::SNMP.3pm.gz
%changelog
* Wed Jun 09 2010 Detlef Reichelt <detlef@links2linux.de> - 1.4.5
- new upstream version <1.4.5>
* bugfix release
* Sat Mar 06 2010 Detlef Reichelt <detlef@links2linux.de> - 1.4.4
- new upstream version <1.4.4>
* Thu Dec 31 2009 Detlef Reichelt <detlef@links2linux.de> - 1.4.3
- new upstream release <1.4.3>
* Mon Dec 21 2009 Detlef Reichelt <detlef@links2linux.de> - 1.4.2
- new upstream release <1.4.2>
* Mon Dec 07 2009 Detlef Reichelt <detlef@links2linux.de> - 1.4.1
- new upstream release <1.4.1>
* Sat Nov 28 2009 Detlef Reichelt <detlef@links2linux.de> - 1.4.0
- new upstream release <1.4.0>
* Sat Dec 27 2008 Detlef Reichelt 1.2.6
- add UTF8 patch
* Sat Jul 19 2008 Detlef Reichelt <1.2.6>-<0.pm.1>
- new upstream release <1.2.6>
* Wed Aug 15 2007 Detlef Reichelt <1.2.5>-<0.pm.1>
- new upstream release <1.2.5>
* Mon Oct 17 2005 Detlef Reichelt <detlef@links2linux.de>
- Fixed missing /sbin/rcmunin-node
* Sun Oct 16 2005 Detlef Reichelt <detlef@links2linux.de>
- First build for packman
* Mon Apr 3 2005 Rune Nordbe Skillingstad <runesk@linpro.no>
- 1.2.3 release
* Fri Apr 1 2005 Rune Nordbe Skillingstad <runesk@linpro.no>
- 1.2.2 release
- Fixed SF bug 1164481 (missing /srv/www/htdocs/munin)
- Fixed SF bug 1164477 (patch for Net::Domain on PPC64)
* Fri Mar 11 2005 Rune Nordbe Skillingstad <runesk@linpro.no>
- 1.2.1 release
* Wed Mar 9 2005 Rune Nordbe Skillingstad <runesk@linpro.no>
- Fixed erronumous path to web directory
- Added start of node if not running
* Thu Mar 8 2005 Rune Nordbe Skillingstad <runesk@linpro.no>
- Fixed some build path problems
* Thu Feb 24 2005 Rune Nordbe Skillingstad <runesk@linpro.no>
- New major release
* Wed Feb 9 2005 Rune Nordbe Skillingstad <runesk@linpro.no>
- Updated to version 1.2.0rc2.
- Removed Nagios stuff
- Added noreplace for some central configuration files
* Thu Nov 18 2004 Rune Nordbe Skillingstad <runesk@linpro.no>
- Updated to version 1.0.4
* Mon Nov 08 2004 Rune Nordbe Skillingstad <runesk@linpro.no>
- Updated version 1.0.3 / sync with redhat-build
* Wed Aug 04 2004 Rune Nordbe Skillingstad <runesk@linpro.no>
- Initial SuSE build
* Sun Feb 01 2004 Ingvar Hagelund <ingvar@linpro.no>
- Sync with CVS. Version 1.0.0pre2
* Sun Jan 18 2004 Ingvar Hagelund <ingvar@linpro.no>
- Sync with CVS. Change names to munin.
* Fri Oct 31 2003 Ingvar Hagelund <ingvar@linpro.no>
- Lot of small fixes. Now builds on more RPM distros
* Wed May 21 2003 Ingvar Hagelund <ingvar@linpro.no>
- Sync with CVS
- 0.9.5-1
* Tue Apr 1 2003 Ingvar Hagelund <ingvar@linpro.no>
- Sync with CVS
- Makefile-based install of core files
- Build doc (only pod2man)
* Thu Jan 9 2003 Ingvar Hagelund <ingvar@linpro.no>
- Sync with CVS, auto rpmbuild
* Thu Jan 2 2003 Ingvar Hagelund <ingvar@linpro.no>
- Fix spec file for RedHat 8.0 and new version of lrrd
* Wed Sep 4 2002 Ingvar Hagelund <ingvar@linpro.no>
- Small bugfixes in the rpm package
* Tue Jun 18 2002 Kjetil Torgrim Homme <kjetilho@linpro.no>
- new package