iputils-vl.spec 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389
  1. %bcond_with systemd
  2. Summary: Network monitoring tools including ping.
  3. Summary(ja): ping 等のネットワークモニタツール集
  4. Name: iputils
  5. Version: 20210202
  6. Release: 1%{?_dist_release}%{?with_systemd:.systemd}
  7. Group: network
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. # some parts are under the original BSD (ping.c)
  11. # some are under GPLv2+ (tracepath.c)
  12. License: BSD and GPLv2+
  13. URL: https://github.com/iputils/iputils
  14. Source0: https://github.com/iputils/iputils/archive/%{version}.tar.gz#/%{name}-s%{version}.tar.gz
  15. Source1: ifenslave.tar.gz
  16. Source3: rdisc.initd
  17. Source5: rdisc.sysconfig
  18. Source6: ninfod.initd
  19. Source7: ninfod.sysconfig
  20. Source10: bsd.txt
  21. Source11: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
  22. Patch1: iputils-ifenslave.patch
  23. # Vine Source(s)/Patch(es)
  24. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  25. BuildRequires: docbook-utils perl-SGMLSpm
  26. BuildRequires: glibc-kernheaders >= 2.4-8.19
  27. BuildRequires: libidn2-devel
  28. BuildRequires: openssl-devel
  29. BuildRequires: libcap-devel
  30. BuildRequires: libxslt
  31. BuildRequires: docbook5-style-xsl
  32. BuildRequires: meson
  33. %if %{with systemd}
  34. %{?systemd_requires}
  35. %else
  36. Requires(post): chkconfig
  37. Requires(preun): chkconfig
  38. Requires(preun): initscripts
  39. Requires(postun): initscripts
  40. %endif
  41. %description
  42. The iputils package contains basic utilities for monitoring a network,
  43. including ping. The ping command sends a series of ICMP protocol
  44. ECHO_REQUEST packets to a specified network host to discover whether
  45. the target machine is alive and receiving network traffic.
  46. %debug_package
  47. %prep
  48. %setup -q -a 1 -n %{name}-%{version}
  49. cp %{SOURCE10} %{SOURCE11} .
  50. %patch1 -p1
  51. %build
  52. %ifarch s390 s390x
  53. export CFLAGS="$RPM_OPT_FLAGS -fPIE"
  54. %else
  55. export CFLAGS="$RPM_OPT_FLAGS -fpie"
  56. %endif
  57. export LDFLAGS="-pie -Wl,-z,relro,-z,now"
  58. %meson \
  59. %if %{with systemd}
  60. -Dsystemdunitdir="%{_unitdir}" \
  61. -DINSTALL_SYSTEMD_UNITS=true \
  62. %endif
  63. %{nil}
  64. %meson_build
  65. %ninja_build -C %{_target_platform} iputils-gmo
  66. gcc -Wall $RPM_OPT_FLAGS $CFLAGS $LDFLAGS ifenslave.c -o ifenslave
  67. %install
  68. rm -rf %{buildroot}
  69. mkdir -p %{buildroot}%{_bindir}
  70. mkdir -p %{buildroot}%{_sbindir}
  71. mkdir -p %{buildroot}/{bin,sbin}
  72. mkdir -p $buildroot%{_sysconfdir}/sysconfig
  73. pushd %{_target_platform}
  74. install -c clockdiff %{buildroot}%{_sbindir}/
  75. install -cp arping %{buildroot}/sbin/
  76. ln -s /sbin/arping %{buildroot}%{_sbindir}/arping
  77. install -cp ping/ping %{buildroot}/bin/
  78. install -cp ../ifenslave %{buildroot}/sbin/
  79. install -cp rdisc %{buildroot}/sbin/
  80. install -cp tracepath %{buildroot}/bin/
  81. install -cp ninfod/ninfod %{buildroot}/sbin/
  82. ln -sf /bin/ping %{buildroot}%{_sbindir}
  83. ln -sf /bin/ping %{buildroot}%{_sbindir}/ping6
  84. ln -sf /bin/tracepath %{buildroot}%{_sbindir}
  85. ln -sf /bin/tracepath %{buildroot}%{_sbindir}/tracepath6
  86. mkdir -p %{buildroot}%{_mandir}/man8
  87. install -cp doc/clockdiff.8 %{buildroot}%{_mandir}/man8/
  88. install -cp doc/arping.8 %{buildroot}%{_mandir}/man8/
  89. install -cp doc/ping.8 %{buildroot}%{_mandir}/man8/
  90. install -cp doc/rdisc.8 %{buildroot}%{_mandir}/man8/
  91. install -cp doc/tracepath.8 %{buildroot}%{_mandir}/man8/
  92. install -cp doc/ninfod.8 %{buildroot}%{_mandir}/man8/
  93. install -cp ../ifenslave.8 %{buildroot}%{_mandir}/man8/
  94. ln -s ping.8.gz %{buildroot}%{_mandir}/man8/ping6.8.gz
  95. ln -s tracepath.8.gz %{buildroot}%{_mandir}/man8/tracepath6.8.gz
  96. install -dp %{buildroot}%{_datadir}/locale/ja/LC_MESSAGES
  97. install -m 644 po/ja.gmo %{buildroot}%{_datadir}/locale/ja/LC_MESSAGES/iputils.mo
  98. popd
  99. find %{buildroot}%{_mandir} -type f | xargs chmod 644
  100. %if %{with systemd}
  101. install -Dpm644 %{_target_platform}/rdisc.service %{buildroot}%{_unitdir}/rdisc.service
  102. install -Dpm644 %{_target_platform}/ninfod/ninfod.service %{buildroot}%{_unitdir}/ninfod.service
  103. sed -i -e 's|%{_sbindir}/|/sbin/|' %{buildroot}%{_unitdir}/*
  104. %else
  105. install -dp %{buildroot}%{_sysconfdir}/rc.d/init.d
  106. install -m 755 -p %{SOURCE3} %{buildroot}%{_sysconfdir}/rc.d/init.d/rdisc
  107. install -m 755 -p %{SOURCE6} %{buildroot}%{_sysconfdir}/rc.d/init.d/ninfod
  108. %endif
  109. install -Dpm644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/rdisc
  110. install -Dpm644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/ninfod
  111. %find_lang %{name}
  112. %clean
  113. rm -rf ${RPM_BUILD_ROOT}
  114. %post
  115. %if %{with systemd}
  116. %systemd_post rdisc.service ninfod.service
  117. %else
  118. /sbin/chkconfig --add rdisc
  119. /sbin/chkconfig --add ninfod
  120. %endif
  121. %preun
  122. %if %{with systemd}
  123. %systemd_preun rdisc.service ninfod.service
  124. %else
  125. if [ $1 = 0 -o -x /bin/systemctl ]; then
  126. service rdisc stop >/dev/null 2>&1
  127. service ninfod stop >/dev/null 2>&1
  128. /sbin/chkconfig --del rdisc
  129. /sbin/chkconfig --del ninfod
  130. fi
  131. %endif
  132. %postun
  133. %if %{with systemd}
  134. %systemd_postun_with_restart rdisc.service ninfod.service
  135. %else
  136. if [ "$1" -ge "1" ]; then
  137. service rdisc condrestart >/dev/null 2>&1 || :
  138. service ninfod condrestart >/dev/null 2>&1 || :
  139. fi
  140. %endif
  141. %files -f %{name}.lang
  142. %defattr(-,root,root)
  143. %license LICENSE*
  144. %doc README.*
  145. %{_sbindir}/clockdiff
  146. /sbin/arping
  147. %{_sbindir}/arping
  148. %attr(4755,root,root) /bin/ping
  149. /sbin/ifenslave
  150. /sbin/rdisc
  151. /bin/tracepath
  152. /sbin/ninfod
  153. %{_sbindir}/ping
  154. %{_sbindir}/ping6
  155. %{_sbindir}/tracepath
  156. %{_sbindir}/tracepath6
  157. %{_mandir}/man8/*
  158. %if %{with systemd}
  159. %{_unitdir}/*
  160. %else
  161. %{_sysconfdir}/rc.d/init.d/rdisc
  162. %{_sysconfdir}/rc.d/init.d/ninfod
  163. %endif
  164. %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/rdisc
  165. %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/ninfod
  166. %changelog
  167. * Tue Feb 02 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20210202-1
  168. - updated to 20210202.
  169. - dropped Patch2: fixed in upstream.
  170. - added systemd support (disabled as default).
  171. * Wed Nov 13 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20190709-2
  172. - imported Patch2 from upstream to fix arping.
  173. * Tue Oct 29 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20190709-1
  174. - updated to 20190709.
  175. - dropped Source1000 and Patch1000: merged into upstream.
  176. - switched buildsystem to meson.
  177. - dropped Patch0: Makefile is deprecated.
  178. * Sat Nov 17 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20180629-1
  179. - updated to 20180629.
  180. - dropped Patch2-5 (fixed in upstream).
  181. - updated gettext patch and translation.
  182. - added BR:libxslt.
  183. - added BR:docbook-style-xsl.
  184. * Sat Feb 24 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20161105-2
  185. - fixed initscripts.
  186. * Fri Feb 23 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20161105-1
  187. - updated to 20161105.
  188. - updated gettext patch and translation.
  189. - updated license.
  190. * Sun Jul 13 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 20140519-1
  191. - update to 20140519
  192. - update URL to new upstream
  193. - update gettext patch and translation
  194. * Tue Apr 12 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 20101006-1
  195. - new upstream release
  196. - merget with fedora/20101006-8
  197. - update gettext patch and ja.po
  198. * Fri Apr 03 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 20071127-2
  199. - rebuild to add sign..
  200. * Wed Apr 01 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 20071127-1
  201. - new upstream release
  202. - spec in utf-8
  203. * Wed Sep 20 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 20020927-41vl1
  204. - remove traceroute6 that is now provided by traceroute package.
  205. - merge changes from FC
  206. * Sat Jul 31 2004 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 20020927-13vl2
  207. - ppc patch (Patch110) removed (it's no necessary now)
  208. * Thu Mar 4 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 20020927-13vl1
  209. - update to 20020927 merged with 20020927-13
  210. - update i18n patch, ja.po
  211. * Thu Oct 02 2003 Phil Knirsch <pknirsch@redhat.com> 20020927-12
  212. - Fixed unaligned access problem on ia64 (#101417)
  213. * Wed Sep 10 2003 Phil Knirsch <pknirsch@redhat.com> 20020927-11
  214. - Dont use own headers, use glibc and kernheaders.
  215. * Thu Sep 04 2003 Bill Nottingham <notting@redhat.com> 20020927-10
  216. - fix build with new glibc-kernheaders
  217. * Wed Sep 03 2003 Phil Knirsch <pknirsch@redhat.com> 20020927-9
  218. - Start icmp_seq from 0 instead of 1 (Conform with debian and Solaris #100609).
  219. * Thu Jul 31 2003 Phil Knirsch <pknirsch@redhat.com> 20020927-8
  220. - One more update to ifenslave.c
  221. * Mon Jun 16 2003 Phil Knirsch <pknirsch@redhat.com> 20020927-7
  222. - Updated ifenslave.c and README.bonding to latest version.
  223. * Thu May 15 2003 Phil Knirsch <pknirsch@redhat.com> 20020927-5
  224. - Bumped release and rebuilt
  225. * Thu May 15 2003 Phil Knirsch <pknirsch@redhat.com> 20020927-4
  226. - Fixed DNS lookup problems (#68212).
  227. - Added warning if binding problem failed on subinterface (#81640).
  228. * Tue May 13 2003 Phil Knirsch <pknirsch@redhat.com> 20020927-3
  229. - Removed bonding tarball and replaced it with ifenslave.c and README
  230. - FHS compliance for all tools, now to be found in /bin with compat symlinks to
  231. old places.
  232. * Fri Nov 29 2002 Phil Knirsch <pknirsch@redhat.com> 20020927-1
  233. - Updated to latest upstream version.
  234. * Tue Jun 18 2002 Phil Knirsch <pknirsch@redhat.com> 20020124-7
  235. - Added new BuildPreReqs for docbook-utils and perl-SGMLSpm (#66661)
  236. - Fixed ipv6 error printing problem (#66659).
  237. * Tue May 21 2002 Phil Knirsch <pknirsch@redhat.com>
  238. - Added a patch to activate the rdisc server (#64270).
  239. - Display the countermeasures warning only in verbose (#55236)
  240. * Thu Apr 18 2002 Bill Nottingham <notting@redhat.com>
  241. - quit trying to build HTML versions of the man pages
  242. * Thu Mar 14 2002 Phil Knirsch <pknirsch@redhat.com>
  243. - Added fix by Tom "spot" Callaway to fix buffer overflow problems in stats.
  244. * Wed Feb 27 2002 Phil Knirsch <pknirsch@redhat.com>
  245. - Update to iputils-ss020124.
  246. * Sat Feb 09 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 20001110-7vl2
  247. - changed Patch110 to have clear_bit() within the ipv6 source for ppc
  248. * Sun Jan 27 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 20001110-7vl1
  249. - based on 20001110-7 from Rawhide
  250. - merged Vine changes from 20001010-1vl4
  251. --- Mon Jul 16 2001 <sagami@vinelinux.org>
  252. - 20001010-1vl4
  253. - use %%{find_lang} to fix so as not to own locale dir
  254. --- Thu Jun 07 2001 <sagami@vinelinux.org>
  255. - 20001010-1vl3: rebuilt for %%{_mandir}
  256. --- Fri Oct 27 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  257. - 20001010-1vl2
  258. - remove ping6 for ppc
  259. - added Japanese summary and description
  260. --- Thu Oct 26 2000 Jun Nishii <jun@vinelinux.org>
  261. - added ja.po and nls patch
  262. * Wed Jan 09 2002 Tim Powers <timp@redhat.com>
  263. - automated rebuild
  264. * Mon Aug 27 2001 Philipp Knirsch <pknirsch@redhat.de> 20001110-6
  265. - Fixed buffer overflow problem in traceroute6.c (#51135)
  266. * Sun Jul 01 2001 Philipp Knirsch <pknirsch@redhat.de>
  267. - Made ping6 and traceroute6 setuid (safe as they drop it VERY early) (#46769)
  268. * Thu Jun 28 2001 Philipp Knirsch <pknirsch@redhat.de>
  269. - Fixed ping statistics overflow bug (#43801)
  270. * Tue Jun 26 2001 Philipp Knirsch <pknirsch@redhat.de>
  271. - Fixed a bunch of compiler warnings (#37131)
  272. - Fixed wrong exit code for no packets and deadline (#40323)
  273. - Moved arping to /sbin from /usr/sbin due to ifup call (#45785). Symlink from
  274. /usr/sbin/ provided for backwards compatibility.
  275. * Mon Apr 30 2001 Preston Brown <pbrown@redhat.com>
  276. - install in.rdisc.8c as rdisc.8
  277. * Tue Jan 16 2001 Jeff Johnson <jbj@redhat.com>
  278. - update to ss001110
  279. - doco fixes (#23844).
  280. * Sun Oct 8 2000 Jeff Johnson <jbj@redhat.com>
  281. - update to ss001007.
  282. * Tue Aug 8 2000 Tim Waugh <twaugh@redhat.com>
  283. - fix spelling mistake (#15714).
  284. * Tue Aug 8 2000 Tim Waugh <twaugh@redhat.com>
  285. - turn on -U on machines without TSC (#15223).
  286. * Tue Aug 1 2000 Jeff Johnson <jbj@redhat.com>
  287. - better doco patch (#15050).
  288. * Tue Jul 25 2000 Jakub Jelinek <jakub@redhat.com>
  289. - fix include-glibc/ to work with new glibc 2.2 resolver headers
  290. * Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
  291. - automatic rebuild
  292. * Sun Jun 18 2000 Jeff Johnson <jbj@redhat.com>
  293. - FHS packaging.
  294. - update to ss000418.
  295. - perform reverse DNS lookup only once for same input.
  296. * Sun Mar 5 2000 Jeff Johnson <jbj@redhat.com>
  297. - include README.ifenslave doco.
  298. - "ping -i N" was broke for N >= 3 (#9929).
  299. - update to ss000121:
  300. -- clockdiff: preserve raw socket errno.
  301. -- ping: change error exit code to 1 (used to be 92,93, ...)
  302. -- ping,ping6: if -w specified, transmit until -c limit is reached.
  303. -- ping,ping6: exit code non-zero if some packets not received within deadline.
  304. * Tue Feb 22 2000 Jeff Johnson <jbj@redhat.com>
  305. - man page corrections (#9690).
  306. * Wed Feb 9 2000 Jeff Johnson <jbj@jbj.org>
  307. - add ifenslave.
  308. * Thu Feb 3 2000 Elliot Lee <sopwith@redhat.com>
  309. - List /usr/sbin/rdisc in %files list.
  310. * Thu Jan 27 2000 Jeff Johnson <jbj@redhat.com>
  311. - add remaining binaries.
  312. - casts to remove compilation warnings.
  313. - terminate if -w deadline is reached exactly (#8724).
  314. * Fri Dec 24 1999 Jeff Johnson <jbj@redhat.com>
  315. - create (only ping for now, traceroute et al soon).