Hello community,

here is the log from the commit of package fping for openSUSE:Factory checked 
in at 2020-06-27 23:22:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fping (Old)
 and      /work/SRC/openSUSE:Factory/.fping.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fping"

Sat Jun 27 23:22:18 2020 rev:33 rq:814570 version:4.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/fping/fping.changes      2018-09-24 
13:13:03.889727468 +0200
+++ /work/SRC/openSUSE:Factory/.fping.new.3060/fping.changes    2020-06-27 
23:22:20.329774651 +0200
@@ -1,0 +2,28 @@
+Sun Jun 14 15:45:06 UTC 2020 - Lars Vogdt <l...@linux-schulserver.de>
+
+- correct download URL (upstream is using .gz instead of bz2)
+- refreshed fping-4.2-gcc10-extern.patch
+
+-------------------------------------------------------------------
+Mon Jun  8 12:49:08 UTC 2020 - Kristyna Streitova <kstreit...@suse.com>
+
+- add fping-4.2-gcc10-extern.patch to fix build with GCC10
+
+-------------------------------------------------------------------
+Wed Mar  6 13:09:14 UTC 2019 - l...@linux-schulserver.de
+
+- bzip2 the sources
+- package COPYING file instead of INSTALL file
+- use permission settings only on SLE-15 and newer
+
+-------------------------------------------------------------------
+Sat Feb 23 06:58:48 UTC 2019 - sean...@opensuse.org
+
+- Update to version 4.2
+  * Allow decimal numbers for -t -i -p and -Q
+  * New option -x/--reachable to check # of reachable hosts
+  * Fix build with --disable-ipv6 (#134)
+  * Fix hang with '-6' if the binary is named 'fping6'
+  * Get rid of warning 'timeout -t value' (#142)
+
+-------------------------------------------------------------------

Old:
----
  fping-4.1.tar.gz

New:
----
  fping-4.2-gcc10-extern.patch
  fping-4.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ fping.spec ++++++
--- /var/tmp/diff_new_pack.SXoO32/_old  2020-06-27 23:22:20.933776636 +0200
+++ /var/tmp/diff_new_pack.SXoO32/_new  2020-06-27 23:22:20.933776636 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package fping
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,19 +12,22 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           fping
-Version:        4.1
+Version:        4.2
 Release:        0
 Summary:        A program to ping multiple hosts
 License:        MIT
 Group:          Productivity/Networking/Diagnostic
-Url:            http://www.fping.org
+URL:            http://www.fping.org
 Source:         http://fping.org/dist/%{name}-%{version}.tar.gz
+Patch0:         fping-4.2-gcc10-extern.patch
+%if 0%{?suse_version} >= 1500
 Requires(pre):  permissions
+%endif
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
@@ -47,24 +50,33 @@
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure
 make %{?_smp_mflags}
 
 %install
-%make_install
+make install DESTDIR="%{buildroot}"
 
+%if 0%{?suse_version} >= 1500
 %post
 %set_permissions %{_sbindir}/fping
 
 %verifyscript
 %verify_permissions -e %{_sbindir}/fping
+%endif
 
 %files
 %defattr(-,root,root)
-%doc CHANGELOG.md INSTALL
-%{_mandir}/man8/fping.8%{ext_man}
+%doc CHANGELOG.md 
+%if 0%{?suse_version} >= 1500
+%license COPYING
 %verify(not mode caps) %attr(0755,root,root) %{_sbindir}/fping
+%else
+%doc COPYING
+%{_sbindir}/fping
+%endif
+%{_mandir}/man8/fping.8%{ext_man}
 
 %changelog

++++++ fping-4.2-gcc10-extern.patch ++++++
Index: fping-4.2/src/fping.h
===================================================================
--- fping-4.2.orig/src/fping.h
+++ fping-4.2/src/fping.h
@@ -11,7 +11,7 @@
 void crash_and_burn( char *message );
 void errno_crash_and_burn( char *message );
 int in_cksum( unsigned short *p, int n );
-int random_data_flag;
+extern int random_data_flag;
 
 /* socket.c */
 int  open_ping_socket_ipv4();
++++++ fping-4.1.tar.gz -> fping-4.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fping-4.1/CHANGELOG.md new/fping-4.2/CHANGELOG.md
--- old/fping-4.1/CHANGELOG.md  2018-09-17 21:14:10.000000000 +0200
+++ new/fping-4.2/CHANGELOG.md  2019-02-19 22:00:09.000000000 +0100
@@ -1,3 +1,24 @@
+fping 4.2 (2019-02-19)
+======================
+
+## New features
+
+- New option -x / --reachable to check if the number of reachable hosts is >= 
a certain
+  number. Useful for example to implement connectivity-checks (#138, thanks 
@deepak0004)
+
+## Bugfixes and other changes
+
+- Allow decimal numbers for '-t', '-i', '-p', and '-Q'
+- Fix build with --disable-ipv6 (#134, thanks @Polynomial-C)
+- Fix hang with '-6', with ipv6 kernel module, but not loaded (#140, thanks 
@abelbeck)
+- Assume '-6' if the binary is named 'fping6' (this is mostly for special
+  embedded-distro use cases, and not meant to be used generally in place of
+  compiling IPv6-only binary or using '-6', see also the notes in #139, thanks
+  abelbeck)
+- Get rid of warning "timeout (-t) value larger than period (-p) produces 
unexpected results"
+  (#142, thanks @MrDragon1122)
+  
+
 fping 4.1 (2018-09-17)
 ======================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fping-4.1/configure new/fping-4.2/configure
--- old/fping-4.1/configure     2018-09-17 21:14:39.000000000 +0200
+++ new/fping-4.2/configure     2019-02-19 22:00:42.000000000 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for fping 4.1.
+# Generated by GNU Autoconf 2.69 for fping 4.2.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@
 # Identity of this package.
 PACKAGE_NAME='fping'
 PACKAGE_TARNAME='fping'
-PACKAGE_VERSION='4.1'
-PACKAGE_STRING='fping 4.1'
+PACKAGE_VERSION='4.2'
+PACKAGE_STRING='fping 4.2'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1286,7 +1286,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures fping 4.1 to adapt to many kinds of systems.
+\`configure' configures fping 4.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1357,7 +1357,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of fping 4.1:";;
+     short | recursive ) echo "Configuration of fping 4.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1457,7 +1457,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-fping configure 4.1
+fping configure 4.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1868,7 +1868,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by fping $as_me 4.1, which was
+It was created by fping $as_me 4.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3860,7 +3860,7 @@
 
 # Define the identity of the package.
  PACKAGE='fping'
- VERSION='4.1'
+ VERSION='4.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -6067,7 +6067,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by fping $as_me 4.1, which was
+This file was extended by fping $as_me 4.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -6133,7 +6133,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-fping config.status 4.1
+fping config.status 4.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fping-4.1/configure.ac new/fping-4.2/configure.ac
--- old/fping-4.1/configure.ac  2018-09-17 21:14:10.000000000 +0200
+++ new/fping-4.2/configure.ac  2019-02-19 22:00:09.000000000 +0100
@@ -3,7 +3,7 @@
 dnl Minimum Autoconf version required.
 AC_PREREQ(2.59)
 
-AC_INIT([fping],[4.1])
+AC_INIT([fping],[4.2])
 
 dnl --disable-ipv4
 AC_ARG_ENABLE([ipv4],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fping-4.1/doc/fping.8 new/fping-4.2/doc/fping.8
--- old/fping-4.1/doc/fping.8   2018-09-17 21:14:41.000000000 +0200
+++ new/fping-4.2/doc/fping.8   2019-02-19 22:00:44.000000000 +0100
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "FPING 8"
-.TH FPING 8 "2018-09-17" "fping" ""
+.TH FPING 8 "2019-02-19" "fping" ""
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -332,6 +332,10 @@
 .IP "\fB\-v\fR, \fB\-\-version\fR" 5
 .IX Item "-v, --version"
 Print \fBfping\fR version information.
+.IP "\fB\-x\fR, \fB\-\-reachable\fR=\fIN\fR" 5
+.IX Item "-x, --reachable=N"
+Given a list of hosts, this mode checks if number of reachable hosts is >= N
+and exits true in that case.
 .SH "EXAMPLES"
 .IX Header "EXAMPLES"
 Generate 20 pings to two hosts in ca. 1 second (i.e. one ping every 50 ms to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fping-4.1/doc/fping.pod new/fping-4.2/doc/fping.pod
--- old/fping-4.1/doc/fping.pod 2018-09-17 21:14:10.000000000 +0200
+++ new/fping-4.2/doc/fping.pod 2019-02-19 22:00:09.000000000 +0100
@@ -225,6 +225,11 @@
 
 Print B<fping> version information.
 
+=item B<-x>, B<--reachable>=I<N>
+
+Given a list of hosts, this mode checks if number of reachable hosts is >= N
+and exits true in that case.
+
 =back
 
 =head1 EXAMPLES
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fping-4.1/src/fping.c new/fping-4.2/src/fping.c
--- old/fping-4.1/src/fping.c   2018-09-17 21:14:10.000000000 +0200
+++ new/fping-4.2/src/fping.c   2019-02-19 22:00:09.000000000 +0100
@@ -248,7 +248,7 @@
 unsigned int perhost_interval = DEFAULT_PERHOST_INTERVAL * 100;
 float backoff = DEFAULT_BACKOFF_FACTOR;
 unsigned int ping_data_size = DEFAULT_PING_DATA_SIZE;
-unsigned int count = 1;
+unsigned int count = 1, min_reachable = 0;
 unsigned int trials;
 unsigned int report_interval = 0;
 unsigned int ttl = 0;
@@ -362,6 +362,11 @@
     socket4 = open_ping_socket_ipv4(ping_data_size);
 #ifdef IPV6
     socket6 = open_ping_socket_ipv6(ping_data_size);
+    /* if called (sym-linked) via 'fping6', imply '-6'
+     * for backward compatibility */
+    if (strstr(prog, "fping6")) {
+        hints_ai_family = AF_INET6;
+    }
 #endif
 
     if ((uid = getuid())) {
@@ -414,10 +419,11 @@
         { NULL, 'T', OPTPARSE_REQUIRED },
         { "unreach", 'u', OPTPARSE_NONE },
         { "version", 'v', OPTPARSE_NONE },
+        { "reachable", 'x', OPTPARSE_REQUIRED },
         { 0, 0, 0 }
     };
 
-    //while ((c = optparse(&optparse_state, 
"46ADMNRadeghlmnoqsuvzB:C:H:I:O:Q:S:T:b:c:f:i:p:r:t:")) != EOF) {
+    float opt_value_float;
     while ((c = optparse_long(&optparse_state, longopts, NULL)) != EOF) {
         switch (c) {
         case '4':
@@ -462,10 +468,13 @@
             break;
 
         case 't':
-            if (!(timeout = (unsigned int)atoi(optparse_state.optarg) * 100))
+            if (!sscanf(optparse_state.optarg, "%f", &opt_value_float))
+                usage(1);
+            if (opt_value_float < 0) {
                 usage(1);
+            }
+            timeout = opt_value_float * 100;
             timeout_flag = 1;
-
             break;
 
         case 'r':
@@ -474,14 +483,21 @@
             break;
 
         case 'i':
-            if (!sscanf(optparse_state.optarg, "%u", &interval))
+            if (!sscanf(optparse_state.optarg, "%f", &opt_value_float))
+                usage(1);
+            if (opt_value_float < 0) {
                 usage(1);
-            interval *= 100;
+            }
+            interval = opt_value_float * 100;
             break;
 
         case 'p':
-            if (!(perhost_interval = (unsigned int)atoi(optparse_state.optarg) 
* 100))
+            if (!sscanf(optparse_state.optarg, "%f", &opt_value_float))
                 usage(1);
+            if (opt_value_float < 0) {
+                usage(1);
+            }
+            perhost_interval = opt_value_float * 100;
 
             break;
 
@@ -518,8 +534,12 @@
         case 'Q':
             verbose_flag = 0;
             quiet_flag = 1;
-            if (!(report_interval = (unsigned int)atoi(optparse_state.optarg) 
* 100000))
+            if (!sscanf(optparse_state.optarg, "%f", &opt_value_float))
+                usage(1);
+            if (opt_value_float < 0) {
                 usage(1);
+            }
+            report_interval = opt_value_float * 100000;
 
             break;
 
@@ -604,6 +624,11 @@
             printf("%s: comments to %s\n", prog, EMAIL);
             exit(0);
 
+        case 'x':
+            if (!(min_reachable = (unsigned int)atoi(optparse_state.optarg)))
+                usage(1); 
+            break;
+
         case 'f':
             filename = optparse_state.optarg;
             break;
@@ -687,7 +712,11 @@
 
     /* validate various option settings */
 
-    if (socket4 < 0 && socket6 < 0) {
+#ifndef IPV6
+    if (socket4 < 0) {
+#else
+    if ((socket4 < 0 && socket6 < 0) || (hints_ai_family == AF_INET6 && 
socket6 < 0)) {
+#endif
         crash_and_burn("can't create socket (must run as root?)");
     }
 
@@ -728,7 +757,7 @@
         exit(1);
     }
 
-    if (alive_flag || unreachable_flag)
+    if (alive_flag || unreachable_flag || min_reachable)
         verbose_flag = 0;
 
     if (count_flag) {
@@ -756,11 +785,6 @@
                 timeout = AUTOTUNE_TIMEOUT_MAX * 100;
             }
         }
-        else {
-            if (timeout > perhost_interval && (loop_flag || (count_flag && 
count > 1))) {
-                fprintf(stderr, "%s: warning: timeout (-t) value larger than 
period (-p) produces unexpected results\n", prog);
-            }
-        }
     }
 
 #if defined(DEBUG) || defined(_DEBUG)
@@ -1319,6 +1343,16 @@
     if (stats_flag)
         print_global_stats();
 
+    if (min_reachable) {
+        if ((num_hosts-num_unreachable) >= min_reachable) {
+            printf("Enough hosts reachable (required: %d, reachable: %d)\n", 
min_reachable, num_hosts-num_unreachable);
+            exit(0);
+        } else {
+            printf("Not enough hosts reachable (required: %d, reachable: 
%d)\n", min_reachable, num_hosts-num_unreachable);
+            exit(1);
+        }
+    }
+
     if (num_noaddress)
         exit(2);
     else if (num_alive != num_hosts)
@@ -2763,5 +2797,6 @@
     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");
+    fprintf(out, "   -x, --reachable=N  shows if >=N hosts are reachable or 
not\n");
     exit(is_error);
 }


Reply via email to