From f511d4eba28f213b89d8a4d2ad9ae85699b2e1df Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Dec 01 2009 05:47:50 +0000 Subject: Update to 1.4.0 --- diff --git a/.cvsignore b/.cvsignore index bd84c1b..5ad24fe 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -munin_1.2.6.tar.gz +munin_1.4.0.tar.gz diff --git a/munin-1.2.4-conf.patch b/munin-1.2.4-conf.patch deleted file mode 100644 index 35719ad..0000000 --- a/munin-1.2.4-conf.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur munin-1.2.4.orig/server/munin.conf.in munin-1.2.4/server/munin.conf.in ---- munin-1.2.4.orig/server/munin.conf.in 2005-10-08 04:11:02.000000000 -0600 -+++ munin-1.2.4/server/munin.conf.in 2006-04-22 14:17:46.000000000 -0600 -@@ -24,7 +24,7 @@ - #contact.nagios.command /usr/sbin/send_nsca -H nagios.host.com -c /etc/send_nsca.cfg - - # a simple host tree --[@@HOSTNAME@@] -+[localhost] - address 127.0.0.1 - use_node_name yes - diff --git a/munin-1.2.4-cron.patch b/munin-1.2.4-cron.patch deleted file mode 100644 index 0f415c6..0000000 --- a/munin-1.2.4-cron.patch +++ /dev/null @@ -1,8 +0,0 @@ -diff -Nur munin-1.2.4.orig/dists/redhat/munin.cron.d munin-1.2.4/dists/redhat/munin.cron.d ---- munin-1.2.4.orig/dists/redhat/munin.cron.d 2005-10-08 04:11:01.000000000 -0600 -+++ munin-1.2.4/dists/redhat/munin.cron.d 2006-04-22 14:10:48.000000000 -0600 -@@ -5,4 +5,3 @@ - MAILTO=root - - */5 * * * * munin test -x /usr/bin/munin-cron && /usr/bin/munin-cron --10 10 * * * munin test -x /usr/share/munin/munin-nagios && /usr/share/munin/munin-nagios --removeok diff --git a/munin-1.2.5-amp-degree.patch b/munin-1.2.5-amp-degree.patch deleted file mode 100644 index 6220399..0000000 --- a/munin-1.2.5-amp-degree.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff -Nur munin-1.2.5.orig/node/node.d/acpi.in munin-1.2.5/node/node.d/acpi.in ---- munin-1.2.5.orig/node/node.d/acpi.in 2006-10-17 06:27:35.000000000 -0600 -+++ munin-1.2.5/node/node.d/acpi.in 2007-12-26 12:26:26.000000000 -0700 -@@ -51,7 +51,7 @@ - - echo 'graph_title CPU temperature' - echo 'graph_args --base 1000 -l 0' -- echo 'graph_vlabel temp in �C' -+ echo 'graph_vlabel temp in C' - echo 'graph_category sensors' - echo 'graph_info This graph shows temperatures based on output from ACPI.' - echo cpu.label cpu -diff -Nur munin-1.2.5.orig/node/node.d/hddtemp.in munin-1.2.5/node/node.d/hddtemp.in ---- munin-1.2.5.orig/node/node.d/hddtemp.in 2006-10-17 06:27:35.000000000 -0600 -+++ munin-1.2.5/node/node.d/hddtemp.in 2007-12-26 12:26:18.000000000 -0700 -@@ -53,7 +53,7 @@ - - echo 'graph_title HDD temperature' - echo 'graph_args --base 1000 -l 0' -- echo 'graph_vlabel temp in �C' -+ echo 'graph_vlabel temp in C' - echo 'graph_category sensors' - for a in $drives ; do echo $a.label $a ; done - exit 0 -diff -Nur munin-1.2.5.orig/node/node.d/hddtemp_smartctl.in munin-1.2.5/node/node.d/hddtemp_smartctl.in ---- munin-1.2.5.orig/node/node.d/hddtemp_smartctl.in 2006-10-17 06:27:35.000000000 -0600 -+++ munin-1.2.5/node/node.d/hddtemp_smartctl.in 2007-12-26 12:26:22.000000000 -0700 -@@ -135,7 +135,7 @@ - } elsif ($ARGV[0] eq 'config') { - print "graph_title HDD temperature\n"; - print "graph_args --base 1000 -l 0\n"; -- print "graph_vlabel temp in �C\n"; -+ print "graph_vlabel temp in C\n"; - print "graph_category sensors\n"; - print "graph_info This graph shows the temperature in degrees Celsius of the hard drives in the machine.\n"; - print "$_.label $_\n" foreach @drives; -diff -Nur munin-1.2.5.orig/node/node.d.linux/interrupts.in munin-1.2.5/node/node.d.linux/interrupts.in ---- munin-1.2.5.orig/node/node.d.linux/interrupts.in 2006-10-17 06:27:35.000000000 -0600 -+++ munin-1.2.5/node/node.d.linux/interrupts.in 2007-12-26 12:25:32.000000000 -0700 -@@ -56,12 +56,12 @@ - - if [ "$1" = "config" ]; then - # The title of the graph -- echo 'graph_title Interrupts & context switches' -+ echo 'graph_title Interrupts & context switches' - # Arguments to "rrdtool graph". In this case, tell it that the - # lower limit of the graph is '0', and that 1k=1000 (not 1024) - echo 'graph_args --base 1000 -l 0' - # The Y-axis label -- echo 'graph_vlabel interrupts & ctx switches / ${graph_period}' -+ echo 'graph_vlabel interrupts & ctx switches / ${graph_period}' - # Graph category - echo 'graph_category system' - # Graph information diff --git a/munin-1.2.5-nf-conntrack.patch b/munin-1.2.5-nf-conntrack.patch deleted file mode 100644 index 9132710..0000000 --- a/munin-1.2.5-nf-conntrack.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -Nur munin-1.2.5.orig/node/node.d.linux/fw_conntrack.in munin-1.2.5/node/node.d.linux/fw_conntrack.in ---- munin-1.2.5.orig/node/node.d.linux/fw_conntrack.in 2006-10-17 06:27:35.000000000 -0600 -+++ munin-1.2.5/node/node.d.linux/fw_conntrack.in 2007-11-30 21:54:22.000000000 -0700 -@@ -84,7 +84,7 @@ - exit 0 - ;; - autoconf) -- if [ -f /proc/net/ip_conntrack ] ; then -+ if [ -f /proc/net/ip_conntrack -o -f /proc/net/nf_conntrack ] ; then - echo yes - exit 0 - else -@@ -102,7 +102,15 @@ - # udp 17 53 src=80.111.68.163 dst=62.179.100.29 sport=34153 dport=53 src=62.179.100.29 dst=80.111.68.163 sport=53 dport=34153 [ASSURED] use=1 - # - --cat /proc/net/ip_conntrack | awk ' -+if [ -f /proc/net/ip_conntrack ]; then -+ conntrack_file=/proc/net/ip_conntrack -+elif [ -f /proc/net/nf_conntrack ]; then -+ conntrack_file=/proc/net/nf_conntrack -+else -+ exit 1 -+fi -+ -+cat "$conntrack_file" | awk ' - BEGIN { STATE["ESTABLISHED"]=STATE["FIN_WAIT"]=STATE["TIME_WAIT"]=0; - ASSURED=NOREPLY=NATED=STATE["SYN_SENT"]=STATE["UDP"]=0; } - /^tcp/ { STATE[$4]++; } -diff -Nur munin-1.2.5.orig/node/node.d.linux/fw_forwarded_local.in munin-1.2.5/node/node.d.linux/fw_forwarded_local.in ---- munin-1.2.5.orig/node/node.d.linux/fw_forwarded_local.in 2006-10-17 06:27:35.000000000 -0600 -+++ munin-1.2.5/node/node.d.linux/fw_forwarded_local.in 2007-11-30 21:57:02.000000000 -0700 -@@ -36,10 +36,13 @@ - if ( cat /proc/net/ip_conntrack 2>/dev/null >/dev/null ); then - echo yes - exit 0 -+ elif ( cat /proc/net/nf_conntrack 2>/dev/null >/dev/null ); then -+ echo yes -+ exit 0 - else - if [ $? -eq 127 ] - then -- echo "no (ipconntrack not found)" -+ echo "no (ip_conntrack/nf_conntrack not found)" - exit 1 - else - echo no -@@ -50,7 +53,7 @@ - - if [ "$1" = "config" ]; then - -- echo 'graph_title ipconntrack' -+ echo 'graph_title conntrack' - echo 'graph_args -l 0 --base 1000' - echo 'graph_vlabel established connections' - echo 'graph_category network' -@@ -63,4 +66,13 @@ - exit 0 - fi - --cat /proc/net/ip_conntrack | grep ESTABLISHED | sed 's/.*src=\(.*\) .*dst=\(.*\) sport.*src=\(.*\) .*dst=\(.*\) spo.*/\1 \2 \3 \4/g' | awk 'BEGIN {{FORW=0} {LOCAL=0}} {if($1 != $4){ FORW += 1} else { LOCAL += 1}} END {{print "forward.value "FORW} {print "local.value "LOCAL}}' -+if [ -f /proc/net/ip_conntrack ]; then -+ conntrack_file=/proc/net/ip_conntrack -+elif [ -f /proc/net/nf_conntrack ]; then -+ conntrack_file=/proc/net/nf_conntrack -+else -+ exit 1 -+fi -+ -+cat "$conntrack_file" | grep ESTABLISHED | sed 's/.*src=\(.*\) .*dst=\(.*\) sport.*src=\(.*\) .*dst=\(.*\) spo.*/\1 \2 \3 \4/g' | awk 'BEGIN {{FORW=0} {LOCAL=0}} {if($1 != $4){ FORW += 1} else { LOCAL += 1}} END {{print "forward.value "FORW} {print "local.value "LOCAL}}' -+ diff --git a/munin-1.2.6-hddtemp_smartctl-spinup.patch b/munin-1.2.6-hddtemp_smartctl-spinup.patch deleted file mode 100644 index 1d9d0bb..0000000 --- a/munin-1.2.6-hddtemp_smartctl-spinup.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- munin-1.2.6/node/node.d/hddtemp_smartctl.in 2009-01-24 15:47:35.000000000 +0100 -+++ munin-1.2.6/node/node.d/hddtemp_smartctl.in 2009-01-24 15:48:18.000000000 +0100 -@@ -146,8 +146,8 @@ - $fulldev .= 'rdsk/' if $^O eq 'solaris'; - $fulldev .= exists $ENV{'dev_'.$_} ? $ENV{'dev_'.$_} : $dev; - -- # Avoid spinning up sleeping disks -- next if `hdparm -C $fulldev 2>/dev/null` =~ /standby/; -+ # Avoid spinning up sleeping disks only for /dev/sd? or /dev/hd? devices. -+ next if $fulldev =~ /\/dev\/[sh]d?/ && `hdparm -C $fulldev 2>/dev/null` =~ /standby/; - - my $cmd = $smartctl.' -A '; - $cmd .= $ENV{'args_'.$_}.' ' if exists $ENV{'args_'.$_}; diff --git a/munin-1.2.6-ntp_offset.patch b/munin-1.2.6-ntp_offset.patch deleted file mode 100644 index ef408a6..0000000 --- a/munin-1.2.6-ntp_offset.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff -Nur munin-1.2.6.orig/node/node.d/ntp_offset.in munin-1.2.6/node/node.d/ntp_offset.in ---- munin-1.2.6.orig/node/node.d/ntp_offset.in 2008-01-27 11:17:17.000000000 -0700 -+++ munin-1.2.6/node/node.d/ntp_offset.in 2008-06-25 12:52:05.000000000 -0600 -@@ -1,4 +1,4 @@ --#!@@GOODSH@@ -w -+#!@@GOODSH@@ - # -*- sh -*- - # - # Plugin to monitor NTP time offset. diff --git a/munin-1.4.0-config.patch b/munin-1.4.0-config.patch new file mode 100644 index 0000000..52af5dd --- /dev/null +++ b/munin-1.4.0-config.patch @@ -0,0 +1,33 @@ +diff -Nur munin-1.4.0.orig/dists/redhat/Makefile.config munin-1.4.0/dists/redhat/Makefile.config +--- munin-1.4.0.orig/dists/redhat/Makefile.config 2009-11-27 04:17:14.000000000 -0700 ++++ munin-1.4.0/dists/redhat/Makefile.config 2009-11-30 22:28:20.000000000 -0700 +@@ -23,7 +23,7 @@ + VERSION = $(shell cat RELEASE) + USER = munin + GROUP = munin +-PLUGINUSER = nobody ++PLUGINUSER = munin + GETENT = $(shell which getent || which true 2>/dev/null) + CHECKUSER = $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistent. Create the user and retry; exit 2")) + CHECKGROUP = $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistent. Create the group and retry; exit 2")) +diff -Nur munin-1.4.0.orig/master/munin.conf.in munin-1.4.0/master/munin.conf.in +--- munin-1.4.0.orig/master/munin.conf.in 2009-11-27 04:17:18.000000000 -0700 ++++ munin-1.4.0/master/munin.conf.in 2009-11-30 22:28:20.000000000 -0700 +@@ -15,7 +15,7 @@ + + # (Exactly one) directory to include all files from. + # +-includedir @@CONFDIR@@/munin-conf.d ++# includedir @@CONFDIR@@/munin-conf.d + + # Make graphs show values per minute instead of per second + #graph_period minute +@@ -57,7 +57,7 @@ + #contact.nagios.command /usr/bin/send_nsca nagios.host.comm -c /etc/nsca.conf + + # a simple host tree +-[@@HOSTNAME@@] ++[localhost] + address 127.0.0.1 + use_node_name yes + diff --git a/munin.spec b/munin.spec index 7942a8c..a61ca23 100644 --- a/munin.spec +++ b/munin.spec @@ -1,6 +1,6 @@ Name: munin -Version: 1.2.6 -Release: 10%{?dist} +Version: 1.4.0 +Release: 1%{?dist} Summary: Network-wide graphing framework (grapher/gatherer) License: GPLv2 and Bitstream Vera Group: System Environment/Daemons @@ -8,19 +8,28 @@ URL: http://munin.projects.linpro.no/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Source0: http://download.sourceforge.net/sourceforge/munin/%{name}_%{version}.tar.gz +Source0: http://downloads.sourceforge.net/sourceforge/munin/%{name}_%{version}.tar.gz + +Patch1: munin-1.4.0-config.patch + Source1: munin-1.2.4-sendmail-config Source2: munin-1.2.5-hddtemp_smartctl-config Source3: munin-node.logrotate Source4: munin.logrotate Source5: nf_conntrack Source6: munin-1.2.6-postfix-config -Patch1: munin-1.2.4-conf.patch -Patch2: munin-1.2.5-nf-conntrack.patch -Patch3: munin-1.2.5-amp-degree.patch -Patch4: munin-1.2.6-ntp_offset.patch -Patch5: munin-1.2.6-hddtemp_smartctl-spinup.patch + BuildArchitectures: noarch + +BuildRequires: perl-Module-Build +# needed for hostname for the defaut config +BuildRequires: net-tools +BuildRequires: java-devel >= 1.6 +BuildRequires: mx4j +BuildRequires: jpackage-utils +BuildRequires: perl-Net-SNMP + +Requires: %{name}-common = %{version} Requires: perl-Net-Server perl-Net-SNMP Requires: rrdtool Requires: logrotate @@ -46,6 +55,7 @@ RRDtool. Group: System Environment/Daemons Summary: Network-wide graphing framework (node) BuildArchitectures: noarch +Requires: %{name}-common = %{version} Requires: perl-Net-Server Requires: procps >= 2.0.7 Requires: sysstat, /usr/bin/which, hdparm @@ -76,30 +86,47 @@ SNMP or similar technology. Munin is written in Perl, and relies heavily on Tobi Oetiker's excellent RRDtool. +%package common +Group: System Environment/Daemons +Summary: Network-wide graphing framework (common files) +BuildArchitectures: noarch +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +%description common +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 common files that are used by both the server (munin) +and node (munin-node) packages. + +%package java-plugins +Group: System Environment/Daemons +Summary: java-plugins for munin +Requires: %{name}-node = %{version} +BuildArchitectures: noarch + +%description java-plugins +java-plugins for munin-node. + %prep %setup -q %patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 %build - -# htmldoc and html2text are not available for Red Hat. Quick hack with perl: -# Skip the PDFs. -perl -pi -e 's,htmldoc munin,cat munin, or s,html(2text|doc),# $&,' Makefile -perl -pi -e 's,\$\(INSTALL.+\.(pdf|txt) \$\(DOCDIR,# $&,' Makefile -make CONFIG=dists/redhat/Makefile.config build +export CLASSPATH=plugins/javalib/org/munin/plugin/jmx:$(build-classpath mx4j):$CLASSPATH +make CONFIG=dists/redhat/Makefile.config %install ## Node -make CONFIG=dists/redhat/Makefile.config \ - DOCDIR=%{buildroot}%{_docdir}/%{name}-%{version} \ +make CONFIG=dists/redhat/Makefile.config \ + JAVALIBDIR=%{buildroot}%{_datadir}/java \ + PREFIX=%{buildroot}%{_prefix} \ + DOCDIR=%{buildroot}%{_docdir}/%{name}-%{version} \ MANDIR=%{buildroot}%{_mandir} \ DESTDIR=%{buildroot} \ - install-main install-node install-node-plugins install-doc install-man + install mkdir -p %{buildroot}/etc/rc.d/init.d mkdir -p %{buildroot}/etc/munin/plugins @@ -123,17 +150,16 @@ install -m0644 dists/tarball/plugins.conf %{buildroot}/etc/munin/plugin-conf.d/m rm -f %{buildroot}/usr/share/munin/plugins/sybase_space ## Server -make CONFIG=dists/redhat/Makefile.config \ - DESTDIR=%{buildroot} \ - install-main mkdir -p %{buildroot}/var/www/html/munin mkdir -p %{buildroot}/var/log/munin mkdir -p %{buildroot}/etc/cron.d +mkdir -p %{buildroot}%{_docdir}/%{name}-%{version} install -m 0644 dists/redhat/munin.cron.d %{buildroot}/etc/cron.d/munin -install -m 0644 server/style.css %{buildroot}/var/www/html/munin install -m 0644 ChangeLog %{buildroot}%{_docdir}/%{name}-%{version}/ChangeLog +cp -a master/www/* %{buildroot}/var/www/html/munin/ + # install config for sendmail under fedora install -m 0644 %{SOURCE1} %{buildroot}/etc/munin/plugin-conf.d/sendmail # install config for hddtemp_smartctl @@ -146,15 +172,11 @@ install -m 0644 %{SOURCE5} %{buildroot}/etc/munin/plugin-conf.d/nf_conntrack # install config for postfix under fedora install -m 0644 %{SOURCE6} %{buildroot}/etc/munin/plugin-conf.d/postfix -# fix MUNIN_LIBDIR issue. -sed -i -e 's/\$MUNIN_LIBDIR/\/usr\/share\/munin\//' %{buildroot}%{_datadir}/munin/plugins/ps_ -sed -i -e 's/\$MUNIN_LIBDIR/\/usr\/share\/munin\//' %{buildroot}%{_datadir}/munin/plugins/multips -sed -i -e 's/\$MUNIN_LIBDIR/\/usr\/share\/munin\//' %{buildroot}%{_datadir}/munin/plugins/df_abs - # Use font from bitstream-vera-fonts-sans-mono rm -f $RPM_BUILD_ROOT/%{_datadir}/munin/VeraMono.ttf ln -s /usr/share/fonts/dejavu/DejaVuSansMono.ttf $RPM_BUILD_ROOT/%{_datadir}/munin/VeraMono.ttf + %clean rm -rf $RPM_BUILD_ROOT @@ -191,33 +213,27 @@ exit 0 %doc %{_docdir}/%{name}-%{version}/ %{_bindir}/munin-cron %{_bindir}/munindoc +%{_bindir}/munin-check %dir %{_datadir}/munin %{_datadir}/munin/munin-graph %{_datadir}/munin/munin-html %{_datadir}/munin/munin-limits %{_datadir}/munin/munin-update %{_datadir}/munin/VeraMono.ttf -%{perl_vendorlib}/Munin.pm -%dir %{perl_vendorlib}/Munin -/var/www/html/munin/cgi/munin-cgi-graph +%{perl_vendorlib}/Munin/Master %dir /etc/munin/templates %dir /etc/munin %config(noreplace) /etc/munin/templates/* %config(noreplace) /etc/cron.d/munin %config(noreplace) /etc/munin/munin.conf %config(noreplace) /etc/logrotate.d/munin - %attr(-, munin, munin) %dir /var/lib/munin +%attr(-, nobody, munin) %dir /var/lib/munin/plugin-state %attr(-, munin, munin) %dir /var/run/munin %attr(-, munin, munin) %dir /var/log/munin -%attr(-, munin, munin) %dir /var/www/html/munin +%attr(-, munin, munin) /var/www/html/munin %attr(-, root, root) %dir /var/www/html/munin/cgi -%attr(-, root, root) /var/www/html/munin/style.css -%doc %{_mandir}/man8/munin-graph* -%doc %{_mandir}/man8/munin-update* -%doc %{_mandir}/man8/munin-limits* -%doc %{_mandir}/man8/munin-html* -%doc %{_mandir}/man8/munin-cron* +%doc %{_mandir}/man8/munin* %doc %{_mandir}/man5/munin.conf* %files node @@ -230,12 +246,10 @@ exit 0 %config(noreplace) /etc/munin/plugin-conf.d/nf_conntrack %config(noreplace) /etc/munin/plugin-conf.d/postfix %config(noreplace) /etc/logrotate.d/munin-node -%{perl_vendorlib}/Munin/Plugin.pm /etc/rc.d/init.d/munin-node %{_sbindir}/munin-run %{_sbindir}/munin-node %{_sbindir}/munin-node-configure -%{_sbindir}/munin-node-configure-snmp %attr(-, munin, munin) %dir /var/log/munin %dir %{_datadir}/munin %dir /etc/munin/plugins @@ -244,11 +258,32 @@ exit 0 %dir %attr(-, munin, munin) /var/lib/munin/plugin-state %{_datadir}/munin/plugins/ %doc %{_docdir}/%{name}-%{version}/ -%doc %{_mandir}/man8/munin-run* -%doc %{_mandir}/man8/munin-node* %doc %{_mandir}/man5/munin-node* +%doc %{_mandir}/man3/Munin* +%doc %{_mandir}/man1/munin* +%{perl_vendorlib}/Munin/Node +%{perl_vendorlib}/Munin/Plugin* + +%files common +%defattr(-, root, root) +%dir %{perl_vendorlib}/Munin +%{perl_vendorlib}/Munin/Common + +%files java-plugins +%defattr(-, root, root) +%{_datadir}/java/%{name}-jmx-plugins.jar %changelog +* Sat Nov 28 2009 Kevin Fenzi - 1.4.0-1 +- Update to final 1.4.0 version + +* Sat Nov 21 2009 Kevin Fenzi - 1.4.0-0.1.beta +- Update to beta 1.4.0 version. +- Add common subpackage for common files. + +* Sun Nov 08 2009 Kevin Fenzi - 1.4.0-0.1.alpha +- Initial alpha version of 1.4.0 + * Sat Jul 25 2009 Fedora Release Engineering - 1.2.6-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/sources b/sources index be951c6..eff918c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -45f84d58f80642ce914f147232f0d396 munin_1.2.6.tar.gz +95be0e6eb98c4c7b2a4f2f922b358414 munin_1.4.0.tar.gz