diff options
-rw-r--r-- | net/socat/Makefile | 9 | ||||
-rw-r--r-- | net/socat/distinfo | 3 | ||||
-rw-r--r-- | net/socat/patches/patch-test.sh | 51 |
3 files changed, 61 insertions, 2 deletions
diff --git a/net/socat/Makefile b/net/socat/Makefile index 36dc1316076..8a171d4f873 100644 --- a/net/socat/Makefile +++ b/net/socat/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.38 2017/02/05 20:40:32 leot Exp $ +# $NetBSD: Makefile,v 1.39 2017/11/11 19:43:06 maya Exp $ DISTNAME= socat-1.7.3.2 +PKGREVISION= 1 CATEGORIES= net MASTER_SITES= http://www.dest-unreach.org/socat/download/ @@ -11,6 +12,12 @@ LICENSE= gnu-gpl-v2 GNU_CONFIGURE= YES +USE_TOOLS+= bash # test tool +REPLACE_BASH+= *.sh + +do-test: + cd ${WRKSRC} && ${MAKE} test + .include "../../mk/bsd.prefs.mk" CONFIGURE_ARGS+= --disable-libwrap diff --git a/net/socat/distinfo b/net/socat/distinfo index 19326f39eac..9b5615b7918 100644 --- a/net/socat/distinfo +++ b/net/socat/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.24 2017/02/05 20:40:32 leot Exp $ +$NetBSD: distinfo,v 1.25 2017/11/11 19:43:06 maya Exp $ SHA1 (socat-1.7.3.2.tar.gz) = 28eca1f8efeadde3f96c1ac89e553c28d736d41d RMD160 (socat-1.7.3.2.tar.gz) = b20967255460adb348aa90f42aaa6bea062f4b7c SHA512 (socat-1.7.3.2.tar.gz) = 540658b2a3d1b87673196282e5c62b97681bd0f1d1e4759ff9d72909d11060235ee9e9521a973603c1b00376436a9444248e5fbc0ffac65f8edb9c9bc28e7972 Size (socat-1.7.3.2.tar.gz) = 611707 bytes SHA1 (patch-mytypes.h) = 94df5a47f7fbadf867e0994edeeb857b467021df +SHA1 (patch-test.sh) = f8e123d3e1a71d6ec34dc2dc42c6de0875a47754 diff --git a/net/socat/patches/patch-test.sh b/net/socat/patches/patch-test.sh new file mode 100644 index 00000000000..f7b4a6faf40 --- /dev/null +++ b/net/socat/patches/patch-test.sh @@ -0,0 +1,51 @@ +$NetBSD: patch-test.sh,v 1.1 2017/11/11 19:43:06 maya Exp $ + +Avoid hard coding /bin/bash so much + +--- test.sh.orig 2017-11-11 19:17:54.549032453 +0000 ++++ test.sh +@@ -698,7 +698,7 @@ for addr in proxy; do + done + echo $OPTS + # prepare dummy server +- $SOCAT tcp-l:$PORT,reuseaddr,crlf exec:"/bin/bash proxyecho.sh" || echo "cannot start proxyecho.sh" >&2 & ++ $SOCAT tcp-l:$PORT,reuseaddr,crlf exec:"bash proxyecho.sh" || echo "cannot start proxyecho.sh" >&2 & + pid=$! + sleep 1 + for o in $(filloptionvalues $OPTS|tr ',' ' '); do +@@ -4548,7 +4548,7 @@ te="$td/test$N.stderr" + tdiff="$td/test$N.diff" + da="test$N $(date) $RANDOM"; da="$da$($ECHO '\r')" + #CMD2="$TRACE $SOCAT tcp4-l:$PORT,crlf SYSTEM:\"read; read; $ECHO \\\"HTTP/1.0 200 OK\n\\\"; cat\"" +-CMD2="$TRACE $SOCAT $opts tcp4-l:$PORT,reuseaddr,crlf exec:\"/bin/bash proxyecho.sh\"" ++CMD2="$TRACE $SOCAT $opts tcp4-l:$PORT,reuseaddr,crlf exec:\"bash proxyecho.sh\"" + CMD="$TRACE $SOCAT $opts - proxy:$LOCALHOST:127.0.0.1:1000,pf=ip4,proxyport=$PORT" + printf "test $F_n $TEST... " $N + eval "$CMD2 2>\"${te}2\" &" +@@ -4594,7 +4594,7 @@ te="$td/test$N.stderr" + tdiff="$td/test$N.diff" + da="test$N $(date) $RANDOM"; da="$da$($ECHO '\r')" + #CMD2="$TRACE $SOCAT $opts tcp6-l:$PORT,crlf SYSTEM:\"read; read; $ECHO \\\"HTTP/1.0 200 OK\n\\\"; cat\"" +-CMD2="$TRACE $SOCAT $opts tcp6-l:$PORT,reuseaddr,crlf exec:\"/bin/bash proxyecho.sh\"" ++CMD2="$TRACE $SOCAT $opts tcp6-l:$PORT,reuseaddr,crlf exec:\"bash proxyecho.sh\"" + CMD="$TRACE $SOCAT $opts - proxy:$LOCALHOST6:127.0.0.1:1000,proxyport=$PORT" + printf "test $F_n $TEST... " $N + eval "$CMD2 2>\"${te}2\" &" +@@ -4828,7 +4828,7 @@ te="$td/test$N.stderr" + tdiff="$td/test$N.diff" + da="test$N $(date) $RANDOM"; da="$da$($ECHO '\r')" + #CMD2="$TRACE $SOCAT $opts tcp-l:$PORT,crlf SYSTEM:\"read; read; $ECHO \\\"HTTP/1.0 200 OK\n\\\"; cat\"" +-CMD2="$TRACE $SOCAT $opts tcp4-l:$PORT,reuseaddr,crlf exec:\"/bin/bash proxyecho.sh -w 2\"" ++CMD2="$TRACE $SOCAT $opts tcp4-l:$PORT,reuseaddr,crlf exec:\"bash proxyecho.sh -w 2\"" + CMD="$TRACE $SOCAT $opts - proxy:$LOCALHOST:127.0.0.1:1000,pf=ip4,proxyport=$PORT" + printf "test $F_n $TEST... " $N + eval "$CMD2 2>\"${te}1\" &" +@@ -6335,7 +6335,7 @@ $PRINTF "test $F_n $TEST... " $N + #$TRACE $SOCAT $opts echo SYSTEM:'exec /bin/bash -c "echo \$PPID '">$tpp"'; echo \$$ '">$tp; read x\"",nofork 2>"$te"; stat=$? + tsh="$td/test$N.sh" + cat <<EOF >"$tsh" +-#! /bin/bash ++#! /usr/bin/env bash + echo \$PPID >"$tpp" + echo \$\$ >"$tp" + read x |