summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2020-10-24 11:59:51 +0200
committerDavid Seifert <soap@gentoo.org>2020-10-24 11:59:51 +0200
commitd7a0661fc8c35f383eda3c00a9b9ecb39d6817b6 (patch)
tree358fd17936c133064487079e286f62cacb9dc1cf /net-analyzer/tcpdump
parentnet-analyzer/wireshark: Port to GLEP 81 'pcap' group (diff)
downloadgentoo-d7a0661fc8c35f383eda3c00a9b9ecb39d6817b6.tar.gz
gentoo-d7a0661fc8c35f383eda3c00a9b9ecb39d6817b6.tar.bz2
gentoo-d7a0661fc8c35f383eda3c00a9b9ecb39d6817b6.zip
net-analyzer/tcpdump: Port to GLEP 81 'pcap' group/user
Closes: https://bugs.gentoo.org/314463 Closes: https://github.com/gentoo/gentoo/pull/18015 Package-Manager: Portage-3.0.8, Repoman-3.0.2 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'net-analyzer/tcpdump')
-rw-r--r--net-analyzer/tcpdump/metadata.xml2
-rw-r--r--net-analyzer/tcpdump/tcpdump-4.10.0_rc1-r1.ebuild (renamed from net-analyzer/tcpdump/tcpdump-4.10.0_rc1.ebuild)32
-rw-r--r--net-analyzer/tcpdump/tcpdump-4.9.3-r2.ebuild (renamed from net-analyzer/tcpdump/tcpdump-4.9.3.ebuild)32
-rw-r--r--net-analyzer/tcpdump/tcpdump-4.9.3-r3.ebuild (renamed from net-analyzer/tcpdump/tcpdump-4.9.3-r1.ebuild)32
-rw-r--r--net-analyzer/tcpdump/tcpdump-9999.ebuild32
5 files changed, 53 insertions, 77 deletions
diff --git a/net-analyzer/tcpdump/metadata.xml b/net-analyzer/tcpdump/metadata.xml
index 926985b6a8cb..cacdf5c62984 100644
--- a/net-analyzer/tcpdump/metadata.xml
+++ b/net-analyzer/tcpdump/metadata.xml
@@ -7,7 +7,7 @@
</maintainer>
<use>
<flag name="smi">Build with <pkg>net-libs/libsmi</pkg> to load MIBs on the fly to decode SNMP packets</flag>
- <flag name="drop-root">Drop privileges to tcpdump:tcpdump when run as root</flag>
+ <flag name="drop-root">Drop privileges to pcap:pcap when run as root</flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:tcpdump:tcpdump</remote-id>
diff --git a/net-analyzer/tcpdump/tcpdump-4.10.0_rc1.ebuild b/net-analyzer/tcpdump/tcpdump-4.10.0_rc1-r1.ebuild
index c2cf8713eaca..aa6aa458165d 100644
--- a/net-analyzer/tcpdump/tcpdump-4.10.0_rc1.ebuild
+++ b/net-analyzer/tcpdump/tcpdump-4.10.0_rc1-r1.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit autotools user
+inherit autotools
DESCRIPTION="A Tool for network monitoring and data acquisition"
HOMEPAGE="
@@ -22,12 +22,20 @@ REQUIRED_USE="test? ( samba )"
RDEPEND="
net-libs/libpcap
- drop-root? ( sys-libs/libcap-ng )
+ drop-root? (
+ acct-group/pcap
+ acct-user/pcap
+ sys-libs/libcap-ng
+ )
smi? ( net-libs/libsmi )
ssl? (
!libressl? ( >=dev-libs/openssl-0.9.6m:0= )
libressl? ( dev-libs/libressl:= )
)
+ suid? (
+ acct-group/pcap
+ acct-user/pcap
+ )
"
BDEPEND="
drop-root? ( virtual/pkgconfig )
@@ -44,13 +52,6 @@ PATCHES=(
)
S=${WORKDIR}/${PN}-${P/_}
-pkg_setup() {
- if use drop-root || use suid; then
- enewgroup tcpdump
- enewuser tcpdump -1 -1 -1 tcpdump
- fi
-}
-
src_prepare() {
default
@@ -64,7 +65,7 @@ src_configure() {
$(use_with drop-root chroot '') \
$(use_with smi) \
$(use_with ssl crypto "${ESYSROOT}/usr") \
- $(usex drop-root "--with-user=tcpdump" "")
+ $(usex drop-root "--with-user=pcap" "")
}
src_test() {
@@ -83,18 +84,11 @@ src_install() {
dodoc CHANGES CREDITS README.md
if use suid; then
- fowners root:tcpdump /usr/sbin/tcpdump
+ fowners root:pcap /usr/sbin/tcpdump
fperms 4110 /usr/sbin/tcpdump
fi
}
-pkg_preinst() {
- if use drop-root || use suid; then
- enewgroup tcpdump
- enewuser tcpdump -1 -1 -1 tcpdump
- fi
-}
-
pkg_postinst() {
- use suid && elog "To let normal users run tcpdump add them into tcpdump group."
+ use suid && elog "To let normal users run tcpdump add them to the pcap group."
}
diff --git a/net-analyzer/tcpdump/tcpdump-4.9.3.ebuild b/net-analyzer/tcpdump/tcpdump-4.9.3-r2.ebuild
index 3731233ad947..e4c232ea1190 100644
--- a/net-analyzer/tcpdump/tcpdump-4.9.3.ebuild
+++ b/net-analyzer/tcpdump/tcpdump-4.9.3-r2.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit flag-o-matic toolchain-funcs user
+inherit flag-o-matic toolchain-funcs
DESCRIPTION="A Tool for network monitoring and data acquisition"
HOMEPAGE="
@@ -20,13 +20,21 @@ IUSE="+drop-root libressl smi ssl samba suid test"
RESTRICT="!test? ( test )"
RDEPEND="
- drop-root? ( sys-libs/libcap-ng )
+ drop-root? (
+ acct-group/pcap
+ acct-user/pcap
+ sys-libs/libcap-ng
+ )
net-libs/libpcap
smi? ( net-libs/libsmi )
ssl? (
!libressl? ( >=dev-libs/openssl-0.9.6m:0= )
libressl? ( dev-libs/libressl:= )
)
+ suid? (
+ acct-group/pcap
+ acct-user/pcap
+ )
"
DEPEND="
${RDEPEND}
@@ -38,13 +46,6 @@ DEPEND="
)
"
-pkg_setup() {
- if use drop-root || use suid; then
- enewgroup tcpdump
- enewuser tcpdump -1 -1 -1 tcpdump
- fi
-}
-
src_configure() {
if use drop-root; then
append-cppflags -DHAVE_CAP_NG_H
@@ -56,7 +57,7 @@ src_configure() {
$(use_with drop-root chroot '') \
$(use_with smi) \
$(use_with ssl crypto "${ESYSROOT}/usr") \
- $(usex drop-root "--with-user=tcpdump" "")
+ $(usex drop-root "--with-user=pcap" "")
}
src_test() {
@@ -75,18 +76,11 @@ src_install() {
dodoc CHANGES CREDITS README.md
if use suid; then
- fowners root:tcpdump /usr/sbin/tcpdump
+ fowners root:pcap /usr/sbin/tcpdump
fperms 4110 /usr/sbin/tcpdump
fi
}
-pkg_preinst() {
- if use drop-root || use suid; then
- enewgroup tcpdump
- enewuser tcpdump -1 -1 -1 tcpdump
- fi
-}
-
pkg_postinst() {
- use suid && elog "To let normal users run tcpdump add them into tcpdump group."
+ use suid && elog "To let normal users run tcpdump add them to the pcap group."
}
diff --git a/net-analyzer/tcpdump/tcpdump-4.9.3-r1.ebuild b/net-analyzer/tcpdump/tcpdump-4.9.3-r3.ebuild
index e23d799be4ba..b348a3434e13 100644
--- a/net-analyzer/tcpdump/tcpdump-4.9.3-r1.ebuild
+++ b/net-analyzer/tcpdump/tcpdump-4.9.3-r3.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit autotools user
+inherit autotools
DESCRIPTION="A Tool for network monitoring and data acquisition"
HOMEPAGE="
@@ -21,12 +21,20 @@ RESTRICT="!test? ( test )"
RDEPEND="
net-libs/libpcap
- drop-root? ( sys-libs/libcap-ng )
+ drop-root? (
+ acct-group/pcap
+ acct-user/pcap
+ sys-libs/libcap-ng
+ )
smi? ( net-libs/libsmi )
ssl? (
!libressl? ( >=dev-libs/openssl-0.9.6m:0= )
libressl? ( dev-libs/libressl:= )
)
+ suid? (
+ acct-group/pcap
+ acct-user/pcap
+ )
"
DEPEND="
${RDEPEND}
@@ -39,13 +47,6 @@ PATCHES=(
"${FILESDIR}"/${PN}-9999-libdir.patch
)
-pkg_setup() {
- if use drop-root || use suid; then
- enewgroup tcpdump
- enewuser tcpdump -1 -1 -1 tcpdump
- fi
-}
-
src_prepare() {
default
eautoreconf
@@ -58,7 +59,7 @@ src_configure() {
$(use_with drop-root chroot '') \
$(use_with smi) \
$(use_with ssl crypto "${ESYSROOT}/usr") \
- $(usex drop-root "--with-user=tcpdump" "")
+ $(usex drop-root "--with-user=pcap" "")
}
src_test() {
@@ -77,18 +78,11 @@ src_install() {
dodoc CHANGES CREDITS README.md
if use suid; then
- fowners root:tcpdump /usr/sbin/tcpdump
+ fowners root:pcap /usr/sbin/tcpdump
fperms 4110 /usr/sbin/tcpdump
fi
}
-pkg_preinst() {
- if use drop-root || use suid; then
- enewgroup tcpdump
- enewuser tcpdump -1 -1 -1 tcpdump
- fi
-}
-
pkg_postinst() {
- use suid && elog "To let normal users run tcpdump add them into tcpdump group."
+ use suid && elog "To let normal users run tcpdump add them to the pcap group."
}
diff --git a/net-analyzer/tcpdump/tcpdump-9999.ebuild b/net-analyzer/tcpdump/tcpdump-9999.ebuild
index 8352b63b1ccf..6f074f38fb23 100644
--- a/net-analyzer/tcpdump/tcpdump-9999.ebuild
+++ b/net-analyzer/tcpdump/tcpdump-9999.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit autotools git-r3 user
+inherit autotools git-r3
DESCRIPTION="A Tool for network monitoring and data acquisition"
HOMEPAGE="
@@ -20,12 +20,20 @@ REQUIRED_USE="test? ( samba )"
RDEPEND="
net-libs/libpcap
- drop-root? ( sys-libs/libcap-ng )
+ drop-root? (
+ acct-group/pcap
+ acct-user/pcap
+ sys-libs/libcap-ng
+ )
smi? ( net-libs/libsmi )
ssl? (
!libressl? ( >=dev-libs/openssl-0.9.6m:0= )
libressl? ( dev-libs/libressl:= )
)
+ suid? (
+ acct-group/pcap
+ acct-user/pcap
+ )
"
BDEPEND="
drop-root? ( virtual/pkgconfig )
@@ -41,13 +49,6 @@ PATCHES=(
"${FILESDIR}"/${PN}-9999-libdir.patch
)
-pkg_setup() {
- if use drop-root || use suid; then
- enewgroup tcpdump
- enewuser tcpdump -1 -1 -1 tcpdump
- fi
-}
-
src_prepare() {
default
@@ -61,7 +62,7 @@ src_configure() {
$(use_with drop-root chroot '') \
$(use_with smi) \
$(use_with ssl crypto "${ESYSROOT}/usr") \
- $(usex drop-root "--with-user=tcpdump" "")
+ $(usex drop-root "--with-user=pcap" "")
}
src_test() {
@@ -80,18 +81,11 @@ src_install() {
dodoc CHANGES CREDITS README.md
if use suid; then
- fowners root:tcpdump /usr/sbin/tcpdump
+ fowners root:pcap /usr/sbin/tcpdump
fperms 4110 /usr/sbin/tcpdump
fi
}
-pkg_preinst() {
- if use drop-root || use suid; then
- enewgroup tcpdump
- enewuser tcpdump -1 -1 -1 tcpdump
- fi
-}
-
pkg_postinst() {
- use suid && elog "To let normal users run tcpdump add them into tcpdump group."
+ use suid && elog "To let normal users run tcpdump add them to the pcap group."
}