Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/arpwatch/
Date: Sun, 28 Jun 2020 12:05:52
Message-Id: 1593345936.35675728bced4cce4b52cc9636227f3b59e55ea2.jer@gentoo
1 commit: 35675728bced4cce4b52cc9636227f3b59e55ea2
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 28 11:15:54 2020 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Sun Jun 28 12:05:36 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35675728
7
8 net-analyzer/arpwatch: Version 3.1
9
10 Package-Manager: Portage-2.3.103, Repoman-2.3.23
11 Closes: https://bugs.gentoo.org/show_bug.cgi?id=729954
12 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
13
14 net-analyzer/arpwatch/Manifest | 2 +
15 net-analyzer/arpwatch/arpwatch-3.1.ebuild | 75 +++++++++++++++++++++++++++++++
16 2 files changed, 77 insertions(+)
17
18 diff --git a/net-analyzer/arpwatch/Manifest b/net-analyzer/arpwatch/Manifest
19 index 360ecca15b0..11122304499 100644
20 --- a/net-analyzer/arpwatch/Manifest
21 +++ b/net-analyzer/arpwatch/Manifest
22 @@ -1,2 +1,4 @@
23 DIST arpwatch-2.1a15.tar.gz 202729 BLAKE2B b583dea83c57a55b8705f0265c1324de270571468dc9f2e1d5351fd53340f7636f1d00e3de24caa9747384697721e6227e5e6de4b3827e5ac7adef4ce524fffd SHA512 f770b5b7954afe910dafb016e6e886a4e785564bcdc0ea0de9d7b1ca6a9a0b219a9d1b50b6f42a67afc2f836e782e8ff85ba5780583015d62c9694ac53f0bf90
24 +DIST arpwatch-3.1.tar.gz 117196 BLAKE2B 35afd3dc563ebbc8136000d5c2d53da85b9615df5cbe8a3da5b77f20da7cbee706f6fd404c2bda6f3626aaa496d9ec9439596acbdfd559c01b8c0d01d6703e46 SHA512 2e6f6e388e1828e34626e36356a89f3bc95d268b9242955d6636ac05041bcf533e7625ed73b37b6ea5eab8cfed54b8c483547556c98664efff63c18639efa282
25 DIST arpwatch-patchset-0.8.tar.xz 131692 BLAKE2B 8db242f7c74c8fee0700e12e8ff028fcaa336e5feb61514b44a892a132779c11d1ca3ce2fabee3cbcbbdcb0dae0ed470daa786a91619c18e24066f11da126bc4 SHA512 3e8f1c043f09fbeacadb40c1db47fb907314ed18bb3fb506c6c510977fd0e6dd9950becc830cf7c10911a7eec97e56e0af8c8c3d7df811e8ab820290973ea0b0
26 +DIST ethercodes.dat-20200628.xz 239028 BLAKE2B e702b9109ef3ccce73e2637f96126bf19e7dfa533774c0bd623042b3609f147981263b84397ec155a65ae12fa57247c32644e1e7e57c2c749ef768156d853027 SHA512 2edc05d384f387e6b43d07da99038625f9c55c8044b5a48d1bcf9f657df691bf413a97fb9ca915f04dbdafab23f919edd15d906c4ce8bff12be0b255a6717f07
27
28 diff --git a/net-analyzer/arpwatch/arpwatch-3.1.ebuild b/net-analyzer/arpwatch/arpwatch-3.1.ebuild
29 new file mode 100644
30 index 00000000000..92a1c502738
31 --- /dev/null
32 +++ b/net-analyzer/arpwatch/arpwatch-3.1.ebuild
33 @@ -0,0 +1,75 @@
34 +# Copyright 1999-2020 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +inherit user
39 +
40 +DESCRIPTION="An ethernet monitor program that keeps track of ethernet/IP address pairings"
41 +HOMEPAGE="https://ee.lbl.gov/"
42 +LICENSE="BSD GPL-2"
43 +SLOT="0"
44 +
45 +ETHERCODES_DATE=20200628
46 +SRC_URI="
47 + https://ee.lbl.gov/downloads/${PN}/${P}.tar.gz
48 + https://dev.gentoo.org/~jer/ethercodes.dat-${ETHERCODES_DATE}.xz
49 +"
50 +
51 +KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86"
52 +IUSE="selinux"
53 +
54 +DEPEND="
55 + net-libs/libpcap
56 + sys-libs/ncurses:*
57 +"
58 +RDEPEND="
59 + ${DEPEND}
60 + selinux? ( sec-policy/selinux-arpwatch )
61 +"
62 +
63 +pkg_setup() {
64 + # We need to create /var/lib/arpwatch with this group, so it must
65 + # exist during src_install.
66 + enewgroup arpwatch
67 +}
68 +
69 +pkg_postinst() {
70 + # The user, however, is not needed until runtime.
71 + enewuser arpwatch -1 -1 -1 arpwatch
72 +}
73 +
74 +src_install() {
75 + dosbin arp2ethers arpfetch arpsnmp arpwatch bihourly.sh massagevendor.py update-ethercodes.sh
76 + doman arpsnmp.8 arpwatch.8
77 +
78 + insinto /usr/share/arpwatch
79 + newins "${WORKDIR}"/ethercodes.dat-${ETHERCODES_DATE} ethercodes.dat
80 +
81 + insinto /usr/share/arpwatch/awk
82 + doins duplicates.awk euppertolower.awk p.awk e.awk d.awk
83 +
84 + diropts --group=arpwatch --mode=770
85 + keepdir /var/lib/arpwatch
86 + dodoc README CHANGES
87 +
88 + newinitd "${FILESDIR}"/arpwatch.initd-r1 arpwatch
89 + newconfd "${FILESDIR}"/arpwatch.confd-r1 arpwatch
90 +}
91 +
92 +pkg_postinst() {
93 + # Previous revisions installed /var/lib/arpwatch with the wrong
94 + # ownership. Instead of the intended arpwatch:root, it was left as
95 + # root:root. If we find any such mis-owned directories, we fix them,
96 + # and then set the permission bits how we want them in *this*
97 + # revision.
98 + #
99 + # The "--from" flag ensures that we only fix directories that need
100 + # fixing, and the "&& chmod" ensures that we only adjust the
101 + # permissions if the owner also needed fixing.
102 + chown \
103 + --from=root:root \
104 + --no-dereference \
105 + :arpwatch \
106 + "${ROOT}"/var/lib/arpwatch && \
107 + chmod 770 "${ROOT}"/var/lib/arpwatch
108 +}