Hello,
Testing on my system by doing the requested
'./configure && make tests' has this crash:
----------------------8< cut here 8<-----------------------
test try ciphers: proto 2 cipher acss at openssh.org mac hmac-md5
test try ciphers: proto 2 cipher acss at openssh.org mac hmac-sha1-96
test try ciphers: proto 2 cipher acss at openssh.org mac hmac-md5-96
ok try ciphers
run test yes-head.sh ...
head: `-2000' option is obsolete; use `-n 2000'
Try `head --help' for more information.
yes|head returns 0 lines instead of 2000
head: `-2000' option is obsolete; use `-n 2000'
Try `head --help' for more information.
yes|head returns 0 lines instead of 2000
failed yes pipe head
make[1]: *** [t-exec] Error 1
make[1]: Leaving directory `/home/hacker/z/openssh/regress'
make: *** [tests] Error 2
$head --version
head (coreutils) 5.2.1
Written by David MacKenzie and Jim Meyering.
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
----------------------8< cut here 8<-----------------------
The attached patch solved this problem for my system.
JGH
-------------- next part --------------
--- openssh.orig/regress/yes-head.sh 2003-09-13 03:21:14.000000000 +0700
+++ openssh/regress/yes-head.sh 2005-11-26 00:44:16.000000000 +0700
@@ -4,7 +4,7 @@
tid="yes pipe head"
for p in 1 2; do
- lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do
echo yes;done | head -2000"' | (sleep 3 ; wc -l)`
+ lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do
echo yes;done | (export _POSIX2_VERSION=199209 ; head -2000)"' | (sleep
3 ; wc -l)`
if [ $? -ne 0 ]; then
fail "yes|head test failed"
lines = 0;
On Sat, Nov 26, 2005 at 01:03:51AM +0700, John Gatewood Ham wrote:> head: `-2000' option is obsolete; use `-n 2000'[...] Sigh. If anyone is ever talking to the GNU folks responsible for this, please point out that this breakage is unnecessary. It's even covered in the POSIX.1 FAQ (Q 15): http://www.opengroup.org/austin/papers/posix_faq.html> The attached patch solved this problem for my system.Thanks. Does this slightly simpler patch also solve it? (no export and no subshell) Index: yes-head.sh ==================================================================RCS file: /var/cvs/openssh/regress/yes-head.sh,v retrieving revision 1.3 diff -u -p -r1.3 yes-head.sh --- yes-head.sh 12 Sep 2003 20:21:14 -0000 1.3 +++ yes-head.sh 27 Nov 2005 12:34:13 -0000 @@ -4,7 +4,7 @@ tid="yes pipe head" for p in 1 2; do - lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | head -2000"' | (sleep 3 ; wc -l)` + lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -2000"' | (sleep 3 ; wc -l)` if [ $? -ne 0 ]; then fail "yes|head test failed" lines = 0; -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
Apparently Analagous Threads
- [RFC/PATCH] ssh: config directive to modify the local environment
- [PATCH] fix %n expansion in LocalCommand
- [PATCH] ssh: Add option to present certificates on command line
- [PATCH RESEND 1/2] Permit %L and %l percent escapes in Include
- [PATCH v3 1/2] Permit %L and %l percent escapes in ssh Include