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/darkstat | |
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/darkstat')
-rw-r--r-- | net-analyzer/darkstat/Manifest | 2 | ||||
-rw-r--r-- | net-analyzer/darkstat/darkstat-3.0.718.ebuild | 62 | ||||
-rw-r--r-- | net-analyzer/darkstat/darkstat-3.0.719.ebuild | 62 | ||||
-rw-r--r-- | net-analyzer/darkstat/files/darkstat-confd | 27 | ||||
-rw-r--r-- | net-analyzer/darkstat/files/darkstat-initd | 59 | ||||
-rw-r--r-- | net-analyzer/darkstat/metadata.xml | 10 |
6 files changed, 222 insertions, 0 deletions
diff --git a/net-analyzer/darkstat/Manifest b/net-analyzer/darkstat/Manifest new file mode 100644 index 000000000000..55050ea72d0e --- /dev/null +++ b/net-analyzer/darkstat/Manifest @@ -0,0 +1,2 @@ +DIST darkstat-3.0.718.tar.bz2 116044 SHA256 682f3e53f4e89ea6ad08236b4225a5e0859428299765d8d995374cd7fa22adff SHA512 73ed670a9c684b2f0b087da3f238c2828407c82201d1bff945a3d711bbaa231b9d87ddc9e21aa855abcd7d63c27f8f529f5a2c6fb48f52a3f0b6e88c49d33969 WHIRLPOOL 9e91c4508dc43ea5c59b10c51b1b345a4bcf31befa532a94ba435b10f8b63a2fd3e2e8775b67a40e48dcf0e91f71c7ccc191a78d337990990761671f8aa4377f +DIST darkstat-3.0.719.tar.bz2 117695 SHA256 aeaf909585f7f43dc032a75328fdb62114e58405b06a92a13c0d3653236dedd7 SHA512 264f6c5f862745fbfb5d125aae5a319369f028fd7be96cfb12775147f528a36b7f5a42bcd6434f2d376933292364641f2ec9cd9bdb1fe105f5a905e331181f98 WHIRLPOOL 95fc7c383bd814bbf6ff022d97df839eeaeafffb75b2c9bdb5b833d9bc7abfabaded5a1c5d145f5f1c5a4f45566e442f060a91ee4366a20ac096ad6fb4e09520 diff --git a/net-analyzer/darkstat/darkstat-3.0.718.ebuild b/net-analyzer/darkstat/darkstat-3.0.718.ebuild new file mode 100644 index 000000000000..d70afed591f0 --- /dev/null +++ b/net-analyzer/darkstat/darkstat-3.0.718.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit autotools eutils user + +DESCRIPTION="Network traffic analyzer with cute web interface" +HOMEPAGE="http://unix4lyfe.org/darkstat/" +SRC_URI="http://unix4lyfe.org/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" + +DEPEND="net-libs/libpcap" +RDEPEND="${DEPEND}" + +DARKSTAT_CHROOT_DIR=${DARKSTAT_CHROOT_DIR:-/var/lib/darkstat} + +DOCS=( AUTHORS ChangeLog README NEWS ) + +src_prepare() { + sed -i -e 's|-flto||g' configure.ac || die + epatch_user + eautoreconf +} + +src_configure() { + econf --disable-debug --with-privdrop-user=darkstat +} + +src_install() { + default + + newinitd "${FILESDIR}"/darkstat-initd darkstat + newconfd "${FILESDIR}"/darkstat-confd darkstat + + sed -i -e "s:__CHROOT__:${DARKSTAT_CHROOT_DIR}:g" "${D}"/etc/conf.d/darkstat || die + sed -i -e "s:__CHROOT__:${DARKSTAT_CHROOT_DIR}:g" "${D}"/etc/init.d/darkstat || die + + keepdir "${DARKSTAT_CHROOT_DIR}" + chown darkstat:0 "${D}${DARKSTAT_CHROOT_DIR}" +} + +pkg_preinst() { + enewuser darkstat +} + +pkg_postinst() { + # Workaround bug #141619 + DARKSTAT_CHROOT_DIR=`sed -n 's/^#CHROOT=\(.*\)/\1/p' "${ROOT}"etc/conf.d/darkstat` + chown darkstat:0 "${ROOT}${DARKSTAT_CHROOT_DIR}" + + elog "To start different darkstat instances which will listen on a different" + elog "interfaces create in /etc/init.d directory the 'darkstat.if' symlink to" + elog "darkstat script where 'if' is the name of the interface." + elog "Also in /etc/conf.d directory copy darkstat to darkstat.if" + elog "and edit it to change default values." + elog + elog "darkstat's default chroot directory is: \"${ROOT}${DARKSTAT_CHROOT_DIR}\"" +} diff --git a/net-analyzer/darkstat/darkstat-3.0.719.ebuild b/net-analyzer/darkstat/darkstat-3.0.719.ebuild new file mode 100644 index 000000000000..ddfcbaaeb099 --- /dev/null +++ b/net-analyzer/darkstat/darkstat-3.0.719.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit autotools eutils user + +DESCRIPTION="Network traffic analyzer with cute web interface" +HOMEPAGE="http://unix4lyfe.org/darkstat/" +SRC_URI="http://unix4lyfe.org/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +DEPEND="net-libs/libpcap" +RDEPEND="${DEPEND}" + +DARKSTAT_CHROOT_DIR=${DARKSTAT_CHROOT_DIR:-/var/lib/darkstat} + +DOCS=( AUTHORS ChangeLog README NEWS ) + +src_prepare() { + sed -i -e 's|-flto||g' configure.ac || die + epatch_user + eautoreconf +} + +src_configure() { + econf --disable-debug --with-privdrop-user=darkstat +} + +src_install() { + default + + newinitd "${FILESDIR}"/darkstat-initd darkstat + newconfd "${FILESDIR}"/darkstat-confd darkstat + + sed -i -e "s:__CHROOT__:${DARKSTAT_CHROOT_DIR}:g" "${D}"/etc/conf.d/darkstat || die + sed -i -e "s:__CHROOT__:${DARKSTAT_CHROOT_DIR}:g" "${D}"/etc/init.d/darkstat || die + + keepdir "${DARKSTAT_CHROOT_DIR}" + chown darkstat:0 "${D}${DARKSTAT_CHROOT_DIR}" +} + +pkg_preinst() { + enewuser darkstat +} + +pkg_postinst() { + # Workaround bug #141619 + DARKSTAT_CHROOT_DIR=`sed -n 's/^#CHROOT=\(.*\)/\1/p' "${ROOT}"etc/conf.d/darkstat` + chown darkstat:0 "${ROOT}${DARKSTAT_CHROOT_DIR}" + + elog "To start different darkstat instances which will listen on a different" + elog "interfaces create in /etc/init.d directory the 'darkstat.if' symlink to" + elog "darkstat script where 'if' is the name of the interface." + elog "Also in /etc/conf.d directory copy darkstat to darkstat.if" + elog "and edit it to change default values." + elog + elog "darkstat's default chroot directory is: \"${ROOT}${DARKSTAT_CHROOT_DIR}\"" +} diff --git a/net-analyzer/darkstat/files/darkstat-confd b/net-analyzer/darkstat/files/darkstat-confd new file mode 100644 index 000000000000..3d95a0461a06 --- /dev/null +++ b/net-analyzer/darkstat/files/darkstat-confd @@ -0,0 +1,27 @@ +# The interface to listen on +# Use only with /etc/init.d/darkstat init script. If you use +# /etc/init.d/darkstat.if init script, then this option should be ignored. +#INTERFACE="eth0" + +# The port for the embedded webserver +#PORT="667" + +# The address embedded webserver should bind to +#ADDRESS="0.0.0.0" + +# Set the filter. See tcpdump documenation for details. +#FILTER="" + +# Log daily traffic statistics into the named file, relative to the +# chroot directory (see, below). +#DAYLOGFILE="darkstat.log" + +# Other options: +DARKSTAT_OPTS="--no-promisc --no-dns --user darkstat" + +# The directory to which the program chroots after initialization. +# If you change this, please note the variable below and adjust +# the permissions accordingly. Note that if you want to use the +# --daylog option in EXTRAOPTS, the files are logged relative +# to the chroot-directory; see the man-page for details. +#CHROOT=__CHROOT__ diff --git a/net-analyzer/darkstat/files/darkstat-initd b/net-analyzer/darkstat/files/darkstat-initd new file mode 100644 index 000000000000..0f2fb5e863b1 --- /dev/null +++ b/net-analyzer/darkstat/files/darkstat-initd @@ -0,0 +1,59 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +IF=${SVCNAME##*.} + +if [ -n "${IF}" -a "${SVCNAME}" != "darkstat" ] ; then + PIDFILE=/run/darkstat.${IF}.pid +else + PIDFILE=/run/darkstat.pid +fi + +depend() { + need net +} + +chkconfig() { + if [ -n "${IF}" -a "${SVCNAME}" != "darkstat" ] ; then + if [ ! -f "/etc/conf.d/darkstat.${IF}" ] ; then + einfo "It's possible to have distinct config in /etc/conf.d/darkstat.${IF}." + fi + INTERFACE=${IF} + else + if [ ! -f "/etc/conf.d/darkstat" ] ; then + ewarn "/etc/conf.d/darkstat does not exist. Falling on defaults." + fi + fi + + if [ -z "${INTERFACE}" ]; then + ewarn "No interface specified. Trying to use eth0." + INTERFACE="eth0" + fi + + DARK_OPTS="-i ${INTERFACE}" + [ -n "${PORT}" ] && DARK_OPTS="${DARK_OPTS} -p ${PORT}" + [ -n "${ADDRESS}" ] && DARK_OPTS="${DARK_OPTS} -b ${ADDRESS}" + [ -n "${DAYLOGFILE}" ] && DARK_OPTS="${DARK_OPTS} --daylog ${DAYLOGFILE}" + + return 0 +} + +start() { + chkconfig || return 1 + + # If ${PIDFILE} exist darkstat fails to start + [ -f ${PIDFILE} ] && rm ${PIDFILE} + ebegin "Starting darkstat on ${INTERFACE}" + /sbin/start-stop-daemon --start --exec /usr/sbin/darkstat -- \ + --chroot "${CHROOT:-__CHROOT__}" --pidfile ${PIDFILE} \ + ${DARKSTAT_OPTS} ${DARK_OPTS} -f "${FILTER}" + eend $? +} + +stop() { + ebegin "Stopping darkstat on ${INTERFACE}" + /sbin/start-stop-daemon --stop --pidfile ${PIDFILE} + eend $? +} diff --git a/net-analyzer/darkstat/metadata.xml b/net-analyzer/darkstat/metadata.xml new file mode 100644 index 000000000000..ef4d76a6dd9b --- /dev/null +++ b/net-analyzer/darkstat/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>netmon</herd> + <longdescription lang="en"> + darkstat is a network statistics gatherer. It's a packet sniffer that + runs as a background process on a cable/DSL router, gathers all sorts of + statistics about network usage, and serves them over HTTP. + </longdescription> +</pkgmetadata> |