public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/, net-misc/iputils/files/
@ 2015-08-20 12:21 Lars Wendler
  0 siblings, 0 replies; 10+ messages in thread
From: Lars Wendler @ 2015-08-20 12:21 UTC (permalink / raw
  To: gentoo-commits

commit:     8416ea962b3feb527e8ca0ed4d05c524f3a66b3a
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 20 12:18:18 2015 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Aug 20 12:18:18 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8416ea96

net-misc/iputils: Bump to version 20150815.

Package-Manager: portage-2.2.20.1
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 net-misc/iputils/Manifest                          |   2 +
 .../files/iputils-20150815-nonroot-floodping.patch |  11 ++
 .../files/iputils-20150815-ping6_crypto.patch      |  29 ++++
 .../files/iputils-20150815-ping_default_ipv4.patch |  65 ++++++++
 net-misc/iputils/iputils-20150815.ebuild           | 163 +++++++++++++++++++++
 net-misc/iputils/metadata.xml                      |   3 +
 6 files changed, 273 insertions(+)

diff --git a/net-misc/iputils/Manifest b/net-misc/iputils/Manifest
index 40e0b48..a1191dc 100644
--- a/net-misc/iputils/Manifest
+++ b/net-misc/iputils/Manifest
@@ -1,2 +1,4 @@
+DIST iputils-20150815.tar.gz 194508 SHA256 1f9c11783e9db90b3ebc43145e412160d989fb133a573638745379957c73c082 SHA512 ce899b1fa4b4a423c0430831d77eed660f7fdb98a0bf0532fd8dfa11f4b5f90c7b7d8199dd265fc0ac0e318f3ef2ef353f61bbd290cce77746df646a29edf85a WHIRLPOOL 763bc8b886d1678428be2dedb3060358ef06beeb7297c4197a4e7772d5919183a90ac35a8f933222d880edb60e169817128b605286379636acf63bc2d78e32f4
 DIST iputils-s20121221-manpages.tar.bz2 23778 SHA256 6fc7ed7d281b7a2ee00e4f75e5465c90498c685bcc988afdff74db4eaa736d1c SHA512 006be62e61bf1555c99dbd5aac270cbd8d1074a3016fdde3aeed47e5c9b1acd326aa30a596c532d6688827f7f61966a6e3141eaa3b6f4f943eb21ac227282d8c WHIRLPOOL da0ccb577c4b2189553419df2c093404752fb2865eb3e0bfececfc242d930ceb44f96b32d945cfdd0c9ca060359651b2ec8479db5cc9220cda412dfeee5e910d
 DIST iputils-s20121221.tar.bz2 155344 SHA256 450f549fc5b620c23c5929aa6d54b7ddfc7ee1cb1e8efdc5e8bb21d8d0c5319f SHA512 693d240becd766c345c3af2053fc0699b9358e54d667d40738c21d731b70e779112d81476a220d8300ca54250120385414a13610d445996f95a90571047389f4 WHIRLPOOL 64529180eb4b8e2f7a60c18df7cac49e10a4b7702514252d418b16dcdc10a85ccb0a7f8beb51274cc9d708be2026c4c136e720986795fd39d314e4f9d5590ec9
+DIST iputils-s20150815-manpages.tar.xz 22508 SHA256 d82fac64808f9a3f8dee114a62bc0a652243522bf8e535605eaf46d886c2febe SHA512 cb57758203aa49874cc14b4a92db8566775a62da6e50caa55f98e362348fe026898de7aded09f62b4c26e245e89ffde4a37a6810bdaa6619480071917009b1bb WHIRLPOOL f4616abf8857a46420a115ef2f3b6918ab36a1e5160ee8422e985d669672505a7c259a38dc09742405a467b3caa5d552653cfb3e07c15eab97e1326181cbfd99

diff --git a/net-misc/iputils/files/iputils-20150815-nonroot-floodping.patch b/net-misc/iputils/files/iputils-20150815-nonroot-floodping.patch
new file mode 100644
index 0000000..50e108b
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20150815-nonroot-floodping.patch
@@ -0,0 +1,11 @@
+--- iputils-s20150815/ping.h
++++ iputils-s20150815/ping.h
+@@ -61,7 +61,7 @@
+ 
+ #define	MAXWAIT		10		/* max seconds to wait for response */
+ #define MININTERVAL	10		/* Minimal interpacket gap */
+-#define MINUSERINTERVAL	200		/* Minimal allowed interval for non-root */
++#define MINUSERINTERVAL	0		/* Minimal allowed interval for non-root */
+ 
+ #define SCHINT(a)	(((a) <= MININTERVAL) ? MININTERVAL : (a))
+ 

diff --git a/net-misc/iputils/files/iputils-20150815-ping6_crypto.patch b/net-misc/iputils/files/iputils-20150815-ping6_crypto.patch
new file mode 100644
index 0000000..1e236ee
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20150815-ping6_crypto.patch
@@ -0,0 +1,29 @@
+From a45b719645960c9bacb430e452192d6ffac5be19 Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Thu, 20 Aug 2015 13:43:47 +0200
+Subject: [PATCH] Let ping6 use crypto if enabled.
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index e34be5b..d4cb6c0 100644
+--- a/Makefile
++++ b/Makefile
+@@ -159,9 +159,9 @@ LIB_clockdiff = $(LIB_CAP)
+ 
+ # ping / ping6
+ DEF_ping_common = $(DEF_CAP) $(DEF_IDN)
+-DEF_ping6_common = $(DEF_CAP) $(DEF_IDN)
++DEF_ping6_common = $(DEF_CAP) $(DEF_IDN) $(DEF_CRYPTO)
+ DEF_ping  = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_IPV4)
+-LIB_ping  = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV)
++LIB_ping  = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV) $(LIB_CRYPTO)
+ 
+ ping: ping_common.o ping6_common.o
+ ping.o ping_common.o ping6_common.o: ping.h in6_flowlabel.h
+-- 
+2.5.0
+

diff --git a/net-misc/iputils/files/iputils-20150815-ping_default_ipv4.patch b/net-misc/iputils/files/iputils-20150815-ping_default_ipv4.patch
new file mode 100644
index 0000000..71d32f0
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20150815-ping_default_ipv4.patch
@@ -0,0 +1,65 @@
+From 8d4d34eea9fbd25d0103975f366799764bbc4a2f Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Thu, 20 Aug 2015 11:47:22 +0200
+Subject: [PATCH] Add possibility to make ping use IPv4 by default.
+
+Using ping with a linux kernel without IPv6 capability yields to the
+following problem:
+
+> ping www.google.de
+ping: socket: Address family not supported by protocol (raw socket
+required by specified options).
+>
+
+because ping is using IPv6 by default when -4 option is omitted.
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ Makefile | 7 ++++++-
+ ping.c   | 5 +++++
+ 2 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 8b37c42..e34be5b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -114,6 +114,11 @@ ifeq ($(ENABLE_PING6_RTHDR),RFC3542)
+ endif
+ endif
+ 
++# DEFAULT TO IPV4
++ifneq ($(IPV4_DEFAULT),no)
++	DEF_IPV4 = -DIPV4_DEFAULT
++endif
++
+ # -------------------------------------
+ TARGETS=ping tracepath tracepath6 traceroute6 clockdiff rdisc arping tftpd rarpd
+ 
+@@ -155,7 +160,7 @@ LIB_clockdiff = $(LIB_CAP)
+ # ping / ping6
+ DEF_ping_common = $(DEF_CAP) $(DEF_IDN)
+ DEF_ping6_common = $(DEF_CAP) $(DEF_IDN)
+-DEF_ping  = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS)
++DEF_ping  = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_IPV4)
+ LIB_ping  = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV)
+ 
+ ping: ping_common.o ping6_common.o
+diff --git a/ping.c b/ping.c
+index ec9708e..a08a03e 100644
+--- a/ping.c
++++ b/ping.c
+@@ -439,6 +439,11 @@ main(int argc, char **argv)
+ 
+ 	target = argv[argc-1];
+ 
++#ifdef IPV4_DEFAULT
++	if (hints.ai_family == AF_UNSPEC)
++		hints.ai_family = AF_INET;
++#endif
++
+ 	/* Create sockets */
+ 	enable_capability_raw();
+ 	if (hints.ai_family != AF_INET6)
+-- 
+2.5.0
+

diff --git a/net-misc/iputils/iputils-20150815.ebuild b/net-misc/iputils/iputils-20150815.ebuild
new file mode 100644
index 0000000..8cf3708
--- /dev/null
+++ b/net-misc/iputils/iputils-20150815.ebuild
@@ -0,0 +1,163 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# For released versions, we precompile the man/html pages and store
+# them in a tarball on our mirrors.  This avoids ugly issues while
+# building stages, and when the jade/sgml packages are broken (which
+# seems to be more common than would be nice).
+
+EAPI="4"
+
+inherit flag-o-matic eutils toolchain-funcs fcaps
+if [[ ${PV} == "99999999" ]] ; then
+	EGIT_REPO_URI="https://github.com/iputils/iputils.git"
+	inherit git-r3
+else
+	SRC_URI="https://github.com/iputils/iputils/archive/s${PV}.tar.gz -> ${P}.tar.gz
+		http://dev.gentoo.org/~polynomial-c/iputils-s${PV}-manpages.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="Network monitoring tools including ping and ping6"
+HOMEPAGE="http://www.linuxfoundation.org/collaborate/workgroups/networking/iputils"
+
+LICENSE="BSD-4"
+SLOT="0"
+IUSE="arping caps clockdiff doc gcrypt idn ipv6 nettle +openssl rarpd rdisc SECURITY_HAZARD ssl static tftpd tracepath traceroute"
+
+LIB_DEPEND="caps? ( sys-libs/libcap[static-libs(+)] )
+	idn? ( net-dns/libidn[static-libs(+)] )
+	ipv6? ( ssl? (
+		gcrypt? ( dev-libs/libgcrypt[static-libs(+)] )
+		nettle? ( dev-libs/nettle[static-libs(+)] )
+		openssl? ( dev-libs/openssl:0[static-libs(+)] )
+	) )"
+RDEPEND="arping? ( !net-misc/arping )
+	rarpd? ( !net-misc/rarpd )
+	traceroute? ( !net-misc/traceroute )
+	!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+	static? ( ${LIB_DEPEND} )
+	virtual/os-headers"
+if [[ ${PV} == "99999999" ]] ; then
+	DEPEND+="
+		app-text/openjade
+		dev-perl/SGMLSpm
+		app-text/docbook-sgml-dtd
+		app-text/docbook-sgml-utils
+	"
+fi
+
+REQUIRED_USE="ipv6? ( ssl? ( ^^ ( gcrypt nettle openssl ) ) )"
+
+S=${WORKDIR}/${PN}-s${PV}
+
+PATCHES=(
+	"${FILESDIR}/021109-uclibc-no-ether_ntohost.patch"
+	"${FILESDIR}/${PN}-20150815-ping_default_ipv4.patch"
+	"${FILESDIR}/${PN}-20150815-ping6_crypto.patch"
+)
+
+src_prepare() {
+	epatch ${PATCHES[@]}
+	use SECURITY_HAZARD && epatch "${FILESDIR}"/${PN}-20150815-nonroot-floodping.patch
+}
+
+src_configure() {
+	use static && append-ldflags -static
+
+	TARGETS=(
+		ping
+		$(for v in arping clockdiff rarpd rdisc tftpd tracepath ; do usev ${v} ; done)
+	)
+	if use ipv6 ; then
+		TARGETS+=(
+			$(usex tracepath 'tracepath6' '')
+			$(usex traceroute 'traceroute6' '')
+		)
+	fi
+
+	myconf=(
+		USE_CRYPTO=no
+		USE_GCRYPT=no
+		USE_NETTLE=no
+	)
+
+	if use ipv6 && use ssl ; then
+		myconf=(
+			USE_CRYPTO=$(usex openssl)
+			USE_GCRYPT=$(usex gcrypt)
+			USE_NETTLE=$(usex nettle)
+		)
+	fi
+}
+
+src_compile() {
+	tc-export CC
+	emake \
+		USE_CAP=$(usex caps) \
+		USE_IDN=$(usex idn) \
+		IPV4_DEFAULT=$(usex ipv6 'no' 'yes') \
+		TARGETS="${TARGETS[*]}" \
+		${myconf[@]}
+
+	if [[ ${PV} == "99999999" ]] ; then
+		emake html man
+	fi
+}
+
+src_install() {
+	into /
+	dobin ping
+	dosym ping "${EPREFIX}"/bin/ping4
+	if use ipv6 ; then
+		dosym ping "${EPREFIX}"/bin/ping6
+		dosym ping.8 "${EPREFIX}"/usr/share/man/man8/ping6.8
+	fi
+	doman doc/ping.8
+
+	if use arping ; then
+		dobin arping
+		doman doc/arping.8
+	fi
+
+	into /usr
+
+	local u
+	for u in clockdiff rarpd rdisc tftpd tracepath ; do
+		if use ${u} ; then
+			case ${u} in
+			clockdiff) dobin ${u};;
+			*) dosbin ${u};;
+			esac
+			doman doc/${u}.8
+		fi
+	done
+
+	if use tracepath && use ipv6 ; then
+		dosbin tracepath6
+		dosym tracepath.8 "${EPREFIX}"/usr/share/man/man8/tracepath6.8
+	fi
+
+	if use traceroute && use ipv6 ; then
+		dosbin traceroute6
+		doman doc/traceroute6.8
+	fi
+
+	if use rarpd ; then
+		newinitd "${FILESDIR}"/rarpd.init.d rarpd
+		newconfd "${FILESDIR}"/rarpd.conf.d rarpd
+	fi
+
+	dodoc INSTALL RELNOTES
+
+	use doc && dohtml doc/*.html
+}
+
+pkg_postinst() {
+	fcaps cap_net_raw \
+		bin/ping \
+		$(usex arping 'bin/arping' '') \
+		$(usex clockdiff 'usr/bin/clockdiff' '')
+}

diff --git a/net-misc/iputils/metadata.xml b/net-misc/iputils/metadata.xml
index dc01592..183d454 100644
--- a/net-misc/iputils/metadata.xml
+++ b/net-misc/iputils/metadata.xml
@@ -5,6 +5,9 @@
   <use>
     <flag name="arping">Build and install arping -- tool for sending ARP requests to peers (see also <pkg>net-analyzer/arping</pkg>)</flag>
     <flag name="clockdiff">Build and install clockdiff -- tool for comparing clocks via ICMP packets</flag>
+    <flag name="gcrypt">Use <pkg>dev-libs/libgcrypt</pkg> for md5 support</flag>
+    <flag name="nettle">Use <pkg>dev-libs/nettle</pkg> for md5 support</flag>
+    <flag name="openssl">Use <pkg>dev-libs/openssl</pkg> for md5 support</flag>
     <flag name="rarpd">Build and install rarpd -- server for handling RARP (reverse ARP) requests; generally only used by old systems</flag>
     <flag name="rdisc">Build and install rdisc -- server for the client side of the ICMP router discover protocol</flag>
     <flag name="tftpd">Build and install tftpd -- server for the Trivial File Transfer Protocol (see also <pkg>net-ftp/tftp-hpa</pkg>)</flag>


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/, net-misc/iputils/files/
@ 2016-03-07 15:50 Lars Wendler
  0 siblings, 0 replies; 10+ messages in thread
From: Lars Wendler @ 2016-03-07 15:50 UTC (permalink / raw
  To: gentoo-commits

commit:     f300a385b4d4a54333b686d25db2a652360e3ac9
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Mar  7 15:49:42 2016 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Mar  7 15:50:12 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f300a385

net-misc/iputils: Replaced two patches with upstream equivalents.

Package-Manager: portage-2.2.27
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 .../files/iputils-20150815-defines_and_libs.patch  | 28 +++++++++
 ...ls-20150815-handle_single_protocol_system.patch | 70 ++++++++++++++++++++++
 .../files/iputils-20150815-ping6_crypto.patch      | 29 ---------
 .../files/iputils-20150815-ping_default_ipv4.patch | 65 --------------------
 net-misc/iputils/iputils-20150815-r1.ebuild        |  8 +--
 5 files changed, 102 insertions(+), 98 deletions(-)

diff --git a/net-misc/iputils/files/iputils-20150815-defines_and_libs.patch b/net-misc/iputils/files/iputils-20150815-defines_and_libs.patch
new file mode 100644
index 0000000..4def935
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20150815-defines_and_libs.patch
@@ -0,0 +1,28 @@
+From ba739daf98450fe725569724eefc64a2afdeb909 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pavel=20=C5=A0imerda?= <psimerda@redhat.com>
+Date: Thu, 20 Aug 2015 16:16:14 +0200
+Subject: [PATCH] ping: fix defines and libs in Makefile
+
+---
+ Makefile | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 9b0b70f..4eea516 100644
+--- a/Makefile
++++ b/Makefile
+@@ -153,10 +153,10 @@ DEF_clockdiff = $(DEF_CAP)
+ LIB_clockdiff = $(LIB_CAP)
+ 
+ # ping / ping6
+-DEF_ping_common = $(DEF_CAP) $(DEF_IDN)
+-DEF_ping6_common = $(DEF_CAP) $(DEF_IDN)
+-DEF_ping  = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS)
+-LIB_ping  = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV)
++DEF_ping = $(DEF_CAP) $(DEF_IDN) $(DEF_CRYPTO) $(DEF_WITHOUT_IFADDRS)
++DEF_ping_common = $(DEF_ping)
++DEF_ping6_common = $(DEF_ping)
++LIB_ping = $(LIB_CAP) $(LIB_IDN) $(LIB_CRYPTO) $(LIB_RESOLV)
+ 
+ ping: ping_common.o ping6_common.o
+ ping.o ping_common.o ping6_common.o: ping.h in6_flowlabel.h

diff --git a/net-misc/iputils/files/iputils-20150815-handle_single_protocol_system.patch b/net-misc/iputils/files/iputils-20150815-handle_single_protocol_system.patch
new file mode 100644
index 0000000..1bf98cc
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20150815-handle_single_protocol_system.patch
@@ -0,0 +1,70 @@
+From 9fd870a4bac0b8b2070c38452f378ef1eb7d460a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pavel=20=C5=A0imerda?= <psimerda@redhat.com>
+Date: Fri, 21 Aug 2015 00:55:56 +0200
+Subject: [PATCH] ping: handle single protocol systems
+
+---
+ ping.c | 28 ++++++++++++++++++----------
+ 1 file changed, 18 insertions(+), 10 deletions(-)
+
+diff --git a/ping.c b/ping.c
+index ec9708e..95a10a7 100644
+--- a/ping.c
++++ b/ping.c
+@@ -110,26 +110,26 @@ static struct sockaddr_in source = { .sin_family = AF_INET };
+ static char *device;
+ static int pmtudisc = -1;
+ 
+-static void create_socket(socket_st *sock, int family, int socktype, int protocol)
++static void create_socket(socket_st *sock, int family, int socktype, int protocol, int requisite)
+ {
+ 	errno = 0;
+ 
+ 	sock->fd = socket(family, socktype, protocol);
+ 
+-	/* Fallback to raw socket when ping socket failed */
+-	if (sock->fd == -1 && socktype == SOCK_DGRAM) {
++	/* Attempt creating a raw socket when ping socket failed */
++	if (sock->fd == -1 && errno != EAFNOSUPPORT && socktype == SOCK_DGRAM) {
+ 		if (options & F_VERBOSE)
+ 			fprintf(stderr, "ping: socket: %s, attempting raw socket...\n", strerror(errno));
+-		create_socket(sock, family, SOCK_RAW, protocol);
++		create_socket(sock, family, SOCK_RAW, protocol, requisite);
+ 		return;
+ 	}
+ 
+ 	if (sock->fd == -1) {
+-		if (socktype == SOCK_RAW)
+-			fprintf(stderr, "ping: socket: %s (raw socket required by specified options).\n", strerror(errno));
+-		else
++		if (requisite || errno != EAFNOSUPPORT || options & F_VERBOSE)
+ 			fprintf(stderr, "ping: socket: %s\n", strerror(errno));
+-		exit(2);
++		if (requisite)
++			exit(2);
++		return;
+ 	}
+ 
+ 	sock->socktype = socktype;
+@@ -442,11 +442,19 @@ main(int argc, char **argv)
+ 	/* Create sockets */
+ 	enable_capability_raw();
+ 	if (hints.ai_family != AF_INET6)
+-		create_socket(&sock4, AF_INET, hints.ai_socktype, IPPROTO_ICMP);
++		create_socket(&sock4, AF_INET, hints.ai_socktype, IPPROTO_ICMP, hints.ai_family == AF_INET);
+ 	if (hints.ai_family != AF_INET)
+-		create_socket(&sock6, AF_INET6, hints.ai_socktype, IPPROTO_ICMPV6);
++		create_socket(&sock6, AF_INET6, hints.ai_socktype, IPPROTO_ICMPV6, sock4.fd == -1);
+ 	disable_capability_raw();
+ 
++	/* Limit address family on single-protocol systems */
++	if (hints.ai_family == AF_UNSPEC) {
++		if (sock4.fd == -1)
++			hints.ai_family = AF_INET6;
++		else if (sock6.fd == -1)
++			hints.ai_family = AF_INET;
++	}
++
+ 	/* Set socket options */
+ 	if (settos)
+ 		set_socket_option(&sock4, IPPROTO_IP, IP_TOS, &settos, sizeof settos);

diff --git a/net-misc/iputils/files/iputils-20150815-ping6_crypto.patch b/net-misc/iputils/files/iputils-20150815-ping6_crypto.patch
deleted file mode 100644
index 1e236ee..0000000
--- a/net-misc/iputils/files/iputils-20150815-ping6_crypto.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From a45b719645960c9bacb430e452192d6ffac5be19 Mon Sep 17 00:00:00 2001
-From: Lars Wendler <polynomial-c@gentoo.org>
-Date: Thu, 20 Aug 2015 13:43:47 +0200
-Subject: [PATCH] Let ping6 use crypto if enabled.
-
-Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
----
- Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index e34be5b..d4cb6c0 100644
---- a/Makefile
-+++ b/Makefile
-@@ -159,9 +159,9 @@ LIB_clockdiff = $(LIB_CAP)
- 
- # ping / ping6
- DEF_ping_common = $(DEF_CAP) $(DEF_IDN)
--DEF_ping6_common = $(DEF_CAP) $(DEF_IDN)
-+DEF_ping6_common = $(DEF_CAP) $(DEF_IDN) $(DEF_CRYPTO)
- DEF_ping  = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_IPV4)
--LIB_ping  = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV)
-+LIB_ping  = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV) $(LIB_CRYPTO)
- 
- ping: ping_common.o ping6_common.o
- ping.o ping_common.o ping6_common.o: ping.h in6_flowlabel.h
--- 
-2.5.0
-

