# # spec file for package iputils # # Copyright (c) 2018 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 # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # 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/ # Name: iputils Version: s20161105 Release: 5.1 Summary: IPv4 and IPv6 Networking Utilities License: BSD-3-Clause AND GPL-2.0+ Group: Productivity/Networking/Other Url: https://github.com/iputils/iputils Source0: https://github.com/iputils/iputils/archive/%{version}.tar.gz Source1: rarpd.service Patch8: iputils-sec-ping-unblock.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 Patch10: iputils-remove-bogus-check-required-for-2.4.9-kernels.patch Patch11: iputils-ping-fix-pmtu-for-ipv6.patch BuildRequires: docbook_3 BuildRequires: iso_ent BuildRequires: libcap-devel BuildRequires: libopenssl-devel BuildRequires: opensp BuildRequires: perl-SGMLS BuildRequires: pkgconfig BuildRequires: systemd-rpm-macros # For Makefile modifications BuildRequires: sed BuildRequires: pkgconfig(libidn) Requires(pre): 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 This package contains some small network tools for IPv4 and IPv6 like rdisc, ping, arping and tracepath. %package -n rarpd Summary: Reverse Address Resolution Protocol Daemon Group: Productivity/Networking/System %systemd_requires %description -n rarpd Rarpd listens on the Ethernet for broadcast packets asking for reverse address resolution. These packets are sent by hosts at boot time to find out their IP addresses. %prep %setup -q %patch8 -p1 %patch9 -p1 %patch10 -p1 %patch11 %build # 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 \ rarpd man %install mkdir -p %{buildroot}/%{_sbindir} mkdir -p %{buildroot}/%{_bindir} install arping %{buildroot}/%{_sbindir} install clockdiff %{buildroot}/%{_sbindir} install rarpd %{buildroot}/%{_sbindir} install rdisc %{buildroot}/%{_sbindir} # boo#795788 install tracepath %{buildroot}/%{_bindir} install ping %{buildroot}/%{_bindir} # boo#1017616 ln -sf %{_bindir}/ping %{buildroot}/%{_bindir}/ping6 ln -sf %{_bindir}/tracepath %{buildroot}/%{_bindir}/tracepath6 #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 %{buildroot}/{bin,sbin} ln -sf %{_sbindir}/arping %{buildroot}/sbin ln -sf %{_sbindir}/clockdiff %{buildroot}/sbin ln -sf %{_sbindir}/rarpd %{buildroot}/sbin ln -sf %{_sbindir}/rdisc %{buildroot}/sbin ln -sf %{_bindir}/tracepath %{buildroot}/bin ln -sf %{_bindir}/ping %{buildroot}/bin ln -sf %{_bindir}/ping6 %{buildroot}/bin ln -sf %{_bindir}/tracepath6 %{buildroot}/bin #EndUsrMerge mkdir -p %{buildroot}/%{_mandir}/man8 # Remove conflicting / unused manpages rm doc/ninfod* doc/pg3* doc/rdisc* doc/tftpd* doc/traceroute* # Install the rest install -m 644 doc/*.8 %{buildroot}%{_mandir}/man8/ # Install rarp service and create rc compat symling install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_unitdir}/rarpd.service ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcrarpd %post %set_permissions %{_bindir}/ping %verifyscript %verify_permissions -e %{_bindir}/ping %pre -n rarpd %service_add_pre rarpd.service %post -n rarpd %service_add_post rarpd.service %preun -n rarpd %service_del_preun rarpd.service %postun -n rarpd %service_del_postun rarpd.service %files %doc RELNOTES %verify(not mode caps) %attr(0755,root,root) %{_bindir}/ping %{_bindir}/ping6 %{_sbindir}/arping %{_sbindir}/clockdiff %{_bindir}/tracepath %{_bindir}/tracepath6 %{_sbindir}/rdisc #UsrMerge /bin/ping /bin/ping6 /bin/tracepath /bin/tracepath6 /sbin/arping /sbin/clockdiff /sbin/rdisc #EndUsrMerge %{_mandir}/man8/arping.8%{ext_man} %{_mandir}/man8/clockdiff.8%{ext_man} %{_mandir}/man8/ping.8%{ext_man} %{_mandir}/man8/tracepath.8%{ext_man} #EndUsrMerge %files -n rarpd %{_sbindir}/rarpd %{_sbindir}/rcrarpd %{_unitdir}/rarpd.service #UsrMerge /sbin/rarpd #EndUsrMerge %{_mandir}/man8/rarpd.8%{ext_man} %changelog * Fri Jan 5 2018 nmoreychaisemartin@suse.com - Backport iputils-ping-fix-pmtu-for-ipv6.patch from upstream to fix PMTU discovery in ping6. (bsc#1072460) * Mon Dec 11 2017 mpluskal@suse.com - Install rdisc as rdisc, do not use in.rdisc anymore (xinetd which was using in.* names is obsolete anyways) * Mon Dec 11 2017 pvorel@suse.cz - iputils: remove man pages of unused binaries: ninfod, pg3, rdisc (rdisc is in a separate package) * Sat Dec 9 2017 mpluskal@suse.com - Add systemd service for rarpd * Thu Nov 30 2017 meissner@suse.com - mark ping also verify not caps, as these are changed by the permissions package. (bsc#1065835) * Tue Nov 28 2017 mpluskal@suse.com - Reintroduce rarpd as subpackage - Explicitly list content in filelist as we have two subpackages now * Mon Nov 13 2017 mpluskal@suse.com - Cleanup with spec-cleaner * Thu Sep 7 2017 pvorel@suse.cz - Update to version s20161105 (Changes taken from the RELNOTES file) * ping: eliminate deadcode & simplify * ping: do not allow oversized packets to root * correctly initialize first hop * ping: fix ping -6 -I * arping,doc: fix documentation of -I * ping: fix error message when getting EACCES from connect() * renamed INSTALL to INSTALL.md * (re)structured INSTALL.md and transformed into markdown; added hint that installation into prefix has to be done with DESTDIR make variable and that there's no prefix support in configure, close #21 * ping: Silence GCC warnings when building with -fstrict-aliasing * tftpd: Drop supplementary groups for root * libgcrypt: fix static linking * doc: Inserted a missing word * tracepath6: avoid redundant family variable * tracepath: borrow everything good from tracepath6 * tracepath: switch to dual-stack operation * tracepath: remove now redundant tracepath6 * docs: fix parallel build of manpages * ping: remove assignments of values that are never read * docs: remove references to ping6 and traceroute6 * ping: work with older kernels that don't support ping sockets * Revert "ping_common.c: fix message flood when EPERM is encountered in ping" * reorder -I option parsing (boo#1057664) * ping: also bind the ICMP socket to the specific device - tracepath6 is now symlink to tracepath. * Tue Jan 3 2017 mchandras@suse.de - Add ping6 symlink (boo#1017616) * Tue May 24 2016 meissner@suse.com - do not install rarpd and rarpd.8 manpage (comes from rarpd rpm currently) * Tue May 17 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 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) - dropped iputils-ifenslave.diff - 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 2015 p.drouand@gmail.com - Update to version s20150815 * use syntax compatible with busybox date in Makefile * Makefile: use #define as in previous code changes * ping: status() now returns received/transmitted instead of trans/recv * ping: don't mess with internals of struct msghdr * tracepath,doc: fix corrupted tag * made ping functions protocol independent * Allow ping to use IPv6 addresses * 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 * 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 * ping: perform dual-stack ping by default * remove IPV4_TARGETS and IPV6_TARGETS * 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()` * Use svg instead of png to get better image quality * iputils ping/ping6: Add a function to check if a packet is ours * ping: Add to fix compilation error. * ping6: Use GNUTLS API directly for MD5. (v2) * ping6: Use libgcrypt instead of gnutls for MD5. * ninfod: Regenerate configure by autoconf-2.69. * ninfod: libgcrypt support. * spec: Configure before building ninfod. * spec: Fix date in %%changelog. * make,spec: Add rpm target. * ping,ping6 doc: More description on CAP_NET_RAW usage. - Update patches * iputils-s20101006-ping-interrupt.diff > iputils-ping-interrupt.diff * iputils-s20101006-sec-ping-unblock.diff > iputils-sec-ping-unblock.diff * iputils-remove-bogus-check-required-for-2.4.9-kernels.patch - Update home project page and download Url - Remove obsolete %%clean section - Remove UsrMerge process; it has been done for more than two openSUSE releases now * Mon Apr 20 2015 tiwai@suse.de - Fix a bogus kernel version check (boo#927831): iputils-remove-bogus-check-required-for-2.4.9-kernels.patch * Tue Jan 28 2014 hare@suse.de - Fixed ping segfaults (bnc#860616,bnc#860655) * Removed iputils-pingnamelookuponce.diff * Thu Jan 23 2014 hare@suse.de - Update to upstream version s20121221 (FATE#316211) - See RELNOTES for full changelog - Removed merges patches: * iputils-pingtypo.diff * iputils-s20101006-capabilities.diff - Updated patches for apply - Remove libsysfs dependency (FATE#316211) * Wed Nov 13 2013 meissner@suse.com - also do the usr move with the permissions handlers bnc#841533 * Tue Jul 23 2013 ms@suse.de - ping denpend on SIGALRM to exit sometime, so we mask it UNBLOCK (bnc #674304) * Fri Mar 8 2013 crrodriguez@opensuse.org - Build everythiong with full RELRO here. SUID code around.. * Sat Mar 2 2013 coolo@suse.com - update license to new format * Fri Feb 17 2012 rschweikert@suse.com - place binaries in /usr tree (UsrMerge project) * Tue May 31 2011 ms@suse.de - fixed typo in ping output. Since 11.4 sequence tag is icmp_req instead of icmp_seq beause of that for example cacti ping script does not work anymore (bnc #696720) * Fri Nov 19 2010 coolo@novell.com - remove no longer needed patches * Tue Nov 16 2010 lnussel@suse.de - don't verify caps as that's done by chkstat as well - use new %%set_permissions macro * Mon Nov 8 2010 lnussel@suse.de - fix capabilities patch: first switch uid then drop caps. * Wed Nov 3 2010 lnussel@suse.de - update to version s20100418 * ping,ping6: avoid gethostbyaddr during ping flood. * arping: Set correct broadcast address. * tracepath: Fix some small typos in tracepath.sgml. * ping: Fix resource consumption triggered by specially crafted ICMP Echo Reply (CVE-2010-2529) - don't install fscaps, rely on /etc/permissions handling instead - compile using -fno-strict-aliasing - drop capabilities unconditionally (bnc#645423) - spec file cleanup * Mon Oct 11 2010 reddwarf@opensuse.org - Use POSIX capabilities instead of SUID for ping * Tue Sep 7 2010 aj@suse.de - BuildRequire sysfsutils-devel * Wed Jul 14 2010 ms@suse.de - fixed device broadcast setup (bnc #614389) - upstream maintainer has changed. new maintainer is YOSHIFUJI Hideaki. Along with this change the versioning of the package also changed. Current version is: s20100418 from 18-Apr-2010 - many patches upstream now, reduced patch set * Tue Jul 13 2010 ms@suse.de - reverted arping-infiniband.diff, it breaks arping (bnc #614389) and (bnc #610839) * Thu Jul 8 2010 ms@suse.de - security fix: replies by a malicious system can make ping run into an endless loop (bnc #620837) * Fri Jun 4 2010 ms@suse.de - fixed arping buffer overflow on Infiniband (bnc #610839) * Fri Apr 23 2010 ms@suse.de - ifenslave: fixed detach/attach code of bonds (bnc #595474) - ifenslave: fixed output of the IP address - in hex: (bnc #595474) * Tue Dec 22 2009 jengelh@medozas.de - enable parallel build * Mon Oct 6 2008 ms@suse.de - fixed compiler warning in ifenslave.c: * ordered comparison of pointer with integer zero (bnc #431910) * Thu Sep 4 2008 ms@suse.de - fixed ping signal handling during address lookup (bnc #416404) * Wed Dec 12 2007 rguenther@suse.de - use sysconf(_SC_OPEN_MAX) instead of OPEN_MAX to fix build * Tue Mar 6 2007 ms@suse.de - fixed overbound ttab2 array access (#251195) * Wed Dec 6 2006 ms@suse.de - ping_common.c: added check for oversized packages (-s) (#222010) * Thu Nov 23 2006 olh@suse.de - move ifenslave.c to the first patch to allow quilt setup *.spec * Wed Nov 22 2006 ms@suse.de - ping6: use getaddrinfo() instead of gethostbyname2 (#221745) * Fri Nov 10 2006 ro@suse.de - fix manpage permissions * Mon Aug 7 2006 aj@suse.de - use sysconf(_SC_CLK_TCK) instead of HZ * Wed Mar 1 2006 schwab@suse.de - ifenslave: fix display of interface address. - Don't strip binaries. * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Mon Jan 23 2006 mmj@suse.de - Fix ping6 [#143932] * Fri Jul 8 2005 mmj@suse.de - Patch from ak which allows to use the standard ping6 link-local-addr%%interface syntax instead of ping6 -I interface link-local-addr. * Thu Jun 16 2005 mmj@suse.de - Compile with -fpie, link with -pie * Fri Sep 3 2004 kukuk@suse.de - Fix compiling with new glibc headers * Fri Mar 19 2004 mmj@suse.de - Use correct permissions for manpages [#36321] * Wed Mar 17 2004 mmj@suse.de - Add Olaf Kirch patch to only do name lookup once in ping [#36161] * Mon Jan 12 2004 mmj@suse.de - Update ifenslave.c to the one from linux-2.6.1 * Thu Oct 16 2003 mmj@suse.de - Don't build as root - Cleanup a bit * Wed Jun 4 2003 kukuk@suse.de - Don't include net/if.h and linux/if.h at the same time * Mon May 12 2003 mmj@suse.de - Update to newest snapshot, ss021109 * Mon Feb 24 2003 schwab@suse.de - Fix use of kernel headers. * Wed Oct 30 2002 mmj@suse.de - Apply patch for the ping/ping6 manpage to mention the -R option is for IPv4 only. - Clean up the specfile a bit. * Fri Oct 25 2002 mmj@suse.de - Apply patch for setuid() return value check from Thomas Biege * Wed Oct 2 2002 mmj@suse.de - Add the ifenslave binary from the kernel Documentation directory [#20372] * Tue Oct 1 2002 mmj@suse.de - Update to snapshot 020927 which among other things should have below fix merged. * Thu Aug 8 2002 mmj@suse.de - Apply other patch to fix the dynamic IP problem and still allows the from address to be printed. Thanks to Olaf Kirch. [#17519] * Sun Jul 28 2002 kukuk@suse.de - remove unused tetex from neededforbuild * Thu Jul 25 2002 mmj@suse.de - Disabled traceroute6 * Fri Jul 5 2002 bk@suse.de - fix build on ia64(use glibc kernel headers, not /usr/src/linux) - add optflags * Thu Jul 4 2002 bk@suse.de - add fix for buffer overflow problem in traceroute6.c(datalen.patch) - add fix for ipv6 error printing problem (ping6-errorprinting.patch) - add patch to activate the rdisc server (rdisc-server.patch) * Mon Jun 17 2002 mmj@suse.de - Revert back to the ping from iputils, and apply patch to fix the dynamic ip problem. * Mon Jun 10 2002 mmj@suse.de - Use old nkitb ping which works with dynamic IP [#12568] * Mon Feb 4 2002 mmj@suse.de - Update to snapshot from January 24th 2002 * Tue Jan 22 2002 mmj@suse.de - Update to snapshot from December 2nd 2001 * Mon Dec 10 2001 bjacke@suse.de - move arping to /sbin/ * Wed Oct 10 2001 mmj@suse.de - Update to snapshot from October 2 2001 * Thu Sep 6 2001 kukuk@suse.de - Remove wrong warning about to old kernel and warning about problems with the clock from ping (ping has a special handler for this, so it is okay). Both only confuses tester [Bug #10141 and Bug #10146]. * Sat Aug 25 2001 kukuk@suse.de - Update to snapshot from 24 Aug 2001 - Use included ping like all other distributions do - Don't use included rarpd and tftpd - Lot of new functions and minor bug fixes * Mon Jun 18 2001 schwab@suse.de - Fix use of cpp directives inside macro call. * Fri Mar 30 2001 kukuk@suse.de - Use ping6 from inet6-apps package [Bug #6354] * Mon Mar 12 2001 schwab@suse.de - Fix use of kernel headers. * Fri Mar 9 2001 kukuk@suse.de - Add ping and ping.8 manual page from OpenBSD. * Mon Mar 5 2001 kukuk@suse.de - fix to build with current glibc * Wed Feb 14 2001 uli@suse.de - fixed to build on PPC * Sat Nov 11 2000 kukuk@suse.de - Update to new version (20001110). * Sat Oct 14 2000 kukuk@suse.de - spec file fixes * Sat Oct 14 2000 kukuk@suse.de - Initial version