commit:     1a5ad2e371f409ab9b41a7f7fedc766dd0fc0c2e
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Dec  1 00:46:12 2022 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Thu Dec  1 00:58:42 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a5ad2e3

net-analyzer/monitoring-plugins: new revisions to fix ping path.

We pass explicit ping/ping6 commands to the monitoring-plugins
./configure script to prevent it from running those commands during the
build. However, instead of grabbing their paths from $PATH, we have
(until now) hard-coded them to /bin/ping. This has now bitten us with
net-misc/iputils-20221126.

This commit uses $(command -v ...) to get the right absolute
paths. Thanks to Daniel Pouzzner for reporting the problem and
suggesting the near-identical fix to nagios-plugins. I've made the
changes and revisions to both the ~arch and stable ebuilds to avoid as
much breakage as possible, but we will still need to coordinate the
stabilization of monitoring-plugins-2.3.2-r1 with iputils-20221126.

Closes: https://bugs.gentoo.org/883729
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 ...-plugins-2.3.1-r3.ebuild => monitoring-plugins-2.3.1-r4.ebuild} | 7 ++++---
 ...ing-plugins-2.3.2.ebuild => monitoring-plugins-2.3.2-r1.ebuild} | 7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.1-r3.ebuild 
b/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.1-r4.ebuild
similarity index 91%
rename from net-analyzer/monitoring-plugins/monitoring-plugins-2.3.1-r3.ebuild
rename to net-analyzer/monitoring-plugins/monitoring-plugins-2.3.1-r4.ebuild
index 70689ddedd5c..bee2b77ec739 100644
--- a/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.1-r3.ebuild
+++ b/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.1-r4.ebuild
@@ -76,11 +76,12 @@ src_configure() {
        fi
 
        # The autodetection for these two commands can hang if localhost is
-       # down or ICMP traffic is filtered. Bug #468296.
-       myconf+=( --with-ping-command="/bin/ping -4 -n -U -w %d -c %d %s" )
+       # down or ICMP traffic is filtered (bug #468296). But also the path
+       # likes to move around on us (bug #883729).
+       myconf+=( --with-ping-command="$(command -v ping) -4 -n -U -w %d -c %d 
%s" )
 
        if use ipv6; then
-               myconf+=( --with-ping6-command="/bin/ping -6 -n -U -w %d -c %d 
%s" )
+               myconf+=( --with-ping6-command="$(command -v ping) -6 -n -U -w 
%d -c %d %s" )
        fi
 
        econf \

diff --git a/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.2.ebuild 
b/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.2-r1.ebuild
similarity index 91%
rename from net-analyzer/monitoring-plugins/monitoring-plugins-2.3.2.ebuild
rename to net-analyzer/monitoring-plugins/monitoring-plugins-2.3.2-r1.ebuild
index 68ba0969bbbc..27bd712c16c3 100644
--- a/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.2.ebuild
+++ b/net-analyzer/monitoring-plugins/monitoring-plugins-2.3.2-r1.ebuild
@@ -72,11 +72,12 @@ src_configure() {
        fi
 
        # The autodetection for these two commands can hang if localhost is
-       # down or ICMP traffic is filtered. Bug #468296.
-       myconf+=( --with-ping-command="/bin/ping -4 -n -U -w %d -c %d %s" )
+       # down or ICMP traffic is filtered (bug #468296). But also the path
+       # likes to move around on us (bug #883729).
+       myconf+=( --with-ping-command="$(command -v ping) -4 -n -U -w %d -c %d 
%s" )
 
        if use ipv6; then
-               myconf+=( --with-ping6-command="/bin/ping -6 -n -U -w %d -c %d 
%s" )
+               myconf+=( --with-ping6-command="$(command -v ping) -6 -n -U -w 
%d -c %d %s" )
        fi
 
        econf \

Reply via email to