diff options
author | Peter Volkov <pva@gentoo.org> | 2006-09-23 19:10:29 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2006-09-23 19:10:29 +0000 |
commit | 783bc6cc6b4dcfd970d5ced0bd620c5e74313a0d (patch) | |
tree | cc690c5710263851f83e444eb06148f1f5e1597c /net-analyzer/arpwatch | |
parent | Revbump to fix various bugs. (diff) | |
download | gentoo-2-783bc6cc6b4dcfd970d5ced0bd620c5e74313a0d.tar.gz gentoo-2-783bc6cc6b4dcfd970d5ced0bd620c5e74313a0d.tar.bz2 gentoo-2-783bc6cc6b4dcfd970d5ced0bd620c5e74313a0d.zip |
Fixed -u.Thank Rajiv Aaron Manglani for report in bug #147090. Also fixed deadlock cased by call of non-reentrant function in signal callback.
(Portage version: 2.1.1)
Diffstat (limited to 'net-analyzer/arpwatch')
-rw-r--r-- | net-analyzer/arpwatch/ChangeLog | 9 | ||||
-rw-r--r-- | net-analyzer/arpwatch/arpwatch-2.1.15-r1.ebuild | 81 | ||||
-rw-r--r-- | net-analyzer/arpwatch/files/arpwatch.confd-2 | 9 | ||||
-rw-r--r-- | net-analyzer/arpwatch/files/arpwatch.init-2 | 36 | ||||
-rw-r--r-- | net-analyzer/arpwatch/files/digest-arpwatch-2.1.15-r1 | 6 | ||||
-rw-r--r-- | net-analyzer/arpwatch/metadata.xml | 4 |
6 files changed, 144 insertions, 1 deletions
diff --git a/net-analyzer/arpwatch/ChangeLog b/net-analyzer/arpwatch/ChangeLog index 62a6340dbd7f..28b84100ec51 100644 --- a/net-analyzer/arpwatch/ChangeLog +++ b/net-analyzer/arpwatch/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-analyzer/arpwatch # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/arpwatch/ChangeLog,v 1.28 2006/09/14 22:28:10 gustavoz Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/arpwatch/ChangeLog,v 1.29 2006/09/23 19:10:29 pva Exp $ + +*arpwatch-2.1.15-r1 (23 Sep 2006) + + 23 Sep 2006; Peter Volkov <pva@gentoo.org> +files/arpwatch.confd-2, + +files/arpwatch.init-2, metadata.xml, +arpwatch-2.1.15-r1.ebuild: + Fixed -u.Thank Rajiv Aaron Manglani for report in bug #147090. Also fixed + deadlock cased by call of non-reentrant function in signal callback. 14 Sep 2006; Gustavo Zacarias <gustavoz@gentoo.org> arpwatch-2.1.13-r3.ebuild: diff --git a/net-analyzer/arpwatch/arpwatch-2.1.15-r1.ebuild b/net-analyzer/arpwatch/arpwatch-2.1.15-r1.ebuild new file mode 100644 index 000000000000..7740bd0e5b2a --- /dev/null +++ b/net-analyzer/arpwatch/arpwatch-2.1.15-r1.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/arpwatch/arpwatch-2.1.15-r1.ebuild,v 1.1 2006/09/23 19:10:29 pva Exp $ + +inherit eutils versionator + +PATCH_VER="0.1" + +MY_P="${PN}-$(replace_version_separator 2 'a')" +DESCRIPTION="An ethernet monitor program that keeps track of ethernet/ip address pairings" +HOMEPAGE="http://www-nrg.ee.lbl.gov/" +SRC_URI="ftp://ftp.ee.lbl.gov/${MY_P}.tar.gz + mirror://gentoo/arpwatch-patchset-${PATCH_VER}.tbz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86" +IUSE="selinux" + +DEPEND="virtual/libpcap + sys-libs/ncurses" + +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-arpwatch )" + +S="${WORKDIR}/${MY_P}" + +src_unpack() { + unpack ${A} + cd "${S}" + + EPATCH_SOURCE="${WORKDIR}"/arpwatch-patchset/ + EPATCH_SUFFIX="patch" + epatch + mv "${WORKDIR}"/arpwatch-patchset/*.8 . +} + +src_compile() { + econf || die "econf failed" + emake || die "emake failed" +} + +src_install () { + dosbin arpwatch arpsnmp arp2ethers massagevendor arpfetch bihourly.sh + doman arpwatch.8 arpsnmp.8 arp2ethers.8 massagevendor.8 arpfetch.8 bihourly.8 + + insinto /usr/share/arpwatch + doins ethercodes.dat + + insinto /usr/share/arpwatch/awk + doins duplicates.awk euppertolower.awk p.awk e.awk d.awk + + keepdir /var/lib/arpwatch + dodoc README CHANGES + + newinitd "${FILESDIR}"/arpwatch.init-2 arpwatch + newconfd "${FILESDIR}"/arpwatch.confd-2 arpwatch +} + +pkg_config() { + enewgroup arpwatch + enewuser arpwatch -1 -1 /var/lib/arpwatch arpwatch + + einfo "Setting permitions for data directory" + chown -R arpwatch:arpwatch /var/lib/arpwatch + + cat >> /etc/conf.d/arpwatch << EOF + +# Uncomment this line if you wish arpwatch to drop privileges. +ARPUSER="arpwatch" +EOF + einfo "Done." +} + +pkg_postinst() { + elog "For security reasons it is better to run arpwatch as an unprivileged user." + elog "If you wish to do so, please, run:" + elog " emerge --config arpwatch" + echo + ewarn "Note: some scripts require snmpwalk utility from net-analyzer/net-snmp" +} diff --git a/net-analyzer/arpwatch/files/arpwatch.confd-2 b/net-analyzer/arpwatch/files/arpwatch.confd-2 new file mode 100644 index 000000000000..960454e79d79 --- /dev/null +++ b/net-analyzer/arpwatch/files/arpwatch.confd-2 @@ -0,0 +1,9 @@ +# Config file for /etc/init.d/arpwatch +# see arpwatch.8 for more information +# execute `emerge --config arpwatch` to configure arpwatch runas unprivileged user. + +#IFACES="eth0 eth1" +IFACES="eth0" + +# Additional options to pass to arpwatch. +OPTIONS="-N -p" diff --git a/net-analyzer/arpwatch/files/arpwatch.init-2 b/net-analyzer/arpwatch/files/arpwatch.init-2 new file mode 100644 index 000000000000..15ae358e6bc9 --- /dev/null +++ b/net-analyzer/arpwatch/files/arpwatch.init-2 @@ -0,0 +1,36 @@ +#!/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/arpwatch/files/arpwatch.init-2,v 1.1 2006/09/23 19:10:29 pva Exp $ + +depend() { + need net +} + +start() { + for IFACE in ${IFACES} + do + ebegin "Starting arpwatch on ${IFACE}" + DATAFILE=/var/lib/arpwatch/${IFACE}.dat + [ ! -f ${DATAFILE} ] && touch ${DATAFILE} + + if [ -z ${ARPUSER} ]; then + start-stop-daemon --start --quiet --pidfile=/var/run/arpwatch.${IFACE}.pid --exec \ + /usr/sbin/arpwatch -- -i ${IFACE} -f ${DATAFILE} ${OPTIONS} + else + start-stop-daemon --start --quiet --pidfile=/var/run/arpwatch.${IFACE}.pid --exec \ + /usr/sbin/arpwatch -- -i $IFACE -u ${ARPUSER} -f ${DATAFILE} ${OPTIONS} + fi + eend $? + done +} + +stop() { + for IFACE in ${IFACES} + do + ebegin "Stopping arpwatch on ${IFACE}" + start-stop-daemon --stop --quiet --pidfile=/var/run/arpwatch.${IFACE}.pid --exec \ + /usr/sbin/arpwatch + eend $? + done +} diff --git a/net-analyzer/arpwatch/files/digest-arpwatch-2.1.15-r1 b/net-analyzer/arpwatch/files/digest-arpwatch-2.1.15-r1 new file mode 100644 index 000000000000..a851e3f042c4 --- /dev/null +++ b/net-analyzer/arpwatch/files/digest-arpwatch-2.1.15-r1 @@ -0,0 +1,6 @@ +MD5 cebfeb99c4a7c2a6cee2564770415fe7 arpwatch-2.1a15.tar.gz 202729 +RMD160 a27ee53275dcec3cafb85eb3df2451d42ec32b0c arpwatch-2.1a15.tar.gz 202729 +SHA256 c1df9737e208a96a61fa92ddad83f4b4d9be66f8992f3c917e9edf4b05ff5898 arpwatch-2.1a15.tar.gz 202729 +MD5 b82bd7155cf0226d7ca591c60cdc5e18 arpwatch-patchset-0.1.tbz2 14725 +RMD160 00143bb028b4c238b12715dfd40b74f247915cee arpwatch-patchset-0.1.tbz2 14725 +SHA256 5860d6eaba671c2e61dfa843fb103f6d86190ef2040c8eb2fb298d237af53976 arpwatch-patchset-0.1.tbz2 14725 diff --git a/net-analyzer/arpwatch/metadata.xml b/net-analyzer/arpwatch/metadata.xml index 4fc697499bf6..491bce7b2309 100644 --- a/net-analyzer/arpwatch/metadata.xml +++ b/net-analyzer/arpwatch/metadata.xml @@ -2,6 +2,10 @@ <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <herd>netmon</herd> + <maintainer> + <email>pva@gentoo.org</email> + <name>Peter Volkov</name> + </maintainer> <longdescription lang="en"> The arpwatch package contains arpwatch and arpsnmp. Arpwatch and arpsnmp are both network monitoring tools. Both utilities monitor Ethernet or |