diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/mrtg | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/mrtg')
-rw-r--r-- | net-analyzer/mrtg/Manifest | 1 | ||||
-rw-r--r-- | net-analyzer/mrtg/files/mrtg-2.17.4-socket6.patch | 11 | ||||
-rw-r--r-- | net-analyzer/mrtg/files/mrtg.confd | 17 | ||||
-rw-r--r-- | net-analyzer/mrtg/files/mrtg.rc | 54 | ||||
-rw-r--r-- | net-analyzer/mrtg/metadata.xml | 5 | ||||
-rw-r--r-- | net-analyzer/mrtg/mrtg-2.17.4-r1.ebuild | 40 |
6 files changed, 128 insertions, 0 deletions
diff --git a/net-analyzer/mrtg/Manifest b/net-analyzer/mrtg/Manifest new file mode 100644 index 000000000000..a84ce71907ac --- /dev/null +++ b/net-analyzer/mrtg/Manifest @@ -0,0 +1 @@ +DIST mrtg-2.17.4.tar.gz 1096879 SHA256 5efa7fae8040159208472e5f889be5b41d8c8a2ea6b31616f0f75cc7f48d2365 SHA512 b15dac707e387714ba1a181c487894fcacbb9c2c1a1710475ebe86a11e30d758a4b44c139b42638de7fdef6616cf3112afc4e5a8c5fbf53718829673698ee110 WHIRLPOOL 125ef92077ba691c769924bab20a86e3a72f406a8ce5a7fed0342c0c03aa35d5b1ee4f0ddb6419ab892337ac38bf2ad12131b099ba9e972b08e753b61f08ff11 diff --git a/net-analyzer/mrtg/files/mrtg-2.17.4-socket6.patch b/net-analyzer/mrtg/files/mrtg-2.17.4-socket6.patch new file mode 100644 index 000000000000..5540874d9a00 --- /dev/null +++ b/net-analyzer/mrtg/files/mrtg-2.17.4-socket6.patch @@ -0,0 +1,11 @@ +--- a/bin/mrtg ++++ b/bin/mrtg +@@ -300,7 +300,7 @@ sub main { + if ($cfg{enableipv6} eq 'yes') { + if ( eval {local $SIG{__DIE__};require Socket; require Socket6; require IO::Socket::INET6;}) { + import Socket; +- import Socket6; ++ Socket6->import(qw(inet_pton getaddrinfo)); + debug('base', "IPv6 libraries found, IPv6 enabled."); + } else { + warn "$NOW: WARNING: IPv6 libraries not found, IPv6 disabled.\n"; diff --git a/net-analyzer/mrtg/files/mrtg.confd b/net-analyzer/mrtg/files/mrtg.confd new file mode 100644 index 000000000000..c0fb422b11ec --- /dev/null +++ b/net-analyzer/mrtg/files/mrtg.confd @@ -0,0 +1,17 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +MRTG_CONF="/etc/mrtg.conf" +MRTG_PID="/var/run/mrtg.pid" + +# uncomment and set the following, if you'd like to run mrtg as a +# different user/group +#MRTG_USER="" +#MRTG_GROUP="" + +# uncomment if you'd like to enable logging +#MRTG_LOG="/var/log/mrtg.log" + +# set any extra options here +MRTG_OPTS="" diff --git a/net-analyzer/mrtg/files/mrtg.rc b/net-analyzer/mrtg/files/mrtg.rc new file mode 100644 index 000000000000..deb3229a543a --- /dev/null +++ b/net-analyzer/mrtg/files/mrtg.rc @@ -0,0 +1,54 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net + + # if monitoring snmp variables on this machine: + # use net-snmpd +} + +checkconfig() { + if [[ ! -f ${MRTG_CONF} ]] ; then + eerror "Please create ${MRTG_CONF} (try man cfgmaker)" + return 1 + fi + + mrtg --check ${MRTG_CONF} + return $? +} + +start() { + # mrtg will not run if LANG=*utf8 + # use grep instead of bash regexp for bug #159786 + [[ "$(echo $LANG|grep -E '((^[A-Za-z0-9\_\@\-]+\.)|(^))([uU][tT][fF]-?8)$')" ]] \ + && LANG='C' + + checkconfig || return $? + + # enable logging? + [[ -n "${MRTG_LOG}" ]] && \ + MRTG_OPTS="${MRTG_OPTS} --logging ${MRTG_LOG}" + + # run as a different user? + [[ -n "${MRTG_USER}" ]] && \ + MRTG_OPTS="${MRTG_OPTS} --user ${MRTG_USER}" + + # run as a different group? + [[ -n "${MRTG_GROUP}" ]] && \ + MRTG_OPTS="${MRTG_OPTS} --group ${MRTG_GROUP}" + + ebegin "Starting mrtg" + start-stop-daemon --start --quiet --pidfile ${MRTG_PID} --name mrtg\ + --exec /usr/bin/mrtg -- --daemon --pid-file=${MRTG_PID} \ + ${MRTG_OPTS} ${MRTG_CONF} >/dev/null + eend $? "Failed to start mrtg" +} + +stop() { + ebegin "Stopping mrtg" + start-stop-daemon --stop --quiet --pidfile ${MRTG_PID} + eend $? "Failed to stop mrtg" +} diff --git a/net-analyzer/mrtg/metadata.xml b/net-analyzer/mrtg/metadata.xml new file mode 100644 index 000000000000..03aa50bab7e3 --- /dev/null +++ b/net-analyzer/mrtg/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>netmon</herd> +</pkgmetadata> diff --git a/net-analyzer/mrtg/mrtg-2.17.4-r1.ebuild b/net-analyzer/mrtg/mrtg-2.17.4-r1.ebuild new file mode 100644 index 000000000000..ff115858e2ea --- /dev/null +++ b/net-analyzer/mrtg/mrtg-2.17.4-r1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils + +DESCRIPTION="A tool to monitor the traffic load on network-links" +HOMEPAGE="http://oss.oetiker.ch/mrtg/" +SRC_URI="http://oss.oetiker.ch/mrtg/pub/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 ~arm hppa ppc ppc64 sparc x86" +IUSE="selinux" + +DEPEND=" + >=dev-perl/SNMP_Session-1.13-r2 + >=dev-perl/Socket6-0.23 + dev-lang/perl + media-libs/gd[png] +" +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-mrtg )" + +src_prepare() { + epatch "${FILESDIR}"/${P}-socket6.patch + rm ./lib/mrtg2/{SNMP_{Session,util},BER}.pm || die +} + +src_install () { + keepdir /var/lib/mrtg + + default + + mv "${ED}"/usr/share/doc/{mrtg2,${PF}} || die + + newinitd "${FILESDIR}/mrtg.rc" ${PN} + newconfd "${FILESDIR}/mrtg.confd" ${PN} +} |