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