]>
Commit | Line | Data |
---|---|---|
4d4e8753 | 1 | # |
0a1f6d9e | 2 | # TODO: |
6f4820ce ER |
3 | # - fix build @ uClibc |
4 | # - fix iface_descr patch | |
0a1f6d9e | 5 | # |
4d4e8753 | 6 | # Conditional build |
c2f906a7 PS |
7 | %bcond_without doc # don't build documentation |
8 | %bcond_without tc # don't build tc program (it breaks static linkage) | |
3679d517 | 9 | %bcond_without atm # disable ATM support for tc |
c2f906a7 | 10 | %bcond_with uClibc # do some hacks to build with uClibc |
6f4820ce ER |
11 | %bcond_with iface_descr # build with interface description support |
12 | ||
9fc1dfd7 | 13 | Summary: Advanced IP routing and network device configuration tools |
d2344512 | 14 | Summary(es.UTF-8): Herramientas para encaminamiento avanzado y configuración de interfaces de red |
3679d517 | 15 | Summary(pl.UTF-8): Narzędzie do konfigurowania sieci |
d2344512 | 16 | Summary(pt_BR.UTF-8): Ferramentas para roteamento avançado e configuração de interfaces de rede |
354f4215 | 17 | Name: iproute2 |
aca0174e JB |
18 | Version: 4.6.0 |
19 | Release: 1 | |
3679d517 | 20 | License: GPL v2+ |
354f4215 | 21 | Group: Networking/Admin |
bed31e25 | 22 | Source0: https://www.kernel.org/pub/linux/utils/net/iproute2/%{name}-%{version}.tar.xz |
aca0174e | 23 | # Source0-md5: d015e437e4f744d51d3a1a53341826d5 |
03b26d3c | 24 | Source1: %{name}.tmpfiles |
9b297650 | 25 | Patch0: %{name}-arp.patch |
64551ae4 | 26 | Patch1: %{name}-old-hyperref.patch |
9b297650 | 27 | Patch3: %{name}-LDFLAGS.patch |
2b81c316 | 28 | Patch4: fix-bashisms.patch |
b3946cd7 | 29 | Patch5: %{name}-build.patch |
47fff01d | 30 | Patch6: %{name}-print_cache_route_entries.patch |
207621e4 | 31 | # extensions |
af6313ca | 32 | Patch10: %{name}-2.2.4-wrr.patch |
00a4c5cb | 33 | Patch11: esfq-%{name}.patch |
91d521f5 | 34 | Patch12: 001-net-dev-iface-descr-0.1.diff |
99e81fa6 | 35 | Patch13: %{name}-q_atm_c.patch |
8f6469c2 | 36 | Patch14: %{name}-q_srr.v0.4.patch |
26ae64ee | 37 | Patch15: %{name}-ip_route_get.patch |
e4e29140 | 38 | URL: http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2 |
4ef82693 | 39 | BuildRequires: bison |
4c573c73 | 40 | BuildRequires: db-devel |
aca0174e JB |
41 | # libelf |
42 | BuildRequires: elfutils-devel | |
e3fc76c4 | 43 | BuildRequires: flex |
fa272163 | 44 | BuildRequires: iptables-devel >= 0:1.4.5 |
aca0174e JB |
45 | BuildRequires: libmnl-devel |
46 | BuildRequires: libselinux-devel | |
d072516f | 47 | %if %{with atm} |
76ab126a | 48 | BuildRequires: linux-atm-devel |
d072516f | 49 | %endif |
1525a420 | 50 | BuildRequires: linux-libc-headers >= 7:2.6.12.0-15 |
aca0174e JB |
51 | BuildRequires: pkgconfig |
52 | BuildRequires: rpmbuild(macros) >= 1.673 | |
61f3b6a3 PS |
53 | %if %{with doc} |
54 | BuildRequires: psutils | |
55 | BuildRequires: sgml-tools | |
38a6c613 | 56 | BuildRequires: texlive-dvips |
57 | BuildRequires: texlive-fonts-cmsuper | |
58 | BuildRequires: texlive-fonts-jknappen | |
59 | BuildRequires: texlive-latex | |
64551ae4 | 60 | BuildRequires: texlive-latex-booktabs |
38a6c613 | 61 | BuildRequires: texlive-tex-babel |
61f3b6a3 | 62 | %endif |
fa272163 | 63 | Requires: iptables-libs >= 0:1.4.5 |
b84ea0a7 | 64 | Obsoletes: ifstat |
e1c03590 | 65 | Obsoletes: iproute |
4c4edaba | 66 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
8ca003ed | 67 | |
9ea83253 | 68 | %define _sbindir /sbin |
69 | %define _sysconfdir /etc/iproute2 | |
c2827c7c | 70 | |
8ca003ed | 71 | %description |
0d5db0b4 JB |
72 | The iproute package contains networking utilities (ip, tc and rtmon, |
73 | for example) which are designed to use the advanced networking | |
6f4820ce | 74 | capabilities of the Linux 2.4.x and 2.6.x kernel. |
e316d7c9 | 75 | |
70fcbc5f JR |
76 | %description -l es.UTF-8 |
77 | Linux mantiene compatibilidad con los utilitarios estándares de | |
78 | configuración de la red, pero se necesitan nuevos utilitarios para | |
79 | usar los recursos y características del nuevo núcleo. Este paquete | |
e316d7c9 | 80 | incluye los nuevos utilitarios. |
323e0978 | 81 | |
70fcbc5f | 82 | %description -l pl.UTF-8 |
0d5db0b4 JB |
83 | Ten pakiet zawiera programy (m.in. ip, tc, rtmon) pozwalające na |
84 | kontrolę routingu i innych aspektów dotyczących sieci z wykorzystaniem | |
85 | zaawansowanych możliwości jąder Linuksa 2.4.x i 2.6.x. | |
e316d7c9 | 86 | |
70fcbc5f JR |
87 | %description -l pt_BR.UTF-8 |
88 | O Linux mantém compatibilidade com os utilitários padrão de | |
89 | configuração da rede, mas novos utilitários são necessários para fazer | |
90 | uso das características e recursos da nova kernel. This package | |
e316d7c9 | 91 | includes the new utilities. |
323e0978 | 92 | |
49c78676 JK |
93 | %package -n libnetlink-devel |
94 | Summary: Library for the netlink interface | |
d2344512 | 95 | Summary(pl.UTF-8): Biblioteka do interfejsu netlink |
49c78676 JK |
96 | Group: Development/Libraries |
97 | ||
98 | %description -n libnetlink-devel | |
99 | This library provides an interface for kernel-user netlink interface. | |
100 | ||
70fcbc5f JR |
101 | %description -n libnetlink-devel -l pl.UTF-8 |
102 | Ta biblioteka udostępnia interfejs do interfejsu netlink między jądrem | |
103 | a przestrzenią użytkownika. | |
a52556c3 | 104 | |
9fc1dfd7 ER |
105 | %package doc |
106 | Summary: ip and tc documentation with examples | |
3679d517 | 107 | Summary(pl.UTF-8): Dokumentacja do ip i tc z przykładami |
9fc1dfd7 ER |
108 | License: GPL v2+ |
109 | Group: Applications/System | |
110 | ||
111 | %description doc | |
112 | The iproute documentation contains howtos and examples of settings. | |
113 | ||
3679d517 JB |
114 | %description doc -l pl.UTF-8 |
115 | Dokumentacja do iproute zawiera "howto" oraz przykłady ustawień. | |
116 | ||
aca0174e JB |
117 | %package -n bash-completion-iproute2 |
118 | Summary: Bash completion for iproute2 commands | |
119 | Summary(pl.UTF-8): Bashowe dopełnianie parametrów poleceń iproute2 | |
120 | Group: Applications/Shells | |
121 | Requires: %{name} = %{version}-%{release} | |
122 | Requires: bash-completion >= 2.0 | |
123 | ||
124 | %description -n bash-completion-iproute2 | |
125 | Bash completion for iproute2 commands (currently only tc). | |
126 | ||
127 | %description -n bash-completion-iproute2 -l pl.UTF-8 | |
128 | Bashowe dopełnianie parametrów poleceń iproute2 (obecnie tylko tc). | |
129 | ||
8ca003ed | 130 | %prep |
7e3e3f9a | 131 | %setup -q |
36f42953 | 132 | |
9b297650 JB |
133 | # conflict with atm-vbr patched linux-libc-headers |
134 | %{__rm} include/linux/atm.h | |
135 | #%{__rm} -r include/linux | |
136 | ||
137 | %patch0 -p1 | |
9b297650 | 138 | %patch1 -p1 |
9b297650 | 139 | %patch3 -p1 |
2b81c316 | 140 | %patch4 -p1 |
b3946cd7 | 141 | %patch5 -p1 |
47fff01d | 142 | %patch6 -p1 |
91d521f5 | 143 | # extensions: |
6234a9fe | 144 | %patch10 -p1 |
039e8f2b | 145 | %patch11 -p1 |
6f4820ce | 146 | %{?with_iface_descr:%patch12 -p1} |
99e81fa6 | 147 | %patch13 -p0 |
8f6469c2 | 148 | %patch14 -p1 |
26ae64ee | 149 | %patch15 -p1 |
d1f6ab22 | 150 | |
8ca003ed | 151 | %build |
dd97cf21 | 152 | %{__make} \ |
93591f64 | 153 | %if %{with uClibc} |
154 | CC="%{_target_cpu}-uclibc-gcc" \ | |
155 | LD="%{_target_cpu}-uclibc-gcc" \ | |
156 | %else | |
157 | CC="%{__cc}" \ | |
158 | LD="%{__cc}" \ | |
159 | %endif | |
f2b536a2 | 160 | HOSTCC="%{__cc}" \ |
64551ae4 | 161 | CCOPTS="%{rpmcflags} %{rpmcppflags} -Wno-unused-result -DXT_LIB_DIR=\\\"%{_libdir}/xtables\\\"" \ |
4e7688ae | 162 | LDFLAGS="%{rpmldflags} -Wl,-export-dynamic" \ |
e7a772a9 | 163 | LIBDIR=%{_libdir} \ |
93591f64 | 164 | %{!?with_tc:SUBDIRS="lib ip misc"} |
207621e4 | 165 | |
1b109167 | 166 | %{?with_doc:%{__make} -C doc} |
8ca003ed | 167 | |
5e896a68 AM |
168 | # make sure we don't produce broken ip binary |
169 | ./ip/ip link add type vlan help 2>&1 | grep -q "VLANID :=" || exit 1 | |
170 | ||
8ca003ed AM |
171 | %install |
172 | rm -rf $RPM_BUILD_ROOT | |
32443dcd | 173 | install -d $RPM_BUILD_ROOT{%{_includedir},/var/run/netns,%{systemdtmpfilesdir}} |
c2884fcb AM |
174 | |
175 | %{__make} install \ | |
176 | LIBDIR=%{_libdir} \ | |
177 | DESTDIR=$RPM_BUILD_ROOT | |
178 | ||
1f99b759 JB |
179 | # omitted by make install |
180 | install -Dp man/man7/tc-hfsc.7 $RPM_BUILD_ROOT%{_mandir}/man7/tc-hfsc.7 | |
181 | ||
fa272163 | 182 | # arpd is not packaged here |
c2884fcb | 183 | %{__rm} $RPM_BUILD_ROOT%{_sbindir}/arpd $RPM_BUILD_ROOT%{_mandir}/man8/arpd.8 |
0a1f6d9e | 184 | |
32443dcd ER |
185 | cp -p lib/libnetlink.a $RPM_BUILD_ROOT%{_libdir} |
186 | cp -p include/libnetlink.h $RPM_BUILD_ROOT%{_includedir} | |
187 | ||
188 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf | |
354f4215 | 189 | |
9fc1dfd7 ER |
190 | %if %{with doc} |
191 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
192 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
193 | %endif | |
194 | ||
f6154b08 JB |
195 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/iproute2 |
196 | ||
8ca003ed AM |
197 | %clean |
198 | rm -rf $RPM_BUILD_ROOT | |
199 | ||
200 | %files | |
201 | %defattr(644,root,root,755) | |
4a1111f1 | 202 | %doc README README.decnet README.iproute2+tc README.distribution README.lnstat |
c2884fcb | 203 | %attr(755,root,root) %{_sbindir}/bridge |
a7f458f6 | 204 | %attr(755,root,root) %{_sbindir}/ctstat |
aca0174e | 205 | %attr(755,root,root) %{_sbindir}/devlink |
c2884fcb AM |
206 | %attr(755,root,root) %{_sbindir}/genl |
207 | %attr(755,root,root) %{_sbindir}/ifcfg | |
e1c03590 ER |
208 | %attr(755,root,root) %{_sbindir}/ifstat |
209 | %attr(755,root,root) %{_sbindir}/ip | |
210 | %attr(755,root,root) %{_sbindir}/lnstat | |
211 | %attr(755,root,root) %{_sbindir}/nstat | |
c2884fcb | 212 | %attr(755,root,root) %{_sbindir}/routef |
e1c03590 ER |
213 | %attr(755,root,root) %{_sbindir}/routel |
214 | %attr(755,root,root) %{_sbindir}/rtacct | |
215 | %attr(755,root,root) %{_sbindir}/rtmon | |
c2884fcb | 216 | %attr(755,root,root) %{_sbindir}/rtpr |
a7f458f6 | 217 | %attr(755,root,root) %{_sbindir}/rtstat |
e1c03590 | 218 | %attr(755,root,root) %{_sbindir}/ss |
6bbfa630 | 219 | %attr(755,root,root) %{_sbindir}/tipc |
dd519f44 | 220 | %dir %{_sysconfdir} |
64551ae4 | 221 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bpf_pinning |
c2884fcb AM |
222 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ematch_map |
223 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/group | |
03b26d3c | 224 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nl_protos |
c2884fcb | 225 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_dsfield |
e1c03590 ER |
226 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_protos |
227 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_realms | |
228 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_scopes | |
229 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_tables | |
a0cc6116 | 230 | %{_mandir}/man8/bridge.8* |
3679d517 | 231 | %{_mandir}/man8/ip.8* |
4ca3a812 | 232 | %{_mandir}/man8/ip-*.8* |
a7f458f6 | 233 | %{_mandir}/man8/ctstat.8* |
3679d517 | 234 | %{_mandir}/man8/lnstat.8* |
2dffe0e0 AM |
235 | %{_mandir}/man8/nstat.8* |
236 | %{_mandir}/man8/routef.8* | |
3679d517 JB |
237 | %{_mandir}/man8/routel.8* |
238 | %{_mandir}/man8/rtacct.8* | |
239 | %{_mandir}/man8/rtmon.8* | |
215c2053 | 240 | %{_mandir}/man8/rtpr.8* |
a7f458f6 | 241 | %{_mandir}/man8/rtstat.8* |
3679d517 | 242 | %{_mandir}/man8/ss.8* |
215c2053 AO |
243 | %{_mandir}/man8/tipc.8* |
244 | %{_mandir}/man8/tipc-*.8* | |
9fc1dfd7 | 245 | %if %{with tc} |
3679d517 | 246 | %attr(755,root,root) %{_sbindir}/tc |
9fc1dfd7 ER |
247 | %dir %{_libdir}/tc |
248 | %attr(755,root,root) %{_libdir}/tc/*.so | |
c2884fcb | 249 | %{_libdir}/tc/*.dist |
1f99b759 | 250 | %{_mandir}/man7/tc-hfsc.7* |
3679d517 JB |
251 | %{_mandir}/man8/tc.8* |
252 | %{_mandir}/man8/tc-*.8* | |
9fc1dfd7 | 253 | %endif |
32443dcd ER |
254 | %{systemdtmpfilesdir}/%{name}.conf |
255 | %dir %attr(750,root,root) /var/run/netns | |
49c78676 JK |
256 | |
257 | %files -n libnetlink-devel | |
258 | %defattr(644,root,root,755) | |
c529e3fb JB |
259 | %{_libdir}/libnetlink.a |
260 | %{_includedir}/libnetlink.h | |
e1c03590 | 261 | %{_mandir}/man3/libnetlink.3* |
9fc1dfd7 ER |
262 | |
263 | %if %{with doc} | |
264 | %files doc | |
265 | %defattr(644,root,root,755) | |
4ca3a812 | 266 | %doc doc/*.ps |
9fc1dfd7 ER |
267 | %{_examplesdir}/%{name}-%{version} |
268 | %endif | |
aca0174e JB |
269 | |
270 | %files -n bash-completion-iproute2 | |
271 | %defattr(644,root,root,755) | |
272 | %{bash_compdir}/tc |