%bcond_with systemd Summary: Network monitoring tools including ping. Summary(ja): ping 等のネットワークモニタツール集 Name: iputils Version: 20210202 Release: 1%{?_dist_release}%{?with_systemd:.systemd} Group: network Vendor: Project Vine Distribution: Vine Linux # some parts are under the original BSD (ping.c) # some are under GPLv2+ (tracepath.c) License: BSD and GPLv2+ URL: https://github.com/iputils/iputils Source0: https://github.com/iputils/iputils/archive/%{version}.tar.gz#/%{name}-s%{version}.tar.gz Source1: ifenslave.tar.gz Source3: rdisc.initd Source5: rdisc.sysconfig Source6: ninfod.initd Source7: ninfod.sysconfig Source10: bsd.txt Source11: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt Patch1: iputils-ifenslave.patch # Vine Source(s)/Patch(es) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: docbook-utils perl-SGMLSpm BuildRequires: glibc-kernheaders >= 2.4-8.19 BuildRequires: libidn2-devel BuildRequires: openssl-devel BuildRequires: libcap-devel BuildRequires: libxslt BuildRequires: docbook5-style-xsl BuildRequires: meson %if %{with systemd} %{?systemd_requires} %else Requires(post): chkconfig Requires(preun): chkconfig Requires(preun): initscripts Requires(postun): initscripts %endif %description The iputils package contains basic utilities for monitoring a network, including ping. The ping command sends a series of ICMP protocol ECHO_REQUEST packets to a specified network host to discover whether the target machine is alive and receiving network traffic. %debug_package %prep %setup -q -a 1 -n %{name}-%{version} cp %{SOURCE10} %{SOURCE11} . %patch1 -p1 %build %ifarch s390 s390x export CFLAGS="$RPM_OPT_FLAGS -fPIE" %else export CFLAGS="$RPM_OPT_FLAGS -fpie" %endif export LDFLAGS="-pie -Wl,-z,relro,-z,now" %meson \ %if %{with systemd} -Dsystemdunitdir="%{_unitdir}" \ -DINSTALL_SYSTEMD_UNITS=true \ %endif %{nil} %meson_build %ninja_build -C %{_target_platform} iputils-gmo gcc -Wall $RPM_OPT_FLAGS $CFLAGS $LDFLAGS ifenslave.c -o ifenslave %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}/{bin,sbin} mkdir -p $buildroot%{_sysconfdir}/sysconfig pushd %{_target_platform} install -c clockdiff %{buildroot}%{_sbindir}/ install -cp arping %{buildroot}/sbin/ ln -s /sbin/arping %{buildroot}%{_sbindir}/arping install -cp ping/ping %{buildroot}/bin/ install -cp ../ifenslave %{buildroot}/sbin/ install -cp rdisc %{buildroot}/sbin/ install -cp tracepath %{buildroot}/bin/ install -cp ninfod/ninfod %{buildroot}/sbin/ ln -sf /bin/ping %{buildroot}%{_sbindir} ln -sf /bin/ping %{buildroot}%{_sbindir}/ping6 ln -sf /bin/tracepath %{buildroot}%{_sbindir} ln -sf /bin/tracepath %{buildroot}%{_sbindir}/tracepath6 mkdir -p %{buildroot}%{_mandir}/man8 install -cp doc/clockdiff.8 %{buildroot}%{_mandir}/man8/ install -cp doc/arping.8 %{buildroot}%{_mandir}/man8/ install -cp doc/ping.8 %{buildroot}%{_mandir}/man8/ install -cp doc/rdisc.8 %{buildroot}%{_mandir}/man8/ install -cp doc/tracepath.8 %{buildroot}%{_mandir}/man8/ install -cp doc/ninfod.8 %{buildroot}%{_mandir}/man8/ install -cp ../ifenslave.8 %{buildroot}%{_mandir}/man8/ ln -s ping.8.gz %{buildroot}%{_mandir}/man8/ping6.8.gz ln -s tracepath.8.gz %{buildroot}%{_mandir}/man8/tracepath6.8.gz install -dp %{buildroot}%{_datadir}/locale/ja/LC_MESSAGES install -m 644 po/ja.gmo %{buildroot}%{_datadir}/locale/ja/LC_MESSAGES/iputils.mo popd find %{buildroot}%{_mandir} -type f | xargs chmod 644 %if %{with systemd} install -Dpm644 %{_target_platform}/rdisc.service %{buildroot}%{_unitdir}/rdisc.service install -Dpm644 %{_target_platform}/ninfod/ninfod.service %{buildroot}%{_unitdir}/ninfod.service sed -i -e 's|%{_sbindir}/|/sbin/|' %{buildroot}%{_unitdir}/* %else install -dp %{buildroot}%{_sysconfdir}/rc.d/init.d install -m 755 -p %{SOURCE3} %{buildroot}%{_sysconfdir}/rc.d/init.d/rdisc install -m 755 -p %{SOURCE6} %{buildroot}%{_sysconfdir}/rc.d/init.d/ninfod %endif install -Dpm644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/rdisc install -Dpm644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/ninfod %find_lang %{name} %clean rm -rf ${RPM_BUILD_ROOT} %post %if %{with systemd} %systemd_post rdisc.service ninfod.service %else /sbin/chkconfig --add rdisc /sbin/chkconfig --add ninfod %endif %preun %if %{with systemd} %systemd_preun rdisc.service ninfod.service %else if [ $1 = 0 -o -x /bin/systemctl ]; then service rdisc stop >/dev/null 2>&1 service ninfod stop >/dev/null 2>&1 /sbin/chkconfig --del rdisc /sbin/chkconfig --del ninfod fi %endif %postun %if %{with systemd} %systemd_postun_with_restart rdisc.service ninfod.service %else if [ "$1" -ge "1" ]; then service rdisc condrestart >/dev/null 2>&1 || : service ninfod condrestart >/dev/null 2>&1 || : fi %endif %files -f %{name}.lang %defattr(-,root,root) %license LICENSE* %doc README.* %{_sbindir}/clockdiff /sbin/arping %{_sbindir}/arping %attr(4755,root,root) /bin/ping /sbin/ifenslave /sbin/rdisc /bin/tracepath /sbin/ninfod %{_sbindir}/ping %{_sbindir}/ping6 %{_sbindir}/tracepath %{_sbindir}/tracepath6 %{_mandir}/man8/* %if %{with systemd} %{_unitdir}/* %else %{_sysconfdir}/rc.d/init.d/rdisc %{_sysconfdir}/rc.d/init.d/ninfod %endif %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/rdisc %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/ninfod %changelog * Tue Feb 02 2021 Tomohiro "Tomo-p" KATO 20210202-1 - updated to 20210202. - dropped Patch2: fixed in upstream. - added systemd support (disabled as default). * Wed Nov 13 2019 Tomohiro "Tomo-p" KATO 20190709-2 - imported Patch2 from upstream to fix arping. * Tue Oct 29 2019 Tomohiro "Tomo-p" KATO 20190709-1 - updated to 20190709. - dropped Source1000 and Patch1000: merged into upstream. - switched buildsystem to meson. - dropped Patch0: Makefile is deprecated. * Sat Nov 17 2018 Tomohiro "Tomo-p" KATO 20180629-1 - updated to 20180629. - dropped Patch2-5 (fixed in upstream). - updated gettext patch and translation. - added BR:libxslt. - added BR:docbook-style-xsl. * Sat Feb 24 2018 Tomohiro "Tomo-p" KATO 20161105-2 - fixed initscripts. * Fri Feb 23 2018 Tomohiro "Tomo-p" KATO 20161105-1 - updated to 20161105. - updated gettext patch and translation. - updated license. * Sun Jul 13 2014 Daisuke SUZUKI 20140519-1 - update to 20140519 - update URL to new upstream - update gettext patch and translation * Tue Apr 12 2011 Daisuke SUZUKI 20101006-1 - new upstream release - merget with fedora/20101006-8 - update gettext patch and ja.po * Fri Apr 03 2009 Daisuke SUZUKI 20071127-2 - rebuild to add sign.. * Wed Apr 01 2009 Daisuke SUZUKI 20071127-1 - new upstream release - spec in utf-8 * Wed Sep 20 2006 Daisuke SUZUKI 20020927-41vl1 - remove traceroute6 that is now provided by traceroute package. - merge changes from FC * Sat Jul 31 2004 MATSUBAYASHI Kohji 20020927-13vl2 - ppc patch (Patch110) removed (it's no necessary now) * Thu Mar 4 2004 Daisuke SUZUKI 20020927-13vl1 - update to 20020927 merged with 20020927-13 - update i18n patch, ja.po * Thu Oct 02 2003 Phil Knirsch 20020927-12 - Fixed unaligned access problem on ia64 (#101417) * Wed Sep 10 2003 Phil Knirsch 20020927-11 - Dont use own headers, use glibc and kernheaders. * Thu Sep 04 2003 Bill Nottingham 20020927-10 - fix build with new glibc-kernheaders * Wed Sep 03 2003 Phil Knirsch 20020927-9 - Start icmp_seq from 0 instead of 1 (Conform with debian and Solaris #100609). * Thu Jul 31 2003 Phil Knirsch 20020927-8 - One more update to ifenslave.c * Mon Jun 16 2003 Phil Knirsch 20020927-7 - Updated ifenslave.c and README.bonding to latest version. * Thu May 15 2003 Phil Knirsch 20020927-5 - Bumped release and rebuilt * Thu May 15 2003 Phil Knirsch 20020927-4 - Fixed DNS lookup problems (#68212). - Added warning if binding problem failed on subinterface (#81640). * Tue May 13 2003 Phil Knirsch 20020927-3 - Removed bonding tarball and replaced it with ifenslave.c and README - FHS compliance for all tools, now to be found in /bin with compat symlinks to old places. * Fri Nov 29 2002 Phil Knirsch 20020927-1 - Updated to latest upstream version. * Tue Jun 18 2002 Phil Knirsch 20020124-7 - Added new BuildPreReqs for docbook-utils and perl-SGMLSpm (#66661) - Fixed ipv6 error printing problem (#66659). * Tue May 21 2002 Phil Knirsch - Added a patch to activate the rdisc server (#64270). - Display the countermeasures warning only in verbose (#55236) * Thu Apr 18 2002 Bill Nottingham - quit trying to build HTML versions of the man pages * Thu Mar 14 2002 Phil Knirsch - Added fix by Tom "spot" Callaway to fix buffer overflow problems in stats. * Wed Feb 27 2002 Phil Knirsch - Update to iputils-ss020124. * Sat Feb 09 2002 MATSUBAYASHI Kohji 20001110-7vl2 - changed Patch110 to have clear_bit() within the ipv6 source for ppc * Sun Jan 27 2002 MATSUBAYASHI Kohji 20001110-7vl1 - based on 20001110-7 from Rawhide - merged Vine changes from 20001010-1vl4 --- Mon Jul 16 2001 - 20001010-1vl4 - use %%{find_lang} to fix so as not to own locale dir --- Thu Jun 07 2001 - 20001010-1vl3: rebuilt for %%{_mandir} --- Fri Oct 27 2000 MATSUBAYASHI 'Shaolin' Kohji - 20001010-1vl2 - remove ping6 for ppc - added Japanese summary and description --- Thu Oct 26 2000 Jun Nishii - added ja.po and nls patch * Wed Jan 09 2002 Tim Powers - automated rebuild * Mon Aug 27 2001 Philipp Knirsch 20001110-6 - Fixed buffer overflow problem in traceroute6.c (#51135) * Sun Jul 01 2001 Philipp Knirsch - Made ping6 and traceroute6 setuid (safe as they drop it VERY early) (#46769) * Thu Jun 28 2001 Philipp Knirsch - Fixed ping statistics overflow bug (#43801) * Tue Jun 26 2001 Philipp Knirsch - Fixed a bunch of compiler warnings (#37131) - Fixed wrong exit code for no packets and deadline (#40323) - Moved arping to /sbin from /usr/sbin due to ifup call (#45785). Symlink from /usr/sbin/ provided for backwards compatibility. * Mon Apr 30 2001 Preston Brown - install in.rdisc.8c as rdisc.8 * Tue Jan 16 2001 Jeff Johnson - update to ss001110 - doco fixes (#23844). * Sun Oct 8 2000 Jeff Johnson - update to ss001007. * Tue Aug 8 2000 Tim Waugh - fix spelling mistake (#15714). * Tue Aug 8 2000 Tim Waugh - turn on -U on machines without TSC (#15223). * Tue Aug 1 2000 Jeff Johnson - better doco patch (#15050). * Tue Jul 25 2000 Jakub Jelinek - fix include-glibc/ to work with new glibc 2.2 resolver headers * Thu Jul 13 2000 Prospector - automatic rebuild * Sun Jun 18 2000 Jeff Johnson - FHS packaging. - update to ss000418. - perform reverse DNS lookup only once for same input. * Sun Mar 5 2000 Jeff Johnson - include README.ifenslave doco. - "ping -i N" was broke for N >= 3 (#9929). - update to ss000121: -- clockdiff: preserve raw socket errno. -- ping: change error exit code to 1 (used to be 92,93, ...) -- ping,ping6: if -w specified, transmit until -c limit is reached. -- ping,ping6: exit code non-zero if some packets not received within deadline. * Tue Feb 22 2000 Jeff Johnson - man page corrections (#9690). * Wed Feb 9 2000 Jeff Johnson - add ifenslave. * Thu Feb 3 2000 Elliot Lee - List /usr/sbin/rdisc in %files list. * Thu Jan 27 2000 Jeff Johnson - add remaining binaries. - casts to remove compilation warnings. - terminate if -w deadline is reached exactly (#8724). * Fri Dec 24 1999 Jeff Johnson - create (only ping for now, traceroute et al soon).