Accepting request 397465 from home:markoschandras:branches:network:utilities

- Update to version s20160308 (Changes taken from the RELNOTES file)
  * use syntax compatible with busybox date in Makefile
  * 'admin prohibited' should print !X not !S.
  * Makefile: use #define as in previous code changes
  * doc/Makefile: require bash, because we use pushd and popd
  * doc: don't timestamp manpages by default
  * ping: status() now returns received/transmitted instead of trans/recv
  * ping: don't mess with internals of struct msghdr
  * ping: ICMP error replies while errno < 0 is a hard error
  * ping: always use POSIX locale when parsing -i
  * ping: link against libm
  * made ping functions protocol independent
  * ping: perform dual-stack ping by default
  * ping: remove obsolete preprocessor directives
  * ping: avoid name clashes between IPv4 and IPv6 code
  * ping: merge all ping header files into a single one
  * ping: merge `ping6` command into `ping`
  * ping: refactor ping options
  * ping: refactor ping socket code
  * ping: merge IPv4 and IPv6 `pr_addr()`
  * ping: fix defines and libs in Makefile
  * ping: handle single protocol systems
  * iputils ping/ping6: Add a function to check if a packet is ours
  * ping: Add <linux/types.h> to fix compilation error.
  * ping6: Use GNUTLS API directly for MD5. (v2)
  * ping6: Use libgcrypt instead of gnutls for MD5.
  * Allow ping to use IPv6 addresses
  * ping,ping6 doc: More description on CAP_NET_RAW usage.
  * if IPv4 resolving fails fallback to ping6
  * ping: in usage print the 'ping -6' options as well

OBS-URL: https://build.opensuse.org/request/show/397465
OBS-URL: https://build.opensuse.org/package/show/network:utilities/iputils?expand=0&rev=41
This commit is contained in:
Marcus Meissner 2016-05-23 15:21:37 +00:00 committed by Git OBS Bridge
parent 31dee10b86
commit d7dc9a770b
9 changed files with 143 additions and 1197 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +0,0 @@
--- ifenslave.c
+++ ifenslave.c
@@ -520,8 +520,8 @@ static int if_getconfig(char *ifname)
if (ioctl(skfd, SIOCGIFADDR, &ifr) < 0)
return -1;
printf("The result of SIOCGIFADDR is %2.2x.%2.2x.%2.2x.%2.2x.\n",
- ifr.ifr_addr.sa_data[0], ifr.ifr_addr.sa_data[1],
- ifr.ifr_addr.sa_data[2], ifr.ifr_addr.sa_data[3]);
+ ifr.ifr_addr.sa_data[2] & 0xff, ifr.ifr_addr.sa_data[3] & 0xff,
+ ifr.ifr_addr.sa_data[4] & 0xff, ifr.ifr_addr.sa_data[5] & 0xff);
strcpy(ifr.ifr_name, ifname);
if (ioctl(skfd, SIOCGIFHWADDR, &ifr) < 0)

View File

@ -8,11 +8,11 @@ Signed-off-by: Hannes Reinecke <hare@suse.de>
ping.c | 9 +++++++++ ping.c | 9 +++++++++
1 file changed, 9 insertions(+) 1 file changed, 9 insertions(+)
diff --git a/ping.c b/ping.c Index: iputils/ping.c
index 0357c3d..83a7aad 100644 ===================================================================
--- a/ping.c --- iputils.orig/ping.c
+++ b/ping.c +++ iputils/ping.c
@@ -98,6 +98,7 @@ @@ -96,6 +96,7 @@ static void usage(void) __attribute__((n
static unsigned short in_cksum(const unsigned short *addr, int len, unsigned short salt); static unsigned short in_cksum(const unsigned short *addr, int len, unsigned short salt);
static void pr_icmph(__u8 type, __u8 code, __u32 info, struct icmphdr *icp); static void pr_icmph(__u8 type, __u8 code, __u32 info, struct icmphdr *icp);
static int parsetos(char *str); static int parsetos(char *str);
@ -20,7 +20,7 @@ index 0357c3d..83a7aad 100644
static struct { static struct {
struct cmsghdr cm; struct cmsghdr cm;
@@ -504,6 +516,8 @@ @@ -514,6 +515,8 @@ int ping4_run(int argc, char **argv, str
options |= F_SOURCEROUTE; options |= F_SOURCEROUTE;
} }
} }
@ -29,7 +29,7 @@ index 0357c3d..83a7aad 100644
while (argc > 0) { while (argc > 0) {
target = *argv; target = *argv;
@@ -1629,3 +1643,9 @@ @@ -1627,3 +1630,9 @@ void usage(void)
ping6_usage(1); ping6_usage(1);
exit(2); exit(2);
} }
@ -39,6 +39,3 @@ index 0357c3d..83a7aad 100644
+ exit (1); + exit (1);
+} +}
+ +
--
1.8.1.4

