Hello community,
here is the log from the commit of package 2ping for openSUSE:Factory checked in at 2019-02-04 14:25:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/2ping (Old)
and /work/SRC/openSUSE:Factory/.2ping.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "2ping"
Mon Feb 4 14:25:55 2019 rev:8 rq:670998 version:4.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/2ping/2ping.changes 2018-10-08 17:50:52.986066430 +0200
+++ /work/SRC/openSUSE:Factory/.2ping.new.28833/2ping.changes 2019-02-04 14:26:04.853034742 +0100
@@ -1,0 +2,10 @@
+Sun Feb 3 21:12:01 UTC 2019 - Matthias Eliasson
+
+- Update to version 4.3
+ * Add --srv-service
+ * Change --adaptive behavior to better match ping -A
+ * Fix typos in manpage
+- Ran spec-cleaner
+- Fix rpmlint duplicate error with fdupes
+
+-------------------------------------------------------------------
Old:
----
2ping-4.2.tar.gz
2ping-4.2.tar.gz.asc
New:
----
2ping-4.3.tar.gz
2ping-4.3.tar.gz.asc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ 2ping.spec ++++++
--- /var/tmp/diff_new_pack.5f1KZJ/_old 2019-02-04 14:26:06.325034044 +0100
+++ /var/tmp/diff_new_pack.5f1KZJ/_new 2019-02-04 14:26:06.325034044 +0100
@@ -1,7 +1,7 @@
#
# spec file for package 2ping
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,15 +17,16 @@
Name: 2ping
-Version: 4.2
+Version: 4.3
Release: 0
Summary: Bi-directional ping utility
License: GPL-2.0-or-later
Group: Productivity/Networking/Diagnostic
-Url: http://www.finnie.org/software/2ping/
+URL: http://www.finnie.org/software/2ping/
Source0: http://www.finnie.org/software/2ping/%{name}-%{version}.tar.gz
Source1: http://www.finnie.org/software/2ping/%{name}-%{version}.tar.gz.asc
Source2: %{name}.keyring
+BuildRequires: fdupes
BuildRequires: python3-base
BuildRequires: python3-setuptools
Requires: python >= 3.4
@@ -43,14 +44,19 @@
%setup -q
%build
-%py3_build
+%{py3_build}
%install
-%py3_install
+%{py3_install}
install -d -m 0755 %{buildroot}%{_mandir}/man1
install -m 0644 doc/2ping.1 %{buildroot}%{_mandir}/man1/2ping.1
install -m 0644 doc/2ping.1 %{buildroot}%{_mandir}/man1/2ping6.1
+# create symlinks for man pages
+%fdupes -s %{buildroot}/%{_mandir}
+# create hardlinks for the rest
+%fdupes %{buildroot}/%{_prefix}
+
%check
python3 setup.py test
++++++ 2ping-4.2.tar.gz -> 2ping-4.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/2ping-4.2/2ping new/2ping-4.3/2ping
--- old/2ping-4.2/2ping 2018-08-11 23:06:16.000000000 +0200
+++ new/2ping-4.3/2ping 2018-12-03 20:32:39.000000000 +0100
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# 2ping - A bi-directional ping utility
-# Copyright (C) 2010-2017 Ryan Finnie
+# Copyright (C) 2010-2018 Ryan Finnie
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/2ping-4.2/2ping.spec new/2ping-4.3/2ping.spec
--- old/2ping-4.2/2ping.spec 2018-08-11 23:06:16.000000000 +0200
+++ new/2ping-4.3/2ping.spec 2018-12-03 20:32:39.000000000 +0100
@@ -1,5 +1,5 @@
Name: 2ping
-Version: 4.2
+Version: 4.3
Release: 1%{?dist}
Summary: Bi-directional ping utility
License: GPLv2+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/2ping-4.2/2ping6 new/2ping-4.3/2ping6
--- old/2ping-4.2/2ping6 2018-08-11 23:06:16.000000000 +0200
+++ new/2ping-4.3/2ping6 2018-12-03 20:32:39.000000000 +0100
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# 2ping - A bi-directional ping utility
-# Copyright (C) 2010-2017 Ryan Finnie
+# Copyright (C) 2010-2018 Ryan Finnie
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/2ping-4.2/ChangeLog new/2ping-4.3/ChangeLog
--- old/2ping-4.2/ChangeLog 2018-08-11 23:06:16.000000000 +0200
+++ new/2ping-4.3/ChangeLog 2018-12-03 20:32:39.000000000 +0100
@@ -1,3 +1,8 @@
+2ping 4.3 (2018-12-03)
+ * dd --srv-service
+ * Change --adaptive behavior to better match ping -A
+ * Fix typos in manpage
+
2ping 4.2 (2018-08-11)
* Added SIGHUP handling of listener processes
* Added an example bash_completion script
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/2ping-4.2/README new/2ping-4.3/README
--- old/2ping-4.2/README 2018-08-11 23:06:16.000000000 +0200
+++ new/2ping-4.3/README 2018-12-03 20:32:39.000000000 +0100
@@ -48,7 +48,7 @@
2ping - A bi-directional ping utility
-Copyright (C) 2010-2017 Ryan Finnie
+Copyright (C) 2010-2018 Ryan Finnie
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/2ping-4.2/README.md new/2ping-4.3/README.md
--- old/2ping-4.2/README.md 2018-08-11 23:06:16.000000000 +0200
+++ new/2ping-4.3/README.md 2018-12-03 20:32:39.000000000 +0100
@@ -37,7 +37,7 @@
2ping - A bi-directional ping utility
-Copyright (C) 2010-2017 [Ryan Finnie](https://www.finnie.org/)
+Copyright (C) 2010-2018 [Ryan Finnie](https://www.finnie.org/)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/2ping-4.2/doc/2ping-protocol-examples.py new/2ping-4.3/doc/2ping-protocol-examples.py
--- old/2ping-4.2/doc/2ping-protocol-examples.py 2018-08-11 23:06:16.000000000 +0200
+++ new/2ping-4.3/doc/2ping-protocol-examples.py 2018-12-03 20:32:39.000000000 +0100
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# 2ping - A bi-directional ping utility
-# Copyright (C) 2010-2017 Ryan Finnie
+# Copyright (C) 2010-2018 Ryan Finnie
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/2ping-4.2/doc/2ping-protocol.md new/2ping-4.3/doc/2ping-protocol.md
--- old/2ping-4.2/doc/2ping-protocol.md 2018-08-11 23:06:16.000000000 +0200
+++ new/2ping-4.3/doc/2ping-protocol.md 2018-12-03 20:32:39.000000000 +0100
@@ -612,7 +612,7 @@
## Copyright
-Copyright (C) 2010 Ryan Finnie
+Copyright (C) 2010-2018 Ryan Finnie
This text is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/2ping-4.2/doc/2ping.1 new/2ping-4.3/doc/2ping.1
--- old/2ping-4.2/doc/2ping.1 2018-08-11 23:06:16.000000000 +0200
+++ new/2ping-4.3/doc/2ping.1 2018-12-03 20:32:39.000000000 +0100
@@ -46,10 +46,9 @@
.TP
.B \-\-adaptive, \-A
Adaptive ping.
-A new client ping request is sent as soon as a client ping response is
-received.
-If a ping response is not received within the interval period, a new
-ping request is sent.
+Interpacket interval adapts to round\-trip time, so that effectively not
+more than one (or more, if preload is set) unanswered probe is present
+in the network.
On networks with low rtt this mode is essentially equivalent to flood
mode.
.RS
@@ -300,7 +299,7 @@
When sending replies, 2ping will try to match the packet size of the
received packet by adding padding if necessary, but will not exceed
\f[I]\-\-max\-packet\-size\f[].
-\f[I]\-\-no\-match\-packet\-size\f[] disabled this behavior, always
+\f[I]\-\-no\-match\-packet\-size\f[] disables this behavior, always
setting the minimum to \f[I]\-\-min\-packet\-size\f[].
.RS
.RE
@@ -326,7 +325,7 @@
.RE
.TP
.B \-\-port=\f[I]port\f[]
-Use UDP port \f[I]port\f[], either a numeric port number of a service
+Use UDP port \f[I]port\f[], either a numeric port number or a service
name string.
With \f[I]\-\-listen\f[], this is the port to bind as, otherwise this is
the port to send to.
@@ -365,6 +364,13 @@
.RS
.RE
.TP
+.B \-\-srv\-service=\f[I]service\f[]
+When combined with \f[I]\-\-srv\f[], service name to be used for SRV
+lookups.
+Default service is "2ping".
+.RS
+.RE
+.TP
.B \-\-stats=\f[I]interval\f[]
Print a line of brief current statistics every \f[I]interval\f[]
seconds.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/2ping-4.2/doc/2ping.md new/2ping-4.3/doc/2ping.md
--- old/2ping-4.2/doc/2ping.md 2018-08-11 23:06:16.000000000 +0200
+++ new/2ping-4.3/doc/2ping.md 2018-12-03 20:32:39.000000000 +0100
@@ -32,8 +32,7 @@
--adaptive, -A
: Adaptive ping.
- A new client ping request is sent as soon as a client ping response is received.
- If a ping response is not received within the interval period, a new ping request is sent.
+ Interpacket interval adapts to round-trip time, so that effectively not more than one (or more, if preload is set) unanswered probe is present in the network.
On networks with low rtt this mode is essentially equivalent to flood mode.
--count=*count*, -c *count*
@@ -170,7 +169,7 @@
--no-match-packet-size
: When sending replies, 2ping will try to match the packet size of the received packet by adding padding if necessary, but will not exceed *--max-packet-size*.
- *--no-match-packet-size* disabled this behavior, always setting the minimum to *--min-packet-size*.
+ *--no-match-packet-size* disables this behavior, always setting the minimum to *--min-packet-size*.
--no-send-version
: Do not send the current running version of 2ping with each packet.
@@ -185,7 +184,7 @@
A single number without colon separation means use the same percentage for both outbound and inbound.
--port=*port*
-: Use UDP port *port*, either a numeric port number of a service name string.
+: Use UDP port *port*, either a numeric port number or a service name string.
With *--listen*, this is the port to bind as, otherwise this is the port to send to.
Default is UDP port 15998.
@@ -209,6 +208,10 @@
The record's port will be used instead of *--port*.
This functionality requires the dnspython module to be installed.
+--srv-service=*service*
+: When combined with *--srv*, service name to be used for SRV lookups.
+ Default service is "2ping".
+
--stats=*interval*
: Print a line of brief current statistics every *interval* seconds.
The same line can be printed on demand by entering \^\\ or sending the QUIT signal to the 2ping process.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/2ping-4.2/setup.py new/2ping-4.3/setup.py
--- old/2ping-4.2/setup.py 2018-08-11 23:06:16.000000000 +0200
+++ new/2ping-4.3/setup.py 2018-12-03 20:32:39.000000000 +0100
@@ -15,7 +15,7 @@
name='2ping',
description='2ping a bi-directional ping utility',
long_description=read('README'),
- version='4.2',
+ version='4.3',
license='GPLv2+',
platforms=['Unix'],
author='Ryan Finnie',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/2ping-4.2/twoping/__init__.py new/2ping-4.3/twoping/__init__.py
--- old/2ping-4.2/twoping/__init__.py 2018-08-11 23:06:16.000000000 +0200
+++ new/2ping-4.3/twoping/__init__.py 2018-12-03 20:32:39.000000000 +0100
@@ -1,5 +1,5 @@
# 2ping - A bi-directional ping utility
-# Copyright (C) 2010-2017 Ryan Finnie
+# Copyright (C) 2010-2018 Ryan Finnie
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -16,4 +16,4 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
-__version__ = '4.2'
+__version__ = '4.3'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/2ping-4.2/twoping/args.py new/2ping-4.3/twoping/args.py
--- old/2ping-4.2/twoping/args.py 2018-08-11 23:06:16.000000000 +0200
+++ new/2ping-4.3/twoping/args.py 2018-12-03 20:32:39.000000000 +0100
@@ -1,5 +1,5 @@
# 2ping - A bi-directional ping utility
-# Copyright (C) 2010-2017 Ryan Finnie
+# Copyright (C) 2010-2018 Ryan Finnie
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -202,6 +202,10 @@
'--srv', action='store_true',
help=_('lookup SRV records in client mode'),
)
+ parser.add_argument(
+ '--srv-service', type=str, default='2ping',
+ help=_('service name for SRV lookups'),
+ )
# ping-compatible ignored options
for opt in 'b|B|d|L|n|R|r|U'.split('|'):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/2ping-4.2/twoping/best_poller.py new/2ping-4.3/twoping/best_poller.py
--- old/2ping-4.2/twoping/best_poller.py 2018-08-11 23:06:16.000000000 +0200
+++ new/2ping-4.3/twoping/best_poller.py 2018-12-03 20:32:39.000000000 +0100
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# 2ping - A bi-directional ping utility
-# Copyright (C) 2010-2017 Ryan Finnie
+# Copyright (C) 2010-2018 Ryan Finnie
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/2ping-4.2/twoping/cli.py new/2ping-4.3/twoping/cli.py
--- old/2ping-4.2/twoping/cli.py 2018-08-11 23:06:16.000000000 +0200
+++ new/2ping-4.3/twoping/cli.py 2018-12-03 20:32:39.000000000 +0100
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# 2ping - A bi-directional ping utility
-# Copyright (C) 2010-2017 Ryan Finnie
+# Copyright (C) 2010-2018 Ryan Finnie
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -85,7 +85,7 @@
self.next_send = 0
- self.is_shutdown = False
+ self.shutdown_time = 0
self.nagios_result = 0
self.session = b''
@@ -508,9 +508,15 @@
else:
self.print_out('SEND: {}'.format(repr(packet_out_examine)))
- # If we're in flood mode and this is a ping reply, send a new ping ASAP.
- if self.args.flood and (not self.args.listen) and (packets.OpcodeInReplyTo.id in packet_in.opcodes):
- sock_class.next_send = time_begin
+ if (not self.args.listen) and (packets.OpcodeInReplyTo.id in packet_in.opcodes):
+ if self.args.flood:
+ # If we're in flood mode and this is a ping reply, send a new ping ASAP.
+ sock_class.next_send = time_begin
+ elif self.args.adaptive and sock_class.rtt_ewma:
+ # Adaptive gets recalculated immediately after the reply.
+ next_send = time_begin + (sock_class.rtt_ewma / 8.0 / 1000.0)
+ if next_send < sock_class.next_send:
+ sock_class.next_send = next_send
def sock_sendto(self, sock_class, data, address):
sock = sock_class.sock
@@ -651,7 +657,7 @@
lookup_hosts_found = 0
self.print_debug('SRV lookup: {}'.format(lookup))
try:
- res = dns.resolver.query('_2ping._udp.{}'.format(lookup), 'srv')
+ res = dns.resolver.query('_{}._udp.{}'.format(self.args.srv_service, lookup), 'srv')
except dns.exception.DNSException as e:
raise socket.error('{}: {}'.format(lookup, repr(e)))
for rdata in res:
@@ -1081,24 +1087,25 @@
self.next_cleanup = now + 60.0
if not self.args.listen:
for sock_class in self.sock_classes:
- if sock_class.is_shutdown:
+ if sock_class.shutdown_time:
+ # Scheduled to shutdown, do not send any more pings
continue
if now >= sock_class.next_send:
if self.args.count and (sock_class.pings_transmitted >= self.args.count):
- sock_class.is_shutdown = True
+ sock_class.shutdown_time = now + self.args.interval
+ sock_class.next_send = now + self.args.interval
continue
if (sock_class.pings_transmitted == 0) and (self.args.preload > 1):
for i in range(self.args.preload):
self.send_new_ping(sock_class, sock_class.client_host[4])
else:
self.send_new_ping(sock_class, sock_class.client_host[4])
- sock_class.next_send = now + self.args.interval
-
- if self.args.flood:
- next_send = now + 0.01
- for sock_class in self.sock_classes:
- if next_send < sock_class.next_send:
- sock_class.next_send = next_send
+ if self.args.adaptive and sock_class.rtt_ewma:
+ sock_class.next_send = now + (sock_class.rtt_ewma / 8.0 / 1000.0)
+ elif self.args.flood:
+ sock_class.next_send = now + 0.01
+ else:
+ sock_class.next_send = now + self.args.interval
next_wakeup = now + self.old_age_interval
next_wakeup_reason = 'old age'
@@ -1106,6 +1113,9 @@
if (not self.args.listen) and (sock_class.next_send < next_wakeup):
next_wakeup = sock_class.next_send
next_wakeup_reason = 'send'
+ if sock_class.shutdown_time and (sock_class.shutdown_time < next_wakeup):
+ next_wakeup = sock_class.shutdown_time
+ next_wakeup_reason = 'shutdown'
if self.args.stats:
if now >= self.next_stats:
self.print_stats(short=True)
@@ -1137,19 +1147,16 @@
if self.args.debug:
raise
- if self.args.adaptive and sock_class.rtt_ewma:
- target = sock_class.rtt_ewma / 8.0 / 1000.0
- sock_class.next_send = now + target
if (
self.args.count and
(sock_class.pings_transmitted >= self.args.count) and
(sock_class.pings_transmitted == sock_class.pings_received)
):
- sock_class.is_shutdown = True
+ sock_class.shutdown_time = now
all_shutdown = True
for sock_class in self.sock_classes:
- if not sock_class.is_shutdown:
+ if (not sock_class.shutdown_time) or (sock_class.shutdown_time >= now):
all_shutdown = False
break
if all_shutdown:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/2ping-4.2/twoping/crc32.py new/2ping-4.3/twoping/crc32.py
--- old/2ping-4.2/twoping/crc32.py 2018-08-11 23:06:16.000000000 +0200
+++ new/2ping-4.3/twoping/crc32.py 2018-12-03 20:32:39.000000000 +0100
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# 2ping - A bi-directional ping utility
-# Copyright (C) 2010-2017 Ryan Finnie
+# Copyright (C) 2010-2018 Ryan Finnie
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/2ping-4.2/twoping/monotonic_clock.py new/2ping-4.3/twoping/monotonic_clock.py
--- old/2ping-4.2/twoping/monotonic_clock.py 2018-08-11 23:06:16.000000000 +0200
+++ new/2ping-4.3/twoping/monotonic_clock.py 2018-12-03 20:32:39.000000000 +0100
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# Monotonic clock
-# Copyright (C) 2010-2017 Ryan Finnie
+# Copyright (C) 2010-2018 Ryan Finnie
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/2ping-4.2/twoping/packets.py new/2ping-4.3/twoping/packets.py
--- old/2ping-4.2/twoping/packets.py 2018-08-11 23:06:16.000000000 +0200
+++ new/2ping-4.3/twoping/packets.py 2018-12-03 20:32:39.000000000 +0100
@@ -1,5 +1,5 @@
# 2ping - A bi-directional ping utility
-# Copyright (C) 2010-2017 Ryan Finnie
+# Copyright (C) 2010-2018 Ryan Finnie
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/2ping-4.2/twoping/utils.py new/2ping-4.3/twoping/utils.py
--- old/2ping-4.2/twoping/utils.py 2018-08-11 23:06:16.000000000 +0200
+++ new/2ping-4.3/twoping/utils.py 2018-12-03 20:32:39.000000000 +0100
@@ -1,5 +1,5 @@
# 2ping - A bi-directional ping utility
-# Copyright (C) 2010-2017 Ryan Finnie
+# Copyright (C) 2010-2018 Ryan Finnie
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License