Bug 177368 - [PATCH] net/fping: Add option to compile in timestamps patch
Summary: [PATCH] net/fping: Add option to compile in timestamps patch
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alex Kozlov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-25 10:50 UTC by lars
Modified: 2013-04-22 16:50 UTC (History)
1 user (show)

See Also:


Attachments
fping-3.4_1.patch (1.62 KB, patch)
2013-03-25 10:50 UTC, lars
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lars 2013-03-25 10:50:00 UTC
This patch adds an option to compile in Toke Hoiland-Jorgensen's patch
that enables timestamps for fping. This is needed by his netperf-wrapper
benchmarking tool (https://github.com/tohojo/netperf-wrapper)

Port maintainer (jharris@widomaker.com) is cc'd.

Generated with FreeBSD Port Tools 0.99_7 (mode: change, diff: suffix)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-03-25 10:50:08 UTC
Maintainer of net/fping,

Please note that PR ports/177368 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/177368

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2013-03-25 10:50:09 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 jharris 2013-04-03 04:13:24 UTC
On Mon, Mar 25, 2013 at 10:50:08AM +0000, Edwin Groothuis wrote:
> Maintainer of net/fping,
> 
> Please note that PR ports/177368 has just been submitted.

> The full text of the PR can be found at:
>     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/177368

I had to change the github URL to httpS, and merged this patch
with my (MAINTAINER-written/approved) patch from ports/176439.
So, please disregard my patch in ports/176439 and commit the
following to close both PRs: ports/177368 and ports/176439.

NB:  You'll need to:

  %mv patch-fping.c files/; svn add files/patch-fping.c

Thanks.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message

diff -r 830ac78f8d7f Makefile
--- a/Makefile	Tue Mar 05 08:51:42 2013 -0400
+++ b/Makefile	Tue Apr 02 22:49:25 2013 -0400
@@ -8,9 +8,13 @@
 
 PORTNAME=	fping
 PORTVERSION=	3.4
+PORTREVISION=	2
 CATEGORIES=	net ipv6
 MASTER_SITES=   http://fping.org/dist/
 
+PATCH_SITES=	https://raw.github.com/tohojo/netperf-wrapper/master/misc/
+PATCH_DIST_STRIP=	-p1
+
 MAINTAINER=	jharris@widomaker.com
 COMMENT=	Quickly ping N hosts w/o flooding the network
 
@@ -18,6 +22,9 @@
 OPTIONS_MULTI_NET=	IPV4 IPV6
 OPTIONS_DEFAULT=	IPV4
 
+OPTIONS_DEFINE=		TIMESTAMPS
+TIMESTAMPS_DESC=	Enable timestamps patch
+
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--bindir="${PREFIX}/sbin"
 
@@ -39,6 +46,10 @@
 CONFIGURE_ARGS+=--disable-ipv6
 .endif
 
+.if ${PORT_OPTIONS:MTIMESTAMPS}
+PATCHFILES=	fping_timestamps.patch
+.endif
+
 post-install:
 .if ${PORT_OPTIONS:MIPV4}
 	@${STRIP_CMD} ${PREFIX}/sbin/fping
diff -r 830ac78f8d7f files/patch-fping.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/files/patch-fping.c	Tue Apr 02 22:49:25 2013 -0400
@@ -0,0 +1,16 @@
+diff -r c564b3055165 src/fping.c
+--- src/fping.c	Tue Mar 05 08:13:11 2013 -0400
++++ src/fping.c	Tue Mar 05 08:45:33 2013 -0400
+@@ -1572,7 +1572,11 @@
+     n = sendto( s, buffer, ping_pkt_size, 0,
+         ( struct sockaddr* )&h->saddr, sizeof( FPING_SOCKADDR ) );
+ 
+-    if( n < 0 || n != ping_pkt_size )
++    if(( n < 0 || n != ping_pkt_size)
++#if defined( EHOSTDOWN )
++                                      && errno != EHOSTDOWN
++#endif
++                                                            )
+     {
+         if( verbose_flag || unreachable_flag )
+         {
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (FreeBSD)

iJ0EARECAF0FAlFbmMlWGGh0dHA6Ly9rZXlzZXJ2ZXIua2pzbC5jb206MTEzNzEv
cGtzL2xvb2t1cD9vcD1nZXQmc2VhcmNoPTB4RDM5REEwRTMmd2VoYXZleW91bm93
PXRydWUACgkQSypIl9OdoOO2tQCgnP/uj6D1I2byvrz52JTExfEKTWUAn2N9n/bU
FAQptrKKpeuKoOk5zZEY
=NsSl
-----END PGP SIGNATURE-----

-- 
Jason Harris           |  PGP:  This _is_ PGP-signed, isn't it?
jharris@widomaker.com _|_ Got photons? (TM), (C) 2004
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-04-22 16:44:49 UTC
Author: ak
Date: Mon Apr 22 15:44:41 2013
New Revision: 316242
URL: http://svnweb.freebsd.org/changeset/ports/316242

Log:
  - Add timestamps option (used by netperf-wrapper) [1]
  - Fix fping issue with the unreachable ip in the arp cache [2]
  - Convert Makefile headers to new style
  
  PR:	ports/177368 [1]
  PR:	ports/176439 [2]
  Submitted by:	Lars Eggert <lars@eggert.org> [1], Alexandre RAYNAUD <alexandre.raynaud@sallanches.fr> [2]
  Approved by:	Jason Harris <jharris@widomaker.com> (maintainer)

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

Modified: head/net/fping/Makefile
==============================================================================
--- head/net/fping/Makefile	Mon Apr 22 15:37:34 2013	(r316241)
+++ head/net/fping/Makefile	Mon Apr 22 15:44:41 2013	(r316242)
@@ -1,22 +1,23 @@
-# ex:ts=8
-# Ports collection makefile for:  fping
-# Date created:			  Tue Mar 25, 1997
-# Whom:				  David O'Brien (obrien@NUXI.com)
-#
+# Created by: David O'Brien (obrien@NUXI.com)
 # $FreeBSD$
-#
 
 PORTNAME=	fping
 PORTVERSION=	3.4
+PORTREVISION=	1
 CATEGORIES=	net ipv6
-MASTER_SITES=   http://fping.org/dist/
+MASTER_SITES=	http://fping.org/dist/
+
+PATCH_SITES=	https://raw.github.com/tohojo/netperf-wrapper/master/misc/
+PATCH_DIST_STRIP=	-p1
 
 MAINTAINER=	jharris@widomaker.com
 COMMENT=	Quickly ping N hosts w/o flooding the network
 
+OPTIONS_DEFINE=		TIMESTAMPS
 OPTIONS_MULTI=		NET
 OPTIONS_MULTI_NET=	IPV4 IPV6
 OPTIONS_DEFAULT=	IPV4
+TIMESTAMPS_DESC=	Enable timestamps
 
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--bindir="${PREFIX}/sbin"
@@ -39,6 +40,10 @@ MAN8+=	fping6.8
 CONFIGURE_ARGS+=--disable-ipv6
 .endif
 
+.if ${PORT_OPTIONS:MTIMESTAMPS}
+PATCHFILES+=	fping_timestamps.patch
+.endif
+
 post-install:
 .if ${PORT_OPTIONS:MIPV4}
 	@${STRIP_CMD} ${PREFIX}/sbin/fping

Modified: head/net/fping/distinfo
==============================================================================
--- head/net/fping/distinfo	Mon Apr 22 15:37:34 2013	(r316241)
+++ head/net/fping/distinfo	Mon Apr 22 15:44:41 2013	(r316242)
@@ -1,2 +1,4 @@
 SHA256 (fping-3.4.tar.gz) = d42528af4931f16a8e3438bd4a45cfdd72163ad8835a3c95351c336a26e56afe
 SIZE (fping-3.4.tar.gz) = 142986
+SHA256 (fping_timestamps.patch) = 5e07b36e2029a042de79536c30d852a7ee65d90216747ca68fe54eba94798f3a
+SIZE (fping_timestamps.patch) = 2211

Added: head/net/fping/files/patch-fping.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/fping/files/patch-fping.c	Mon Apr 22 15:44:41 2013	(r316242)
@@ -0,0 +1,16 @@
+diff -r c564b3055165 src/fping.c
+--- src/fping.c	Tue Mar 05 08:13:11 2013 -0400
++++ src/fping.c	Tue Mar 05 08:45:33 2013 -0400
+@@ -1572,7 +1572,11 @@
+     n = sendto( s, buffer, ping_pkt_size, 0,
+         ( struct sockaddr* )&h->saddr, sizeof( FPING_SOCKADDR ) );
+ 
+-    if( n < 0 || n != ping_pkt_size )
++    if(( n < 0 || n != ping_pkt_size)
++#if defined( EHOSTDOWN )
++                                      && errno != EHOSTDOWN
++#endif
++                                                            )
+     {
+         if( verbose_flag || unreachable_flag )
+         {
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Alex Kozlov freebsd_committer freebsd_triage 2013-04-22 16:46:45 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!
Comment 6 Alex Kozlov freebsd_committer freebsd_triage 2013-04-22 16:47:36 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ak

I'll take it.