From 4e71350bfc8f5fb0050b39265212cddb0102bdf5 Mon Sep 17 00:00:00 2001 From: Krzysztof Pawlinski Date: Tue, 21 Oct 2025 12:48:09 +0200 Subject: [PATCH] utils/gather-topology: fix a grep warning when matching octal sequence Resolves: RHEL-107056 --- ...warning-when-matching-octal-sequence.patch | 41 +++++++++++++++++++ changelog | 3 ++ hwloc.spec | 1 + 3 files changed, 45 insertions(+) create mode 100644 0001-fix-a-grep-warning-when-matching-octal-sequence.patch diff --git a/0001-fix-a-grep-warning-when-matching-octal-sequence.patch b/0001-fix-a-grep-warning-when-matching-octal-sequence.patch new file mode 100644 index 0000000..63af330 --- /dev/null +++ b/0001-fix-a-grep-warning-when-matching-octal-sequence.patch @@ -0,0 +1,41 @@ +From f963e849e67062ad80b76919ba2c2a980ad8bf72 Mon Sep 17 00:00:00 2001 +From: Brice Goglin +Date: Wed, 20 Aug 2025 10:34:19 +0200 +Subject: [PATCH] utils/gather-topology: fix a grep warning when matching octal + sequence + +/proc/mounts contains \012 instead of \n in path (see getmntent.3) + +Since grep 3.8, grep "\\012" reports a warning "stray \ before 0" +(disabled currently in Debian) as well as for "\012" and '\012' +(which work too), while '\\012' doesn't warn. + +Thanks to Jirka Hladky for the report. + +Signed-off-by: Brice Goglin +--- + utils/hwloc/hwloc-gather-topology.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/utils/hwloc/hwloc-gather-topology.in b/utils/hwloc/hwloc-gather-topology.in +index 71e01cb43..3f3ee95af 100644 +--- a/utils/hwloc/hwloc-gather-topology.in ++++ b/utils/hwloc/hwloc-gather-topology.in +@@ -3,7 +3,7 @@ + + # + # Copyright © 2009 CNRS +-# Copyright © 2009-2024 Inria. All rights reserved. ++# Copyright © 2009-2025 Inria. All rights reserved. + # Copyright © 2009-2012 Université Bordeaux + # Copyright © 2014 Cisco Systems, Inc. All rights reserved. + # See COPYING in top-level directory. +@@ -216,7 +216,7 @@ savebusdir() { + # we don't support path with \n since it would break in 'find ... | while read ..." above + savemntpnt() { + local encodedpath=$1 +- if echo "$1" | grep "\\012" ; then ++ if echo "$1" | grep '\\012' ; then + echo "Ignoring mount point whose filename contains an end of line." + return + fi diff --git a/changelog b/changelog index d6672c0..d9465e0 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,6 @@ +* Fri Oct 17 2025 Krzysztof Pawlinski - 2.5.0-6 +- utils/gather-topology: fix a grep warning when matching octal sequence + * Thu Jan 19 2023 Fedora Release Engineering - 2.5.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/hwloc.spec b/hwloc.spec index c5d5c6d..bc6c1c0 100644 --- a/hwloc.spec +++ b/hwloc.spec @@ -5,6 +5,7 @@ Release: %autorelease License: BSD-2-Clause URL: http://www.open-mpi.org/projects/hwloc/ Source0: https://download.open-mpi.org/release/hwloc/v2.11/hwloc-%{version}.tar.bz2 +Patch0: 0001-fix-a-grep-warning-when-matching-octal-sequence.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} BuildRequires: gcc