1 |
# Authority: vip-ire |
2 |
# Name: Daniel Berteaud |
3 |
|
4 |
Summary: OpenVPN, a strong VPN solution build over SSL, pre-configured for routed mode |
5 |
Name: smeserver-openvpn-routed |
6 |
%define version 0.1.6 |
7 |
%define release 7 |
8 |
Version: %{version} |
9 |
Release: %{release}%{?dist} |
10 |
License: GPL |
11 |
Group: Networking/Remote access |
12 |
Source: %{name}-%{version}.tar.gz |
13 |
|
14 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
15 |
BuildArchitectures: noarch |
16 |
|
17 |
BuildRequires: e-smith-devtools |
18 |
|
19 |
Requires: e-smith-base |
20 |
Requires: openvpn |
21 |
#Requires: perl(Net::OpenVPN::Manage) |
22 |
Patch0:smeserver-openvpn-routed-0.1.6-Add-in-systemd-startup.patch |
23 |
Patch1: smeserver-openvpn-routed-0.1.6-bz11336-sme10compatible.patch |
24 |
Patch2: smeserver-openvpn-routed-0.1.6-bz12020-backup.patch |
25 |
Patch3: smeserver-openvpn-routed-0.1.6-bz12243-logging.patch |
26 |
|
27 |
%description |
28 |
This package contains all the needed scripts and templates |
29 |
to have a full working openvpn server running in routed mode. |
30 |
|
31 |
|
32 |
%changelog |
33 |
* Wed Nov 23 2022 Jean-Philippe Pialasse <tests@pialasse.com> 0.1.6-7.sme |
34 |
- log to a dedicated file [SME: 12243] |
35 |
use locale timestamp |
36 |
|
37 |
* Sat Jul 30 2022 Brian Read <brianr@bjsystems.co.uk> 0.1.6-6.sme |
38 |
- Re-build and link to latest devtools [SME: 11997] |
39 |
|
40 |
* Sat Jul 23 2022 Jean-Philippe Pialasse <tests@pialasse.com> 0.1.6-5.sme |
41 |
- add to core backup [SME: 11997] |
42 |
|
43 |
* Thu Apr 01 2021 Jean-Philippe Pialasse <tests@pialasse.com> 0.1.6-4.sme |
44 |
- autoconfiguration if openvpn-bridge is isntalled and configured [SME: 11336] |
45 |
- reworked systemd unit and scripts |
46 |
- new property HMAC forced to SHA256, instead of insecure default SHA1 [SME: 9925] |
47 |
- Cipher now enforced to AES-128-CBC, instead of insecure default Blowfish [SME: 9919] |
48 |
- possibility to exclude networks to push [SME: 10548] |
49 |
|
50 |
* Thu Feb 04 2021 Brian Read <brianr@bjsystems.co.uk> 0.1.6-2.sme |
51 |
- Initial import to SME10 [SME: 11336] |
52 |
- Add-in-systemd-startup |
53 |
|
54 |
* Mon Apr 10 2017 Daniel Berteaud <daniel@firewall-services.com> 0.1.6-1 |
55 |
- Update pam plugin path [SME: 10220] |
56 |
|
57 |
* Mon Feb 8 2016 Daniel Berteaud <daniel@firewall-services.com> 0.1.5-1 |
58 |
- Create /etc/openvpn/routed/dev/urandom [SME: 9238] |
59 |
|
60 |
* Tue Sep 29 2015 Daniel Berteaud <daniel@firewall-services.com> 0.1.4-1 |
61 |
- Make crl verification optional |
62 |
- Set a default Network if none is set |
63 |
- restrict permission on the management-pass.txt file |
64 |
|
65 |
* Wed Dec 3 2014 Daniel Berteaud <daniel@firewall-services.com> 0.1.3-1 |
66 |
- Correctly push route to local network when not redirecting gw |
67 |
|
68 |
* Mon Jun 23 2014 Daniel Berteaud <daniel@firewall-services.com> 0.1.2-1 |
69 |
- Fix plugin path on x86_64 |
70 |
|
71 |
* Wed Aug 21 2013 Daniel Berteaud <daniel@firewall-services.com> 0.1.1-1 |
72 |
- Use full path to the up script |
73 |
|
74 |
* Tue Jun 11 2013 Daniel Berteaud <daniel@firewall-services.com> 0.1.0-1 |
75 |
- initial release |
76 |
|
77 |
%prep |
78 |
%setup -q -n %{name}-%{version} |
79 |
%patch0 -p1 |
80 |
%patch1 -p1 |
81 |
%patch2 -p1 |
82 |
%patch3 -p1 |
83 |
|
84 |
%build |
85 |
perl createlinks |
86 |
|
87 |
%{__mkdir_p} root/etc/openvpn/routed/ccd |
88 |
%{__mkdir_p} root/etc/openvpn/routed/priv |
89 |
%{__mkdir_p} root/etc/openvpn/routed/pub |
90 |
%{__mkdir_p} root/etc/openvpn/routed/etc |
91 |
%{__mkdir_p} root/etc/openvpn/routed/tmp |
92 |
%{__mkdir_p} root/etc/openvpn/routed/dev |
93 |
%{__mkdir_p} root/var/log/openvpn-routed |
94 |
|
95 |
%install |
96 |
/bin/rm -rf $RPM_BUILD_ROOT |
97 |
(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT) |
98 |
/bin/rm -f %{name}-%{version}-filelist |
99 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
100 |
--file /sbin/e-smith/systemd/openvpn-routed 'attr(0755,root,root)' \ |
101 |
--file /var/service/openvpn-routed/run 'attr(0755,root,root)' \ |
102 |
--file /var/service/openvpn-routed/log/run 'attr(0755,root,root)' \ |
103 |
--dir /var/log/openvpn-routed 'attr(0750,smelog,smelog)' \ |
104 |
--dir /etc/openvpn/routed/pub 'attr(0755,root,root)' \ |
105 |
--dir /etc/openvpn/routed/priv 'attr(0750,root,root)' \ |
106 |
--dir /etc/openvpn/routed/ccd 'attr(0755,root,root)' \ |
107 |
--dir /etc/openvpn/routed/etc 'attr(0755,root,root)' \ |
108 |
--dir /etc/openvpn/routed/tmp 'attr(0770,root,openvpn)' \ |
109 |
--file /usr/bin/ovpn-routed-update-crl 'attr(0750,root,root)' \ |
110 |
--file /etc/openvpn/routed/bin/up 'attr(755,root,root)' \ |
111 |
> %{name}-%{version}-filelist |
112 |
|
113 |
%files -f %{name}-%{version}-filelist |
114 |
%defattr(-,root,root) |
115 |
|
116 |
%clean |
117 |
rm -rf $RPM_BUILD_ROOT |
118 |
|
119 |
%post |
120 |
if [ \! -c /etc/openvpn/routed/dev/urandom ]; then |
121 |
mknod -m 0444 /etc/openvpn/routed/dev/urandom c 1 9 |
122 |
fi |
123 |
|
124 |
%preun |
125 |
|