summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2012-04-09 23:15:27 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2012-04-09 23:15:27 +0000
commit9b87b854a6086e1aac2df3c972b601e730550076 (patch)
treeb0eeda16cab395cc07c0d8bc3e40c42b9cb68dcc /net-analyzer
parentCompability patch for libmp4v2 >= r479 wrt #409281 by Tim Harder (diff)
downloadhistorical-9b87b854a6086e1aac2df3c972b601e730550076.tar.gz
historical-9b87b854a6086e1aac2df3c972b601e730550076.tar.bz2
historical-9b87b854a6086e1aac2df3c972b601e730550076.zip
Fix bug #403961, thanks to Tom Hendrikx.
Package-Manager: portage-2.2.0_alpha100/cvs/Linux x86_64
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/munin/ChangeLog8
-rw-r--r--net-analyzer/munin/Manifest12
-rw-r--r--net-analyzer/munin/files/munin-1.4.6-if_-hardened-v2.patch211
-rw-r--r--net-analyzer/munin/munin-1.4.6-r5.ebuild157
4 files changed, 382 insertions, 6 deletions
diff --git a/net-analyzer/munin/ChangeLog b/net-analyzer/munin/ChangeLog
index f410dbc01456..3bac51d869a5 100644
--- a/net-analyzer/munin/ChangeLog
+++ b/net-analyzer/munin/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-analyzer/munin
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/ChangeLog,v 1.67 2012/01/28 01:56:12 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/ChangeLog,v 1.68 2012/04/09 23:15:27 flameeyes Exp $
+
+*munin-1.4.6-r5 (09 Apr 2012)
+
+ 09 Apr 2012; Diego E. Pettenò <flameeyes@gentoo.org>
+ +files/munin-1.4.6-if_-hardened-v2.patch, +munin-1.4.6-r5.ebuild:
+ Fix bug #403961, thanks to Tom Hendrikx.
28 Jan 2012; Diego E. Pettenò <flameeyes@gentoo.org> munin-1.4.6-r4.ebuild:
Some mysql plugins (such as 'mysql_') do use DBD-mysql the same way PostgreSQL
diff --git a/net-analyzer/munin/Manifest b/net-analyzer/munin/Manifest
index 4215ce9c0b32..0d9f5fd0e980 100644
--- a/net-analyzer/munin/Manifest
+++ b/net-analyzer/munin/Manifest
@@ -8,6 +8,7 @@ AUX munin-1.4.4-Makefile.patch 2531 RMD160 f0a492267fd1078139a9f80997173cd1d4823
AUX munin-1.4.6-apc-multi.patch 2329 RMD160 752c3a98ef7b8f11130381e38dbcdd159d9a51dd SHA1 c6e5465103ad0c9a56865bd3f9763b46c5e82a09 SHA256 128884796d3f5972136526254cfeaf76f40360be3be35ce63a76da2f6f2ab28e
AUX munin-1.4.6-apc-temp.patch 1548 RMD160 884a9a0ec0cbc85a3ae7b9082a4c5915f5cac2af SHA1 d90bce289de037502f86ab6841d8a7b23f449140 SHA256 8b51c301cdd90f11e0d3fa5c16ae7bf4717bac2f6321765b6d37ecae4d9d6e27
AUX munin-1.4.6-fix-asterisk-plugins.patch 6639 RMD160 60be6ab42c0983ddc56e3dacbd25210fdc0492e3 SHA1 07d176e8b1ac7658d27982df8586a3e23f3df080 SHA256 29c8c30b69420453676cc173c232dd3ed1a561e6f0a8fd82ed2b750867ae4ee0
+AUX munin-1.4.6-if_-hardened-v2.patch 6406 RMD160 18163a6e3f48aa19157a73789f8e6584679d25d1 SHA1 35268f345e2b74f9481d1364b2d0d53332721d44 SHA256 01155070beda70d78d309d0896d7d5a4425ed09bfbc3051bff3b7b0acc4a567f
AUX munin-1.4.6-if_-hardened.patch 6403 RMD160 2cf5df669e97e936655388745613f3d7c4098b60 SHA1 cb2c25673c1511f678e6f5d59d299badce9c5005 SHA256 5a06d68df8a976869009a63a9f1a5aa1c6dba481cd8595b3d0e33aca507cc10d
AUX munin-1.4.6-munin-version-identifier.patch 10903 RMD160 373e5a9f3c89a0642adc7aa8b6c8a8f7ff6fc585 SHA1 40615deac2ae75b2767e65f8c321c11ba1f97305 SHA256 a403e5f1ade8b8b3c917fd4a1b72eb1857d6d67c6c955c63a72f5876c5eb4dd4
AUX munin-node_conf.d_1.4.5-r3 398 RMD160 d2ec21e963a0cb8618866e282bfb1f3bfaab22a8 SHA1 fb184d277f01256234362268f323bdec64bf395b SHA256 1599bf39d048f8330403d14b43dbc839cb7dfe2e4bc7531f52b4af9d00afd6d0
@@ -16,12 +17,13 @@ AUX munin-node_init.d_1.4.5-r3 773 RMD160 464252b8483cc897f2d5151214c2b77a7b5408
AUX munin-node_init.d_1.4.6-r2 957 RMD160 23d402f155241b37509f3080d7e36bf18c20293d SHA1 37ee7b8268fe834247cee8cdd3312a378c0b3904 SHA256 78cbeff21fc98767775f7ff2c75b4b7096d878aaff26d215789ae5b9fa01e818
DIST munin-1.4.6.tar.gz 1238782 RMD160 c4e5129641fa279f8b2668c7cafbb9d2656fd895 SHA1 055bf7da181941ce965e57cab7fe9a71fe57779f SHA256 1795812d9ad60e60f81c7f08c8be455ce44e1d4f966f7dd6be620e4c356de9c6
EBUILD munin-1.4.6-r4.ebuild 5030 RMD160 9430307795a03f81f07838634860f1929a81a9c4 SHA1 5dfc70450ff9d25f7de0e87387f189c80352d16a SHA256 9f8a9300c3e765feab5aa7d20f4460be10ea698cef7e22f95fb183684e45accf
-MISC ChangeLog 13299 RMD160 406e226dea4fdfbd9a58338ea5104089781fa55b SHA1 91e43d7140c4754932164db27763cd17f4a90d11 SHA256 bca64a7f153db0bc60423decb344a2841ee2cd99dc846772ce337e23f2663b04
+EBUILD munin-1.4.6-r5.ebuild 5036 RMD160 24a4367442e929f4af7bddb6ad0b074e91705b8c SHA1 f547ac26e80df7c1d948324634471067a9411a68 SHA256 4e0e22287d668b45d061c1bc237c2cd8cfd3f5a8295996f53adaff60cb84d3a4
+MISC ChangeLog 13498 RMD160 b4c5625f775c528c70c654846d7f2c4ddd363f3f SHA1 27e1f84474d346d9ff09ace0d5e441a562773a8a SHA256 05291e6b4cfec8638532aae1c8bffea66cd67a5726c298dec65c1ff5808d1b9a
MISC metadata.xml 1249 RMD160 cd80a2d4d99585103b30a431c66bf8af5b2f8e96 SHA1 634e2949f42ab86ff056ac28891830ccf3d1a749 SHA256 1a37b6137d5f3e8c9cac67754bf18a2a83ff31e553fd5123aa9abe79a4ce4883
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.18 (GNU/Linux)
+Version: GnuPG v2.0.19 (GNU/Linux)
-iEYEARECAAYFAk8jVc0ACgkQAiZjviIA2XgH+wCfTfz6jddeAZkKKl11G9bW0S0v
-gFEAoPRFtjeUm/xm+5x8vpX9d7/BHBKW
-=Q6Zk
+iEYEARECAAYFAk+DbY8ACgkQAiZjviIA2Xh61ACg06WDLPDu8fDekWzKxOzCmKIk
+PeIAoMCJK6qyQf41TeYWq3p/XU2b7V2R
+=QIX1
-----END PGP SIGNATURE-----
diff --git a/net-analyzer/munin/files/munin-1.4.6-if_-hardened-v2.patch b/net-analyzer/munin/files/munin-1.4.6-if_-hardened-v2.patch
new file mode 100644
index 000000000000..bb72afb8bd84
--- /dev/null
+++ b/net-analyzer/munin/files/munin-1.4.6-if_-hardened-v2.patch
@@ -0,0 +1,211 @@
+diff --git a/plugins/node.d.linux/if_.in b/plugins/node.d.linux/if_.in
+index da0fc31..63a5dfd 100755
+--- a/plugins/node.d.linux/if_.in
++++ b/plugins/node.d.linux/if_.in
+@@ -43,7 +43,9 @@ monitored with this plugin.
+
+ =head1 AUTHOR
+
+-Unknown author
++Original author unknown
++
++Copyright (C) 2011 Diego Elio Petteno' <flameeyes@flameeyes.eu>
+
+ =head1 LICENSE
+
+@@ -64,86 +66,71 @@ Unknown license
+
+ INTERFACE=${0##*if_}
+
+-findspeed () {
+-
+- # Who whould have thought it's so much work to determine the
+- # maximum speed of a network interface. Buckle up!
+-
+- IWLIST="$(type -p iwlist)"
+-
+- WIRELESS=0
++# Who whould have thought it's so much work to determine the
++# maximum speed of a network interface. Buckle up!
++findspeed_mbps() {
+ # Do not use interface name to guess technology. Many many
+ # wifi drivers use "eth*" names.
+- case $IWLIST in
+-
+- '')
+- # Used to use iwconfig to look for "no wireless
+- # extentions" message - but this seemed un-needed. If we
+- # don't have iwlist we can't find out if # the interface
+- # is wireless
+- :;;
+- *) IWO="$($IWLIST $INTERFACE rate 2>&1)"
+- case $IWO in
+- *no*) :;;
+- *) WIRELESS=1;;
+- esac
+- ;;
+- esac
+-
+- SPEED=U
+- # Find speed in Mbps. - or not
+- case $WIRELESS:$IWLIST in
+- 0:*)
+- ETHTOOL="$(type -p ethtool)"
+- if [ -x "$ETHTOOL" ]; then
+- SPEED="$($ETHTOOL $INTERFACE 2>&1 |
+- awk '/Speed:/ { gsub(/[^0-9]*/,"",$2); print $2; }')"
+- case $SPEED in
+- [0-9]*) :;; # OK
+- *) SPEED=U;; # Could be "unknown"
+- esac
+- else
+- INSTALL="ethtool"
++ IWLIST="$(type -p iwlist)"
++ if [ -x "$IWLIST" ]; then
++ SPEED=$($IWLIST $INTERFACE rate 2>&1 |
++ awk 'BEGIN { RATE=U }
++ { if ($2 == "Mb/s") RATE=$1; }
++ END { print RATE; }')
++
++ if [ "$SPEED" != "U" ]; then
++ echo $SPEED
++ return
++ fi
++ fi
++
++ # sysfs can report the speed if the driver supports it (but it
++ # doesn't work as well for wireless cards, thus why we check for
++ # iwlist first)
++ if [ -r /sys/class/net/$INTERFACE/speed ]; then
++ SPEED="$(cat /sys/class/net/$INTERFACE/speed 2>/dev/null)"
++ if [ -n "$SPEED" ]; then
++ echo $SPEED
++ return
+ fi
+- ;;
+- 1:/*)
+- # Current bit rate is not very interesting, it varies too often
+- SPEED=$(echo "$IWO" |
+- awk 'BEGIN { RATE=U }
+- { if ($2 == "Mb/s") RATE=$1; }
+- END { print RATE; }')
+-
+- ;;
+- *)
+- # Wireless interface, cannot find iwlist
+- INSTALL="wireless-tools"
+- ;;
+- esac
++ fi
++
++ ETHTOOL="$(type -p ethtool)"
++ if [ -x "$ETHTOOL" ]; then
++ SPEED="$($ETHTOOL $INTERFACE 2>&1 |
++ awk '/Speed:/ { gsub(/[^0-9]*/,"",$2); print $2; }')"
++
++ if [ $SPEED = [0-9]* ]; then
++ echo $SPEED
++ return
++ fi
++ fi
+
+ MIITOOL="$(type -p mii-tool)"
+- case $SPEED:$MIITOOL in
+- U:/*)
+- SPEED="$($MIITOOL $INTERFACE 2>&1)"
+- case $SPEED in
+- *1000base*) SPEED=1000;; # as if...
+- *100base*) SPEED=100;;
+- *10base*) SPEED=10;;
+- *) SPEED=U;;
+- esac
+- ;;
+- esac
+-
+- # sysfs can report the speed if the driver supports it
+- SYSFS="$(cat /sys/class/net/$INTERFACE/speed 2>/dev/null)"
+- # If it can't, it fails on I/O, so we check cat's return value
+- if [ $? -eq 0 -a "$SPEED" = "U" -a -n "$SYSFS" ]; then
+- SPEED="$SYSFS"
++ if [ -x $MIITOOL ]; then
++ case $($MIITOOL $INTERFACE 2>&1) in
++ *1000base*) echo 1000; return ;;
++ *100base*) echo 100; return ;;
++ *10base*) echo 10; return ;;
++ esac
+ fi
+
+- case $SPEED in
+- U) echo "up.info Traffic of the $INTERFACE interface. Unable to determine interface speed. Please install ethtool, wireless-tools (or mii-tool), whatever is appropriate for the interface."
+- return;;
+- esac
++ echo U
++}
++
++findspeed() {
++ SPEED=$(findspeed_mbps)
++
++ if [ -z $SPEED -o $SPEED = "U" ]; then
++ printf "up.info Traffic of the %s interface. Unable to determine interface speed." $INTERFACE
++ if [ $EUID -ne 0 ]; then
++ echo " Please run the plugin as root."
++ else
++ echo " Please install ethtool, wireless-tools, mii-tool or whatever is appropriate for the interface."
++ fi
++
++ return
++ fi
+
+ BPS=$(( $SPEED * 1000 * 1000 ))
+
+@@ -207,11 +194,15 @@ case $1 in
+ esac
+
+ # Escape dots in the interface name (eg. vlans) before using it as a regex
+-awk -v interface="$INTERFACE" \
+- 'BEGIN { gsub(/\./, "\\.", interface) } \
+- $1 ~ "^" interface ":" {
+- split($0, a, /: */); $0 = a[2]; \
+- print "down.value " $1 "\nup.value " $9 \
+- }' \
+- /proc/net/dev
+-
++if [ -r /sys/class/net/$INTERFACE/statistics/rx_bytes ]; then
++ echo "down.value $(cat /sys/class/net/$INTERFACE/statistics/rx_bytes)"
++ echo "up.value $(cat /sys/class/net/$INTERFACE/statistics/tx_bytes)"
++else
++ awk -v interface="$INTERFACE" \
++ 'BEGIN { gsub(/\./, "\\.", interface) } \
++ $1 ~ "^" interface ":" {
++ split($0, a, /: */); $0 = a[2]; \
++ print "down.value " $1 "\nup.value " $9 \
++ }' \
++ /proc/net/dev
++fi
+diff --git a/plugins/node.d.linux/if_err_.in b/plugins/node.d.linux/if_err_.in
+index 331866d..2e35909 100755
+--- a/plugins/node.d.linux/if_err_.in
++++ b/plugins/node.d.linux/if_err_.in
+@@ -93,10 +93,15 @@ if [ "$1" = "config" ]; then
+ fi;
+
+ # Escape dots in the interface name (eg. vlans) before using it as a regex
+-awk -v interface="$INTERFACE" \
+- 'BEGIN { gsub(/\./, "\\.", interface) } \
+- $1 ~ "^" interface ":" {
+- split($0, a, /: */); $0 = a[2]; \
+- print "rcvd.value " $3 "\ntrans.value " $11 \
+- }' \
+- /proc/net/dev
++if [ -r /sys/class/net/$INTERFACE/statistics/rx_bytes ]; then
++ echo "rcvd.value $(cat /sys/class/net/$INTERFACE/statistics/rx_errors)"
++ echo "trans.value $(cat /sys/class/net/$INTERFACE/statistics/tx_errors)"
++else
++ awk -v interface="$INTERFACE" \
++ 'BEGIN { gsub(/\./, "\\.", interface) } \
++ $1 ~ "^" interface ":" {
++ split($0, a, /: */); $0 = a[2]; \
++ print "rcvd.value " $3 "\ntrans.value " $11 \
++ }' \
++ /proc/net/dev
++fi
diff --git a/net-analyzer/munin/munin-1.4.6-r5.ebuild b/net-analyzer/munin/munin-1.4.6-r5.ebuild
new file mode 100644
index 000000000000..f884e73af183
--- /dev/null
+++ b/net-analyzer/munin/munin-1.4.6-r5.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/munin/munin-1.4.6-r5.ebuild,v 1.1 2012/04/09 23:15:27 flameeyes Exp $
+
+EAPI=2
+
+inherit eutils
+
+DESCRIPTION="Munin Server Monitoring Tool"
+HOMEPAGE="http://munin.projects.linpro.no/"
+SRC_URI="mirror://sourceforge/munin/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~ppc ~x86"
+IUSE="asterisk doc irc java memcached minimal mysql postgres ssl"
+
+# Upstream's listing of required modules is NOT correct!
+# Some of the postgres plugins use DBD::Pg, while others call psql directly.
+# Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly.
+DEPEND_COM="dev-lang/perl
+ sys-process/procps
+ asterisk? ( dev-perl/Net-Telnet )
+ irc? ( dev-perl/Net-IRC )
+ java? ( >=virtual/jdk-1.5 )
+ mysql? ( virtual/mysql
+ dev-perl/Cache-Cache
+ dev-perl/DBD-mysql )
+ ssl? ( dev-perl/Net-SSLeay )
+ postgres? ( dev-perl/DBD-Pg dev-db/postgresql-base )
+ memcached? ( dev-perl/Cache-Memcached )
+ dev-perl/DateManip
+ dev-perl/Net-CIDR
+ dev-perl/Net-Netmask
+ dev-perl/Net-SNMP
+ dev-perl/libwww-perl
+ dev-perl/net-server
+ dev-perl/DBI
+ virtual/perl-Digest-MD5
+ virtual/perl-Getopt-Long
+ virtual/perl-MIME-Base64
+ virtual/perl-Storable
+ virtual/perl-Text-Balanced
+ virtual/perl-Time-HiRes
+ !minimal? ( dev-perl/HTML-Template
+ net-analyzer/rrdtool[perl]
+ dev-perl/Log-Log4perl )"
+ # Sybase isn't supported in Gentoo
+ #munin-sybase? ( dev-perl/DBD-Sybase )
+
+# Keep this seperate, as previous versions have had other deps here
+DEPEND="${DEPEND_COM}
+ virtual/perl-Module-Build"
+RDEPEND="${DEPEND_COM}
+ !minimal? ( virtual/cron )"
+
+pkg_setup() {
+ enewgroup munin
+ enewuser munin 177 -1 /var/lib/munin munin
+}
+
+src_prepare() {
+ # upstream needs a lot of DESTDIR loving
+ # and Gentoo location support
+ epatch "${FILESDIR}"/${PN}-1.4.4-Makefile.patch
+
+ epatch "${FILESDIR}"/${PN}-1.4.6-apc-temp.patch
+ epatch "${FILESDIR}"/${PN}-1.4.6-munin-version-identifier.patch
+ epatch "${FILESDIR}"/${PN}-1.4.6-fix-asterisk-plugins.patch
+ epatch "${FILESDIR}"/${PN}-1.4.6-if_-hardened-v2.patch
+ epatch "${FILESDIR}"/${PN}-1.4.6-apc-multi.patch
+
+ # Don't build java plugins if not requested via USE.
+ if ! use java; then
+ # sed is needed so the java plugins aren't automagically built.
+ sed -i -e 's: build-plugins-java : :' \
+ -e 's: install-plugins-java : :' Makefile || die
+ fi
+
+ # Bug 304447, fix for gentoo PS location
+ sed -i -e 's,/usr/bin/ps,/bin/ps,g' \
+ "${S}"/plugins/node.d/ifx_concurrent_sessions_.in || die
+
+ # bug 367785, cleanup make output by disabling HP-UX cruft
+ sed -i -e "/plugins\/\*\.adv/d" Makefile || die
+}
+
+src_compile() {
+ emake -j 1 build build-man || die "build/build-man failed"
+ if use doc; then
+ emake -j 1 build-doc || die "build-doc failed"
+ fi
+
+ #Ensure TLS is disabled if built without SSL
+ if ! use ssl; then
+ echo "tls disabled" >> ${S}/build/node/munin-node.conf \
+ || die "Fixing munin-node.conf Failed!"
+ echo "tls disabled" >> ${S}/build/master/munin.conf \
+ || die "Fixing munin.conf Failed!"
+ fi
+
+}
+
+src_install() {
+ local dirs
+ dirs="/var/log/munin/ /var/lib/munin/"
+ dirs="${dirs} /var/lib/munin/plugin-state/"
+ dirs="${dirs} /var/run/munin/plugin-state/"
+ dirs="${dirs} /var/run/munin/spool/"
+ dirs="${dirs} /etc/munin/plugin-conf.d/"
+ dirs="${dirs} /etc/munin/munin-conf.d/"
+ dirs="${dirs} /etc/munin/plugins/"
+ keepdir ${dirs}
+
+ if use minimal; then
+ emake -j 1 DESTDIR="${D}" install-common-prime install-node-prime \
+ install-plugins-prime || die "install failed"
+ else
+ emake -j 1 DESTDIR="${D}" install || die "install failed"
+ fi
+ fowners munin:munin ${dirs} || die
+
+ insinto /etc/munin/plugin-conf.d/
+ newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node || die
+
+ # make sure we've got everything in the correct directory
+ insinto /var/lib/munin
+ newins "${FILESDIR}"/${PN}-1.3.3-crontab crontab || die
+ newinitd "${FILESDIR}"/munin-node_init.d_1.4.6-r2 munin-node || die
+ newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node || die
+ dodoc README ChangeLog INSTALL logo.eps logo.svg build/resources/apache* \
+ || die
+
+ # bug 254968
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}"/logrotate.d-munin munin || die
+}
+
+pkg_config() {
+ einfo "Press enter to install the default crontab for the munin master"
+ einfo "installation from /var/lib/munin/crontab"
+ einfo "If you have a large site, you may wish to customize it."
+ read
+ # dcron is very fussy about syntax
+ # the following is the only form that works in BOTH dcron and vixie-cron
+ crontab - -u munin </var/lib/munin/crontab
+}
+
+pkg_postinst() {
+ elog "Please follow the munin documentation to set up the plugins you"
+ elog "need, afterwards start munin-node via /etc/init.d/munin-node."
+ if ! use minimal; then
+ elog "To have munin's cronjob automatically configured for you if this is"
+ elog "your munin master installation, please:"
+ elog "emerge --config net-analyzer/munin"
+ fi
+}