diff --git a/.gitignore b/.gitignore index d833f8a..085484b 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ openvpn-2.1.2.tar.gz.asc /openvpn-2.2.1.tar.gz.asc /openvpn-2.2.2.tar.gz /openvpn-2.2.2.tar.gz.asc +/openvpn-2.3.0.tar.gz +/openvpn-2.3.0.tar.gz.asc diff --git a/openvpn.spec b/openvpn.spec index 20d7a46..8c140ab 100644 --- a/openvpn.spec +++ b/openvpn.spec @@ -4,8 +4,8 @@ %define plugins down-root auth-pam Name: openvpn -Version: 2.2.2 -Release: 9%{?prerelease:.%{prerelease}}%{?dist} +Version: 2.3.0 +Release: 1%{?prerelease:.%{prerelease}}%{?dist} Summary: A full-featured SSL VPN solution URL: http://openvpn.net/ #Source0: http://openvpn.net/beta/%{name}-%{version}%{?prerelease:_%{prerelease}}.tar.gz @@ -22,10 +22,10 @@ Source4: openvpn@.service Source5: %{name}-tmpfile.conf # Don't start openvpn by default. -Patch0: openvpn-init.patch -Patch1: openvpn-script-security.patch -Patch2: openvpn-2.1.1-init.patch -Patch3: openvpn-2.1.1-initinfo.patch +#Patch0: openvpn-init.patch +#Patch1: openvpn-script-security.patch +#Patch2: openvpn-2.1.1-init.patch +#Patch3: openvpn-2.1.1-initinfo.patch License: GPLv2 Group: Applications/Internet BuildRequires: lzo-devel @@ -56,15 +56,15 @@ for compression. %prep %setup -q -n %{name}-%{version}%{?prerelease:_%{prerelease}} -%patch0 -p0 -%patch1 -p1 -%patch2 -p0 -%patch3 -p0 +#%patch0 -p0 +#%patch1 -p1 +#%patch2 -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. -find contrib sample-config-files sample-keys sample-scripts -type f -perm +100 \ +find contrib sample -type f -perm +100 \ -exec chmod a-x {} \; %build @@ -79,61 +79,69 @@ find contrib sample-config-files sample-keys sample-scripts -type f -perm +100 \ --enable-pthread \ --enable-password-save \ --enable-iproute2 \ - --with-iproute-path=/sbin/ip + --with-iproute-path=/sbin/ip \ + --enable-plugins \ + --enable-plugin-down-root \ + --enable-plugin-auth-pam %{__make} -# Build plugins -for plugin in %{plugins} ; do - %{__make} -C plugin/$plugin -done +## Build plugins +#for plugin in %{plugins} ; do +# %{__make} -C src/plugins/$plugin +#done %check # Test Crypto: -./openvpn --genkey --secret key -./openvpn --test-crypto --secret key +./src/openvpn/openvpn --genkey --secret key +./src/openvpn/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 \ + < sample/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 \ + < sample/sample-config-files/loopback-server \ > %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server +pushd sample # Test SSL/TLS negotiations (runs for 2 minutes): -./openvpn --config \ +../src/openvpn/openvpn --config \ %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client & -./openvpn --config \ +../src/openvpn/openvpn --config \ %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server wait +popd rm -f %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client \ %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server %install -install -D -m 0644 %{name}.8 $RPM_BUILD_ROOT%{_mandir}/man8/%{name}.8 -install -D -m 0755 %{name} $RPM_BUILD_ROOT%{_sbindir}/%{name} +#install -D -m 0644 doc/%{name}.8 $RPM_BUILD_ROOT%{_mandir}/man8/%{name}.8 +#install -D -m 0755 src/openvpn/%{name} $RPM_BUILD_ROOT%{_sbindir}/%{name} mkdir -p %{buildroot}%{_unitdir} install -D -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{_unitdir}/ rm -rf %{buildroot}%{_initrddir} install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/%{name} -mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name} -cp -pR easy-rsa $RPM_BUILD_ROOT%{_datadir}/%{name}/ -rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/easy-rsa/Windows -cp %{SOURCE2} %{SOURCE3} sample-config-files/ +#mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name} +#cp -pR easy-rsa $RPM_BUILD_ROOT%{_datadir}/%{name}/ +#rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/easy-rsa/Windows +cp %{SOURCE2} %{SOURCE3} sample/sample-config-files/ -mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/lib -for plugin in %{plugins} ; do - install -m 0755 plugin/$plugin/openvpn-$plugin.so \ - $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/lib/openvpn-$plugin.so - cp plugin/$plugin/README plugin/$plugin.txt -done +#mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/lib +#for plugin in %{plugins} ; do +# install -m 0755 src/plugins/$plugin/openvpn-$plugin.so \ +# $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/lib/openvpn-$plugin.so +# cp src/plugins/$plugin/README plugin/$plugin.txt +#done + +%{__make} install DESTDIR=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -name '*.la' | xargs rm -f # tmpfiles.d mkdir -p %{buildroot}%{_prefix}/lib/tmpfiles.d @@ -178,18 +186,23 @@ fi %files %doc AUTHORS COPYING COPYRIGHT.GPL INSTALL PORTS README # Add NEWS when it isn't zero-length. -%doc plugin/*.txt -%doc contrib sample-config-files sample-keys sample-scripts +%doc src/plugins/*/README.* +%doc contrib sample %{_mandir}/man8/%{name}.8* %{_sbindir}/%{name} -%{_datadir}/%{name}/ +#%{_datadir}/%{name}/ +%{_includedir}/openvpn-plugin.h %{_libdir}/%{name}/ %{_unitdir}/%{name}@.service %attr(0710,root,openvpn) %dir %{_localstatedir}/run/%{name}/ %{_prefix}/lib/tmpfiles.d/%{name}.conf %config %dir %{_sysconfdir}/%{name}/ +%exclude %{_datadir}/doc/%{name}/ %changelog +* Tue Jan 15 2013 Jon Ciesla 2.3.0-1 +- 2.3.0, BZ 893700. + * Wed Sep 26 2012 Jon Ciesla 2.2.2-9 - Dropped net-tools, BZ 785794. diff --git a/sources b/sources index 15f5e88..1e69760 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -c5181e27b7945fa6276d21873329c5c7 openvpn-2.2.2.tar.gz -81ff11ec8cd9fc3c8bc646aae24c4298 openvpn-2.2.2.tar.gz.asc +56cffde5d5320e0b1ec364d3e486aca9 openvpn-2.3.0.tar.gz +3f67e2fa605800a964dbbcfca644d283 openvpn-2.3.0.tar.gz.asc