View File

@ -15,11 +15,11 @@ Signed-off-by: Hannes Reinecke <hare@suse.de>
ping.c | 10 ++++++++++ ping.c | 10 ++++++++++
1 file changed, 10 insertions(+) 1 file changed, 10 insertions(+)
diff --git a/ping.c b/ping.c Index: iputils/ping.c
index 71b445d..0357c3d 100644 ===================================================================
--- a/ping.c --- iputils.orig/ping.c
+++ b/ping.c +++ iputils/ping.c
@@ -441,6 +441,17 @@ @@ -443,6 +443,17 @@ main(int argc, char **argv)
/* Create sockets */ /* Create sockets */
enable_capability_raw(); enable_capability_raw();
@ -35,9 +35,5 @@ index 71b445d..0357c3d 100644
+ set_signal(SIGALRM, doexit); + set_signal(SIGALRM, doexit);
+ +
if (hints.ai_family != AF_INET6) if (hints.ai_family != AF_INET6)
create_socket(&sock4, AF_INET, hints.ai_socktype, IPPROTO_ICMP); create_socket(&sock4, AF_INET, hints.ai_socktype, IPPROTO_ICMP, hints.ai_family == AF_INET);
if (hints.ai_family != AF_INET) if (hints.ai_family != AF_INET)
--
1.8.1.4

View File

@ -1,25 +0,0 @@
From 9c60c5877436c2feabe55ff91f6d279564fe1a31 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Thu, 23 Jan 2014 10:32:36 +0100
Subject: traceroute6: Include stdint.h
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
traceroute6.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/traceroute6.c b/traceroute6.c
index 0538d4b..7205fa3 100644
--- a/traceroute6.c
+++ b/traceroute6.c
@@ -230,6 +230,7 @@ char copyright[] =
* Tue Dec 20 03:50:13 PST 1988
*/
+#include <stdint.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/socket.h>
--
1.8.1.4

View File

