summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorMarcus Alves Grando <mnag@FreeBSD.org>2005-11-05 01:24:15 +0000
committerMarcus Alves Grando <mnag@FreeBSD.org>2005-11-05 01:24:15 +0000
commit14b53820f6833406150fb395670204be05ee4df5 (patch)
tree2ea728b9ac82dcac09e36a4f038c64fb849f3024 /security
parentUpgrade to 0.5.2. (diff)
Enables self-tests with WITH_JAIL
Bump PORTREVISION PR: 88488 Submitted by: Matthias Andree <matthias.andree@gmx.de> (maintainer)
Notes
Notes: svn path=/head/; revision=147246
Diffstat (limited to 'security')
-rw-r--r--security/openvpn-devel/Makefile3
-rw-r--r--security/openvpn-devel/files/patch-tests-for-jail63
-rw-r--r--security/openvpn/Makefile3
-rw-r--r--security/openvpn/files/patch-tests-for-jail63
-rw-r--r--security/openvpn20/Makefile3
-rw-r--r--security/openvpn20/files/patch-tests-for-jail63
6 files changed, 192 insertions, 6 deletions
diff --git a/security/openvpn-devel/Makefile b/security/openvpn-devel/Makefile
index b6c6b0681dde..736547f1402b 100644
--- a/security/openvpn-devel/Makefile
+++ b/security/openvpn-devel/Makefile
@@ -7,6 +7,7 @@
PORTNAME= openvpn
PORTVERSION= 2.0.5
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://openvpn.net/release/
@@ -44,10 +45,8 @@ CONFIGURE_ARGS+= --enable-password-save
.endif
# self-tests here
-.if !defined(WITH_JAIL)
post-build:
cd ${WRKSRC} && ${MAKE} check
-.endif
post-install:
.if !defined(NOPORTDOCS)
diff --git a/security/openvpn-devel/files/patch-tests-for-jail b/security/openvpn-devel/files/patch-tests-for-jail
new file mode 100644
index 000000000000..dbd789e0e5f5
--- /dev/null
+++ b/security/openvpn-devel/files/patch-tests-for-jail
@@ -0,0 +1,63 @@
+Index: t_lpback.sh
+===================================================================
+--- t_lpback.sh (revision 774)
++++ t_lpback.sh (working copy)
+@@ -19,11 +19,13 @@
+ # 02110-1301, USA.
+
+ set -e
+-trap "rm -f key.$$ log.$$ ; false" 1 2 3 15
++trap "rm -f key.$$ log.$$ ; trap 0 ; exit 77" 1 2 15
++trap "rm -f key.$$ log.$$ ; exit 1" 0 3
+ ./openvpn --genkey --secret key.$$
+ set +e
+ ( ./openvpn --test-crypto --secret key.$$ ) >log.$$ 2>&1
+ e=$?
+ if [ $e != 0 ] ; then cat log.$$ ; fi
+-rm key.$$
++rm key.$$ log.$$
++trap 0
+ exit $e
+Index: t_cltsrv.sh
+===================================================================
+--- t_cltsrv.sh (revision 774)
++++ t_cltsrv.sh (working copy)
+@@ -20,19 +20,33 @@
+
+ set -e
+ echo "the following test will run about two minutes..." >&2
+-trap "rm -f log.$$ ; false" 1 2 3 15
++trap "rm -f log.$$ log.$$.signal ; trap 0 ; exit 77" 1 2 15
++trap "rm -f log.$$ log.$$.signal ; exit 1" 0 3
++addopts=
++case `uname -s` in
++ FreeBSD)
++ # FreeBSD jails map the outgoing IP to the jail IP - we need to
++ # allow the real IP unless we want the test to run forever.
++ if test `sysctl -n security.jail.jailed` != 0 ; then
++ addopts="--float"
++ fi
++ ;;
++esac
+ set +e
+ (
+-./openvpn --cd "${srcdir}" --config sample-config-files/loopback-server &
+-./openvpn --cd "${srcdir}" --config sample-config-files/loopback-client
+-) >log.$$ 2>&1
++./openvpn --cd "${srcdir}" ${addopts} --down 'echo "srv:${signal}" >&3 ; : #' --tls-exit --ping-exit 180 --config sample-config-files/loopback-server &
++./openvpn --cd "${srcdir}" ${addopts} --down 'echo "clt:${signal}" >&3 ; : #' --tls-exit --ping-exit 180 --config sample-config-files/loopback-client
++) 3>log.$$.signal >log.$$ 2>&1
+ e1=$?
+ wait $!
+ e2=$?
++grep -v ":inactive$" log.$$.signal >/dev/null && { cat log.$$.signal ; echo ; cat log.$$ ; exit 1 ; }
++
+ set -e
+
+ if [ $e1 != 0 ] || [ $e2 != 0 ] ; then
+ cat log.$$
+ exit 1
+ fi
+-rm log.$$
++rm log.$$ log.$$.signal
++trap 0
diff --git a/security/openvpn/Makefile b/security/openvpn/Makefile
index b6c6b0681dde..736547f1402b 100644
--- a/security/openvpn/Makefile
+++ b/security/openvpn/Makefile
@@ -7,6 +7,7 @@
PORTNAME= openvpn
PORTVERSION= 2.0.5
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://openvpn.net/release/
@@ -44,10 +45,8 @@ CONFIGURE_ARGS+= --enable-password-save
.endif
# self-tests here
-.if !defined(WITH_JAIL)
post-build:
cd ${WRKSRC} && ${MAKE} check
-.endif
post-install:
.if !defined(NOPORTDOCS)
diff --git a/security/openvpn/files/patch-tests-for-jail b/security/openvpn/files/patch-tests-for-jail
new file mode 100644
index 000000000000..dbd789e0e5f5
--- /dev/null
+++ b/security/openvpn/files/patch-tests-for-jail
@@ -0,0 +1,63 @@
+Index: t_lpback.sh
+===================================================================
+--- t_lpback.sh (revision 774)
++++ t_lpback.sh (working copy)
+@@ -19,11 +19,13 @@
+ # 02110-1301, USA.
+
+ set -e
+-trap "rm -f key.$$ log.$$ ; false" 1 2 3 15
++trap "rm -f key.$$ log.$$ ; trap 0 ; exit 77" 1 2 15
++trap "rm -f key.$$ log.$$ ; exit 1" 0 3
+ ./openvpn --genkey --secret key.$$
+ set +e
+ ( ./openvpn --test-crypto --secret key.$$ ) >log.$$ 2>&1
+ e=$?
+ if [ $e != 0 ] ; then cat log.$$ ; fi
+-rm key.$$
++rm key.$$ log.$$
++trap 0
+ exit $e
+Index: t_cltsrv.sh
+===================================================================
+--- t_cltsrv.sh (revision 774)
++++ t_cltsrv.sh (working copy)
+@@ -20,19 +20,33 @@
+
+ set -e
+ echo "the following test will run about two minutes..." >&2
+-trap "rm -f log.$$ ; false" 1 2 3 15
++trap "rm -f log.$$ log.$$.signal ; trap 0 ; exit 77" 1 2 15
++trap "rm -f log.$$ log.$$.signal ; exit 1" 0 3
++addopts=
++case `uname -s` in
++ FreeBSD)
++ # FreeBSD jails map the outgoing IP to the jail IP - we need to
++ # allow the real IP unless we want the test to run forever.
++ if test `sysctl -n security.jail.jailed` != 0 ; then
++ addopts="--float"
++ fi
++ ;;
++esac
+ set +e
+ (
+-./openvpn --cd "${srcdir}" --config sample-config-files/loopback-server &
+-./openvpn --cd "${srcdir}" --config sample-config-files/loopback-client
+-) >log.$$ 2>&1
++./openvpn --cd "${srcdir}" ${addopts} --down 'echo "srv:${signal}" >&3 ; : #' --tls-exit --ping-exit 180 --config sample-config-files/loopback-server &
++./openvpn --cd "${srcdir}" ${addopts} --down 'echo "clt:${signal}" >&3 ; : #' --tls-exit --ping-exit 180 --config sample-config-files/loopback-client
++) 3>log.$$.signal >log.$$ 2>&1
+ e1=$?
+ wait $!
+ e2=$?
++grep -v ":inactive$" log.$$.signal >/dev/null && { cat log.$$.signal ; echo ; cat log.$$ ; exit 1 ; }
++
+ set -e
+
+ if [ $e1 != 0 ] || [ $e2 != 0 ] ; then
+ cat log.$$
+ exit 1
+ fi
+-rm log.$$
++rm log.$$ log.$$.signal
++trap 0
diff --git a/security/openvpn20/Makefile b/security/openvpn20/Makefile
index b6c6b0681dde..736547f1402b 100644
--- a/security/openvpn20/Makefile
+++ b/security/openvpn20/Makefile
@@ -7,6 +7,7 @@
PORTNAME= openvpn
PORTVERSION= 2.0.5
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://openvpn.net/release/
@@ -44,10 +45,8 @@ CONFIGURE_ARGS+= --enable-password-save
.endif
# self-tests here
-.if !defined(WITH_JAIL)
post-build:
cd ${WRKSRC} && ${MAKE} check
-.endif
post-install:
.if !defined(NOPORTDOCS)
diff --git a/security/openvpn20/files/patch-tests-for-jail b/security/openvpn20/files/patch-tests-for-jail
new file mode 100644
index 000000000000..dbd789e0e5f5
--- /dev/null
+++ b/security/openvpn20/files/patch-tests-for-jail
@@ -0,0 +1,63 @@
+Index: t_lpback.sh
+===================================================================
+--- t_lpback.sh (revision 774)
++++ t_lpback.sh (working copy)
+@@ -19,11 +19,13 @@
+ # 02110-1301, USA.
+
+ set -e
+-trap "rm -f key.$$ log.$$ ; false" 1 2 3 15
++trap "rm -f key.$$ log.$$ ; trap 0 ; exit 77" 1 2 15
++trap "rm -f key.$$ log.$$ ; exit 1" 0 3
+ ./openvpn --genkey --secret key.$$
+ set +e
+ ( ./openvpn --test-crypto --secret key.$$ ) >log.$$ 2>&1
+ e=$?
+ if [ $e != 0 ] ; then cat log.$$ ; fi
+-rm key.$$
++rm key.$$ log.$$
++trap 0
+ exit $e
+Index: t_cltsrv.sh
+===================================================================
+--- t_cltsrv.sh (revision 774)
++++ t_cltsrv.sh (working copy)
+@@ -20,19 +20,33 @@
+
+ set -e
+ echo "the following test will run about two minutes..." >&2
+-trap "rm -f log.$$ ; false" 1 2 3 15
++trap "rm -f log.$$ log.$$.signal ; trap 0 ; exit 77" 1 2 15
++trap "rm -f log.$$ log.$$.signal ; exit 1" 0 3
++addopts=
++case `uname -s` in
++ FreeBSD)
++ # FreeBSD jails map the outgoing IP to the jail IP - we need to
++ # allow the real IP unless we want the test to run forever.
++ if test `sysctl -n security.jail.jailed` != 0 ; then
++ addopts="--float"
++ fi
++ ;;
++esac
+ set +e
+ (
+-./openvpn --cd "${srcdir}" --config sample-config-files/loopback-server &
+-./openvpn --cd "${srcdir}" --config sample-config-files/loopback-client
+-) >log.$$ 2>&1
++./openvpn --cd "${srcdir}" ${addopts} --down 'echo "srv:${signal}" >&3 ; : #' --tls-exit --ping-exit 180 --config sample-config-files/loopback-server &
++./openvpn --cd "${srcdir}" ${addopts} --down 'echo "clt:${signal}" >&3 ; : #' --tls-exit --ping-exit 180 --config sample-config-files/loopback-client
++) 3>log.$$.signal >log.$$ 2>&1
+ e1=$?
+ wait $!
+ e2=$?
++grep -v ":inactive$" log.$$.signal >/dev/null && { cat log.$$.signal ; echo ; cat log.$$ ; exit 1 ; }
++
+ set -e
+
+ if [ $e1 != 0 ] || [ $e2 != 0 ] ; then
+ cat log.$$
+ exit 1
+ fi
+-rm log.$$
++rm log.$$ log.$$.signal
++trap 0