summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-03-16 16:39:13 +0000
committerSam James <sam@gentoo.org>2021-03-16 19:21:45 +0000
commitdd5051e381a657200aba60aff0702dc39c9c8c9d (patch)
treef44be53660d35707830d6e417eb2e5c49cb5f96c /net-analyzer/netselect
parentnet-analyzer/fping: drop 4.4 (diff)
downloadgentoo-dd5051e381a657200aba60aff0702dc39c9c8c9d.tar.gz
gentoo-dd5051e381a657200aba60aff0702dc39c9c8c9d.tar.bz2
gentoo-dd5051e381a657200aba60aff0702dc39c9c8c9d.zip
net-analyzer/netselect: sync live ebuild, adjust FILECAPS path
We shouldn't use absolute paths with FILECAPS for e.g. binpkgs/--root. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-analyzer/netselect')
-rw-r--r--net-analyzer/netselect/netselect-0.4-r2.ebuild2
-rw-r--r--net-analyzer/netselect/netselect-9999.ebuild38
2 files changed, 23 insertions, 17 deletions
diff --git a/net-analyzer/netselect/netselect-0.4-r2.ebuild b/net-analyzer/netselect/netselect-0.4-r2.ebuild
index decda5e572d5..c0eb61494801 100644
--- a/net-analyzer/netselect/netselect-0.4-r2.ebuild
+++ b/net-analyzer/netselect/netselect-0.4-r2.ebuild
@@ -25,7 +25,7 @@ PATCHES=(
DOCS=( HISTORY README )
-FILECAPS=( -g wheel cap_net_raw /usr/bin/netselect )
+FILECAPS=( -g wheel cap_net_raw usr/bin/netselect )
src_prepare() {
use ipv6 && eapply "${WORKDIR}"/${PN}-0.4-ipv6.patch
diff --git a/net-analyzer/netselect/netselect-9999.ebuild b/net-analyzer/netselect/netselect-9999.ebuild
index c41a3b0d656e..7fee270c477b 100644
--- a/net-analyzer/netselect/netselect-9999.ebuild
+++ b/net-analyzer/netselect/netselect-9999.ebuild
@@ -1,21 +1,18 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit git-r3 toolchain-funcs
+
+inherit fcaps git-r3 toolchain-funcs
DESCRIPTION="Ultrafast implementation of ping"
HOMEPAGE="http://apenwarr.ca/netselect/"
-EGIT_REPO_URI="
- https://github.com/apenwarr/${PN}
-"
-SRC_URI="
- ipv6? ( https://dev.gentoo.org/~jer/${PN}-0.4-ipv6.patch.xz )
-"
+EGIT_REPO_URI="https://github.com/apenwarr/${PN}"
+SRC_URI="ipv6? ( https://dev.gentoo.org/~jer/${PN}-0.4-ipv6.patch.xz )"
+S="${WORKDIR}/${PN}-${P}"
LICENSE="BSD"
SLOT="0"
-KEYWORDS=""
IUSE="ipv6"
PATCHES=(
@@ -23,15 +20,25 @@ PATCHES=(
"${FILESDIR}"/${PN}-0.4-flags.patch
)
+DOCS=( HISTORY README )
+
+FILECAPS=( -g wheel cap_net_raw usr/bin/netselect )
+
src_unpack() {
use ipv6 && unpack ${A}
git-r3_src_unpack
}
src_prepare() {
- use ipv6 && PATCHES+=( "${WORKDIR}"/${PN}-0.4-ipv6.patch )
+ use ipv6 && eapply "${WORKDIR}"/${PN}-0.4-ipv6.patch
default
+
+ # Don't warn about "root privileges required" when running as
+ # an unprivileged user with filecaps
+ if ! use prefix && use filecaps; then
+ sed -i -e '/if (geteuid () != 0)/,+2d' "${S}"/netselect.c || die
+ fi
}
src_compile() {
@@ -41,12 +48,11 @@ src_compile() {
src_install() {
dobin netselect
- if ! use prefix ; then
- fowners root:wheel /usr/bin/netselect
- fperms 4711 /usr/bin/netselect
- fi
-
- dodoc HISTORY README
+ einstalldocs
doman netselect.1
}
+
+pkg_postinst() {
+ ! use prefix && fcaps_pkg_postinst
+}