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/fping/files/, net-analyzer/fping/
Date: Mon, 03 Feb 2020 18:15:45
Message-Id: 1580753734.623d1e0b9b697f886abfd52e0a48796107198c96.jer@gentoo
1 commit: 623d1e0b9b697f886abfd52e0a48796107198c96
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 3 18:10:53 2020 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 3 18:15:34 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=623d1e0b
7
8 net-analyzer/fping: Add USE=filecaps, fping6 > fping symlink
9
10 Bug #698662:
11 - Use filecaps.eclass to set cap_net_raw
12
13 Bug #708020:
14 - Create a symlink from /usr/sbin/fping6 -> fping
15 - Add upstream patch to fix `fping6 -6 ...`
16
17 Package-Manager: Portage-2.3.87, Repoman-2.3.20
18 Closes: https://bugs.gentoo.org/698662
19 Closes: https://bugs.gentoo.org/708020
20 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
21
22 net-analyzer/fping/files/fping-4.2-fping6-6.patch | 21 +++++++++++++
23 net-analyzer/fping/fping-4.2-r1.ebuild | 36 +++++++++++++++++++++++
24 2 files changed, 57 insertions(+)
25
26 diff --git a/net-analyzer/fping/files/fping-4.2-fping6-6.patch b/net-analyzer/fping/files/fping-4.2-fping6-6.patch
27 new file mode 100644
28 index 00000000000..63138d3e2d2
29 --- /dev/null
30 +++ b/net-analyzer/fping/files/fping-4.2-fping6-6.patch
31 @@ -0,0 +1,21 @@
32 +From 6fd4f8bd91abc43f80078bdd0084cb6d2b1de7f1 Mon Sep 17 00:00:00 2001
33 +From: =?UTF-8?q?Johan=20Str=C3=B6m?= <johan@××××××××.se>
34 +Date: Tue, 25 Jun 2019 14:03:14 +0200
35 +Subject: [PATCH] Do not fail if using fping6 with -6 flag
36 +
37 +Mostly for backwards compatability
38 +---
39 + src/fping.c | 2 +-
40 + 1 file changed, 1 insertion(+), 1 deletion(-)
41 +
42 +--- a/src/fping.c
43 ++++ b/src/fping.c
44 +@@ -435,7 +435,7 @@
45 + break;
46 + case '6':
47 + #ifdef IPV6
48 +- if (hints_ai_family != AF_UNSPEC) {
49 ++ if (hints_ai_family != AF_UNSPEC && hints_ai_family != AF_INET6) {
50 + fprintf(stderr, "%s: can't specify both -4 and -6\n", prog);
51 + exit(1);
52 + }
53
54 diff --git a/net-analyzer/fping/fping-4.2-r1.ebuild b/net-analyzer/fping/fping-4.2-r1.ebuild
55 new file mode 100644
56 index 00000000000..0e1b61dd97e
57 --- /dev/null
58 +++ b/net-analyzer/fping/fping-4.2-r1.ebuild
59 @@ -0,0 +1,36 @@
60 +# Copyright 1999-2020 Gentoo Authors
61 +# Distributed under the terms of the GNU General Public License v2
62 +
63 +EAPI=7
64 +inherit fcaps
65 +
66 +DESCRIPTION="A utility to ping multiple hosts at once"
67 +HOMEPAGE="https://fping.org/"
68 +SRC_URI="https://fping.org/dist/${P}.tar.gz"
69 +
70 +LICENSE="fping"
71 +SLOT="0"
72 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
73 +IUSE="ipv6 suid"
74 +
75 +FILECAPS=( cap_net_raw+ep usr/sbin/fping )
76 +PATCHES=(
77 + "${FILESDIR}"/${PN}-4.2-fno-common.patch
78 + "${FILESDIR}"/${PN}-4.2-fping6-6.patch
79 +)
80 +
81 +src_configure() {
82 + econf $(use_enable ipv6)
83 +}
84 +
85 +src_install() {
86 + default
87 +
88 + if use suid; then
89 + fperms u+s /usr/sbin/fping
90 + fi
91 +
92 + if use ipv6; then
93 + dosym fping /usr/sbin/fping6
94 + fi
95 +}