summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-10-23 09:03:20 +0100
committerSam James <sam@gentoo.org>2023-10-23 09:03:20 +0100
commitb5aadcfe0518d3c2d1516ab577929d597583aded (patch)
treee3e347563cda1c2ba8b7d92c6b9c1c85f3f96c7a /sys-apps/findutils
parentdev-util/gperf: backport parallel tests fix (diff)
downloadgentoo-b5aadcfe0518d3c2d1516ab577929d597583aded.tar.gz
gentoo-b5aadcfe0518d3c2d1516ab577929d597583aded.tar.bz2
gentoo-b5aadcfe0518d3c2d1516ab577929d597583aded.zip
sys-apps/findutils: fix tests w/ non-bash
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-apps/findutils')
-rw-r--r--sys-apps/findutils/files/findutils-4.9.0-dash-tests.patch41
-rw-r--r--sys-apps/findutils/findutils-4.9.0-r2.ebuild6
2 files changed, 46 insertions, 1 deletions
diff --git a/sys-apps/findutils/files/findutils-4.9.0-dash-tests.patch b/sys-apps/findutils/files/findutils-4.9.0-dash-tests.patch
new file mode 100644
index 000000000000..5bbc632e7710
--- /dev/null
+++ b/sys-apps/findutils/files/findutils-4.9.0-dash-tests.patch
@@ -0,0 +1,41 @@
+https://git.savannah.gnu.org/cgit/findutils.git/commit/?id=a5b2e20d8
+
+From a5b2e20d8f93e96817e00af6dd0a4c914580e8a2 Mon Sep 17 00:00:00 2001
+From: Bernhard Voelker <mail@bernhard-voelker.de>
+Date: Tue, 23 May 2023 01:57:47 +0200
+Subject: tests: fix FP in xargs test when /bin/sh is dash
+
+Dash as /bin/sh apparently does not know $'\n' syntax.
+
+* tests/xargs/verbose-quote.sh: Define NL variable for newline character;
+change from $'\n' syntax to the above variable when generating input
+for xargs.
+
+Fixes https://sv.gnu.org/bugs/?63934
+---
+ tests/xargs/verbose-quote.sh | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/tests/xargs/verbose-quote.sh b/tests/xargs/verbose-quote.sh
+index d25f7db..e3607ce 100755
+--- a/tests/xargs/verbose-quote.sh
++++ b/tests/xargs/verbose-quote.sh
+@@ -28,12 +28,15 @@ printf "%s\n" \
+ || framework_failure_
+
+ # Run xargs with -t for verious commands which require quoting.
++# (Use NL because dash as /bin/sh does not know $'\n' syntax.)
++nl='
++'
+ printf '%s\0' \
+ 000 \
+ '10 0' \
+ '20"0' \
+ "30'0" \
+- 40$'\n'0 \
++ "40${nl}0" \
+ | xargs -0t '-I{}' './my command' 'hel lo' '{}' world > out 2> err \
+ || fail=1
+
+--
+cgit v1.1
diff --git a/sys-apps/findutils/findutils-4.9.0-r2.ebuild b/sys-apps/findutils/findutils-4.9.0-r2.ebuild
index 8bf357fa6a0e..39f3f9cd3dbf 100644
--- a/sys-apps/findutils/findutils-4.9.0-r2.ebuild
+++ b/sys-apps/findutils/findutils-4.9.0-r2.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..11} )
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/findutils.asc
inherit flag-o-matic python-any-r1 verify-sig
@@ -32,6 +32,10 @@ BDEPEND="
verify-sig? ( sec-keys/openpgp-keys-findutils )
"
+PATCHES=(
+ "${FILESDIR}"/${P}-dash-tests.patch
+)
+
pkg_setup() {
use test && python-any-r1_pkg_setup
}