diff options
author | Peter Volkov <pva@gentoo.org> | 2008-08-19 06:59:51 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2008-08-19 06:59:51 +0000 |
commit | b9a34164eef0854a423a49c76e3fb403f6235736 (patch) | |
tree | 99dbbfb7f33a4a9942ff7e38ab331b13c5c64214 /net-analyzer | |
parent | Make the SYMLINK_LIB code in pkg_preinst merge files from lib directories (diff) | |
download | gentoo-2-b9a34164eef0854a423a49c76e3fb403f6235736.tar.gz gentoo-2-b9a34164eef0854a423a49c76e3fb403f6235736.tar.bz2 gentoo-2-b9a34164eef0854a423a49c76e3fb403f6235736.zip |
Initial import from sunrise, bug #176635. Syweb splited into separate package. Thank Tiago Cunha for all the work.
(Portage version: 2.2_rc8/cvs/Linux 2.6.22-ovz005 i686)
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/symon/ChangeLog | 176 | ||||
-rw-r--r-- | net-analyzer/symon/Manifest | 8 | ||||
-rw-r--r-- | net-analyzer/symon/files/symon-init.d | 20 | ||||
-rw-r--r-- | net-analyzer/symon/files/symon-symon.conf.patch | 29 | ||||
-rw-r--r-- | net-analyzer/symon/files/symon-symux.conf.patch | 62 | ||||
-rw-r--r-- | net-analyzer/symon/files/symux-init.d | 20 | ||||
-rw-r--r-- | net-analyzer/symon/metadata.xml | 14 | ||||
-rw-r--r-- | net-analyzer/symon/symon-2.79-r2.ebuild | 104 |
8 files changed, 433 insertions, 0 deletions
diff --git a/net-analyzer/symon/ChangeLog b/net-analyzer/symon/ChangeLog new file mode 100644 index 000000000000..0bca8469c919 --- /dev/null +++ b/net-analyzer/symon/ChangeLog @@ -0,0 +1,176 @@ +# ChangeLog for net-analyzer/symon +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/symon/ChangeLog,v 1.1 2008/08/19 06:59:50 pva Exp $ + +*symon-2.79-r2 (19 Aug 2008) + + 19 Aug 2008; Peter Volkov <pva@gentoo.org> +files/symon-init.d, + +files/symon-symon.conf.patch, +files/symon-symux.conf.patch, + +files/symux-init.d, +metadata.xml, +symon-2.79-r2.ebuild: + Initial import from sunrise, bug #176635. Syweb splited into separate + package. Thank Tiago Cunha for all the work. + + 11 Aug 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> metadata.xml: + Add USE flag description to metadata wrt GLEP 56 + + 06 Aug 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> + symon-2.79-r1.ebuild: + Improve syweb elog messages by saying how to customize it, and mention that + there's a no user interaction php script + + 06 Aug 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> -symon-2.79.ebuild, + +symon-2.79-r1.ebuild: + Install syweb documentation, remove old + + 31 Jul 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild: + symon doesn't use GNU make, hence ignore MAKEOPTS since some options aren't + available in pmake (e.g. --load-average) + + 31 Jul 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild: + Tell the user how to test the configuration files, and how the RRDs + directory structure for syweb should be organized + + 31 Jul 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild: + Make doins, dodoc, doman, dosbin, and dobin die on failure + + 31 Jul 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild: + Shorten DESCRIPTION + + 21 Jul 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild: + Improve elog messages + + 16 Jul 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild: + Rename 'client' USE flag to 'perl' + + 11 Jun 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild: + Simplify die messages, while there avoid using identical die messages in the + same function to ease error identification + + 03 Jun 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild: + Simplify sed calls + + 31 May 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild: + Respect AR and RANLIB, while there beautify the ebuild + + 08 Apr 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.79.ebuild: + Prettify src_compile, virtual/httpd-cgi removed from RDEPEND since it isn't + needed + + 08 Apr 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> + -symon-2.78-r2.ebuild, +symon-2.79.ebuild: + Version bump (syweb bumped too), remove old + + 21 Mar 2008; Jakub Moc <jakub@gentoo.org> symon-2.78-r2.ebuild: + Improve webapp eclass handling and fix dependencies + + 18 Mar 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> + files/symon-symon.conf.patch, files/symon-symux.conf.patch: + Prettify the configuration files, add resources for MP machines, while there + insert missing comments to document the patch purpose + + 18 Mar 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> + files/symon-syweb-class_lexer.inc.patch, + files/symon-syweb-setup.inc.patch, + files/symon-syweb-total_firewall.layout.patch: + Improve patch comment about renaming the directories, while there prettify them + + 18 Mar 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> + symon-2.78-r2.ebuild: + Tell the user to test the configuration files only after creating the RRDs, + since symux reads the configuration file with file access checks (prevents + symux -t from giving warnings) + + 18 Mar 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> files/symon-init.d, + files/symux-init.d: + Beautify the code by converting spaces to tabs + + 23 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> + symon-2.78-r2.ebuild: + Remove slash from docinto, simplify elog messages + + 19 Feb 2008; Jakub Moc <jakub@gentoo.org> symon-2.78-r2.ebuild: + Fix php check in pkg_setup, add missing pkg_prerm for webapp.eclass + + 18 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> + symon-2.78-r2.ebuild: + Introduce a new variable (CDEPEND) that will hold common dependencies for + (R)DEPEND + + 18 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> + -symon-2.78-r1.ebuild, +symon-2.78-r2.ebuild: + New USE flag 'client' added, remove old + + 17 Feb 2008; (Tommy[D]) tommy100@gmx.de symon-2.78-r1.ebuild: + Shorten description + + 03 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> files/symon-init.d, + files/symux-init.d: + net is really necessary for the correct functioning of the service + + 03 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> + symon-2.78-r1.ebuild: + Simplify elog messages + + 02 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> + symon-2.78-r1.ebuild: + Die if sed failed + + 02 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> + symon-2.78-r1.ebuild: + Append Gentoo CFLAGS in src_compile by using the CFLAGS variable from the + portage environment instead of doing it with sed in src_unpack + + 02 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> + symon-2.78-r1.ebuild: + Put sed calls after epatch ones to prevent breaking patches, and use "${S}" + instead of hardcoding the directories + + 02 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> + symon-2.78-r1.ebuild: + Do a safer pattern in sed when the user requested not to build the symux target + + 02 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> + symon-2.78-r1.ebuild: + Instead of using sed and avoiding pre-stripping in src_unpack, make the + package use the STRIP variable from the portage environment in src_compile + + 02 Feb 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> + symon-2.78-r1.ebuild: + Instead of using sed and tc-getCC to call the correct gcc in src_unpack, + make the package use the proper CC from the portage environment in + src_compile + + 10 Jan 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> + symon-2.78-r1.ebuild: + Avoid pre-stripping + + 10 Jan 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> + symon-2.78-r1.ebuild: + Honour Gentoo CFLAGS + + 10 Jan 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> + symon-2.78-r1.ebuild: + Fix hardcoded CC + + 09 Jan 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> files/symon-init.d, + +files/symux-init.d, -symon-2.78.ebuild, +symon-2.78-r1.ebuild: + New USE flag 'symux' added, remove old + + 08 Jan 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.78.ebuild: + Added ~amd64 keyword + + 07 Jan 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> symon-2.78.ebuild: + Bump syweb, too + + 07 Jan 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> -symon-2.77.ebuild, + +symon-2.78.ebuild: + Version bump, remove old + + 06 Jan 2008; Tiago Cunha (tcunha) <me@tiagocunha.org> +files/symon-init.d, + +files/symon-symon.conf.patch, +files/symon-symux.conf.patch, + +files/symon-syweb-class_lexer.inc.patch, + +files/symon-syweb-setup.inc.patch, + +files/symon-syweb-total_firewall.layout.patch, +metadata.xml, + +symon-2.77.ebuild: + New Ebuild for bug 176635 + diff --git a/net-analyzer/symon/Manifest b/net-analyzer/symon/Manifest new file mode 100644 index 000000000000..a2e906b22f65 --- /dev/null +++ b/net-analyzer/symon/Manifest @@ -0,0 +1,8 @@ +AUX symon-init.d 384 RMD160 779f0410c9ef4ec7ff83a8c4bd80949edd9ee5df SHA1 a60201406a2072a24458fc4ab6ef7af1a35e1c86 SHA256 13b9d627df34708ae4f436a8d10729c809f71d05ecd9f593a47cd6bf161eff28 +AUX symon-symon.conf.patch 669 RMD160 b0f53dfbf6eaba2c292e6e9f9f91625f26498683 SHA1 5523fbc4db46114197c3e020c74c72822b93e545 SHA256 603b471778ec84f2ebbb57b5718a8624fb748ca5c6dde36f4943156acf9a2b10 +AUX symon-symux.conf.patch 1858 RMD160 8882ef430e763791a47be90a1460f85550cc3e8b SHA1 0734a88eb4e4da0e91909c2120ebd7cf349e025c SHA256 d8e12296c32a302d0dda1c2d9f20782a6bdb1b87a65795e90775418bbc3a5f54 +AUX symux-init.d 378 RMD160 438f3ee87579117db71fa346cd333cc4740b8a35 SHA1 bc5edf413f24aed698147767447f0266c4374415 SHA256 f887ab858987fc6f0984cba93dddbb1c82fb1ed515340002e373c0aa4541e584 +DIST symon-2.79.tar.gz 102400 RMD160 693b798cd6c564f4e8b79c62c1776f5b036aaf1a SHA1 a21566f3291baaa39806bec32550d5a28a163213 SHA256 7157b087b99a59f3aba9a02c375fb1b411dc4329463f748d2323c3cdf3d0cd83 +EBUILD symon-2.79-r2.ebuild 2929 RMD160 078f4edea06049f09e2ea202687d15557f5937c0 SHA1 5ee0c4473914a28056564175c6a48b73a882fb6a SHA256 f95aaa7f5154704e431079f043836ec3d3ea363ca4567fa48f4814e85946a13f +MISC ChangeLog 6824 RMD160 22f8df9daf167a0b8ef8d07a791bcb76f9ad95ea SHA1 9631497335c7e521b3a5fc400b3ef5fcf68e2c34 SHA256 691219b8b6d21e7b8f2c16351b3abb8b684ea446e9112b89a3ba026424b7b8e3 +MISC metadata.xml 454 RMD160 20d5590da9a48eb2fbc78b207e6f1636152007e9 SHA1 46b74a457cb0d9073095e5a28569619d6e2c16d0 SHA256 d2b43ad2ea7e765539e213db74dad9ed3a11bbadb73b52c1e2c9773ec012e22d diff --git a/net-analyzer/symon/files/symon-init.d b/net-analyzer/symon/files/symon-init.d new file mode 100644 index 000000000000..7e9a31a689a0 --- /dev/null +++ b/net-analyzer/symon/files/symon-init.d @@ -0,0 +1,20 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: + +depend() { + need net +} + +start() { + ebegin "Starting symon" + start-stop-daemon --start --quiet --exec /usr/sbin/symon -- -u + eend ${?} +} + +stop() { + ebegin "Stopping symon" + start-stop-daemon --stop --quiet --pidfile /var/run/symon.pid + eend ${?} +} diff --git a/net-analyzer/symon/files/symon-symon.conf.patch b/net-analyzer/symon/files/symon-symon.conf.patch new file mode 100644 index 000000000000..12a006835fb8 --- /dev/null +++ b/net-analyzer/symon/files/symon-symon.conf.patch @@ -0,0 +1,29 @@ +# Convert BSD devices to Linux. +# mbuf, pf, proc, and sensor are not available in Linux. + +--- symon/symon/symon.conf.orig 2008-03-18 03:46:17.173140738 +0000 ++++ symon/symon/symon.conf 2008-03-18 04:49:07.463331989 +0000 +@@ -3,13 +3,14 @@ + # + # Demo configuration for symon. See symon(8) for BNF. + +-monitor { cpu(0), mem, +- if(lo0), +-# pf, +-# mbuf, +-# sensor(0), +-# proc(httpd), +-# if(xl0), if(de0), if(wi0), +-# io(wd1), io(wd2), io(wd3), io(cd0) +- io(wd0) ++monitor { ++ cpu(0), ++ cpu(1), ++# cpu(2), ++ mem, ++ if(lo), ++ if(eth0), ++# if(eth1), ++# io(hda), io(hdb), io(hdc), io(hdd), ++ io(sda), io(sdb) + } stream to 127.0.0.1 2100 diff --git a/net-analyzer/symon/files/symon-symux.conf.patch b/net-analyzer/symon/files/symon-symux.conf.patch new file mode 100644 index 000000000000..c6a020855051 --- /dev/null +++ b/net-analyzer/symon/files/symon-symux.conf.patch @@ -0,0 +1,62 @@ +# Convert BSD devices to Linux. +# mbuf, pf, proc, and sensor are not available in Linux. +# Rename RRDs directories since it makes more sense in a non-syweb environment. + +--- symon/symux/symux.conf.orig 2008-03-18 03:51:21.083141917 +0000 ++++ symon/symux/symux.conf 2008-03-18 04:49:17.643141246 +0000 +@@ -6,31 +6,36 @@ + mux 127.0.0.1 2100 + + source 127.0.0.1 { +- accept { cpu(0), mem, +- if(lo0), +-# pf, +-# mbuf, +-# sensor(0), +-# proc(httpd), +-# if(xl0), if(de0), if(wi0), +-# io(wd1), io(wd2), io(wd3), io(cd0) +- io(wd0) ++ accept { ++ cpu(0), ++ cpu(1), ++# cpu(2), ++ mem, ++ if(lo), ++ if(eth0), ++# if(eth1), ++# io(hda), io(hdb), io(hdc), io(hdd), ++ io(sda), io(sdb) + } +- ++ datadir "/var/lib/symon/rrds/localhost" + } + + # an example showing the write directive + # + # source 10.0.0.2 { +-# accept { cpu(0), mem, if(sis0), if(sis1), +-# if(lo0), if(wi0), io(wd0) ++# accept { ++# cpu(0), ++# mem, ++# if(eth0), if(eth1), ++# if(lo), ++# if(hda), io(sda) + # } + # +-# write cpu(0) in "/var/www/symon/rrds/4512/cpu0.rrd" +-# write mem in "/var/www/symon/rrds/4512/mem.rrd" +-# write if(sis0) in "/var/www/symon/rrds/4512/if_sis0.rrd" +-# write if(sis1) in "/var/www/symon/rrds/4512/if_sis1.rrd" +-# write if(lo0) in "/var/www/symon/rrds/if_lo0.rrd" +-# write if(wi0) in "/var/www/symon/rrds/4512/if_wi0.rrd" +-# write io(wd0) in "/var/www/symon/rrds/4512/io_wd0.rrd" ++# write cpu(0) in "/var/lib/symon/rrds/hostname/cpu0.rrd" ++# write mem in "/var/lib/symon/rrds/hostname/mem.rrd" ++# write if(eth0) in "/var/lib/symon/rrds/hostname/if_eth0.rrd" ++# write if(eth1) in "/var/lib/symon/rrds/hostname/if_eth1.rrd" ++# write if(lo) in "/var/lib/symon/rrds/hostname/if_lo.rrd" ++# write io(hda) in "/var/lib/symon/rrds/hostname/io_hda.rrd" ++# write io(sda) in "/var/lib/symon/rrds/hostname/io_sda.rrd" + # } diff --git a/net-analyzer/symon/files/symux-init.d b/net-analyzer/symon/files/symux-init.d new file mode 100644 index 000000000000..58df4c51b360 --- /dev/null +++ b/net-analyzer/symon/files/symux-init.d @@ -0,0 +1,20 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: + +depend() { + need net +} + +start() { + ebegin "Starting symux" + start-stop-daemon --start --quiet --exec /usr/sbin/symux + eend ${?} +} + +stop() { + ebegin "Stopping symux" + start-stop-daemon --stop --quiet --pidfile /var/run/symux.pid + eend ${?} +} diff --git a/net-analyzer/symon/metadata.xml b/net-analyzer/symon/metadata.xml new file mode 100644 index 000000000000..2b594d5220dd --- /dev/null +++ b/net-analyzer/symon/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>netmon</herd> + <maintainer> + <email>me@tiagocunha.org</email> + <description>Tiago Cunha</description> + </maintainer> + <use> + <flag name='perl'>Enables a generic perl symux client</flag> + <flag name='symux'>Enables the multiplexer which stores incoming symon + streams on disk in RRD files</flag> + </use> +</pkgmetadata> diff --git a/net-analyzer/symon/symon-2.79-r2.ebuild b/net-analyzer/symon/symon-2.79-r2.ebuild new file mode 100644 index 000000000000..2d62ca912572 --- /dev/null +++ b/net-analyzer/symon/symon-2.79-r2.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/symon/symon-2.79-r2.ebuild,v 1.1 2008/08/19 06:59:50 pva Exp $ + +inherit eutils perl-module toolchain-funcs + +DESCRIPTION="Performance and information monitoring tool" +HOMEPAGE="http://www.xs4all.nl/~wpd/symon/" +SRC_URI="http://www.xs4all.nl/~wpd/symon/philes/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86" +IUSE="perl symux" + +RDEPEND="perl? ( dev-lang/perl ) + symux? ( net-analyzer/rrdtool )" +DEPEND="${RDEPEND} + virtual/pmake" + +S=${WORKDIR}/${PN} + +src_unpack() { + unpack ${A} + + epatch "${FILESDIR}"/${PN}-symon.conf.patch + use symux && epatch "${FILESDIR}"/${PN}-symux.conf.patch + sed -i -e 's:/${CC}.*${LIBS}/s/${CC}/& ${LDFLAGS}/' \ + "${S}"/sy{mon,mux}/Makefile || die "seding for LDFLAGS failed" + + if ! use perl ; then + sed -i "/SUBDIR/s/client//" "${S}"/Makefile || die "sed client failed" + fi + if ! use symux ; then + sed -i "/SUBDIR/s/symux//" "${S}"/Makefile || die "sed symux failed" + fi +} + +src_compile() { + MAKE=pmake MAKEOPTS= emake \ + AR="$(tc-getAR)" \ + CC="$(tc-getCC)" \ + CFLAGS+="${CFLAGS}" \ + RANLIB="$(tc-getRANLIB)" \ + STRIP=true || die "emake failed" +} + +src_install() { + insinto /etc + doins symon/symon.conf || die "doins symon.conf failed" + + newinitd "${FILESDIR}"/${PN}-init.d ${PN} || die "newinitd symon failed" + + dodoc CHANGELOG HACKERS TODO || die "dodoc failed" + + doman symon/symon.8 || die "doman symon failed" + dosbin symon/symon || die "dosbin symon failed" + + dodir /usr/share/symon + insinto /usr/share/symon + doins symon/c_config.sh || die "doins c_config.sh failed" + fperms a+x,u-w /usr/share/symon/c_config.sh + + if use perl ; then + dobin client/getsymonitem.pl || die "dobin getsymonitem.pl failed" + + perlinfo + insinto ${SITE_LIB} + doins client/SymuxClient.pm || die "doins SymuxClient.pm failed" + fi + + if use symux ; then + insinto /etc + doins symux/symux.conf || die "doins symux.conf failed" + + newinitd "${FILESDIR}"/symux-init.d symux || die "newinitd symux failed" + + doman symux/symux.8 || die "doman symux failed" + dosbin symux/symux || die "dosbin symux failed" + + insinto /usr/share/symon + doins symux/c_smrrds.sh || die "doins c_smrrds.sh failed" + fperms u-w,u+x /usr/share/symon/c_smrrds.sh + + dodir /var/lib/symon/rrds/localhost + fi +} + +pkg_postinst() { + elog "Before running the monitor, edit /etc/symon.conf. To test your" + elog "configuration file, run symon -t." + elog "NOTE that symon won't chroot by default." + + use perl && perl-module_pkg_postinst + + if use symux ; then + elog "Before running the data collector, edit /etc/symux.conf." + elog "To create the RRDs run /usr/share/symon/c_smrrds.sh all. Then," + elog "to test your configuration file, run symux -t." + elog "For information about migrating RRDs from a previous symux" + elog "version read the LEGACY FORMATS section of symux(8)." + elog "To view the rrdtool pictures of the stored data, emerge syweb." + fi +} |