Accepting request 714410 from network:utilities
OBS-URL: https://build.opensuse.org/request/show/714410 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/iputils?expand=0&rev=47
This commit is contained in:
commit
ceefbe7919
@ -1,77 +0,0 @@
|
|||||||
From 3b013f271931c3fe771e5a2c591f35d617de90f3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michael Weiss <dev.primeos@gmail.com>
|
|
||||||
Date: Thu, 16 May 2019 10:08:50 +0000
|
|
||||||
Subject: [PATCH] build-sys/doc: Fix the dependency on xsltproc
|
|
||||||
|
|
||||||
This dependency is only required if either the man pages or the HTML
|
|
||||||
documentation is being build. Both targets require docbook-xsl-ns and
|
|
||||||
not docbook-xsl (the former is preferred and in use since c503834).
|
|
||||||
---
|
|
||||||
.travis.yml | 1 -
|
|
||||||
doc/meson.build | 27 +++++++++++++++++----------
|
|
||||||
2 files changed, 17 insertions(+), 11 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/.travis.yml b/.travis.yml
|
|
||||||
index 54edb61..6a6e8c3 100644
|
|
||||||
--- a/.travis.yml
|
|
||||||
+++ b/.travis.yml
|
|
||||||
@@ -14,7 +14,6 @@ addons:
|
|
||||||
- "libidn2-0-dev"
|
|
||||||
- "nettle-dev"
|
|
||||||
- "xsltproc"
|
|
||||||
- - "docbook-xsl"
|
|
||||||
- "docbook-xsl-ns"
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
diff --git a/doc/meson.build b/doc/meson.build
|
|
||||||
index 369090f..9a007b3 100644
|
|
||||||
--- a/doc/meson.build
|
|
||||||
+++ b/doc/meson.build
|
|
||||||
@@ -38,7 +38,7 @@ if build_ninfod == true
|
|
||||||
manpages += ['ninfod']
|
|
||||||
endif
|
|
||||||
|
|
||||||
-xsltproc = find_program('xsltproc', required : true)
|
|
||||||
+xsltproc = find_program('xsltproc', required : build_mans or build_html_mans)
|
|
||||||
xsltproc_args = [
|
|
||||||
'--nonet',
|
|
||||||
'--stringparam', 'man.output.quietly', '1',
|
|
||||||
@@ -48,19 +48,26 @@ xsltproc_args = [
|
|
||||||
]
|
|
||||||
|
|
||||||
if xsltproc.found()
|
|
||||||
- xsl = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
|
|
||||||
- testrun = run_command([xsltproc, '--nonet', xsl])
|
|
||||||
- xsltproc_works = testrun.returncode() == 0
|
|
||||||
- if xsltproc_works == false
|
|
||||||
- warning('xsltproc: cannot process ' + xsl)
|
|
||||||
+ doc_targets = []
|
|
||||||
+ if build_mans
|
|
||||||
+ doc_targets += ['manpages']
|
|
||||||
endif
|
|
||||||
-else
|
|
||||||
- warning('No docbook stylesheet found for generating man pages')
|
|
||||||
- xsltproc_works = false
|
|
||||||
+ if build_html_mans
|
|
||||||
+ doc_targets += ['html']
|
|
||||||
+ endif
|
|
||||||
+ xsltproc_works = true
|
|
||||||
+ foreach doc_target : doc_targets
|
|
||||||
+ xsl = 'http://docbook.sourceforge.net/release/xsl-ns/current/' + doc_target + '/docbook.xsl'
|
|
||||||
+ testrun = run_command([xsltproc, '--nonet', xsl])
|
|
||||||
+ if testrun.returncode() != 0
|
|
||||||
+ xsltproc_works = false
|
|
||||||
+ warning('xsltproc: cannot process ' + xsl)
|
|
||||||
+ endif
|
|
||||||
+ endforeach
|
|
||||||
endif
|
|
||||||
|
|
||||||
if xsltproc_works == false
|
|
||||||
- error('Man pages cannot be built: xsltproc does not work correctly')
|
|
||||||
+ error('Docs cannot be built: xsltproc does not work correctly')
|
|
||||||
endif
|
|
||||||
|
|
||||||
if build_mans
|
|
||||||
--
|
|
||||||
2.21.0
|
|
||||||
|
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jul 10 08:27:00 UTC 2019 - Petr Vorel <pvorel@suse.cz>
|
||||||
|
|
||||||
|
- Update to version s20190709
|
||||||
|
- Removed patches included in this upstream release:
|
||||||
|
ping-Fix-unwanted-bell-on-unreachable-address.patch
|
||||||
|
0001-build-sys-doc-Fix-the-dependency-on-xsltproc.patch
|
||||||
|
meson-remove-setcap-setuid.sh.patch
|
||||||
|
- Add libcap-progs as a build dependency (setcap is needed)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jun 14 12:56:38 UTC 2019 - Petr Vorel <pvorel@suse.cz>
|
Fri Jun 14 12:56:38 UTC 2019 - Petr Vorel <pvorel@suse.cz>
|
||||||
|
|
||||||
|
11
iputils.spec
11
iputils.spec
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: iputils
|
Name: iputils
|
||||||
Version: s20190515
|
Version: s20190709
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: IPv4 and IPv6 Networking Utilities
|
Summary: IPv4 and IPv6 Networking Utilities
|
||||||
License: BSD-3-Clause AND GPL-2.0-or-later
|
License: BSD-3-Clause AND GPL-2.0-or-later
|
||||||
@ -27,13 +27,11 @@ Source0: https://github.com/iputils/iputils/archive/%{version}.tar.gz
|
|||||||
Source1: rarpd.service
|
Source1: rarpd.service
|
||||||
Patch1: iputils-sec-ping-unblock.diff
|
Patch1: iputils-sec-ping-unblock.diff
|
||||||
Patch2: iputils-ping-interrupt.diff
|
Patch2: iputils-ping-interrupt.diff
|
||||||
Patch3: 0001-build-sys-doc-Fix-the-dependency-on-xsltproc.patch
|
|
||||||
Patch4: meson-remove-setcap-setuid.sh.patch
|
|
||||||
Patch5: ping-Fix-unwanted-bell-on-unreachable-address.patch
|
|
||||||
BuildRequires: docbook5-xsl-stylesheets
|
BuildRequires: docbook5-xsl-stylesheets
|
||||||
BuildRequires: docbook_5
|
BuildRequires: docbook_5
|
||||||
BuildRequires: iso_ent
|
BuildRequires: iso_ent
|
||||||
BuildRequires: libcap-devel
|
BuildRequires: libcap-devel
|
||||||
|
BuildRequires: libcap-progs
|
||||||
BuildRequires: libidn2-devel
|
BuildRequires: libidn2-devel
|
||||||
BuildRequires: libopenssl-devel
|
BuildRequires: libopenssl-devel
|
||||||
BuildRequires: meson
|
BuildRequires: meson
|
||||||
@ -69,9 +67,6 @@ out their IP addresses.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
%patch5 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Export CFLAGS so we can also benefit from the ones the Makefile sets for us
|
# Export CFLAGS so we can also benefit from the ones the Makefile sets for us
|
||||||
@ -124,11 +119,11 @@ ln -sf %{_bindir}/tracepath6 %{buildroot}/bin
|
|||||||
%service_add_pre rdisc.service
|
%service_add_pre rdisc.service
|
||||||
|
|
||||||
%post
|
%post
|
||||||
|
%service_add_post rdisc.service
|
||||||
%set_permissions %{_bindir}/ping
|
%set_permissions %{_bindir}/ping
|
||||||
|
|
||||||
%verifyscript
|
%verifyscript
|
||||||
%verify_permissions -e %{_bindir}/ping
|
%verify_permissions -e %{_bindir}/ping
|
||||||
%service_add_post rdisc.service
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%service_del_preun rdisc.service
|
%service_del_preun rdisc.service
|
||||||
|
@ -1,59 +0,0 @@
|
|||||||
# patch to workaround error
|
|
||||||
# meson.build:242:7: ERROR: add_install_script args must be strings
|
|
||||||
# Upstream status: not upstreamable (workaround)
|
|
||||||
diff --git a/meson.build b/meson.build
|
|
||||||
index 8af9e18..c82597c 100644
|
|
||||||
--- a/meson.build
|
|
||||||
+++ b/meson.build
|
|
||||||
@@ -239,12 +239,6 @@ if build_ping == true
|
|
||||||
dependencies : [m_dep, cap_dep, idn_dep, crypto_dep, resolv_dep],
|
|
||||||
link_with : [libcommon],
|
|
||||||
install: true)
|
|
||||||
- meson.add_install_script('build-aux/setcap-setuid.sh',
|
|
||||||
- join_paths(get_option('prefix'), get_option('bindir')),
|
|
||||||
- 'ping',
|
|
||||||
- perm_type,
|
|
||||||
- setcap.path()
|
|
||||||
- )
|
|
||||||
endif
|
|
||||||
|
|
||||||
if build_tracepath == true
|
|
||||||
@@ -259,12 +253,6 @@ if build_traceroute6 == true
|
|
||||||
dependencies : [cap_dep, idn_dep],
|
|
||||||
link_with : [libcommon],
|
|
||||||
install: true)
|
|
||||||
- meson.add_install_script('build-aux/setcap-setuid.sh',
|
|
||||||
- join_paths(get_option('prefix'), get_option('bindir')),
|
|
||||||
- 'traceroute6',
|
|
||||||
- perm_type,
|
|
||||||
- setcap.path()
|
|
||||||
- )
|
|
||||||
endif
|
|
||||||
|
|
||||||
if build_clockdiff == true
|
|
||||||
@@ -272,12 +260,6 @@ if build_clockdiff == true
|
|
||||||
dependencies : [cap_dep],
|
|
||||||
link_with : [libcommon],
|
|
||||||
install: true)
|
|
||||||
- meson.add_install_script('build-aux/setcap-setuid.sh',
|
|
||||||
- join_paths(get_option('prefix'), get_option('bindir')),
|
|
||||||
- 'clockdiff',
|
|
||||||
- perm_type,
|
|
||||||
- setcap.path()
|
|
||||||
- )
|
|
||||||
endif
|
|
||||||
|
|
||||||
if build_rinfod == true
|
|
||||||
@@ -302,12 +284,6 @@ if build_arping == true
|
|
||||||
dependencies : [rt_dep, cap_dep, idn_dep],
|
|
||||||
link_with : [libcommon],
|
|
||||||
install: true)
|
|
||||||
- meson.add_install_script('build-aux/setcap-setuid.sh',
|
|
||||||
- join_paths(get_option('prefix'), get_option('bindir')),
|
|
||||||
- 'arping',
|
|
||||||
- perm_type,
|
|
||||||
- setcap.path()
|
|
||||||
- )
|
|
||||||
endif
|
|
||||||
|
|
||||||
if build_tftpd == true
|
|
@ -1,111 +0,0 @@
|
|||||||
From effe9cd6c0a0269345cf0c092fe75aadf5f49102 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Petr Vorel <pvorel@suse.cz>
|
|
||||||
Date: Mon, 3 Jun 2019 18:35:40 +0200
|
|
||||||
Subject: [PATCH] ping: Fix unwanted bell on unreachable address
|
|
||||||
Upstream-status: commit effe9cd6c0a0269345cf0c092fe75aadf5f49102
|
|
||||||
Fixes: boo#1135118
|
|
||||||
|
|
||||||
Commit 4471ac629cf2603f4b8b45e042e072c992ce25a5 caused regression for IPv6
|
|
||||||
that ping -a IP6_ADDR beeps also on wrong address (i.e. when "Address
|
|
||||||
unreachable"):
|
|
||||||
|
|
||||||
$ ping -a -c1 fd00:1:1:1::15
|
|
||||||
PING fd00:1:1:1::15(fd00:1:1:1::15) 56 data bytes
|
|
||||||
From fd00:1:1:1::2 icmp_seq=1 Destination unreachable: Address unreachable
|
|
||||||
|
|
||||||
--- fd00:1:1:1::15 ping statistics ---
|
|
||||||
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0m
|
|
||||||
|
|
||||||
It should only bell when ping returns correctly.
|
|
||||||
|
|
||||||
Another (fixed) regression was that ping after exit printed error "pipe N",
|
|
||||||
where N is number of counts. Error was result of code from ping_common.c:
|
|
||||||
printf("%spipe %d", comma, pipesize);
|
|
||||||
|
|
||||||
4471ac6 was wrong that code for sock->working_recverr == 1 should stay,
|
|
||||||
sock->working_recverr should be removed.
|
|
||||||
|
|
||||||
Thus changes:
|
|
||||||
* ping.c: put back "stronger filter" for raw socket but (unlike before
|
|
||||||
4471ac6) exit with 2 if setsockopt(ICMP_FILTER) fails
|
|
||||||
* ping6_common.c: put back setsockopt(IPV6_RECVERR), but (unlike before
|
|
||||||
4471ac6) exit with 2 if it fails
|
|
||||||
* ping6_common.c: remove ICMP6_FILTER_SETPASS calls. These caused error "pipe N".
|
|
||||||
* ping6_common.c: return 0 after acknowledge() in ping6_parse_reply
|
|
||||||
|
|
||||||
Fixes: 4471ac6 ("ping: Remove workaround for bug in IP_RECVERR on raw sockets")
|
|
||||||
Fixes: https://github.com/iputils/iputils/issues/182
|
|
||||||
Reported-by: Luiz Angelo Daros de Luca <luizluca@tre-sc.jus.br>
|
|
||||||
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
|
||||||
Reviewed-by: Sami Kerola <kerolasa@iki.fi>
|
|
||||||
---
|
|
||||||
ping.c | 10 ++++++++++
|
|
||||||
ping6_common.c | 17 +++++------------
|
|
||||||
2 files changed, 15 insertions(+), 12 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/ping.c b/ping.c
|
|
||||||
index 3debd82..34653be 100644
|
|
||||||
--- a/ping.c
|
|
||||||
+++ b/ping.c
|
|
||||||
@@ -877,6 +877,16 @@ int ping4_receive_error_msg(socket_st *sock)
|
|
||||||
|
|
||||||
acknowledge(ntohs(icmph.un.echo.sequence));
|
|
||||||
|
|
||||||
+ if (sock->socktype == SOCK_RAW) {
|
|
||||||
+ struct icmp_filter filt;
|
|
||||||
+
|
|
||||||
+ filt.data = ~((1 << ICMP_SOURCE_QUENCH) |
|
|
||||||
+ (1 << ICMP_REDIRECT) |
|
|
||||||
+ (1 << ICMP_ECHOREPLY));
|
|
||||||
+ if (setsockopt(sock->fd, SOL_RAW, ICMP_FILTER, (const void *)&filt,
|
|
||||||
+ sizeof(filt)) == -1)
|
|
||||||
+ error(2, errno, "setsockopt(ICMP_FILTER)");
|
|
||||||
+ }
|
|
||||||
net_errors++;
|
|
||||||
nerrors++;
|
|
||||||
if (options & F_QUIET)
|
|
||||||
diff --git a/ping6_common.c b/ping6_common.c
|
|
||||||
index f2b91d8..6cc5404 100644
|
|
||||||
--- a/ping6_common.c
|
|
||||||
+++ b/ping6_common.c
|
|
||||||
@@ -726,6 +726,10 @@ int ping6_run(int argc, char **argv, struct addrinfo *ai, struct socket_st *sock
|
|
||||||
if (!(packet = (unsigned char *)malloc((unsigned int)packlen)))
|
|
||||||
error(2, errno, _("memory allocation failed"));
|
|
||||||
|
|
||||||
+ hold = 1;
|
|
||||||
+ if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_RECVERR, (const void *)&hold, sizeof hold))
|
|
||||||
+ error(2, errno, "IPV6_RECVERR");
|
|
||||||
+
|
|
||||||
/* Estimate memory eaten by single packet. It is rough estimate.
|
|
||||||
* Actually, for small datalen's it depends on kernel side a lot. */
|
|
||||||
hold = datalen + 8;
|
|
||||||
@@ -754,11 +758,6 @@ int ping6_run(int argc, char **argv, struct addrinfo *ai, struct socket_st *sock
|
|
||||||
|
|
||||||
ICMP6_FILTER_SETBLOCKALL(&filter);
|
|
||||||
|
|
||||||
- ICMP6_FILTER_SETPASS(ICMP6_DST_UNREACH, &filter);
|
|
||||||
- ICMP6_FILTER_SETPASS(ICMP6_PACKET_TOO_BIG, &filter);
|
|
||||||
- ICMP6_FILTER_SETPASS(ICMP6_TIME_EXCEEDED, &filter);
|
|
||||||
- ICMP6_FILTER_SETPASS(ICMP6_PARAM_PROB, &filter);
|
|
||||||
-
|
|
||||||
if (niquery_is_enabled())
|
|
||||||
ICMP6_FILTER_SETPASS(IPUTILS_NI_ICMP6_REPLY, &filter);
|
|
||||||
else
|
|
||||||
@@ -1254,13 +1253,7 @@ ping6_parse_reply(socket_st *sock, struct msghdr *msg, int cc, void *addr, struc
|
|
||||||
!is_ours(sock, icmph1->icmp6_id))
|
|
||||||
return 1;
|
|
||||||
acknowledge(ntohs(icmph1->icmp6_seq));
|
|
||||||
- nerrors++;
|
|
||||||
- if (options & F_FLOOD) {
|
|
||||||
- write_stdout("\bE", 2);
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
- print_timestamp();
|
|
||||||
- printf(_("From %s: icmp_seq=%u "), pr_addr(from, sizeof *from), ntohs(icmph1->icmp6_seq));
|
|
||||||
+ return 0;
|
|
||||||
} else {
|
|
||||||
/* We've got something other than an ECHOREPLY */
|
|
||||||
if (!(options & F_VERBOSE) || uid)
|
|
||||||
--
|
|
||||||
2.21.0
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:9b5125eb5ef9f4e947ad8fdddcf77f538f53b8f47b53eb5bc5347cb16d01c8fd
|
|
||||||
size 403228
|
|
3
s20190709.tar.gz
Normal file
3
s20190709.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a15720dd741d7538dd2645f9f516d193636ae4300ff7dbc8bfca757bf166490a
|
||||||
|
size 404101
|
Loading…
Reference in New Issue
Block a user