From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 581A713835A for ; Sat, 24 Oct 2020 10:00:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A675EE095D; Sat, 24 Oct 2020 10:00:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7BD29E095D for ; Sat, 24 Oct 2020 10:00:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F3D50340CA7 for ; Sat, 24 Oct 2020 10:00:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 380B43B8 for ; Sat, 24 Oct 2020 10:00:02 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1603533591.d7a0661fc8c35f383eda3c00a9b9ecb39d6817b6.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/tcpdump/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-analyzer/tcpdump/metadata.xml net-analyzer/tcpdump/tcpdump-4.10.0_rc1-r1.ebuild net-analyzer/tcpdump/tcpdump-4.10.0_rc1.ebuild net-analyzer/tcpdump/tcpdump-4.9.3-r1.ebuild net-analyzer/tcpdump/tcpdump-4.9.3-r2.ebuild net-analyzer/tcpdump/tcpdump-4.9.3-r3.ebuild net-analyzer/tcpdump/tcpdump-4.9.3.ebuild net-analyzer/tcpdump/tcpdump-9999.ebuild X-VCS-Directories: net-analyzer/tcpdump/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: d7a0661fc8c35f383eda3c00a9b9ecb39d6817b6 X-VCS-Branch: master Date: Sat, 24 Oct 2020 10:00:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 68813a79-f172-427c-a158-14645302e808 X-Archives-Hash: 5ac27366b11ab7ecbeb1bb30d13d3ff8 commit: d7a0661fc8c35f383eda3c00a9b9ecb39d6817b6 Author: David Seifert gentoo org> AuthorDate: Sat Oct 24 09:59:51 2020 +0000 Commit: David Seifert gentoo org> CommitDate: Sat Oct 24 09:59:51 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7a0661f 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 gentoo.org> net-analyzer/tcpdump/metadata.xml | 2 +- ...0.0_rc1.ebuild => tcpdump-4.10.0_rc1-r1.ebuild} | 32 +++++++++------------- ...cpdump-4.9.3.ebuild => tcpdump-4.9.3-r2.ebuild} | 32 +++++++++------------- ...ump-4.9.3-r1.ebuild => tcpdump-4.9.3-r3.ebuild} | 32 +++++++++------------- net-analyzer/tcpdump/tcpdump-9999.ebuild | 32 +++++++++------------- 5 files changed, 53 insertions(+), 77 deletions(-) diff --git a/net-analyzer/tcpdump/metadata.xml b/net-analyzer/tcpdump/metadata.xml index 926985b6a8c..cacdf5c6298 100644 --- a/net-analyzer/tcpdump/metadata.xml +++ b/net-analyzer/tcpdump/metadata.xml @@ -7,7 +7,7 @@ Build with net-libs/libsmi to load MIBs on the fly to decode SNMP packets - Drop privileges to tcpdump:tcpdump when run as root + Drop privileges to pcap:pcap when run as root cpe:/a:tcpdump:tcpdump diff --git a/net-analyzer/tcpdump/tcpdump-4.10.0_rc1.ebuild b/net-analyzer/tcpdump/tcpdump-4.10.0_rc1-r1.ebuild similarity index 77% rename from net-analyzer/tcpdump/tcpdump-4.10.0_rc1.ebuild rename to net-analyzer/tcpdump/tcpdump-4.10.0_rc1-r1.ebuild index c2cf8713eac..aa6aa458165 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 similarity index 75% rename from net-analyzer/tcpdump/tcpdump-4.9.3.ebuild rename to net-analyzer/tcpdump/tcpdump-4.9.3-r2.ebuild index 3731233ad94..e4c232ea119 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 similarity index 75% rename from net-analyzer/tcpdump/tcpdump-4.9.3-r1.ebuild rename to net-analyzer/tcpdump/tcpdump-4.9.3-r3.ebuild index e23d799be4b..b348a3434e1 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 8352b63b1cc..6f074f38fb2 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." }