diff --git a/.gitignore b/.gitignore index fd6d31a..25f8579 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,26 @@ -/iproute2-6.8.0.tar.xz -/iproute2-6.10.0.tar.xz -/iproute2-6.12.0.tar.xz -/iproute2-6.14.0.tar.xz -/iproute2-6.16.0.tar.xz -/iproute2-6.17.0.tar.xz +/iproute2-4.18.0.tar.xz +/iproute2-4.20.0.tar.xz +/iproute2-5.0.0.tar.xz +/iproute2-5.1.0.tar.xz +/iproute2-5.2.0.tar.xz +/iproute2-5.3.0.tar.xz +/iproute2-5.4.0.tar.xz +/iproute2-5.5.0.tar.xz +/iproute2-5.7.0.tar.xz +/iproute2-5.8.0.tar.xz +/iproute2-5.9.0.tar.xz +/iproute2-5.10.0.tar.xz +/iproute2-5.11.0.tar.xz +/iproute2-5.12.0.tar.xz +/iproute2-5.13.0.tar.xz +/iproute2-5.14.0.tar.xz +/iproute2-5.15.0.tar.xz +/iproute2-5.17.0.tar.xz +/iproute2-5.18.0.tar.xz +/iproute2-6.0.0.tar.xz +/iproute2-6.1.0.tar.xz +/iproute2-6.2.0.tar.xz +/iproute2-6.3.0.tar.xz +/iproute2-6.4.0.tar.xz +/iproute2-6.5.0.tar.xz +/iproute2-6.7.0.tar.xz diff --git a/0001-iproute2-fix-build-failure-on-ppc64le.patch b/0001-iproute2-fix-build-failure-on-ppc64le.patch new file mode 100644 index 0000000..1d621e4 --- /dev/null +++ b/0001-iproute2-fix-build-failure-on-ppc64le.patch @@ -0,0 +1,66 @@ +From ac4e9bd66d9c8461024dfd3698e120c678eb6cfc Mon Sep 17 00:00:00 2001 +Message-ID: +From: Andrea Claudi +Date: Fri, 9 Feb 2024 23:56:20 +0100 +Subject: [PATCH] iproute2: fix build failure on ppc64le +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2261250 +Upstream Status: posted upstream + +commit d13ef7c00b60a50a5e8ddbb7ff138399689d3483 +Author: Andrea Claudi +Date: Fri Feb 9 10:44:55 2024 +0100 + + iproute2: fix build failure on ppc64le + + ppc64le build fails with error on ifstat.c when + -Wincompatible-pointer-types is enabled: + + ifstat.c: In function ‘dump_raw_db’: + ifstat.c:323:44: error: initialization of ‘long long unsigned int *’ from incompatible pointer type ‘__u64 *’ {aka ‘long unsigned int *’} [-Wincompatible-pointer-types] + 323 | unsigned long long *vals = n->val; + + Several other warnings are produced when -Wformat= is set, for example: + + ss.c:3244:34: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=] + 3244 | out(" rcv_nxt:%llu", s->mptcpi_rcv_nxt); + | ~~~^ ~~~~~~~~~~~~~~~~~ + | | | + | | __u64 {aka long unsigned int} + | long long unsigned int + | %lu + + This happens because __u64 is defined as long unsigned on ppc64le. As + pointed out by Florian Weimar, we should use -D__SANE_USERSPACE_TYPES__ + if we really want to use long long unsigned in iproute2. + + This fix the build failure and all the warnings without any change on + the code itself. + + Suggested-by: Florian Weimer + Signed-off-by: Andrea Claudi + +Signed-off-by: Andrea Claudi +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 8024d45e..3b9daede 100644 +--- a/Makefile ++++ b/Makefile +@@ -60,7 +60,7 @@ CC := gcc + HOSTCC ?= $(CC) + DEFINES += -D_GNU_SOURCE + # Turn on transparent support for LFS +-DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE ++DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__SANE_USERSPACE_TYPES__ + CCOPTS = -O2 -pipe + WFLAGS := -Wall -Wstrict-prototypes -Wmissing-prototypes + WFLAGS += -Wmissing-declarations -Wold-style-definition -Wformat=2 +-- +2.43.0 + diff --git a/0001-ss-show-extra-info-when-processes-is-not-used.patch b/0001-ss-show-extra-info-when-processes-is-not-used.patch new file mode 100644 index 0000000..32f876b --- /dev/null +++ b/0001-ss-show-extra-info-when-processes-is-not-used.patch @@ -0,0 +1,85 @@ +From 87d804ca0854b09c07872e9fd6036bf5d3e0cc85 Mon Sep 17 00:00:00 2001 +Message-ID: <87d804ca0854b09c07872e9fd6036bf5d3e0cc85.1716984652.git.dcaratti@redhat.com> +From: "Matthieu Baerts (NGI0)" +Date: Sat, 13 Jan 2024 18:10:21 +0100 +Subject: [PATCH] ss: show extra info when '--processes' is not used + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2279920 +Upstream status:all mainline in iproute.git + +commit 87d804ca0854b09c07872e9fd6036bf5d3e0cc85 +Author: Matthieu Baerts (NGI0) +Date: Sat, 13 Jan 2024 18:10:21 +0100 + + ss: show extra info when '--processes' is not used + + A recent modification broke "extra" options for all protocols showing + info about the processes when '-p' / '--processes' option was not used + as well. In other words, all the additional bits displayed at the end or + at the next line were no longer printed if the user didn't ask to show + info about processes as well. + + The reason is that, the "current_field" pointer never switched to the + "Ext" column. If the user didn't ask to display the processes, nothing + happened when trying to print extra bits using the "out()" function, + because the current field was still pointing to the "Process" one, now + marked as disabled. + + Before the commit mentioned below, it was not an issue not to switch to + the "Ext" or "Process" columns because they were never marked as + "disabled". + + Here is a quick list of options that were no longer displayed if '-p' / + '--processes' was not set: + + - AF_INET(6): + -o, --options + -e, --extended + --tos + --cgroup + --inet-sockopt + -m, --memory + -i, --info + + - AF_PACKET: + -e, --extended + + - AF_XDP: + -e, --extended + + - AF_UNIX: + -m, --memory + -e, --extended + + - TIPC: + --tipcinfo + + That was just by quickly reading the code, I probably missed some. But + this shows that the impact can be quite important for all scripts using + 'ss' to monitor connections or to report info. + + Fixes: 1607bf53 ("ss: prevent "Process" column from being printed unless requested") + Signed-off-by: Matthieu Baerts (NGI0) + Signed-off-by: Stephen Hemminger + +Signed-off-by: Davide Caratti +--- + misc/ss.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/misc/ss.c b/misc/ss.c +index 900fefa42015..5296cabe9982 100644 +--- a/misc/ss.c ++++ b/misc/ss.c +@@ -2427,6 +2427,8 @@ static void proc_ctx_print(struct sockstat *s) + free(buf); + } + } ++ ++ field_next(); + } + + static void inet_stats_print(struct sockstat *s, bool v6only) +-- +2.44.0 + diff --git a/README.etc b/README.etc deleted file mode 100644 index 6fc09c3..0000000 --- a/README.etc +++ /dev/null @@ -1,16 +0,0 @@ -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 77088b9..a85ea34 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,13 +1,11 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 6.17.0 +Version: 6.7.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-iproute2-fix-build-failure-on-ppc64le.patch +Patch1: 0001-ss-show-extra-info-when-processes-is-not-used.patch License: GPL-2.0-or-later AND NIST-PD BuildRequires: bison @@ -28,15 +26,7 @@ BuildRequires: linux-atm-libs-devel %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) @@ -78,7 +68,7 @@ The libnetlink static library. %build %configure --color auto -echo -e "\nPREFIX=%{_prefix}\nSBINDIR=%{_sbindir}" >> config.mk +echo -e "\nSBINDIR=%{_sbindir}" >> config.mk %make_build %install @@ -93,28 +83,12 @@ 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} +%if 0%{?rhel} && ! 0%{?eln} 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 @@ -123,10 +97,8 @@ fi %{_mandir}/man8/* %exclude %{_mandir}/man8/tc* %exclude %{_mandir}/man8/cbq* -%exclude %{_mandir}/man8/arpd* -%attr(644,root,root) %config %{_datadir}/iproute2/* +%attr(644,root,root) %config(noreplace) %{_datadir}/iproute2/* %{_sbindir}/* -%attr(644,root,root) %{_sysconfdir}/iproute2/* %exclude %{_sbindir}/tc %exclude %{_sbindir}/routel %{_datadir}/bash-completion/completions/devlink diff --git a/rt_dsfield.deprecated b/rt_dsfield.deprecated deleted file mode 100644 index c8eec63..0000000 --- a/rt_dsfield.deprecated +++ /dev/null @@ -1,17 +0,0 @@ - -# 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 diff --git a/sources b/sources index 9ad54ed..9522a67 100644 --- a/sources +++ b/sources @@ -1,6 +1 @@ -SHA512 (iproute2-6.8.0.tar.xz) = 54e50340a73c8810d69bfd54704b469149731634a97d94da08b5a305592a812131a441e5b646e32b480d61840e2ade29387e54b934effeee8ded4f06e557a5c0 -SHA512 (iproute2-6.10.0.tar.xz) = 706479aa37a25fcf30c525c6abd85e0861e484d046e0636a28dbc52b958d45c9dba70b912f530dedd4b0b496e4b98969e23501bbbb41d3de50810bae014fcb41 -SHA512 (iproute2-6.12.0.tar.xz) = dbd6afb8162a6086e4be9045b8dc53aa563bd4b7abaf43ee13cd7d493730ff0b90e6985f68c6f42d64f4af6a692d0589e0cefd2f24045ec1c10418cfb73940b2 -SHA512 (iproute2-6.14.0.tar.xz) = e79049bdca0e0381f0a93a40e4d597ce59fb509dabc6e8b04a510ff9953f091c67577d6faa62967bd197bf62ab6e56d928558270a1390621431acb237b77fa46 -SHA512 (iproute2-6.16.0.tar.xz) = 88930ea1a3a901594a69dc04e533bfd1de0f5b79f176dedb45f11f01035bd680edccc8e04e56d0922ee430580581c646473a3baa941254739878f7ab946f17df -SHA512 (iproute2-6.17.0.tar.xz) = 3d83d49233c1d984f15d285a46e2ec0eeb820c7cb84cfc84866921f37e8a57d31bc3953be07e8c79ed6079f326a25c3a85f591b0d67f9f689c0c70ccdb0fef77 +SHA512 (iproute2-6.7.0.tar.xz) = 5d8dca139b1b980dac6c841f477b951dd199074cb078b5ea8df23b3532eeb235cca1df9f6628b0f81b7edd62aaf4e95bad15a851843bd61e5715215da97cc546