# - fix iface_descr patch
#
# Conditional build
-%bcond_without doc # don't build documentation
%bcond_without tc # don't build tc program (it breaks static linkage)
%bcond_without atm # disable ATM support for tc
%bcond_with uClibc # do some hacks to build with uClibc
Summary(pl.UTF-8): Narzędzie do konfigurowania sieci
Summary(pt_BR.UTF-8): Ferramentas para roteamento avançado e configuração de interfaces de rede
Name: iproute2
-Version: 3.1.0
+Version: 5.10.0
Release: 2
License: GPL v2+
Group: Networking/Admin
-Source0: http://kernel.org/pub/linux/utils/net/iproute2/%{name}-%{version}.tar.xz
-# Source0-md5: 810cdc0ddc2409a7af7089588c6c9a68
-Patch0: %{name}-build.patch
-Patch1: %{name}-arp.patch
-Patch3: %{name}-iptables.patch
-Patch4: %{name}-iptables64.patch
-Patch5: %{name}-LDFLAGS.patch
+Source0: https://www.kernel.org/pub/linux/utils/net/iproute2/%{name}-%{version}.tar.xz
+# Source0-md5: 19ffea480a21e600453776b7225f3319
+Source1: %{name}.tmpfiles
+Patch0: %{name}-link.patch
+Patch3: %{name}-LDFLAGS.patch
+
+Patch5: %{name}-build.patch
+Patch6: %{name}-print_cache_route_entries.patch
# extensions
Patch10: %{name}-2.2.4-wrr.patch
Patch11: esfq-%{name}.patch
Patch12: 001-net-dev-iface-descr-0.1.diff
-Patch13: %{name}-q_atm_c.patch
Patch14: %{name}-q_srr.v0.4.patch
Patch15: %{name}-ip_route_get.patch
-URL: http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
+URL: https://wiki.linuxfoundation.org/networking/iproute2
BuildRequires: bison
BuildRequires: db-devel
+# libelf
+BuildRequires: elfutils-devel
BuildRequires: flex
BuildRequires: iptables-devel >= 0:1.4.5
+BuildRequires: libbsd-devel
+BuildRequires: libcap-devel
+BuildRequires: libmnl-devel
+BuildRequires: libselinux-devel
%if %{with atm}
BuildRequires: linux-atm-devel
%endif
BuildRequires: linux-libc-headers >= 7:2.6.12.0-15
-%if %{with doc}
-BuildRequires: psutils
-BuildRequires: sgml-tools
-%if "%{pld_release}" != "th"
-BuildRequires: tetex-dvips
-BuildRequires: tetex-fonts-jknappen
-BuildRequires: tetex-format-latex
-BuildRequires: tetex-metafont
-BuildRequires: tetex-tex-babel
-%else
-BuildRequires: texlive-dvips
-BuildRequires: texlive-fonts-cmsuper
-BuildRequires: texlive-fonts-jknappen
-BuildRequires: texlive-latex
-BuildRequires: texlive-tex-babel
-%endif
-%endif
+BuildRequires: pkgconfig
+BuildRequires: rpmbuild(macros) >= 1.673
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
Requires: iptables-libs >= 0:1.4.5
Obsoletes: ifstat
Obsoletes: iproute
+Obsoletes: iproute2-doc < 4.14.1
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _sbindir /sbin
uso das características e recursos da nova kernel. This package
includes the new utilities.
+%package devel
+Summary: Header file for tc plugins development
+Summary(pl.UTF-8): Plik nagłówkowy do tworzenia wtyczek programu tc
+Group: Development/Libraries
+# doesn't require base
+
+%description devel
+Header file for tc plugins development.
+
+%description devel -l pl.UTF-8
+Plik nagłówkowy do tworzenia wtyczek programu tc.
+
%package -n libnetlink-devel
Summary: Library for the netlink interface
Summary(pl.UTF-8): Biblioteka do interfejsu netlink
Ta biblioteka udostępnia interfejs do interfejsu netlink między jądrem
a przestrzenią użytkownika.
-%package doc
-Summary: ip and tc documentation with examples
-Summary(pl.UTF-8): Dokumentacja do ip i tc z przykładami
-License: GPL v2+
-Group: Applications/System
+%package -n bash-completion-iproute2
+Summary: Bash completion for iproute2 commands
+Summary(pl.UTF-8): Bashowe dopełnianie parametrów poleceń iproute2
+Group: Applications/Shells
+Requires: %{name} = %{version}-%{release}
+Requires: bash-completion >= 2.0
-%description doc
-The iproute documentation contains howtos and examples of settings.
+%description -n bash-completion-iproute2
+Bash completion for iproute2 commands (currently devlink and tc).
-%description doc -l pl.UTF-8
-Dokumentacja do iproute zawiera "howto" oraz przykłady ustawień.
+%description -n bash-completion-iproute2 -l pl.UTF-8
+Bashowe dopełnianie parametrów poleceń iproute2 (obecnie devlink i
+tc).
%prep
%setup -q
-#rm -rf include/linux
-%patch0 -p1
-%patch1 -p1
-%if "%{_lib}" == "lib64"
-%patch4 -p1
-%else
+# conflict with atm-vbr patched linux-libc-headers
+%{__rm} include/uapi/linux/atm.h
+
+%patch0 -p1
%patch3 -p1
-%endif
-%patch5 -p1
+%patch5 -p1
+%patch6 -p1
# extensions:
%patch10 -p1
%patch11 -p1
%{?with_iface_descr:%patch12 -p1}
-%patch13 -p0
%patch14 -p1
%patch15 -p1
LD="%{__cc}" \
%endif
HOSTCC="%{__cc}" \
- OPT="%{rpmcflags} %{rpmcppflags}" \
+ CCOPTS="%{rpmcflags} %{rpmcppflags} -Wno-unused-result -DXT_LIB_DIR=\\\"%{_libdir}/xtables\\\"" \
LDFLAGS="%{rpmldflags} -Wl,-export-dynamic" \
LIBDIR=%{_libdir} \
- %{!?with_tc:SUBDIRS="lib ip misc"}
-
-%{?with_doc:%{__make} -C doc}
+ %{!?with_tc:SUBDIRS="lib ip misc"} \
+ V=1
# make sure we don't produce broken ip binary
./ip/ip link add type vlan help 2>&1 | grep -q "VLANID :=" || exit 1
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir},%{_mandir}/man{3,7,8},%{_libdir},%{_includedir},%{?with_tc:%{_libdir}/tc}}
-
-install -p ip/{ip,rtmon,routel} %{?with_tc:tc/tc} misc/{ifstat,lnstat,nstat,rtacct,ss} $RPM_BUILD_ROOT%{_sbindir}
-ln -s lnstat $RPM_BUILD_ROOT%{_sbindir}/ctstat
-ln -s lnstat $RPM_BUILD_ROOT%{_sbindir}/rtstat
-cp -a etc/iproute2/rt_protos \
- etc/iproute2/rt_realms \
- etc/iproute2/rt_scopes \
- etc/iproute2/rt_tables \
- $RPM_BUILD_ROOT%{_sysconfdir}
-
-cp -a man/man3/* $RPM_BUILD_ROOT%{_mandir}/man3
-cp -a man/man7/* $RPM_BUILD_ROOT%{_mandir}/man7
-cp -a man/man8/* $RPM_BUILD_ROOT%{_mandir}/man8
-echo ".so lnstat.8" > $RPM_BUILD_ROOT%{_mandir}/man8/ctstat.8
-echo ".so lnstat.8" > $RPM_BUILD_ROOT%{_mandir}/man8/rtstat.8
-echo ".so tc-pbfifo.8" > $RPM_BUILD_ROOT%{_mandir}/man8/tc-bfifo.8
-echo ".so tc-pbfifo.8" > $RPM_BUILD_ROOT%{_mandir}/man8/tc-pfifo.8
+install -d $RPM_BUILD_ROOT{%{_includedir},/var/run/netns,%{systemdtmpfilesdir}}
+
+%{__make} install \
+ LIBDIR=%{_libdir} \
+ DESTDIR=$RPM_BUILD_ROOT
+
+# omitted by make install
+install -Dp man/man7/tc-hfsc.7 $RPM_BUILD_ROOT%{_mandir}/man7/tc-hfsc.7
+
# arpd is not packaged here
-%{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/arpd.8
+%{__rm} $RPM_BUILD_ROOT%{_sbindir}/arpd $RPM_BUILD_ROOT%{_mandir}/man8/arpd.8
-cp -a lib/libnetlink.a $RPM_BUILD_ROOT%{_libdir}
-cp -a include/libnetlink.h $RPM_BUILD_ROOT%{_includedir}
-%{?with_tc:install -p tc/*.so $RPM_BUILD_ROOT%{_libdir}/tc}
+cp -p lib/libnetlink.a $RPM_BUILD_ROOT%{_libdir}
+cp -p include/libnetlink.h $RPM_BUILD_ROOT%{_includedir}
-%if %{with doc}
-install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-%endif
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc README README.decnet README.iproute2+tc README.distribution README.lnstat
+%doc README doc/actions examples
+%attr(755,root,root) %{_sbindir}/bridge
%attr(755,root,root) %{_sbindir}/ctstat
+%attr(755,root,root) %{_sbindir}/devlink
+%attr(755,root,root) %{_sbindir}/genl
+%attr(755,root,root) %{_sbindir}/ifcfg
%attr(755,root,root) %{_sbindir}/ifstat
%attr(755,root,root) %{_sbindir}/ip
%attr(755,root,root) %{_sbindir}/lnstat
%attr(755,root,root) %{_sbindir}/nstat
+%attr(755,root,root) %{_sbindir}/rdma
+%attr(755,root,root) %{_sbindir}/routef
%attr(755,root,root) %{_sbindir}/routel
%attr(755,root,root) %{_sbindir}/rtacct
%attr(755,root,root) %{_sbindir}/rtmon
+%attr(755,root,root) %{_sbindir}/rtpr
%attr(755,root,root) %{_sbindir}/rtstat
%attr(755,root,root) %{_sbindir}/ss
+%attr(755,root,root) %{_sbindir}/tipc
%dir %{_sysconfdir}
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bpf_pinning
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ematch_map
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/group
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nl_protos
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_dsfield
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_protos
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_realms
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_scopes
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_tables
-%{_mandir}/man8/ip.8*
+%{_mandir}/man8/bridge.8*
%{_mandir}/man8/ctstat.8*
+%{_mandir}/man8/devlink.8*
+%{_mandir}/man8/devlink-dev.8*
+%{_mandir}/man8/devlink-dpipe.8*
+%{_mandir}/man8/devlink-health.8*
+%{_mandir}/man8/devlink-monitor.8*
+%{_mandir}/man8/devlink-port.8*
+%{_mandir}/man8/devlink-region.8*
+%{_mandir}/man8/devlink-resource.8*
+%{_mandir}/man8/devlink-sb.8*
+%{_mandir}/man8/devlink-trap.8*
+%{_mandir}/man8/genl.8*
+%{_mandir}/man8/ifcfg.8*
+%{_mandir}/man8/ifstat.8*
+%{_mandir}/man8/ip.8*
+%{_mandir}/man8/ip-*.8*
%{_mandir}/man8/lnstat.8*
+%{_mandir}/man8/nstat.8*
+%{_mandir}/man8/rdma.8*
+%{_mandir}/man8/rdma-dev.8*
+%{_mandir}/man8/rdma-link.8*
+%{_mandir}/man8/rdma-resource.8*
+%{_mandir}/man8/rdma-statistic.8*
+%{_mandir}/man8/rdma-system.8*
+%{_mandir}/man8/routef.8*
%{_mandir}/man8/routel.8*
%{_mandir}/man8/rtacct.8*
%{_mandir}/man8/rtmon.8*
+%{_mandir}/man8/rtpr.8*
%{_mandir}/man8/rtstat.8*
%{_mandir}/man8/ss.8*
+%{_mandir}/man8/tipc.8*
+%{_mandir}/man8/tipc-*.8*
%if %{with tc}
%attr(755,root,root) %{_sbindir}/tc
%dir %{_libdir}/tc
%attr(755,root,root) %{_libdir}/tc/*.so
+%{_libdir}/tc/*.dist
%{_mandir}/man7/tc-hfsc.7*
%{_mandir}/man8/tc.8*
%{_mandir}/man8/tc-*.8*
%endif
+%{systemdtmpfilesdir}/%{name}.conf
+%dir %attr(750,root,root) /var/run/netns
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/iproute2
%files -n libnetlink-devel
%defattr(644,root,root,755)
%{_includedir}/libnetlink.h
%{_mandir}/man3/libnetlink.3*
-%if %{with doc}
-%files doc
+%files -n bash-completion-iproute2
%defattr(644,root,root,755)
-%doc RELNOTES doc/*.ps
-%{_examplesdir}/%{name}-%{version}
-%endif
+%{bash_compdir}/devlink
+%{bash_compdir}/tc