Accepting request 1042699 from home:david.anes:branches:Base:System

Fix typo in comment

OBS-URL: https://build.opensuse.org/request/show/1042699
OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=477
This commit is contained in:
Dirk Mueller 2022-12-15 21:23:47 +00:00 committed by Git OBS Bridge
parent c40e37f176
commit 2b5eab6459
3 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,47 @@
From 057579455a40d0cc7612938aa3d11a02b279e89c Mon Sep 17 00:00:00 2001
From: David Anes <david.anes@suse.com>
Date: Fri, 9 Dec 2022 18:09:31 +0100
Subject: [PATCH] tests: allow paths in tests to contain '@' char
Tests fail when the build directory contains
'@' in its path, as its sent to 'sed' unescaped.
This patch allows to build in such environments,
which typically happen on automated systems (for
example, when building concurrently with Jenkins).
---
tests/functions.sh | 4 +++-
tests/ts/minix/fsck | 5 ++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/tests/functions.sh b/tests/functions.sh
index 22bfc24c93..6975930e33 100644
--- a/tests/functions.sh
+++ b/tests/functions.sh
@@ -853,7 +853,9 @@ function ts_fdisk_clean {
# remove non comparable parts of fdisk output
if [ -n "${DEVNAME}" ]; then
- sed -i -e "s@${DEVNAME}@<removed>@;" $TS_OUTPUT $TS_ERRLOG
+ # escape "@" with "\@" in $img. This way sed correctly
+ # replaces paths containing "@" characters
+ sed -i -e "s@${DEVNAME//\@/\\\@}@<removed>@;" $TS_OUTPUT $TS_ERRLOG
fi
sed -i \
diff --git a/tests/ts/minix/fsck b/tests/ts/minix/fsck
index 335f180dcc..f246a87a76 100755
--- a/tests/ts/minix/fsck
+++ b/tests/ts/minix/fsck
@@ -50,7 +50,10 @@ done
rm -f $img
-sed -i "s@$img@image@g" $TS_OUTPUT
+# escape "@" with "\@" in $img. This way sed correctly
+# replaces paths containing "@" characters
+sed -i "s@${img//\@/\\\@}@image@g" $TS_OUTPUT
+
ts_finalize

View File

@ -3,6 +3,13 @@ Wed Dec 14 22:57:15 UTC 2022 - Goldwyn Rodrigues <rgoldwyn@suse.com>
- Fix /usr/bin/findmnt to be in only one package (bsc#1206347)
-------------------------------------------------------------------
Fri Dec 9 17:23:28 UTC 2022 - David Anes <david.anes@suse.com>
- Fix tests not passing when '@' character is in build path:
Fixes rpmbuild %checks fail when @ in the directory path (bsc#1194038).
- Add util-linux-fix-tests-when-at-symbol-in-path.patch
-------------------------------------------------------------------
Thu Dec 8 21:02:08 UTC 2022 - Stanislav Brabec <sbrabec@suse.com>

View File

@ -110,6 +110,8 @@ Patch1: libmount-print-a-blacklist-hint-for-unknown-filesyst.patch
Patch2: Add-documentation-on-blacklisted-modules-to-mount-8-.patch
# PATCH-FIX-SUSE util-linux-bash-completion-su-chsh-l.patch bsc1172427 -- Fix "su -s" bash completion.
Patch4: util-linux-bash-completion-su-chsh-l.patch
# PATCH-FIX-SUSE util-linux-fix-tests-when-@-in-path.patch bsc#1194038 -- rpmbuild %checks fail when @ in the directory path
Patch5: util-linux-fix-tests-when-at-symbol-in-path.patch
BuildRequires: audit-devel
BuildRequires: bc
BuildRequires: binutils-devel