|
|
@ -4,8 +4,8 @@
|
|
|
|
%define plugins down-root auth-pam
|
|
|
|
%define plugins down-root auth-pam
|
|
|
|
|
|
|
|
|
|
|
|
Name: openvpn
|
|
|
|
Name: openvpn
|
|
|
|
Version: 2.2.2
|
|
|
|
Version: 2.3.0
|
|
|
|
Release: 9%{?prerelease:.%{prerelease}}%{?dist}
|
|
|
|
Release: 1%{?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/beta/%{name}-%{version}%{?prerelease:_%{prerelease}}.tar.gz
|
|
|
|
#Source0: http://openvpn.net/beta/%{name}-%{version}%{?prerelease:_%{prerelease}}.tar.gz
|
|
|
@ -22,10 +22,10 @@ Source4: openvpn@.service
|
|
|
|
Source5: %{name}-tmpfile.conf
|
|
|
|
Source5: %{name}-tmpfile.conf
|
|
|
|
|
|
|
|
|
|
|
|
# Don't start openvpn by default.
|
|
|
|
# Don't start openvpn by default.
|
|
|
|
Patch0: openvpn-init.patch
|
|
|
|
#Patch0: openvpn-init.patch
|
|
|
|
Patch1: openvpn-script-security.patch
|
|
|
|
#Patch1: openvpn-script-security.patch
|
|
|
|
Patch2: openvpn-2.1.1-init.patch
|
|
|
|
#Patch2: openvpn-2.1.1-init.patch
|
|
|
|
Patch3: openvpn-2.1.1-initinfo.patch
|
|
|
|
#Patch3: openvpn-2.1.1-initinfo.patch
|
|
|
|
License: GPLv2
|
|
|
|
License: GPLv2
|
|
|
|
Group: Applications/Internet
|
|
|
|
Group: Applications/Internet
|
|
|
|
BuildRequires: lzo-devel
|
|
|
|
BuildRequires: lzo-devel
|
|
|
@ -56,15 +56,15 @@ for compression.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}-%{version}%{?prerelease:_%{prerelease}}
|
|
|
|
%setup -q -n %{name}-%{version}%{?prerelease:_%{prerelease}}
|
|
|
|
%patch0 -p0
|
|
|
|
#%patch0 -p0
|
|
|
|
%patch1 -p1
|
|
|
|
#%patch1 -p1
|
|
|
|
%patch2 -p0
|
|
|
|
#%patch2 -p0
|
|
|
|
%patch3 -p0
|
|
|
|
#%patch3 -p0
|
|
|
|
|
|
|
|
|
|
|
|
sed -i -e 's,%{_datadir}/openvpn/plugin,%{_libdir}/openvpn/plugin,' openvpn.8
|
|
|
|
sed -i -e 's,%{_datadir}/openvpn/plugin,%{_libdir}/openvpn/plugin,' doc/openvpn.8
|
|
|
|
|
|
|
|
|
|
|
|
# %%doc items shouldn't be executable.
|
|
|
|
# %%doc items shouldn't be executable.
|
|
|
|
find contrib sample-config-files sample-keys sample-scripts -type f -perm +100 \
|
|
|
|
find contrib sample -type f -perm +100 \
|
|
|
|
-exec chmod a-x {} \;
|
|
|
|
-exec chmod a-x {} \;
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
@ -79,61 +79,69 @@ find contrib sample-config-files sample-keys sample-scripts -type f -perm +100 \
|
|
|
|
--enable-pthread \
|
|
|
|
--enable-pthread \
|
|
|
|
--enable-password-save \
|
|
|
|
--enable-password-save \
|
|
|
|
--enable-iproute2 \
|
|
|
|
--enable-iproute2 \
|
|
|
|
--with-iproute-path=/sbin/ip
|
|
|
|
--with-iproute-path=/sbin/ip \
|
|
|
|
|
|
|
|
--enable-plugins \
|
|
|
|
|
|
|
|
--enable-plugin-down-root \
|
|
|
|
|
|
|
|
--enable-plugin-auth-pam
|
|
|
|
%{__make}
|
|
|
|
%{__make}
|
|
|
|
|
|
|
|
|
|
|
|
# Build plugins
|
|
|
|
## Build plugins
|
|
|
|
for plugin in %{plugins} ; do
|
|
|
|
#for plugin in %{plugins} ; do
|
|
|
|
%{__make} -C plugin/$plugin
|
|
|
|
# %{__make} -C src/plugins/$plugin
|
|
|
|
done
|
|
|
|
#done
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
%check
|
|
|
|
# Test Crypto:
|
|
|
|
# Test Crypto:
|
|
|
|
./openvpn --genkey --secret key
|
|
|
|
./src/openvpn/openvpn --genkey --secret key
|
|
|
|
./openvpn --test-crypto --secret key
|
|
|
|
./src/openvpn/openvpn --test-crypto --secret key
|
|
|
|
|
|
|
|
|
|
|
|
# Randomize ports for tests to avoid conflicts on the build servers.
|
|
|
|
# Randomize ports for tests to avoid conflicts on the build servers.
|
|
|
|
cport=$[ 50000 + ($RANDOM % 15534) ]
|
|
|
|
cport=$[ 50000 + ($RANDOM % 15534) ]
|
|
|
|
sport=$[ $cport + 1 ]
|
|
|
|
sport=$[ $cport + 1 ]
|
|
|
|
sed -e 's/^\(rport\) .*$/\1 '$sport'/' \
|
|
|
|
sed -e 's/^\(rport\) .*$/\1 '$sport'/' \
|
|
|
|
-e 's/^\(lport\) .*$/\1 '$cport'/' \
|
|
|
|
-e 's/^\(lport\) .*$/\1 '$cport'/' \
|
|
|
|
< sample-config-files/loopback-client \
|
|
|
|
< sample/sample-config-files/loopback-client \
|
|
|
|
> %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client
|
|
|
|
> %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client
|
|
|
|
sed -e 's/^\(rport\) .*$/\1 '$cport'/' \
|
|
|
|
sed -e 's/^\(rport\) .*$/\1 '$cport'/' \
|
|
|
|
-e 's/^\(lport\) .*$/\1 '$sport'/' \
|
|
|
|
-e 's/^\(lport\) .*$/\1 '$sport'/' \
|
|
|
|
< sample-config-files/loopback-server \
|
|
|
|
< sample/sample-config-files/loopback-server \
|
|
|
|
> %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server
|
|
|
|
> %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pushd sample
|
|
|
|
# Test SSL/TLS negotiations (runs for 2 minutes):
|
|
|
|
# Test SSL/TLS negotiations (runs for 2 minutes):
|
|
|
|
./openvpn --config \
|
|
|
|
../src/openvpn/openvpn --config \
|
|
|
|
%{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client &
|
|
|
|
%{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client &
|
|
|
|
./openvpn --config \
|
|
|
|
../src/openvpn/openvpn --config \
|
|
|
|
%{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server
|
|
|
|
%{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server
|
|
|
|
wait
|
|
|
|
wait
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
|
|
rm -f %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client \
|
|
|
|
rm -f %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client \
|
|
|
|
%{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server
|
|
|
|
%{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%install
|
|
|
|
install -D -m 0644 %{name}.8 $RPM_BUILD_ROOT%{_mandir}/man8/%{name}.8
|
|
|
|
#install -D -m 0644 doc/%{name}.8 $RPM_BUILD_ROOT%{_mandir}/man8/%{name}.8
|
|
|
|
install -D -m 0755 %{name} $RPM_BUILD_ROOT%{_sbindir}/%{name}
|
|
|
|
#install -D -m 0755 src/openvpn/%{name} $RPM_BUILD_ROOT%{_sbindir}/%{name}
|
|
|
|
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_unitdir}
|
|
|
|
mkdir -p %{buildroot}%{_unitdir}
|
|
|
|
install -D -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{_unitdir}/
|
|
|
|
install -D -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{_unitdir}/
|
|
|
|
rm -rf %{buildroot}%{_initrddir}
|
|
|
|
rm -rf %{buildroot}%{_initrddir}
|
|
|
|
install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
|
|
|
|
install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
|
|
|
|
|
|
|
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
|
|
|
|
#mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
|
|
|
|
cp -pR easy-rsa $RPM_BUILD_ROOT%{_datadir}/%{name}/
|
|
|
|
#cp -pR easy-rsa $RPM_BUILD_ROOT%{_datadir}/%{name}/
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/easy-rsa/Windows
|
|
|
|
#rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/easy-rsa/Windows
|
|
|
|
cp %{SOURCE2} %{SOURCE3} sample-config-files/
|
|
|
|
cp %{SOURCE2} %{SOURCE3} sample/sample-config-files/
|
|
|
|
|
|
|
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/lib
|
|
|
|
#mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/lib
|
|
|
|
for plugin in %{plugins} ; do
|
|
|
|
#for plugin in %{plugins} ; do
|
|
|
|
install -m 0755 plugin/$plugin/openvpn-$plugin.so \
|
|
|
|
# install -m 0755 src/plugins/$plugin/openvpn-$plugin.so \
|
|
|
|
$RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/lib/openvpn-$plugin.so
|
|
|
|
# $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/lib/openvpn-$plugin.so
|
|
|
|
cp plugin/$plugin/README plugin/$plugin.txt
|
|
|
|
# cp src/plugins/$plugin/README plugin/$plugin.txt
|
|
|
|
done
|
|
|
|
#done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%{__make} install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
find $RPM_BUILD_ROOT -name '*.la' | xargs rm -f
|
|
|
|
|
|
|
|
|
|
|
|
# tmpfiles.d
|
|
|
|
# tmpfiles.d
|
|
|
|
mkdir -p %{buildroot}%{_prefix}/lib/tmpfiles.d
|
|
|
|
mkdir -p %{buildroot}%{_prefix}/lib/tmpfiles.d
|
|
|
@ -178,18 +186,23 @@ fi
|
|
|
|
%files
|
|
|
|
%files
|
|
|
|
%doc AUTHORS COPYING COPYRIGHT.GPL INSTALL PORTS README
|
|
|
|
%doc AUTHORS COPYING COPYRIGHT.GPL INSTALL PORTS README
|
|
|
|
# Add NEWS when it isn't zero-length.
|
|
|
|
# Add NEWS when it isn't zero-length.
|
|
|
|
%doc plugin/*.txt
|
|
|
|
%doc src/plugins/*/README.*
|
|
|
|
%doc contrib sample-config-files sample-keys sample-scripts
|
|
|
|
%doc contrib sample
|
|
|
|
%{_mandir}/man8/%{name}.8*
|
|
|
|
%{_mandir}/man8/%{name}.8*
|
|
|
|
%{_sbindir}/%{name}
|
|
|
|
%{_sbindir}/%{name}
|
|
|
|
%{_datadir}/%{name}/
|
|
|
|
#%{_datadir}/%{name}/
|
|
|
|
|
|
|
|
%{_includedir}/openvpn-plugin.h
|
|
|
|
%{_libdir}/%{name}/
|
|
|
|
%{_libdir}/%{name}/
|
|
|
|
%{_unitdir}/%{name}@.service
|
|
|
|
%{_unitdir}/%{name}@.service
|
|
|
|
%attr(0710,root,openvpn) %dir %{_localstatedir}/run/%{name}/
|
|
|
|
%attr(0710,root,openvpn) %dir %{_localstatedir}/run/%{name}/
|
|
|
|
%{_prefix}/lib/tmpfiles.d/%{name}.conf
|
|
|
|
%{_prefix}/lib/tmpfiles.d/%{name}.conf
|
|
|
|
%config %dir %{_sysconfdir}/%{name}/
|
|
|
|
%config %dir %{_sysconfdir}/%{name}/
|
|
|
|
|
|
|
|
%exclude %{_datadir}/doc/%{name}/
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
|
|
|
|
* Tue Jan 15 2013 Jon Ciesla <limburgher@gmail.com> 2.3.0-1
|
|
|
|
|
|
|
|
- 2.3.0, BZ 893700.
|
|
|
|
|
|
|
|
|
|
|
|
* Wed Sep 26 2012 Jon Ciesla <limburgher@gmail.com> 2.2.2-9
|
|
|
|
* Wed Sep 26 2012 Jon Ciesla <limburgher@gmail.com> 2.2.2-9
|
|
|
|
- Dropped net-tools, BZ 785794.
|
|
|
|
- Dropped net-tools, BZ 785794.
|
|
|
|
|
|
|
|
|
|
|
|