From 4269680565d0f5c96aab7dbf6e38205486bb1e36 Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Mon, 23 Jun 2025 00:06:54 +0200 Subject: [PATCH] iproute-6.14.0-2.el10 * Sun Jun 22 2025 Andrea Claudi - 6.14.0-2.el10 - Fix configuration when upgrading from non-stateless config (Andrea Claudi) [RHEL-99163] Resolves: RHEL-99163 Signed-off-by: Andrea Claudi --- README.etc | 16 ++++++++++++++++ iproute.spec | 18 +++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 README.etc diff --git a/README.etc b/README.etc new file mode 100644 index 0000000..6fc09c3 --- /dev/null +++ b/README.etc @@ -0,0 +1,16 @@ +You are looking for your iproute2 config in /etc/iproute2 and it's gone? + +Here's an explanation on what's going on: + +From v6.5.0, iproute2 supports stateless configuration pattern. This +means that iproute2 now read its config from /etc/iproute2/FOO, and, +if it does not exist, fall back to /usr/share/iproute2/FOO. + +You can find iproute2 default configuration in /usr/share/iproute2, +while you can store your user-modified config files in /etc/iproute2. + +/usr/share/iproute2 files are not supposed to be manually modified. + +If a previous update broke your user config for iproute2, you may +have one or more ".rpmsave" files in /etc/iproute2. You can restore +your config simply dropping the ".rpmsave" suffix from the file name. diff --git a/iproute.spec b/iproute.spec index 0e4018a..6805535 100644 --- a/iproute.spec +++ b/iproute.spec @@ -5,6 +5,7 @@ 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 Source1: rt_dsfield.deprecated +Source2: README.etc License: GPL-2.0-or-later AND NIST-PD BuildRequires: bison @@ -93,9 +94,23 @@ rm -rf '%{buildroot}%{_docdir}' # append deprecated values to rt_dsfield for compatibility reasons %if 0%{?rhel} cat %{SOURCE1} >>%{buildroot}%{_datadir}/iproute2/rt_dsfield +mkdir -p %{buildroot}%{_sysconfdir}/iproute2 +cp %{SOURCE2} %{buildroot}%{_sysconfdir}/iproute2/README +cp %{SOURCE2} %{buildroot}%{_datadir}/iproute2/README %endif +# 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 + %files +%dir %{_sysconfdir}/iproute2 %dir %{_datadir}/iproute2 %license COPYING %doc README README.devel @@ -105,8 +120,9 @@ cat %{SOURCE1} >>%{buildroot}%{_datadir}/iproute2/rt_dsfield %exclude %{_mandir}/man8/tc* %exclude %{_mandir}/man8/cbq* %exclude %{_mandir}/man8/arpd* -%attr(644,root,root) %config(noreplace) %{_datadir}/iproute2/* +%attr(644,root,root) %config %{_datadir}/iproute2/* %{_sbindir}/* +%attr(644,root,root) %{_sysconfdir}/iproute2/* %exclude %{_sbindir}/tc %exclude %{_sbindir}/routel %{_datadir}/bash-completion/completions/devlink