iproute/iproute.spec
Andrea Claudi 88fb065123 iproute-6.17.0-2.el10
* Tue Jan 27 2026 Andrea Claudi <aclaudi@redhat.com> - 6.17.0-2.el10
- dpll: Add dpll command (Andrea Claudi) [RHEL-144620]
- uapi: import dpll.h from last sync point (David Ahern) [RHEL-144620]
- lib: Add str_to_bool helper function (Andrea Claudi) [RHEL-144620]
- lib: Move mnlg to lib for shared use (Andrea Claudi) [RHEL-144620]
Resolves: RHEL-144620

Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
2026-01-27 22:02:48 +01:00

163 lines
4.6 KiB
RPMSpec

Summary: Advanced IP routing and network device configuration tools
Name: iproute
Version: 6.17.0
Release: %autorelease
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
%if 0%{?rhel}
Source1: rt_dsfield.deprecated
%endif
Source2: README.etc
Patch0: 0001-lib-Move-mnlg-to-lib-for-shared-use.patch
Patch1: 0002-lib-Add-str_to_bool-helper-function.patch
Patch2: 0003-uapi-import-dpll.h-from-last-sync-point.patch
Patch3: 0004-dpll-Add-dpll-command.patch
License: GPL-2.0-or-later AND NIST-PD
BuildRequires: bison
BuildRequires: elfutils-libelf-devel
BuildRequires: flex
BuildRequires: gcc
BuildRequires: iptables-devel >= 1.4.5
BuildRequires: libbpf-devel
BuildRequires: libcap-devel
BuildRequires: libmnl-devel
BuildRequires: libselinux-devel
BuildRequires: make
BuildRequires: pkgconfig
%if ! 0%{?_module_build}
%if 0%{?fedora}
BuildRequires: linux-atm-libs-devel
%endif
%endif
Requires: libbpf
Requires: psmisc
# Compat symlinks for Requires in other packages.
Provides: /sbin/ip
%if "%{_sbindir}" == "%{_bindir}"
# We rely on filesystem to create the symlink for us.
Requires: filesystem(unmerged-sbin-symlinks)
Provides: /usr/sbin/ip
Provides: /usr/sbin/ss
%endif
%description
The iproute package contains networking utilities (ip and rtmon, for example)
which are designed to use the advanced networking capabilities of the Linux
kernel.
%package tc
Summary: Linux Traffic Control utility
License: GPL-2.0-or-later
Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: /sbin/tc
%description tc
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
License: GPL-2.0-or-later
Requires: %{name} = %{version}-%{release}
%description doc
The iproute documentation contains howtos and examples of settings.
%endif
%package devel
Summary: iproute development files
License: GPL-2.0-or-later
Requires: %{name} = %{version}-%{release}
Provides: iproute-static = %{version}-%{release}
%description devel
The libnetlink static library.
%prep
%autosetup -p1 -n %{name}2-%{version}
%build
%configure --color auto
echo -e "\nPREFIX=%{_prefix}\nSBINDIR=%{_sbindir}" >> config.mk
%make_build
%install
%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}'
mkdir -p %{buildroot}%{_sysconfdir}/iproute2
cp %{SOURCE2} %{buildroot}%{_sysconfdir}/iproute2/README
# append deprecated values to rt_dsfield for compatibility reasons
%if 0%{?rhel}
cat %{SOURCE1} >>%{buildroot}%{_datadir}/iproute2/rt_dsfield
cp %{SOURCE2} %{buildroot}%{_datadir}/iproute2/README
# RHEL-94662: restore /etc/iproute2 conf files, if modified
# this is safe because we don't have conf files in /etc/iproute2 anymore, so
# every *.rpmsave file over there is a leftover from a failed conf upgrade
%posttrans
if [ -f /etc/iproute2/*rpmsave ]; then
for conffile in /etc/iproute2/*rpmsave; do
mv $conffile ${conffile%.rpmsave}
done
fi
%endif
%files
%dir %{_sysconfdir}/iproute2
%dir %{_datadir}/iproute2
%license COPYING
%doc README README.devel
%{_mandir}/man7/*
%exclude %{_mandir}/man7/tc-*
%{_mandir}/man8/*
%exclude %{_mandir}/man8/tc*
%exclude %{_mandir}/man8/cbq*
%exclude %{_mandir}/man8/arpd*
%attr(644,root,root) %config %{_datadir}/iproute2/*
%{_sbindir}/*
%attr(644,root,root) %{_sysconfdir}/iproute2/*
%exclude %{_sbindir}/tc
%exclude %{_sbindir}/routel
%{_datadir}/bash-completion/completions/*
%files tc
%license COPYING
%{_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
%license COPYING
%{_mandir}/man3/*
%{_libdir}/libnetlink.a
%{_includedir}/libnetlink.h
%{_includedir}/iproute2/bpf_elf.h
%changelog
%autochangelog