source: projects/specs/trunk/i/iputils/iputils-vl.spec @ 12522

Revision 12522, 12.4 KB checked in by tomop, 3 years ago (diff)

updated 16 packages

SDL2-2.0.14-1

gmp-6.2.1-1

gnupg2-2.2.27-1

gnutls-3.7.0-1

golang-1.15.7-1

iputils-20210202-1

libassuan-2.5.4-1

libgcrypt-1.9.1-1

libgpg-error-1.41-1

libksba-1.5.0-1

libusb1-1.0.24-1

nettle-3.7-1

npth-1.6-2

pcsc-lite-1.9.0-1

python3-3.8.7-1

tcpdump-4.9.3-2

Line 
1%bcond_with systemd
2
3Summary: Network monitoring tools including ping.
4Summary(ja): ping 等のネットワークモニタツール集
5Name: iputils
6Version: 20210202
7Release: 1%{?_dist_release}%{?with_systemd:.systemd}
8Group: network
9Vendor: Project Vine
10Distribution: Vine Linux
11
12# some parts are under the original BSD (ping.c)
13# some are under GPLv2+ (tracepath.c)
14License: BSD and GPLv2+
15URL: https://github.com/iputils/iputils
16Source0: https://github.com/iputils/iputils/archive/%{version}.tar.gz#/%{name}-s%{version}.tar.gz
17Source1: ifenslave.tar.gz
18Source3: rdisc.initd
19Source5: rdisc.sysconfig
20Source6: ninfod.initd
21Source7: ninfod.sysconfig
22
23Source10: bsd.txt
24Source11: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
25
26Patch1: iputils-ifenslave.patch
27
28# Vine Source(s)/Patch(es)
29
30BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
31BuildRequires: docbook-utils perl-SGMLSpm
32BuildRequires: glibc-kernheaders >= 2.4-8.19
33BuildRequires: libidn2-devel
34BuildRequires: openssl-devel
35BuildRequires: libcap-devel
36BuildRequires: libxslt
37BuildRequires: docbook5-style-xsl
38BuildRequires: meson
39%if %{with systemd}
40%{?systemd_requires}
41%else
42Requires(post): chkconfig
43Requires(preun): chkconfig
44Requires(preun): initscripts
45Requires(postun): initscripts
46%endif
47
48%description
49The iputils package contains basic utilities for monitoring a network,
50including ping. The ping command sends a series of ICMP protocol
51ECHO_REQUEST packets to a specified network host to discover whether
52the 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
61cp %{SOURCE10} %{SOURCE11} .
62
63%patch1 -p1
64
65
66%build
67%ifarch s390 s390x
68export CFLAGS="$RPM_OPT_FLAGS -fPIE"
69%else
70export CFLAGS="$RPM_OPT_FLAGS -fpie"
71%endif
72export 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
83gcc -Wall $RPM_OPT_FLAGS $CFLAGS $LDFLAGS ifenslave.c -o ifenslave
84
85
86%install
87rm -rf %{buildroot}
88
89mkdir -p %{buildroot}%{_bindir}
90mkdir -p %{buildroot}%{_sbindir}
91mkdir -p %{buildroot}/{bin,sbin}
92mkdir -p $buildroot%{_sysconfdir}/sysconfig
93
94pushd %{_target_platform}
95install -c clockdiff            %{buildroot}%{_sbindir}/
96install -cp arping              %{buildroot}/sbin/
97ln -s /sbin/arping              %{buildroot}%{_sbindir}/arping
98install -cp ping/ping           %{buildroot}/bin/
99install -cp ../ifenslave                %{buildroot}/sbin/
100install -cp rdisc               %{buildroot}/sbin/
101install -cp tracepath           %{buildroot}/bin/
102install -cp ninfod/ninfod       %{buildroot}/sbin/
103
104ln -sf /bin/ping %{buildroot}%{_sbindir}
105ln -sf /bin/ping %{buildroot}%{_sbindir}/ping6
106ln -sf /bin/tracepath %{buildroot}%{_sbindir}
107ln -sf /bin/tracepath %{buildroot}%{_sbindir}/tracepath6
108
109mkdir -p %{buildroot}%{_mandir}/man8
110install -cp doc/clockdiff.8     %{buildroot}%{_mandir}/man8/
111install -cp doc/arping.8        %{buildroot}%{_mandir}/man8/
112install -cp doc/ping.8          %{buildroot}%{_mandir}/man8/
113install -cp doc/rdisc.8         %{buildroot}%{_mandir}/man8/
114install -cp doc/tracepath.8     %{buildroot}%{_mandir}/man8/
115install -cp doc/ninfod.8        %{buildroot}%{_mandir}/man8/
116install -cp ../ifenslave.8              %{buildroot}%{_mandir}/man8/
117ln -s ping.8.gz %{buildroot}%{_mandir}/man8/ping6.8.gz
118ln -s tracepath.8.gz %{buildroot}%{_mandir}/man8/tracepath6.8.gz
119
120install -dp %{buildroot}%{_datadir}/locale/ja/LC_MESSAGES
121install -m 644 po/ja.gmo %{buildroot}%{_datadir}/locale/ja/LC_MESSAGES/iputils.mo
122popd
123
124find %{buildroot}%{_mandir} -type f | xargs chmod 644
125
126%if %{with systemd}
127install -Dpm644 %{_target_platform}/rdisc.service %{buildroot}%{_unitdir}/rdisc.service
128install -Dpm644 %{_target_platform}/ninfod/ninfod.service %{buildroot}%{_unitdir}/ninfod.service
129sed -i -e 's|%{_sbindir}/|/sbin/|' %{buildroot}%{_unitdir}/*
130%else
131install -dp %{buildroot}%{_sysconfdir}/rc.d/init.d
132install -m 755 -p %{SOURCE3} %{buildroot}%{_sysconfdir}/rc.d/init.d/rdisc
133install -m 755 -p %{SOURCE6} %{buildroot}%{_sysconfdir}/rc.d/init.d/ninfod
134%endif
135
136install -Dpm644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/rdisc
137install -Dpm644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/ninfod
138
139%find_lang %{name}
140
141
142%clean
143rm -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
158if [ $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
163fi
164%endif
165
166%postun
167%if %{with systemd}
168%systemd_postun_with_restart rdisc.service ninfod.service
169%else
170if [ "$1" -ge "1" ]; then
171    service rdisc condrestart >/dev/null 2>&1 || :
172    service ninfod condrestart >/dev/null 2>&1 || :
173fi
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).
Note: See TracBrowser for help on using the repository browser.