# # spec file for package net-tools # # Copyright (c) 2015 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: net-tools Url: http://www.tazenda.demon.co.uk/phil/net-tools/ Provides: iputils:/usr/sbin/traceroute6 Provides: net_tool Obsoletes: net_tool #force new traceroute or else.. Recommends: traceroute >= 2.0.0 # provides hostname, domainname and dnsdomainname Requires: hostname Version: 1.60 Release: 768.20 Summary: Important Programs for Networking License: GPL-2.0+ Group: Productivity/Networking/Other BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: http://www.tazenda.demon.co.uk/phil/net-tools/net-tools-%{version}.tar.bz2 Source2: netstat.xinetd Source3: nstrcmp.c Source4: ether-wake.c Source5: ether-wake.8 Patch: net-tools-%{version}.dif Patch1: netstat-trunc.dif Patch2: manpages.diff Patch4: net-tools-1.60-multilinestr.diff Patch5: net-tools-1.60-krn26.dif Patch7: net-tools-1.60-long_to_int.diff Patch8: net-tools-1.60-compoundstatement.diff Patch9: nameif-rename.patch Patch10: net-tools-1.60-errors.patch Patch11: net-tools-1.60-cont-buff.patch Patch12: net-tools-1.60-miioff.diff Patch13: net-tools-1.60-nameif.diff Patch14: net-tools-1.60-sockios-SIOCGMIIPHY.diff Patch15: net-tools-1.60-numericstuff.diff Patch16: net-tools-1.60-if_tr.diff Patch18: net-tools-1.60-netstat.8.diff Patch19: net-tools-1.60-strictaliasing.diff Patch20: net-tools-1.60-interface_stack.patch Patch21: net-tools-1.60-arp-unaligned-access.patch Patch22: net-tools-1.60-snmp-counter-overflow.patch Patch23: net-tools-1.60-netstat-output.patch Patch24: net-tools-1.60-netstat-p.patch Patch25: net-tools-1.60-sctp.patch Patch26: net-tools-1.60-sctp-quiet Patch27: net-tools-1.60-hostname-space.patch Patch30: net-tools-1.60-ifconfig.8.diff Patch31: net-tools-1.60-tcp-recvq-listen.patch Patch32: net-tools-1.60-netstat-ci.diff Patch33: net-tools-1.60-ifconfig-SIOCSIFNETMASK.diff Patch34: net-tools-1.60-interface_socket.diff Patch35: net-tools-1.60-interface_mtu.diff Patch36: net-tools-1.60-printval-conversion.patch Patch38: net-tools-1.60-obsolete.diff Patch39: net-tools-1.60-fclose.diff Patch40: net-tools-1.60-notrim.diff Patch41: net-tools-1.60-ipv6-statistics.diff Patch42: net-tools-1.60-ifindex.diff Patch43: net-tools-1.60-infiniband.diff Patch44: net-tools-1.60-netrom-fopen.diff Patch45: net-tools-1.60-doc.dif Patch46: net-tools-1.60-netstat_retval.diff Patch47: net-tools-1.60-hostname-ipv6.patch Patch48: net-tools-1.60-dont-trim-foreign-addr6.diff Patch49: net-tools-1.60-cs_CZ.bnc715580.diff Patch50: net-tools-1.60-plipconfig-usage.patch Patch51: net-tools-1.60-plipconfig-manpage.patch Patch52: net-tools-1.60-plipconfig-ecode.patch %description This package contains essential programs for network administration and maintenance: netstat, arp, ifconfig, rarp, and route. Authors: -------- Fred N. van Kempen Bernd Eckenfels Fred Baumgarten Peter Tobias Olaf Kirch %package deprecated Summary: Deprecated Networking Utilities Group: Productivity/Networking/Other %description deprecated This package contains the arp, ifconfig, netstat and route utilities, which have been replaced by tools from the iproute2 package: * arp -> ip [-r] neigh * ifconfig -> ip a * netstat -> ss [-r] * route -> ip r %prep %setup -q cp %{S:3} lib/ %patch %patch1 %patch2 -p1 %patch4 %patch5 %patch7 -p1 %patch8 -p1 %patch9 %patch10 -p1 -b .errors %patch11 -p1 %patch12 -p1 %patch13 -p1 %patch14 -p1 %patch15 -p1 %patch16 -p1 %patch18 -p1 %patch19 -p1 %patch20 %patch21 -p1 %patch22 -p1 %patch23 -p1 %patch24 -p1 %patch25 -p1 %patch26 -p1 %patch27 -p1 %patch30 -p1 %patch31 -p1 %patch32 -p1 %patch33 -p1 %patch34 -p1 %patch35 -p1 %patch36 -p1 #not applied, see bugzilla discussion ##%patch38 -p1 %patch39 -p1 %patch40 -p1 %patch41 %patch42 %patch43 %patch44 %patch45 %patch46 %patch47 %patch48 %patch49 %patch50 -p1 %patch51 -p1 %patch52 -p1 cp %{S:4} . cp %{S:5} ./man/en_US %build # Kernel 3.6 removes if_strip.h - disable STRIP %if 0%{?suse_version} > 1220 %__sed -i -e '/HAVE_HWSTRIP y/s/y$/n/' config.in %endif # make config make COPTS="-D_GNU_SOURCE $RPM_OPT_FLAGS" LOPTS="$RPM_OPT_FLAGS" gcc $RPM_OPT_FLAGS -D_GNU_SOURCE -fwhole-program -o ether-wake ether-wake.c %install install -d -m 755 $RPM_BUILD_ROOT/etc/xinetd.d install -m 644 %{S:2} $RPM_BUILD_ROOT/etc/xinetd.d/netstat make install BASEDIR=$RPM_BUILD_ROOT install -m 755 ether-wake %{buildroot}/sbin for tool in \ %ifarch s390 plipconfig slattach \ %endif hostname domainname dnsdomainname nisdomainname ypdomainname mii-tool rarp do rm -f $RPM_BUILD_ROOT/*bin/$tool rm -f $RPM_BUILD_ROOT/%{_mandir}/man*/$tool.* rm -f $RPM_BUILD_ROOT/%{_mandir}/*/man*/$tool.* done mv $RPM_BUILD_ROOT/%{_mandir}/de_DE $RPM_BUILD_ROOT/%{_mandir}/de mv $RPM_BUILD_ROOT/%{_mandir}/fr_FR $RPM_BUILD_ROOT/%{_mandir}/fr %find_lang %{name} --all-name --with-man # generate the filelist for net-tools-deprecated echo '%%defattr(-,root,root)' >deprecated.list for tool in arp ifconfig ipmaddr iptunnel netstat route; do for dir in bin sbin; do if test -x $RPM_BUILD_ROOT/$dir/$tool; then break fi done echo /$dir/$tool >>deprecated.list find $RPM_BUILD_ROOT/%_mandir -name "$tool.*"\ -printf '%_mandir/%%P*\n' >>deprecated.list done cat deprecated.list sed 's/^/%%exclude /' deprecated.list >>%name.lang %files -f %{name}.lang %defattr(-,root,root) /bin/* /sbin/* %_mandir/man*/* %config(noreplace) /etc/xinetd.d/netstat %files deprecated -f deprecated.list %changelog * Wed Jun 10 2015 gber@opensuse.org - Remove hostname, domainname, dnsdomainname and require the separate hostname package instead * Tue May 26 2015 dgutu@suse.com - Added patches to past change log entry * Sun Mar 29 2015 jengelh@inai.de - ipmaddr and iptunnel are obsolete too, move them to subpackage. (Superseded by `ip maddr` and `ip tunnel`) - remove redundant %%clean section * Thu Apr 10 2014 mmarek@suse.cz - Move arp, ifconfig, netstat and route to a -deprecated subpackage (fate#317196, fate#317197) - Drop the rarp tool, which has been broken since kernel 2.3 * Thu Jul 25 2013 ms@suse.de - ported plipconfig patches from SLE base (bnc #831310) - net-tools-1.60-plipconfig-ecode.patch - net-tools-1.60-plipconfig-manpage.patch - net-tools-1.60-plipconfig-usage.patch * Mon Apr 15 2013 idonmez@suse.com - Add Source URL, see https://en.opensuse.org/SourceUrls * Fri Feb 1 2013 crrodriguez@opensuse.org - Use Recommends insted of requires for traceroute * Tue Jan 29 2013 crrodriguez@opensuse.org - Remove obsolete traceroute(8) implementation. Modern one is packaged as "traceroute". to fullfil userspace requirements, Require the new version explicitly. - Fix localized man page installation, the right thing (tm) to do is to use find_lang --with-man --all-name instead. * Sat Jan 26 2013 jslaby@suse.com - add etherwake * Sun Oct 7 2012 andreas.stieger@gmx.de - Kernel 3.6 removes if_strip.h - disable STRIP support in factory - convert .changes to utf-8 fixing old entry, W: non-utf8-spec-file * Mon Sep 12 2011 mt@suse.com - Applied corrections for Czech translation (bnc#715580) * Tue Feb 15 2011 mt@suse.de - Fixed netstat to not trim foreign/remote ipv6 addresses when the -T option is set (bnc#637490). * Tue Jul 20 2010 mt@suse.de - implemented ipv6 support in hostname -[aifsd] (bnc #577070) * Tue Jan 26 2010 jengelh@medozas.de - make sure -m64 is passed to the linker in 64-bit mode * Fri Jan 1 2010 ms@suse.de - fixed return value of netstat -s call (bnc #566946) * Wed Dec 16 2009 ms@suse.de - removed ipchains references in man pages (bnc #561866) * Tue Nov 3 2009 coolo@novell.com - updated patches to apply with fuzz=0 * Wed Oct 7 2009 ms@suse.de - fixed duplicate fopen calls in netrom_gr.c (bnc #544339) * Mon Sep 14 2009 ms@suse.de - added support for IPV6 statistics (bnc #537904) - fixed interface address field length (bnc #537904) - added support for infiniband IPoIB devices (bnc #537904) * Wed Aug 12 2009 ms@suse.de - added -T, --notrim option which prevents the address field from being truncated (bnc #530196) * Thu Aug 6 2009 ms@suse.de - fixed missing fclose to fopen (bnc #528577) * Tue Jul 7 2009 ms@suse.de - disabled net-tools obsolete patch, no way to convince people that it would be a good idea (bnc #492665) * Tue Jul 7 2009 ms@suse.de - Programs from net-tools have modern equivalents: arp -> ip neigh ifconfig -> ip addr/ip link ipmaddr -> ip maddr iptunnel -> ip tunnel netstat -> ss route -> ip route added patch to print an obsoletes warning on stderr (bnc #492665) * Thu Jun 11 2009 coolo@novell.com - define we need GNU_SOURCE * Thu May 7 2009 ms@suse.de - fixed data type of third argument in printval function. Also make sure the printf call in this function uses the correct format sequence (bnc #501113) * Wed Mar 25 2009 ms@suse.de - increased field length for display of MTU value (bnc #486014) * Thu Nov 20 2008 ms@suse.de - don't show af_inet socket warning for netstat -i (bnc #430864) * Thu Nov 6 2008 ms@suse.de - really fixed SIOCSIFNETMASK ioctl from being called earlier to SIOCSIFADDR (bnc #438983) * Fri Oct 31 2008 ms@suse.de - reverted last patch from IBM because it breaks standard ifconfig usage as shown in bug (bnc #440580) * Mon Oct 27 2008 ms@suse.de - fixed ifconfig SIOCSIFNETMASK ioctl from being called earlier to SIOCSIFADDR (bnc #438983) * Thu Sep 25 2008 ms@suse.de - really fixed netstat -ci, incomplete patch (bnc #424813) * Wed Sep 10 2008 ms@suse.de - fixed netstat -ci which prints the stats only on the first loop on subsequent loops it says "no statistics available", even though there was network traffic in between (bnc #424813) * Tue Sep 2 2008 ms@suse.de - update to traceroute 1.2 * Mon Aug 11 2008 ms@suse.de - added patch to allow monitoring of accepted connections queue length for tcp listening sockets. This will work with kernels >= 2.6.18. * Mon May 5 2008 ms@suse.de - added hint about option -s and -f to hostname (bnc #386686) * Thu Mar 6 2008 ms@suse.de - fixed length of interface field (bnc #367769) * Tue Mar 4 2008 ms@suse.de - added obsolete warning for ifconfig into man page (bnc #366477) * Sun Feb 24 2008 crrodriguez@suse.de - use find_lang macro * Wed Jul 25 2007 ms@suse.de - fixed locale names (#294148) * Wed May 2 2007 ms@suse.de - fixed trailing space for hostname -a and -i (#270314) * Tue Sep 26 2006 ms@suse.de - fixed stack overflow when using traceroute -q [n]>=10 (#200508) * Mon Jul 24 2006 ms@suse.de - fixed german translation for route -C (#194357) * Thu Jul 20 2006 ms@suse.de - replaced static HZ define to dynamic: [#]ifndef HZ [#]define HZ sysconf(_SC_CLK_TCK) [#]endif * Wed May 24 2006 schwab@suse.de - Don't strip binaries. * Wed May 17 2006 ms@suse.de - added patch from Olaf Kirch. Do not display SCTP sockets if /proc/net/sctp/eps couldn't be opened (#159686) * Tue Mar 21 2006 okir@suse.de - Display SCTP sockets correctly [#159686 - LTC22492] * Mon Mar 20 2006 hvogel@suse.de - fix netstat -p segfault [#159069] * Mon Feb 20 2006 hvogel@suse.de - fix netstat output not to bit-wrap [#149563] * Mon Feb 6 2006 hvogel@suse.de - add snmp counter overflow patch by ak [#148350] * Wed Feb 1 2006 hvogel@suse.de - fix arp causing unaligned access [#146422] patch from Arthur D. Kepner * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Wed Jan 11 2006 mmj@suse.de - Add patch from fedora to avoid stack smashing [#142461] * Mon Dec 19 2005 mmj@suse.de - Update to traceroute-1.0.4 * Mon Dec 19 2005 mmj@suse.de - Update to traceroute-1.0.3 * Fri Dec 16 2005 mmj@suse.de - Use ICMP6_DST_UNREACH_BEYONDSCOPE instead of ICMP6_DST_UNREACH_NOTNEIGHBOR on newer glibc * Tue Sep 27 2005 mmj@suse.de - Fix strict aliasing issues * Mon Aug 29 2005 mmj@suse.de - Correct netstat.8 [#104487] * Wed Jul 6 2005 mmj@suse.de - Fix missing decl in nstrcmp.c * Mon Jun 20 2005 mmj@suse.de - compile with -fpie, link with -pie - don't strip explicitly * Mon Jun 13 2005 ro@suse.de - include netinet/if_tr.h instead of linux/if_tr.h * Wed Jan 5 2005 mmj@suse.de - Fix --numeric-ports to not imply --numeric [#45609] * Tue Dec 7 2004 mmj@suse.de - Include linux/sockios.h to get the right ioctl [#48873]. This bug is in mii-tool which is not included anymore, but better not risk ever re-adding buggy stuff. * Thu Dec 2 2004 mmj@suse.de - Fix nameif segfault [#48749] * Mon Aug 9 2004 mmj@suse.de - Remove mii-tool everywhere [#43343] * Fri Jul 30 2004 fdg@suse.de - fixed the -ic option without destroying the ifconfig buffer regarding to bug #42932 * Mon May 24 2004 meissner@suse.de - also print unsigned long longs (last patch updated). * Mon May 24 2004 meissner@suse.de - Always read 64bit values from /proc/net/dev, so we can use 32bit userland to read from 64bit kernel. #40951/LTC#8726 * Fri Mar 5 2004 hare@suse.de - Fixed return values for non-existing interfaces in nameif. * Thu Feb 26 2004 hare@suse.de - Add -r option to nameif to allow renaming of interfaces. * Thu Jan 29 2004 hare@suse.de - Cool. The last change effectively broke route(1). - > replaced return; with break; * Sun Jan 18 2004 mmj@suse.de - Fix compound statement calls, and add a missing include * Wed Oct 15 2003 mmj@suse.de - Don't build as root * Mon Oct 13 2003 mmj@suse.de - Fix 32 vs. 64-bit programming mistakes [#32089] * Mon Aug 18 2003 mmj@suse.de - Fix from mmeissner for nstrcmp.c to handle alias interfaces, even without standard names. (eth1:1 vs eth1:2, also eth1:blubber vs eth1:1) [#28985] * Mon Jul 14 2003 mmj@suse.de - Add fix from okir for traceroute -S [#27573] * Wed Jun 18 2003 ro@suse.de - added non-en manpage directories to filelist * Mon May 19 2003 mmj@suse.de - Use a better and more tested nstrcmp.c [#26950] * Tue May 13 2003 ro@suse.de - fix build with 2.5 kernel includes * Tue May 13 2003 mmj@suse.de - Package man-pages in several languages * Wed Mar 5 2003 mmj@suse.de - Add missing xinetd file [#24676] * Tue Nov 26 2002 mmj@suse.de - Fix traceroute 6 segfault [#21975] * Fri Nov 15 2002 okir@suse.de - Upgraded to new traceroute to fix #20358 * Mon Nov 11 2002 mmj@suse.de - Fix multi string literals * Thu Jul 25 2002 mmj@suse.de - Added traceroute from Olaf Kirch, which is much more secure and also IPv6 capable. * Tue Apr 16 2002 mmj@suse.de - Do not pack translated manpages. Should go to other package. * Mon Mar 4 2002 mmj@suse.de - unvollsändig -> unvollständig in German locale. [Bug #14371] * Wed Feb 6 2002 mmj@suse.de - Removed yp and nis stuff from manpages. * Sat Aug 25 2001 kukuk@suse.de - Replace last patch by a newer one from ak@suse.de * Mon Aug 20 2001 kukuk@suse.de - Add fix for truncated IP addresses [Bug #9737] * Wed Apr 25 2001 kukuk@suse.de - Update to net-tools-1.60: * lot of locale fixes * IPv6 fixes * use secure strcpy * Tue Apr 17 2001 ro@suse.de - added provides for net_tool * Sun Mar 4 2001 bk@suse.de - Update to 1.59(many fixes and improvements and new program nameif) - enabled gettext support and added locales - added ipmaddr and iptunnel tools - enabled FDDI and HIPPI support - use optimisation flags - added international man pages - spec file changes to make use of wildcards in the filelist * Fri Oct 20 2000 kukuk@suse.de - Rename from net_tool to net-tools * Sun Jun 25 2000 bk@suse.de - s390: removed not needed files * Sat Jun 3 2000 kukuk@suse.de - Update to 1.56 * Thu May 25 2000 kukuk@suse.de - Update to 1.55 (contains all fixes) * Thu May 18 2000 kukuk@suse.de - Add oh2bns patch (bug #2864) * Wed Feb 9 2000 kukuk@suse.de - Add ifconfig manual pages from Andi Kleen * Wed Feb 2 2000 kukuk@suse.de - Fix PPP initialisation * Wed Feb 2 2000 kukuk@suse.de - Update to 1.54, move /usr/man -> /usr/share/man * Mon Jan 3 2000 kukuk@suse.de - Enable IPv6 support - Fix arp/ethers parsing * Tue Oct 12 1999 garloff@suse.de - gateways and targets of PtP routes (host flag) are hosts, not networks. Change name lookup accordingly. * Mon Sep 13 1999 bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. * Mon Aug 30 1999 kukuk@suse.de - Update to 1.53, remove ypdomainname and nisdomainname * Sat Jun 26 1999 kukuk@suse.de - update from jurix to 1.52 * Tue Mar 9 1999 ro@suse.de - update to 1.50 - included slattach and its manpage in filelist * Wed Oct 28 1998 ro@suse.de - update to 1.46 / removed incorporated changes from .dif * Sat Sep 19 1998 ro@suse.de - define _GNU_SOURCE where getopt_long is used * Tue Sep 1 1998 ro@suse.de - fixed problems with inluding own ipx.h under glibc * Wed Jun 24 1998 ro@suse.de - added include linux/timer.h before including linux/ip_fw.h * Mon Oct 27 1997 ro@suse.de - added ADD_LANG in Makefile to avoid error whenever-whenever - florian@suse.de new version 1.32-alpha mv /sbin/arp /usr/sbin/arp