From 13de4d4981a71f3ce4520444d80689bc8ce50e30 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Tue, 11 Nov 2025 21:59:08 +0000 Subject: [PATCH] import UBI ethtool-6.15-2.el10 --- .gitignore | 2 +- ...owing-as-Unknown-instead-of-off-auto.patch | 45 ------------- ...k-fix-missing-headers-in-text-output.patch | 64 +++++++++++++++++++ ethtool-6.11.tar.sign | 11 ---- ethtool-6.15.tar.sign | 11 ++++ ethtool.spec | 18 ++++-- sources | 2 +- 7 files changed, 90 insertions(+), 63 deletions(-) delete mode 100644 0001-fix-MDI-X-showing-as-Unknown-instead-of-off-auto.patch create mode 100644 0001-netlink-fix-missing-headers-in-text-output.patch delete mode 100644 ethtool-6.11.tar.sign create mode 100644 ethtool-6.15.tar.sign diff --git a/.gitignore b/.gitignore index a27e670..8b55559 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -ethtool-6.11.tar.xz +ethtool-6.15.tar.xz diff --git a/0001-fix-MDI-X-showing-as-Unknown-instead-of-off-auto.patch b/0001-fix-MDI-X-showing-as-Unknown-instead-of-off-auto.patch deleted file mode 100644 index 98960d4..0000000 --- a/0001-fix-MDI-X-showing-as-Unknown-instead-of-off-auto.patch +++ /dev/null @@ -1,45 +0,0 @@ -From c4874fb8866046ea62731399bc58740caeb154b7 Mon Sep 17 00:00:00 2001 -From: Michal Schmidt -Date: Wed, 12 Feb 2025 13:23:27 +0100 -Subject: [PATCH] fix MDI-X showing as Unknown instead of "off (auto)" - -The current version of ethtool is unable to show the correct MDI-X info: - # ethtool --version - ethtool version 6.11 - # ethtool enp0s31f6 | grep MDI - MDI-X: Unknown - -For comparison, an older version shows it correctly: - # ./ethtool --version - ethtool version 6.2 - # ./ethtool enp0s31f6 | grep MDI - MDI-X: off (auto) - -The blamed commit accidentally removed the ETH_TP_MDI switch case -in dump_mdix(). As a result, ETH_TP_MDI is treated like Unknown. - -Fix it by restoring the ETH_TP_MDI case and breaking out. -'mdi_x' is initialized to false, which is correct for this case. - -Fixes: bd1341cd2146 ("add json support for base command") -Signed-off-by: Michal Schmidt ---- - common.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/common.c b/common.c -index 4fda4b49d2fd..1ba27e7577b4 100644 ---- a/common.c -+++ b/common.c -@@ -171,6 +171,8 @@ void dump_mdix(u8 mdix, u8 mdix_ctrl) - mdi_x_forced = true; - } else { - switch (mdix) { -+ case ETH_TP_MDI: -+ break; - case ETH_TP_MDI_X: - mdi_x = true; - break; --- -2.49.0 - diff --git a/0001-netlink-fix-missing-headers-in-text-output.patch b/0001-netlink-fix-missing-headers-in-text-output.patch new file mode 100644 index 0000000..5abebe1 --- /dev/null +++ b/0001-netlink-fix-missing-headers-in-text-output.patch @@ -0,0 +1,64 @@ +From b70c928661024cd07914feb49122275daab904ea Mon Sep 17 00:00:00 2001 +From: Jakub Kicinski +Date: Sat, 12 Jul 2025 07:51:05 -0700 +Subject: [PATCH] netlink: fix missing headers in text output + +The commit under fixes added a NULL-check which prevents us from +printing text headers. Conversions to add JSON support often use: + + print_string(PRINT_FP, NULL, "some text:\n", NULL); + +to print in plain text mode. + +Correct output: + + Channel parameters for vpn0: + Pre-set maximums: + RX: n/a + TX: n/a + Other: n/a + Combined: 1 + Current hardware settings: + RX: n/a + TX: n/a + Other: n/a + Combined: 0 + +With the buggy patch: + + Channel parameters for vpn0: + RX: n/a + TX: n/a + Other: n/a + Combined: 1 + RX: n/a + TX: n/a + Other: n/a + Combined: 0 + +Fixes: fd328ccb3cc0 ("json_print: add NULL check before jsonw_string_field() in print_string()") +Signed-off-by: Jakub Kicinski +--- + json_print.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/json_print.c b/json_print.c +index 4f61640..e07c651 100644 +--- a/json_print.c ++++ b/json_print.c +@@ -143,10 +143,11 @@ void print_string(enum output_type type, + } else if (_IS_FP_CONTEXT(type)) { + if (value) + fprintf(stdout, fmt, value); ++ else ++ fprintf(stdout, "%s", fmt); + } + } + +- + /* + * value's type is bool. When using this function in FP context you can't pass + * a value to it, you will need to use "is_json_context()" to have different +-- +2.49.0 + diff --git a/ethtool-6.11.tar.sign b/ethtool-6.11.tar.sign deleted file mode 100644 index a86b1a2..0000000 --- a/ethtool-6.11.tar.sign +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQEzBAABCAAdFiEEWN3j3bieVmp26mKO538sG/LRdpUFAmcFm5gACgkQ538sG/LR -dpXPiQgAxzfD5dagzN0gwjqx1TnjMwHcb0Gh8B6yH8NFlAW1ryUjYOmmg2aP+Wn+ -ZFD8YOMm4DfMjg23nfdFyc74VItLwP7m9b1fqH2sErtLK4lxl/3VGD5fHXrFOmGQ -5KkKLrNCE44+FktGjeFiMm1jYCGU7Vy28PF0pURJ/aYLDUlyGyxP7vWFfWX03CZE -0nGKu7XjtRJ8Yb0nPkBcs7/l4hsYuO89QnBkiIpyfOIuoXYTL/zRhi54pCOnmb30 -F2q1MBS4ez1Qb7Vsk2nHz+GnE/aKAxtml9ZFbrUQ/hreXTHRFFy2CRmPO33sS4av -FFctWfiH4An4vp5iQYPfquaixHBx0A== -=Z3Jy ------END PGP SIGNATURE----- diff --git a/ethtool-6.15.tar.sign b/ethtool-6.15.tar.sign new file mode 100644 index 0000000..87487da --- /dev/null +++ b/ethtool-6.15.tar.sign @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- + +iQEzBAABCAAdFiEEWN3j3bieVmp26mKO538sG/LRdpUFAmhZmiIACgkQ538sG/LR +dpUtyAf6Ak8kXDF8OuimaOPcJl8ikBlBIhfrVrTDelugmaBsZhJGlsDZE+0a8UXU +QyiOfSRstjLQB7XG0r5PNECDZGPj3UXYB7nVYZ+wOCp5ebN2yIc4oq44GL7XczBn +AR8F7E1mAk+lSBS76PAzrFWr/nAvhlVDuVtcFo+3MAF+8fH+F/kbUlQMrsxbTeBd +u6l6nmm7W+6zAjxG//arJBA1ROpjoYy+9YSrq2FX+Hf89ZyAG7b/WWwPixcOZ3/i +Qdd5lzkPMHfh1MmP9YlSJiHpBJZ5Jtjdcju+5jy62tzWSiA7tpEixGccyM8BhcfV +yZHWVzo1NNcgOLoY8C16wijj3d5Ajw== +=ohBd +-----END PGP SIGNATURE----- diff --git a/ethtool.spec b/ethtool.spec index e702a0d..14a2d81 100644 --- a/ethtool.spec +++ b/ethtool.spec @@ -1,16 +1,15 @@ Summary: Settings tool for Ethernet NICs Name: ethtool Epoch: 2 -Version: 6.11 -Release: 5%{?dist} +Version: 6.15 +Release: 2%{?dist} # {json_print,qsfp,sff-common}.{c,h} are GPL-2.0-or-later, rest is GPL-2.0-only License: GPL-2.0-only AND GPL-2.0-or-later URL: https://www.kernel.org/pub/software/network/%{name}/ Source0: https://www.kernel.org/pub/software/network/%{name}/%{name}-%{version}.tar.xz Source1: https://www.kernel.org/pub/software/network/%{name}/%{name}-%{version}.tar.sign Source2: https://keys.openpgp.org/vks/v1/by-fingerprint/D2CB120AB45957B721CD9596F4554567B91DE934 -# RHEL-75979 -Patch1: 0001-fix-MDI-X-showing-as-Unknown-instead-of-off-auto.patch +Patch0: 0001-netlink-fix-missing-headers-in-text-output.patch BuildRequires: gnupg2, xz BuildRequires: gcc BuildRequires: libmnl-devel @@ -24,7 +23,7 @@ network devices, especially of Ethernet devices. %prep xzcat '%{SOURCE0}' | %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data=- -%autosetup +%autosetup -p1 %build %configure @@ -44,8 +43,17 @@ make check %dir %{_datadir}/bash-completion/completions/ %{_datadir}/bash-completion/completions/%{name} %{_mandir}/man8/%{name}.8* +%{_datadir}/metainfo/org.kernel.software.network.ethtool.metainfo.xml %changelog +* Fri Aug 01 2025 Mohammad Heib +- netlink: fix missing headers in text output. + Resolves: RHEL-106544 + +* Tue Jun 24 2025 Mohammad Heib - 2:6.15-1 +- Update to latest upstream release v6.15. + Resolves RHEL-99667. + * Mon Apr 28 2025 Michal Schmidt - 2:6.11-5 - Fix MDI-X showing as Unknown (RHEL-75979) diff --git a/sources b/sources index 74e82c0..5b37af7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ethtool-6.11.tar.xz) = 77f649e1082a164e3627bcb21db1215a89d9a0e984f86516bb05879685aee76b034f6a9e19a499dcdd82883fa003f628b70d27ca8272064df27fe9de67c7a9a7 +SHA512 (ethtool-6.15.tar.xz) = f140095e7c9e38d8b151796eed1301e9e6ab93e82d3e35b8a524b4f5be7b219e707bd270af7398195081085778c61948e15b39462a6a6f44aad6ffcaaddc3644