pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/net/socat



Module Name:    pkgsrc
Committed By:   maya
Date:           Sat Nov 11 19:43:06 UTC 2017

Modified Files:
        pkgsrc/net/socat: Makefile distinfo
Added Files:
        pkgsrc/net/socat/patches: patch-test.sh

Log Message:
socat: improve our ability to run the tests, less use of /bin/bash

bump PKGREVISION in case any of those scripts are used at runtime


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 pkgsrc/net/socat/Makefile
cvs rdiff -u -r1.24 -r1.25 pkgsrc/net/socat/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/net/socat/patches/patch-test.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/socat/Makefile
diff -u pkgsrc/net/socat/Makefile:1.38 pkgsrc/net/socat/Makefile:1.39
--- pkgsrc/net/socat/Makefile:1.38      Sun Feb  5 20:40:32 2017
+++ pkgsrc/net/socat/Makefile   Sat Nov 11 19:43:06 2017
@@ -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

Index: pkgsrc/net/socat/distinfo
diff -u pkgsrc/net/socat/distinfo:1.24 pkgsrc/net/socat/distinfo:1.25
--- pkgsrc/net/socat/distinfo:1.24      Sun Feb  5 20:40:32 2017
+++ pkgsrc/net/socat/distinfo   Sat Nov 11 19:43:06 2017
@@ -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

Added files:

Index: pkgsrc/net/socat/patches/patch-test.sh
diff -u /dev/null pkgsrc/net/socat/patches/patch-test.sh:1.1
--- /dev/null   Sat Nov 11 19:43:06 2017
+++ pkgsrc/net/socat/patches/patch-test.sh      Sat Nov 11 19:43:06 2017
@@ -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



Home | Main Index | Thread Index | Old Index