diff --git a/iproute.spec b/iproute.spec index 4c255fa..f250835 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,32 +1,36 @@ -%global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 5.13.0 -Release: 4%{?dist} -URL: http://kernel.org/pub/linux/utils/net/%{name}2/ -Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz +Release: 5%{?dist}%{?buildid} +%if ! 0%{?fedora} +Group: Applications/System +%endif +URL: https://kernel.org/pub/linux/utils/net/%{name}2/ +Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz +Source1: iproute2.sh +Source2: rt_dsfield.deprecated License: GPLv2+ and Public Domain -BuildRequires: gcc BuildRequires: bison BuildRequires: elfutils-libelf-devel BuildRequires: flex +BuildRequires: gcc BuildRequires: iptables-devel >= 1.4.5 +BuildRequires: libbpf-devel BuildRequires: libcap-devel BuildRequires: libdb-devel BuildRequires: libmnl-devel BuildRequires: libselinux-devel -BuildRequires: pkgconfig BuildRequires: make +BuildRequires: pkgconfig %if ! 0%{?_module_build} %if 0%{?fedora} BuildRequires: linux-atm-libs-devel %endif %endif -Provides: /sbin/ip -Provides: iproute-doc = %{version}-%{release} +Requires: libbpf Requires: psmisc -Obsoletes: iproute-doc < %{version}-%{release} +Provides: /sbin/ip %description The iproute package contains networking utilities (ip and rtmon, for example) @@ -35,6 +39,9 @@ kernel. %package tc Summary: Linux Traffic Control utility +%if ! 0%{?fedora} +Group: Applications/System +%endif License: GPLv2+ Requires: %{name}%{?_isa} = %{version}-%{release} Provides: /sbin/tc @@ -44,9 +51,26 @@ The Traffic Control utility manages queueing disciplines, their classes and attached filters and actions. It is the standard tool to configure QoS in Linux. +%if ! 0%{?_module_build} +%package doc +Summary: Documentation for iproute2 utilities with examples +%if ! 0%{?fedora} +Group: Applications/System +%endif +License: GPLv2+ +Requires: %{name} = %{version}-%{release} + +%description doc +The iproute documentation contains howtos and examples of settings. +%endif + %package devel Summary: iproute development files +%if ! 0%{?fedora} +Group: Development/Libraries +%endif License: GPLv2+ +Requires: %{name} = %{version}-%{release} Provides: iproute-static = %{version}-%{release} %description devel @@ -64,36 +88,55 @@ export SBINDIR='%{_sbindir}' export LIBDIR='%{_libdir}' %make_install +echo '.so man8/tc-cbq.8' > %{buildroot}%{_mandir}/man8/cbq.8 + # libnetlink install -D -m644 include/libnetlink.h %{buildroot}%{_includedir}/libnetlink.h install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a +# drop these files, iproute-doc package extracts files directly from _builddir +rm -rf '%{buildroot}%{_docdir}' + +# use TC_LIB_DIR environment variable +install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/profile.d/iproute2.sh + +# RHEL: append deprecated values to rt_dsfield for compatibility reasons +%if ! 0%{?fedora} +cat %{SOURCE2} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield +%endif + %files %dir %{_sysconfdir}/iproute2 -%{!?_licensedir:%global license %%doc} %license COPYING -%doc README +%doc README README.devel %{_mandir}/man7/* %exclude %{_mandir}/man7/tc-* %{_mandir}/man8/* %exclude %{_mandir}/man8/tc* +%exclude %{_mandir}/man8/cbq* %attr(644,root,root) %config(noreplace) %{_sysconfdir}/iproute2/* %{_sbindir}/* %exclude %{_sbindir}/tc %{_datadir}/bash-completion/completions/devlink %files tc -%{!?_licensedir:%global license %%doc} %license COPYING +%{_sysconfdir}/profile.d/iproute2.sh %{_mandir}/man7/tc-* %{_mandir}/man8/tc* +%{_mandir}/man8/cbq* %dir %{_libdir}/tc/ %{_libdir}/tc/* %{_sbindir}/tc %{_datadir}/bash-completion/completions/tc +%if ! 0%{?_module_build} +%files doc +%license COPYING +%doc examples +%endif + %files devel -%{!?_licensedir:%global license %%doc} %license COPYING %{_mandir}/man3/* %{_libdir}/libnetlink.a @@ -101,21 +144,27 @@ install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_includedir}/iproute2/bpf_elf.h %changelog -* Mon Aug 09 2021 Mohan Boddu - 5.13.0-4 +* Wed Aug 18 2021 Andrea Claudi - 5.13.0-5.el9 +- Add build and runtime dependency on libbpf (Andrea Claudi) [1994520] +- Use TC_LIB_DIR environment variable (Andrea Claudi) [1994545] +- Re-add iproute-doc package on the specfile (Andrea Claudi) [1994581] +Resolves: rhbz#1938744, rhbz#1994520, rhbz#1994545, rhbz#1994581 + +* Mon Aug 09 2021 Mohan Boddu - 5.13.0-4.el9 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688 -* Fri Jul 16 2021 Andrea Claudi [5.13.0-3.el9] +* Fri Jul 16 2021 Andrea Claudi - 5.13.0-3.el9 - Fix changelog (Andrea Claudi) [1947854] - Add RHEL gating configuration (Aleksandra Fedorova) -* Thu Jul 15 2021 Andrea Claudi [5.13.0-2.el9] +* Thu Jul 15 2021 Andrea Claudi - 5.13.0-2.el9 - Remove Recommends: iproute-tc from spec file (Andrea Claudi) [1947854] -* Wed Jun 30 2021 Andrea Claudi - 5.13.0-1 +* Wed Jun 30 2021 Andrea Claudi - 5.13.0-1.el9 - New version 5.13.0 (#1977898) -* Fri Apr 16 2021 Mohan Boddu - 5.10.0-3 +* Fri Apr 16 2021 Mohan Boddu - 5.10.0-3.el9 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 * Tue Jan 26 2021 Fedora Release Engineering - 5.10.0-2 diff --git a/iproute2.sh b/iproute2.sh new file mode 100644 index 0000000..f13e1f0 --- /dev/null +++ b/iproute2.sh @@ -0,0 +1,5 @@ +# tc initialization script (sh) + +if [ -z "$TC_LIB_DIR" ]; then + export TC_LIB_DIR=/usr/lib64/tc +fi diff --git a/rt_dsfield.deprecated b/rt_dsfield.deprecated new file mode 100644 index 0000000..c8eec63 --- /dev/null +++ b/rt_dsfield.deprecated @@ -0,0 +1,17 @@ + +# Deprecated values dropped upstream +# Kept in RHEL for backwards-compatibility +0x00 default +0x10 lowdelay +0x08 throughput +0x04 reliability +# This value overlap with ECT, do not use it! +0x02 mincost +# These values seems do not want to die, Cisco likes them by a strange reason. +0x20 priority +0x40 immediate +0x60 flash +0x80 flash-override +0xa0 critical +0xc0 internet +0xe0 network