commit 2342b911e89d650ea7159494b51417c62cadd3cf Author: dogsheng <960055655@qq.com> Date: Tue Nov 19 11:51:47 2019 +0800 Package init diff --git a/openvpn-2.4.8.tar.gz b/openvpn-2.4.8.tar.gz new file mode 100644 index 0000000..3d5ce58 Binary files /dev/null and b/openvpn-2.4.8.tar.gz differ diff --git a/openvpn.spec b/openvpn.spec new file mode 100644 index 0000000..cc08e16 --- /dev/null +++ b/openvpn.spec @@ -0,0 +1,110 @@ +Name: openvpn +Version: 2.4.8 +Release: 2 +Summary: A full-featured open source SSL VPN solution +License: GPLv2 +URL: https://community.openvpn.net/openvpn +Source0: https://swupdate.openvpn.org/community/releases/openvpn-%{version}.tar.gz + +BuildRequires: openssl-devel lz4-devel systemd-devel lzo-devel +BuildRequires: iproute pam-devel pkcs11-helper-devel >= 1.11 + +Requires: iproute +Requires(pre): shadow + +%description +OpenVPN is a full-featured open source SSL VPN solution that accommodates a wide range of configurations, +including remote access, site-to-site VPNs, Wi-Fi security, and enterprise-scale remote access solutions with load balancing, +failover, and fine-grained access-controls. Starting with the fundamental premise that complexity is the enemy of security, +OpenVPN offers a cost-effective, lightweight alternative to other VPN technologies that is well-adapted for the SME and enterprise markets. + +%package devel +Summary: Development headers and examples for OpenVPN plug-ins + +%description devel +OpenVPN can be extended through the --plugin option, which provides possibilities to add specialized authentication, +user accounting, packet filtering and related features. These plug-ins need to be written in C and +provides a more low-level and information rich access to similar features as the various script-hooks. + +%package help +Summary: Documents for %{name} +BuildArch: noarch + +%description help +User guide and other related documents for %{name}. + + +%prep +%setup -q -n %{name}-%{version} + + +%build +%configure --enable-x509-alt-username --enable-iproute2 --with-crypto-library=openssl --enable-pkcs11 --enable-selinux --enable-systemd SYSTEMD_UNIT_DIR=%{_unitdir} TMPFILES_DIR=%{_tmpfilesdir} IPROUTE=/sbin/ip +%make_build + + +%install +%make_install +%delete_la +mkdir -p -m 0750 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/client $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/server +cp sample/sample-config-files/client.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/client +cp sample/sample-config-files/server.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/server + +mkdir -m 0750 -p $RPM_BUILD_ROOT%{_rundir}/%{name}-{client,server} +mkdir -m 0770 -p $RPM_BUILD_ROOT%{_sharedstatedir}/%{name} + +cp -a contrib sample $RPM_BUILD_ROOT%{_pkgdocdir} + +%check +make check + + +%pre +getent group openvpn &>/dev/null || groupadd -r openvpn +getent passwd openvpn &>/dev/null || \ + /usr/sbin/useradd -r -g openvpn -s /sbin/nologin -c OpenVPN \ + -d /etc/openvpn openvpn + +%post +%systemd_post openvpn-client@\*.service +%systemd_post openvpn-server@\*.service + +%preun +%systemd_preun openvpn-client@\*.service +%systemd_preun openvpn-server@\*.service + +%postun +%systemd_postun_with_restart openvpn-client@\*.service +%systemd_postun_with_restart openvpn-server@\*.service + + +%files +%license AUTHORS COPYING COPYRIGHT.GPL +%config %{_sysconfdir}/%{name}/*/* +%{_sbindir}/%{name} +%{_libdir}/%{name}/ +%{_unitdir}/%{name}-client@.service +%{_unitdir}/%{name}-server@.service +%{_tmpfilesdir}/%{name}.conf +%attr(0750,-,-) %{_rundir}/%{name}-client +%attr(0750,-,-) %{_rundir}/%{name}-server +%attr(0770,openvpn,openvpn) %{_sharedstatedir}/%{name} + +%files devel +%{_pkgdocdir}/sample/sample-plugins +%{_includedir}/openvpn-plugin.h +%{_includedir}/openvpn-msg.h + +%files help +%{_pkgdocdir} +%{_mandir}/man8/%{name}.8* + +%changelog +* Mon Nov 11 2019 guanyalong 2.4.8-2 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:enable pkcs11 support + +* Thu Nov 7 2019 openEuler Buildteam - 2.4.8.1 +- Package init