summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2020-02-03 19:10:53 +0100
committerJeroen Roovers <jer@gentoo.org>2020-02-03 19:15:34 +0100
commit623d1e0b9b697f886abfd52e0a48796107198c96 (patch)
treee2e2c406336c722ad667fc3b80029c690f86d227 /net-analyzer/fping
parentmedia-gfx/zbar: Minor nitpicks (diff)
downloadgentoo-623d1e0b9b697f886abfd52e0a48796107198c96.tar.gz
gentoo-623d1e0b9b697f886abfd52e0a48796107198c96.tar.bz2
gentoo-623d1e0b9b697f886abfd52e0a48796107198c96.zip
net-analyzer/fping: Add USE=filecaps, fping6 > fping symlink
Bug #698662: - Use filecaps.eclass to set cap_net_raw Bug #708020: - Create a symlink from /usr/sbin/fping6 -> fping - Add upstream patch to fix `fping6 -6 ...` Package-Manager: Portage-2.3.87, Repoman-2.3.20 Closes: https://bugs.gentoo.org/698662 Closes: https://bugs.gentoo.org/708020 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'net-analyzer/fping')
-rw-r--r--net-analyzer/fping/files/fping-4.2-fping6-6.patch21
-rw-r--r--net-analyzer/fping/fping-4.2-r1.ebuild36
2 files changed, 57 insertions, 0 deletions
diff --git a/net-analyzer/fping/files/fping-4.2-fping6-6.patch b/net-analyzer/fping/files/fping-4.2-fping6-6.patch
new file mode 100644
index 00000000000..63138d3e2d2
--- /dev/null
+++ b/net-analyzer/fping/files/fping-4.2-fping6-6.patch
@@ -0,0 +1,21 @@
+From 6fd4f8bd91abc43f80078bdd0084cb6d2b1de7f1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Johan=20Str=C3=B6m?= <johan@stromnet.se>
+Date: Tue, 25 Jun 2019 14:03:14 +0200
+Subject: [PATCH] Do not fail if using fping6 with -6 flag
+
+Mostly for backwards compatability
+---
+ src/fping.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/fping.c
++++ b/src/fping.c
+@@ -435,7 +435,7 @@
+ break;
+ case '6':
+ #ifdef IPV6
+- if (hints_ai_family != AF_UNSPEC) {
++ if (hints_ai_family != AF_UNSPEC && hints_ai_family != AF_INET6) {
+ fprintf(stderr, "%s: can't specify both -4 and -6\n", prog);
+ exit(1);
+ }
diff --git a/net-analyzer/fping/fping-4.2-r1.ebuild b/net-analyzer/fping/fping-4.2-r1.ebuild
new file mode 100644
index 00000000000..0e1b61dd97e
--- /dev/null
+++ b/net-analyzer/fping/fping-4.2-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit fcaps
+
+DESCRIPTION="A utility to ping multiple hosts at once"
+HOMEPAGE="https://fping.org/"
+SRC_URI="https://fping.org/dist/${P}.tar.gz"
+
+LICENSE="fping"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="ipv6 suid"
+
+FILECAPS=( cap_net_raw+ep usr/sbin/fping )
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.2-fno-common.patch
+ "${FILESDIR}"/${PN}-4.2-fping6-6.patch
+)
+
+src_configure() {
+ econf $(use_enable ipv6)
+}
+
+src_install() {
+ default
+
+ if use suid; then
+ fperms u+s /usr/sbin/fping
+ fi
+
+ if use ipv6; then
+ dosym fping /usr/sbin/fping6
+ fi
+}