diff options
author | Peter Volkov <pva@gentoo.org> | 2007-11-03 17:33:26 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2007-11-03 17:33:26 +0000 |
commit | 7cf871d61f01778a344f0a66ac3f7aaf495fe767 (patch) | |
tree | 9f853e00b2cb65c6db20ba9405054d7469cc9842 /net-analyzer | |
parent | Fix to add -fPIC to EXTRAFLAGS from upstream Subversion. Fix also building wi... (diff) | |
download | historical-7cf871d61f01778a344f0a66ac3f7aaf495fe767.tar.gz historical-7cf871d61f01778a344f0a66ac3f7aaf495fe767.tar.bz2 historical-7cf871d61f01778a344f0a66ac3f7aaf495fe767.zip |
Fixes init script and ebuild cleanups. Fixes bug #194650, thank Tiger <marchaldoneway AT hotmail.fr> for report and help.
Package-Manager: portage-2.1.3.16
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/darkstat/ChangeLog | 9 | ||||
-rw-r--r-- | net-analyzer/darkstat/Manifest | 33 | ||||
-rw-r--r-- | net-analyzer/darkstat/darkstat-3.0.707-r1.ebuild | 59 | ||||
-rw-r--r-- | net-analyzer/darkstat/files/darkstat-confd.new | 27 | ||||
-rw-r--r-- | net-analyzer/darkstat/files/darkstat-init.new | 59 | ||||
-rw-r--r-- | net-analyzer/darkstat/files/digest-darkstat-3.0.707-r1 | 3 |
6 files changed, 175 insertions, 15 deletions
diff --git a/net-analyzer/darkstat/ChangeLog b/net-analyzer/darkstat/ChangeLog index c0b0b447465a..7618898c6507 100644 --- a/net-analyzer/darkstat/ChangeLog +++ b/net-analyzer/darkstat/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-analyzer/darkstat # Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/darkstat/ChangeLog,v 1.26 2007/11/01 13:29:39 jokey Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/darkstat/ChangeLog,v 1.27 2007/11/03 17:33:26 pva Exp $ + +*darkstat-3.0.707-r1 (03 Nov 2007) + + 03 Nov 2007; <pva@gentoo.org> +files/darkstat-confd.new, + +files/darkstat-init.new, +darkstat-3.0.707-r1.ebuild: + Fixes init script and ebuild cleanups. Fixes bug #194650, thank Tiger + <marchaldoneway AT hotmail.fr> for report and help. *darkstat-3.0.707 (01 Nov 2007) diff --git a/net-analyzer/darkstat/Manifest b/net-analyzer/darkstat/Manifest index 148f182a447f..2479a948d84e 100644 --- a/net-analyzer/darkstat/Manifest +++ b/net-analyzer/darkstat/Manifest @@ -1,10 +1,11 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX darkstat-confd 370 RMD160 8b1d0d49d166d838ec2c0edf013baf6fc5778f85 SHA1 4d727d1c474204133031dd90594376303713ba18 SHA256 76f5ba28a04dbf578bd1ed3b40831eaa4a17813de5f270d05b149eaa40ed622e MD5 5f93f0d6f8195564db2a529bf1a85e55 files/darkstat-confd 370 RMD160 8b1d0d49d166d838ec2c0edf013baf6fc5778f85 files/darkstat-confd 370 SHA256 76f5ba28a04dbf578bd1ed3b40831eaa4a17813de5f270d05b149eaa40ed622e files/darkstat-confd 370 +AUX darkstat-confd.new 906 RMD160 8fed2a859d5caf2dca94917699b6daf275e808e9 SHA1 ebaca04fdfc94cb7eedcc2b80b510bb84b3c7577 SHA256 428e5570b02cd3515949a65bee4d92b22e492435e7833b108fd67aab218eaeed +MD5 cf26cef6f724ddb702aaeea746566ab6 files/darkstat-confd.new 906 +RMD160 8fed2a859d5caf2dca94917699b6daf275e808e9 files/darkstat-confd.new 906 +SHA256 428e5570b02cd3515949a65bee4d92b22e492435e7833b108fd67aab218eaeed files/darkstat-confd.new 906 AUX darkstat-confd2 429 RMD160 552993ae6e6ae2c98008784a0a64580b45b8ff1c SHA1 e0dc4cac6a44860f6868f95e5b8bec23763deb27 SHA256 3194336efeff069fdc6dd853190bb26f0a49819455ae214fdf355afee2835186 MD5 fa204e41a06f8f0cb11ce7bab40f736c files/darkstat-confd2 429 RMD160 552993ae6e6ae2c98008784a0a64580b45b8ff1c files/darkstat-confd2 429 @@ -13,6 +14,10 @@ AUX darkstat-init 1543 RMD160 726e65702c2d9586f5a19fca3d1da3ea4274aed8 SHA1 595f MD5 41a8e29d2c4341f28f05f4ac3ab47edd files/darkstat-init 1543 RMD160 726e65702c2d9586f5a19fca3d1da3ea4274aed8 files/darkstat-init 1543 SHA256 feec5b290774634ecfbd848e67c97ed9ddc508ab30a74f03f953d5c5392a40f4 files/darkstat-init 1543 +AUX darkstat-init.new 1585 RMD160 5ebf828e4278d2eb11467e7cec40bce20f888ace SHA1 3b8dac3f4bedd8a8ea6ac7e255ddcf5bef86b93b SHA256 f77a63243a170ade06893340e1499c984d971564a80de8903db382efb4b29b98 +MD5 e224694a0a5841d62f14912420b70b96 files/darkstat-init.new 1585 +RMD160 5ebf828e4278d2eb11467e7cec40bce20f888ace files/darkstat-init.new 1585 +SHA256 f77a63243a170ade06893340e1499c984d971564a80de8903db382efb4b29b98 files/darkstat-init.new 1585 AUX darkstat-init2 1529 RMD160 c7ebe02fb9b183efc8fe19f0840140a66e4f0409 SHA1 3805ea0d2f6217f57c460854b86eb3788422360d SHA256 575144945064e4b95716fdb99d93181b0ae1fedd4bd6ea14e5b7be3bf0ebd5dd MD5 45d7752ab9dc446111e98c2ef08a9fab files/darkstat-init2 1529 RMD160 c7ebe02fb9b183efc8fe19f0840140a66e4f0409 files/darkstat-init2 1529 @@ -23,14 +28,18 @@ EBUILD darkstat-3.0.540-r1.ebuild 1231 RMD160 891777bed4a42af6615a1bc2a79b9fd1f3 MD5 af217e7194cdf70f8ea0bfc94b6bfd4c darkstat-3.0.540-r1.ebuild 1231 RMD160 891777bed4a42af6615a1bc2a79b9fd1f3dc0905 darkstat-3.0.540-r1.ebuild 1231 SHA256 af647c10f3681d4610371b7a11faa26c477eae87a722f51efc2e07fbc2a2b082 darkstat-3.0.540-r1.ebuild 1231 +EBUILD darkstat-3.0.707-r1.ebuild 1892 RMD160 54c4627b155e372f9170fbbf8418c8d7b8e8220c SHA1 7d338dfe8b4cee94714378d0a3fbb283e39a1ec6 SHA256 29b1f4bfe0951738a4db0de7c29896537869c61bb77d3ca20c64885a4c8eaa1a +MD5 c9d1657225e49ccf8136b6af71b5ccfd darkstat-3.0.707-r1.ebuild 1892 +RMD160 54c4627b155e372f9170fbbf8418c8d7b8e8220c darkstat-3.0.707-r1.ebuild 1892 +SHA256 29b1f4bfe0951738a4db0de7c29896537869c61bb77d3ca20c64885a4c8eaa1a darkstat-3.0.707-r1.ebuild 1892 EBUILD darkstat-3.0.707.ebuild 1180 RMD160 435644fd44c4da58774e19bc78a50929d888c17f SHA1 c7e5553f10fbbbb373ec6fd144e75e06537e0032 SHA256 d0e3ed4f2d7595d2fe3efe7f9a44ba93887c4ca04ae50335ee0609709fd4893e MD5 c246a6cb1f3db0e582159b130e477227 darkstat-3.0.707.ebuild 1180 RMD160 435644fd44c4da58774e19bc78a50929d888c17f darkstat-3.0.707.ebuild 1180 SHA256 d0e3ed4f2d7595d2fe3efe7f9a44ba93887c4ca04ae50335ee0609709fd4893e darkstat-3.0.707.ebuild 1180 -MISC ChangeLog 4372 RMD160 9a7e60cd91fe5a890607e1f7e76d2fe96bdf89ce SHA1 481fbe1aabc9ba8d6f9cb37c4ac1b0af44b577a3 SHA256 8ae65f7cb8c605696c9ed9e646fe9c62718f8bff17a32eb9db954ec0eb2d2dd8 -MD5 e5871f946f5c0458ba2dd73bb7287dbb ChangeLog 4372 -RMD160 9a7e60cd91fe5a890607e1f7e76d2fe96bdf89ce ChangeLog 4372 -SHA256 8ae65f7cb8c605696c9ed9e646fe9c62718f8bff17a32eb9db954ec0eb2d2dd8 ChangeLog 4372 +MISC ChangeLog 4649 RMD160 915f2a40a7dd86ed636f1260b5d153efc877c610 SHA1 d3c18bc84905fa2b0877d9061e30ea217e754f54 SHA256 127dc117484487a46467a45a6b1645143cd1a36c979b2391b9b0d42fd62f1d61 +MD5 18918aaad7c047e75f3038f4b27f50e2 ChangeLog 4649 +RMD160 915f2a40a7dd86ed636f1260b5d153efc877c610 ChangeLog 4649 +SHA256 127dc117484487a46467a45a6b1645143cd1a36c979b2391b9b0d42fd62f1d61 ChangeLog 4649 MISC metadata.xml 416 RMD160 7a1aac0409b8ad203481db42ac8eb25cb80f6098 SHA1 6463fd6350fe4328e2fba923af331eafc20b143b SHA256 3c66778a80a6824b46fe9980054c9b929a206d3a4a36d51bc90f5587f4e48f1c MD5 5cd395379ed4ed5b912822c5bd708996 metadata.xml 416 RMD160 7a1aac0409b8ad203481db42ac8eb25cb80f6098 metadata.xml 416 @@ -41,10 +50,6 @@ SHA256 500edb09df8aed07d6e8ed201c28b8da26d210c9cc211af98521704c1cb0aee4 files/di MD5 d803c66ed5428dca21593e135713d9ef files/digest-darkstat-3.0.707 250 RMD160 0834aab7ad91e9ef447a0639dd132c13edce1fda files/digest-darkstat-3.0.707 250 SHA256 20fb706c14ead93e9773883a5a7f1efe2ee8b2fa539cb07e79e9effaaa5d79ef files/digest-darkstat-3.0.707 250 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.7 (GNU/Linux) - -iD8DBQFHKdTNz974XjDVpbkRAuUiAJ4u3OsMJ4wESiJmoC6pZbhE7fAzPACfUtAK -Qfr5HtHtlE9XmiBhwqhDhHY= -=6b7t ------END PGP SIGNATURE----- +MD5 d803c66ed5428dca21593e135713d9ef files/digest-darkstat-3.0.707-r1 250 +RMD160 0834aab7ad91e9ef447a0639dd132c13edce1fda files/digest-darkstat-3.0.707-r1 250 +SHA256 20fb706c14ead93e9773883a5a7f1efe2ee8b2fa539cb07e79e9effaaa5d79ef files/digest-darkstat-3.0.707-r1 250 diff --git a/net-analyzer/darkstat/darkstat-3.0.707-r1.ebuild b/net-analyzer/darkstat/darkstat-3.0.707-r1.ebuild new file mode 100644 index 000000000000..4f285c071fc9 --- /dev/null +++ b/net-analyzer/darkstat/darkstat-3.0.707-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/darkstat/darkstat-3.0.707-r1.ebuild,v 1.1 2007/11/03 17:33:26 pva Exp $ + +inherit eutils + +DESCRIPTION="darkstat is a network traffic analyzer" +HOMEPAGE="http://dmr.ath.cx/net/darkstat/" +SRC_URI="http://dmr.ath.cx/net/darkstat/${P}.tar.bz2" + +KEYWORDS="~amd64 ~ppc ~ppc-macos ~x86" +IUSE="" +LICENSE="GPL-2" +SLOT="0" + +DEPEND="net-libs/libpcap" + +DARKSTAT_CHROOT_DIR=${DARKSTAT_CHROOT_DIR:-/var/lib/darkstat} + +src_compile() { + econf --with-privdrop-user=darkstat \ + --with-chroot-dir="${DARKSTAT_CHROOT_DIR}" || die "./configure failed" + emake || die "compilation failed." +} + +src_install() { + emake DESTDIR="${D}" install || die "installation failed." + + dodoc AUTHORS README THANKS NEWS + + newinitd "${FILESDIR}"/darkstat-init.new darkstat + newconfd "${FILESDIR}"/darkstat-confd.new darkstat + + sed -i -e "s:__CHROOT__:${DARKSTAT_CHROOT_DIR}:g" "${D}"/etc/conf.d/darkstat + sed -i -e "s:__CHROOT__:${DARKSTAT_CHROOT_DIR}:g" "${D}"/etc/init.d/darkstat + + keepdir "${DARKSTAT_CHROOT_DIR}" + chown darkstat:0 "${D}${DARKSTAT_CHROOT_DIR}" +} + +pkg_preinst() { + enewuser darkstat || die "Failed to add user darkstat" +} + +pkg_postinst() { + # Workaround bug #141619 + DARKSTAT_CHROOT_DIR=`sed -n 's/^#CHROOT=\(.*\)/\1/p' /etc/conf.d/darkstat` + chown darkstat:0 "${DARKSTAT_CHROOT_DIR}" + + elog "WARNING: the darkstat init script has changed" + 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: ${DARKSTAT_CHROOT_DIR}" +} + diff --git a/net-analyzer/darkstat/files/darkstat-confd.new b/net-analyzer/darkstat/files/darkstat-confd.new new file mode 100644 index 000000000000..3d95a0461a06 --- /dev/null +++ b/net-analyzer/darkstat/files/darkstat-confd.new @@ -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-init.new b/net-analyzer/darkstat/files/darkstat-init.new new file mode 100644 index 000000000000..c25a1174dae0 --- /dev/null +++ b/net-analyzer/darkstat/files/darkstat-init.new @@ -0,0 +1,59 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/darkstat/files/darkstat-init.new,v 1.1 2007/11/03 17:33:26 pva Exp $ + +IF=${SVCNAME##*.} + +if [ -n "${IF}" -a "${SVCNAME}" != "darkstat" ] ; then + PIDFILE=/var/run/darkstat.${IF}.pid +else + PIDFILE=/var/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/files/digest-darkstat-3.0.707-r1 b/net-analyzer/darkstat/files/digest-darkstat-3.0.707-r1 new file mode 100644 index 000000000000..4c88a03f54d0 --- /dev/null +++ b/net-analyzer/darkstat/files/digest-darkstat-3.0.707-r1 @@ -0,0 +1,3 @@ +MD5 91c70f96498dd679b21330214361e4dc darkstat-3.0.707.tar.bz2 90459 +RMD160 91a19ef837a58f6b464cc24c4dc34bcb8ef15a59 darkstat-3.0.707.tar.bz2 90459 +SHA256 243bd77f93acbb6832f5ef1cc4b03abe823006c129f88fe5724697e1c0857644 darkstat-3.0.707.tar.bz2 90459 |