summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-analyzer/symon/ChangeLog12
-rw-r--r--net-analyzer/symon/Manifest11
-rw-r--r--net-analyzer/symon/files/symon-init.d22
-rw-r--r--net-analyzer/symon/files/symon-symon.conf.patch23
-rw-r--r--net-analyzer/symon/files/symon-symux.conf.patch48
-rw-r--r--net-analyzer/symon/files/symon-syweb-class_lexer.inc.patch13
-rw-r--r--net-analyzer/symon/files/symon-syweb-setup.inc.patch24
-rw-r--r--net-analyzer/symon/files/symon-syweb-total_firewall.layout.patch29
-rw-r--r--net-analyzer/symon/metadata.xml5
-rw-r--r--net-analyzer/symon/symon-2.77.ebuild104
10 files changed, 291 insertions, 0 deletions
diff --git a/net-analyzer/symon/ChangeLog b/net-analyzer/symon/ChangeLog
new file mode 100644
index 000000000..a57e1a6d3
--- /dev/null
+++ b/net-analyzer/symon/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for net-analyzer/symon
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 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 000000000..47a27e106
--- /dev/null
+++ b/net-analyzer/symon/Manifest
@@ -0,0 +1,11 @@
+AUX symon-init.d 609 RMD160 5e8e3e1e44204bd1d65207f6c9bad11787945681 SHA1 bb800d88925edab5964da762e12892cdb81b62ac SHA256 29ec7bc55ae7937d02359b34e98323618940e7a6263b1f3fdce2be8c9b091a12
+AUX symon-symon.conf.patch 610 RMD160 edc2d9ff502ebab575ebb63454b789e306a4ad01 SHA1 49cfe13a2b179781dfb2ccf8f0f037fcc2da0d2f SHA256 8a3c1e03bf5f5456e230556acd16490ca96cb3de1104983012db7d8738bdc560
+AUX symon-symux.conf.patch 1599 RMD160 5131d2679001db3cb440817ec3e000be6f59184e SHA1 fbb36356ea952778d24ec78ad19f0db4b95d808a SHA256 dec14b8c29e183900a74b20eb69f9ad4c20f5988cbcea4175de1728fff18b75d
+AUX symon-syweb-class_lexer.inc.patch 458 RMD160 daa1f26d028901c588602ebc61dddfb867ee3703 SHA1 2f56ff745e3517225ec11ec14ac2fd9f937ef428 SHA256 e1fab2a5b04b9df8a64a006aecb9869290e2e73a9bbd02449d7d9b38d559b163
+AUX symon-syweb-setup.inc.patch 898 RMD160 e8597d4ebd7c77c58c07829665161a21ea7da210 SHA1 07b8a558558288925ae1ec08a496aeef97df824b SHA256 e89d593304eabcd746d26d3bf77fb84a3d5c1fe05026e39e8de56407427624d0
+AUX symon-syweb-total_firewall.layout.patch 1616 RMD160 08462a968ece585cba4331ba596386033776144d SHA1 f942a8cdd8418f487345e0fbf581f744af5ddc0f SHA256 4b1aade4dca5e5e0f6ab12dd7d7265c68fd9a99e42984ae91b330a81cf3cc362
+DIST symon-2.77.tar.gz 102400 RMD160 22cd01a54df77214849597718c2a005b814f33c7 SHA1 644c1520be3ceb0598e3e23f093df0e9183430db SHA256 6a3cd6e78cb4a45f7f619f28fa994c89504404cb5eb629db2b45cd797dd270fe
+DIST syweb-0.56.tar.gz 40960 RMD160 ea181d23bf7d0077d6703f193f4089f1ebc8de26 SHA1 2a0a1553f191323696b5a525236756fc3c08c0e4 SHA256 861d3f6702e2cc87e3cfe5e55755ae0519197ba59f63740024eb274919770192
+EBUILD symon-2.77.ebuild 2779 RMD160 ed977532592162fbe7c8aca88432cdd0ff290b54 SHA1 313645652a217be4088a194c0c60dbfe41d9268b SHA256 0478650725e1450193aa4d6326464496179f89ae58f6c15db31ed3caa172ebe4
+MISC ChangeLog 458 RMD160 84baf1ba6eba25db1e1ca9be4fef903d77d3882d SHA1 5d83feff51ae02398824331f167aa35f7134be7a SHA256 2f281d9dd9011c38f5c05b87ec523381df61b80ffe0a0c699a4e287fa053e950
+MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42
diff --git a/net-analyzer/symon/files/symon-init.d b/net-analyzer/symon/files/symon-init.d
new file mode 100644
index 000000000..4a225c52e
--- /dev/null
+++ b/net-analyzer/symon/files/symon-init.d
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header:
+
+start() {
+ ebegin "Starting symon"
+ start-stop-daemon --start --quiet --exec /usr/sbin/symon -- -u
+ eend ${?}
+ ebegin "Starting symux"
+ start-stop-daemon --start --quiet --exec /usr/sbin/symux
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping symon"
+ start-stop-daemon --stop --quiet --pidfile /var/run/symon.pid
+ eend ${?}
+ ebegin "Stopping symux"
+ start-stop-daemon --stop --quiet --pidfile /var/run/symux.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 000000000..8f5e4cb04
--- /dev/null
+++ b/net-analyzer/symon/files/symon-symon.conf.patch
@@ -0,0 +1,23 @@
+# convert bsd devices to linux
+# mbuf, sensor, and proc still not available in linux
+
+--- symon/symon/symon.conf.orig 2007-12-31 16:56:38.322746920 +0000
++++ symon/symon/symon.conf 2007-12-31 16:58:39.625398962 +0000
+@@ -4,12 +4,9 @@
+ # 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)
++ 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 000000000..c9f03fa6a
--- /dev/null
+++ b/net-analyzer/symon/files/symon-symux.conf.patch
@@ -0,0 +1,48 @@
+--- symon/symux/symux.conf.orig 2007-12-31 17:01:10.393269670 +0000
++++ symon/symux/symux.conf 2007-12-31 17:27:24.596336305 +0000
+@@ -7,30 +7,28 @@
+
+ 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)
++ 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/symon-syweb-class_lexer.inc.patch b/net-analyzer/symon/files/symon-syweb-class_lexer.inc.patch
new file mode 100644
index 000000000..86989fb24
--- /dev/null
+++ b/net-analyzer/symon/files/symon-syweb-class_lexer.inc.patch
@@ -0,0 +1,13 @@
+# comment layout test since they aren't installed by default (prevents configtest.php from failing)
+
+--- syweb/htdocs/syweb/class_lexer.inc.orig 2007-04-30 21:04:45.004493630 +0100
++++ syweb/htdocs/syweb/class_lexer.inc 2007-04-30 21:04:59.267317747 +0100
+@@ -245,7 +245,7 @@
+ function _test() {
+ global $symon;
+
+- $this->load('hifn_test.layout');
++ /* $this->load('hifn_test.layout'); */
+ while(!$this->eof) {
+ $token = $this->next_token();
+ }
diff --git a/net-analyzer/symon/files/symon-syweb-setup.inc.patch b/net-analyzer/symon/files/symon-syweb-setup.inc.patch
new file mode 100644
index 000000000..e88e29624
--- /dev/null
+++ b/net-analyzer/symon/files/symon-syweb-setup.inc.patch
@@ -0,0 +1,24 @@
+# rename directories to reflect the changes from the ebuild and symux.conf file
+
+--- syweb/htdocs/syweb/setup.inc.orig 2007-04-28 18:13:18.000000000 +0100
++++ syweb/htdocs/syweb/setup.inc 2007-04-28 18:14:25.000000000 +0100
+@@ -32,11 +32,18 @@
+ $symon['layout_dir']='/var/www/symon';
+ */
+
+-/* running FreeBSD, apache not chrooted: */
++/* running FreeBSD, apache not chrooted:
+ $symon['rrdtool_path']='/usr/local/bin/rrdtool';
+ $symon['cache_dir']='/usr/local/www/symon/cache';
+ $symon['host_tree']='/usr/local/www/symon/rrds';
+ $symon['layout_dir']='/usr/local/www/symon';
++*/
++
++/* running Linux, apache not chrooted: */
++$symon['rrdtool_path']='/usr/bin/rrdtool';
++$symon['cache_dir']='/var/www/localhost/htdocs/symon/cache';
++$symon['host_tree']='/var/lib/symon/rrds';
++$symon['layout_dir']='/var/www/localhost/htdocs/symon/layouts';
+
+ $symon['cache_duration']=20;
+ $symon['isolate_hosts']=1;
diff --git a/net-analyzer/symon/files/symon-syweb-total_firewall.layout.patch b/net-analyzer/symon/files/symon-syweb-total_firewall.layout.patch
new file mode 100644
index 000000000..23f9b860f
--- /dev/null
+++ b/net-analyzer/symon/files/symon-syweb-total_firewall.layout.patch
@@ -0,0 +1,29 @@
+# convert bsd devices to linux
+# rename directories to non-chroot
+
+--- syweb/symon/total_firewall.layout.orig 2007-04-30 19:13:12.967405846 +0100
++++ syweb/symon/total_firewall.layout 2007-04-30 19:14:55.872706997 +0100
+@@ -8,15 +8,15 @@
+ </div>";
+
+ group name="interfaces", start=1017942400, end=-1;
+-graph rrdfile=/symon/rrds/www/if_de0.rrd, title="external if on dikkeaap";
+-graph rrdfile=/symon/rrds/www/if_xl0.rrd, title="internal if on dikkeaap";
++graph rrdfile=/var/lib/symon/rrds/www/if_eth0.rrd, title="external if on dikkeaap";
++graph rrdfile=/var/lib/symon/rrds/www/if_eth1.rrd, title="internal if on dikkeaap";
+
+ group name="cpu and memory", start=1017942400, end=-1;
+-graph rrdfile=/symon/rrds/www/cpu0.rrd, title="cpu(0) on dikkeaap";
+-graph rrdfile=/symon/rrds/www/mem.rrd, title="mem on dikkeaap";
++graph rrdfile=/var/lib/symon/rrds/www/cpu0.rrd, title="cpu(0) on dikkeaap";
++graph rrdfile=/var/lib/symon/rrds/www/mem.rrd, title="mem on dikkeaap";
+
+ group name="disks", start=1017942400, end=-1;
+-graph rrdfile=/symon/rrds/www/io_wd0.rrd, title="disk 0 on dikkeaap";
+-graph rrdfile=/symon/rrds/www/io_wd1.rrd, title="disk 1 on dikkeaap";
+-graph rrdfile=/symon/rrds/www/io_wd2.rrd, title="disk 2 on dikkeaap";
+-graph rrdfile=/symon/rrds/www/io_wd3.rrd, title="disk 3 on dikkeaap";
++graph rrdfile=/var/lib/symon/rrds/www/io_hda.rrd, title="disk 0 on dikkeaap";
++graph rrdfile=/var/lib/symon/rrds/www/io_hdb.rrd, title="disk 1 on dikkeaap";
++graph rrdfile=/var/lib/symon/rrds/www/io_hdc.rrd, title="disk 2 on dikkeaap";
++graph rrdfile=/var/lib/symon/rrds/www/io_hdd.rrd, title="disk 3 on dikkeaap";
diff --git a/net-analyzer/symon/metadata.xml b/net-analyzer/symon/metadata.xml
new file mode 100644
index 000000000..7e3286984
--- /dev/null
+++ b/net-analyzer/symon/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>maintainer-wanted</herd>
+</pkgmetadata>
diff --git a/net-analyzer/symon/symon-2.77.ebuild b/net-analyzer/symon/symon-2.77.ebuild
new file mode 100644
index 000000000..ca68a9f86
--- /dev/null
+++ b/net-analyzer/symon/symon-2.77.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit depend.php eutils webapp
+
+DESCRIPTION="A system monitor that can be used to obtain accurate and up to date information on the performance of a number of systems"
+HOMEPAGE="http://www.xs4all.nl/~wpd/symon/"
+SRC_URI="http://www.xs4all.nl/~wpd/symon/philes/${P}.tar.gz
+ syweb? ( http://www.xs4all.nl/~wpd/symon/philes/syweb-0.56.tar.gz )"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~sparc ~x86"
+IUSE="syweb"
+
+DEPEND="net-analyzer/rrdtool
+ sys-devel/pmake"
+RDEPEND="net-analyzer/rrdtool
+ syweb? ( virtual/httpd-php )"
+
+S=${WORKDIR}/${PN}
+WEBAPP_MANUAL_SLOT="yes"
+
+pkg_setup() {
+ require_php_with_use gd
+ webapp_pkg_setup
+}
+
+src_unpack() {
+ unpack ${A}
+
+ epatch "${FILESDIR}"/${PN}-symon.conf.patch
+ epatch "${FILESDIR}"/${PN}-symux.conf.patch
+
+ # the default user will be symon, not _symon
+ # not really used atm, but probably will if chroot will ever be implemented
+ sed -i -e 's|_symon|symon|g' symon/symon/symon.8
+
+ if use syweb ; then
+ epatch "${FILESDIR}"/${PN}-syweb-class_lexer.inc.patch
+ epatch "${FILESDIR}"/${PN}-syweb-setup.inc.patch
+ epatch "${FILESDIR}"/${PN}-syweb-total_firewall.layout.patch
+ fi
+}
+
+src_compile() {
+ MAKE=pmake emake || die "emake failed."
+}
+
+src_install() {
+ insinto /etc
+ doins symon/symon.conf symux/symux.conf
+
+ newinitd "${FILESDIR}"/${PN}-init.d ${PN} || die "newinitd failed."
+
+ dodoc CHANGELOG HACKERS TODO
+
+ doman symon/symon.8 symux/symux.8
+
+ dosbin symon/symon
+ dosbin symux/symux
+
+ dodir /usr/share/symon
+ insinto /usr/share/symon
+ doins symon/c_config.sh symux/c_smrrds.sh
+ fperms a+x,u-w /usr/share/symon/c_config.sh
+ fperms u-w,u+x /usr/share/symon/c_smrrds.sh
+
+ dodir /var/lib/symon/rrds/localhost
+
+ if use syweb ; then
+ docinto /layouts
+ dodoc "${WORKDIR}"/syweb/symon/total_firewall.layout
+
+ webapp_src_preinst
+
+ dodir "${MY_HTDOCSDIR}"/cache
+ dodir "${MY_HTDOCSDIR}"/layouts
+ webapp_serverowned "${MY_HTDOCSDIR}"/cache
+ insinto "${MY_HTDOCSDIR}"
+ doins -r "${WORKDIR}"/syweb/htdocs/syweb/*
+ webapp_configfile "${MY_HTDOCSDIR}"/setup.inc
+
+ webapp_src_install
+ fi
+}
+
+pkg_postinst() {
+ if use syweb ; then
+ elog "Test your syweb configuration by pointing your browser at:"
+ elog "http://${VHOST_HOSTNAME}/${PN}/configtest.php"
+ webapp_pkg_postinst
+ fi
+
+ elog "You'll need to setup your ${ROOT}/etc/symon.conf and "
+ elog "${ROOT}/etc/symux.conf before running these daemons for "
+ elog "the first time."
+ elog "For an example configuration run ${ROOT}/usr/share/symon/c_config.sh"
+ elog "Then, you may run ${ROOT}/usr/share/symon/c_smrrds.sh all"
+ elog "To test the configuration run sym{on,ux} -t"
+ elog "For details, please see their manpages."
+ elog "NOTE that symon won't chroot by default."
+}