]> git.pld-linux.org Git - packages/iproute2.git/blob - iproute2.spec
d101c0505ef795c1adaf6a949e36b48bfd9a5e95
[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.5.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:  ae811fc51b3a2c9c7701be308152c45a
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
68 %description
69 The iproute package contains networking utilities (ip, tc and rtmon,
70 for example) which are designed to use the advanced networking
71 capabilities of the Linux 2.4.x and 2.6.x kernel.
72
73 %description -l es.UTF-8
74 Linux mantiene compatibilidad con los utilitarios estándares de
75 configuración de la red, pero se necesitan nuevos utilitarios para
76 usar los recursos y características del nuevo núcleo. Este paquete
77 incluye los nuevos utilitarios.
78
79 %description -l pl.UTF-8
80 Ten pakiet zawiera programy (m.in. ip, tc, rtmon) pozwalające na
81 kontrolę routingu i innych aspektów dotyczących sieci z wykorzystaniem
82 zaawansowanych możliwości jąder Linuksa 2.4.x i 2.6.x.
83
84 %description -l pt_BR.UTF-8
85 O Linux mantém compatibilidade com os utilitários padrão de
86 configuração da rede, mas novos utilitários são necessários para fazer
87 uso das características e recursos da nova kernel. This package
88 includes the new utilities.
89
90 %package routel
91 Summary:        routel - list routes with pretty output format
92 Requires:       %{name} = %{version}-%{release}
93 Requires:       python3
94 Requires:       python3-modules
95
96 %description routel
97 The routel script will list routes in a format that some might
98 consider easier to interpret then the ip route list equivalent.
99
100 %package ss
101 Summary:        ss - another utility to investigate sockets
102
103 %description ss
104 ss is used to dump socket statistics. It allows showing information
105 similar to netstat. It can display more TCP and state information than
106 other tools.
107
108 %package tc
109 Summary:        tc - show / manipulate traffic control settings
110 Requires:       iptables-libs >= 0:1.4.5
111
112 %description tc
113 Tc is used to configure Traffic Control in the Linux kernel.
114
115 %package devel
116 Summary:        Header file for tc plugins development
117 Summary(pl.UTF-8):      Plik nagłówkowy do tworzenia wtyczek programu tc
118 Group:          Development/Libraries
119 # doesn't require base
120
121 %description devel
122 Header file for tc plugins development.
123
124 %description devel -l pl.UTF-8
125 Plik nagłówkowy do tworzenia wtyczek programu tc.
126
127 %package -n libnetlink-devel
128 Summary:        Library for the netlink interface
129 Summary(pl.UTF-8):      Biblioteka do interfejsu netlink
130 Group:          Development/Libraries
131
132 %description -n libnetlink-devel
133 This library provides an interface for kernel-user netlink interface.
134
135 %description -n libnetlink-devel -l pl.UTF-8
136 Ta biblioteka udostępnia interfejs do interfejsu netlink między jądrem
137 a przestrzenią użytkownika.
138
139 %package -n bash-completion-iproute2
140 Summary:        Bash completion for iproute2 commands
141 Summary(pl.UTF-8):      Bashowe dopełnianie parametrów poleceń iproute2
142 Group:          Applications/Shells
143 Requires:       %{name} = %{version}-%{release}
144 Requires:       bash-completion >= 1:2.0
145 BuildArch:      noarch
146
147 %description -n bash-completion-iproute2
148 Bash completion for iproute2 commands (currently devlink and tc).
149
150 %description -n bash-completion-iproute2 -l pl.UTF-8
151 Bashowe dopełnianie parametrów poleceń iproute2 (obecnie devlink i
152 tc).
153
154 %prep
155 %setup -q
156
157 # conflict with atm-vbr patched linux-libc-headers
158 %{__rm} include/uapi/linux/atm.h
159
160 %patch0 -p1
161 %patch3 -p1
162
163 %patch5 -p1
164 %patch6 -p1
165 # extensions:
166 %patch10 -p1
167 %patch11 -p1
168 %{?with_iface_descr:%patch12 -p1}
169 %patch14 -p1
170 %patch15 -p1
171
172 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' ip/routel
173
174 %build
175 %{__make} \
176 %if %{with uClibc}
177         CC="%{_target_cpu}-uclibc-gcc" \
178         LD="%{_target_cpu}-uclibc-gcc" \
179 %else
180         CC="%{__cc}" \
181         LD="%{__cc}" \
182 %endif
183         HOSTCC="%{__cc}" \
184         CCOPTS="%{rpmcflags} %{rpmcppflags} -Wno-unused-result -DXT_LIB_DIR=\\\"%{_libdir}/xtables\\\"" \
185         LDFLAGS="%{rpmldflags} -Wl,-export-dynamic" \
186         LIBDIR=%{_libdir} \
187         %{!?with_tc:SUBDIRS="lib ip misc"} \
188         V=1
189
190 # make sure we don't produce broken ip binary
191 ./ip/ip link add type vlan help 2>&1 | grep -q "VLANID :=" || exit 1
192
193 %install
194 rm -rf $RPM_BUILD_ROOT
195 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/iproute2,%{_includedir},/var/run/netns,%{systemdtmpfilesdir}}
196
197 %{__make} install \
198         LIBDIR=%{_libdir} \
199         DESTDIR=$RPM_BUILD_ROOT
200
201 # omitted by make install
202 install -Dp man/man7/tc-hfsc.7 $RPM_BUILD_ROOT%{_mandir}/man7/tc-hfsc.7
203
204 # arpd is not packaged here
205 %{__rm} $RPM_BUILD_ROOT%{_sbindir}/arpd $RPM_BUILD_ROOT%{_mandir}/man8/arpd.8
206
207 cp -p lib/libnetlink.a $RPM_BUILD_ROOT%{_libdir}
208 cp -p include/libnetlink.h $RPM_BUILD_ROOT%{_includedir}
209
210 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
211
212 %clean
213 rm -rf $RPM_BUILD_ROOT
214
215 %files
216 %defattr(644,root,root,755)
217 %doc README doc/actions examples
218 %attr(755,root,root) %{_sbindir}/bridge
219 %attr(755,root,root) %{_sbindir}/ctstat
220 %attr(755,root,root) %{_sbindir}/dcb
221 %attr(755,root,root) %{_sbindir}/devlink
222 %attr(755,root,root) %{_sbindir}/genl
223 %attr(755,root,root) %{_sbindir}/ifstat
224 %attr(755,root,root) %{_sbindir}/ip
225 %attr(755,root,root) %{_sbindir}/lnstat
226 %attr(755,root,root) %{_sbindir}/nstat
227 %attr(755,root,root) %{_sbindir}/rdma
228 %attr(755,root,root) %{_sbindir}/rtacct
229 %attr(755,root,root) %{_sbindir}/rtmon
230 %attr(755,root,root) %{_sbindir}/rtstat
231 %attr(755,root,root) %{_sbindir}/tipc
232 %attr(755,root,root) %{_sbindir}/vdpa
233 # default configs
234 %{_prefix}/lib/iproute2
235 # config overrides
236 %dir %{_sysconfdir}/iproute2
237 %{_mandir}/man8/bridge.8*
238 %{_mandir}/man8/ctstat.8*
239 %{_mandir}/man8/dcb.8*
240 %{_mandir}/man8/dcb-app.8*
241 %{_mandir}/man8/dcb-apptrust.8*
242 %{_mandir}/man8/dcb-buffer.8*
243 %{_mandir}/man8/dcb-dcbx.8*
244 %{_mandir}/man8/dcb-ets.8*
245 %{_mandir}/man8/dcb-maxrate.8*
246 %{_mandir}/man8/dcb-pfc.8*
247 %{_mandir}/man8/dcb-rewr.8*
248 %{_mandir}/man8/devlink.8*
249 %{_mandir}/man8/devlink-dev.8*
250 %{_mandir}/man8/devlink-dpipe.8*
251 %{_mandir}/man8/devlink-health.8*
252 %{_mandir}/man8/devlink-lc.8*
253 %{_mandir}/man8/devlink-monitor.8*
254 %{_mandir}/man8/devlink-port.8*
255 %{_mandir}/man8/devlink-rate.8*
256 %{_mandir}/man8/devlink-region.8*
257 %{_mandir}/man8/devlink-resource.8*
258 %{_mandir}/man8/devlink-sb.8*
259 %{_mandir}/man8/devlink-trap.8*
260 %{_mandir}/man8/genl.8*
261 %{_mandir}/man8/ifstat.8*
262 %{_mandir}/man8/ip.8*
263 %{_mandir}/man8/ip-*.8*
264 %{_mandir}/man8/lnstat.8*
265 %{_mandir}/man8/nstat.8*
266 %{_mandir}/man8/rdma.8*
267 %{_mandir}/man8/rdma-dev.8*
268 %{_mandir}/man8/rdma-link.8*
269 %{_mandir}/man8/rdma-resource.8*
270 %{_mandir}/man8/rdma-statistic.8*
271 %{_mandir}/man8/rdma-system.8*
272 %{_mandir}/man8/rtacct.8*
273 %{_mandir}/man8/rtmon.8*
274 %{_mandir}/man8/rtstat.8*
275 %{_mandir}/man8/tipc.8*
276 %{_mandir}/man8/tipc-*.8*
277 %{_mandir}/man8/vdpa.8*
278 %{_mandir}/man8/vdpa-dev.8*
279 %{_mandir}/man8/vdpa-mgmtdev.8*
280 %{systemdtmpfilesdir}/%{name}.conf
281 %dir %attr(750,root,root) /var/run/netns
282
283 %files routel
284 %defattr(644,root,root,755)
285 %attr(755,root,root) %{_sbindir}/routel
286 %{_mandir}/man8/routel.8*
287
288 %files ss
289 %defattr(644,root,root,755)
290 %attr(755,root,root) %{_sbindir}/ss
291 %{_mandir}/man8/ss.8*
292
293 %if %{with tc}
294 %files tc
295 %defattr(644,root,root,755)
296 %attr(755,root,root) %{_sbindir}/tc
297 %dir %{_libdir}/tc
298 %attr(755,root,root) %{_libdir}/tc/*.so
299 %{_libdir}/tc/*.dist
300 %{_mandir}/man7/tc-hfsc.7*
301 %{_mandir}/man8/tc.8*
302 %{_mandir}/man8/tc-*.8*
303 %endif
304
305 %files devel
306 %defattr(644,root,root,755)
307 %{_includedir}/iproute2
308
309 %files -n libnetlink-devel
310 %defattr(644,root,root,755)
311 %{_libdir}/libnetlink.a
312 %{_includedir}/libnetlink.h
313 %{_mandir}/man3/libnetlink.3*
314
315 %files -n bash-completion-iproute2
316 %defattr(644,root,root,755)
317 %{bash_compdir}/devlink
318 %{bash_compdir}/tc
This page took 0.073802 seconds and 3 git commands to generate.