Randomize ports for tests to avoid conflicts on the build servers.

epel8
Steven Pritchard 18 years ago
parent a8c7ba40a6
commit 7995a20d31

@ -4,7 +4,7 @@
Name: openvpn Name: openvpn
Version: 2.1 Version: 2.1
Release: 0.15%{?prerelease:.%{prerelease}}%{?dist} Release: 0.16%{?prerelease:.%{prerelease}}%{?dist}
Summary: A full-featured SSL VPN solution Summary: A full-featured SSL VPN solution
URL: http://openvpn.net/ URL: http://openvpn.net/
Source0: http://openvpn.net/release/%{name}-%{version}%{?prerelease:_%{prerelease}}.tar.gz Source0: http://openvpn.net/release/%{name}-%{version}%{?prerelease:_%{prerelease}}.tar.gz
@ -67,11 +67,28 @@ done
./openvpn --genkey --secret key ./openvpn --genkey --secret key
./openvpn --test-crypto --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): # Test SSL/TLS negotiations (runs for 2 minutes):
./openvpn --config sample-config-files/loopback-client & ./openvpn --config \
./openvpn --config sample-config-files/loopback-server %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client &
./openvpn --config \
%{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server
wait wait
rm -f %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client \
%{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -132,6 +149,9 @@ fi
%config %dir %{_sysconfdir}/%{name}/ %config %dir %{_sysconfdir}/%{name}/
%changelog %changelog
* Tue Feb 27 2007 Steven Pritchard <steve@kspei.com> 2.1-0.16.rc1
- Randomize ports for tests to avoid conflicts on the build servers
* Tue Feb 27 2007 Steven Pritchard <steve@kspei.com> 2.1-0.15.rc1 * Tue Feb 27 2007 Steven Pritchard <steve@kspei.com> 2.1-0.15.rc1
- Update to 2.1_rc1 - Update to 2.1_rc1

Loading…
Cancel
Save