From 7995a20d31c4e0f555ec4a34eac9bcf110671d1c Mon Sep 17 00:00:00 2001 From: Steven Pritchard Date: Wed, 28 Feb 2007 01:42:40 +0000 Subject: [PATCH] Randomize ports for tests to avoid conflicts on the build servers. --- openvpn.spec | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/openvpn.spec b/openvpn.spec index 48bf31c..8cb8f34 100644 --- a/openvpn.spec +++ b/openvpn.spec @@ -4,7 +4,7 @@ Name: openvpn Version: 2.1 -Release: 0.15%{?prerelease:.%{prerelease}}%{?dist} +Release: 0.16%{?prerelease:.%{prerelease}}%{?dist} Summary: A full-featured SSL VPN solution URL: http://openvpn.net/ Source0: http://openvpn.net/release/%{name}-%{version}%{?prerelease:_%{prerelease}}.tar.gz @@ -67,11 +67,28 @@ done ./openvpn --genkey --secret key ./openvpn --test-crypto --secret key +# Randomize ports for tests to avoid conflicts on the build servers. +cport=$[ 50000 + ($RANDOM % 15534) ] +sport=$[ $cport + 1 ] +sed -e 's/^\(rport\) .*$/\1 '$sport'/' \ + -e 's/^\(lport\) .*$/\1 '$cport'/' \ + < sample-config-files/loopback-client \ + > %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client +sed -e 's/^\(rport\) .*$/\1 '$cport'/' \ + -e 's/^\(lport\) .*$/\1 '$sport'/' \ + < sample-config-files/loopback-server \ + > %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server + # Test SSL/TLS negotiations (runs for 2 minutes): -./openvpn --config sample-config-files/loopback-client & -./openvpn --config sample-config-files/loopback-server +./openvpn --config \ + %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client & +./openvpn --config \ + %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server wait +rm -f %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client \ + %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server + %install rm -rf $RPM_BUILD_ROOT @@ -132,6 +149,9 @@ fi %config %dir %{_sysconfdir}/%{name}/ %changelog +* Tue Feb 27 2007 Steven Pritchard 2.1-0.16.rc1 +- Randomize ports for tests to avoid conflicts on the build servers + * Tue Feb 27 2007 Steven Pritchard 2.1-0.15.rc1 - Update to 2.1_rc1