summaryrefslogtreecommitdiff
path: root/shells
diff options
context:
space:
mode:
authorleot <leot@pkgsrc.org>2019-05-15 09:18:01 +0000
committerleot <leot@pkgsrc.org>2019-05-15 09:18:01 +0000
commit26d89c9ef7a861b0d3409e541d9b18e9d9dc92ba (patch)
tree39523d317d3f3998760bde7837f15c8fe7ad99c7 /shells
parent50c7864518d2f33bd012ee915ddf8e421beab866 (diff)
downloadpkgsrc-26d89c9ef7a861b0d3409e541d9b18e9d9dc92ba.tar.gz
tcsh: Add upstream patch to address filename expansion test failures
When $HOME environment variable is set, e.g. in pkgrsc where a fake homedir is injected, ~ is expanded to $HOME while ~user is expanded to the passwd(5) home_dir field leading to inconsistency in the test. No PKGREVISION bump since that change only affects tests.
Diffstat (limited to 'shells')
-rw-r--r--shells/tcsh/distinfo4
-rw-r--r--shells/tcsh/patches/patch-tests_subst.at22
-rw-r--r--shells/tcsh/patches/patch-tests_variables.at26
3 files changed, 51 insertions, 1 deletions
diff --git a/shells/tcsh/distinfo b/shells/tcsh/distinfo
index 1167028b844..c7fbe854cfd 100644
--- a/shells/tcsh/distinfo
+++ b/shells/tcsh/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.41 2019/05/09 11:46:21 leot Exp $
+$NetBSD: distinfo,v 1.42 2019/05/15 09:18:01 leot Exp $
SHA1 (tcsh-6.21.00.tar.gz) = aeb43ee952d47bdf33cc29fdecd170cfedbe8481
RMD160 (tcsh-6.21.00.tar.gz) = 665d522ded31e3fa23b71a5726d2d52e1c60e085
@@ -9,3 +9,5 @@ SHA1 (patch-ab) = 8cf26988778b5331360eb1aab98bfcc920c71ac2
SHA1 (patch-configure) = 6970c041a66910325d1fb53ebf8ab3627d764778
SHA1 (patch-nls_Makefile.in) = 58d859e8a50e6436b9bc6514497eb876426d92d7
SHA1 (patch-sh.h) = ac6211ddd5e552e9baec2d35aed5e7e573cab04e
+SHA1 (patch-tests_subst.at) = 3be0ec07237e12653805644f1d545122842e97c9
+SHA1 (patch-tests_variables.at) = 809c7c006f59581bdae8280eabc7a43ce93a697d
diff --git a/shells/tcsh/patches/patch-tests_subst.at b/shells/tcsh/patches/patch-tests_subst.at
new file mode 100644
index 00000000000..60d5ee8f25b
--- /dev/null
+++ b/shells/tcsh/patches/patch-tests_subst.at
@@ -0,0 +1,22 @@
+$NetBSD: patch-tests_subst.at,v 1.1 2019/05/15 09:18:01 leot Exp $
+
+Reset $HOME before tests that need $HOME.
+
+From upstream commit cb71f67782b2829ca66b341daba70e501d028eee.
+
+--- tests/subst.at.orig 2019-05-08 18:39:28.000000000 +0000
++++ tests/subst.at
+@@ -50,11 +50,11 @@ nothing*
+ foo* ab{c,d} ^fo*
+ ])
+
+-AT_CHECK([echo 'echo ~; echo "$HOME"' | tcsh -f | uniq | wc -l | tr -d ' \t'],
++AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }'); echo 'echo ~; echo "$HOME"' | tcsh -f | uniq | wc -l | tr -d ' \t'],
+ , [1
+ ])
+
+-AT_CHECK([echo "echo ~$(id -un)/foo; echo \"$HOME/foo\"" | tcsh -f | uniq dnl
++AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }'); echo "echo ~$(id -un)/foo; echo \"\$HOME/foo\"" | tcsh -f | uniq dnl
+ | wc -l | tr -d ' \t'], , [1
+ ])
+
diff --git a/shells/tcsh/patches/patch-tests_variables.at b/shells/tcsh/patches/patch-tests_variables.at
new file mode 100644
index 00000000000..2ac08a8dd2e
--- /dev/null
+++ b/shells/tcsh/patches/patch-tests_variables.at
@@ -0,0 +1,26 @@
+$NetBSD: patch-tests_variables.at,v 1.1 2019/05/15 09:18:01 leot Exp $
+
+Reset $HOME before tests that need $HOME.
+
+From upstream commit cb71f67782b2829ca66b341daba70e501d028eee.
+
+--- tests/variables.at.orig 2019-05-08 18:39:28.000000000 +0000
++++ tests/variables.at
+@@ -588,7 +588,7 @@ printenv HOME
+ setenv HOME /bar
+ echo $home
+ ]])
+-AT_CHECK([tcsh -f home.csh], ,
++AT_CHECK([export HOME=$(getent passwd $(id -nu) | awk -F: '{ print $(NF - 1) }'); tcsh -f home.csh], ,
+ [1
+ 1
+ /foo
+@@ -705,7 +705,7 @@ AT_CLEANUP
+
+
+ AT_SETUP([$ cdtohome])
+-AT_CHECK([tcsh -f -c 'cd'], 0)
++AT_CHECK([export HOME=$(getent passwd $(id -nu) | awk -F: '{ print $(NF - 1) }'); tcsh -f -c 'cd'], 0)
+ AT_CLEANUP
+ AT_SETUP([$ noimplicithome])
+ AT_CHECK([tcsh -f -c 'unset cdtohome; cd'], 1, , [cd: Too few arguments.