summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-04-04 22:38:19 +0000
committerMike Frysinger <vapier@gentoo.org>2015-04-04 22:38:19 +0000
commitefdc85c9dd2fd32f260fe5e25c5ec76950afa030 (patch)
treedb22fec0dfc6301e8f96d21257e7c0eed12ae271 /sys-apps
parentalpha stable wrt bug #545510 (diff)
downloadgentoo-2-efdc85c9dd2fd32f260fe5e25c5ec76950afa030.tar.gz
gentoo-2-efdc85c9dd2fd32f260fe5e25c5ec76950afa030.tar.bz2
gentoo-2-efdc85c9dd2fd32f260fe5e25c5ec76950afa030.zip
Fix bashisms in test scripts #531020 by Paolo Pedroni.
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/findutils/ChangeLog8
-rw-r--r--sys-apps/findutils/files/findutils-4.5.14-test-bashisms.patch66
-rw-r--r--sys-apps/findutils/findutils-4.5.14-r1.ebuild5
3 files changed, 75 insertions, 4 deletions
diff --git a/sys-apps/findutils/ChangeLog b/sys-apps/findutils/ChangeLog
index 8f06fa38594e..1e8a01b8220f 100644
--- a/sys-apps/findutils/ChangeLog
+++ b/sys-apps/findutils/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-apps/findutils
-# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/findutils/ChangeLog,v 1.225 2014/09/08 23:14:34 vapier Exp $
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/findutils/ChangeLog,v 1.226 2015/04/04 22:38:19 vapier Exp $
+
+ 04 Apr 2015; Mike Frysinger <vapier@gentoo.org>
+ +files/findutils-4.5.14-test-bashisms.patch, findutils-4.5.14-r1.ebuild:
+ Fix bashisms in test scripts #531020 by Paolo Pedroni.
*findutils-4.4.2-r2 (08 Sep 2014)
*findutils-4.5.14-r1 (08 Sep 2014)
diff --git a/sys-apps/findutils/files/findutils-4.5.14-test-bashisms.patch b/sys-apps/findutils/files/findutils-4.5.14-test-bashisms.patch
new file mode 100644
index 000000000000..0bfe7017b8b4
--- /dev/null
+++ b/sys-apps/findutils/files/findutils-4.5.14-test-bashisms.patch
@@ -0,0 +1,66 @@
+From 284afcb4a01996bb1a56f87da1e7c541fd0a903c Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 4 Apr 2015 18:34:51 -0400
+Subject: [PATCH] test: fix bashisms
+
+These test scripts use #!/bin/sh, but then try to use bash-specific
+[[...]] tests. Change them to [...] instead.
+
+Reported-by: Paolo Pedroni <paolo.pedroni@iol.it>
+URL: https://bugs.gentoo.org/531020
+
+* find/testsuite/binary_locations.sh: Change [[...]] to [...].
+* find/testsuite/sv-34079.sh: Likewise.
+---
+ find/testsuite/binary_locations.sh | 6 +++---
+ find/testsuite/sv-34079.sh | 4 ++--
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/find/testsuite/binary_locations.sh b/find/testsuite/binary_locations.sh
+index 96943a0..238d57f 100644
+--- a/find/testsuite/binary_locations.sh
++++ b/find/testsuite/binary_locations.sh
+@@ -1,15 +1,15 @@
+ # Source this file, don't execute it.
+
+-if [[ -z "${testname}" ]]; then
++if [ -z "${testname}" ]; then
+ echo 'Please set $testname before sourcing binary_locations.sh.' >&2
+ exit 1
+ fi
+
+ parent="$(cd .. && pwd)"
+-if [[ -f "${parent}/ftsfind" ]]; then
++if [ -f "${parent}/ftsfind" ]; then
+ ftsfind="${parent}/ftsfind"
+ oldfind="${parent}/find"
+-elif [[ -f "${parent}/oldfind" ]]; then
++elif [ -f "${parent}/oldfind" ]; then
+ ftsfind="${parent}/find"
+ oldfind="${parent}/oldfind"
+ else
+diff --git a/find/testsuite/sv-34079.sh b/find/testsuite/sv-34079.sh
+index 5773a3f..928a9af 100755
+--- a/find/testsuite/sv-34079.sh
++++ b/find/testsuite/sv-34079.sh
+@@ -41,7 +41,7 @@ make_test_data() {
+ }
+
+
+-if [[ -n "${RUN_VERY_EXPENSIVE_TESTS}" ]]; then
++if [ -n "${RUN_VERY_EXPENSIVE_TESTS}" ]; then
+ if outdir=$(mktemp -d); then
+ # Create some test files.
+ bad=""
+@@ -64,7 +64,7 @@ if [[ -n "${RUN_VERY_EXPENSIVE_TESTS}" ]]; then
+ bad="failed to set up the test in ${outdir}"
+ fi
+ rm -rf "${outdir}" || exit 1
+- if [[ -n "${bad}" ]]; then
++ if [ -n "${bad}" ]; then
+ echo "${bad}" >&2
+ exit 1
+ fi
+--
+2.3.5
+
diff --git a/sys-apps/findutils/findutils-4.5.14-r1.ebuild b/sys-apps/findutils/findutils-4.5.14-r1.ebuild
index 90d69e7e3ef3..30245c98a7ea 100644
--- a/sys-apps/findutils/findutils-4.5.14-r1.ebuild
+++ b/sys-apps/findutils/findutils-4.5.14-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/findutils/findutils-4.5.14-r1.ebuild,v 1.1 2014/09/08 23:14:34 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/findutils/findutils-4.5.14-r1.ebuild,v 1.2 2015/04/04 22:38:19 vapier Exp $
EAPI="4"
@@ -21,6 +21,7 @@ DEPEND="${RDEPEND}
nls? ( sys-devel/gettext )"
src_prepare() {
+ epatch "${FILESDIR}"/${P}-test-bashisms.patch #531020
# Don't build or install locate because it conflicts with slocate,
# which is a secure version of locate. See bug 18729
sed -i '/^SUBDIRS/s/locate//' Makefile.in