@ -1,3 +1,74 @@
-------------------------------------------------------------------
Tue May 17 16:15:24 UTC 2016 - mchandras@suse.de
- Update to version s20160308 (Changes taken from the RELNOTES file)
* use syntax compatible with busybox date in Makefile
* 'admin prohibited' should print !X not !S.
* Makefile: use #define as in previous code changes
* doc/Makefile: require bash, because we use pushd and popd
* doc: don't timestamp manpages by default
* ping: status() now returns received/transmitted instead of trans/recv
* ping: don't mess with internals of struct msghdr
* ping: ICMP error replies while errno < 0 is a hard error
* ping: always use POSIX locale when parsing -i
* ping: link against libm
* made ping functions protocol independent
* ping: perform dual-stack ping by default
* ping: remove obsolete preprocessor directives
* ping: avoid name clashes between IPv4 and IPv6 code
* ping: merge all ping header files into a single one
* ping: merge `ping6` command into `ping`
* ping: refactor ping options
* ping: refactor ping socket code
* ping: merge IPv4 and IPv6 `pr_addr()`
* ping: fix defines and libs in Makefile
* ping: handle single protocol systems
* iputils ping/ping6: Add a function to check if a packet is ours
* ping: Add <linux/types.h> to fix compilation error.
* ping6: Use GNUTLS API directly for MD5. (v2)
* ping6: Use libgcrypt instead of gnutls for MD5.
* Allow ping to use IPv6 addresses
* ping,ping6 doc: More description on CAP_NET_RAW usage.
* if IPv4 resolving fails fallback to ping6
* ping: in usage print the 'ping -6' options as well
* ping: allow option -4 which forces IPv4
* combine sock and errno into a single structure
* This patch allows running ping and ping6 without root privileges on
* use better names for socket variables
* tracepath,doc: fix corrupted tag
* doc: ping: add missing options and remove ping6
* ninfod: remove unused variables
* ninfod: Regenerate configure by autoconf-2.69.
* ninfod: libgcrypt support.
* Fix building with musl
* travis.yml: install nettle-dev
* Allow using nettle instead of libgcrypt for MD5
* avoid compiler warning caused by snapshot.h
* make `getaddrinfo()` and `getnameinfo()` usage consistent
* enable IDN by default
* remove IPV4_TARGETS and IPV6_TARGETS
* Use svg instead of png to get better image quality
* spec: Configure before building ninfod.
* spec: Fix date in %changelog.
* make,spec: Add rpm target.
- Refreshed patches
* iputils-ping-interrupt.diff
* iputils-sec-ping-unblock.diff
- Remove ifenslave.c. It has been removed in the linux kernel commit
b1098bbe1b24("bonding: remove ifenslave.c from kernel source").
bonding can be done via iproute (netlink)
- Append our CFLAGS to the upstream ones instead of overriding them.
- Cleanup old make command since the upstream Makefile does things right
it seems.
- Use Provides: for old /{,s}bin utils to satisfy reverse dependencies.
- Install utilities to /bin and /sbin until reverse dependencies are
properly fixed.
- Do not install tftp and traceroute to avoid conflicts with the tftp and
traceroute packages. Stick to what iputils used to provide in the past.
- Remove iputils-traceroute6-stdint.diff patch since we are not building
the traceroute* utilities.
- Install tracepath to /usr/bin. (boo#795788)
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Dec 1 13:39:07 UTC 2015 - p.drouand@gmail.com Tue Dec 1 13:39:07 UTC 2015 - p.drouand@gmail.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package iputils # spec file for package iputils
# #
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -20,88 +20,111 @@ Name: iputils
BuildRequires: docbook_3 BuildRequires: docbook_3
BuildRequires: iso_ent BuildRequires: iso_ent
BuildRequires: libcap-devel BuildRequires: libcap-devel
BuildRequires: libidn-devel
BuildRequires: libopenssl-devel BuildRequires: libopenssl-devel
BuildRequires: pkgconfig(libidn)
BuildRequires: opensp BuildRequires: opensp
BuildRequires: perl-SGMLS BuildRequires: perl-SGMLS
BuildRequires: pkgconfig(libidn)
# For Makefile modifications
BuildRequires: sed
Summary: IPv4 and IPv6 Networking Utilities Summary: IPv4 and IPv6 Networking Utilities
License: BSD-3-Clause and GPL-2.0+ License: BSD-3-Clause and GPL-2.0+
Group: Productivity/Networking/Other Group: Productivity/Networking/Other
Version: s20150815 Version: s20160308
Release: 0 Release: 0
Url: https://github.com/iputils/iputils Url: https://github.com/iputils/iputils
Source: https://github.com/iputils/iputils/archive/%{version}.tar.gz Source: https://github.com/iputils/iputils/archive/%{version}.tar.gz
# XXX: from linux/Documentation/networking/ifenslave.c
Source1: ifenslave.c
Patch2: iputils-traceroute6-stdint.diff
Patch3: iputils-ifenslave.diff
Patch8: iputils-sec-ping-unblock.diff Patch8: iputils-sec-ping-unblock.diff
Patch9: iputils-ping-interrupt.diff Patch9: iputils-ping-interrupt.diff
# PATCH-FIX-UPSTREAM iputils-remove-bogus-check-required-for-2.4.9-kernels.patch tiwai@suse.de - boo#927831 # PATCH-FIX-UPSTREAM iputils-remove-bogus-check-required-for-2.4.9-kernels.patch tiwai@suse.de - boo#927831
Patch10: iputils-remove-bogus-check-required-for-2.4.9-kernels.patch Patch10: iputils-remove-bogus-check-required-for-2.4.9-kernels.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: permissions PreReq: permissions
# I have spotted at least two packages (yast-printer and dhcp-client) that need
# /bin/ping and /sbin/arping but they do not seem to use them with absolute
# paths so we may be lukcy and no further changes are necessary.
Provides: /bin/ping
Provides: /sbin/arping
%description %description
This package contains some small network tools for IPv4 and IPv6 like This package contains some small network tools for IPv4 and IPv6 like
rdisc, ping6, traceroute6, tracepath, and tracepath6. rdisc, ping, arping, tracepath and tracepath6.
%prep %prep
%setup -q %setup -q
cp -a %SOURCE1 .
%patch2 -p1
%patch3
%patch8 -p1 %patch8 -p1
%patch9 -p1 %patch9 -p1
%patch10 -p1 %patch10 -p1
%build %build
make %{?_smp_mflags} CFLAGS='%{optflags} -fPIC' KERNEL_INCLUDE=$PWD \
CCOPT='%optflags -fno-strict-aliasing -fpie -D_GNU_SOURCE' \
LDLIBS='-Wl,-z,relro,-z,now -pie -lcap -lresolv' \
CAPABILITIES=1 LDFLAG_GNUTLS='-lcrypto -lssl'
gcc $RPM_OPT_FLAGS -o ifenslave ifenslave.c
# Drop LASTTAG variable since it needs git and it's not used for regular
# building
sed -i '/^LASTTAG:=/d' Makefile
# Do not link against nettle
sed -i '/^USE_NETTLE/s/yes/no/' Makefile
# Export CFLAGS so we can also benefit from the ones the Makefile sets for us
# Instead of overriding all of them.
export CFLAGS='%{optflags} -fpie'
# Pulled-in by the LINK.o variable.
export LDFLAGS='-pie -Wl,-z,relro,-z,now'
# Build only selected apps
make %{?_smp_mflags} arping clockdiff ping rdisc tracepath \
tracepath6 rarpd
make man make man
%install %install
mkdir -p $RPM_BUILD_ROOT/%_sbindir mkdir -p $RPM_BUILD_ROOT/%_sbindir
mkdir -p $RPM_BUILD_ROOT/%_bindir mkdir -p $RPM_BUILD_ROOT/%_bindir
install arping $RPM_BUILD_ROOT/%{_sbindir} install arping $RPM_BUILD_ROOT/%{_sbindir}
install ifenslave $RPM_BUILD_ROOT/%{_sbindir}
install clockdiff $RPM_BUILD_ROOT/%{_sbindir} install clockdiff $RPM_BUILD_ROOT/%{_sbindir}
install rdisc $RPM_BUILD_ROOT/%{_sbindir}/in.rdisc install rdisc $RPM_BUILD_ROOT/%{_sbindir}/in.rdisc
install tracepath $RPM_BUILD_ROOT/%{_sbindir} # boo#795788
install tracepath6 $RPM_BUILD_ROOT/%{_sbindir} install tracepath $RPM_BUILD_ROOT/%{_bindir}
install traceroute6 $RPM_BUILD_ROOT/%{_sbindir} install tracepath6 $RPM_BUILD_ROOT/%{_bindir}
install ping $RPM_BUILD_ROOT/%{_bindir} install ping $RPM_BUILD_ROOT/%{_bindir}
install ipg $RPM_BUILD_ROOT/%{_bindir}
install tftpd $RPM_BUILD_ROOT/%{_bindir}
install rarpd $RPM_BUILD_ROOT/%{_bindir} install rarpd $RPM_BUILD_ROOT/%{_bindir}
mkdir -p $RPM_BUILD_ROOT%_mandir/man8 #UsrMerge
# We still have reverse dependencies using /sbin/* or /bin/*
# so keep these symlinks for now. They are slowly being fixed
# but lets not just break them yet.
mkdir -p $RPM_BUILD_ROOT/{bin,sbin}
ln -sf %{_sbindir}/arping $RPM_BUILD_ROOT/sbin
ln -sf %{_sbindir}/clockdiff $RPM_BUILD_ROOT/sbin
ln -sf %{_sbindir}/in.rdisc $RPM_BUILD_ROOT/sbin
ln -sf %{_bindir}/tracepath $RPM_BUILD_ROOT/bin
ln -sf %{_bindir}/tracepath6 $RPM_BUILD_ROOT/bin
ln -sf %{_bindir}/ping $RPM_BUILD_ROOT/bin
#EndUsrMerge
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man8
# Remove conflicting manpages
rm doc/tftpd* doc/traceroute*
# Install the rest
install -m 644 doc/*.8 $RPM_BUILD_ROOT%_mandir/man8/ install -m 644 doc/*.8 $RPM_BUILD_ROOT%_mandir/man8/
install -m 644 doc/ping.8 $RPM_BUILD_ROOT%_mandir/man8/ping6.8
%post %post
%set_permissions %{_bindir}/ping %{_bindir}/ping6 %set_permissions %{_bindir}/ping
%verifyscript %verifyscript
%verify_permissions %{_bindir}/ping %{_bindir}/ping6 %verify_permissions -e %{_bindir}/ping
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc RELNOTES %doc RELNOTES
%verify(not mode caps) %attr(4755,root,root) %{_bindir}/ping %verify(not mode) %attr(0755,root,root) %{_bindir}/ping
%{_bindir}/ipg
%{_bindir}/rarpd %{_bindir}/rarpd
%{_bindir}/tftpd
%{_sbindir}/arping %{_sbindir}/arping
%{_sbindir}/ifenslave
%{_sbindir}/clockdiff %{_sbindir}/clockdiff
%{_sbindir}/tracepath %{_bindir}/tracepath
%{_sbindir}/tracepath6 %{_bindir}/tracepath6
%{_sbindir}/traceroute6
%{_sbindir}/in.rdisc %{_sbindir}/in.rdisc
%attr(644,root,root) %_mandir/man8/* %attr(644,root,root) %_mandir/man8/*
#UsrMerge
/bin/*
/sbin/*
#EndUsrMerge
%changelog %changelog

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1f9c11783e9db90b3ebc43145e412160d989fb133a573638745379957c73c082
size 194508

3
s20160308.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:803d11b14af1bd3852c83111cc29e904bc3ca936c093dbb419d0671d3c9d964b
size 195348