From 90c88731bd036e5698b281fbc0a5f3aa4c9983ac Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 29 Jun 2020 11:38:31 +0100 Subject: gentoo resync : 29.06.2020 --- net-analyzer/arpwatch/Manifest | 9 ++- net-analyzer/arpwatch/arpwatch-2.1.15-r11.ebuild | 2 +- net-analyzer/arpwatch/arpwatch-3.1.ebuild | 81 ++++++++++++++++++++++++ net-analyzer/arpwatch/files/arpwatch.confd | 11 ---- net-analyzer/arpwatch/files/arpwatch.confd-r2 | 18 ++++++ net-analyzer/arpwatch/files/arpwatch.initd | 36 ----------- net-analyzer/arpwatch/files/arpwatch.initd-r2 | 33 ++++++++++ 7 files changed, 139 insertions(+), 51 deletions(-) create mode 100644 net-analyzer/arpwatch/arpwatch-3.1.ebuild delete mode 100644 net-analyzer/arpwatch/files/arpwatch.confd create mode 100644 net-analyzer/arpwatch/files/arpwatch.confd-r2 delete mode 100644 net-analyzer/arpwatch/files/arpwatch.initd create mode 100644 net-analyzer/arpwatch/files/arpwatch.initd-r2 (limited to 'net-analyzer/arpwatch') diff --git a/net-analyzer/arpwatch/Manifest b/net-analyzer/arpwatch/Manifest index d1e90bb65f48..d1db983c1938 100644 --- a/net-analyzer/arpwatch/Manifest +++ b/net-analyzer/arpwatch/Manifest @@ -1,8 +1,11 @@ -AUX arpwatch.confd 270 BLAKE2B 753b8fc9651840db98c41476e98674696412c53cf733724f84ccc10ebf3d8b8f5be6da0dc726adc0a6861ea04bdcbafe22d99dde707190629dba32264e49c474 SHA512 901375c1031c776f159cc526662e727be41dd9630037a492b718c9cc48d2fb580b22bcdf90a84a02049924e67fb84a2668e3519a7ab24e6c8ad07d20cc5adf41 AUX arpwatch.confd-r1 559 BLAKE2B 291acbd1ebf7ab4f9f6ca19dfe1b445fc610c1b0961c895f5ccee3fe25e0536ef81e2530ff2151dceb52d113d1e13ab9185a0d83577d9258d57613112bb616d7 SHA512 d1fc4993db4b9a1e11fee0629b92b6372266085551e6e89f5f33a9dd092ee70087f2766c46cb983040917c47e478c0c8206efd1b9fde8d030a3e249c28970c9c -AUX arpwatch.initd 991 BLAKE2B db231172f24c10bcff5c78d081c7de0918c10878e47fccbc9c4ea73d6b70404308864de5822ae97c0c1c94d6b17cc8c183807c33db7140e1ecae88b9df79ea3c SHA512 de62ab2026bb04f557731b741023b6fc2333656f4709226459e8bb17fee2959ad9e24077eae730443efa3736b6f0268c474ca65905c371d228c2f2869ec4986e +AUX arpwatch.confd-r2 577 BLAKE2B 5876819ee028fe4a77ffca0e359d73492bc6ff82ad89f7ad24e38b9167c6d7858ae186115ac3fe0d594a93e0197fd2eea0daea5c0d49674b0770836d7cb2fb68 SHA512 9d6086f9e1bd27976117b408e1a604b9544a5acf80cf69cbac00516fe36f93dd600a2876039dbfa023b12a35d01439fe25845304474add1bfa059c97383aae7c AUX arpwatch.initd-r1 752 BLAKE2B ba0adcdc9c02ff0b60c46f9bd98c100171b365ca4d50f9345b0d9b983aeb299e51849eb04b0df0627252ab65db1adf706f181aee61f471a1af87a3c1b3653e80 SHA512 735e284132aaa2125d7b248c81a27be2208963d84b7b434f251ee3f7a350e81c9e3cff58bc812bebd26450b711322c188876e96d6638a4ba3dbde4e8fc040c04 +AUX arpwatch.initd-r2 828 BLAKE2B fc9836855074520ab6e8e4d7412f9094677fe25dba61bba1a5a8aea227c30b2fbb4425cf4d6fbaff1fe23493b58b211d4f6a6328bfe9a20e1020709db1cacb57 SHA512 b3518e24c839bda3292ff9f8dfb7c9bf12f4483637590875f281116cc1a453266ffb22507383fb71cf28b889141b355f077df8e7937ac571ab72924f5f2014f7 DIST arpwatch-2.1a15.tar.gz 202729 BLAKE2B b583dea83c57a55b8705f0265c1324de270571468dc9f2e1d5351fd53340f7636f1d00e3de24caa9747384697721e6227e5e6de4b3827e5ac7adef4ce524fffd SHA512 f770b5b7954afe910dafb016e6e886a4e785564bcdc0ea0de9d7b1ca6a9a0b219a9d1b50b6f42a67afc2f836e782e8ff85ba5780583015d62c9694ac53f0bf90 +DIST arpwatch-3.1.tar.gz 117196 BLAKE2B 35afd3dc563ebbc8136000d5c2d53da85b9615df5cbe8a3da5b77f20da7cbee706f6fd404c2bda6f3626aaa496d9ec9439596acbdfd559c01b8c0d01d6703e46 SHA512 2e6f6e388e1828e34626e36356a89f3bc95d268b9242955d6636ac05041bcf533e7625ed73b37b6ea5eab8cfed54b8c483547556c98664efff63c18639efa282 DIST arpwatch-patchset-0.8.tar.xz 131692 BLAKE2B 8db242f7c74c8fee0700e12e8ff028fcaa336e5feb61514b44a892a132779c11d1ca3ce2fabee3cbcbbdcb0dae0ed470daa786a91619c18e24066f11da126bc4 SHA512 3e8f1c043f09fbeacadb40c1db47fb907314ed18bb3fb506c6c510977fd0e6dd9950becc830cf7c10911a7eec97e56e0af8c8c3d7df811e8ab820290973ea0b0 -EBUILD arpwatch-2.1.15-r11.ebuild 2212 BLAKE2B 256c4c6ec2122cd1a6eda7272afa4cecbb46625ccda72117cf949faeb589ef74d089923a036bd3fd0ef057bc549a692dc150132aad92bff14b3d1cd1d54fef94 SHA512 b51f3752058eab0ac532d11157c5f9d5f65f0dda01f6d396b13b39d668f424cad3290baaddbfaec2c2edd718010aa95806f7e32f04dceb44a68f7a26382366be +DIST ethercodes.dat-20200628.xz 239028 BLAKE2B e702b9109ef3ccce73e2637f96126bf19e7dfa533774c0bd623042b3609f147981263b84397ec155a65ae12fa57247c32644e1e7e57c2c749ef768156d853027 SHA512 2edc05d384f387e6b43d07da99038625f9c55c8044b5a48d1bcf9f657df691bf413a97fb9ca915f04dbdafab23f919edd15d906c4ce8bff12be0b255a6717f07 +EBUILD arpwatch-2.1.15-r11.ebuild 2229 BLAKE2B 63b3c747a8451a150612f52440ec779ef869f4ab7480c09b141869a8c3f91a9161d36c77025f22868430599007ad7c51c803306d373b2cf7021b13128b77dcc9 SHA512 7e1aa35935ab43542d5d1f6e855b124d61b971666785a14e60281dc666b064fbb6ddfe49904da3b3e635352850e72d68c1ae92eb2ddeb0cb556eae0779278439 +EBUILD arpwatch-3.1.ebuild 2060 BLAKE2B 74e15d6a6b4b7e994d557756a0662dbad1d8c8a44fa09b431eab77c33c8b831e93ccfc287c96c9e5a341618e2f52d54c414465afccd69dac92608dee98c479bd SHA512 de10526bf59ce55f7ec8fb67d4de5eeb002237b151bbc1be11a62f3d0cae757a5fbfeda3f64d99dbcf95fc4eac197e7b759c114bc3dff93ec6605494b73a7c16 MISC metadata.xml 741 BLAKE2B 63f289064fdfc3164a8c2651f783e851c42c062996e4e916e69ece25c5a0892030a07aaaead7b2fc14e6708128bc48e4321d30fedca97d09efad66a2340e3897 SHA512 0db051d36fb16c5a50239a243ca46f686e71b13387330bf98df46c9af3389d16e9842b89c15d2e6fb3fba867e5a0b36a2fd745480588ba621e117ee86aadbd00 diff --git a/net-analyzer/arpwatch/arpwatch-2.1.15-r11.ebuild b/net-analyzer/arpwatch/arpwatch-2.1.15-r11.ebuild index fbefe68bec99..b12edabc0a66 100644 --- a/net-analyzer/arpwatch/arpwatch-2.1.15-r11.ebuild +++ b/net-analyzer/arpwatch/arpwatch-2.1.15-r11.ebuild @@ -10,7 +10,7 @@ MY_P="${PN}-$(replace_version_separator 2 'a')" DESCRIPTION="An ethernet monitor program that keeps track of ethernet/IP address pairings" HOMEPAGE="https://ee.lbl.gov/" SRC_URI=" - ftp://ftp.ee.lbl.gov/${MY_P}.tar.gz + https://ee.lbl.gov/downloads/arpwatch/${MY_P}.tar.gz https://dev.gentoo.org/~jer/arpwatch-patchset-${PATCH_VER}.tar.xz " diff --git a/net-analyzer/arpwatch/arpwatch-3.1.ebuild b/net-analyzer/arpwatch/arpwatch-3.1.ebuild new file mode 100644 index 000000000000..64ae0f6ef45b --- /dev/null +++ b/net-analyzer/arpwatch/arpwatch-3.1.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit user + +DESCRIPTION="An ethernet monitor program that keeps track of ethernet/IP address pairings" +HOMEPAGE="https://ee.lbl.gov/" +LICENSE="BSD GPL-2" +SLOT="0" + +ETHERCODES_DATE=20200628 +SRC_URI=" + https://ee.lbl.gov/downloads/${PN}/${P}.tar.gz + https://dev.gentoo.org/~jer/ethercodes.dat-${ETHERCODES_DATE}.xz +" + +KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86" +IUSE="selinux" + +DEPEND=" + net-libs/libpcap + sys-libs/ncurses:* +" +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-arpwatch ) + virtual/mta +" + +pkg_setup() { + # We need to create /var/lib/arpwatch with this group, so it must + # exist during src_install. + enewgroup arpwatch +} + +pkg_postinst() { + # The user, however, is not needed until runtime. + enewuser arpwatch -1 -1 -1 arpwatch +} + +src_configure() { + econf \ + ac_cv_path_V_SENDMAIL=sendmail +} + +src_install() { + dosbin arp2ethers arpfetch arpsnmp arpwatch bihourly.sh massagevendor.py update-ethercodes.sh + doman arpsnmp.8 arpwatch.8 + + insinto /usr/share/arpwatch + newins "${WORKDIR}"/ethercodes.dat-${ETHERCODES_DATE} ethercodes.dat + + insinto /usr/share/arpwatch/awk + doins d.awk duplicates.awk e.awk euppertolower.awk p.awk + + diropts --group=arpwatch --mode=770 + keepdir /var/lib/arpwatch + dodoc README CHANGES + + newconfd "${FILESDIR}"/arpwatch.confd-r2 arpwatch + newinitd "${FILESDIR}"/arpwatch.initd-r2 arpwatch +} + +pkg_postinst() { + # Previous revisions installed /var/lib/arpwatch with the wrong + # ownership. Instead of the intended arpwatch:root, it was left as + # root:root. If we find any such mis-owned directories, we fix them, + # and then set the permission bits how we want them in *this* + # revision. + # + # The "--from" flag ensures that we only fix directories that need + # fixing, and the "&& chmod" ensures that we only adjust the + # permissions if the owner also needed fixing. + chown \ + --from=root:root \ + --no-dereference \ + :arpwatch \ + "${ROOT}"/var/lib/arpwatch && \ + chmod 770 "${ROOT}"/var/lib/arpwatch +} diff --git a/net-analyzer/arpwatch/files/arpwatch.confd b/net-analyzer/arpwatch/files/arpwatch.confd deleted file mode 100644 index 98abe0417740..000000000000 --- a/net-analyzer/arpwatch/files/arpwatch.confd +++ /dev/null @@ -1,11 +0,0 @@ -# Config file for /etc/init.d/arpwatch -# see arpwatch.8 for more information - -#IFACES="eth0 eth1" -IFACES="eth0" - -# Additional options to pass to arpwatch. -OPTIONS="-N -p" - -# Comment this line if you wish arpwatch to run as root user (not recommended) -ARPUSER="arpwatch" diff --git a/net-analyzer/arpwatch/files/arpwatch.confd-r2 b/net-analyzer/arpwatch/files/arpwatch.confd-r2 new file mode 100644 index 000000000000..2937349cdc83 --- /dev/null +++ b/net-analyzer/arpwatch/files/arpwatch.confd-r2 @@ -0,0 +1,18 @@ +# See arpwatch.8 for more information + +# Specify the interface for arpwatch to listen on here (default: lo). +# If you need to listen on more than one interface, you should +# run multiple arpwatch services; for example "arpwatch" and +# "arpwatch.eth1". These additional services can be configured by +# symlinking to the "arpwatch" service script, and by creating a new +# conf.d file whose name matches the new service (symlink) name. +# +# Example: +# +# ARPWATCH_IFACE="eth0" +# +ARPWATCH_IFACE="lo" + +# Additional options to pass to arpwatch. +# See arpwatch(8) +ARPWATCH_OPTS="-N -p" diff --git a/net-analyzer/arpwatch/files/arpwatch.initd b/net-analyzer/arpwatch/files/arpwatch.initd deleted file mode 100644 index 5569dcee2527..000000000000 --- a/net-analyzer/arpwatch/files/arpwatch.initd +++ /dev/null @@ -1,36 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -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} -P /var/run/arpwatch.${IFACE}.pid ${OPTIONS} - else - chown ${ARPUSER} ${DATAFILE} - start-stop-daemon --start --quiet --pidfile=/var/run/arpwatch.${IFACE}.pid --exec \ - /usr/sbin/arpwatch -- -i $IFACE -u ${ARPUSER} -f ${DATAFILE} -P /var/run/arpwatch.${IFACE}.pid ${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/arpwatch.initd-r2 b/net-analyzer/arpwatch/files/arpwatch.initd-r2 new file mode 100644 index 000000000000..93438209e1f1 --- /dev/null +++ b/net-analyzer/arpwatch/files/arpwatch.initd-r2 @@ -0,0 +1,33 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Default to "lo" for the interface, so that the init script will work +# out-of-the-box. +: ${ARPWATCH_IFACE:=lo} + +ARPWATCH_DATAFILE="/var/lib/arpwatch/${RC_SVCNAME}.dat" + +command="/usr/sbin/arpwatch" +pidfile="/run/${RC_SVCNAME}.pid" +command_args=" + -i ${ARPWATCH_IFACE} + -f ${ARPWATCH_DATAFILE} + -P ${pidfile} + ${ARPWATCH_OPTS} +" + +depend() { + if [ -f "/proc/net/vlan/${ARPWATCH_IFACE}" ]; then + _if=$(grep -i "device" /proc/net/vlan/${ARPWATCH_IFACE} |awk '{print $2;}') + else + _if=${ARPWATCH_IFACE} + fi + need "net.${_if}" +} + +start_pre() { + # The "arpwatch" user must be a member of the "arpwatch" group for + # this to work. + checkpath --file --owner root:arpwatch --mode 0660 "${ARPWATCH_DATAFILE}" +} -- cgit v1.2.3