Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package fping for openSUSE:Factory checked in at 2022-02-22 21:18:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fping (Old) and /work/SRC/openSUSE:Factory/.fping.new.1958 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fping" Tue Feb 22 21:18:29 2022 rev:38 rq:956822 version:5.1 Changes: -------- --- /work/SRC/openSUSE:Factory/fping/fping.changes 2020-10-22 14:26:54.098999096 +0200 +++ /work/SRC/openSUSE:Factory/.fping.new.1958/fping.changes 2022-02-22 21:19:13.354297602 +0100 @@ -1,0 +2,13 @@ +Tue Feb 22 16:12:16 UTC 2022 - Danilo Spinella <[email protected]> + +- Update to 5.1: + * Netdata: use host instead name as family label + * Netdata: use formatstring macro PRId64 + * Allow -4 option to be given multiple times + * Documentation fix + * Retain privileges until after privileged setsockopt + * Set bind to source only when option is set + * Fix getnameinfo not called properly for IPv4 + * Documentation updates + +------------------------------------------------------------------- Old: ---- fping-5.0.tar.gz fping-5.0.tar.gz.asc New: ---- fping-5.1.tar.gz fping-5.1.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fping.spec ++++++ --- /var/tmp/diff_new_pack.i1eSC1/_old 2022-02-22 21:19:13.826297689 +0100 +++ /var/tmp/diff_new_pack.i1eSC1/_new 2022-02-22 21:19:13.830297689 +0100 @@ -1,7 +1,7 @@ # # spec file for package fping # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: fping -Version: 5.0 +Version: 5.1 Release: 0 Summary: A program to ping multiple hosts License: MIT ++++++ fping-5.0.tar.gz -> fping-5.1.tar.gz ++++++ ++++ 14343 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fping-5.0/CHANGELOG.md new/fping-5.1/CHANGELOG.md --- old/fping-5.0/CHANGELOG.md 2020-08-05 13:10:13.000000000 +0200 +++ new/fping-5.1/CHANGELOG.md 2022-02-06 17:00:14.000000000 +0100 @@ -1,3 +1,22 @@ +fping 5.1 (2022-02-06) +====================== + +## Bugfixes and other changes + +- Use setcap to specify specific files in fping.spec (#232, thanks @zdyxry) +- Netdata: use host instead name as family label (#226, thanks @k0ste) +- Netdata: use formatstring macro PRId64 (#229, thanks @gsnw) +- Allow -4 option to be given multiple times (#215, thanks @normanr) +- Documentation fix (#208, thanks @timgates42) +- Retain privileges until after privileged setsockopt (#200, thanks @simetnicbr) +- Set bind to source only when option is set (#198, thanks @dinoex) +- Update Azure test pipeline (#197, thanks @gsnw) +- Fix getnameinfo not called properly for IPv4 (#227, thanks @aafbsd) +- Fixed wrong timestamp under Free- and OpenBSD and macOS (#217, thanks @gsnw) +- Documentation updates (#240, thanks @auerswal) +- Updated autotools (autoconf 2.71, automake 1.16.5, libtool 2.4.6) + + fping 5.0 (2020-08-05) ====================== @@ -36,10 +55,10 @@ ## Bugfixes and other changes - The reported size of received packets is now always correct on Linux even for - packets > 4096 bytes. + packets > 4096 bytes (#180) - Travis CI automated testing now also macos testing and additional ubuntu - distributions. + distributions (#196) fping 4.4 (2020-07-24) ====================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fping-5.0/ci/build-1-autotools.sh new/fping-5.1/ci/build-1-autotools.sh --- old/fping-5.0/ci/build-1-autotools.sh 2020-08-05 13:10:13.000000000 +0200 +++ new/fping-5.1/ci/build-1-autotools.sh 2022-02-06 17:00:14.000000000 +0100 @@ -1,12 +1,15 @@ -#!/bin/bash -e +#!/bin/bash + +set -e +set -x if [[ "$OSTYPE" == "darwin"* ]]; then exit 0 fi -AUTOCONF=http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz -AUTOMAKE=http://ftp.gnu.org/gnu/automake/automake-1.14.1.tar.gz -LIBTOOL=http://alpha.gnu.org/gnu/libtool/libtool-2.4.2.418.tar.gz +AUTOCONF=http://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.gz +AUTOMAKE=http://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.gz +LIBTOOL=http://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.gz PREFIX=$(pwd)/ci/build PATH=$(pwd)/ci/build/bin:$PATH diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fping-5.0/ci/build-2-test-command.sh new/fping-5.1/ci/build-2-test-command.sh --- old/fping-5.0/ci/build-2-test-command.sh 2020-08-05 13:10:13.000000000 +0200 +++ new/fping-5.1/ci/build-2-test-command.sh 2022-02-06 17:00:14.000000000 +0100 @@ -2,6 +2,5 @@ set -ex -curl -L http://cpanmin.us | perl - --sudo App::cpanminus -cpanm --sudo Test::Command - +curl -L http://cpanmin.us | perl - -L $HOME/perl5 App::cpanminus +$HOME/perl5/bin/cpanm --sudo Test::Command diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fping-5.0/ci/run-lcov.sh new/fping-5.1/ci/run-lcov.sh --- old/fping-5.0/ci/run-lcov.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/fping-5.1/ci/run-lcov.sh 2022-02-06 17:00:14.000000000 +0100 @@ -0,0 +1,9 @@ +#!/bin/sh + +lcov -c -no-external \ + -d . \ + -b src \ + -o lcov-all.info + +lcov --remove lcov-all.info -o lcov.info \ + '*/optparse.c' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fping-5.0/ci/test-04-options-a-b.pl new/fping-5.1/ci/test-04-options-a-b.pl --- old/fping-5.0/ci/test-04-options-a-b.pl 2020-08-05 13:10:13.000000000 +0200 +++ new/fping-5.1/ci/test-04-options-a-b.pl 2022-02-06 17:00:14.000000000 +0100 @@ -85,14 +85,17 @@ } # fping -B -{ -my $t0 = [gettimeofday]; -my $cmd = Test::Command->new(cmd => "fping -t 100 -r 3 -B 2 8.8.8.7"); -$cmd->exit_is_num(1); -$cmd->stdout_is_eq("8.8.8.7 is unreachable\n"); -$cmd->stderr_like(qr{^(|(8.8.8.7: error while sending ping: No route to host\n)+)$}); -my $elapsed = tv_interval($t0); -# 0.1 + 0.2 + 0.4 + 0.8 = 1.5 -cmp_ok($elapsed, '>=', 1.5); -cmp_ok($elapsed, '<', 1.8); +SKIP: { + if($^O eq 'darwin') { + skip 'timing test not reliable on macOS', 5; + } + my $t0 = [gettimeofday]; + my $cmd = Test::Command->new(cmd => "fping -t 100 -r 3 -B 2 8.8.8.7"); + $cmd->exit_is_num(1); + $cmd->stdout_is_eq("8.8.8.7 is unreachable\n"); + $cmd->stderr_like(qr{^(|(8.8.8.7: error while sending ping: No route to host\n)+)$}); + my $elapsed = tv_interval($t0); + # 0.1 + 0.2 + 0.4 + 0.8 = 1.5 + cmp_ok($elapsed, '>=', 1.5); + cmp_ok($elapsed, '<', 1.9); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fping-5.0/ci/test-14-ping-internet-hosts.pl new/fping-5.1/ci/test-14-ping-internet-hosts.pl --- old/fping-5.0/ci/test-14-ping-internet-hosts.pl 2020-08-05 13:10:13.000000000 +0200 +++ new/fping-5.1/ci/test-14-ping-internet-hosts.pl 2022-02-06 17:00:14.000000000 +0100 @@ -15,13 +15,12 @@ # fping { -my $cmd = Test::Command->new(cmd => "fping -q -i 10 -p 20 -c 3 -t200 8.8.8.8 4.2.2.5 www.france-telecom.fr www.google.com"); +my $cmd = Test::Command->new(cmd => "fping -q -i 10 -p 20 -c 3 -t200 8.8.8.8 www.france-telecom.fr www.google.com"); $cmd->exit_is_num(0); $cmd->stdout_is_eq(""); -$cmd->stderr_like(qr{8\.8\.8\.8\s*: xmt/rcv/%loss = [123]/3/\d+%, min/avg/max = $re_num/$re_num/$re_num -4\.2\.2\.5\s*: xmt/rcv/%loss = [123]/3/\d+%, min/avg/max = $re_num/$re_num/$re_num -www\.france-telecom\.fr\s*: xmt/rcv/%loss = [123]/3/\d+%, min/avg/max = $re_num/$re_num/$re_num -www\.google\.com\s*: xmt/rcv/%loss = [123]/3/\d+%, min/avg/max = $re_num/$re_num/$re_num +$cmd->stderr_like(qr{8\.8\.8\.8\s*: xmt/rcv/%loss = [123]/[123]/\d+%, min/avg/max = $re_num/$re_num/$re_num +www\.france-telecom\.fr\s*: xmt/rcv/%loss = [123]/[123]/\d+%, min/avg/max = $re_num/$re_num/$re_num +www\.google\.com\s*: xmt/rcv/%loss = [123]/[123]/\d+%, min/avg/max = $re_num/$re_num/$re_num }); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fping-5.0/ci/test-15-netdata.pl new/fping-5.1/ci/test-15-netdata.pl --- old/fping-5.0/ci/test-15-netdata.pl 2020-08-05 13:10:13.000000000 +0200 +++ new/fping-5.1/ci/test-15-netdata.pl 2022-02-06 17:00:14.000000000 +0100 @@ -9,19 +9,19 @@ { my $cmd = Test::Command->new(cmd => "fping -c 2 -Q 1 -N 127.0.0.1"); $cmd->exit_is_num(0); -$cmd->stdout_like(qr{CHART fping\.127_0_0_1_packets '' 'FPing Packets for host 127\.0\.0\.1' packets '127_0_0_1' fping\.packets line 110020 1 +$cmd->stdout_like(qr{CHART fping\.127_0_0_1_packets '' 'FPing Packets for host 127\.0\.0\.1' packets '127.0.0.1' fping\.packets line 110020 1 DIMENSION xmt sent absolute 1 1 DIMENSION rcv received absolute 1 1 BEGIN fping\.127_0_0_1_packets SET xmt = 1 SET rcv = 1 END -CHART fping\.127_0_0_1_quality '' 'FPing Quality for host 127\.0\.0\.1' percentage '127_0_0_1' fping\.quality area 110010 1 +CHART fping\.127_0_0_1_quality '' 'FPing Quality for host 127\.0\.0\.1' percentage '127.0.0.1' fping\.quality area 110010 1 DIMENSION returned '' absolute 1 1 BEGIN fping\.127_0_0_1_quality SET returned = 100 END -CHART fping\.127_0_0_1_latency '' 'FPing Latency for host 127\.0\.0\.1' ms '127_0_0_1' fping\.latency area 110000 1 +CHART fping\.127_0_0_1_latency '' 'FPing Latency for host 127\.0\.0\.1' ms '127.0.0.1' fping\.latency area 110000 1 DIMENSION min minimum absolute 1 1000000 DIMENSION max maximum absolute 1 1000000 DIMENSION avg average absolute 1 1000000 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fping-5.0/compile new/fping-5.1/compile --- old/fping-5.0/compile 2020-08-05 13:10:16.000000000 +0200 +++ new/fping-5.1/compile 2022-02-06 17:01:00.000000000 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-10-14.11; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey <[email protected]>. # # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -53,7 +53,7 @@ MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) @@ -255,7 +255,8 @@ echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -339,9 +340,9 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fping-5.0/config.h.in new/fping-5.1/config.h.in --- old/fping-5.0/config.h.in 2020-08-05 13:10:15.000000000 +0200 +++ new/fping-5.1/config.h.in 2022-02-06 17:00:59.000000000 +0100 @@ -17,8 +17,8 @@ /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET -/* Define to 1 if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H +/* Define to 1 if you have the <minix/config.h> header file. */ +#undef HAVE_MINIX_CONFIG_H /* Define to 1 if you have the <netinet/icmp6.h> header file. */ #undef HAVE_NETINET_ICMP6_H @@ -29,6 +29,9 @@ /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H +/* Define to 1 if you have the <stdio.h> header file. */ +#undef HAVE_STDIO_H + /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H @@ -53,6 +56,9 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if you have the <wchar.h> header file. */ +#undef HAVE_WCHAR_H + /* IPv4 enabled */ #undef IPV4 @@ -80,7 +86,9 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* Define if sigaction is available. */ @@ -90,37 +98,93 @@ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# undef _DARWIN_C_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif -/* Enable threading extensions on Solaris. */ +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# undef _HPUX_ALT_XOPEN_SOCKET_API +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +# undef _MINIX +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# undef _NETBSD_SOURCE +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# undef _OPENBSD_SOURCE +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +# undef _POSIX_SOURCE +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +# undef _POSIX_1_SOURCE +#endif +/* Enable POSIX-compatible threading on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# undef __STDC_WANT_IEC_60559_BFP_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# undef __STDC_WANT_IEC_60559_DFP_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# undef __STDC_WANT_IEC_60559_FUNCS_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# undef __STDC_WANT_IEC_60559_TYPES_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# undef __STDC_WANT_LIB_EXT2__ +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# undef __STDC_WANT_MATH_SPEC_FUNCS__ +#endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +# undef _XOPEN_SOURCE #endif /* Version number of package */ #undef VERSION -/* Define to 1 if on MINIX. */ -#undef _MINIX - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -#undef _POSIX_1_SOURCE - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -#undef _POSIX_SOURCE - /* some OSes do not define this ... lets take a wild guess */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fping-5.0/configure.ac new/fping-5.1/configure.ac --- old/fping-5.0/configure.ac 2020-08-05 13:10:13.000000000 +0200 +++ new/fping-5.1/configure.ac 2022-02-06 17:00:14.000000000 +0100 @@ -3,7 +3,7 @@ dnl Minimum Autoconf version required. AC_PREREQ(2.59) -AC_INIT([fping],[5.0]) +AC_INIT([fping],[5.1]) AC_GNU_SOURCE dnl --disable-ipv4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fping-5.0/contrib/fping.spec new/fping-5.1/contrib/fping.spec --- old/fping-5.0/contrib/fping.spec 2020-08-05 13:10:13.000000000 +0200 +++ new/fping-5.1/contrib/fping.spec 2022-02-06 17:00:14.000000000 +0100 @@ -54,7 +54,8 @@ %post if [ -x /usr/sbin/setcap ]; then /bin/chmod 0755 /usr/sbin/fping* - /usr/sbin/setcap cap_net_raw+ep /usr/sbin/fping* + /usr/sbin/setcap cap_net_raw+ep /usr/sbin/fping + /usr/sbin/setcap cap_net_raw+ep /usr/sbin/fping6 fi %changelog diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fping-5.0/doc/fping.8 new/fping-5.1/doc/fping.8 --- old/fping-5.0/doc/fping.8 2020-08-05 13:10:18.000000000 +0200 +++ new/fping-5.1/doc/fping.8 2022-02-06 17:01:03.000000000 +0100 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) +.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== @@ -46,7 +46,7 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" -.\" If the F register is turned on, we'll generate index entries on stderr for +.\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. @@ -56,12 +56,12 @@ .. .nr rF 0 .if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ +.if (\n(rF:(\n(.g==0)) \{\ +. if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. -. if !\nF==2 \{ +. if !\nF==2 \{\ . nr % 0 . nr F 2 . \} @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "FPING 8" -.TH FPING 8 "2020-08-05" "fping" "" +.TH FPING 8 "2022-02-06" "fping" "" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -157,7 +157,7 @@ sending a specified number of pings to a target, or looping indefinitely (as in \&\fBping\fR ). Unlike \fBping\fR, \fBfping\fR is meant to be used in scripts, so its output is designed to be easy to parse. Current statistics can be obtained without -termination of process with signal \s-1SIGQUIT \s0(^\e from the keyboard on most systems). +termination of process with signal \s-1SIGQUIT\s0 (^\e from the keyboard on most systems). .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-4\fR, \fB\-\-ipv4\fR" 5 @@ -209,7 +209,7 @@ \&\f(CW\*(C`\-\*(C'\fR indicating that no response was received to the fourth request. .IP "\fB\-d\fR, \fB\-\-rdns\fR" 5 .IX Item "-d, --rdns" -Use \s-1DNS\s0 to lookup address of return ping packet. This allows you to give fping +Use \s-1DNS\s0 to lookup address of ping target. This allows you to give fping a list of \s-1IP\s0 addresses as input and print hostnames in the output. This is similar to option \fB\-n\fR/\fB\-\-name\fR, but will force a reverse-DNS lookup even if you give hostnames as target (\s-1NAME\-\s0>\s-1IP\-\s0>\s-1NAME\s0). @@ -272,7 +272,7 @@ .IP "\fB\-n\fR, \fB\-\-name\fR" 5 .IX Item "-n, --name" If targets are specified as \s-1IP\s0 addresses, do a reverse-DNS lookup on them -to +to print hostnames in the output. .IP "\fB\-N\fR, \fB\-\-netdata\fR" 5 .IX Item "-N, --netdata" Format output for netdata (\-l \-Q are required). See: <http://my\-netdata.io/> @@ -294,7 +294,8 @@ show \s-1ICMP\s0 error messages. .IP "\fB\-Q\fR, \fB\-\-squiet\fR=\fI\s-1SECS\s0\fR" 5 .IX Item "-Q, --squiet=SECS" -Like \fB\-q\fR, but show summary results every n seconds. +Like \fB\-q\fR, but additionally show interval summary results every \fI\s-1SECS\s0\fR +seconds. .IP "\fB\-r\fR, \fB\-\-retry\fR=\fIN\fR" 5 .IX Item "-r, --retry=N" Retry limit (default 3). This is the number of times an attempt at pinging @@ -350,7 +351,7 @@ .IP "\(bu" 4 Roland J. Schemers \s-1III,\s0 Stanford University, concept and versions 1.x .IP "\(bu" 4 -\&\s-1RL \s0\*(L"Bob\*(R" Morgan, Stanford University, versions 2.x +\&\s-1RL\s0 \*(L"Bob\*(R" Morgan, Stanford University, versions 2.x .IP "\(bu" 4 David Papp, versions 2.3x and up .IP "\(bu" 4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fping-5.0/doc/fping.pod new/fping-5.1/doc/fping.pod --- old/fping-5.0/doc/fping.pod 2020-08-05 13:10:13.000000000 +0200 +++ new/fping-5.1/doc/fping.pod 2022-02-06 17:00:14.000000000 +0100 @@ -81,7 +81,7 @@ =item B<-d>, B<--rdns> -Use DNS to lookup address of return ping packet. This allows you to give fping +Use DNS to lookup address of ping target. This allows you to give fping a list of IP addresses as input and print hostnames in the output. This is similar to option B<-n>/B<--name>, but will force a reverse-DNS lookup even if you give hostnames as target (NAME->IP->NAME). @@ -150,7 +150,7 @@ =item B<-n>, B<--name> If targets are specified as IP addresses, do a reverse-DNS lookup on them -to +to print hostnames in the output. =item B<-N>, B<--netdata> @@ -178,7 +178,8 @@ =item B<-Q>, B<--squiet>=I<SECS> -Like B<-q>, but show summary results every n seconds. +Like B<-q>, but additionally show interval summary results every I<SECS> +seconds. =item B<-r>, B<--retry>=I<N> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fping-5.0/missing new/fping-5.1/missing --- old/fping-5.0/missing 2020-08-05 13:10:16.000000000 +0200 +++ new/fping-5.1/missing 2022-02-06 17:01:00.000000000 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2013-10-28.13; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <[email protected]>, 1996. # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -101,9 +101,9 @@ exit $st fi -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software program_details () { @@ -207,9 +207,9 @@ exit $st # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/fping-5.0/src/fping.c new/fping-5.1/src/fping.c --- old/fping-5.0/src/fping.c 2020-08-05 13:10:13.000000000 +0200 +++ new/fping-5.1/src/fping.c 2022-02-06 17:00:14.000000000 +0100 @@ -60,8 +60,6 @@ #include <stddef.h> #include <string.h> -#include <time.h> - #include <sys/socket.h> #include <sys/time.h> #include <sys/types.h> @@ -122,8 +120,11 @@ #define CLOCKID CLOCK_REALTIME #endif +/* CLOCK_MONTONIC starts under macOS, OpenBSD and FreeBSD with undefined positive point and can not be use + * see github PR #217 + */ #if !defined(CLOCKID) -#if defined(CLOCK_MONOTONIC) +#if defined(CLOCK_MONOTONIC) && !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__FreeBSD__) #define CLOCKID CLOCK_MONOTONIC #else #define CLOCKID CLOCK_REALTIME @@ -397,6 +398,42 @@ /************************************************************ + Function: p_setsockopt + +************************************************************* + + Inputs: p_uid: privileged uid. Others as per setsockopt(2) + + Description: + + Elevates privileges to p_uid when required, calls + setsockopt, and drops privileges back. + +************************************************************/ + +int p_setsockopt(uid_t p_uid, int sockfd, int level, int optname, + const void *optval, socklen_t optlen) +{ + const uid_t saved_uid = geteuid(); + int res; + + if (p_uid != saved_uid && seteuid(p_uid)) { + perror("cannot elevate privileges for setsockopt"); + } + + res = setsockopt(sockfd, level, optname, optval, optlen); + + if (p_uid != saved_uid && seteuid(saved_uid)) { + perror("fatal error: could not drop privileges after setsockopt"); + /* continuing would be a security hole */ + exit(4); + } + + return res; +} + +/************************************************************ + Function: main ************************************************************* @@ -412,7 +449,7 @@ int main(int argc, char** argv) { int c; - uid_t uid; + const uid_t suid = geteuid(); int tos = 0; struct optparse optparse_state; #ifdef USE_SIGACTION @@ -448,9 +485,9 @@ memset(&src_addr6, 0, sizeof(src_addr6)); #endif - if ((uid = getuid())) { - /* drop privileges */ - if (setuid(getuid()) == -1) + if (!suid && suid != getuid()) { + /* *temporarily* drop privileges */ + if (seteuid(getuid()) == -1) perror("cannot setuid"); } @@ -510,7 +547,7 @@ switch (c) { case '4': #ifdef IPV6 - if (hints_ai_family != AF_UNSPEC) { + if (hints_ai_family != AF_UNSPEC && hints_ai_family != AF_INET) { fprintf(stderr, "%s: can't specify both -4 and -6\n", prog); exit(1); } @@ -740,14 +777,14 @@ case 'I': #ifdef SO_BINDTODEVICE if (socket4 >= 0) { - if (setsockopt(socket4, SOL_SOCKET, SO_BINDTODEVICE, optparse_state.optarg, strlen(optparse_state.optarg))) { + if (p_setsockopt(suid, socket4, SOL_SOCKET, SO_BINDTODEVICE, optparse_state.optarg, strlen(optparse_state.optarg))) { perror("binding to specific interface (SO_BINTODEVICE)"); exit(1); } } #ifdef IPV6 if (socket6 >= 0) { - if (setsockopt(socket6, SOL_SOCKET, SO_BINDTODEVICE, optparse_state.optarg, strlen(optparse_state.optarg))) { + if (p_setsockopt(suid, socket6, SOL_SOCKET, SO_BINDTODEVICE, optparse_state.optarg, strlen(optparse_state.optarg))) { perror("binding to specific interface (SO_BINTODEVICE), IPV6"); exit(1); } @@ -796,6 +833,13 @@ } } + /* permanently drop privileges */ + if (suid != getuid() && setuid(getuid())) { + perror("fatal: failed to permanently drop privileges"); + /* continuing would be a security hole */ + exit(4); + } + /* validate various option settings */ #ifndef IPV6 @@ -1060,11 +1104,11 @@ exit(num_noaddress ? 2 : 1); } - if (socket4 >= 0) { + if (src_addr_set && socket4 >= 0) { socket_set_src_addr_ipv4(socket4, &src_addr, (socktype4 == SOCK_DGRAM) ? &ident4 : NULL); } #ifdef IPV6 - if (socket6 >= 0) { + if (src_addr6_set && socket6 >= 0) { socket_set_src_addr_ipv6(socket6, &src_addr6, (socktype6 == SOCK_DGRAM) ? &ident6 : NULL); } #endif @@ -1619,7 +1663,7 @@ h = table[i]; if (!sent_charts) { - printf("CHART fping.%s_packets '' 'FPing Packets for host %s' packets '%s' fping.packets line 110020 %.0f\n", h->name, h->host, h->name, report_interval / 1e9); + printf("CHART fping.%s_packets '' 'FPing Packets for host %s' packets '%s' fping.packets line 110020 %.0f\n", h->name, h->host, h->host, report_interval / 1e9); printf("DIMENSION xmt sent absolute 1 1\n"); printf("DIMENSION rcv received absolute 1 1\n"); } @@ -1630,7 +1674,7 @@ printf("END\n"); if (!sent_charts) { - printf("CHART fping.%s_quality '' 'FPing Quality for host %s' percentage '%s' fping.quality area 110010 %.0f\n", h->name, h->host, h->name, report_interval / 1e9); + printf("CHART fping.%s_quality '' 'FPing Quality for host %s' percentage '%s' fping.quality area 110010 %.0f\n", h->name, h->host, h->host, report_interval / 1e9); printf("DIMENSION returned '' absolute 1 1\n"); /* printf("DIMENSION lost '' absolute 1 1\n"); */ } @@ -1647,7 +1691,7 @@ printf("END\n"); if (!sent_charts) { - printf("CHART fping.%s_latency '' 'FPing Latency for host %s' ms '%s' fping.latency area 110000 %.0f\n", h->name, h->host, h->name, report_interval / 1e9); + printf("CHART fping.%s_latency '' 'FPing Latency for host %s' ms '%s' fping.latency area 110000 %.0f\n", h->name, h->host, h->host, report_interval / 1e9); printf("DIMENSION min minimum absolute 1 1000000\n"); printf("DIMENSION max maximum absolute 1 1000000\n"); printf("DIMENSION avg average absolute 1 1000000\n"); @@ -1656,9 +1700,9 @@ printf("BEGIN fping.%s_latency\n", h->name); if (h->num_recv_i) { avg = h->total_time_i / h->num_recv_i; - printf("SET min = %ld\n", h->min_reply_i); - printf("SET avg = %ld\n", avg); - printf("SET max = %ld\n", h->max_reply_i); + printf("SET min = %" PRId64 "\n", h->min_reply_i); + printf("SET avg = %" PRId64 "\n", avg); + printf("SET max = %" PRId64 "\n", h->max_reply_i); } printf("END\n"); @@ -2059,7 +2103,7 @@ /* too short */ if (verbose_flag) { char buf[INET6_ADDRSTRLEN]; - getnameinfo((struct sockaddr*)&response_addr, sizeof(response_addr), buf, INET6_ADDRSTRLEN, NULL, 0, NI_NUMERICHOST); + getnameinfo( response_addr, sizeof( struct sockaddr_in ), buf, INET6_ADDRSTRLEN, NULL, 0, NI_NUMERICHOST); printf("received packet too short for ICMP (%d bytes from %s)\n", (int)reply_buf_len, buf); } return -1; @@ -2092,7 +2136,7 @@ return -1; } - getnameinfo(response_addr, response_addr_len, addr_ascii, INET6_ADDRSTRLEN, NULL, 0, NI_NUMERICHOST); + getnameinfo(response_addr, sizeof( struct sockaddr_in ), addr_ascii, INET6_ADDRSTRLEN, NULL, 0, NI_NUMERICHOST); switch (icp->icmp_type) { case ICMP_UNREACH: @@ -2885,14 +2929,15 @@ fprintf(out, " -a, --alive show targets that are alive\n"); fprintf(out, " -A, --addr show targets by address\n"); fprintf(out, " -C, --vcount=N same as -c, report results in verbose format\n"); + fprintf(out, " -d, --rdns show targets by name (force reverse-DNS lookup)\n"); fprintf(out, " -D, --timestamp print timestamp before each output line\n"); fprintf(out, " -e, --elapsed show elapsed time on return packets\n"); fprintf(out, " -i, --interval=MSEC interval between sending ping packets (default: %.0f ms)\n", interval / 1e6); - fprintf(out, " -n, --name show targets by name (-d is equivalent)\n"); + fprintf(out, " -n, --name show targets by name (reverse-DNS lookup for target IPs)\n"); fprintf(out, " -N, --netdata output compatible for netdata (-l -Q are required)\n"); fprintf(out, " -o, --outage show the accumulated outage time (lost packets * packet interval)\n"); fprintf(out, " -q, --quiet quiet (don't show per-target/per-ping results)\n"); - fprintf(out, " -Q, --squiet=SECS same as -q, but show summary every n seconds\n"); + fprintf(out, " -Q, --squiet=SECS same as -q, but add interval summary every SECS seconds\n"); fprintf(out, " -s, --stats print final stats\n"); fprintf(out, " -u, --unreach show targets that are unreachable\n"); fprintf(out, " -v, --version show version\n");
