]> git.pld-linux.org Git - packages/iproute2.git/blob - iproute2.spec
- updated to 6.0.0
[packages/iproute2.git] / iproute2.spec
1 #
2 # TODO:
3 # - fix build @ uClibc
4 # - fix iface_descr patch
5 #
6 # Conditional build
7 %bcond_without  tc              # don't build tc program (it breaks static linkage)
8 %bcond_without  atm             # disable ATM support for tc
9 %bcond_with     uClibc          # do some hacks to build with uClibc
10 %bcond_with     iface_descr     # build with interface description support
11
12 Summary:        Advanced IP routing and network device configuration tools
13 Summary(es.UTF-8):      Herramientas para encaminamiento avanzado y configuración de interfaces de red
14 Summary(pl.UTF-8):      Narzędzie do konfigurowania sieci
15 Summary(pt_BR.UTF-8):   Ferramentas para roteamento avançado e configuração de interfaces de rede
16 Name:           iproute2
17 Version:        6.0.0
18 Release:        1
19 License:        GPL v2+
20 Group:          Networking/Admin
21 Source0:        https://www.kernel.org/pub/linux/utils/net/iproute2/%{name}-%{version}.tar.xz
22 # Source0-md5:  5da6cb3154ee09b9a8b4004d1c2df4cd
23 Source1:        %{name}.tmpfiles
24 Patch0:         %{name}-link.patch
25 Patch3:         %{name}-LDFLAGS.patch
26
27 Patch5:         %{name}-build.patch
28 Patch6:         %{name}-print_cache_route_entries.patch
29 # extensions
30 Patch10:        %{name}-2.2.4-wrr.patch
31 Patch11:        esfq-%{name}.patch
32 Patch12:        001-net-dev-iface-descr-0.1.diff
33 Patch14:        %{name}-q_srr.v0.4.patch
34 Patch15:        %{name}-ip_route_get.patch
35 URL:            https://wiki.linuxfoundation.org/networking/iproute2
36 BuildRequires:  bison
37 BuildRequires:  db-devel
38 # libelf
39 BuildRequires:  elfutils-devel
40 BuildRequires:  flex
41 BuildRequires:  iptables-devel >= 0:1.4.5
42 BuildRequires:  libbpf-devel >= 0.1.0
43 BuildRequires:  libbsd-devel
44 BuildRequires:  libcap-devel
45 BuildRequires:  libmnl-devel
46 BuildRequires:  libselinux-devel
47 BuildRequires:  libtirpc-devel
48 %if %{with atm}
49 BuildRequires:  linux-atm-devel
50 %endif
51 BuildRequires:  linux-libc-headers >= 7:2.6.12.0-15
52 BuildRequires:  pkgconfig
53 BuildRequires:  rpm-build >= 4.6
54 BuildRequires:  rpmbuild(macros) >= 1.673
55 BuildRequires:  sed >= 4.0
56 BuildRequires:  tar >= 1:1.22
57 BuildRequires:  xz
58 Suggests:       %{name}-routel = %{version}-%{release}
59 Suggests:       %{name}-ss = %{version}-%{release}
60 Suggests:       %{name}-tc = %{version}-%{release}
61 Obsoletes:      ifstat < 1.2
62 Obsoletes:      iproute
63 Obsoletes:      iproute2-doc < 4.14.1
64 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66 %define         _sbindir        /sbin
67 %define         _sysconfdir     /etc/iproute2
68
69 %description
70 The iproute package contains networking utilities (ip, tc and rtmon,
71 for example) which are designed to use the advanced networking
72 capabilities of the Linux 2.4.x and 2.6.x kernel.
73
74 %description -l es.UTF-8
75 Linux mantiene compatibilidad con los utilitarios estándares de
76 configuración de la red, pero se necesitan nuevos utilitarios para
77 usar los recursos y características del nuevo núcleo. Este paquete
78 incluye los nuevos utilitarios.
79
80 %description -l pl.UTF-8
81 Ten pakiet zawiera programy (m.in. ip, tc, rtmon) pozwalające na
82 kontrolę routingu i innych aspektów dotyczących sieci z wykorzystaniem
83 zaawansowanych możliwości jąder Linuksa 2.4.x i 2.6.x.
84
85 %description -l pt_BR.UTF-8
86 O Linux mantém compatibilidade com os utilitários padrão de
87 configuração da rede, mas novos utilitários são necessários para fazer
88 uso das características e recursos da nova kernel. This package
89 includes the new utilities.
90
91 %package routel
92 Summary:        routel - list routes with pretty output format
93 Requires:       %{name} = %{version}-%{release}
94 Requires:       python3
95 Requires:       python3-modules
96
97 %description routel
98 The routel script will list routes in a format that some might
99 consider easier to interpret then the ip route list equivalent.
100
101 %package ss
102 Summary:        ss - another utility to investigate sockets
103
104 %description ss
105 ss is used to dump socket statistics. It allows showing information
106 similar to netstat. It can display more TCP and state information than
107 other tools.
108
109 %package tc
110 Summary:        tc - show / manipulate traffic control settings
111 Requires:       iptables-libs >= 0:1.4.5
112
113 %description tc
114 Tc is used to configure Traffic Control in the Linux kernel.
115
116 %package devel
117 Summary:        Header file for tc plugins development
118 Summary(pl.UTF-8):      Plik nagłówkowy do tworzenia wtyczek programu tc
119 Group:          Development/Libraries
120 # doesn't require base
121
122 %description devel
123 Header file for tc plugins development.
124
125 %description devel -l pl.UTF-8
126 Plik nagłówkowy do tworzenia wtyczek programu tc.
127
128 %package -n libnetlink-devel
129 Summary:        Library for the netlink interface
130 Summary(pl.UTF-8):      Biblioteka do interfejsu netlink
131 Group:          Development/Libraries
132
133 %description -n libnetlink-devel
134 This library provides an interface for kernel-user netlink interface.
135
136 %description -n libnetlink-devel -l pl.UTF-8
137 Ta biblioteka udostępnia interfejs do interfejsu netlink między jądrem
138 a przestrzenią użytkownika.
139
140 %package -n bash-completion-iproute2
141 Summary:        Bash completion for iproute2 commands
142 Summary(pl.UTF-8):      Bashowe dopełnianie parametrów poleceń iproute2
143 Group:          Applications/Shells
144 Requires:       %{name} = %{version}-%{release}
145 Requires:       bash-completion >= 2.0
146 BuildArch:      noarch
147
148 %description -n bash-completion-iproute2
149 Bash completion for iproute2 commands (currently devlink and tc).
150
151 %description -n bash-completion-iproute2 -l pl.UTF-8
152 Bashowe dopełnianie parametrów poleceń iproute2 (obecnie devlink i
153 tc).
154
155 %prep
156 %setup -q
157
158 # conflict with atm-vbr patched linux-libc-headers
159 %{__rm} include/uapi/linux/atm.h
160
161 %patch0 -p1
162 %patch3 -p1
163
164 %patch5 -p1
165 %patch6 -p1
166 # extensions:
167 %patch10 -p1
168 %patch11 -p1
169 %{?with_iface_descr:%patch12 -p1}
170 %patch14 -p1
171 %patch15 -p1
172
173 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' ip/routel
174
175 %build
176 %{__make} \
177 %if %{with uClibc}
178         CC="%{_target_cpu}-uclibc-gcc" \
179         LD="%{_target_cpu}-uclibc-gcc" \
180 %else
181         CC="%{__cc}" \
182         LD="%{__cc}" \
183 %endif
184         HOSTCC="%{__cc}" \
185         CCOPTS="%{rpmcflags} %{rpmcppflags} -Wno-unused-result -DXT_LIB_DIR=\\\"%{_libdir}/xtables\\\"" \
186         LDFLAGS="%{rpmldflags} -Wl,-export-dynamic" \
187         LIBDIR=%{_libdir} \
188         %{!?with_tc:SUBDIRS="lib ip misc"} \
189         V=1
190
191 # make sure we don't produce broken ip binary
192 ./ip/ip link add type vlan help 2>&1 | grep -q "VLANID :=" || exit 1
193
194 %install
195 rm -rf $RPM_BUILD_ROOT
196 install -d $RPM_BUILD_ROOT{%{_includedir},/var/run/netns,%{systemdtmpfilesdir}}
197
198 %{__make} install \
199         LIBDIR=%{_libdir} \
200         DESTDIR=$RPM_BUILD_ROOT
201
202 # omitted by make install
203 install -Dp man/man7/tc-hfsc.7 $RPM_BUILD_ROOT%{_mandir}/man7/tc-hfsc.7
204
205 # arpd is not packaged here
206 %{__rm} $RPM_BUILD_ROOT%{_sbindir}/arpd $RPM_BUILD_ROOT%{_mandir}/man8/arpd.8
207
208 cp -p lib/libnetlink.a $RPM_BUILD_ROOT%{_libdir}
209 cp -p include/libnetlink.h $RPM_BUILD_ROOT%{_includedir}
210
211 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
212
213 %clean
214 rm -rf $RPM_BUILD_ROOT
215
216 %files
217 %defattr(644,root,root,755)
218 %doc README doc/actions examples
219 %attr(755,root,root) %{_sbindir}/bridge
220 %attr(755,root,root) %{_sbindir}/ctstat
221 %attr(755,root,root) %{_sbindir}/dcb
222 %attr(755,root,root) %{_sbindir}/devlink
223 %attr(755,root,root) %{_sbindir}/genl
224 %attr(755,root,root) %{_sbindir}/ifstat
225 %attr(755,root,root) %{_sbindir}/ip
226 %attr(755,root,root) %{_sbindir}/lnstat
227 %attr(755,root,root) %{_sbindir}/nstat
228 %attr(755,root,root) %{_sbindir}/rdma
229 %attr(755,root,root) %{_sbindir}/rtacct
230 %attr(755,root,root) %{_sbindir}/rtmon
231 %attr(755,root,root) %{_sbindir}/rtstat
232 %attr(755,root,root) %{_sbindir}/tipc
233 %attr(755,root,root) %{_sbindir}/vdpa
234 %dir %{_sysconfdir}
235 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bpf_pinning
236 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ematch_map
237 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/group
238 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nl_protos
239 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_dsfield
240 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_protos
241 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_realms
242 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_scopes
243 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_tables
244 %{_mandir}/man8/bridge.8*
245 %{_mandir}/man8/ctstat.8*
246 %{_mandir}/man8/dcb.8*
247 %{_mandir}/man8/dcb-app.8*
248 %{_mandir}/man8/dcb-buffer.8*
249 %{_mandir}/man8/dcb-dcbx.8*
250 %{_mandir}/man8/dcb-ets.8*
251 %{_mandir}/man8/dcb-maxrate.8*
252 %{_mandir}/man8/dcb-pfc.8*
253 %{_mandir}/man8/devlink.8*
254 %{_mandir}/man8/devlink-dev.8*
255 %{_mandir}/man8/devlink-dpipe.8*
256 %{_mandir}/man8/devlink-health.8*
257 %{_mandir}/man8/devlink-lc.8*
258 %{_mandir}/man8/devlink-monitor.8*
259 %{_mandir}/man8/devlink-port.8*
260 %{_mandir}/man8/devlink-rate.8*
261 %{_mandir}/man8/devlink-region.8*
262 %{_mandir}/man8/devlink-resource.8*
263 %{_mandir}/man8/devlink-sb.8*
264 %{_mandir}/man8/devlink-trap.8*
265 %{_mandir}/man8/genl.8*
266 %{_mandir}/man8/ifstat.8*
267 %{_mandir}/man8/ip.8*
268 %{_mandir}/man8/ip-*.8*
269 %{_mandir}/man8/lnstat.8*
270 %{_mandir}/man8/nstat.8*
271 %{_mandir}/man8/rdma.8*
272 %{_mandir}/man8/rdma-dev.8*
273 %{_mandir}/man8/rdma-link.8*
274 %{_mandir}/man8/rdma-resource.8*
275 %{_mandir}/man8/rdma-statistic.8*
276 %{_mandir}/man8/rdma-system.8*
277 %{_mandir}/man8/rtacct.8*
278 %{_mandir}/man8/rtmon.8*
279 %{_mandir}/man8/rtstat.8*
280 %{_mandir}/man8/tipc.8*
281 %{_mandir}/man8/tipc-*.8*
282 %{_mandir}/man8/vdpa.8*
283 %{_mandir}/man8/vdpa-dev.8*
284 %{_mandir}/man8/vdpa-mgmtdev.8*
285 %{systemdtmpfilesdir}/%{name}.conf
286 %dir %attr(750,root,root) /var/run/netns
287
288 %files routel
289 %defattr(644,root,root,755)
290 %attr(755,root,root) %{_sbindir}/routel
291 %{_mandir}/man8/routel.8*
292
293 %files ss
294 %defattr(644,root,root,755)
295 %attr(755,root,root) %{_sbindir}/ss
296 %{_mandir}/man8/ss.8*
297
298 %if %{with tc}
299 %files tc
300 %defattr(644,root,root,755)
301 %attr(755,root,root) %{_sbindir}/tc
302 %dir %{_libdir}/tc
303 %attr(755,root,root) %{_libdir}/tc/*.so
304 %{_libdir}/tc/*.dist
305 %{_mandir}/man7/tc-hfsc.7*
306 %{_mandir}/man8/tc.8*
307 %{_mandir}/man8/tc-*.8*
308 %endif
309
310 %files devel
311 %defattr(644,root,root,755)
312 %{_includedir}/iproute2
313
314 %files -n libnetlink-devel
315 %defattr(644,root,root,755)
316 %{_libdir}/libnetlink.a
317 %{_includedir}/libnetlink.h
318 %{_mandir}/man3/libnetlink.3*
319
320 %files -n bash-completion-iproute2
321 %defattr(644,root,root,755)
322 %{bash_compdir}/devlink
323 %{bash_compdir}/tc
This page took 0.192902 seconds and 3 git commands to generate.