1 |
%define version 20101006 |
2 |
%define distname %{name}-s%{version} |
3 |
|
4 |
Summary: Network monitoring tools including ping |
5 |
Name: iputils |
6 |
Version: %{version} |
7 |
Release: %mkrel 3 |
8 |
License: BSD |
9 |
Group: System/Base |
10 |
URL: http://linux-net.osdl.org/index.php/Iputils |
11 |
Source0: http://www.skbuff.net/iputils/%{distname}.tar.bz2 |
12 |
# ifenslave.c seems to come from linux-2.6.25/Documentation/networking/ifenslave.c |
13 |
Source1: ifenslave.c |
14 |
# bonding.txt seems to come from linux-2.6.25/Documentation/networking/bonding.txt |
15 |
Source2: bonding.txt |
16 |
Source3: ifenslave.8 |
17 |
Source4: bin.ping.apparmor |
18 |
Patch0: iputils-s20070202-s_addr.patch |
19 |
|
20 |
Patch2: iputils-s20070202-ping_sparcfix.patch |
21 |
Patch3: iputils-s20070202-rdisc-server.patch |
22 |
# change the verbosity of a error message |
23 |
Patch4: iputils-20020124-countermeasures.patch |
24 |
# add a cache to ping address resolution, should be sent upstream |
25 |
Patch6: iputils-20020927-addrcache.patch |
26 |
Patch7: iputils-20020927-ping-subint.patch |
27 |
Patch9: iputils-ifenslave.patch |
28 |
Patch10: iputils-s20100418-arping-infiniband.patch |
29 |
Patch11: iputils-s20100418-idn.patch |
30 |
Patch12: iputils-20070202-traffic_class.patch |
31 |
Patch13: iputils-s20100418-arping_timeout.patch |
32 |
Patch14: iputils-20071127-output.patch |
33 |
Patch15: iputils-s20100418-ia64_align.patch |
34 |
Patch16: iputils-20071127-warnings.patch |
35 |
Patch17: iputils-s20071127-format_not_a_string_literal_and_no_format_arguments.diff |
36 |
Patch19: iputils-s20100418-icmp_return_messages.patch |
37 |
Patch20: iputils-s20100418-fix_ping_stats_for_dead_hosts.patch |
38 |
Patch21: iputils-s20100418-addoptlags.patch |
39 |
BuildRequires: docbook-dtd31-sgml |
40 |
BuildRequires: libidn-devel |
41 |
BuildRequires: libsysfs-devel |
42 |
BuildRequires: perl-SGMLSpm |
43 |
BuildRequires: openssl-devel |
44 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
45 |
|
46 |
%description |
47 |
The iputils package contains ping, a basic networking tool. The ping command |
48 |
sends a series of ICMP protocol ECHO_REQUEST packets to a specified network |
49 |
host and can tell you if that machine is alive and receiving network traffic. |
50 |
|
51 |
%prep |
52 |
|
53 |
%setup -q -n %{distname} |
54 |
|
55 |
cp %{SOURCE1} . |
56 |
cp %{SOURCE2} . |
57 |
cp %{SOURCE3} . |
58 |
|
59 |
%patch0 -p0 -b .s_addr |
60 |
%patch2 -p1 -b .ping_sparcfix |
61 |
%patch3 -p1 -b .rdisc-server |
62 |
%patch4 -p1 -b .counter |
63 |
%patch6 -p1 -b .addrcache |
64 |
%patch7 -p1 -b .ping-subint |
65 |
%patch9 -p1 -b .addr |
66 |
%patch10 -p1 -b .infiniband |
67 |
%patch11 -p1 -b .idn |
68 |
%patch12 -p1 -b .traffic_class |
69 |
#%patch13 -p1 -b .arping_timeout |
70 |
#%patch14 -p1 -b .output |
71 |
%patch15 -p1 -b .ia64_align |
72 |
%patch17 -p1 -b .format_not_a_string_literal_and_no_format_arguments |
73 |
%patch19 -p1 -b .icmp_return_messages |
74 |
%patch20 -p1 -b .dead-hosts |
75 |
%patch21 -p1 -b .optflags |
76 |
|
77 |
%build |
78 |
%serverbuild |
79 |
perl -pi -e 's!\$\(MAKE\) -C doc html!!g' Makefile |
80 |
%make IDN="yes" OPTFLAGS="%{optflags} -fno-strict-aliasing" |
81 |
%make ifenslave CFLAGS="%{optflags}" |
82 |
|
83 |
make man |
84 |
|
85 |
%install |
86 |
rm -rf %{buildroot} |
87 |
|
88 |
install -d %{buildroot}%{_sbindir} |
89 |
install -d %{buildroot}%{_bindir} |
90 |
install -d %{buildroot}/{bin,sbin} |
91 |
install -d %{buildroot}%{_mandir}/man8 |
92 |
|
93 |
install -c clockdiff %{buildroot}%{_sbindir}/ |
94 |
|
95 |
install -c arping %{buildroot}/sbin/ |
96 |
ln -s ../../sbin/arping %{buildroot}%{_sbindir}/arping |
97 |
|
98 |
install -c ping %{buildroot}/bin/ |
99 |
install -c ifenslave %{buildroot}/sbin/ |
100 |
install -c ping6 %{buildroot}%{_bindir} |
101 |
install -c rdisc %{buildroot}%{_sbindir}/ |
102 |
install -c tracepath %{buildroot}%{_sbindir}/ |
103 |
install -c tracepath6 %{buildroot}%{_sbindir}/ |
104 |
install -c traceroute6 %{buildroot}%{_sbindir}/ |
105 |
|
106 |
install -c doc/*.8 %{buildroot}%{_mandir}/man8/ |
107 |
install -c ifenslave.8 %{buildroot}%{_mandir}/man8/ |
108 |
|
109 |
# these manpages are provided by other packages |
110 |
rm -f %{buildroot}%{_mandir}/man8/rarpd.8* |
111 |
rm -f %{buildroot}%{_mandir}/man8/tftpd.8* |
112 |
|
113 |
# apparmor profile |
114 |
mkdir -p %{buildroot}%{_sysconfdir}/apparmor.d/ |
115 |
install -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/apparmor.d/bin.ping |
116 |
|
117 |
%posttrans |
118 |
# if we have apparmor installed, reload if it's being used |
119 |
if [ -x /sbin/apparmor_parser ]; then |
120 |
/sbin/service apparmor condreload |
121 |
fi |
122 |
|
123 |
%clean |
124 |
rm -rf %{buildroot} |
125 |
|
126 |
%files |
127 |
%defattr(-,root,root) |
128 |
%doc RELNOTES bonding.txt |
129 |
%config(noreplace) %{_sysconfdir}/apparmor.d/bin.ping |
130 |
%{_sbindir}/clockdiff |
131 |
%attr(4755,root,root) /bin/ping |
132 |
/sbin/arping |
133 |
%{_sbindir}/arping |
134 |
/sbin/ifenslave |
135 |
#%ifnarch ppc |
136 |
%attr(4755,root,root) %{_bindir}/ping6 |
137 |
%{_sbindir}/tracepath6 |
138 |
#%endif |
139 |
%{_sbindir}/tracepath |
140 |
%attr(4755,root,root) %{_sbindir}/traceroute6 |
141 |
%{_sbindir}/rdisc |
142 |
%{_mandir}/man8/* |
143 |
|
144 |
|