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