smeserver-openvpn-routed/smeserver-openvpn-routed.spec

125 lines
4.1 KiB
RPMSpec

# 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 8
Version: %{version}
Release: %{release}%{?dist}
License: GPL
Group: Networking/Remote access
Source: %{name}-%{version}.tar.xz
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
* Thu Mar 06 2025 cvs2git.sh aka Brian Read <brianr@koozali.org> 0.1.6-8.sme
- Roll up patches and move to git repo [SME: 12338]
* Thu Mar 06 2025 BogusDateBot
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
by assuming the date is correct and changing the weekday.
* Wed Nov 23 2022 Jean-Philippe Pialasse <tests@pialasse.com> 0.1.6-7.sme
- log to a dedicated file [SME: 12243]
use locale timestamp
* Sat Jul 30 2022 Brian Read <brianr@bjsystems.co.uk> 0.1.6-6.sme
- Re-build and link to latest devtools [SME: 11997]
* Sat Jul 23 2022 Jean-Philippe Pialasse <tests@pialasse.com> 0.1.6-5.sme
- add to core backup [SME: 11997]
* Thu Apr 01 2021 Jean-Philippe Pialasse <tests@pialasse.com> 0.1.6-4.sme
- autoconfiguration if openvpn-bridge is isntalled and configured [SME: 11336]
- reworked systemd unit and scripts
- new property HMAC forced to SHA256, instead of insecure default SHA1 [SME: 9925]
- Cipher now enforced to AES-128-CBC, instead of insecure default Blowfish [SME: 9919]
- possibility to exclude networks to push [SME: 10548]
* Thu Feb 04 2021 Brian Read <brianr@bjsystems.co.uk> 0.1.6-2.sme
- Initial import to SME10 [SME: 11336]
- Add-in-systemd-startup
* 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/etc
%{__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 /sbin/e-smith/systemd/openvpn-routed 'attr(0755,root,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/etc '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