summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2020-06-28 13:15:54 +0200
committerJeroen Roovers <jer@gentoo.org>2020-06-28 14:05:36 +0200
commit35675728bced4cce4b52cc9636227f3b59e55ea2 (patch)
treeee7613b0c452537b450b434db73d7626b056b72d /net-analyzer
parentnet-analyzer/arpwatch: Clean up FILESDIR (diff)
downloadgentoo-35675728bced4cce4b52cc9636227f3b59e55ea2.tar.gz
gentoo-35675728bced4cce4b52cc9636227f3b59e55ea2.tar.bz2
gentoo-35675728bced4cce4b52cc9636227f3b59e55ea2.zip
net-analyzer/arpwatch: Version 3.1
Package-Manager: Portage-2.3.103, Repoman-2.3.23 Closes: https://bugs.gentoo.org/show_bug.cgi?id=729954 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/arpwatch/Manifest2
-rw-r--r--net-analyzer/arpwatch/arpwatch-3.1.ebuild75
2 files changed, 77 insertions, 0 deletions
diff --git a/net-analyzer/arpwatch/Manifest b/net-analyzer/arpwatch/Manifest
index 360ecca15b0c..11122304499e 100644
--- a/net-analyzer/arpwatch/Manifest
+++ b/net-analyzer/arpwatch/Manifest
@@ -1,2 +1,4 @@
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
+DIST ethercodes.dat-20200628.xz 239028 BLAKE2B e702b9109ef3ccce73e2637f96126bf19e7dfa533774c0bd623042b3609f147981263b84397ec155a65ae12fa57247c32644e1e7e57c2c749ef768156d853027 SHA512 2edc05d384f387e6b43d07da99038625f9c55c8044b5a48d1bcf9f657df691bf413a97fb9ca915f04dbdafab23f919edd15d906c4ce8bff12be0b255a6717f07
diff --git a/net-analyzer/arpwatch/arpwatch-3.1.ebuild b/net-analyzer/arpwatch/arpwatch-3.1.ebuild
new file mode 100644
index 000000000000..92a1c502738f
--- /dev/null
+++ b/net-analyzer/arpwatch/arpwatch-3.1.ebuild
@@ -0,0 +1,75 @@
+# 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 )
+"
+
+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_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 duplicates.awk euppertolower.awk p.awk e.awk d.awk
+
+ diropts --group=arpwatch --mode=770
+ keepdir /var/lib/arpwatch
+ dodoc README CHANGES
+
+ newinitd "${FILESDIR}"/arpwatch.initd-r1 arpwatch
+ newconfd "${FILESDIR}"/arpwatch.confd-r1 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
+}