diff --git a/net-misc/iputils/files/iputils-20150815-ping_default_ipv4.patch b/net-misc/iputils/files/iputils-20150815-ping_default_ipv4.patch
deleted file mode 100644
index 71d32f0..0000000
--- a/net-misc/iputils/files/iputils-20150815-ping_default_ipv4.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 8d4d34eea9fbd25d0103975f366799764bbc4a2f Mon Sep 17 00:00:00 2001
-From: Lars Wendler <polynomial-c@gentoo.org>
-Date: Thu, 20 Aug 2015 11:47:22 +0200
-Subject: [PATCH] Add possibility to make ping use IPv4 by default.
-
-Using ping with a linux kernel without IPv6 capability yields to the
-following problem:
-
-> ping www.google.de
-ping: socket: Address family not supported by protocol (raw socket
-required by specified options).
->
-
-because ping is using IPv6 by default when -4 option is omitted.
-
-Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
----
- Makefile | 7 ++++++-
- ping.c   | 5 +++++
- 2 files changed, 11 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 8b37c42..e34be5b 100644
---- a/Makefile
-+++ b/Makefile
-@@ -114,6 +114,11 @@ ifeq ($(ENABLE_PING6_RTHDR),RFC3542)
- endif
- endif
- 
-+# DEFAULT TO IPV4
-+ifneq ($(IPV4_DEFAULT),no)
-+	DEF_IPV4 = -DIPV4_DEFAULT
-+endif
-+
- # -------------------------------------
- TARGETS=ping tracepath tracepath6 traceroute6 clockdiff rdisc arping tftpd rarpd
- 
-@@ -155,7 +160,7 @@ LIB_clockdiff = $(LIB_CAP)
- # ping / ping6
- DEF_ping_common = $(DEF_CAP) $(DEF_IDN)
- DEF_ping6_common = $(DEF_CAP) $(DEF_IDN)
--DEF_ping  = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS)
-+DEF_ping  = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_IPV4)
- LIB_ping  = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV)
- 
- ping: ping_common.o ping6_common.o
-diff --git a/ping.c b/ping.c
-index ec9708e..a08a03e 100644
---- a/ping.c
-+++ b/ping.c
-@@ -439,6 +439,11 @@ main(int argc, char **argv)
- 
- 	target = argv[argc-1];
- 
-+#ifdef IPV4_DEFAULT
-+	if (hints.ai_family == AF_UNSPEC)
-+		hints.ai_family = AF_INET;
-+#endif
-+
- 	/* Create sockets */
- 	enable_capability_raw();
- 	if (hints.ai_family != AF_INET6)
--- 
-2.5.0
-

diff --git a/net-misc/iputils/iputils-20150815-r1.ebuild b/net-misc/iputils/iputils-20150815-r1.ebuild
index a23f1b9..5227963 100644
--- a/net-misc/iputils/iputils-20150815-r1.ebuild
+++ b/net-misc/iputils/iputils-20150815-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -7,7 +7,7 @@
 # building stages, and when the jade/sgml packages are broken (which
 # seems to be more common than would be nice).
 
-EAPI="4"
+EAPI=5
 
 inherit flag-o-matic eutils toolchain-funcs fcaps
 if [[ ${PV} == "99999999" ]] ; then
