You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
93 lines
2.8 KiB
93 lines
2.8 KiB
# Authority: vip-ire
|
|
# Name: Daniel Berteaud
|
|
|
|
Summary: OpenVPN, a strong VPN solution build over SSL, pre-configured for routed mode
|
|
Name: smeserver-openvpn-routed
|
|
%define version 0.1.6
|
|
%define release 1
|
|
Version: %{version}
|
|
Release: %{release}%{?dist}
|
|
License: GPL
|
|
Group: Networking/Remote access
|
|
Source: %{name}-%{version}.tar.gz
|
|
|
|
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
|
|
BuildArchitectures: noarch
|
|
|
|
BuildRequires: e-smith-devtools
|
|
|
|
Requires: e-smith-base
|
|
Requires: openvpn
|
|
#Requires: perl(Net::OpenVPN::Manage)
|
|
|
|
%description
|
|
This package contains all the needed scripts and templates
|
|
to have a full working openvpn server running in routed mode.
|
|
|
|
|
|
%changelog
|
|
* Mon Apr 10 2017 Daniel Berteaud <daniel@firewall-services.com> 0.1.6-1
|
|
- Update pam plugin path [SME: 10220]
|
|
|
|
* Mon Feb 8 2016 Daniel Berteaud <daniel@firewall-services.com> 0.1.5-1
|
|
- Create /etc/openvpn/routed/dev/urandom [SME: 9238]
|
|
|
|
* Tue Sep 29 2015 Daniel Berteaud <daniel@firewall-services.com> 0.1.4-1
|
|
- Make crl verification optional
|
|
- Set a default Network if none is set
|
|
- restrict permission on the management-pass.txt file
|
|
|
|
* Wed Dec 3 2014 Daniel Berteaud <daniel@firewall-services.com> 0.1.3-1
|
|
- Correctly push route to local network when not redirecting gw
|
|
|
|
* Mon Jun 23 2014 Daniel Berteaud <daniel@firewall-services.com> 0.1.2-1
|
|
- Fix plugin path on x86_64
|
|
|
|
* Wed Aug 21 2013 Daniel Berteaud <daniel@firewall-services.com> 0.1.1-1
|
|
- Use full path to the up script
|
|
|
|
* Tue Jun 11 2013 Daniel Berteaud <daniel@firewall-services.com> 0.1.0-1
|
|
- initial release
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{version}
|
|
|
|
%build
|
|
perl createlinks
|
|
|
|
%{__mkdir_p} root/etc/openvpn/routed/ccd
|
|
%{__mkdir_p} root/etc/openvpn/routed/priv
|
|
%{__mkdir_p} root/etc/openvpn/routed/pub
|
|
%{__mkdir_p} root/etc/openvpn/routed/tmp
|
|
%{__mkdir_p} root/etc/openvpn/routed/dev
|
|
%{__mkdir_p} root/var/log/openvpn-routed
|
|
|
|
%install
|
|
/bin/rm -rf $RPM_BUILD_ROOT
|
|
(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT)
|
|
/bin/rm -f %{name}-%{version}-filelist
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
|
|
--file /var/service/openvpn-routed/run 'attr(0755,root,root)' \
|
|
--file /var/service/openvpn-routed/log/run 'attr(0755,root,root)' \
|
|
--dir /var/log/openvpn-routed 'attr(0750,smelog,smelog)' \
|
|
--dir /etc/openvpn/routed/pub 'attr(0755,root,root)' \
|
|
--dir /etc/openvpn/routed/priv 'attr(0750,root,root)' \
|
|
--dir /etc/openvpn/routed/ccd 'attr(0755,root,root)' \
|
|
--dir /etc/openvpn/routed/tmp 'attr(0770,root,openvpn)' \
|
|
--file /usr/bin/ovpn-routed-update-crl 'attr(0750,root,root)' \
|
|
--file /etc/openvpn/routed/bin/up 'attr(755,root,root)' \
|
|
> %{name}-%{version}-filelist
|
|
|
|
%files -f %{name}-%{version}-filelist
|
|
%defattr(-,root,root)
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%post
|
|
if [ \! -c /etc/openvpn/routed/dev/urandom ]; then
|
|
mknod -m 0444 /etc/openvpn/routed/dev/urandom c 1 9
|
|
fi
|
|
|
|
%preun
|
|
|
|
|