Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jun 2019 20:07:44 +0000 (UTC)
From:      Eugene Grosbein <eugen@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r504585 - in head/net/fping: . files
Message-ID:  <201906192007.x5JK7i2r036145@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eugen
Date: Wed Jun 19 20:07:44 2019
New Revision: 504585
URL: https://svnweb.freebsd.org/changeset/ports/504585

Log:
  net/fping: fix WITHOUT_IPV6 mode
  
  If one builds and uses net/fping version 4.2 with option IPV6 disabled,
  the command fping -4 always fails with wrong error message:
  
  fping: can't specify both -4 and -6
  
  This makes it impossible using fping probes with SmokePing
  as it runs fping with -4 option. This change fixes this.
  Also, do not install symlinks for fping6 and manual in this case.
  
  PORTREVISION not bumped as default build is not affected.
  
  PR:		238327
  Approved by:	jharris@widomaker.com (maintainter timeout, 2 weeks)

Added:
  head/net/fping/files/
  head/net/fping/files/patch-src_fping.c   (contents, props changed)
Modified:
  head/net/fping/Makefile
  head/net/fping/pkg-plist

Modified: head/net/fping/Makefile
==============================================================================
--- head/net/fping/Makefile	Wed Jun 19 17:50:35 2019	(r504584)
+++ head/net/fping/Makefile	Wed Jun 19 20:07:44 2019	(r504585)
@@ -24,10 +24,11 @@ CONFIGURE_ARGS=	--bindir="${PREFIX}/sbin" \
 		--enable-ipv4
 INSTALL_TARGET=	install-strip
 
-OPTIONS_DEFINE=IPV6
+OPTIONS_DEFINE=	IPV6
+OPTIONS_SUB=	yes
 IPV6_CONFIGURE_OFF=--disable-ipv6
 
-post-install:
+post-install-IPV6-on:
 	${RLN} ${STAGEDIR}${PREFIX}/sbin/fping  ${STAGEDIR}${PREFIX}/sbin/fping6
 	${RLN} ${STAGEDIR}${PREFIX}/man/man8/fping.8 ${STAGEDIR}${PREFIX}/man/man8/fping6.8
 

Added: head/net/fping/files/patch-src_fping.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/fping/files/patch-src_fping.c	Wed Jun 19 20:07:44 2019	(r504585)
@@ -0,0 +1,11 @@
+--- src/fping.c.orig	2019-02-19 20:54:45 UTC
++++ src/fping.c
+@@ -427,7 +427,7 @@ int main(int argc, char** argv)
+     while ((c = optparse_long(&optparse_state, longopts, NULL)) != EOF) {
+         switch (c) {
+         case '4':
+-            if (hints_ai_family != AF_UNSPEC) {
++            if (hints_ai_family == AF_INET6) {
+                 fprintf(stderr, "%s: can't specify both -4 and -6\n", prog);
+                 exit(1);
+             }

Modified: head/net/fping/pkg-plist
==============================================================================
--- head/net/fping/pkg-plist	Wed Jun 19 17:50:35 2019	(r504584)
+++ head/net/fping/pkg-plist	Wed Jun 19 20:07:44 2019	(r504585)
@@ -1,6 +1,6 @@
 @mode 4555
 sbin/fping
-sbin/fping6
+%%IPV6%%sbin/fping6
 @mode
 man/man8/fping.8.gz
-man/man8/fping6.8.gz
+%%IPV6%%man/man8/fping6.8.gz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906192007.x5JK7i2r036145>