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