Hi ports, (and sthen@ cc'd since he's the maintainer) Attached is an update of net/fping from 3.16 to 4.0. Primary changes:
1) Upstream enabled IPv6 by default and included it in the same binary as IPv4 (so no more `fping6` command or man page). 2) I simplified the pledge patch a little since no dns calls are made after the point at which we used to check whether rdns was asked for (via `name_flag`), so the conditional was removed. Tested on latest amd64 snapshot. Please let me know if you have feedback or are willing to commit this patch. Regards, Taylor Stearns
Index: Makefile =================================================================== RCS file: /cvs/ports/net/fping/Makefile,v retrieving revision 1.40 diff -u -p -r1.40 Makefile --- Makefile 10 Feb 2017 14:23:49 -0000 1.40 +++ Makefile 25 Jul 2018 16:41:48 -0000 @@ -2,11 +2,11 @@ COMMENT= quickly ping N hosts w/o flooding the network -DISTNAME= fping-3.16 +DISTNAME= fping-4.0 CATEGORIES= net -HOMEPAGE= http://fping.org/ +HOMEPAGE= https://fping.org/ MAINTAINER= Stuart Henderson <[email protected]> @@ -16,11 +16,10 @@ PERMIT_PACKAGE_CDROM= Yes # uses pledge() WANTLIB += c -MASTER_SITES= http://fping.org/dist/ +MASTER_SITES= https://fping.org/dist/ CONFIGURE_STYLE= gnu SEPARATE_BUILD= Yes -CONFIGURE_ARGS= --bindir=${PREFIX}/sbin \ - --enable-ipv6 +CONFIGURE_ARGS= --bindir=${PREFIX}/sbin .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/net/fping/distinfo,v retrieving revision 1.13 diff -u -p -r1.13 distinfo --- distinfo 10 Feb 2017 14:23:49 -0000 1.13 +++ distinfo 25 Jul 2018 16:41:48 -0000 @@ -1,2 +1,2 @@ -SHA256 (fping-3.16.tar.gz) = L3UwlOTfPNsdmb4Wh8D7fS8UwNUm6/AxWMjFUZvHj1Q= -SIZE (fping-3.16.tar.gz) = 162629 +SHA256 (fping-4.0.tar.gz) = Z+tBUrmK00+Z0u7E4QmKC7UsrxPAyJzRRzSdCBkP6M4= +SIZE (fping-4.0.tar.gz) = 170060 Index: patches/patch-doc_Makefile_in =================================================================== RCS file: /cvs/ports/net/fping/patches/patch-doc_Makefile_in,v retrieving revision 1.1 diff -u -p -r1.1 patch-doc_Makefile_in --- patches/patch-doc_Makefile_in 17 Sep 2015 12:03:42 -0000 1.1 +++ patches/patch-doc_Makefile_in 25 Jul 2018 16:41:48 -0000 @@ -3,18 +3,15 @@ $OpenBSD: patch-doc_Makefile_in,v 1.1 20 remove unnecessary GNUism; in traditional make(1), $< may only be used in a suffix rule. ---- doc/Makefile.in.orig Thu Sep 17 12:55:36 2015 -+++ doc/Makefile.in Thu Sep 17 12:55:13 2015 -@@ -478,10 +478,10 @@ uninstall-man: uninstall-man8 +Index: doc/Makefile.in +--- doc/Makefile.in.orig ++++ doc/Makefile.in +@@ -476,7 +476,7 @@ uninstall-man: uninstall-man8 fping.8: fping.pod - pod2man -c "" -s 8 -r "fping" $< >$@ + pod2man -c "" -s 8 -r "fping" $> >$@ - - fping6.8: fping.pod -- pod2man -c "" -s 8 -r "fping" -n fping6 $< >$@ -+ pod2man -c "" -s 8 -r "fping" -n fping6 $> >$@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. Index: patches/patch-src_fping_c =================================================================== RCS file: /cvs/ports/net/fping/patches/patch-src_fping_c,v retrieving revision 1.4 diff -u -p -r1.4 patch-src_fping_c --- patches/patch-src_fping_c 10 Feb 2017 14:23:49 -0000 1.4 +++ patches/patch-src_fping_c 25 Jul 2018 16:41:48 -0000 @@ -1,17 +1,18 @@ $OpenBSD: patch-src_fping_c,v 1.4 2017/02/10 14:23:49 sthen Exp $ ---- src/fping.c.orig Thu Feb 9 09:22:25 2017 -+++ src/fping.c Fri Feb 10 14:21:23 2017 -@@ -364,6 +364,9 @@ int main(int argc, char** argv) +Index: src/fping.c +--- src/fping.c.orig ++++ src/fping.c +@@ -363,6 +363,9 @@ int main(int argc, char** argv) perror("cannot setuid"); } + if (pledge("stdio inet rpath dns", NULL) == -1) + perror("pledge"); + + prog = argv[0]; + optparse_init(&optparse_state, argv); ident = getpid() & 0xFFFF; - verbose_flag = 1; - backoff_flag = 1; -@@ -583,6 +586,11 @@ int main(int argc, char** argv) +@@ -679,6 +682,11 @@ int main(int argc, char** argv) } } @@ -23,25 +24,21 @@ $OpenBSD: patch-src_fping_c,v 1.4 2017/0 /* validate various option settings */ if (ttl > 255) { -@@ -798,6 +806,14 @@ int main(int argc, char** argv) +@@ -928,6 +936,10 @@ int main(int argc, char** argv) exit(num_noaddress ? 2 : 1); } -+ if (name_flag) { /* done with file, drop rpath */ -+ if (pledge("stdio inet dns", NULL) == -1) -+ perror("pledge"); -+ } else { /* and drop dns unless we do reverse lookups */ -+ if (pledge("stdio inet", NULL) == -1) -+ perror("pledge"); -+ } ++ /* done with file and dns/rdns lookups */ ++ if (pledge("stdio inet", NULL) == -1) ++ perror("pledge"); + - if (src_addr_present) { - socket_set_src_addr(s, src_addr); + if (src_addr_set) { + socket_set_src_addr_ipv4(socket4, &src_addr); } -@@ -1667,7 +1683,7 @@ int wait_for_reply(long wait_time) +@@ -1787,7 +1799,7 @@ int decode_icmp_ipv4( + struct icmp* icp; + int hlen = 0; - #ifndef IPV6 - ip = (struct ip*)buffer; -#if defined(__alpha__) && __STDC__ && !defined(__GLIBC__) +#if defined(__alpha__) && __STDC__ && !defined(__GLIBC__) && !defined(__OpenBSD__) /* The alpha headers are decidedly broken. Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/net/fping/pkg/PLIST,v retrieving revision 1.7 diff -u -p -r1.7 PLIST --- pkg/PLIST 17 Sep 2015 12:03:42 -0000 1.7 +++ pkg/PLIST 25 Jul 2018 16:41:48 -0000 @@ -1,7 +1,5 @@ @comment $OpenBSD: PLIST,v 1.7 2015/09/17 12:03:42 sthen Exp $ @man man/man8/fping.8 -@man man/man8/fping6.8 @mode 4555 @bin sbin/fping -@bin sbin/fping6 @mode