@@ -58,8 +58,8 @@ S=${WORKDIR}/${PN}-s${PV}
 
 PATCHES=(
 	"${FILESDIR}/021109-uclibc-no-ether_ntohost.patch"
-	"${FILESDIR}/${PN}-20150815-ping_default_ipv4.patch"
-	"${FILESDIR}/${PN}-20150815-ping6_crypto.patch"
+	"${FILESDIR}/${PN}-20150815-defines_and_libs.patch"
+	"${FILESDIR}/${PN}-20150815-handle_single_protocol_system.patch"
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/, net-misc/iputils/files/
@ 2017-10-28 14:47 Thomas Deutschmann
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Deutschmann @ 2017-10-28 14:47 UTC (permalink / raw
  To: gentoo-commits

commit:     c80f7a43e5789f3be0e39bbae4c29b6e25ab5e61
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 28 14:40:16 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Oct 28 14:46:00 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c80f7a43

net-misc/iputils: Update live ebuild

Closes: https://github.com/gentoo/gentoo/pull/5591
Closes: https://bugs.gentoo.org/628240
Package-Manager: Portage-2.3.13, Repoman-2.3.4

 .../files/iputils-99999999-tracepath46.patch       | 30 +++++++++++++
 net-misc/iputils/iputils-99999999.ebuild           | 51 +++++++++++++---------
 2 files changed, 61 insertions(+), 20 deletions(-)

diff --git a/net-misc/iputils/files/iputils-99999999-tracepath46.patch b/net-misc/iputils/files/iputils-99999999-tracepath46.patch
new file mode 100644
index 00000000000..20d017b34ee
--- /dev/null
+++ b/net-misc/iputils/files/iputils-99999999-tracepath46.patch
@@ -0,0 +1,30 @@
+From 2c4d0838dda90515d4971881d86e8b969baebe01 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Thu, 19 Oct 2017 17:38:20 +0200
+Subject: [PATCH] tracepath: Support calling `tracepath` as `tracepath4` or
+ `tracepath6`
+
+---
+ tracepath.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/tracepath.c b/tracepath.c
+index b0eb911..d2a6edf 100644
+--- a/tracepath.c
++++ b/tracepath.c
+@@ -394,6 +394,12 @@ int main(int argc, char **argv)
+ 	setlocale(LC_ALL, "");
+ #endif
+ 
++	/* Support being called using `tracepath4` or `tracepath6` symlinks */
++	if (argv[0][strlen(argv[0])-1] == '4')
++		hints.ai_family = AF_INET;
++	else if (argv[0][strlen(argv[0])-1] == '6')
++		hints.ai_family = AF_INET6;
++
+ 	while ((ch = getopt(argc, argv, "46nbh?l:m:p:")) != EOF) {
+ 		switch(ch) {
+ 		case '4':
+-- 
+2.14.3
+

diff --git a/net-misc/iputils/iputils-99999999.ebuild b/net-misc/iputils/iputils-99999999.ebuild
index ce003cbf4fe..9731575e02e 100644
--- a/net-misc/iputils/iputils-99999999.ebuild
+++ b/net-misc/iputils/iputils-99999999.ebuild
@@ -3,20 +3,22 @@
 
 # For released versions, we precompile the man/html pages and store
 # them in a tarball on our mirrors.  This avoids ugly issues while
-# building stages, and when the jade/sgml packages are broken (which
-# seems to be more common than would be nice).
-# Required packages for doc generation:
-# app-text/docbook-sgml-utils
+# building stages, and reduces depedencies.
+# To regenerate man/html pages emerge iputils-99999999[doc] with
+# EGIT_COMMIT set to release tag and tar ${S}/doc folder.
 
-EAPI=5
+EAPI="6"
+
+inherit flag-o-matic toolchain-funcs fcaps
+
+PATCHES=( "${FILESDIR}"/${PN}-99999999-tracepath46.patch )
 
-inherit flag-o-matic eutils toolchain-funcs fcaps
 if [[ ${PV} == "99999999" ]] ; then
 	EGIT_REPO_URI="https://github.com/iputils/iputils.git"
 	inherit git-r3
 else
 	SRC_URI="https://github.com/iputils/iputils/archive/s${PV}.tar.gz -> ${P}.tar.gz
-		https://dev.gentoo.org/~polynomial-c/iputils-s${PV}-manpages.tar.xz"
+		https://dev.gentoo.org/~whissi/dist/iputils/${PN}-manpages-${PV}.tar.xz"
 	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux"
 fi
 
@@ -43,13 +45,13 @@ RDEPEND="arping? ( !net-misc/arping )
 	!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
 DEPEND="${RDEPEND}
 	static? ( ${LIB_DEPEND} )
-	virtual/os-headers"
+	virtual/os-headers
+"
 if [[ ${PV} == "99999999" ]] ; then
-	DEPEND+="
-		app-text/openjade
-		dev-perl/SGMLSpm
-		app-text/docbook-sgml-dtd
-		app-text/docbook-sgml-utils
+	DEPEND+="app-text/docbook-xml-dtd:4.2
+		app-text/docbook-xml-dtd:4.5
+		app-text/docbook-xsl-stylesheets
+		dev-libs/libxslt:0
 	"
 fi
 
@@ -58,7 +60,9 @@ REQUIRED_USE="ipv6? ( ssl? ( ^^ ( gcrypt nettle openssl ) ) )"
 [ "${PV}" = "99999999" ] || S="${WORKDIR}/${PN}-s${PV}"
 
 src_prepare() {
-	use SECURITY_HAZARD && epatch "${FILESDIR}"/${PN}-20150815-nonroot-floodping.patch
+	use SECURITY_HAZARD && PATCHES+=( "${FILESDIR}"/${PN}-20150815-nonroot-floodping.patch )
+
+	default
 }
 
 src_configure() {
@@ -70,7 +74,6 @@ src_configure() {
 	)
 	if use ipv6 ; then
 		TARGETS+=(
-			$(usex tracepath 'tracepath6' '')
 			$(usex traceroute 'traceroute6' '')
 		)
 	fi
@@ -100,7 +103,9 @@ src_compile() {
 		${myconf[@]}
 
 	if [[ ${PV} == "99999999" ]] ; then
-		emake html man
+		emake man
+
+		use doc && emake html
 	fi
 }
 
@@ -121,8 +126,14 @@ src_install() {
 
 	into /usr
 
+	if use tracepath ; then
+		dosbin tracepath
+		doman doc/tracepath.8
+		dosym tracepath /usr/sbin/tracepath4
+	fi
+
 	local u
-	for u in clockdiff rarpd rdisc tftpd tracepath ; do
+	for u in clockdiff rarpd rdisc tftpd ; do
 		if use ${u} ; then
 			case ${u} in
 			clockdiff) dobin ${u};;
@@ -133,7 +144,7 @@ src_install() {
 	done
 
 	if use tracepath && use ipv6 ; then
-		dosbin tracepath6
+		dosym tracepath /usr/sbin/tracepath6
 		dosym tracepath.8 /usr/share/man/man8/tracepath6.8
 	fi
 
@@ -147,9 +158,9 @@ src_install() {
 		newconfd "${FILESDIR}"/rarpd.conf.d rarpd
 	fi
 
-	dodoc INSTALL.md RELNOTES
+	dodoc INSTALL.md
 
-	use doc && dohtml doc/*.html
+	use doc && dodoc doc/*.html
 }
 
 pkg_postinst() {


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/, net-misc/iputils/files/
@ 2018-05-16 19:26 Lars Wendler
  0 siblings, 0 replies; 10+ messages in thread
From: Lars Wendler @ 2018-05-16 19:26 UTC (permalink / raw
  To: gentoo-commits

commit:     034a66e5627fc629c4e43a5e49c2b483cac08333
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed May 16 19:24:50 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed May 16 19:26:21 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=034a66e5

net-misc/iputils: Removed old.

Package-Manager: Portage-2.3.36, Repoman-2.3.9

 net-misc/iputils/Manifest                          |   8 -
 .../files/iputils-20071127-nonroot-floodping.patch |  11 -
 .../files/iputils-20121221-crypto-build.patch      |  35 ----
 .../iputils/files/iputils-20121221-makefile.patch  |  61 ------
 .../iputils/files/iputils-20121221-openssl.patch   |  92 ---------
 .../files/iputils-20121221-owl-pingsock.diff       | 224 ---------------------
 .../files/iputils-20121221-parallel-doc.patch      |  74 -------
 .../files/iputils-20121221-printf-size.patch       |  64 ------
 .../iputils/files/iputils-20121221-strtod.patch    |  45 -----
 .../files/iputils-20121221-tftpd-setid.patch       |  34 ----
 .../files/iputils-20121221-tftpd-syslog.patch      |  38 ----
 .../iputils/files/iputils-99999999-openssl.patch   |  97 ---------
 .../files/iputils-99999999-tftpd-syslog.patch      |  38 ----
 net-misc/iputils/iputils-20121221-r1.ebuild        | 103 ----------
 net-misc/iputils/iputils-20121221-r2.ebuild        | 153 --------------
 net-misc/iputils/iputils-20151218.ebuild           | 158 ---------------
 net-misc/iputils/iputils-20160308.ebuild           | 165 ---------------
 net-misc/iputils/iputils-20161105.ebuild           | 168 ----------------
 18 files changed, 1568 deletions(-)

diff --git a/net-misc/iputils/Manifest b/net-misc/iputils/Manifest
index db05f47bd4f..4bd330cb3a8 100644
--- a/net-misc/iputils/Manifest
+++ b/net-misc/iputils/Manifest
@@ -1,10 +1,2 @@
-DIST iputils-20160308.tar.gz 195348 BLAKE2B d034454921a117307c5092c5b44c250cb90ab96d4b0331cf0c7645523159d3f615746edf6c70faf5b13a2a58761fcb4dbe09043cd486ddc56586a9716f98ca5a SHA512 6b4d6e58ab8f1218f3ab52da695f252bd3e0004ffce755f2378b44fc3b4fbf9beb9beef51ff12f14348a07f6fe8525e64dba7f5d7b70997423d2c98c5ff7dde2
-DIST iputils-20161105.tar.gz 195879 BLAKE2B 3aacbe2a507415d43e524329df269d8a435b529c2e0bdd5387f4711a63ede46968f285dbf78491341013188b3c929e2e717898fed44c5c211fe15946bfe214a4 SHA512 1593077b6eff1e57eb8a32897dd9624a745d0c87db1501a96436b168b109ef22d41ee69406a4a2154d8d72c823c1df723b4c52eeec8d82ba2762fb01dc0d4797
 DIST iputils-20171016_pre.tar.gz 195254 BLAKE2B 1170db29d53dd8285b11d4df7b7da2ea3bd2be3599a3f0df85ca7e64247f2a534d03e43a2b6267ba4b9c0b65fcc58045151833ae2c1035a839ed728a389804af SHA512 570896fc58d945e08032134701ab6ea02bbf6fff420437bc5f89687cdcce6f3c1c64418a4c5ff54ca3cdc582bae2c95e196b2c8368eba2b163ebf88490aabf99
 DIST iputils-manpages-20171016_pre.tar.xz 29764 BLAKE2B 47def1413b2cdcfba7f924dd7a045063c289c244ba8fb4dc43caf2a8d52032b57ee6d86ee4dffd5351faa3124d4c83a33ca3365866568c2164b374eed9d70ec0 SHA512 31b4b0b4e46d7c98530577392c636e4397917cbe415762145a119e68e3223bc85b9d5afcfe61ae01584a35f6a1a772adffc52deeedc722c474179fa1d208d8d9
-DIST iputils-s20121221-manpages.tar.bz2 23778 BLAKE2B 6b781f7df17b272bf19ba41a7d9a1449526b60f5f596c2201dcf489caf776b74e6a9de2bfff67fada2e9e0480b49a2dce341ce8e5d13c82d6ffd2a0b65bf2c49 SHA512 006be62e61bf1555c99dbd5aac270cbd8d1074a3016fdde3aeed47e5c9b1acd326aa30a596c532d6688827f7f61966a6e3141eaa3b6f4f943eb21ac227282d8c
-DIST iputils-s20121221.tar.bz2 155344 BLAKE2B bef1fc6e0484fa43fe34b3c50e9060b0bb2a76cc4912e306143a5b74ff6c42d4cfd1db890548d8d684540f0aabf949def521e2562d7878a7042095e7b19cfd9c SHA512 693d240becd766c345c3af2053fc0699b9358e54d667d40738c21d731b70e779112d81476a220d8300ca54250120385414a13610d445996f95a90571047389f4
-DIST iputils-s20151218-manpages.tar.xz 22336 BLAKE2B ea19d5bc399cadc73c137badbe304383be0b0b0794db1b655fe766c87684b760664e986ed513a5717e5cfd4b068b0800ba188f10dca5a75215891754b1208e62 SHA512 964b9e22b18b67215ea48e046c45768cd86076b53db2131b00ac721be9e7de4edadefb74855d81861f12b4e10dcecd90d29f0098c2c4568d7601d97e756be0a3
-DIST iputils-s20151218.tar.bz2 157187 BLAKE2B d739fdc696b3592ec49ee98163a31bac364fc6cd9136510c34ecddd789d0ebdd76c92ed740fe6e2f098db086aa2885e9f48b94b8f43badd208ddcb6f9332a5dd SHA512 4bf0eed0ae5603e872afb0e09be039df3822a7723e8cbb8cbe578d69d8c457ffac9bdbe2eb17b32c95968e5e4ad6204af955617482c5701671f0f476b560b65c
-DIST iputils-s20160308-manpages.tar.xz 22684 BLAKE2B 4c9a8278640b55ffce0cbb929b89fe528716905bcb119d949ad4bc41b8fe74c6b6822d2a623e377c71ca0a82ee48d7fadb770e395a9acdbfedd43da0790ff910 SHA512 fe55ee334f1a99c6d93f4d18d97666d307676ced77175b73139f888af8f4f0ddc0f1d0511ab71d234f57909def606bf5c3aede2db28a0f73eb5628b9c8e16cac
-DIST iputils-s20161105-manpages.tar.xz 22660 BLAKE2B ae764e66ebbd3e77a0583b7191532a0d8774fc5713c239f00f35c624868a9d6ea8507175153f1025ffb01d854d96ba3c542006d3966119e4fd021899ec114ad1 SHA512 10cf22e1c2bf4ab90818e2120638d250ccefd65f19545cc9662537a31ab525089309b505759a347f09f1439800e291d7fa22f38bdec5460d41bd40f323412279

diff --git a/net-misc/iputils/files/iputils-20071127-nonroot-floodping.patch b/net-misc/iputils/files/iputils-20071127-nonroot-floodping.patch
deleted file mode 100644
index cae87791dc2..00000000000
--- a/net-misc/iputils/files/iputils-20071127-nonroot-floodping.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- iputils-s20071127/ping_common.h.orig	2008-06-10 11:16:06.000000000 +0100
-+++ iputils-s20071127/ping_common.h	2008-06-10 11:16:18.000000000 +0100
-@@ -28,7 +28,7 @@
- 
- #define	MAXWAIT		10		/* max seconds to wait for response */
- #define MININTERVAL	10		/* Minimal interpacket gap */
--#define MINUSERINTERVAL	200		/* Minimal allowed interval for non-root */
-+#define MINUSERINTERVAL	0		/* Minimal allowed interval for non-root */
- 
- #define SCHINT(a)	(((a) <= MININTERVAL) ? MININTERVAL : (a))
- 

diff --git a/net-misc/iputils/files/iputils-20121221-crypto-build.patch b/net-misc/iputils/files/iputils-20121221-crypto-build.patch
deleted file mode 100644
index 1ec3c101d52..00000000000
--- a/net-misc/iputils/files/iputils-20121221-crypto-build.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 568e990d30fc7e9416e0a6f8c74ea5013921eaec Mon Sep 17 00:00:00 2001
-From: Arjan van de Ven <arjanvandeven@gmail.com>
-Date: Wed, 16 Jan 2013 03:12:15 +0900
-Subject: [PATCH [iputils]] ping6: Fix build command line argument with gnutls.
-
-The ping6 command can use either openssl or gnutls...
-and the Makefile has a bunch of setup for defining which of the two to use.
-
-Unfortunately, the final -D define on the commandline to enable gnutls
-inside the ping6.c file didn't actually make it onto the gcc
-commandline.
-This patch adds the $(DEF_CRYPTO) Makefile variable to fix this gap.
-
-Signed-off-by: Arjan van de Ven <arjanvandeven@gmail.com>
-Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index c62d9df..89249f5 100644
---- a/Makefile
-+++ b/Makefile
-@@ -149,7 +149,7 @@ LIB_clockdiff = $(LIB_CAP)
- DEF_ping_common = $(DEF_CAP) $(DEF_IDN)
- DEF_ping  = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS)
- LIB_ping  = $(LIB_CAP) $(LIB_IDN)
--DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR)
-+DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR) $(DEF_CRYPTO)
- LIB_ping6 = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV) $(LIB_CRYPTO)
- 
- ping: ping_common.o
--- 
-1.8.0.2
-

diff --git a/net-misc/iputils/files/iputils-20121221-makefile.patch b/net-misc/iputils/files/iputils-20121221-makefile.patch
deleted file mode 100644
index 66424c85cf8..00000000000
--- a/net-misc/iputils/files/iputils-20121221-makefile.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From c66609d2c830d6fe06f48f5d38c54eb5cc6f2975 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Thu, 24 Jan 2013 23:36:16 -0500
-Subject: [PATCH [iputils]] fix handling of CFLAGS
-
-This defaults CFLAGS to -O3 without clobbering settings people have set
-up in the environment already.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- Makefile | 13 +++++--------
- 1 file changed, 5 insertions(+), 8 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 2c49940..ecabac3 100644
---- a/Makefile
-+++ b/Makefile
-@@ -2,8 +2,6 @@
- # Configuration
- #
- 
--# CC
--CC=gcc
- # Path to parent kernel include files directory
- LIBC_INCLUDE=/usr/include
- # Libraries
-@@ -48,11 +46,10 @@ ENABLE_RDISC_SERVER=no
- 
- # -------------------------------------
- # What a pity, all new gccs are buggy and -Werror does not work. Sigh.
--# CCOPT=-fno-strict-aliasing -Wstrict-prototypes -Wall -Werror -g
--CCOPT=-fno-strict-aliasing -Wstrict-prototypes -Wall -g
--CCOPTOPT=-O3
--GLIBCFIX=-D_GNU_SOURCE
--DEFINES=
-+# CFLAGS+=-fno-strict-aliasing -Wstrict-prototypes -Wall -Werror -g
-+CFLAGS?=-O3 -g
-+CFLAGS+=-fno-strict-aliasing -Wstrict-prototypes -Wall
-+CPPFLAGS+=-D_GNU_SOURCE
- LDLIB=
- 
- FUNC_LIB = $(if $(filter static,$(1)),$(LDFLAG_STATIC) $(2) $(LDFLAG_DYNAMIC),$(2))
-@@ -113,7 +110,6 @@ IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
- IPV6_TARGETS=tracepath6 traceroute6 ping6
- TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
- 
--CFLAGS=$(CCOPTOPT) $(CCOPT) $(GLIBCFIX) $(DEFINES)
- LDLIBS=$(LDLIB) $(ADDLIB)
- 
- UNAME_N:=$(shell uname -n)
-@@ -132,6 +128,7 @@ all: $(TARGETS)
- 	$(COMPILE.c) $< $(DEF_$(patsubst %.o,%,$@)) -S -o $@
- %.o: %.c
- 	$(COMPILE.c) $< $(DEF_$(patsubst %.o,%,$@)) -o $@
-+LINK.o += $(CFLAGS)
- $(TARGETS): %: %.o
- 	$(LINK.o) $^ $(LIB_$@) $(LDLIBS) -o $@
- 
--- 
-1.8.0.2
-

diff --git a/net-misc/iputils/files/iputils-20121221-openssl.patch b/net-misc/iputils/files/iputils-20121221-openssl.patch
deleted file mode 100644
index 1c6ba81dab8..00000000000
--- a/net-misc/iputils/files/iputils-20121221-openssl.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From b57d77dcfa5cb363b7eba5b331324669a8505ac4 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Thu, 24 Jan 2013 23:32:39 -0500
-Subject: [PATCH [iputils]] ping6: allow disabling of openssl support
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- Makefile |  5 ++++-
- ping6.c  | 14 +++++++++++++-
- 2 files changed, 17 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 89249f5..2c49940 100644
---- a/Makefile
-+++ b/Makefile
-@@ -36,7 +36,7 @@ ARPING_DEFAULT_DEVICE=
- 
- # GNU TLS library for ping6 [yes|no|static]
- USE_GNUTLS=yes
--# Crypto library for ping6 [shared|static]
-+# Crypto library for ping6 [shared|static|no]
- USE_CRYPTO=shared
- # Resolv library for ping6 [yes|static]
- USE_RESOLV=yes
-@@ -63,7 +63,10 @@ ifneq ($(USE_GNUTLS),no)
- 	LIB_CRYPTO = $(call FUNC_LIB,$(USE_GNUTLS),$(LDFLAG_GNUTLS))
- 	DEF_CRYPTO = -DUSE_GNUTLS
- else
-+ifneq ($(USE_CRYPTO),no)
- 	LIB_CRYPTO = $(call FUNC_LIB,$(USE_CRYPTO),$(LDFLAG_CRYPTO))
-+	DEF_CRYPTO = -DUSE_OPENSSL
-+endif
- endif
- 
- # USE_RESOLV: LIB_RESOLV
-diff --git a/ping6.c b/ping6.c
-index c39864d..f2f90af 100644
---- a/ping6.c
-+++ b/ping6.c
-@@ -168,8 +168,10 @@ static int icmp_sock;
- 
- #ifdef USE_GNUTLS
- # include <gnutls/openssl.h>
--#else
-+# define USE_CRYPTO
-+#elif defined USE_OPENSSL
- # include <openssl/md5.h>
-+# define USE_CRYPTO
- #endif
- 
- /* Node Information query */
-@@ -326,6 +328,7 @@ static void niquery_init_nonce(void)
- #if !PING6_NONCE_MEMORY
- static int niquery_nonce(__u8 *nonce, int fill)
- {
-+# ifdef USE_CRYPTO
- 	static __u8 digest[MD5_DIGEST_LENGTH];
- 	static int seq = -1;
- 
-@@ -348,6 +351,10 @@ static int niquery_nonce(__u8 *nonce, int fill)
- 			return -1;
- 		return ntohsp((__u16 *)nonce);
- 	}
-+# else
-+	fprintf(stderr, "ping6: function not available; crypto disabled\n");
-+	exit(3);
-+# endif
- }
- #endif
- 
-@@ -502,6 +509,7 @@ static int niquery_option_subject_addr_handler(int index, const char *arg)
- 
- static int niquery_option_subject_name_handler(int index, const char *arg)
- {
-+#ifdef USE_CRYPTO
- 	static char nigroup_buf[INET6_ADDRSTRLEN + 1 + IFNAMSIZ];
- 	unsigned char *dnptrs[2], **dpp, **lastdnptr;
- 	int n;
-@@ -627,6 +635,10 @@ errexit:
- 	free(idn);
- 	free(name);
- 	exit(1);
-+#else
-+	fprintf(stderr, "ping6: function not available; crypto disabled\n");
-+	exit(3);
-+#endif
- }
- 
- int niquery_option_help_handler(int index, const char *arg)
--- 
-1.8.0.2
-

diff --git a/net-misc/iputils/files/iputils-20121221-owl-pingsock.diff b/net-misc/iputils/files/iputils-20121221-owl-pingsock.diff
deleted file mode 100644
index 283aa989f32..00000000000
--- a/net-misc/iputils/files/iputils-20121221-owl-pingsock.diff
+++ /dev/null
@@ -1,224 +0,0 @@
-http://openwall.info/wiki/people/segoon/ping
-
---- iputils-s20101006/ping.c
-+++ iputils-s20101006/ping.c
-@@ -88,6 +88,7 @@ struct sockaddr_in whereto;	/* who to pi
- int optlen = 0;
- int settos = 0;			/* Set TOS, Precendence or other QOS options */
- int icmp_sock;			/* socket file descriptor */
-+int using_ping_socket = 0;
- u_char outpack[0x10000];
- int maxpacket = sizeof(outpack);
- 
-@@ -123,7 +124,11 @@ main(int argc, char **argv)
- 	char *target, hnamebuf[MAX_HOSTNAMELEN];
- 	char rspace[3 + 4 * NROUTES + 1];	/* record route space */
- 
--	icmp_sock = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
-+	icmp_sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP);
-+	if (icmp_sock != -1)
-+		using_ping_socket = 1;
-+	else
-+		icmp_sock = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
- 	socket_errno = errno;
- 
- 	uid = getuid();
-@@ -377,13 +382,35 @@ main(int argc, char **argv)
- 		}
- 	}
- 
--	if ((options&F_STRICTSOURCE) &&
--	    bind(icmp_sock, (struct sockaddr*)&source, sizeof(source)) == -1) {
--		perror("bind");
--		exit(2);
-+	if (!using_ping_socket) {
-+		if ((options&F_STRICTSOURCE) &&
-+		    bind(icmp_sock, (struct sockaddr*)&source, sizeof(source)) == -1) {
-+			perror("bind");
-+			exit(2);
-+		}
-+	} else {
-+		struct sockaddr_in sa;
-+		socklen_t sl;
-+
-+		sa.sin_family = AF_INET;
-+		sa.sin_port = 0;
-+		sa.sin_addr.s_addr = (options&F_STRICTSOURCE) ?
-+			source.sin_addr.s_addr : 0;
-+		sl = sizeof(sa);
-+
-+		if (bind(icmp_sock, (struct sockaddr *) &sa, sl) == -1) {
-+			perror("bind");
-+			exit(2);
-+		}
-+
-+		if (getsockname(icmp_sock, (struct sockaddr *) &sa, &sl) == -1) {
-+			perror("getsockname");
-+			exit(2);
-+		}
-+		ident = sa.sin_port;
- 	}
- 
--	if (1) {
-+	if (!using_ping_socket) {
- 		struct icmp_filter filt;
- 		filt.data = ~((1<<ICMP_SOURCE_QUENCH)|
- 			      (1<<ICMP_DEST_UNREACH)|
-@@ -398,6 +425,12 @@ main(int argc, char **argv)
- 	hold = 1;
- 	if (setsockopt(icmp_sock, SOL_IP, IP_RECVERR, (char *)&hold, sizeof(hold)))
- 		fprintf(stderr, "WARNING: your kernel is veeery old. No problems.\n");
-+	if (using_ping_socket) {
-+		if (setsockopt(icmp_sock, SOL_IP, IP_RECVTTL, (char *)&hold, sizeof(hold)))
-+			perror("WARNING: setsockopt(IP_RECVTTL)");
-+		if (setsockopt(icmp_sock, SOL_IP, IP_RETOPTS, (char *)&hold, sizeof(hold)))
-+			perror("WARNING: setsockopt(IP_RETOPTS)");
-+	}
- 
- 	/* record route option */
- 	if (options & F_RROUTE) {
-@@ -566,6 +599,7 @@ int receive_error_msg()
- 		nerrors++;
- 	} else if (e->ee_origin == SO_EE_ORIGIN_ICMP) {
- 		struct sockaddr_in *sin = (struct sockaddr_in*)(e+1);
-+		int error_pkt;
- 
- 		if (res < sizeof(icmph) ||
- 		    target.sin_addr.s_addr != whereto.sin_addr.s_addr ||
-@@ -576,9 +610,18 @@ int receive_error_msg()
- 			goto out;
- 		}
- 
--		acknowledge(ntohs(icmph.un.echo.sequence));
-+		error_pkt = (e->ee_type != ICMP_REDIRECT &&
-+			     e->ee_type != ICMP_SOURCE_QUENCH);
-+		if (error_pkt) {
-+			acknowledge(ntohs(icmph.un.echo.sequence));
-+			net_errors++;
-+			nerrors++;
-+		}
-+		else {
-+			saved_errno = 0;
-+		}
- 
--		if (!working_recverr) {
-+		if (!using_ping_socket && !working_recverr) {
- 			struct icmp_filter filt;
- 			working_recverr = 1;
- 			/* OK, it works. Add stronger filter. */
-@@ -589,15 +632,14 @@ int receive_error_msg()
- 				perror("\rWARNING: setsockopt(ICMP_FILTER)");
- 		}
- 
--		net_errors++;
--		nerrors++;
- 		if (options & F_QUIET)
- 			goto out;
- 		if (options & F_FLOOD) {
--			write_stdout("\bE", 2);
-+			if (error_pkt)
-+				write_stdout("\bE", 2);
- 		} else {
- 			print_timestamp();
--			printf("From %s icmp_seq=%u ", pr_addr(sin->sin_addr.s_addr), ntohs(icmph.un.echo.sequence));
-+			printf("From %s: icmp_seq=%u ", pr_addr(sin->sin_addr.s_addr), ntohs(icmph.un.echo.sequence));
- 			pr_icmph(e->ee_type, e->ee_code, e->ee_info, NULL);
- 			fflush(stdout);
- 		}
-@@ -695,15 +737,41 @@ parse_reply(struct msghdr *msg, int cc, 
- 	struct iphdr *ip;
- 	int hlen;
- 	int csfailed;
-+	struct cmsghdr *cmsg;
-+	int ttl;
-+	__u8 *opts;
-+	int optlen;
- 
- 	/* Check the IP header */
- 	ip = (struct iphdr *)buf;
--	hlen = ip->ihl*4;
--	if (cc < hlen + 8 || ip->ihl < 5) {
--		if (options & F_VERBOSE)
--			fprintf(stderr, "ping: packet too short (%d bytes) from %s\n", cc,
--				pr_addr(from->sin_addr.s_addr));
--		return 1;
-+	if (!using_ping_socket) {
-+		hlen = ip->ihl*4;
-+		if (cc < hlen + 8 || ip->ihl < 5) {
-+			if (options & F_VERBOSE)
-+				fprintf(stderr, "ping: packet too short (%d bytes) from %s\n", cc,
-+					pr_addr(from->sin_addr.s_addr));
-+			return 1;
-+		}
-+		ttl = ip->ttl;
-+		opts = buf + sizeof(struct iphdr);
-+		optlen = hlen - sizeof(struct iphdr);
-+	} else {
-+		hlen = 0;
-+		ttl = 0;
-+		opts = buf;
-+		optlen = 0;
-+		for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) {
-+			if (cmsg->cmsg_level != SOL_IP)
-+				continue;
-+			if (cmsg->cmsg_type == IP_TTL) {
-+				if (cmsg->cmsg_len < sizeof(int))
-+					continue;
-+				ttl = *(int *) CMSG_DATA(cmsg);
-+			} else if (cmsg->cmsg_type == IP_RETOPTS) {
-+				opts = (__u8 *) CMSG_DATA(cmsg);
-+				optlen = cmsg->cmsg_len;
-+			}
-+		}
- 	}
- 
- 	/* Now the ICMP part */
-@@ -716,7 +784,7 @@ parse_reply(struct msghdr *msg, int cc, 
- 			return 1;			/* 'Twas not our ECHO */
- 		if (gather_statistics((__u8*)icp, sizeof(*icp), cc,
- 				      ntohs(icp->un.echo.sequence),
--				      ip->ttl, 0, tv, pr_addr(from->sin_addr.s_addr),
-+				      ttl, 0, tv, pr_addr(from->sin_addr.s_addr),
- 				      pr_echo_reply))
- 			return 0;
- 	} else {
-@@ -807,7 +875,7 @@ parse_reply(struct msghdr *msg, int cc, 
- 	}
- 
- 	if (!(options & F_FLOOD)) {
--		pr_options(buf + sizeof(struct iphdr), hlen);
-+		pr_options(opts, optlen + sizeof(struct iphdr));
- 
- 		if (options & F_AUDIBLE)
- 			putchar('\a');
-@@ -916,8 +984,7 @@ void pr_icmph(__u8 type, __u8 code, __u3
- 			printf("Redirect, Bad Code: %d", code);
- 			break;
- 		}
--		if (icp)
--			printf("(New nexthop: %s)\n", pr_addr(icp->un.gateway));
-+		printf("(New nexthop: %s)\n", pr_addr(icp ? icp->un.gateway : info));
- 		if (icp && (options & F_VERBOSE))
- 			pr_iph((struct iphdr*)(icp + 1));
- 		break;
-@@ -1217,7 +1284,7 @@ void install_filter(void)
- 		insns
- 	};
- 
--	if (once)
-+	if (once || using_ping_socket)
- 		return;
- 	once = 1;
- 
---- iputils-s20101006/ping_common.c
-+++ iputils-s20101006/ping_common.c
-@@ -515,7 +515,8 @@ void setup(int icmp_sock)
- 			*p++ = i;
- 	}
- 
--	ident = htons(getpid() & 0xFFFF);
-+	if (!ident)
-+		ident = htons(getpid() & 0xFFFF);
- 
- 	set_signal(SIGINT, sigexit);
- 	set_signal(SIGALRM, sigexit);

diff --git a/net-misc/iputils/files/iputils-20121221-parallel-doc.patch b/net-misc/iputils/files/iputils-20121221-parallel-doc.patch
deleted file mode 100644
index 22bfb8811ed..00000000000
--- a/net-misc/iputils/files/iputils-20121221-parallel-doc.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 4e322b85a12ba3ef5e8118724e3442b2ebb0f6d6 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Wed, 1 Aug 2012 11:43:34 -0400
-Subject: [PATCH iputils] doc: fix parallel build of html/man pages
-
-The use of the same tempdir prevents building of these files in parallel.
-So build all of them in unique tempdirs so we can do them in parallel.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- doc/Makefile | 37 ++++++++++++++++++++++++-------------
- 1 file changed, 24 insertions(+), 13 deletions(-)
-
-diff --git a/doc/Makefile b/doc/Makefile
-index 7ec4f1c..4f930a3 100644
---- a/doc/Makefile
-+++ b/doc/Makefile
-@@ -12,29 +12,40 @@ man: $(MANFILES)
- # lots of some strange temporary junk directories and files.
- # So, scope it to a temporary dir and clean all after each run.
- 
--$(HTMLFILES): index.db
--	@-rm -rf tmp.db2html
--	@mkdir tmp.db2html
--	@set -e; cd tmp.db2html; docbook2html ../$< ; mv *.html ..
--	@-rm -rf tmp.db2html
-+SETUP_TMPDIR = \
-+	t="tmp.db2html.$@"; \
-+	rm -rf $$t; \
-+	mkdir $$t; \
-+	cd $$t
-+CLEAN_TMPDIR = \
-+	cd ..; \
-+	rm -rf $$t
-+
-+MAKE_HTML = \
-+	@set -e; \
-+	$(SETUP_TMPDIR); \
-+	docbook2html ../$<; \
-+	mv *.html ..; \
-+	$(CLEAN_TMPDIR)
- 
-+$(HTMLFILES): index.db
-+	$(MAKE_HTML)
- iputils.html: iputils.db
--	@-rm -rf tmp.db2html
--	@mkdir tmp.db2html
--	@set -e; cd tmp.db2html; docbook2html -u -o html ../$< ; mv html/$@ ..
--	@-rm -rf tmp.db2html
-+	$(MAKE_HTML)
- 
- # docbook2man produces utterly ugly output and I did not find
- # any way to customize this but hacking backend perl script a little.
- # Well, hence...
- 
- $(MANFILES): index.db
--	@-mkdir tmp.db2man
--	@set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ;	mv $@ ..
--	@-rm -rf tmp.db2man
-+	@set -e; \
-+	$(SETUP_TMPDIR); \
-+	nsgmls ../$< | sgmlspl ../docbook2man-spec.pl; \
-+	mv $@ ..; \
-+	$(CLEAN_TMPDIR)
- 
- clean:
--	@rm -rf $(MANFILES) $(HTMLFILES) iputils.html tmp.db2html tmp.db2man
-+	@rm -rf $(MANFILES) $(HTMLFILES) iputils.html tmp.db2html* tmp.db2man*
- 
- snapshot:
- 	@date "+%y%m%d" > snapshot.db
--- 
-2.3.5
-

diff --git a/net-misc/iputils/files/iputils-20121221-printf-size.patch b/net-misc/iputils/files/iputils-20121221-printf-size.patch
deleted file mode 100644
index 6d6c3b7d258..00000000000
--- a/net-misc/iputils/files/iputils-20121221-printf-size.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 23fcb10ae15a96aa9e5a823cfe0b612d9522691c Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sat, 14 Aug 2010 01:16:42 -0400
-Subject: [PATCH [iputils]] tracepath: re-use printf return in print_host
-
-Since the printf funcs already return the length of chars displayed,
-use that value instead of re-calculating the length with strlen.
-
-This also fixes the handling of the strlen return -- it's a size_t,
-not an int.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- tracepath.c  | 11 ++++-------
- tracepath6.c | 11 ++++-------
- 2 files changed, 8 insertions(+), 14 deletions(-)
-
-diff --git a/tracepath.c b/tracepath.c
-index 8a08f1d..f155816 100644
---- a/tracepath.c
-+++ b/tracepath.c
-@@ -73,13 +73,10 @@ void data_wait(int fd)
- 
- void print_host(const char *a, const char *b, int both)
- {
--	int plen = 0;
--	printf("%s", a);
--	plen = strlen(a);
--	if (both) {
--		printf(" (%s)", b);
--		plen += strlen(b) + 3;
--	}
-+	int plen;
-+	plen = printf("%s", a);
-+	if (both)
-+		plen += printf(" (%s)", b);
- 	if (plen >= HOST_COLUMN_SIZE)
- 		plen = HOST_COLUMN_SIZE - 1;
- 	printf("%*s", HOST_COLUMN_SIZE - plen, "");
-diff --git a/tracepath6.c b/tracepath6.c
-index 126fadf..bee95c3 100644
---- a/tracepath6.c
-+++ b/tracepath6.c
-@@ -86,13 +86,10 @@ void data_wait(int fd)
- 
- void print_host(const char *a, const char *b, int both)
- {
--	int plen = 0;
--	printf("%s", a);
--	plen = strlen(a);
--	if (both) {
--		printf(" (%s)", b);
--		plen += strlen(b) + 3;
--	}
-+	int plen;
-+	plen = printf("%s", a);
-+	if (both)
-+		plen += printf(" (%s)", b);
- 	if (plen >= HOST_COLUMN_SIZE)
- 		plen = HOST_COLUMN_SIZE - 1;
- 	printf("%*s", HOST_COLUMN_SIZE - plen, "");
--- 
-1.8.0.2
-

diff --git a/net-misc/iputils/files/iputils-20121221-strtod.patch b/net-misc/iputils/files/iputils-20121221-strtod.patch
deleted file mode 100644
index 303acf5c42c..00000000000
--- a/net-misc/iputils/files/iputils-20121221-strtod.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-https://bugs.gentoo.org/472592
-
-From dd0aa192626f94d08e399fc2a743ee72c50853fb Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Fri, 24 Apr 2015 20:41:31 -0400
-Subject: [PATCH iputils] ping: fix -i number parsing in locales
-
-Always use #.# format for the -i flag even when the current locale uses
-a different separator.  Locale de_DE which uses #,# normally.
-
-Simple testcase:
-$ make USE_IDN=1
-$ LANG=de_DE.UTF8 ./ping -i 0.5 localhost
-
-Reported-by: Sergey Fionov <fionov@gmail.com>
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- ping_common.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/ping_common.c b/ping_common.c
-index 62f53a6..0a37e09 100644
---- a/ping_common.c
-+++ b/ping_common.c
-@@ -269,9 +269,17 @@ void common_options(int ch)
- 		double dbl;
- 		char *ep;
- 
-+#ifdef USE_IDN
-+		setlocale(LC_ALL, "C");
-+#endif
-+
- 		errno = 0;
- 		dbl = strtod(optarg, &ep);
- 
-+#ifdef USE_IDN
-+		setlocale(LC_ALL, "");
-+#endif
-+
- 		if (errno || *ep != '\0' ||
- 		    !finite(dbl) || dbl < 0.0 || dbl >= (double)INT_MAX / 1000 - 1.0) {
- 			fprintf(stderr, "ping: bad timing interval\n");
--- 
-2.3.5
-

diff --git a/net-misc/iputils/files/iputils-20121221-tftpd-setid.patch b/net-misc/iputils/files/iputils-20121221-tftpd-setid.patch
deleted file mode 100644
index 0ea56685d26..00000000000
--- a/net-misc/iputils/files/iputils-20121221-tftpd-setid.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From d81a44625b04d487c895473aa77af13420b7afdd Mon Sep 17 00:00:00 2001
-From: YOSHIFUJI Hideaki <hideaki.yoshifuji@miraclelinux.com>
-Date: Thu, 19 Jun 2014 17:25:49 +0900
-Subject: [PATCH iputils] tftpd: Exit if setuid()/setgid() failed.
-
-Signed-off-by: YOSHIFUJI Hideaki <hideaki.yoshifuji@miraclelinux.com>
----
- tftpd.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/tftpd.c b/tftpd.c
-index 2a39ec4..e3af2f4 100644
---- a/tftpd.c
-+++ b/tftpd.c
-@@ -111,8 +111,14 @@ int main(int ac, char **av)
- 
- 	/* Sanity. If parent forgot to setuid() on us. */
- 	if (geteuid() == 0) {
--		setgid(65534);
--		setuid(65534);
-+		if (setgid(65534)) {
-+			syslog(LOG_ERR, "setgid");
-+			exit(1);
-+		}
-+		if (setuid(65534)) {
-+			syslog(LOG_ERR, "setuid");
-+			exit(1);
-+		}
- 	}
- 
- 	ac--; av++;
--- 
-2.3.5
-

diff --git a/net-misc/iputils/files/iputils-20121221-tftpd-syslog.patch b/net-misc/iputils/files/iputils-20121221-tftpd-syslog.patch
deleted file mode 100644
index ad34f3b5f64..00000000000
--- a/net-misc/iputils/files/iputils-20121221-tftpd-syslog.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From e88ed3752872d7c7ca37d95eb4d434ca4d3c4eae Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sat, 19 Apr 2014 10:39:39 -0400
-Subject: [PATCH iputils] tftpd: fix syslog setup
-
-Commit d81a44625b04d487c895473aa77af13420b7afdd added support for checking
-the set*id calls, but would call syslog() before it had called openlog().
-Move the call up earlier to fix that.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- tftpd.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/tftpd.c b/tftpd.c
-index e3af2f4..7ddc8eb 100644
---- a/tftpd.c
-+++ b/tftpd.c
-@@ -109,6 +109,8 @@ int main(int ac, char **av)
- 	register int n = 0;
- 	int on = 1;
- 
-+	openlog("tftpd", LOG_PID, LOG_DAEMON);
-+
- 	/* Sanity. If parent forgot to setuid() on us. */
- 	if (geteuid() == 0) {
- 		if (setgid(65534)) {
-@@ -125,7 +127,6 @@ int main(int ac, char **av)
- 	while (ac-- > 0 && n < MAXARG)
- 		dirs[n++] = *av++;
- 
--	openlog("tftpd", LOG_PID, LOG_DAEMON);
- 	if (ioctl(0, FIONBIO, &on) < 0) {
- 		syslog(LOG_ERR, "ioctl(FIONBIO): %m\n");
- 		exit(1);
--- 
-2.3.5
-

diff --git a/net-misc/iputils/files/iputils-99999999-openssl.patch b/net-misc/iputils/files/iputils-99999999-openssl.patch
deleted file mode 100644
index 13f5639a6fb..00000000000
--- a/net-misc/iputils/files/iputils-99999999-openssl.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From 321d64b9f94653322e678e34ac214ddb73a71db8 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Thu, 24 Jan 2013 23:32:39 -0500
-Subject: [PATCH iputils] ping6: allow disabling of openssl support
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- Makefile         |  5 ++++-
- iputils_md5dig.h |  4 +++-
- ping6.c          | 10 ++++++++++
- 3 files changed, 17 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 54e5a6d..7147f08 100644
---- a/Makefile
-+++ b/Makefile
-@@ -36,7 +36,7 @@ ARPING_DEFAULT_DEVICE=
- 
- # Libgcrypt (for MD5) for ping6 [yes|no|static]
- USE_GCRYPT=yes
--# Crypto library for ping6 [shared|static]
-+# Crypto library for ping6 [shared|static|no]
- USE_CRYPTO=shared
- # Resolv library for ping6 [yes|static]
- USE_RESOLV=yes
-@@ -63,7 +63,10 @@ ifneq ($(USE_GCRYPT),no)
- 	LIB_CRYPTO = $(call FUNC_LIB,$(USE_GCRYPT),$(LDFLAG_GCRYPT))
- 	DEF_CRYPTO = -DUSE_GCRYPT
- else
-+ifneq ($(USE_CRYPTO),no)
- 	LIB_CRYPTO = $(call FUNC_LIB,$(USE_CRYPTO),$(LDFLAG_CRYPTO))
-+	DEF_CRYPTO = -DUSE_OPENSSL
-+endif
- endif
- 
- # USE_RESOLV: LIB_RESOLV
-diff --git a/iputils_md5dig.h b/iputils_md5dig.h
-index 4cec866..d6c4d46 100644
---- a/iputils_md5dig.h
-+++ b/iputils_md5dig.h
-@@ -5,8 +5,10 @@
- # include <stdlib.h>
- # include <gcrypt.h>
- # define IPUTILS_MD5DIG_LEN	16
--#else
-+# define USE_CRYPTO
-+#elif defined(USE_OPENSSL)
- # include <openssl/md5.h>
-+# define USE_CRYPTO
- #endif
- 
- #ifdef USE_GCRYPT
-diff --git a/ping6.c b/ping6.c
-index 7085f31..7b7c1af 100644
---- a/ping6.c
-+++ b/ping6.c
-@@ -324,6 +324,7 @@ static void niquery_init_nonce(void)
- #if !PING6_NONCE_MEMORY
- static int niquery_nonce(__u8 *nonce, int fill)
- {
-+# ifdef USE_CRYPTO
- 	static __u8 digest[MD5_DIGEST_LENGTH];
- 	static int seq = -1;
- 
-@@ -346,6 +347,10 @@ static int niquery_nonce(__u8 *nonce, int fill)
- 			return -1;
- 		return ntohsp((__u16 *)nonce);
- 	}
-+# else
-+	fprintf(stderr, "ping6: function not available; crypto disabled\n");
-+	exit(3);
-+# endif
- }
- #endif
- 
-@@ -500,6 +505,7 @@ static int niquery_option_subject_addr_handler(int index, const char *arg)
- 
- static int niquery_option_subject_name_handler(int index, const char *arg)
- {
-+#ifdef USE_CRYPTO
- 	static char nigroup_buf[INET6_ADDRSTRLEN + 1 + IFNAMSIZ];
- 	unsigned char *dnptrs[2], **dpp, **lastdnptr;
- 	int n;
-@@ -625,6 +631,10 @@ errexit:
- 	free(idn);
- 	free(name);
- 	exit(1);
-+#else
-+	fprintf(stderr, "ping6: function not available; crypto disabled\n");
-+	exit(3);
-+#endif
- }
- 
- int niquery_option_help_handler(int index, const char *arg)
--- 
-2.3.5
-

diff --git a/net-misc/iputils/files/iputils-99999999-tftpd-syslog.patch b/net-misc/iputils/files/iputils-99999999-tftpd-syslog.patch
deleted file mode 100644
index ad34f3b5f64..00000000000
--- a/net-misc/iputils/files/iputils-99999999-tftpd-syslog.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From e88ed3752872d7c7ca37d95eb4d434ca4d3c4eae Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sat, 19 Apr 2014 10:39:39 -0400
-Subject: [PATCH iputils] tftpd: fix syslog setup
-
-Commit d81a44625b04d487c895473aa77af13420b7afdd added support for checking
-the set*id calls, but would call syslog() before it had called openlog().
-Move the call up earlier to fix that.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- tftpd.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/tftpd.c b/tftpd.c
-index e3af2f4..7ddc8eb 100644
---- a/tftpd.c
-+++ b/tftpd.c
-@@ -109,6 +109,8 @@ int main(int ac, char **av)
- 	register int n = 0;
- 	int on = 1;
- 
-+	openlog("tftpd", LOG_PID, LOG_DAEMON);
-+
- 	/* Sanity. If parent forgot to setuid() on us. */
- 	if (geteuid() == 0) {
- 		if (setgid(65534)) {
-@@ -125,7 +127,6 @@ int main(int ac, char **av)
- 	while (ac-- > 0 && n < MAXARG)
- 		dirs[n++] = *av++;
- 
--	openlog("tftpd", LOG_PID, LOG_DAEMON);
- 	if (ioctl(0, FIONBIO, &on) < 0) {
- 		syslog(LOG_ERR, "ioctl(FIONBIO): %m\n");
- 		exit(1);
--- 
-2.3.5
-

diff --git a/net-misc/iputils/iputils-20121221-r1.ebuild b/net-misc/iputils/iputils-20121221-r1.ebuild
deleted file mode 100644
index 15da76e4a2e..00000000000
--- a/net-misc/iputils/iputils-20121221-r1.ebuild
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# For released versions, we precompile the man/html pages and store
-# them in a tarball on our mirrors.  This avoids ugly issues while
-# building stages, and when the jade/sgml packages are broken (which
-# seems to be more common than would be nice).
-
-EAPI="4"
-
-inherit flag-o-matic eutils toolchain-funcs fcaps
-if [[ ${PV} == "99999999" ]] ; then
-	EGIT_REPO_URI="git://www.linux-ipv6.org/gitroot/iputils"
-	inherit git-2
-else
-	SRC_URI="http://www.skbuff.net/iputils/iputils-s${PV}.tar.bz2
-		mirror://gentoo/iputils-s${PV}-manpages.tar.bz2"
-	KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-linux ~x86-linux"
-fi
-
-DESCRIPTION="Network monitoring tools including ping and ping6"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iputils"
-
-LICENSE="BSD GPL-2+ rdisc"
-SLOT="0"
-IUSE="caps doc gnutls idn ipv6 SECURITY_HAZARD ssl static"
-
-LIB_DEPEND="caps? ( sys-libs/libcap[static-libs(+)] )
-	idn? ( net-dns/libidn[static-libs(+)] )
-	ipv6? ( ssl? (
-		gnutls? (
-			net-libs/gnutls[openssl(+)]
-			net-libs/gnutls[static-libs(+)]
-		)
-		!gnutls? ( dev-libs/openssl:0[static-libs(+)] )
-	) )"
-RDEPEND="!net-misc/rarpd
-	!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
-DEPEND="${RDEPEND}
-	static? ( ${LIB_DEPEND} )
-	virtual/os-headers"
-if [[ ${PV} == "99999999" ]] ; then
-	DEPEND+="
-		app-text/openjade
-		dev-perl/SGMLSpm
-		app-text/docbook-sgml-dtd
-		app-text/docbook-sgml-utils
-	"
-fi
-
-S=${WORKDIR}/${PN}-s${PV}
-
-src_prepare() {
-	epatch "${FILESDIR}"/021109-uclibc-no-ether_ntohost.patch
-	epatch "${FILESDIR}"/${PN}-20121221-openssl.patch #335436
-	epatch "${FILESDIR}"/${PN}-20121221-crypto-build.patch
-	epatch "${FILESDIR}"/${PN}-20100418-so_mark.patch #335347
-	epatch "${FILESDIR}"/${PN}-20121221-makefile.patch
-	epatch "${FILESDIR}"/${PN}-20121221-printf-size.patch
-	epatch "${FILESDIR}"/${PN}-20121221-owl-pingsock.diff
-	use SECURITY_HAZARD && epatch "${FILESDIR}"/${PN}-20071127-nonroot-floodping.patch
-	use static && append-ldflags -static
-}
-
-src_compile() {
-	tc-export CC
-	emake \
-		USE_CAP=$(usex caps) \
-		USE_IDN=$(usex idn) \
-		USE_GNUTLS=$(usex gnutls) \
-		USE_CRYPTO=$(usex ssl) \
-		$(use ipv6 || echo IPV6_TARGETS=)
-
-	if [[ ${PV} == "99999999" ]] ; then
-		emake -j1 html man
-	fi
-}
-
-ipv6() { usex ipv6 "$*" '' ; }
-
-src_install() {
-	into /
-	dobin arping ping $(ipv6 ping6)
-	into /usr
-	dobin clockdiff
-	dosbin rarpd rdisc ipg tftpd tracepath $(ipv6 tracepath6)
-
-	dodoc INSTALL RELNOTES
-	use ipv6 \
-		&& dosym ping.8 /usr/share/man/man8/ping6.8 \
-		|| rm -f doc/*6.8
-	rm -f doc/{setkey,traceroute6}.8
-	doman doc/*.8
-
-	use doc && dohtml doc/*.html
-}
-
-pkg_postinst() {
-	fcaps cap_net_raw \
-		bin/{ar,}ping \
-		$(ipv6 bin/ping6) \
-		usr/bin/clockdiff
-}

diff --git a/net-misc/iputils/iputils-20121221-r2.ebuild b/net-misc/iputils/iputils-20121221-r2.ebuild
deleted file mode 100644
index f81a3dd9c1c..00000000000
--- a/net-misc/iputils/iputils-20121221-r2.ebuild
+++ /dev/null
@@ -1,153 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# For released versions, we precompile the man/html pages and store
-# them in a tarball on our mirrors.  This avoids ugly issues while
-# building stages, and when the jade/sgml packages are broken (which
-# seems to be more common than would be nice).
-
-EAPI="4"
-
-inherit flag-o-matic eutils toolchain-funcs fcaps
-if [[ ${PV} == "99999999" ]] ; then
-	EGIT_REPO_URI="git://www.linux-ipv6.org/gitroot/iputils"
-	inherit git-2
-else
-	SRC_URI="http://www.skbuff.net/iputils/iputils-s${PV}.tar.bz2
-		mirror://gentoo/iputils-s${PV}-manpages.tar.bz2"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux"
-fi
-
-DESCRIPTION="Network monitoring tools including ping and ping6"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iputils"
-
-LICENSE="BSD GPL-2+ rdisc"
-SLOT="0"
-IUSE="+arping caps clockdiff doc gnutls idn ipv6 libressl rarpd rdisc SECURITY_HAZARD ssl static tftpd tracepath traceroute"
-
-LIB_DEPEND="caps? ( sys-libs/libcap[static-libs(+)] )
-	idn? ( net-dns/libidn[static-libs(+)] )
-	ipv6? ( ssl? (
-		gnutls? (
-			net-libs/gnutls[openssl(+)]
-			net-libs/gnutls[static-libs(+)]
-		)
-		!gnutls? (
-			!libressl? ( dev-libs/openssl[static-libs(+)] )
-			libressl? ( dev-libs/libressl[static-libs(+)] )
-		)
-	) )"
-RDEPEND="arping? ( !net-misc/arping )
-	rarpd? ( !net-misc/rarpd )
-	traceroute? ( !net-analyzer/traceroute )
-	!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
-DEPEND="${RDEPEND}
-	static? ( ${LIB_DEPEND} )
-	virtual/os-headers"
-if [[ ${PV} == "99999999" ]] ; then
-	DEPEND+="
-		app-text/openjade
-		dev-perl/SGMLSpm
-		app-text/docbook-sgml-dtd
-		app-text/docbook-sgml-utils
-	"
-fi
-
-S=${WORKDIR}/${PN}-s${PV}
-
-src_prepare() {
-	epatch "${FILESDIR}"/021109-uclibc-no-ether_ntohost.patch
-	epatch "${FILESDIR}"/${PN}-20121221-openssl.patch #335436
-	epatch "${FILESDIR}"/${PN}-20121221-crypto-build.patch
-	epatch "${FILESDIR}"/${PN}-20100418-so_mark.patch #335347
-	epatch "${FILESDIR}"/${PN}-20121221-tftpd-setid.patch
-	epatch "${FILESDIR}"/${PN}-20121221-tftpd-syslog.patch
-	epatch "${FILESDIR}"/${PN}-20121221-makefile.patch
-	epatch "${FILESDIR}"/${PN}-20121221-parallel-doc.patch
-	epatch "${FILESDIR}"/${PN}-20121221-printf-size.patch
-	epatch "${FILESDIR}"/${PN}-20121221-owl-pingsock.diff
-	epatch "${FILESDIR}"/${PN}-20121221-strtod.patch #472592
-	use SECURITY_HAZARD && epatch "${FILESDIR}"/${PN}-20071127-nonroot-floodping.patch
-}
-
-src_configure() {
-	use static && append-ldflags -static
-
-	IPV4_TARGETS=(
-		ping
-		$(for v in arping clockdiff rarpd rdisc tftpd tracepath ; do usev ${v} ; done)
-	)
-	IPV6_TARGETS=(
-		ping6
-		$(usex tracepath 'tracepath6' '')
-		$(usex traceroute 'traceroute6' '')
-	)
-	use ipv6 || IPV6_TARGETS=()
-}
-
-src_compile() {
-	tc-export CC
-	emake \
-		USE_CAP=$(usex caps) \
-		USE_IDN=$(usex idn) \
-		USE_GNUTLS=$(usex gnutls) \
-		USE_CRYPTO=$(usex ssl) \
-		IPV4_TARGETS="${IPV4_TARGETS[*]}" \
-		IPV6_TARGETS="${IPV6_TARGETS[*]}"
-
-	if [[ ${PV} == "99999999" ]] ; then
-		emake html man
-	fi
-}
-
-src_install() {
-	into /
-	dobin ping $(usex ipv6 'ping6' '')
-	use ipv6 && dosym ping.8 "${EPREFIX}"/usr/share/man/man8/ping6.8
-	doman doc/ping.8
-
-	if use arping ; then
-		dobin arping
-		doman doc/arping.8
-	fi
-
-	into /usr
-
-	local u
-	for u in clockdiff rarpd rdisc tftpd tracepath ; do
-		if use ${u} ; then
-			case ${u} in
-			clockdiff) dobin ${u};;
-			*) dosbin ${u};;
-			esac
-			doman doc/${u}.8
-		fi
-	done
-
-	if use tracepath && use ipv6 ; then
-		dosbin tracepath6
-		dosym tracepath.8 "${EPREFIX}"/usr/share/man/man8/tracepath6.8
-	fi
-
-	if use traceroute && use ipv6 ; then
-		dosbin traceroute6
-		doman doc/traceroute6.8
-	fi
-
-	if use rarpd ; then
-		newinitd "${FILESDIR}"/rarpd.init.d rarpd
-		newconfd "${FILESDIR}"/rarpd.conf.d rarpd
-	fi
-
-	dodoc INSTALL RELNOTES
-
-	use doc && dohtml doc/*.html
-}
-
-pkg_postinst() {
-	fcaps cap_net_raw \
-		bin/ping \
-		$(usex ipv6 'bin/ping6' '') \
-		$(usex arping 'bin/arping' '') \
-		$(usex clockdiff 'usr/bin/clockdiff' '')
-}

diff --git a/net-misc/iputils/iputils-20151218.ebuild b/net-misc/iputils/iputils-20151218.ebuild
deleted file mode 100644
index ab556ec060e..00000000000
--- a/net-misc/iputils/iputils-20151218.ebuild
+++ /dev/null
@@ -1,158 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# For released versions, we precompile the man/html pages and store
-# them in a tarball on our mirrors.  This avoids ugly issues while
-# building stages, and when the jade/sgml packages are broken (which
-# seems to be more common than would be nice).
-
-EAPI=5
-
-inherit flag-o-matic eutils toolchain-funcs fcaps
-if [[ ${PV} == "99999999" ]] ; then
-	EGIT_REPO_URI="git://www.linux-ipv6.org/gitroot/iputils"
-	inherit git-2
-else
-	SRC_URI="http://www.skbuff.net/iputils/iputils-s${PV}.tar.bz2
-		https://dev.gentoo.org/~polynomial-c/iputils-s${PV}-manpages.tar.xz"
-	KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-linux ~x86-linux"
-fi
-
-DESCRIPTION="Network monitoring tools including ping and ping6"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iputils"
-
-LICENSE="BSD GPL-2+ rdisc"
-SLOT="0"
-IUSE="+arping caps clockdiff doc gcrypt idn ipv6 libressl rarpd rdisc SECURITY_HAZARD ssl static tftpd tracepath traceroute"
-
-LIB_DEPEND="caps? ( sys-libs/libcap[static-libs(+)] )
-	idn? ( net-dns/libidn[static-libs(+)] )
-	ipv6? ( ssl? (
-		gcrypt? ( dev-libs/libgcrypt:0=[static-libs(+)] )
-		!gcrypt? (
-			!libressl? ( dev-libs/openssl:0=[static-libs(+)] )
-			libressl? ( dev-libs/libressl:0=[static-libs(+)] )
-		)
-	) )"
-RDEPEND="arping? ( !net-misc/arping )
-	rarpd? ( !net-misc/rarpd )
-	traceroute? ( !net-analyzer/traceroute )
-	!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
-DEPEND="${RDEPEND}
-	static? ( ${LIB_DEPEND} )
-	virtual/os-headers"
-if [[ ${PV} == "99999999" ]] ; then
-	DEPEND+="
-		app-text/openjade
-		dev-perl/SGMLSpm
-		app-text/docbook-sgml-dtd
-		app-text/docbook-sgml-utils
-	"
-fi
-
-S=${WORKDIR}/${PN}-s${PV}
-
-PATCHES=(
-	"${FILESDIR}"/021109-uclibc-no-ether_ntohost.patch
-	"${FILESDIR}"/${PN}-99999999-openssl.patch #335436
-	"${FILESDIR}"/${PN}-99999999-tftpd-syslog.patch
-	"${FILESDIR}"/${PN}-20121221-makefile.patch
-	"${FILESDIR}"/${PN}-20121221-parallel-doc.patch
-	"${FILESDIR}"/${PN}-20121221-strtod.patch #472592
-)
-
-src_prepare() {
-	use SECURITY_HAZARD && PATCHES+=( "${FILESDIR}"/${PN}-20071127-nonroot-floodping.patch )
-	epatch "${PATCHES[@]}"
-}
-
-src_configure() {
-	use static && append-ldflags -static
-
-	IPV4_TARGETS=(
-		ping
-		$(for v in arping clockdiff rarpd rdisc tftpd tracepath ; do usev ${v} ; done)
-	)
-	IPV6_TARGETS=(
-		ping6
-		$(usex tracepath 'tracepath6' '')
-		$(usex traceroute 'traceroute6' '')
-	)
-	use ipv6 || IPV6_TARGETS=()
-}
-
-ldflag_resolv() {
-	# See if the system includes a libresolv. #584132
-	echo "main(){}" > "${T}"/resolv.c
-	if ${CC} ${CFLAGS} ${LDFLAGS} "${T}"/resolv.c -lresolv -o "${T}"/resolv 2>/dev/null ; then
-		echo -lresolv
-	fi
-}
-
-src_compile() {
-	tc-export CC
-	emake \
-		USE_CAP=$(usex caps) \
-		USE_IDN=$(usex idn) \
-		USE_GCRYPT=$(usex gcrypt) \
-		USE_CRYPTO=$(usex ssl) \
-		LDFLAG_RESOLV=$(ldflag_resolv) \
-		IPV4_TARGETS="${IPV4_TARGETS[*]}" \
-		IPV6_TARGETS="${IPV6_TARGETS[*]}"
-
-	if [[ ${PV} == "99999999" ]] ; then
-		emake html man
-	fi
-}
-
-src_install() {
-	into /
-	dobin ping $(usex ipv6 'ping6' '')
-	use ipv6 && dosym ping.8 /usr/share/man/man8/ping6.8
-	doman doc/ping.8
-
-	if use arping ; then
-		dobin arping
-		doman doc/arping.8
-	fi
-
-	into /usr
-
-	local u
-	for u in clockdiff rarpd rdisc tftpd tracepath ; do
-		if use ${u} ; then
-			case ${u} in
-			clockdiff) dobin ${u};;
-			*) dosbin ${u};;
-			esac
-			doman doc/${u}.8
-		fi
-	done
-
-	if use tracepath && use ipv6 ; then
-		dosbin tracepath6
-		dosym tracepath.8 /usr/share/man/man8/tracepath6.8
-	fi
-
-	if use traceroute && use ipv6 ; then
-		dosbin traceroute6
-		doman doc/traceroute6.8
-	fi
-
-	if use rarpd ; then
-		newinitd "${FILESDIR}"/rarpd.init.d rarpd
-		newconfd "${FILESDIR}"/rarpd.conf.d rarpd
-	fi
-
-	dodoc INSTALL RELNOTES
-
-	use doc && dohtml doc/*.html
-}
-
-pkg_postinst() {
-	fcaps cap_net_raw \
-		bin/ping \
-		$(usex ipv6 'bin/ping6' '') \
-		$(usex arping 'bin/arping' '') \
-		$(usex clockdiff 'usr/bin/clockdiff' '')
-}

diff --git a/net-misc/iputils/iputils-20160308.ebuild b/net-misc/iputils/iputils-20160308.ebuild
deleted file mode 100644
index 44e4b8cef39..00000000000
--- a/net-misc/iputils/iputils-20160308.ebuild
+++ /dev/null
@@ -1,165 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# For released versions, we precompile the man/html pages and store
-# them in a tarball on our mirrors.  This avoids ugly issues while
-# building stages, and when the jade/sgml packages are broken (which
-# seems to be more common than would be nice).
-# Required packages for doc generation:
-# app-text/docbook-sgml-utils
-
-EAPI=5
-
-inherit flag-o-matic eutils toolchain-funcs fcaps
-if [[ ${PV} == "99999999" ]] ; then
-	EGIT_REPO_URI="https://github.com/iputils/iputils.git"
-	inherit git-r3
-else
-	SRC_URI="https://github.com/iputils/iputils/archive/s${PV}.tar.gz -> ${P}.tar.gz
-		https://dev.gentoo.org/~polynomial-c/iputils-s${PV}-manpages.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux"
-fi
-
-DESCRIPTION="Network monitoring tools including ping and ping6"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iputils"
-
-LICENSE="BSD GPL-2+ rdisc"
-SLOT="0"
-IUSE="+arping caps clockdiff doc gcrypt idn ipv6 libressl nettle +openssl rarpd rdisc SECURITY_HAZARD ssl static tftpd tracepath traceroute"
-
-LIB_DEPEND="caps? ( sys-libs/libcap[static-libs(+)] )
-	idn? ( net-dns/libidn[static-libs(+)] )
-	ipv6? ( ssl? (
-		gcrypt? ( dev-libs/libgcrypt:0=[static-libs(+)] )
-		nettle? ( dev-libs/nettle[static-libs(+)] )
-		openssl? (
-			!libressl? ( dev-libs/openssl:0=[static-libs(+)] )
-			libressl? ( dev-libs/libressl[static-libs(+)] )
-		)
-	) )"
-RDEPEND="arping? ( !net-misc/arping )
-	rarpd? ( !net-misc/rarpd )
-	traceroute? ( !net-analyzer/traceroute )
-	!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
-DEPEND="${RDEPEND}
-	static? ( ${LIB_DEPEND} )
-	virtual/os-headers"
-if [[ ${PV} == "99999999" ]] ; then
-	DEPEND+="
-		app-text/openjade
-		dev-perl/SGMLSpm
-		app-text/docbook-sgml-dtd
-		app-text/docbook-sgml-utils
-	"
-fi
-
-REQUIRED_USE="ipv6? ( ssl? ( ^^ ( gcrypt nettle openssl ) ) )"
-
-S=${WORKDIR}/${PN}-s${PV}
-
-PATCHES=(
-	"${FILESDIR}/021109-uclibc-no-ether_ntohost.patch"
-)
-
-src_prepare() {
-	epatch "${PATCHES[@]}"
-	use SECURITY_HAZARD && epatch "${FILESDIR}"/${PN}-20150815-nonroot-floodping.patch
-}
-
-src_configure() {
-	use static && append-ldflags -static
-
-	TARGETS=(
-		ping
-		$(for v in arping clockdiff rarpd rdisc tftpd tracepath ; do usev ${v} ; done)
-	)
-	if use ipv6 ; then
-		TARGETS+=(
-			$(usex tracepath 'tracepath6' '')
-			$(usex traceroute 'traceroute6' '')
-		)
-	fi
-
-	myconf=(
-		USE_CRYPTO=no
-		USE_GCRYPT=no
-		USE_NETTLE=no
-	)
-
-	if use ipv6 && use ssl ; then
-		myconf=(
-			USE_CRYPTO=$(usex openssl)
-			USE_GCRYPT=$(usex gcrypt)
-			USE_NETTLE=$(usex nettle)
-		)
-	fi
-}
-
-src_compile() {
-	tc-export CC
-	emake \
-		USE_CAP=$(usex caps) \
-		USE_IDN=$(usex idn) \
-		IPV4_DEFAULT=$(usex ipv6 'no' 'yes') \
-		TARGETS="${TARGETS[*]}" \
-		${myconf[@]}
-
-	if [[ ${PV} == "99999999" ]] ; then
-		emake html man
-	fi
-}
-
-src_install() {
-	into /
-	dobin ping
-	dosym ping /bin/ping4
-	if use ipv6 ; then
-		dosym ping /bin/ping6
-		dosym ping.8 /usr/share/man/man8/ping6.8
-	fi
-	doman doc/ping.8
-
-	if use arping ; then
-		dobin arping
-		doman doc/arping.8
-	fi
-
-	into /usr
-
-	local u
-	for u in clockdiff rarpd rdisc tftpd tracepath ; do
-		if use ${u} ; then
-			case ${u} in
-			clockdiff) dobin ${u};;
-			*) dosbin ${u};;
-			esac
-			doman doc/${u}.8
-		fi
-	done
-
-	if use tracepath && use ipv6 ; then
-		dosbin tracepath6
-		dosym tracepath.8 /usr/share/man/man8/tracepath6.8
-	fi
-
-	if use traceroute && use ipv6 ; then
-		dosbin traceroute6
-		doman doc/traceroute6.8
-	fi
-
-	if use rarpd ; then
-		newinitd "${FILESDIR}"/rarpd.init.d rarpd
-		newconfd "${FILESDIR}"/rarpd.conf.d rarpd
-	fi
-
-	dodoc INSTALL RELNOTES
-
-	use doc && dohtml doc/*.html
-}
-
-pkg_postinst() {
-	fcaps cap_net_raw \
-		bin/ping \
-		$(usex arping 'bin/arping' '') \
-		$(usex clockdiff 'usr/bin/clockdiff' '')
-}

diff --git a/net-misc/iputils/iputils-20161105.ebuild b/net-misc/iputils/iputils-20161105.ebuild
deleted file mode 100644
index 729a49fd3eb..00000000000
--- a/net-misc/iputils/iputils-20161105.ebuild
+++ /dev/null
@@ -1,168 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# For released versions, we precompile the man/html pages and store
-# them in a tarball on our mirrors.  This avoids ugly issues while
-# building stages, and when the jade/sgml packages are broken (which
-# seems to be more common than would be nice).
-# Required packages for doc generation:
-# app-text/docbook-sgml-utils
-
-EAPI=5
-
-inherit flag-o-matic eutils toolchain-funcs fcaps
-if [[ ${PV} == "99999999" ]] ; then
-	EGIT_REPO_URI="https://github.com/iputils/iputils.git"
-	inherit git-r3
-else
-	SRC_URI="https://github.com/iputils/iputils/archive/s${PV}.tar.gz -> ${P}.tar.gz
-		https://dev.gentoo.org/~polynomial-c/iputils-s${PV}-manpages.tar.xz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux"
-fi
-
-DESCRIPTION="Network monitoring tools including ping and ping6"
-HOMEPAGE="https://wiki.linuxfoundation.org/networking/iputils"
-
-LICENSE="BSD GPL-2+ rdisc"
-SLOT="0"
-IUSE="+arping caps clockdiff doc gcrypt idn ipv6 libressl nettle +openssl rarpd rdisc SECURITY_HAZARD ssl static tftpd tracepath traceroute"
-
-LIB_DEPEND="caps? ( sys-libs/libcap[static-libs(+)] )
-	idn? ( net-dns/libidn[static-libs(+)] )
-	ipv6? ( ssl? (
-		gcrypt? ( dev-libs/libgcrypt:0=[static-libs(+)] )
-		nettle? ( dev-libs/nettle[static-libs(+)] )
-		openssl? (
-			!libressl? ( dev-libs/openssl:0=[static-libs(+)] )
-			libressl? ( dev-libs/libressl[static-libs(+)] )
-		)
-	) )"
-RDEPEND="arping? ( !net-misc/arping )
-	rarpd? ( !net-misc/rarpd )
-	traceroute? ( !net-analyzer/traceroute )
-	!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
-DEPEND="${RDEPEND}
-	static? ( ${LIB_DEPEND} )
-	virtual/os-headers"
-if [[ ${PV} == "99999999" ]] ; then
-	DEPEND+="
-		app-text/openjade
-		dev-perl/SGMLSpm
-		app-text/docbook-sgml-dtd
-		app-text/docbook-sgml-utils
-	"
-fi
-
-REQUIRED_USE="ipv6? ( ssl? ( ^^ ( gcrypt nettle openssl ) ) )"
-
-S="${WORKDIR}/${PN}-s${PV}"
-
-PATCHES=(
-	"${FILESDIR}/021109-uclibc-no-ether_ntohost.patch"
-)
-
-src_prepare() {
-	epatch "${PATCHES[@]}"
-	use SECURITY_HAZARD && epatch "${FILESDIR}"/${PN}-20150815-nonroot-floodping.patch
-}
-
-src_configure() {
-	use static && append-ldflags -static
-
-	TARGETS=(
-		ping
-		$(for v in arping clockdiff rarpd rdisc tftpd tracepath ; do usev ${v} ; done)
-	)
-	if use ipv6 ; then
-		TARGETS+=(
-			$(usex tracepath 'tracepath6' '')
-			$(usex traceroute 'traceroute6' '')
-		)
-	fi
-
-	myconf=(
-		USE_CRYPTO=no
-		USE_GCRYPT=no
-		USE_NETTLE=no
-	)
-
-	if use ipv6 && use ssl ; then
-		myconf=(
-			USE_CRYPTO=$(usex openssl)
-			USE_GCRYPT=$(usex gcrypt)
-			USE_NETTLE=$(usex nettle)
-		)
-	fi
-}
-
-src_compile() {
-	tc-export CC
-	emake \
-		USE_CAP=$(usex caps) \
-		USE_IDN=$(usex idn) \
-		IPV4_DEFAULT=$(usex ipv6 'no' 'yes') \
-		TARGETS="${TARGETS[*]}" \
-		${myconf[@]}
-
-	if [[ ${PV} == "99999999" ]] ; then
-		emake html man
-	fi
-}
-
-src_install() {
-	into /
-	dobin ping
-	dosym ping /bin/ping4
-	if use ipv6 ; then
-		dosym ping /bin/ping6
-		dosym ping.8 /usr/share/man/man8/ping6.8
-	fi
-	doman doc/ping.8
-
-	if use arping ; then
-		dobin arping
-		doman doc/arping.8
-	fi
-
-	into /usr
-
-	local u
-	for u in clockdiff rarpd rdisc tftpd tracepath ; do
-		if use ${u} ; then
-			case ${u} in
-			clockdiff) dobin ${u};;
-			*) dosbin ${u};;
-			esac
-			doman doc/${u}.8
-		fi
-	done
-
-	if use tracepath && use ipv6 ; then
-		dosbin tracepath6
-		dosym tracepath.8 /usr/share/man/man8/tracepath6.8
-	fi
-
-	if use traceroute && use ipv6 ; then
-		dosbin traceroute6
-		doman doc/traceroute6.8
-	fi
-
-	if use rarpd ; then
-		newinitd "${FILESDIR}"/rarpd.init.d rarpd
-		newconfd "${FILESDIR}"/rarpd.conf.d rarpd
-	fi
-
-	dodoc INSTALL.md RELNOTES
-
-	if use doc ; then
-		docinto html
-		dodoc doc/*.html
-	fi
-}
-
-pkg_postinst() {
-	fcaps cap_net_raw \
-		bin/ping \
-		$(usex arping 'bin/arping' '') \
-		$(usex clockdiff 'usr/bin/clockdiff' '')
-}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/, net-misc/iputils/files/
@ 2018-07-10 23:39 Thomas Deutschmann
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Deutschmann @ 2018-07-10 23:39 UTC (permalink / raw
  To: gentoo-commits

commit:     3ee18d29f9d2f245c8a9acda7a767edd247f7558
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 10 23:38:13 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Jul 10 23:38:13 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ee18d29

net-misc/iputils: bump to v20180629

Package-Manager: Portage-2.3.41, Repoman-2.3.9

 net-misc/iputils/Manifest                          |   2 +
 net-misc/iputils/files/iputils-20180629-musl.patch |  87 ++++++++++
 net-misc/iputils/iputils-20180629.ebuild           | 178 +++++++++++++++++++++
 3 files changed, 267 insertions(+)

diff --git a/net-misc/iputils/Manifest b/net-misc/iputils/Manifest
index 4bd330cb3a8..e2cf5240b90 100644
--- a/net-misc/iputils/Manifest
+++ b/net-misc/iputils/Manifest
@@ -1,2 +1,4 @@
 DIST iputils-20171016_pre.tar.gz 195254 BLAKE2B 1170db29d53dd8285b11d4df7b7da2ea3bd2be3599a3f0df85ca7e64247f2a534d03e43a2b6267ba4b9c0b65fcc58045151833ae2c1035a839ed728a389804af SHA512 570896fc58d945e08032134701ab6ea02bbf6fff420437bc5f89687cdcce6f3c1c64418a4c5ff54ca3cdc582bae2c95e196b2c8368eba2b163ebf88490aabf99
+DIST iputils-20180629.tar.gz 195094 BLAKE2B 81bf6ef427eac0769ea3f95c20294b46c81f9c619551234eb265b3a428998a96cf3df0cdc7499f9eea280c1999e899e87c3f4a863141de251a9c509840bc83b3 SHA512 16b8f5ad1cf88083ebaee0a71fddb14bb0a904336fd0baebfcca86c27ac0773553b21d12790b05cab7661d6432c75bbb1523e871e5e1b77faacd13ccc84f4476
 DIST iputils-manpages-20171016_pre.tar.xz 29764 BLAKE2B 47def1413b2cdcfba7f924dd7a045063c289c244ba8fb4dc43caf2a8d52032b57ee6d86ee4dffd5351faa3124d4c83a33ca3365866568c2164b374eed9d70ec0 SHA512 31b4b0b4e46d7c98530577392c636e4397917cbe415762145a119e68e3223bc85b9d5afcfe61ae01584a35f6a1a772adffc52deeedc722c474179fa1d208d8d9
+DIST iputils-manpages-20180629.tar.xz 29804 BLAKE2B 15983cc97bc6b6853c193f046687f10be11902f7e1d2dc2eec6c58edd1926f10152108d378858b0d7eb2d2908f038965b05515c4927aedc460282a22307883ad SHA512 1c5b0bab8496a3f3d9b5080029221231a497d9a5e91c61bd0ddd0b63fd51572d052801294aafd08e1dc8ad448b82cdaf48c72f0b08cc143f9c144f3db6848d9a

diff --git a/net-misc/iputils/files/iputils-20180629-musl.patch b/net-misc/iputils/files/iputils-20180629-musl.patch
new file mode 100644
index 00000000000..48742d96602
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20180629-musl.patch
@@ -0,0 +1,87 @@
+commit 5007d7067918fb3d950d34c01d059e5222db679a
+Author:     Aric Belsito <lluixhi@gmail.com>
+AuthorDate: Mon Dec 4 00:10:29 2017 +0100
+Commit:     Thomas Deutschmann <whissi@gentoo.org>
+CommitDate: Wed Jul 11 01:33:28 2018 +0200
+
+    Fix build on MUSL
+    
+    Add missing AI_IDN and NI_IDN declarations.
+    
+    Bug: https://bugs.gentoo.org/503914
+    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
+
+diff --git a/arping.c b/arping.c
+index c2f2129..d753345 100644
+--- a/arping.c
++++ b/arping.c
+@@ -44,6 +44,13 @@
+ 
+ #ifdef USE_IDN
+ #include <locale.h>
++
++#ifndef AI_IDN
++#define AI_IDN 0x0040
++#endif
++#ifndef AI_CANONIDN
++#define AI_CANONIDN 0x0080
++#endif
+ #endif
+ 
+ #include "SNAPSHOT.h"
+diff --git a/ping.h b/ping.h
+index 3e09685..1e51c67 100644
+--- a/ping.h
++++ b/ping.h
+@@ -37,6 +37,17 @@
+ 
+ #ifdef USE_IDN
+ #include <idn2.h>
++
++#ifndef AI_IDN
++#define AI_IDN 0x0040
++#endif
++#ifndef AI_CANONIDN
++#define AI_CANONIDN 0x0080
++#endif
++#ifndef NI_IDN
++#define NI_IDN 32
++#endif
++
+ #define getaddrinfo_flags (AI_CANONNAME | AI_IDN | AI_CANONIDN)
+ #define getnameinfo_flags NI_IDN
+ #else
+diff --git a/tracepath.c b/tracepath.c
+index 53bda16..9558e49 100644
+--- a/tracepath.c
++++ b/tracepath.c
+@@ -29,6 +29,14 @@
+ 
+ #ifdef USE_IDN
+ #include <locale.h>
++
++#ifndef AI_IDN
++#define AI_IDN 0x0040
++#endif
++#ifndef NI_IDN
++#define NI_IDN 32
++#endif
++
+ #define getnameinfo_flags	NI_IDN
+ #else
+ #define getnameinfo_flags	0
+diff --git a/traceroute6.c b/traceroute6.c
+index a1022f9..ab34615 100644
+--- a/traceroute6.c
++++ b/traceroute6.c
+@@ -246,6 +246,10 @@
+ #ifdef USE_IDN
+ #include <locale.h>
+ 
++#ifndef NI_IDN
++#define NI_IDN 32
++#endif
++
+ #define ADDRINFO_IDN_FLAGS	AI_IDN
+ #define getnameinfo_flags	NI_IDN
+ #else

diff --git a/net-misc/iputils/iputils-20180629.ebuild b/net-misc/iputils/iputils-20180629.ebuild
new file mode 100644
index 00000000000..fb577b0efbb
--- /dev/null
+++ b/net-misc/iputils/iputils-20180629.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# For released versions, we precompile the man/html pages and store
+# them in a tarball on our mirrors.  This avoids ugly issues while
+# building stages, and reduces depedencies.
+# To regenerate man/html pages emerge iputils-99999999[doc] with
+# EGIT_COMMIT set to release tag and tar ${S}/doc folder.
+
+EAPI="6"
+
+inherit flag-o-matic toolchain-funcs fcaps
+
+MY_PV="${PV/_pre/}"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-20180629-musl.patch
+)
+
+if [[ ${PV} == "99999999" ]] ; then
+	EGIT_REPO_URI="https://github.com/iputils/iputils.git"
+	inherit git-r3
+else
+	SRC_URI="https://github.com/iputils/iputils/archive/s${MY_PV}.tar.gz -> ${P}.tar.gz
+		https://dev.gentoo.org/~whissi/dist/iputils/${PN}-manpages-${MY_PV}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="Network monitoring tools including ping and ping6"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iputils"
+
+LICENSE="BSD GPL-2+ rdisc"
+SLOT="0"
+IUSE="+arping caps clockdiff doc gcrypt idn ipv6 libressl nettle rarpd rdisc SECURITY_HAZARD ssl static tftpd tracepath traceroute"
+
+LIB_DEPEND="caps? ( sys-libs/libcap[static-libs(+)] )
+	idn? ( net-dns/libidn2:=[static-libs(+)] )
+	ipv6? (
+		ssl? (
+			gcrypt? ( dev-libs/libgcrypt:0=[static-libs(+)] )
+			!gcrypt? (
+				nettle? ( dev-libs/nettle[static-libs(+)] )
+				!nettle? (
+					libressl? ( dev-libs/libressl:0=[static-libs(+)] )
+					!libressl? ( dev-libs/openssl:0=[static-libs(+)] )
+				)
+			)
+		)
+	)
+"
+RDEPEND="arping? ( !net-misc/arping )
+	rarpd? ( !net-misc/rarpd )
+	traceroute? ( !net-analyzer/traceroute )
+	!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+	static? ( ${LIB_DEPEND} )
+	virtual/os-headers
+"
+if [[ ${PV} == "99999999" ]] ; then
+	DEPEND+="app-text/docbook-xml-dtd:4.2
+		app-text/docbook-xml-dtd:4.5
+		app-text/docbook-xsl-stylesheets
+		dev-libs/libxslt:0
+	"
+fi
+
+[ "${PV}" = "99999999" ] || S="${WORKDIR}/${PN}-s${PV}"
+
+src_prepare() {
+	use SECURITY_HAZARD && PATCHES+=( "${FILESDIR}"/${PN}-20150815-nonroot-floodping.patch )
+
+	default
+}
+
+src_configure() {
+	use static && append-ldflags -static
+
+	TARGETS=(
+		ping
+		$(for v in arping clockdiff rarpd rdisc tftpd tracepath ; do usev ${v} ; done)
+	)
+	if use ipv6 ; then
+		TARGETS+=(
+			$(usex traceroute 'traceroute6' '')
+		)
+	fi
+
+	myconf=(
+		USE_CRYPTO=no
+		USE_GCRYPT=no
+		USE_NETTLE=no
+	)
+
+	if use ipv6 && use ssl ; then
+		myconf=(
+			USE_CRYPTO=yes
+			USE_GCRYPT=$(usex gcrypt)
+			USE_NETTLE=$(usex nettle)
+		)
+	fi
+}
+
+src_compile() {
+	tc-export CC
+	emake \
+		USE_CAP=$(usex caps) \
+		USE_IDN=$(usex idn) \
+		IPV4_DEFAULT=$(usex ipv6 'no' 'yes') \
+		TARGETS="${TARGETS[*]}" \
+		${myconf[@]}
+
+	if [[ ${PV} == "99999999" ]] ; then
+		emake man
+
+		use doc && emake html
+	fi
+}
+
+src_install() {
+	into /
+	dobin ping
+	dosym ping /bin/ping4
+	if use ipv6 ; then
+		dosym ping /bin/ping6
+		dosym ping.8 /usr/share/man/man8/ping6.8
+	fi
+	doman doc/ping.8
+
+	if use arping ; then
+		dobin arping
+		doman doc/arping.8
+	fi
+
+	into /usr
+
+	if use tracepath ; then
+		dosbin tracepath
+		doman doc/tracepath.8
+		dosym tracepath /usr/sbin/tracepath4
+	fi
+
+	local u
+	for u in clockdiff rarpd rdisc tftpd ; do
+		if use ${u} ; then
+			case ${u} in
+			clockdiff) dobin ${u};;
+			*) dosbin ${u};;
+			esac
+			doman doc/${u}.8
+		fi
+	done
+
+	if use tracepath && use ipv6 ; then
+		dosym tracepath /usr/sbin/tracepath6
+		dosym tracepath.8 /usr/share/man/man8/tracepath6.8
+	fi
+
+	if use traceroute && use ipv6 ; then
+		dosbin traceroute6
+		doman doc/traceroute6.8
+	fi
+
+	if use rarpd ; then
+		newinitd "${FILESDIR}"/rarpd.init.d rarpd
+		newconfd "${FILESDIR}"/rarpd.conf.d rarpd
+	fi
+
+	dodoc INSTALL.md
+
+	use doc && dodoc doc/*.html
+}
+
+pkg_postinst() {
+	fcaps cap_net_raw \
+		bin/ping \
+		$(usex arping 'bin/arping' '') \
+		$(usex clockdiff 'usr/bin/clockdiff' '')
+}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/, net-misc/iputils/files/
@ 2020-04-07 18:09 Thomas Deutschmann
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Deutschmann @ 2020-04-07 18:09 UTC (permalink / raw
  To: gentoo-commits

commit:     23a95c6869f3abe76afd4197e4b7f92d25048861
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  7 18:04:59 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Apr  7 18:09:23 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23a95c68

net-misc/iputils: fix arping

Closes: https://bugs.gentoo.org/692982
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 ...rt-partially-fix-sent-vs-received-package.patch |  34 ++++
 net-misc/iputils/iputils-20190709-r1.ebuild        | 201 +++++++++++++++++++++
 2 files changed, 235 insertions(+)

diff --git a/net-misc/iputils/files/iputils-20190709-arping-revert-partially-fix-sent-vs-received-package.patch b/net-misc/iputils/files/iputils-20190709-arping-revert-partially-fix-sent-vs-received-package.patch
new file mode 100644
index 00000000000..715ed45041b
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20190709-arping-revert-partially-fix-sent-vs-received-package.patch
@@ -0,0 +1,34 @@
+From 18f14be80466ddc8fb17a400be82764a779c8dcd Mon Sep 17 00:00:00 2001
+From: Sami Kerola <kerolasa@iki.fi>
+Date: Wed, 31 Jul 2019 21:28:12 +0100
+Subject: [PATCH] arping: revert partially - fix sent vs received packages
+ return value
+
+Commit 84ca65ca980315c73f929fed8b6f16bbd698c3a0 caused regression.  The
+arping -D needs return value evaluation that was the earlier default, in
+other cases the new return value should be correct.
+
+Addresses: https://github.com/iputils/iputils/issues/209
+See-also: https://github.com/void-linux/void-packages/issues/13304
+Signed-off-by: Sami Kerola <kerolasa@iki.fi>
+---
+ arping.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/arping.c b/arping.c
+index 77c9c56..2c87c15 100644
+--- a/arping.c
++++ b/arping.c
+@@ -792,7 +792,11 @@ static int event_loop(struct run_state *ctl)
+ 	close(tfd);
+ 	freeifaddrs(ctl->ifa0);
+ 	rc |= finish(ctl);
+-	rc |= (ctl->sent != ctl->received);
++	if (ctl->dad && ctl->quit_on_reply)
++		/* Duplicate address detection mode return value */
++		rc |= !(ctl->brd_sent != ctl->received);
++	else
++		rc |= (ctl->sent != ctl->received);
+ 	return rc;
+ }
+ 

diff --git a/net-misc/iputils/iputils-20190709-r1.ebuild b/net-misc/iputils/iputils-20190709-r1.ebuild
new file mode 100644
index 00000000000..52bdec97980
--- /dev/null
+++ b/net-misc/iputils/iputils-20190709-r1.ebuild
@@ -0,0 +1,201 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# For released versions, we precompile the man/html pages and store
+# them in a tarball on our mirrors.  This avoids ugly issues while
+# building stages, and reduces depedencies.
+# To regenerate man/html pages emerge iputils-99999999[doc] with
+# EGIT_COMMIT set to release tag and tar ${S}/doc folder.
+
+EAPI="7"
+
+PLOCALES="ja"
+
+inherit fcaps flag-o-matic l10n meson systemd toolchain-funcs
+
+if [[ ${PV} == "99999999" ]] ; then
+	EGIT_REPO_URI="https://github.com/iputils/iputils.git"
+	inherit git-r3
+else
+	SRC_URI="https://github.com/iputils/iputils/archive/s${PV}.tar.gz -> ${P}.tar.gz
+		https://dev.gentoo.org/~whissi/dist/iputils/${PN}-manpages-${PV}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="Network monitoring tools including ping and ping6"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iputils"
+
+LICENSE="BSD GPL-2+ rdisc"
+SLOT="0"
+IUSE="+arping caps clockdiff doc gcrypt idn ipv6 libressl nettle nls rarpd rdisc SECURITY_HAZARD ssl static tftpd tracepath traceroute6"
+
+BDEPEND="virtual/pkgconfig"
+
+LIB_DEPEND="
+	caps? ( sys-libs/libcap[static-libs(+)] )
+	idn? ( net-dns/libidn2:=[static-libs(+)] )
+	ipv6? (
+		ssl? (
+			gcrypt? ( dev-libs/libgcrypt:0=[static-libs(+)] )
+			!gcrypt? (
+				nettle? ( dev-libs/nettle[static-libs(+)] )
+				!nettle? (
+					libressl? ( dev-libs/libressl:0=[static-libs(+)] )
+					!libressl? ( dev-libs/openssl:0=[static-libs(+)] )
+				)
+			)
+		)
+	)
+	nls? ( sys-devel/gettext[static-libs(+)] )
+"
+
+RDEPEND="
+	arping? ( !net-misc/arping )
+	rarpd? ( !net-misc/rarpd )
+	traceroute6? ( !net-analyzer/traceroute )
+	!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+"
+
+DEPEND="
+	${RDEPEND}
+	virtual/os-headers
+	static? ( ${LIB_DEPEND} )
+"
+
+if [[ ${PV} == "99999999" ]] ; then
+	DEPEND+="
+		app-text/docbook-xml-dtd:4.2
+		app-text/docbook-xml-dtd:4.5
+		app-text/docbook-xsl-ns-stylesheets
+		app-text/docbook-xsl-stylesheets
+		dev-libs/libxslt:0
+	"
+fi
+
+[ "${PV}" == "99999999" ] || S="${WORKDIR}/${PN}-s${PV}"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-arping-revert-partially-fix-sent-vs-received-package.patch
+)
+
+src_prepare() {
+	use SECURITY_HAZARD && PATCHES+=( "${FILESDIR}"/${PN}-20150815-nonroot-floodping.patch )
+
+	default
+
+	l10n_get_locales > po/LINGUAS || die
+}
+
+src_configure() {
+	use static && append-ldflags -static
+
+	local emesonargs=(
+		-DUSE_CAP="$(usex caps true false)"
+		-DUSE_IDN="$(usex idn true false)"
+		-DBUILD_ARPING="$(usex arping true false)"
+		-DBUILD_CLOCKDIFF="$(usex clockdiff true false)"
+		-DBUILD_PING="true"
+		-DBUILD_RARPD="$(usex rarpd true false)"
+		-DBUILD_RDISC="$(usex rdisc true false)"
+		-DENABLE_RDISC_SERVER="$(usex rdisc true false)"
+		-DBUILD_TFTPD="$(usex tftpd true false)"
+		-DBUILD_TRACEPATH="$(usex tracepath true false)"
+		-DBUILD_TRACEROUTE6="$(usex ipv6 $(usex traceroute6 true false) false)"
+		-DBUILD_NINFOD="false"
+		-DNINFOD_MESSAGES="false"
+		-DNO_SETCAP_OR_SUID="true"
+		-Dsystemdunitdir="$(systemd_get_systemunitdir)"
+		-DUSE_GETTEXT="$(usex nls true false)"
+	)
+
+	if use ipv6 && use ssl ; then
+		emesonargs+=(
+			-DUSE_CRYPTO="$(usex gcrypt gcrypt $(usex nettle nettle openssl))"
+		)
+	else
+		emesonargs+=(
+			-DUSE_CRYPTO="none"
+		)
+	fi
+
+	if [[ "${PV}" == 99999999 ]] ; then
+		emesonargs+=(
+			-DBUILD_HTML_MANS="$(usex doc true false)"
+			-DBUILD_MANS="true"
+		)
+	else
+		emesonargs+=(
+			-DBUILD_HTML_MANS="false"
+			-DBUILD_MANS="false"
+		)
+	fi
+
+	meson_src_configure
+}
+
+src_compile() {
+	tc-export CC
+	meson_src_compile
+}
+
+src_install() {
+	meson_src_install
+
+	dodir /bin
+	local my_bin
+	for my_bin in $(usex arping arping '') ping ; do
+		mv "${ED}"/usr/bin/${my_bin} "${ED}"/bin/ || die
+	done
+	dosym ping /bin/ping4
+
+	if use tracepath ; then
+		dosym tracepath /usr/bin/tracepath4
+	fi
+
+	if use ipv6 ; then
+		dosym ping /bin/ping6
+
+		if use tracepath ; then
+			dosym tracepath /usr/bin/tracepath6
+			dosym tracepath.8 /usr/share/man/man8/tracepath6.8
+		fi
+	fi
+
+	if [[ "${PV}" != 99999999 ]] ; then
+		local -a man_pages
+		local -a html_man_pages
+
+		while IFS= read -r -u 3 -d $'\0' my_bin
+		do
+			my_bin=$(basename "${my_bin}")
+			[[ -z "${my_bin}" ]] && continue
+
+			if [[ -f "${S}/doc/${my_bin}.8" ]] ; then
+				man_pages+=( ${my_bin}.8 )
+			fi
+
+			if [[ -f "${S}/doc/${my_bin}.html" ]] ; then
+				html_man_pages+=( ${my_bin}.html )
+			fi
+		done 3< <(find "${ED}"/{bin,usr/bin,usr/sbin} -type f -perm -a+x -print0 2>/dev/null)
+
+		pushd doc &>/dev/null || die
+		doman "${man_pages[@]}"
+		if use doc ; then
+			docinto html
+			dodoc "${html_man_pages[@]}"
+		fi
+		popd &>/dev/null || die
+	else
+		if use doc ; then
+			mv "${ED}"/usr/share/${PN} "${ED}"/usr/share/doc/${PF}/html || die
+		fi
+	fi
+}
+
+pkg_postinst() {
+	fcaps cap_net_raw \
+		bin/ping \
+		$(usex arping 'bin/arping' '') \
+		$(usex clockdiff 'usr/bin/clockdiff' '')
+}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/, net-misc/iputils/files/
@ 2020-04-07 18:09 Thomas Deutschmann
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Deutschmann @ 2020-04-07 18:09 UTC (permalink / raw
  To: gentoo-commits

commit:     865c1a561c7eaabd160cd1d7b0aef09bfbcdb327
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  7 18:09:06 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Apr  7 18:09:24 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=865c1a56

net-misc/iputils: add some more patches for ping

- ping: try next addrinfo on connect failure
- ping: fix main loop over multiple addrinfo results

Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 ...-main-loop-over-multiple-addrinfo-results.patch |  86 ++++++++++
 ...ping-try-next-addrinfo-on-connect-failure.patch | 190 +++++++++++++++++++++
 net-misc/iputils/iputils-20190709-r1.ebuild        |   2 +
 3 files changed, 278 insertions(+)

diff --git a/net-misc/iputils/files/iputils-20190709-ping-fix-main-loop-over-multiple-addrinfo-results.patch b/net-misc/iputils/files/iputils-20190709-ping-fix-main-loop-over-multiple-addrinfo-results.patch
new file mode 100644
index 00000000000..9814707d723
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20190709-ping-fix-main-loop-over-multiple-addrinfo-results.patch
@@ -0,0 +1,86 @@
+From: Benjamin Poirier <benjamin.poirier@gmail.com>
+Date: Thu, 26 Dec 2019 10:44:03 +0900
+Subject: ping: fix main loop over multiple addrinfo results
+
+Despite what the log of commit f68eec0eafad ("ping: perform dual-stack ping
+by default") says, main() was not designed to loop over multiple addresses
+returned by getaddrinfo().  This is apparent because until commit
+db11bc96a68c ("ping: make command to return from main()"), ping{4,6}_run()
+never returned (they always exited).  After commit db11bc96a68c, we
+encounter unexpected situations if getaddrinfo returns multiple results and
+ping{4,6}_run() return != 0.
+
+For example (notice echo reply is not received):
+
+    root@vsid:/src/iputils# ./builddir/ping/ping -w1 google.com
+    PING google.com(nrt12s22-in-x0e.1e100.net (2404:6800:4004:80c::200e)) 56 data bytes
+
+    --- google.com ping statistics ---
+    1 packets transmitted, 0 received, 100% packet loss, time 0ms
+
+    PING  (216.58.197.142) 56(84) bytes of data.
+
+    ---  ping statistics ---
+    1 packets transmitted, 0 received, 100% packet loss, time -1002ms
+
+    root@vsid:/src/iputils#
+
+Establish the following convention:
+
+* return value >= 0 -> exit with this code (same behavior as before commit
+  db11bc96a68c)
+
+* return value < 0 -> go on to next addrinfo result
+
+The second case will be used in the following patch.
+
+Fixes: db11bc96a68c ("ping: make command to return from main()")
+Signed-off-by: Benjamin Poirier <bpoirier@cumulusnetworks.com>
+Origin: https://github.com/iputils/iputils/commit/c249e48bb865e731896b7d8ceaf4bca7d28768b6
+Bug-Debian: https://bugs.debian.org/947921
+See-also: https://github.com/iputils/iputils/pull/244
+---
+ ping.c         | 6 +++++-
+ ping6_common.c | 1 +
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/ping.c b/ping.c
+index 34653be..ae687b4 100644
+--- a/ping.c
++++ b/ping.c
+@@ -495,8 +495,11 @@ main(int argc, char **argv)
+ 			error(2, 0, _("unknown protocol family: %d"), ai->ai_family);
+ 		}
+ 
+-		if (ret_val == 0)
++		if (ret_val >= 0)
+ 			break;
++		/* ret_val < 0 means to go on to next addrinfo result, there
++		 * better be one. */
++		assert(ai->ai_next);
+ 	}
+ 
+ 	freeaddrinfo(result);
+@@ -504,6 +507,7 @@ main(int argc, char **argv)
+ 	return ret_val;
+ }
+ 
++/* return >= 0: exit with this code, < 0: go on to next addrinfo result */
+ int ping4_run(int argc, char **argv, struct addrinfo *ai, socket_st *sock)
+ {
+ 	static const struct addrinfo hints = {
+diff --git a/ping6_common.c b/ping6_common.c
+index 6cc5404..731dc6d 100644
+--- a/ping6_common.c
++++ b/ping6_common.c
+@@ -551,6 +551,7 @@ int niquery_option_handler(const char *opt_arg)
+ 	return ret;
+ }
+ 
++/* return >= 0: exit with this code, < 0: go on to next addrinfo result */
+ int ping6_run(int argc, char **argv, struct addrinfo *ai, struct socket_st *sock)
+ {
+ 	static const struct addrinfo hints = {
+-- 
+2.25.0.rc2
+

diff --git a/net-misc/iputils/files/iputils-20190709-ping-try-next-addrinfo-on-connect-failure.patch b/net-misc/iputils/files/iputils-20190709-ping-try-next-addrinfo-on-connect-failure.patch
new file mode 100644
index 00000000000..a308fb7c9f6
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20190709-ping-try-next-addrinfo-on-connect-failure.patch
@@ -0,0 +1,190 @@
+From: Benjamin Poirier <benjamin.poirier@gmail.com>
+Date: Wed, 25 Dec 2019 13:33:12 +0900
+Subject: ping: try next addrinfo on connect failure
+
+On hosts that have routing rules matching on the outgoing interface [1],
+getaddrinfo() may return results sorted in a suboptimal order because it is
+not aware of the network interface passed to ping via the "-I" option.  In
+particular, address reachability detection may fail and getaddrinfo() will
+return ipv6 results first, even though the only routes available are ipv4.
+
+Improve user experience by trying next addrinfo entry if we encounter a
+failure at connect() time because of missing or unreachable routes.
+
+[1] For example, on switches running Cumulus Linux, the default VRF is used
+for front ports and a "mgmt" VRF is used for the management interface, which
+also handles all DNS traffic.  (VRFs apply different routing rules based on
+the iif/oif, ie.  influenced by SO_BINDTODEVICE.) In the default vrf, it's
+possible to ping an ipv4 address via the mgmt vrf by specifying "-I mgmt".
+However, that will fail if the target host is specified by name, has a AAAA
+record and there is no ipv6 route to it.
+
+Since libc commit 5ddb5bf5fb, getaddrinfo() does a udp connect to result
+addresses to check if there is a route to them.  This is to implement
+RFC3484 §6 Rule 1 ("Avoid unusable destinations") which is part of the
+algorithm to order results.  getaddrinfo() is unaware of ping's "-I" option
+and tries to connect its socket via the default vrf, which has no ipv6 route
+to the target host (and, in fact, no ipv4 route either).  Following this
+failure, getaddrinfo() returns results ordered according to
+/etc/gai.conf (Rule 6) - by default, ipv6 first.
+
+ping tries only the first entry returned by getaddrinfo() and fails to
+connect to it because there is no ipv6 route to the host, even in the mgmt
+vrf.  However, if getaddrinfo() had ordered the ipv4 result first or ping
+had tried the next addrinfo entry (the ipv4 one), ping could connect a udp
+socket to it and later successfully exchange icmp messages with it.
+
+Example:
+
+    cumulus@act-5812-10:~$ ip vrf list
+    Name              Table
+    -----------------------
+    mgmt              1001
+    cumulus@act-5812-10:~$ ip vrf identify
+    cumulus@act-5812-10:~$ # --> default vrf
+    cumulus@act-5812-10:~$
+    cumulus@act-5812-10:~$ ip rule
+    99:     from all to 10.230.0.53 ipproto udp dport 53 lookup mgmt
+    99:     from all to 10.20.249.1 ipproto udp dport 53 lookup mgmt
+    1000:   from all lookup [l3mdev-table]
+    32765:  from all lookup local
+    32766:  from all lookup main
+    32767:  from all lookup default
+
+    cumulus@act-5812-10:~$ ip route
+
+    cumulus@act-5812-10:~$ ip -6 route
+    ::1 dev lo proto kernel metric 256 pref medium
+
+    cumulus@act-5812-10:~$ ip route show vrf mgmt
+    default via 10.230.130.1 dev eth0
+    unreachable default metric 4278198272
+    10.230.130.0/24 dev eth0 proto kernel scope link src 10.230.130.211
+    127.0.0.0/8 dev mgmt proto kernel scope link src 127.0.0.1
+
+    cumulus@act-5812-10:~$ ip -6 route show vrf mgmt
+    ::1 dev mgmt proto kernel metric 256 pref medium
+    anycast fe80:: dev eth0 proto kernel metric 0 pref medium
+    fe80::/64 dev eth0 proto kernel metric 256 pref medium
+    ff00::/8 dev eth0 metric 256 pref medium
+    unreachable default dev lo metric 4278198272 pref medium
+
+    cumulus@act-5812-10:~$ host google.com
+    google.com has address 172.217.0.46
+    google.com has IPv6 address 2607:f8b0:4005:802::200e
+    google.com mail is handled by 30 alt2.aspmx.l.google.com.
+    google.com mail is handled by 40 alt3.aspmx.l.google.com.
+    google.com mail is handled by 20 alt1.aspmx.l.google.com.
+    google.com mail is handled by 10 aspmx.l.google.com.
+    google.com mail is handled by 50 alt4.aspmx.l.google.com.
+
+Success with numeric address
+
+    cumulus@act-5812-10:~$ ping -n -c1 -I mgmt 172.217.0.46
+    ping: Warning: source address might be selected on device other than mgmt.
+    PING 172.217.0.46 (172.217.0.46) from 10.230.130.211 mgmt: 56(84) bytes of data.
+    64 bytes from 172.217.0.46: icmp_seq=1 ttl=51 time=4.68 ms
+
+    --- 172.217.0.46 ping statistics ---
+    1 packets transmitted, 1 received, 0% packet loss, time 0ms
+    rtt min/avg/max/mdev = 4.675/4.675/4.675/0.000 ms
+
+Failure with host by name
+
+    cumulus@act-5812-10:~$ ping -n -c1 -I mgmt google.com
+    connect: No route to host
+
+Success when running in the mgmt vrf because getaddrinfo()'s address
+reachability test is effective and ipv4 result(s) are ordered first.
+
+    cumulus@act-5812-10:~$ ip vrf exec mgmt ping -n -c1 google.com
+    PING google.com (172.217.0.46) 56(84) bytes of data.
+    64 bytes from 172.217.0.46: icmp_seq=1 ttl=51 time=4.65 ms
+
+    --- google.com ping statistics ---
+    1 packets transmitted, 1 received, 0% packet loss, time 0ms
+    rtt min/avg/max/mdev = 4.650/4.650/4.650/0.000 ms
+
+For demonstration purposes, the following configuration allows one to
+reproduce a similar problem.  Starting from a host with a vanilla
+configuration, default ipv4 route using eth0, no ipv6 global routes:
+
+    root@vsid:~# ip route
+    default via 192.168.15.1 dev eth0
+    192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.100
+
+    root@vsid:~# ip -6 route
+    ::1 dev lo proto kernel metric 256 pref medium
+    fe80::/64 dev eth0 proto kernel metric 256 pref medium
+
+    root@vsid:~# ip rou flush table main
+
+    root@vsid:~# ip rou add table 1 192.168.15.0/24 dev eth0
+
+    root@vsid:~# ip rou add table 1 default via 192.168.15.1
+
+    root@vsid:~# ip rule
+    0:    from all lookup local
+    32766:  from all lookup main
+    32767:  from all lookup default
+    root@vsid:~# ip rule add pref 1 to 192.168.15.1 ipproto udp dport 53 lookup 1
+    root@vsid:~# ip rule add pref 2 oif eth0 lookup 1
+    root@vsid:~# ping -c1 -I eth0 google.com
+
+    ping: connect: Network is unreachable
+
+With the current patch
+
+    root@vsid:~# /src/iputils/builddir/ping/ping -c1 -I eth0 google.com
+    PING  (172.217.174.110) from 192.168.15.100 eth0: 56(84) bytes of data.
+    64 bytes from nrt12s28-in-f14.1e100.net (172.217.174.110): icmp_seq=1 ttl=53 time=11.3 ms
+
+    ---  ping statistics ---
+    1 packets transmitted, 1 received, 0% packet loss, time 0ms
+    rtt min/avg/max/mdev = 11.313/11.313/11.313/0.000 ms
+
+Signed-off-by: Benjamin Poirier <bpoirier@cumulusnetworks.com>
+Origin: https://github.com/iputils/iputils/commit/2705c8248281fbb8efaa5326ab1d0ed0a670bd3d
+Bug-Debian: https://bugs.debian.org/947921
+See-also: https://github.com/iputils/iputils/pull/244
+---
+ ping.c         | 3 +++
+ ping6_common.c | 7 ++++++-
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/ping.c b/ping.c
+index 34653be..013c4e6 100644
+--- a/ping.c
++++ b/ping.c
+@@ -628,6 +628,9 @@ int ping4_run(int argc, char **argv, struct addrinfo *ai, socket_st *sock)
+ 					error(2, errno, _("cannot set broadcasting"));
+ 				if (connect(probe_fd, (struct sockaddr *)&dst, sizeof(dst)) == -1)
+ 					error(2, errno, "connect");
++			} else if ((errno == EHOSTUNREACH || errno == ENETUNREACH) && ai->ai_next) {
++				close(probe_fd);
++				return -1;
+ 			} else
+ 				error(2, errno, "connect");
+ 		}
+diff --git a/ping6_common.c b/ping6_common.c
+index 6cc5404..bc1030b 100644
+--- a/ping6_common.c
++++ b/ping6_common.c
+@@ -651,8 +651,13 @@ int ping6_run(int argc, char **argv, struct addrinfo *ai, struct socket_st *sock
+ 			firsthop.sin6_family = AF_INET6;
+ 
+ 		firsthop.sin6_port = htons(1025);
+-		if (connect(probe_fd, (struct sockaddr *)&firsthop, sizeof(firsthop)) == -1)
++		if (connect(probe_fd, (struct sockaddr *)&firsthop, sizeof(firsthop)) == -1) {
++			if ((errno == EHOSTUNREACH || errno == ENETUNREACH) && ai->ai_next) {
++				close(probe_fd);
++				return -1;
++			}
+ 			error(2, errno, "connect");
++		}
+ 		alen = sizeof source6;
+ 		if (getsockname(probe_fd, (struct sockaddr *)&source6, &alen) == -1)
+ 			error(2, errno, "getsockname");
+-- 
+2.25.0.rc2
+

diff --git a/net-misc/iputils/iputils-20190709-r1.ebuild b/net-misc/iputils/iputils-20190709-r1.ebuild
index 52bdec97980..de8b4a40ad6 100644
--- a/net-misc/iputils/iputils-20190709-r1.ebuild
+++ b/net-misc/iputils/iputils-20190709-r1.ebuild
@@ -76,6 +76,8 @@ fi
 
 PATCHES=(
 	"${FILESDIR}"/${P}-arping-revert-partially-fix-sent-vs-received-package.patch
+	"${FILESDIR}"/${P}-ping-try-next-addrinfo-on-connect-failure.patch
+	"${FILESDIR}"/${P}-ping-fix-main-loop-over-multiple-addrinfo-results.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/, net-misc/iputils/files/
@ 2021-01-25  3:29 Mike Gilbert
  0 siblings, 0 replies; 10+ messages in thread
From: Mike Gilbert @ 2021-01-25  3:29 UTC (permalink / raw
  To: gentoo-commits

commit:     f70bc63e84eb5797b02ec3aa6d972d2f1f8bc55a
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 25 03:27:29 2021 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Jan 25 03:27:51 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f70bc63e

net-misc/iputils: fix fallback code when getrandom fails

Closes: https://bugs.gentoo.org/738842
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../iputils-20200821-getrandom-fallback.patch      | 43 ++++++++++++++++++++++
 ...-20200821.ebuild => iputils-20200821-r1.ebuild} |  6 ++-
 2 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/net-misc/iputils/files/iputils-20200821-getrandom-fallback.patch b/net-misc/iputils/files/iputils-20200821-getrandom-fallback.patch
new file mode 100644
index 00000000000..5b69e5c88fb
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20200821-getrandom-fallback.patch
@@ -0,0 +1,43 @@
+From 469b41ac89b9f6772ea31df8379669d205be95f8 Mon Sep 17 00:00:00 2001
+From: Nuno Silva <nuno.m.ribeiro.silva@tecnico.ulisboa.pt>
+Date: Mon, 24 Aug 2020 19:34:53 +0100
+Subject: [PATCH] common: fix infinite loop when getrandom fails
+
+Fixes: https://github.com/iputils/iputils/issues/291
+---
+ iputils_common.c | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/iputils_common.c b/iputils_common.c
+index 58eacd0..c41f201 100644
+--- a/iputils_common.c
++++ b/iputils_common.c
+@@ -98,18 +98,24 @@ static unsigned int iputil_srand_fallback(void)
+ void iputils_srand(void)
+ {
+ 	unsigned int i;
++
+ #if HAVE_GETRANDOM
+ 	ssize_t ret;
+ 
+-	while ((ret = getrandom(&i, sizeof(i), GRND_NONBLOCK)) != sizeof(i)) {
+-		switch(errno) {
++	do {
++		errno = 0;
++		ret = getrandom(&i, sizeof(i), GRND_NONBLOCK);
++		switch (errno) {
++		case 0:
++			break;
+ 		case EINTR:
+ 			continue;
+ 		default:
+ 			i = iputil_srand_fallback();
+-			break;
++			goto done;
+ 		}
+-	}
++	} while (ret != sizeof(i));
++ done:
+ #else
+ 	i = iputil_srand_fallback();
+ #endif

diff --git a/net-misc/iputils/iputils-20200821.ebuild b/net-misc/iputils/iputils-20200821-r1.ebuild
similarity index 97%
rename from net-misc/iputils/iputils-20200821.ebuild
rename to net-misc/iputils/iputils-20200821-r1.ebuild
index 035fe9df791..3b1245c1082 100644
--- a/net-misc/iputils/iputils-20200821.ebuild
+++ b/net-misc/iputils/iputils-20200821-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # For released versions, we precompile the man/html pages and store
@@ -61,7 +61,9 @@ fi
 
 [ "${PV}" == "99999999" ] || S="${WORKDIR}/${PN}-s${PV}"
 
-PATCHES=()
+PATCHES=(
+	"${FILESDIR}/iputils-20200821-getrandom-fallback.patch"
+)
 
 src_prepare() {
 	default


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/, net-misc/iputils/files/
@ 2021-09-10 17:17 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2021-09-10 17:17 UTC (permalink / raw
  To: gentoo-commits

commit:     b88892c8d906c8bf491a8d9cf8fd7ddde1251700
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 10 17:17:36 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Sep 10 17:17:36 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b88892c8

net-misc/iputils: make tests conditional

Closes: https://bugs.gentoo.org/807973
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/iputils-20210722-optional-tests.patch    | 202 +++++++++++++++++++++
 net-misc/iputils/iputils-20210722.ebuild           |  10 +-
 net-misc/iputils/iputils-99999999.ebuild           |   5 +-
 3 files changed, 215 insertions(+), 2 deletions(-)

diff --git a/net-misc/iputils/files/iputils-20210722-optional-tests.patch b/net-misc/iputils/files/iputils-20210722-optional-tests.patch
new file mode 100644
index 00000000000..d6c4e98c080
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20210722-optional-tests.patch
@@ -0,0 +1,202 @@
+https://github.com/iputils/iputils/commit/3163c49f9f4ad473a00d8a345ee334a028376011.patch
+https://bugs.gentoo.org/807973
+
+From: Heiko Becker <heirecka@exherbo.org>
+Date: Fri, 23 Jul 2021 16:32:46 +0200
+Subject: [PATCH] meson: Make tests optional
+
+Now can be disabled with -DSKIP_TESTS=true.
+
+It allows to avoid meson error during build when ip isn't installed.
+
+Closes: #359
+
+Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
+Signed-off-by: Heiko Becker <heirecka@exherbo.org>
+[ pvorel: Rename variable TEST => SKIP_TESTS, default false, adjust
+the description ]
+Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -72,3 +72,6 @@ option('INSTALL_SYSTEMD_UNITS', type: 'boolean', value: false,
+ 
+ option('USE_GETTEXT', type: 'boolean', value: true,
+ 	description: 'Enable I18N')
++
++option('SKIP_TESTS', type: 'boolean', value: false,
++	description: 'Skip tests during build')
+--- a/ping/meson.build
++++ b/ping/meson.build
+@@ -27,86 +27,6 @@ if (setcap_ping)
+ 	)
+ endif
+ 
+-##### TESTS #####
+-
+-# TODO: ::1 generates DEPRECATION: ":" is not allowed in test name "ping -c1 ::1", it has been replaced with "_"
+-
+-# GitHub CI does not have working IPv6
+-# https://github.com/actions/virtual-environments/issues/668
+-ipv6_dst = []
+-ipv6_switch = []
+-r = run_command('ip', '-6', 'a')
+-if r.stdout().strip().contains('::1')
+-  message('IPv6 enabled')
+-  ipv6_dst = [ '::1' ]
+-  ipv6_switch = [ '-6' ]
+-else
+-  message('WARNING: IPv6 disabled')
++if not get_option('SKIP_TESTS')
++	subdir('test')
+ endif
+-
+-run_as_root = false
+-r = run_command('id', '-u')
+-if r.stdout().strip().to_int() == 0
+-  message('running as root')
+-  run_as_root = true
+-else
+-  message('running as normal user')
+-endif
+-
+-foreach dst : [ 'localhost', '127.0.0.1' ] + ipv6_dst
+-  foreach switch : [ '', '-4' ] + ipv6_switch
+-	args = [ '-c1', dst ]
+-	should_fail = false
+-
+-	if switch != ''
+-	  args = [switch] + args
+-	  if (switch == '-4' and dst == '::1') or (switch == '-6' and dst == '127.0.0.1')
+-		 should_fail = true
+-	  endif
+-	endif
+-
+-	name = 'ping ' + ' '.join(args)
+-	test(name, ping, args : args, should_fail : should_fail)
+-  endforeach
+-endforeach
+-
+-ping_tests_opt = [
+-  [ '-c1' ],
+-  [ '-c5', '-i0.1' ],
+-  [ '-c1', '-I', 'lo' ],
+-  [ '-c1', '-w1' ],
+-  [ '-c1', '-W1' ],
+-  [ '-c1', '-W1.1' ],
+-]
+-foreach dst : [ '127.0.0.1' ] + ipv6_dst
+-  foreach args : ping_tests_opt
+-	args += [ dst ]
+-	name = 'ping ' + ' '.join(args)
+-	test(name, ping, args : args)
+-  endforeach
+-endforeach
+-
+-ping_tests_opt_fail = [
+-  [ '-c1.1' ],
+-  [ '-I', 'nonexisting' ],
+-  [ '-w0.1' ],
+-  [ '-w0,1' ],
+-]
+-foreach dst : [ '127.0.0.1' ] + ipv6_dst
+-  foreach args : ping_tests_opt_fail
+-	args += [ dst ]
+-	name = 'ping ' + ' '.join(args)
+-	test(name, ping, args : args, should_fail : true)
+-  endforeach
+-endforeach
+-
+-ping_tests_user_fail = [
+-  [ '-c1', '-i0.001' ], # -c1 required to quit ping when running as root
+-]
+-foreach dst : [ '127.0.0.1' ] + ipv6_dst
+-  foreach args : ping_tests_user_fail
+-	args += [ dst ]
+-	name = 'ping ' + ' '.join(args)
+-	test(name, ping, args : args, should_fail : not run_as_root)
+-  endforeach
+-endforeach
+--- /dev/null
++++ b/ping/test/meson.build
+@@ -0,0 +1,81 @@
++# TODO: ::1 generates DEPRECATION: ":" is not allowed in test name "ping -c1 ::1", it has been replaced with "_"
++
++# GitHub CI does not have working IPv6
++# https://github.com/actions/virtual-environments/issues/668
++ipv6_dst = []
++ipv6_switch = []
++r = run_command('ip', '-6', 'a')
++if r.stdout().strip().contains('::1')
++  message('IPv6 enabled')
++  ipv6_dst = [ '::1' ]
++  ipv6_switch = [ '-6' ]
++else
++  message('WARNING: IPv6 disabled')
++endif
++
++run_as_root = false
++r = run_command('id', '-u')
++if r.stdout().strip().to_int() == 0
++  message('running as root')
++  run_as_root = true
++else
++  message('running as normal user')
++endif
++
++foreach dst : [ 'localhost', '127.0.0.1' ] + ipv6_dst
++  foreach switch : [ '', '-4' ] + ipv6_switch
++	args = [ '-c1', dst ]
++	should_fail = false
++
++	if switch != ''
++	  args = [switch] + args
++	  if (switch == '-4' and dst == '::1') or (switch == '-6' and dst == '127.0.0.1')
++		 should_fail = true
++	  endif
++	endif
++
++	name = 'ping ' + ' '.join(args)
++	test(name, ping, args : args, should_fail : should_fail)
++  endforeach
++endforeach
++
++ping_tests_opt = [
++  [ '-c1' ],
++  [ '-c5', '-i0.1' ],
++  [ '-c1', '-I', 'lo' ],
++  [ '-c1', '-w1' ],
++  [ '-c1', '-W1' ],
++  [ '-c1', '-W1.1' ],
++]
++foreach dst : [ '127.0.0.1' ] + ipv6_dst
++  foreach args : ping_tests_opt
++	args += [ dst ]
++	name = 'ping ' + ' '.join(args)
++	test(name, ping, args : args)
++  endforeach
++endforeach
++
++ping_tests_opt_fail = [
++  [ '-c1.1' ],
++  [ '-I', 'nonexisting' ],
++  [ '-w0.1' ],
++  [ '-w0,1' ],
++]
++foreach dst : [ '127.0.0.1' ] + ipv6_dst
++  foreach args : ping_tests_opt_fail
++	args += [ dst ]
++	name = 'ping ' + ' '.join(args)
++	test(name, ping, args : args, should_fail : true)
++  endforeach
++endforeach
++
++ping_tests_user_fail = [
++  [ '-c1', '-i0.001' ], # -c1 required to quit ping when running as root
++]
++foreach dst : [ '127.0.0.1' ] + ipv6_dst
++  foreach args : ping_tests_user_fail
++	args += [ dst ]
++	name = 'ping ' + ' '.join(args)
++	test(name, ping, args : args, should_fail : not run_as_root)
++  endforeach
++endforeach

diff --git a/net-misc/iputils/iputils-20210722.ebuild b/net-misc/iputils/iputils-20210722.ebuild
index 0e3d015bdb9..b89114ba078 100644
--- a/net-misc/iputils/iputils-20210722.ebuild
+++ b/net-misc/iputils/iputils-20210722.ebuild
@@ -28,10 +28,12 @@ HOMEPAGE="https://wiki.linuxfoundation.org/networking/iputils"
 
 LICENSE="BSD GPL-2+ rdisc"
 SLOT="0"
-IUSE="+arping caps clockdiff doc gcrypt idn ipv6 nettle nls rarpd rdisc ssl static tftpd tracepath traceroute6"
+IUSE="+arping caps clockdiff doc gcrypt idn ipv6 nettle nls rarpd rdisc ssl static test tftpd tracepath traceroute6"
+RESTRICT="!test? ( test )"
 
 BDEPEND="
 	virtual/pkgconfig
+	test? ( sys-apps/iproute2 )
 	nls? ( sys-devel/gettext )
 "
 
@@ -62,6 +64,11 @@ if [[ ${PV} == "99999999" ]] ; then
 	"
 fi
 
+PATCHES=(
+	# Upstream; drop on bump
+	"${FILESDIR}"/${P}-optional-tests.patch
+)
+
 src_prepare() {
 	default
 
@@ -88,6 +95,7 @@ src_configure() {
 		-DNO_SETCAP_OR_SUID="true"
 		-Dsystemdunitdir="$(systemd_get_systemunitdir)"
 		-DUSE_GETTEXT="$(usex nls true false)"
+		$(meson_use !test SKIP_TESTS)
 	)
 
 	if [[ "${PV}" == 99999999 ]] ; then

diff --git a/net-misc/iputils/iputils-99999999.ebuild b/net-misc/iputils/iputils-99999999.ebuild
index 0e3d015bdb9..fe97d131c7f 100644
--- a/net-misc/iputils/iputils-99999999.ebuild
+++ b/net-misc/iputils/iputils-99999999.ebuild
@@ -28,10 +28,12 @@ HOMEPAGE="https://wiki.linuxfoundation.org/networking/iputils"
 
 LICENSE="BSD GPL-2+ rdisc"
 SLOT="0"
-IUSE="+arping caps clockdiff doc gcrypt idn ipv6 nettle nls rarpd rdisc ssl static tftpd tracepath traceroute6"
+IUSE="+arping caps clockdiff doc gcrypt idn ipv6 nettle nls rarpd rdisc ssl static test tftpd tracepath traceroute6"
+RESTRICT="!test? ( test )"
 
 BDEPEND="
 	virtual/pkgconfig
+	test? ( sys-apps/iproute2 )
 	nls? ( sys-devel/gettext )
 "
 
@@ -88,6 +90,7 @@ src_configure() {
 		-DNO_SETCAP_OR_SUID="true"
 		-Dsystemdunitdir="$(systemd_get_systemunitdir)"
 		-DUSE_GETTEXT="$(usex nls true false)"
+		$(meson_use !test SKIP_TESTS)
 	)
 
 	if [[ "${PV}" == 99999999 ]] ; then


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/, net-misc/iputils/files/
@ 2021-10-14  3:16 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2021-10-14  3:16 UTC (permalink / raw
  To: gentoo-commits

commit:     c8e7cf5b4f813a24758f4d81e722df07bba85017
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 14 03:15:47 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Oct 14 03:15:47 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8e7cf5b

net-misc/iputils: backport no-IPv6 ping patch

Bug: https://bugs.gentoo.org/818022
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/iputils-20210722-fix-no-ipv6-ping.patch  |  47 +++++
 net-misc/iputils/iputils-20210722-r1.ebuild        | 192 +++++++++++++++++++++
 2 files changed, 239 insertions(+)

diff --git a/net-misc/iputils/files/iputils-20210722-fix-no-ipv6-ping.patch b/net-misc/iputils/files/iputils-20210722-fix-no-ipv6-ping.patch
new file mode 100644
index 00000000000..61f9f5c03fd
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20210722-fix-no-ipv6-ping.patch
@@ -0,0 +1,47 @@
+https://github.com/iputils/iputils/commit/79d713eab6181e219bf932b404706f6f59ff2539.patch
+https://bugs.gentoo.org/818022
+
+From: Byron Stanoszek <gandalf@winds.org>
+Date: Thu, 16 Sep 2021 23:38:54 +0200
+Subject: [PATCH] ping: Remove 'unsupported IPv6' warning on disabled IPv6
+
+Regression was introduced in d141cb6 as introduced condition
+
+if ((errno == EAFNOSUPPORT && socktype == AF_INET6) || options & F_VERBOSE || requisite)
+
+was wrong, it should have been:
+
+if ((errno == EAFNOSUPPORT && family == AF_INET6 && requisite) || options & F_VERBOSE)
+
+but bug was hidden as `family == AF_INET6' was always false until
+otherwise correct fix 904cdb6 ("ping: AF_INET6 is address family not
+socket type [lgtm scan]") propagated the error.
+
+Tested on kernel booted with ipv6.disable=1 (disabling via sysctl, i.e.
+sysctl -w net.ipv6.conf.all.disable_ipv6=1; sysctl -w net.ipv6.conf.default.disable_ipv6=1
+does not trigger the issue as it exit with "socket: Address family not
+supported by protocol" - errno EADDRNOTAVAIL).
+
+Fixes: d141cb6 ("ping: work with older kernels that don't support ping sockets")
+Closes: https://github.com/iputils/iputils/issues/293
+Closes: https://github.com/iputils/iputils/pull/370
+
+Reported-by: lekto <lekto@o2.pl>
+Reviewed-by: Andrew Clayton <andrew@digital-domain.net>
+Reviewed-by: Petr Vorel <pvorel@suse.cz>
+Signed-off-by: Byron Stanoszek <gandalf@winds.org>
+[ pvorel: create commit from Byron's patch on the issue, do analysis and wrote commit message ]
+Signed-off-by: Petr Vorel <pvorel@suse.cz>
+--- a/ping/ping.c
++++ b/ping/ping.c
+@@ -150,8 +150,8 @@ static void create_socket(struct ping_rts *rts, socket_st *sock, int family,
+ 		/* Report error related to disabled IPv6 only when IPv6 also failed or in
+ 		 * verbose mode. Report other errors always.
+ 		 */
+-		if ((errno == EAFNOSUPPORT && family == AF_INET6) ||
+-		    rts->opt_verbose || requisite)
++		if ((errno == EAFNOSUPPORT && family == AF_INET6 && requisite) ||
++		    rts->opt_verbose)
+ 			error(0, errno, "socket");
+ 		if (requisite)
+ 			exit(2);

diff --git a/net-misc/iputils/iputils-20210722-r1.ebuild b/net-misc/iputils/iputils-20210722-r1.ebuild
new file mode 100644
index 00000000000..7d70dc9970a
--- /dev/null
+++ b/net-misc/iputils/iputils-20210722-r1.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# For released versions, we precompile the man/html pages and store
+# them in a tarball on our mirrors.  This avoids ugly issues while
+# building stages, and reduces dependencies.
+# To regenerate man/html pages emerge iputils-99999999[doc] with
+# EGIT_COMMIT set to release tag, all USE flags enabled and
+# tar ${S}/doc folder.
+
+EAPI="7"
+
+PLOCALES="de fr ja pt_BR tr uk zh_CN"
+
+inherit fcaps flag-o-matic meson plocale systemd toolchain-funcs
+
+if [[ ${PV} == "99999999" ]] ; then
+	EGIT_REPO_URI="https://github.com/iputils/iputils.git"
+	inherit git-r3
+else
+	SRC_URI="https://github.com/iputils/iputils/archive/${PV}.tar.gz -> ${P}.tar.gz
+		https://dev.gentoo.org/~whissi/dist/iputils/${PN}-manpages-${PV}.tar.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="Network monitoring tools including ping and ping6"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iputils"
+
+LICENSE="BSD GPL-2+ rdisc"
+SLOT="0"
+IUSE="+arping caps clockdiff doc gcrypt idn ipv6 nettle nls rarpd rdisc ssl static test tftpd tracepath traceroute6"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+	virtual/pkgconfig
+	test? ( sys-apps/iproute2 )
+	nls? ( sys-devel/gettext )
+"
+
+LIB_DEPEND="
+	caps? ( sys-libs/libcap[static-libs(+)] )
+	idn? ( net-dns/libidn2:=[static-libs(+)] )
+	nls? ( virtual/libintl[static-libs(+)] )
+"
+
+RDEPEND="
+	traceroute6? ( !net-analyzer/traceroute )
+	!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+"
+
+DEPEND="
+	${RDEPEND}
+	virtual/os-headers
+	static? ( ${LIB_DEPEND} )
+"
+
+if [[ ${PV} == "99999999" ]] ; then
+	BDEPEND+="
+		app-text/docbook-xml-dtd:4.2
+		app-text/docbook-xml-dtd:4.5
+		app-text/docbook-xsl-ns-stylesheets
+		app-text/docbook-xsl-stylesheets
+		dev-libs/libxslt:0
+	"
+fi
+
+PATCHES=(
+	# Upstream; drop on bump
+	"${FILESDIR}"/${P}-optional-tests.patch
+	# Upstream; drop on bump
+	"${FILESDIR}"/${P}-fix-no-ipv6-ping.patch
+)
+
+src_prepare() {
+	default
+
+	plocale_get_locales > po/LINGUAS || die
+}
+
+src_configure() {
+	use static && append-ldflags -static
+
+	local emesonargs=(
+		-DUSE_CAP="$(usex caps true false)"
+		-DUSE_IDN="$(usex idn true false)"
+		-DBUILD_ARPING="$(usex arping true false)"
+		-DBUILD_CLOCKDIFF="$(usex clockdiff true false)"
+		-DBUILD_PING="true"
+		-DBUILD_RARPD="$(usex rarpd true false)"
+		-DBUILD_RDISC="$(usex rdisc true false)"
+		-DENABLE_RDISC_SERVER="$(usex rdisc true false)"
+		-DBUILD_TFTPD="$(usex tftpd true false)"
+		-DBUILD_TRACEPATH="$(usex tracepath true false)"
+		-DBUILD_TRACEROUTE6="$(usex ipv6 $(usex traceroute6 true false) false)"
+		-DBUILD_NINFOD="false"
+		-DNINFOD_MESSAGES="false"
+		-DNO_SETCAP_OR_SUID="true"
+		-Dsystemdunitdir="$(systemd_get_systemunitdir)"
+		-DUSE_GETTEXT="$(usex nls true false)"
+		$(meson_use !test SKIP_TESTS)
+	)
+
+	if [[ "${PV}" == 99999999 ]] ; then
+		emesonargs+=(
+			-DBUILD_HTML_MANS="$(usex doc true false)"
+			-DBUILD_MANS="true"
+		)
+	else
+		emesonargs+=(
+			-DBUILD_HTML_MANS="false"
+			-DBUILD_MANS="false"
+		)
+	fi
+
+	meson_src_configure
+}
+
+src_compile() {
+	tc-export CC
+	meson_src_compile
+}
+
+src_test() {
+	if [[ ${EUID} != 0 ]]; then
+		einfo "Tests require root privileges; Skipping ..."
+		return
+	fi
+
+	meson_src_test
+}
+
+src_install() {
+	meson_src_install
+
+	dodir /bin
+	local my_bin
+	for my_bin in $(usex arping arping '') ping ; do
+		mv "${ED}"/usr/bin/${my_bin} "${ED}"/bin/ || die
+	done
+	dosym ping /bin/ping4
+
+	if use tracepath ; then
+		dosym tracepath /usr/bin/tracepath4
+	fi
+
+	if use ipv6 ; then
+		dosym ping /bin/ping6
+
+		if use tracepath ; then
+			dosym tracepath /usr/bin/tracepath6
+			dosym tracepath.8 /usr/share/man/man8/tracepath6.8
+		fi
+	fi
+
+	if [[ "${PV}" != 99999999 ]] ; then
+		local -a man_pages
+		local -a html_man_pages
+
+		while IFS= read -r -u 3 -d $'\0' my_bin
+		do
+			my_bin=$(basename "${my_bin}")
+			[[ -z "${my_bin}" ]] && continue
+
+			if [[ -f "${S}/doc/${my_bin}.8" ]] ; then
+				man_pages+=( ${my_bin}.8 )
+			fi
+
+			if [[ -f "${S}/doc/${my_bin}.html" ]] ; then
+				html_man_pages+=( ${my_bin}.html )
+			fi
+		done 3< <(find "${ED}"/{bin,usr/bin,usr/sbin} -type f -perm -a+x -print0 2>/dev/null)
+
+		pushd doc &>/dev/null || die
+		doman "${man_pages[@]}"
+		if use doc ; then
+			docinto html
+			dodoc "${html_man_pages[@]}"
+		fi
+		popd &>/dev/null || die
+	else
+		if use doc ; then
+			mv "${ED}"/usr/share/${PN} "${ED}"/usr/share/doc/${PF}/html || die
+		fi
+	fi
+}
+
+pkg_postinst() {
+	fcaps cap_net_raw \
+		bin/ping \
+		$(usex arping 'bin/arping' '') \
+		$(usex clockdiff 'usr/bin/clockdiff' '')
+}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-10-14  3:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-28 14:47 [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/, net-misc/iputils/files/ Thomas Deutschmann
  -- strict thread matches above, loose matches on Subject: below --
2021-10-14  3:16 Sam James
2021-09-10 17:17 Sam James
2021-01-25  3:29 Mike Gilbert
2020-04-07 18:09 Thomas Deutschmann
2020-04-07 18:09 Thomas Deutschmann
2018-07-10 23:39 Thomas Deutschmann
2018-05-16 19:26 Lars Wendler
2016-03-07 15:50 Lars Wendler
2015-08-20 12:21 Lars Wendler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox