* [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/files/, net-misc/iputils/
@ 2017-10-29 22:29 Thomas Deutschmann
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Deutschmann @ 2017-10-29 22:29 UTC (permalink / raw
To: gentoo-commits
commit: 4c0166edf28e7359be5d1057a9cf5a7415b42653
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 29 22:25:38 2017 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Oct 29 22:29:14 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c0166ed
net-misc/iputils: Fix build issue on MUSL
Closes: https://bugs.gentoo.org/503914
Package-Manager: Portage-2.3.13, Repoman-2.3.4
net-misc/iputils/files/iputils-99999999-musl.patch | 92 ++++++++++++++++++++++
net-misc/iputils/iputils-20171016_pre.ebuild | 5 +-
net-misc/iputils/iputils-99999999.ebuild | 5 +-
3 files changed, 100 insertions(+), 2 deletions(-)
diff --git a/net-misc/iputils/files/iputils-99999999-musl.patch b/net-misc/iputils/files/iputils-99999999-musl.patch
new file mode 100644
index 00000000000..167e7fabca7
--- /dev/null
+++ b/net-misc/iputils/files/iputils-99999999-musl.patch
@@ -0,0 +1,92 @@
+From 58ed671d1003caf32f3c35260531e8e1cd7efb80 Mon Sep 17 00:00:00 2001
+From: Aric Belsito <lluixhi@gmail.com>
+Date: Sun, 29 Oct 2017 23:17:03 +0100
+Subject: [PATCH] Fix build on MUSL
+
+Add missing AI_IDN and NI_IDN declarations.
+
+Bug: https://bugs.gentoo.org/503914
+---
+ arping.c | 7 +++++++
+ ping.h | 11 +++++++++++
+ tracepath.c | 8 ++++++++
+ traceroute6.c | 4 ++++
+ 4 files changed, 30 insertions(+)
+
+diff --git a/arping.c b/arping.c
+index 0ac18cd..5d2145e 100644
+--- a/arping.c
++++ b/arping.c
+@@ -45,6 +45,13 @@
+ #ifdef USE_IDN
+ #include <idna.h>
+ #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 c5f0321..0391de0 100644
+--- a/ping.h
++++ b/ping.h
+@@ -38,6 +38,17 @@
+ #include <locale.h>
+ #include <idna.h>
+ #include <stringprep.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 b0eb911..c50e3ec 100644
+--- a/tracepath.c
++++ b/tracepath.c
+@@ -30,6 +30,14 @@
+ #ifdef USE_IDN
+ #include <idna.h>
+ #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 7807956..c6d868a 100644
+--- a/traceroute6.c
++++ b/traceroute6.c
+@@ -247,6 +247,10 @@
+ #include <idna.h>
+ #include <locale.h>
+
++#ifndef NI_IDN
++#define NI_IDN 32
++#endif
++
+ #define getnameinfo_flags NI_IDN
+ #else
+ #define getnameinfo_flags 0
+--
+2.14.3
+
diff --git a/net-misc/iputils/iputils-20171016_pre.ebuild b/net-misc/iputils/iputils-20171016_pre.ebuild
index 691040d27e1..fb555325457 100644
--- a/net-misc/iputils/iputils-20171016_pre.ebuild
+++ b/net-misc/iputils/iputils-20171016_pre.ebuild
@@ -13,7 +13,10 @@ inherit flag-o-matic toolchain-funcs fcaps
MY_COMMIT="67e7d0daf1f231cc708217e6aec2f8d5ce7aeacf"
-PATCHES=( "${FILESDIR}"/${PN}-99999999-tracepath46.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-99999999-tracepath46.patch
+ "${FILESDIR}"/${PN}-99999999-musl.patch
+)
if [[ ${PV} == "99999999" ]] ; then
EGIT_REPO_URI="https://github.com/iputils/iputils.git"
diff --git a/net-misc/iputils/iputils-99999999.ebuild b/net-misc/iputils/iputils-99999999.ebuild
index 9731575e02e..90fcf7f7d8a 100644
--- a/net-misc/iputils/iputils-99999999.ebuild
+++ b/net-misc/iputils/iputils-99999999.ebuild
@@ -11,7 +11,10 @@ EAPI="6"
inherit flag-o-matic toolchain-funcs fcaps
-PATCHES=( "${FILESDIR}"/${PN}-99999999-tracepath46.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-99999999-tracepath46.patch
+ "${FILESDIR}"/${PN}-99999999-musl.patch
+)
if [[ ${PV} == "99999999" ]] ; then
EGIT_REPO_URI="https://github.com/iputils/iputils.git"
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/files/, net-misc/iputils/
@ 2018-10-01 18:00 Thomas Deutschmann
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Deutschmann @ 2018-10-01 18:00 UTC (permalink / raw
To: gentoo-commits
commit: 7e5d313104a13e24ef704f176618dcb63dc87209
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 1 18:00:17 2018 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Oct 1 18:00:17 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e5d3131
net-misc/iputils: fix build on musl when USE=-idn
Closes: https://bugs.gentoo.org/665164
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
Package-Manager: Portage-2.3.50, Repoman-2.3.11
.../files/iputils-20180629-fix-ping-on-musl.patch | 54 ++++++++++++++++++++++
net-misc/iputils/iputils-20180629.ebuild | 3 +-
2 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/net-misc/iputils/files/iputils-20180629-fix-ping-on-musl.patch b/net-misc/iputils/files/iputils-20180629-fix-ping-on-musl.patch
new file mode 100644
index 00000000000..8d8160a3d4a
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20180629-fix-ping-on-musl.patch
@@ -0,0 +1,54 @@
+From 25899e849aa3abc1ad29ebf0b830262a859eaed5 Mon Sep 17 00:00:00 2001
+From: Petr Vorel <petr.vorel@gmail.com>
+Date: Sat, 21 Jul 2018 17:46:14 +0200
+Subject: [PATCH] ping: Fix AI_CANONIDN usage on some systems
+
+Commit 99f67db used AI_CANONIDN in a way, which broke compilation on
+systems where AI_CANONIDN is not defined in netdb.h (e.g. glibc < 2.3.4,
+alternative libcs that don't support IDN: e.g. current musl 1.1.19 and
+uClibc-ng 1.0.30) when not using the system libidn2.
+
+Fixes: 99f67db ping: Fix ping name encoded using ACE on C locale
+
+Reported-by: Nicholas Fish
+Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
+---
+ ping.c | 2 +-
+ ping.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ping.c b/ping.c
+index 733477f..b241815 100644
+--- a/ping.c
++++ b/ping.c
+@@ -207,9 +207,9 @@ main(int argc, char **argv)
+
+ #ifdef USE_IDN
+ setlocale(LC_ALL, "");
+-#endif
+ if (!strcmp(setlocale(LC_ALL, NULL), "C"))
+ hints.ai_flags &= ~ AI_CANONIDN;
++#endif
+
+ /* Support being called using `ping4` or `ping6` symlinks */
+ if (argv[0][strlen(argv[0])-1] == '4')
+diff --git a/ping.h b/ping.h
+index 3e09685..8a0c4ef 100644
+--- a/ping.h
++++ b/ping.h
+@@ -28,7 +28,6 @@
+ #include <netinet/icmp6.h>
+ #include <linux/filter.h>
+ #include <resolv.h>
+-#include <locale.h>
+
+ #ifdef CAPABILITIES
+ #include <sys/prctl.h>
+@@ -36,6 +35,7 @@
+ #endif
+
+ #ifdef USE_IDN
++#include <locale.h>
+ #include <idn2.h>
+ #define getaddrinfo_flags (AI_CANONNAME | AI_IDN | AI_CANONIDN)
+ #define getnameinfo_flags NI_IDN
diff --git a/net-misc/iputils/iputils-20180629.ebuild b/net-misc/iputils/iputils-20180629.ebuild
index fb577b0efbb..98e13d04e31 100644
--- a/net-misc/iputils/iputils-20180629.ebuild
+++ b/net-misc/iputils/iputils-20180629.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# For released versions, we precompile the man/html pages and store
@@ -15,6 +15,7 @@ MY_PV="${PV/_pre/}"
PATCHES=(
"${FILESDIR}"/${PN}-20180629-musl.patch
+ "${FILESDIR}"/${P}-fix-ping-on-musl.patch
)
if [[ ${PV} == "99999999" ]] ; then
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/files/, net-misc/iputils/
@ 2019-03-31 22:37 Thomas Deutschmann
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Deutschmann @ 2019-03-31 22:37 UTC (permalink / raw
To: gentoo-commits
commit: 113cb929218bb726627bb6d60740f553db8c8bf4
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 31 22:31:56 2019 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Mar 31 22:37:40 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=113cb929
net-misc/iputils: drop old
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
net-misc/iputils/Manifest | 2 -
.../files/iputils-20150815-nonroot-floodping.patch | 11 --
net-misc/iputils/iputils-20171016_pre.ebuild | 178 ---------------------
net-misc/iputils/metadata.xml | 1 -
4 files changed, 192 deletions(-)
diff --git a/net-misc/iputils/Manifest b/net-misc/iputils/Manifest
index e2cf5240b90..50e512301db 100644
--- a/net-misc/iputils/Manifest
+++ b/net-misc/iputils/Manifest
@@ -1,4 +1,2 @@
-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-20150815-nonroot-floodping.patch b/net-misc/iputils/files/iputils-20150815-nonroot-floodping.patch
deleted file mode 100644
index 50e108b09e8..00000000000
--- a/net-misc/iputils/files/iputils-20150815-nonroot-floodping.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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/iputils-20171016_pre.ebuild b/net-misc/iputils/iputils-20171016_pre.ebuild
deleted file mode 100644
index bea9c59247c..00000000000
--- a/net-misc/iputils/iputils-20171016_pre.ebuild
+++ /dev/null
@@ -1,178 +0,0 @@
-# Copyright 1999-2019 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="6"
-
-inherit flag-o-matic toolchain-funcs fcaps
-
-MY_COMMIT="67e7d0daf1f231cc708217e6aec2f8d5ce7aeacf"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-99999999-tracepath46.patch
- "${FILESDIR}"/${PN}-99999999-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/${MY_COMMIT}.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 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 traceroute6"
-
-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:0=[static-libs(+)] )
- )
- ) )"
-RDEPEND="arping? ( !net-misc/arping )
- rarpd? ( !net-misc/rarpd )
- traceroute6? ( !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
-
-REQUIRED_USE="ipv6? ( ssl? ( ^^ ( gcrypt nettle openssl ) ) )"
-
-[ "${PV}" = "99999999" ] || S="${WORKDIR}/${PN}-s${PV}"
-
-S="${WORKDIR}/${PN}-${MY_COMMIT}"
-
-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 traceroute6 '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 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 traceroute6 && 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' '')
-}
diff --git a/net-misc/iputils/metadata.xml b/net-misc/iputils/metadata.xml
index 2c0fdf44b67..6d135dfdb42 100644
--- a/net-misc/iputils/metadata.xml
+++ b/net-misc/iputils/metadata.xml
@@ -10,7 +10,6 @@
<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] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/files/, net-misc/iputils/
@ 2019-06-27 23:14 Thomas Deutschmann
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Deutschmann @ 2019-06-27 23:14 UTC (permalink / raw
To: gentoo-commits
commit: 67362b18b2c01dfe7deb017f6e7e929138fa932e
Author: Marty E. Plummer <hanetzer <AT> startmail <DOT> com>
AuthorDate: Thu Jun 27 23:00:15 2019 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Jun 27 23:13:50 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67362b18
net-misc/iputils: fix build with USE="-caps"
Upstream patch. Without this change, attempting to emerge
net-misc/iputils-20190515 with USE="-caps" without having
had sys-libs/libcap installed for some other reason will fail during
src_configure due to wrong type of arguments for add_install_script.
Package-Manager: Portage-2.3.67, Repoman-2.3.16
Signed-off-by: Signed-off-by: Marty E. Plummer <hanetzer <AT> startmail.com>
Closes: https://github.com/gentoo/gentoo/pull/12344
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
.../files/iputils-20190515-fix-setcap.patch | 67 ++++++++++++++++++++++
net-misc/iputils/iputils-20190515.ebuild | 4 +-
2 files changed, 70 insertions(+), 1 deletion(-)
diff --git a/net-misc/iputils/files/iputils-20190515-fix-setcap.patch b/net-misc/iputils/files/iputils-20190515-fix-setcap.patch
new file mode 100644
index 00000000000..6e9c7c6a835
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20190515-fix-setcap.patch
@@ -0,0 +1,67 @@
+From 473be6467f995865244e7e68b2fa587a4ee79551 Mon Sep 17 00:00:00 2001
+From: Michael Weiss <dev.primeos@gmail.com>
+Date: Thu, 16 May 2019 09:44:27 +0000
+Subject: [PATCH] build-sys: Make setcap really optional
+
+The setcap dependency is marked as optional but meson.build depends on
+setcap.path():
+
+meson.build:246:7: ERROR: add_install_script args must be strings
+---
+ meson.build | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 8af9e18..95c778a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -221,10 +221,13 @@ config_h = configure_file(
+ setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false)
+ if get_option('NO_SETCAP_OR_SUID')
+ perm_type = 'none'
++ setcap_path = '/dev/null'
+ elif cap_dep.found() and setcap.found()
+ perm_type = 'caps'
++ setcap_path = setcap.path()
+ else
+ perm_type = 'setuid'
++ setcap_path = '/dev/null'
+ endif
+
+ ############################################################
+@@ -243,7 +246,7 @@ if build_ping == true
+ join_paths(get_option('prefix'), get_option('bindir')),
+ 'ping',
+ perm_type,
+- setcap.path()
++ setcap_path
+ )
+ endif
+
+@@ -263,7 +266,7 @@ if build_traceroute6 == true
+ join_paths(get_option('prefix'), get_option('bindir')),
+ 'traceroute6',
+ perm_type,
+- setcap.path()
++ setcap_path
+ )
+ endif
+
+@@ -276,7 +279,7 @@ if build_clockdiff == true
+ join_paths(get_option('prefix'), get_option('bindir')),
+ 'clockdiff',
+ perm_type,
+- setcap.path()
++ setcap_path
+ )
+ endif
+
+@@ -306,7 +309,7 @@ if build_arping == true
+ join_paths(get_option('prefix'), get_option('bindir')),
+ 'arping',
+ perm_type,
+- setcap.path()
++ setcap_path
+ )
+ endif
+
diff --git a/net-misc/iputils/iputils-20190515.ebuild b/net-misc/iputils/iputils-20190515.ebuild
index ff6506c4be4..fab32c416ff 100644
--- a/net-misc/iputils/iputils-20190515.ebuild
+++ b/net-misc/iputils/iputils-20190515.ebuild
@@ -71,7 +71,9 @@ fi
[ "${PV}" == "99999999" ] || S="${WORKDIR}/${PN}-s${PV}"
-PATCHES=()
+PATCHES=(
+ "${FILESDIR}"/${PN}-20190515-fix-setcap.patch
+)
src_prepare() {
use SECURITY_HAZARD && PATCHES+=( "${FILESDIR}"/${PN}-20150815-nonroot-floodping.patch )
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/files/, net-misc/iputils/
@ 2021-01-25 18:28 Mike Gilbert
0 siblings, 0 replies; 7+ messages in thread
From: Mike Gilbert @ 2021-01-25 18:28 UTC (permalink / raw
To: gentoo-commits
commit: 20d6a21ff3e24e24a52cafaa640344d7dfaf59a3
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 25 18:27:17 2021 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Jan 25 18:28:13 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20d6a21f
net-misc/iputils: backport tftpd fixes
Closes: https://bugs.gentoo.org/738872
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../iputils/files/iputils-20200821-fclose.patch | 45 ++++++++++++++++++++++
.../files/iputils-20200821-install-sbindir.patch | 29 ++++++++++++++
...200821-r1.ebuild => iputils-20200821-r2.ebuild} | 2 +
3 files changed, 76 insertions(+)
diff --git a/net-misc/iputils/files/iputils-20200821-fclose.patch b/net-misc/iputils/files/iputils-20200821-fclose.patch
new file mode 100644
index 00000000000..cc370f0a556
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20200821-fclose.patch
@@ -0,0 +1,45 @@
+From e1c3d09b412ad0d022178344b8cbf748dc60f17f Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sun, 24 Jan 2021 23:29:27 -0500
+Subject: [PATCH] tftpd: recvfile: avoid closing the file twice
+
+The close_stream function calls fclose, so don't call it again.
+
+This resolves an abort in glibc:
+
+ Message: Process 1038079 (tftpd) of user 65534 dumped core.
+
+ Stack trace of thread 1038079:
+ #0 0x00007f5f650ed204 raise (libc.so.6 + 0x39204)
+ #1 0x00007f5f650d6547 abort (libc.so.6 + 0x22547)
+ #2 0x00007f5f6512f25f n/a (libc.so.6 + 0x7b25f)
+ #3 0x00007f5f651372fa n/a (libc.so.6 + 0x832fa)
+ #4 0x00007f5f65138dc2 n/a (libc.so.6 + 0x84dc2)
+ #5 0x00007f5f65124b2f fclose (libc.so.6 + 0x70b2f)
+ #6 0x000055571a50de73 recvfile (tftpd + 0x2e73)
+ #7 0x000055571a50e064 tftp (tftpd + 0x3064)
+ #8 0x000055571a50e387 tftpd_inetd (tftpd + 0x3387)
+ #9 0x000055571a50e50f main (tftpd + 0x350f)
+ #10 0x00007f5f650d7e6d __libc_start_main (libc.so.6 + 0x23e6d)
+ #11 0x000055571a50d3ca _start (tftpd + 0x23ca)
+
+Fixes: 5d6be65 ("tftpd: remove global variables by using a run state struct")
+
+Reviewed-by: Petr Vorel <pvorel@suse.cz>
+Signed-off-by: Mike Gilbert <floppym@gentoo.org>
+---
+ tftpd/tftpd.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c
+index 42998f9b..a09d32ba 100644
+--- a/tftpd/tftpd.c
++++ b/tftpd/tftpd.c
+@@ -387,7 +387,6 @@ void recvfile(struct run_state *ctl, struct formats *pf)
+ write_behind(ctl->file, pf->f_convert);
+ if (close_stream(ctl->file))
+ syslog(LOG_ERR, "tftpd: write error: %s\n", strerror(errno));
+- fclose(ctl->file); /* close data file */
+
+ ap->th_opcode = htons((uint16_t)ACK); /* send the "final" ack */
+ ap->th_block = htons(block);
diff --git a/net-misc/iputils/files/iputils-20200821-install-sbindir.patch b/net-misc/iputils/files/iputils-20200821-install-sbindir.patch
new file mode 100644
index 00000000000..cb1575841cc
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20200821-install-sbindir.patch
@@ -0,0 +1,29 @@
+From 8d1420f3019cd1caccf2ffa15a5873f0c61ab529 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sun, 24 Jan 2021 22:39:03 -0500
+Subject: [PATCH] tftpd: install into sbindir
+
+The xinet.d config expects the daemon to live in sbindir.
+
+Closes: https://github.com/iputils/iputils/pull/310
+
+Reviewed-by: Petr Vorel <pvorel@suse.cz>
+Signed-off-by: Mike Gilbert <floppym@gentoo.org>
+---
+ tftpd/meson.build | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tftpd/meson.build b/tftpd/meson.build
+index 6e508a24..b4cf6812 100644
+--- a/tftpd/meson.build
++++ b/tftpd/meson.build
+@@ -3,7 +3,8 @@ inc = include_directories('..')
+ executable('tftpd', ['tftpd.c', 'tftpsubs.c', git_version_h],
+ include_directories : inc,
+ link_with : [libcommon],
+- install: true)
++ install: true,
++ install_dir: sbindir)
+
+ subs = configuration_data()
+ subs.set('sbindir', sbindir)
diff --git a/net-misc/iputils/iputils-20200821-r1.ebuild b/net-misc/iputils/iputils-20200821-r2.ebuild
similarity index 97%
rename from net-misc/iputils/iputils-20200821-r1.ebuild
rename to net-misc/iputils/iputils-20200821-r2.ebuild
index 3b1245c1082..a7ac2b0d2a9 100644
--- a/net-misc/iputils/iputils-20200821-r1.ebuild
+++ b/net-misc/iputils/iputils-20200821-r2.ebuild
@@ -63,6 +63,8 @@ fi
PATCHES=(
"${FILESDIR}/iputils-20200821-getrandom-fallback.patch"
+ "${FILESDIR}/iputils-20200821-fclose.patch"
+ "${FILESDIR}/iputils-20200821-install-sbindir.patch"
)
src_prepare() {
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/files/, net-misc/iputils/
@ 2021-05-10 14:44 David Seifert
0 siblings, 0 replies; 7+ messages in thread
From: David Seifert @ 2021-05-10 14:44 UTC (permalink / raw
To: gentoo-commits
commit: 7a347bf30b5593ed8a5db30c7b3628042885a882
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Mon May 10 14:43:31 2021 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon May 10 14:43:31 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a347bf3
net-misc/iputils: Remove old 20190709-r1, 20200821-r2
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: David Seifert <soap <AT> gentoo.org>
net-misc/iputils/Manifest | 4 -
.../files/iputils-20150815-nonroot-floodping.patch | 11 --
...rt-partially-fix-sent-vs-received-package.patch | 34 ----
...-main-loop-over-multiple-addrinfo-results.patch | 86 ---------
...ping-try-next-addrinfo-on-connect-failure.patch | 190 --------------------
.../iputils/files/iputils-20200821-fclose.patch | 45 -----
.../iputils-20200821-getrandom-fallback.patch | 43 -----
.../files/iputils-20200821-install-sbindir.patch | 29 ---
net-misc/iputils/iputils-20190709-r1.ebuild | 198 ---------------------
net-misc/iputils/iputils-20200821-r2.ebuild | 178 ------------------
net-misc/iputils/metadata.xml | 1 -
11 files changed, 819 deletions(-)
diff --git a/net-misc/iputils/Manifest b/net-misc/iputils/Manifest
index b159499340d..9743e063f14 100644
--- a/net-misc/iputils/Manifest
+++ b/net-misc/iputils/Manifest
@@ -1,6 +1,2 @@
-DIST iputils-20190709.tar.gz 404101 BLAKE2B 38e66366cc13a77b7da1a85afe7245891c6c7069c218bc8d5d0dd3664d07a5c4004aa6fc56c192b90bfacf2e5e103997cd671a236aa0a9932a5818eca1e10744 SHA512 5db18ac49fa46ed810da4d508e78f4baf2d5c07e7f923eb49d005ad8745743d8861e5788b34a7e37fb7261cee7ddfb768b737eee9d200502ea53537142cac6b5
-DIST iputils-20200821.tar.gz 504852 BLAKE2B 3ce31554937e28ca3edd204b4b4ba2d11a5eab4ed0d9257cc1f0df38e3ac4d9093f786f308c96c35e1b4909be5de51a0bfb25d890269d9bd7bdd3ea5f612c299 SHA512 4a57c3637cdd9aab2600682774e27370716cbdf1c7ac8ae61bf86c21c08701a5b697792df4aa95309b196eaa74f3cb6b2836a40f04da0e602156e982ac99d8c9
DIST iputils-20210202.tar.gz 513055 BLAKE2B 37f3c10ff3918d40fe2eae1e4b19ed711b97c30cd2d682e42f484a11a28ab7c93975a51fbb7a8b1c1d725fc9051ae773bc2e81b9d80a2dd0e6ff55867d54875d SHA512 af600fe74e1b78c0da66c378f55eb468d62206aaae1864693f7ec79833c9c0de95843573d1792627695f08ecfcdb4e79c354065daf178d393fcc6ef9a8a5d526
-DIST iputils-manpages-20190709.tar.xz 27588 BLAKE2B 9780a96dfde077625a7a499182511066ede63ca364d2de729403354af7cea6b25629da1408ee2081f9da1b21756ee956d04642ea36d05ee02ef7ef05b66c1ad5 SHA512 4de796666426574bd134f4c4ea4d560d8e3eae8bd8ac19b89793fe252a1ef9eebd1833cafb72a2987118f3061eaf00da8a2468e8bced1568611f9391a1203066
-DIST iputils-manpages-20200821.tar.xz 19200 BLAKE2B 7d139ccac181eb3d74e3dcd2ba28cb906a0002aa4922de3e37771e2063234fa12428fa44bab3b50e43c40576a66d585a7460cf550afbeacd665fc41a3333d11a SHA512 0dd385565c9a15dfce668d637e055004a347056ee56260a4e726e7aa5ba5a6374aea8e9fc848dfe36b7609e5d92cb8c21f3e88f2d63e7cfe299489e41a17dc33
DIST iputils-manpages-20210202.tar.xz 19204 BLAKE2B b9d43962890ae5fe9e4c21fb23c8911c22cbfb35a28521a2f0611d7813e4c21979f6b309569cdb57dd9b3a30653278982194ca08a815cfb41566a379930d124b SHA512 d5cced9a5e4acffbe35d20a796d038336d06f512c3ee47bc6e37782b4645d5c35b16e18aaae298547b60fe644e5608efe7847f2de6175bfcd39128d230ee4cd1
diff --git a/net-misc/iputils/files/iputils-20150815-nonroot-floodping.patch b/net-misc/iputils/files/iputils-20150815-nonroot-floodping.patch
deleted file mode 100644
index 50e108b09e8..00000000000
--- a/net-misc/iputils/files/iputils-20150815-nonroot-floodping.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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-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
deleted file mode 100644
index 715ed45041b..00000000000
--- a/net-misc/iputils/files/iputils-20190709-arping-revert-partially-fix-sent-vs-received-package.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-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/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
deleted file mode 100644
index 9814707d723..00000000000
--- a/net-misc/iputils/files/iputils-20190709-ping-fix-main-loop-over-multiple-addrinfo-results.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-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
deleted file mode 100644
index a308fb7c9f6..00000000000
--- a/net-misc/iputils/files/iputils-20190709-ping-try-next-addrinfo-on-connect-failure.patch
+++ /dev/null
@@ -1,190 +0,0 @@
-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/files/iputils-20200821-fclose.patch b/net-misc/iputils/files/iputils-20200821-fclose.patch
deleted file mode 100644
index cc370f0a556..00000000000
--- a/net-misc/iputils/files/iputils-20200821-fclose.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From e1c3d09b412ad0d022178344b8cbf748dc60f17f Mon Sep 17 00:00:00 2001
-From: Mike Gilbert <floppym@gentoo.org>
-Date: Sun, 24 Jan 2021 23:29:27 -0500
-Subject: [PATCH] tftpd: recvfile: avoid closing the file twice
-
-The close_stream function calls fclose, so don't call it again.
-
-This resolves an abort in glibc:
-
- Message: Process 1038079 (tftpd) of user 65534 dumped core.
-
- Stack trace of thread 1038079:
- #0 0x00007f5f650ed204 raise (libc.so.6 + 0x39204)
- #1 0x00007f5f650d6547 abort (libc.so.6 + 0x22547)
- #2 0x00007f5f6512f25f n/a (libc.so.6 + 0x7b25f)
- #3 0x00007f5f651372fa n/a (libc.so.6 + 0x832fa)
- #4 0x00007f5f65138dc2 n/a (libc.so.6 + 0x84dc2)
- #5 0x00007f5f65124b2f fclose (libc.so.6 + 0x70b2f)
- #6 0x000055571a50de73 recvfile (tftpd + 0x2e73)
- #7 0x000055571a50e064 tftp (tftpd + 0x3064)
- #8 0x000055571a50e387 tftpd_inetd (tftpd + 0x3387)
- #9 0x000055571a50e50f main (tftpd + 0x350f)
- #10 0x00007f5f650d7e6d __libc_start_main (libc.so.6 + 0x23e6d)
- #11 0x000055571a50d3ca _start (tftpd + 0x23ca)
-
-Fixes: 5d6be65 ("tftpd: remove global variables by using a run state struct")
-
-Reviewed-by: Petr Vorel <pvorel@suse.cz>
-Signed-off-by: Mike Gilbert <floppym@gentoo.org>
----
- tftpd/tftpd.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c
-index 42998f9b..a09d32ba 100644
---- a/tftpd/tftpd.c
-+++ b/tftpd/tftpd.c
-@@ -387,7 +387,6 @@ void recvfile(struct run_state *ctl, struct formats *pf)
- write_behind(ctl->file, pf->f_convert);
- if (close_stream(ctl->file))
- syslog(LOG_ERR, "tftpd: write error: %s\n", strerror(errno));
-- fclose(ctl->file); /* close data file */
-
- ap->th_opcode = htons((uint16_t)ACK); /* send the "final" ack */
- ap->th_block = htons(block);
diff --git a/net-misc/iputils/files/iputils-20200821-getrandom-fallback.patch b/net-misc/iputils/files/iputils-20200821-getrandom-fallback.patch
deleted file mode 100644
index 5b69e5c88fb..00000000000
--- a/net-misc/iputils/files/iputils-20200821-getrandom-fallback.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-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/files/iputils-20200821-install-sbindir.patch b/net-misc/iputils/files/iputils-20200821-install-sbindir.patch
deleted file mode 100644
index cb1575841cc..00000000000
--- a/net-misc/iputils/files/iputils-20200821-install-sbindir.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 8d1420f3019cd1caccf2ffa15a5873f0c61ab529 Mon Sep 17 00:00:00 2001
-From: Mike Gilbert <floppym@gentoo.org>
-Date: Sun, 24 Jan 2021 22:39:03 -0500
-Subject: [PATCH] tftpd: install into sbindir
-
-The xinet.d config expects the daemon to live in sbindir.
-
-Closes: https://github.com/iputils/iputils/pull/310
-
-Reviewed-by: Petr Vorel <pvorel@suse.cz>
-Signed-off-by: Mike Gilbert <floppym@gentoo.org>
----
- tftpd/meson.build | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/tftpd/meson.build b/tftpd/meson.build
-index 6e508a24..b4cf6812 100644
---- a/tftpd/meson.build
-+++ b/tftpd/meson.build
-@@ -3,7 +3,8 @@ inc = include_directories('..')
- executable('tftpd', ['tftpd.c', 'tftpsubs.c', git_version_h],
- include_directories : inc,
- link_with : [libcommon],
-- install: true)
-+ install: true,
-+ install_dir: sbindir)
-
- subs = configuration_data()
- subs.set('sbindir', sbindir)
diff --git a/net-misc/iputils/iputils-20190709-r1.ebuild b/net-misc/iputils/iputils-20190709-r1.ebuild
deleted file mode 100644
index 8c5d1387e1a..00000000000
--- a/net-misc/iputils/iputils-20190709-r1.ebuild
+++ /dev/null
@@ -1,198 +0,0 @@
-# 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 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 ~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 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? ( dev-libs/openssl:0=[static-libs(+)] )
- )
- )
- )
- nls? ( sys-devel/gettext[static-libs(+)] )
-"
-
-RDEPEND="
- 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
- "${FILESDIR}"/${P}-ping-try-next-addrinfo-on-connect-failure.patch
- "${FILESDIR}"/${P}-ping-fix-main-loop-over-multiple-addrinfo-results.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' '')
-}
diff --git a/net-misc/iputils/iputils-20200821-r2.ebuild b/net-misc/iputils/iputils-20200821-r2.ebuild
deleted file mode 100644
index 55b1e38f169..00000000000
--- a/net-misc/iputils/iputils-20200821-r2.ebuild
+++ /dev/null
@@ -1,178 +0,0 @@
-# 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 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 ~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 tftpd tracepath traceroute6"
-
-BDEPEND="virtual/pkgconfig"
-
-LIB_DEPEND="
- caps? ( sys-libs/libcap[static-libs(+)] )
- idn? ( net-dns/libidn2:=[static-libs(+)] )
- nls? ( sys-devel/gettext[static-libs(+)] )
-"
-
-RDEPEND="
- 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}/iputils-20200821-getrandom-fallback.patch"
- "${FILESDIR}/iputils-20200821-fclose.patch"
- "${FILESDIR}/iputils-20200821-install-sbindir.patch"
-)
-
-src_prepare() {
- 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 [[ "${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' '')
-}
diff --git a/net-misc/iputils/metadata.xml b/net-misc/iputils/metadata.xml
index 6d135dfdb42..11c6f638649 100644
--- a/net-misc/iputils/metadata.xml
+++ b/net-misc/iputils/metadata.xml
@@ -15,7 +15,6 @@
<flag name="tftpd">Build and install tftpd -- server for the Trivial File Transfer Protocol (see also <pkg>net-ftp/tftp-hpa</pkg>)</flag>
<flag name="tracepath">Build and install tracepath -- tool for tracing network paths for discovering MTU values</flag>
<flag name="traceroute6">Build and install deprecated traceroute6 tool. It's recommended to use <pkg>net-analyzer/traceroute</pkg> instead.</flag>
- <flag name="SECURITY_HAZARD">Allow non-root users to flood (ping -f). This is generally a very bad idea.</flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:skbuff:iputils</remote-id>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/files/, net-misc/iputils/
@ 2024-10-03 7:31 Sam James
0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2024-10-03 7:31 UTC (permalink / raw
To: gentoo-commits
commit: 91046f11889af3d05a54ba858e5b85506e121d96
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 3 06:59:46 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Oct 3 07:04:47 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91046f11
net-misc/iputils: add 20240905
This also essentially reverts commit 8fd3bbe19eb695fb5ca88375e4d814070ab33639
(brings back the doc/man page logic as it's now in an upstream release).
Includes a patch from Eli (https://github.com/iputils/iputils/pull/556).
Bug: https://bugs.gentoo.org/908817
Closes: https://bugs.gentoo.org/920901
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-misc/iputils/Manifest | 1 +
.../iputils/files/iputils-20240905-man-pages.patch | 30 ++++++++++++++++++++++
...ils-99999999.ebuild => iputils-20240905.ebuild} | 30 ++++++++++++++++------
net-misc/iputils/iputils-99999999.ebuild | 26 +++++++++++++------
4 files changed, 71 insertions(+), 16 deletions(-)
diff --git a/net-misc/iputils/Manifest b/net-misc/iputils/Manifest
index 2863ec7dbc8d..4667f6eb2e69 100644
--- a/net-misc/iputils/Manifest
+++ b/net-misc/iputils/Manifest
@@ -1,4 +1,5 @@
DIST iputils-20211215.tar.gz 524567 BLAKE2B b88ff84be1d4d6a741f8f3514739ceff45ea40c475b5d4c2df8571fe84d4f1af9bc3fdce29e9ff393417671c75204261c8d64dde00473caa314b0aeb1fbf74ce SHA512 191062e51f7c8e8b38e3e4a96845adb77cd69f487d548c7cc578fad544443b4bc0dbe965d8f8e6fbda0a2f5b2fe2829789c05f873190c53d773245959298f6e9
DIST iputils-20221126.tar.gz 511944 BLAKE2B 97bdc49810ce9e517211323e8e8ffd2f2be505704d67533db0e8f296701048b82c61b39062aab4a8fa148b29175636a657c2dcdd65e3a16b1572d2f392b8ecf0 SHA512 7fdfd76e6f2977039bc0930a1a5451f17319bf17beefc429751d99ffe143a83344d5b4cdbf008627bd70caafeadaf906a8b7c00393fa819e50d6c02b512c367f
DIST iputils-20240117.tar.xz 445684 BLAKE2B 635943e12010aef8c1291b407bfbe284e0179391fca76197b77037ae1ffc219fa1d8e36abcea5fb7fff10d55ab40eed7c081e5d92b29f0916a4b4dd806945491 SHA512 c45822c5641f194dc07cba919c13a4b7a79d050bb53957a894ebb6ccc1f71bac1f26489e13d18ef1ce235982f5fa1824e677f95037a0f5cce6bcb94be4c2e2de
+DIST iputils-20240905.tar.xz 459008 BLAKE2B 62ee614292fbf487d93d711ecbc11719d10f4dcb995bfd0d613459b49792ae4c8f0032a401fbf583206665ac4c592e90c30da5c75811340cc881c06a20a05318 SHA512 6731e4fb8b8f89469de746c911fca6f1c7e924a21ca14ec25c40707707be3fe5a696272ba2d293207bc8c20f72a070d8e0a640fab9e5ea240a29a1f027807c1b
DIST iputils-manpages-20211215.tar.xz 17148 BLAKE2B 63a956805b01f57b070b6b4ceb32f6ddf4313c74203cde821fc2f6f16ab8de14861da31163adf496db555f1961592d4fbc2ba7a977ccb18773af3bdb8d3795c0 SHA512 eb8c8508221b06fc13bf196b01b11f3ec87cd77e25d89c088776e39d249e10a3915ebb39942805adee179b352543063ce3dac158d68783c68c23de550ec14eee
diff --git a/net-misc/iputils/files/iputils-20240905-man-pages.patch b/net-misc/iputils/files/iputils-20240905-man-pages.patch
new file mode 100644
index 000000000000..0c2d174ec242
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20240905-man-pages.patch
@@ -0,0 +1,30 @@
+https://github.com/iputils/iputils/pull/556
+
+From 1e2a59a879859eb01ca8b34523f54b6acbb886cb Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz@gentoo.org>
+Date: Wed, 18 Sep 2024 00:32:53 -0400
+Subject: [PATCH] meson: fix installation of prebuilt manpages in dist tarball
+
+page contains the name of the program we are building/installing a
+manual for. In the custom targets for building the manpages, we append
+.xml and .8 in turn -- we don't replace a ".xml" in the page name.
+
+As there is nothing to replace, we end up checking if e.g. "./arping"
+exists, and trying to install it as a manual if so -- rather than
+arping.8 as intended. Sync the logic so that this works.
+
+Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
+--- a/doc/meson.build
++++ b/doc/meson.build
+@@ -28,8 +28,8 @@ if meson.version().version_compare('>=0.58.0')
+ out_html_pages = []
+ generated_docs_exist = true
+ foreach page : manpages
+- man_page_name = page.replace('.xml', '.8')
+- html_page_name = page.replace('.xml', '.html')
++ man_page_name = page + '.8'
++ html_page_name = page + '.html'
+ out_man_pages += man_page_name
+ out_html_pages += html_page_name
+ if not fs.exists(man_page_name) or not fs.exists(html_page_name)
+
diff --git a/net-misc/iputils/iputils-99999999.ebuild b/net-misc/iputils/iputils-20240905.ebuild
similarity index 87%
copy from net-misc/iputils/iputils-99999999.ebuild
copy to net-misc/iputils/iputils-20240905.ebuild
index 5f7265fcd16d..9f4e50654ca8 100644
--- a/net-misc/iputils/iputils-99999999.ebuild
+++ b/net-misc/iputils/iputils-20240905.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -40,16 +40,25 @@ DEPEND="
virtual/os-headers
"
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
virtual/pkgconfig
test? ( sys-apps/iproute2 )
nls? ( sys-devel/gettext )
"
+if [[ ${PV} == 9999 ]] ; 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
+ "
+fi
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-20240905-man-pages.patch
+)
+
src_prepare() {
default
@@ -68,10 +77,15 @@ src_configure() {
-Dsystemdunitdir=$(systemd_get_systemunitdir)
-DUSE_GETTEXT=$(usex nls true false)
$(meson_use !test SKIP_TESTS)
- -DBUILD_HTML_MANS=$(usex doc true false)
- -DBUILD_MANS=true
)
+ if use doc || [[ ${PV} == 9999 ]] ; then
+ emesonargs+=(
+ -DBUILD_HTML_MANS=true
+ -DBUILD_MANS=true
+ )
+ fi
+
meson_src_configure
}
diff --git a/net-misc/iputils/iputils-99999999.ebuild b/net-misc/iputils/iputils-99999999.ebuild
index 5f7265fcd16d..1b08f7678320 100644
--- a/net-misc/iputils/iputils-99999999.ebuild
+++ b/net-misc/iputils/iputils-99999999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -40,16 +40,21 @@ DEPEND="
virtual/os-headers
"
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
virtual/pkgconfig
test? ( sys-apps/iproute2 )
nls? ( sys-devel/gettext )
"
+if [[ ${PV} == 9999 ]] ; 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
+ "
+fi
+
src_prepare() {
default
@@ -68,10 +73,15 @@ src_configure() {
-Dsystemdunitdir=$(systemd_get_systemunitdir)
-DUSE_GETTEXT=$(usex nls true false)
$(meson_use !test SKIP_TESTS)
- -DBUILD_HTML_MANS=$(usex doc true false)
- -DBUILD_MANS=true
)
+ if use doc || [[ ${PV} == 9999 ]] ; then
+ emesonargs+=(
+ -DBUILD_HTML_MANS=true
+ -DBUILD_MANS=true
+ )
+ fi
+
meson_src_configure
}
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-10-03 7:31 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-27 23:14 [gentoo-commits] repo/gentoo:master commit in: net-misc/iputils/files/, net-misc/iputils/ Thomas Deutschmann
-- strict thread matches above, loose matches on Subject: below --
2024-10-03 7:31 Sam James
2021-05-10 14:44 David Seifert
2021-01-25 18:28 Mike Gilbert
2019-03-31 22:37 Thomas Deutschmann
2018-10-01 18:00 Thomas Deutschmann
2017-10-29 22:29 Thomas Deutschmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox