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/vnstat | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz |
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/vnstat')
-rw-r--r-- | net-analyzer/vnstat/Manifest | 4 | ||||
-rw-r--r-- | net-analyzer/vnstat/files/vnstat.cron | 9 | ||||
-rw-r--r-- | net-analyzer/vnstat/files/vnstatd.confd | 7 | ||||
-rw-r--r-- | net-analyzer/vnstat/files/vnstatd.initd | 37 | ||||
-rw-r--r-- | net-analyzer/vnstat/files/vnstatd.initd-r1 | 38 | ||||
-rw-r--r-- | net-analyzer/vnstat/metadata.xml | 11 | ||||
-rw-r--r-- | net-analyzer/vnstat/vnstat-1.11-r2.ebuild | 78 | ||||
-rw-r--r-- | net-analyzer/vnstat/vnstat-1.12.ebuild | 85 | ||||
-rw-r--r-- | net-analyzer/vnstat/vnstat-1.13.ebuild | 70 | ||||
-rw-r--r-- | net-analyzer/vnstat/vnstat-1.14.ebuild | 70 |
10 files changed, 409 insertions, 0 deletions
diff --git a/net-analyzer/vnstat/Manifest b/net-analyzer/vnstat/Manifest new file mode 100644 index 00000000000..63786c06d70 --- /dev/null +++ b/net-analyzer/vnstat/Manifest @@ -0,0 +1,4 @@ +DIST vnstat-1.11.tar.gz 79075 SHA256 b71876d817bbb6a16d31b4236e22a2eb6c39666a7f7bfea581f5ff441cade026 SHA512 f16a0cc5065665c46de9781b6d92e96f0966520e5448fc529150ced886574fe07d0695df5051828b58183d06a707b7b2e94562b06db1898dacb858517a5485b1 WHIRLPOOL bc93704b8f9c39830f1ba8c2d39cc7ba7d0b317d35941547870bd5cf8c2f374050cdbae7c8ce444765cd5fb22c78d28e6099f32b06aee9d836451b399216e6ef +DIST vnstat-1.12.tar.gz 98435 SHA256 af1050d9c1b22d4b9742fe0d1818de9eb1037b8e7f9ba67b962e108d8527be69 SHA512 0d6b5f362bbcbb4a104f82b8e350f5d8b071e974a3fdfb100333c3d8e5a096a71a97360543d2594fd3f2108df8bb03ffffc4c52d396f28723005a5d1bf605eb1 WHIRLPOOL 590197dc62b077268e0814d7ce15f5f519d53328a68e57743c1a3375082410239d75e28674094dbb7d14b27d17769f7de6d0eccd716a05d50d86f5d06274c9a0 +DIST vnstat-1.13.tar.gz 101568 SHA256 6f4e2599ebb195b25f499d3e2e865aa14da336dfc9cc03a79181aa71f7ed99cd SHA512 b9620349247db292b13cd06db1921b4e5921a473957ac387f6adfc21acdc441910f73b97dfa5f024d7ba7a6521d1d9d97e2b25337673f423bcdbd064207f01a4 WHIRLPOOL 6b9aeb96790eeef2b287cdffeb4d41b2db22803e7218dafb27944bb14acf255bf590dcb82220c72f388c8cc387045b87335a2e4973a07c5ef1e1c98c710e068d +DIST vnstat-1.14.tar.gz 103281 SHA256 f8462a47d85d0890493dc9eaeafbc725ae631aa5b103fb7f8af4ddb2314e8386 SHA512 a2aebcdd0c4aa4a821579b751af587af44a5c3f14864d3022a05f65c4df2b9ddece0ed414097346d95124a3ea5fb89ea26bf44c68d3c7ca7237573dd5f1e8239 WHIRLPOOL 1b8b6ac7eeaec936d7c8d17d6a384c13f8daa9ee8e451d94abffc1b373eb3b106ed2b4c95af9f833c4c6e732a4ebc0ccdb1544988da650012add99d7915fd068 diff --git a/net-analyzer/vnstat/files/vnstat.cron b/net-analyzer/vnstat/files/vnstat.cron new file mode 100644 index 00000000000..69068132768 --- /dev/null +++ b/net-analyzer/vnstat/files/vnstat.cron @@ -0,0 +1,9 @@ +#!/bin/bash + +# run vnstat if installed and at least one database exists + +# Uncomment the following to enable + +#if [ -x /usr/bin/vnstat ] && [ `ls /var/lib/vnstat/ | wc -l` -ge 1 ] ; then +# exec /usr/bin/vnstat -u +#fi diff --git a/net-analyzer/vnstat/files/vnstatd.confd b/net-analyzer/vnstat/files/vnstatd.confd new file mode 100644 index 00000000000..17901419aac --- /dev/null +++ b/net-analyzer/vnstat/files/vnstatd.confd @@ -0,0 +1,7 @@ +# /etc/conf.d/vnstatd: config file for /etc/init.d/vnstatd + +# Adjust scheduling priority on vnstatd (default: 0) +#VNSTATD_NICELEVEL="0" + +# Pass extra options to vnstatd +#VNSTATD_EXTRAOPTS="--config /etc/vnstat.conf" diff --git a/net-analyzer/vnstat/files/vnstatd.initd b/net-analyzer/vnstat/files/vnstatd.initd new file mode 100644 index 00000000000..2cfb781042c --- /dev/null +++ b/net-analyzer/vnstat/files/vnstatd.initd @@ -0,0 +1,37 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_started_commands="reload" + +depend() { + use net +} + +VNSTATD_PIDFILE="${VNSTATD_PIDFILE:-/var/run/vnstatd/vnstatd.pid}" + +start() { + ebegin "Starting vnstatd" + checkpath -q -d -m 755 -o vnstat:vnstat /var/run/vnstatd + start-stop-daemon --start --quiet \ + --pidfile "${VNSTATD_PIDFILE}" \ + --user vnstat --group vnstat \ + --nicelevel ${VNSTATD_NICELEVEL:-0} \ + --exec /usr/bin/vnstatd -- \ + -d ${VNSTATD_EXTRAOPTS} -p ${VNSTATD_PIDFILE} + eend $? +} + +stop() { + ebegin "Stopping vnstatd" + start-stop-daemon --stop --quiet \ + --pidfile "${VNSTATD_PIDFILE}" + eend $? +} + +reload() { + ebegin "Reloading vnstatd configuration" + kill -HUP $(< "${VNSTATD_PIDFILE}") &>/dev/null + eend $? +} diff --git a/net-analyzer/vnstat/files/vnstatd.initd-r1 b/net-analyzer/vnstat/files/vnstatd.initd-r1 new file mode 100644 index 00000000000..51e8183b26c --- /dev/null +++ b/net-analyzer/vnstat/files/vnstatd.initd-r1 @@ -0,0 +1,38 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_started_commands="reload" + +depend() { + use net +} + +VNSTATD_PIDFILE="${VNSTATD_PIDFILE:-/run/vnstatd/vnstatd.pid}" + +start() { + ebegin "Starting vnstatd" + checkpath -q -d -m 755 -o vnstat:vnstat /run/vnstatd + checkpath -q -d -m 755 -o vnstat:vnstat /var/lib/vnstat + start-stop-daemon --start --quiet \ + --pidfile "${VNSTATD_PIDFILE}" \ + --user vnstat --group vnstat \ + --nicelevel ${VNSTATD_NICELEVEL:-0} \ + --exec /usr/bin/vnstatd -- \ + -d ${VNSTATD_EXTRAOPTS} -p ${VNSTATD_PIDFILE} + eend $? +} + +stop() { + ebegin "Stopping vnstatd" + start-stop-daemon --stop --quiet \ + --pidfile "${VNSTATD_PIDFILE}" + eend $? +} + +reload() { + ebegin "Reloading vnstatd configuration" + kill -HUP $(cat "${VNSTATD_PIDFILE}") 2>&1 >/dev/null + eend $? +} diff --git a/net-analyzer/vnstat/metadata.xml b/net-analyzer/vnstat/metadata.xml new file mode 100644 index 00000000000..ff2cafb5d05 --- /dev/null +++ b/net-analyzer/vnstat/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>netmon</herd> +<longdescription> + vnStat is a network traffic monitor for Linux that keeps a log of daily + network traffic for the selected interface(s). vnStat isn't a packet sniffer. + The traffic information is analyzed from the /proc filesystem. That way vnStat + can be used even without root permissions. +</longdescription> +</pkgmetadata> diff --git a/net-analyzer/vnstat/vnstat-1.11-r2.ebuild b/net-analyzer/vnstat/vnstat-1.11-r2.ebuild new file mode 100644 index 00000000000..0b20d76df83 --- /dev/null +++ b/net-analyzer/vnstat/vnstat-1.11-r2.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit toolchain-funcs user + +DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage" +HOMEPAGE="http://humdi.net/vnstat/" +SRC_URI="http://humdi.net/vnstat/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm hppa ppc ppc64 sparc x86" +IUSE="gd" + +DEPEND=" + gd? ( media-libs/gd[png] )" +RDEPEND="${DEPEND}" + +pkg_setup() { + enewgroup vnstat + enewuser vnstat -1 -1 /dev/null vnstat +} + +src_compile() { + sed -i 's:vnstat[.]log:vnstatd.log:' cfg/vnstat.conf || die + sed -i 's:vnstat[.]pid:vnstatd/vnstatd.pid:' cfg/vnstat.conf || die + + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" $(usex gd all '') +} + +src_install() { + use gd && dobin src/vnstati + dobin src/vnstat src/vnstatd + exeinto /etc/cron.hourly + newexe "${FILESDIR}"/vnstat.cron vnstat + + insinto /etc + doins cfg/vnstat.conf + fowners root:vnstat /etc/vnstat.conf + + newconfd "${FILESDIR}"/vnstatd.confd vnstatd + newinitd "${FILESDIR}"/vnstatd.initd vnstatd + + keepdir /var/lib/vnstat + fowners vnstat:vnstat /var/lib/vnstat + + use gd && doman man/vnstati.1 + doman man/vnstat.1 man/vnstatd.1 + + newdoc examples/vnstat_ip-up ip-up.example + newdoc examples/vnstat_ip-down ip-down.example + newdoc INSTALL README.setup + dodoc CHANGES README UPGRADE FAQ examples/vnstat.cgi +} + +pkg_postinst() { + # Workaround feature/bug #141619 + chown -R vnstat:vnstat "${ROOT}"/var/lib/vnstat + chown vnstat:vnstat "${ROOT}"/var/run/vnstatd + ewarn "vnStat db files owning user and group has been changed to \"vnstat\"." + + elog + elog "Repeat the following command for every interface you" + elog "wish to monitor (replace eth0):" + elog " vnstat -u -i eth0" + elog "and set correct permissions after that, e.g." + elog " chown -R vnstat:vnstat /var/lib/vnstat" + elog + elog "Note: if an interface transfers more than ~4GB in" + elog "the time between cron runs, you may miss traffic" + elog + elog "To update the interfaces database automatically with cron, uncomment" + elog "lines in /etc/cron.hourly/vnstat and set cron job to run it as" + elog "frequently as required. Alternatively you can use vnstatd. Init script" + elog "was installed into /etc/init.d/vnstatd for your convenience." +} diff --git a/net-analyzer/vnstat/vnstat-1.12.ebuild b/net-analyzer/vnstat/vnstat-1.12.ebuild new file mode 100644 index 00000000000..a35b06920ea --- /dev/null +++ b/net-analyzer/vnstat/vnstat-1.12.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit toolchain-funcs user + +DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage" +HOMEPAGE="http://humdi.net/vnstat/" +SRC_URI="http://humdi.net/vnstat/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86" +IUSE="gd selinux" + +DEPEND=" + gd? ( media-libs/gd[png] ) +" +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-vnstatd ) +" + +pkg_setup() { + enewgroup vnstat + enewuser vnstat -1 -1 /dev/null vnstat +} + +src_prepare() { + tc-export CC +} + +src_compile() { + sed -i 's:vnstat[.]log:vnstatd.log:' cfg/vnstat.conf || die + sed -i 's:vnstat[.]pid:vnstatd/vnstatd.pid:' cfg/vnstat.conf || die + + emake CFLAGS="${CFLAGS}" $(usex gd all '') +} + +src_install() { + use gd && dobin src/vnstati + dobin src/vnstat src/vnstatd + + exeinto /etc/cron.hourly + newexe "${FILESDIR}"/vnstat.cron vnstat + + insinto /etc + doins cfg/vnstat.conf + fowners root:vnstat /etc/vnstat.conf + + newconfd "${FILESDIR}"/vnstatd.confd vnstatd + newinitd "${FILESDIR}"/vnstatd.initd vnstatd + + keepdir /var/lib/vnstat + fowners vnstat:vnstat /var/lib/vnstat + + use gd && doman man/vnstati.1 + doman man/vnstat.1 man/vnstatd.1 + + newdoc INSTALL README.setup + dodoc CHANGES README UPGRADE FAQ examples/vnstat.cgi +} + +pkg_postinst() { + # Workaround feature/bug #141619 + chown -R vnstat:vnstat "${ROOT}"/var/lib/vnstat + chown vnstat:vnstat "${ROOT}"/var/run/vnstatd + ewarn "vnStat db files owning user and group has been changed to \"vnstat\"." + + elog + elog "Repeat the following command for every interface you" + elog "wish to monitor (replace eth0):" + elog " vnstat -u -i eth0" + elog "and set correct permissions after that, e.g." + elog " chown -R vnstat:vnstat /var/lib/vnstat" + elog + elog "Note: if an interface transfers more than ~4GB in" + elog "the time between cron runs, you may miss traffic" + elog + elog "To update the interfaces database automatically with cron, uncomment" + elog "lines in /etc/cron.hourly/vnstat and set cron job to run it as" + elog "frequently as required. Alternatively you can use vnstatd. Init script" + elog "was installed into /etc/init.d/vnstatd for your convenience." +} diff --git a/net-analyzer/vnstat/vnstat-1.13.ebuild b/net-analyzer/vnstat/vnstat-1.13.ebuild new file mode 100644 index 00000000000..5840253e7f4 --- /dev/null +++ b/net-analyzer/vnstat/vnstat-1.13.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit toolchain-funcs user + +DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage" +HOMEPAGE="http://humdi.net/vnstat/" +SRC_URI="http://humdi.net/vnstat/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm hppa ppc ppc64 sparc x86" +IUSE="gd selinux test" + +COMMON_DEPEND=" + gd? ( media-libs/gd[png] ) +" +DEPEND=" + ${COMMON_DEPEND} + test? ( dev-libs/check ) +" +RDEPEND=" + ${COMMON_DEPEND} + selinux? ( sec-policy/selinux-vnstatd ) +" + +pkg_setup() { + enewgroup vnstat + enewuser vnstat -1 -1 /dev/null vnstat +} + +src_prepare() { + tc-export CC + + sed -i \ + -e 's|vnstat[.]log|vnstatd.log|' \ + -e 's|vnstat[.]pid|vnstatd/vnstatd.pid|' \ + -e 's|/var/run|/run|' \ + cfg/${PN}.conf || die + sed -i \ + -e '/PIDFILE/s|/var/run|/run|' \ + src/common.h || die +} + +src_compile() { + emake CFLAGS="${CFLAGS}" $(usex gd all '') +} + +src_install() { + use gd && dobin src/vnstati + dobin src/vnstat src/vnstatd + + exeinto /etc/cron.hourly + newexe "${FILESDIR}"/vnstat.cron vnstat + + insinto /etc + doins cfg/vnstat.conf + fowners root:vnstat /etc/vnstat.conf + + newconfd "${FILESDIR}"/vnstatd.confd vnstatd + newinitd "${FILESDIR}"/vnstatd.initd-r1 vnstatd + + use gd && doman man/vnstati.1 + doman man/vnstat.1 man/vnstatd.1 + + newdoc INSTALL README.setup + dodoc CHANGES README UPGRADE FAQ examples/vnstat.cgi +} diff --git a/net-analyzer/vnstat/vnstat-1.14.ebuild b/net-analyzer/vnstat/vnstat-1.14.ebuild new file mode 100644 index 00000000000..53ea375992a --- /dev/null +++ b/net-analyzer/vnstat/vnstat-1.14.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit toolchain-funcs user + +DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage" +HOMEPAGE="http://humdi.net/vnstat/" +SRC_URI="http://humdi.net/vnstat/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86" +IUSE="gd selinux test" + +COMMON_DEPEND=" + gd? ( media-libs/gd[png] ) +" +DEPEND=" + ${COMMON_DEPEND} + test? ( dev-libs/check ) +" +RDEPEND=" + ${COMMON_DEPEND} + selinux? ( sec-policy/selinux-vnstatd ) +" + +pkg_setup() { + enewgroup vnstat + enewuser vnstat -1 -1 /dev/null vnstat +} + +src_prepare() { + tc-export CC + + sed -i \ + -e 's|vnstat[.]log|vnstatd.log|' \ + -e 's|vnstat[.]pid|vnstatd/vnstatd.pid|' \ + -e 's|/var/run|/run|' \ + cfg/${PN}.conf || die + sed -i \ + -e '/PIDFILE/s|/var/run|/run|' \ + src/common.h || die +} + +src_compile() { + emake CFLAGS="${CFLAGS}" $(usex gd all '') +} + +src_install() { + use gd && dobin src/vnstati + dobin src/vnstat src/vnstatd + + exeinto /etc/cron.hourly + newexe "${FILESDIR}"/vnstat.cron vnstat + + insinto /etc + doins cfg/vnstat.conf + fowners root:vnstat /etc/vnstat.conf + + newconfd "${FILESDIR}"/vnstatd.confd vnstatd + newinitd "${FILESDIR}"/vnstatd.initd-r1 vnstatd + + use gd && doman man/vnstati.1 + doman man/vnstat.1 man/vnstatd.1 + + newdoc INSTALL README.setup + dodoc CHANGES README UPGRADE FAQ examples/vnstat.cgi +} |