1 |
%define name smeserver-libreswan |
2 |
%define version 0.5 |
3 |
%define release 36 |
4 |
Summary: Plugin to enable IPSEC connections |
5 |
Name: %{name} |
6 |
Version: %{version} |
7 |
Release: %{release}%{?dist} |
8 |
License: GNU GPL version 2 |
9 |
URL: http://libreswan.org/ |
10 |
Group: SMEserver/addon |
11 |
Source: %{name}-%{version}.tar.gz |
12 |
Patch1: smeserver-libreswan-fix-masq-templates.patch |
13 |
Patch2: smeserver-libreswan-move-logfile.patch |
14 |
Patch3: smeserver-libreswan-add-debug-key.patch |
15 |
Patch4: smeserver-libreswan-fix-rsa-id.patch |
16 |
Patch5: smeserver-libreswan-fix-createlinks.patch |
17 |
Patch6: smeserver-libreswan-ikev2-logrotate.patch |
18 |
Patch7: smeserver-libreswan-add-certificates.patch |
19 |
Patch8: smeserver-libreswan-modify-identifiers.patch |
20 |
Patch9: smeserver-libreswan-modify-identifiers1.patch |
21 |
Patch10: smeserver-libreswan-forceencaps-l2tpd.patch |
22 |
Patch11: smeserver-libreswan-variable-network-interfaces.patch |
23 |
Patch12: smeserver-libreswan-remove-obsoletes.patch |
24 |
Patch13: smeserver-libreswan-add-reauth.patch |
25 |
Patch14: smeserver-libreswan-check-l2tpd-status.patch |
26 |
Patch15: smeserver-libreswan-include-l2tpd-rightsubnet.patch |
27 |
Patch16: smeserver-libreswan-fix-xl2tpd-status-check.patch |
28 |
Patch17: smeserver-libreswan-createlinks.patch |
29 |
Patch18: smeserver-libreswan-modify-leftrightsubnet.patch |
30 |
Patch19: smeserver-libreswan-0.5-Update-for-systemd.patch |
31 |
Patch20: smeserver-libreswan-update-createlinks-update-reauth.patch |
32 |
|
33 |
BuildRoot: /var/tmp/%{name}-%{version} |
34 |
BuildArchitectures: noarch |
35 |
BuildRequires: e-smith-devtools |
36 |
Requires: e-smith-release >= 9.2 |
37 |
Requires: libreswan >= 3.29 |
38 |
AutoReqProv: no |
39 |
|
40 |
%description |
41 |
Libreswan is a free software implementation of the most widely supported and standardised VPN protocol based on ("IPsec") and the Internet Key Exchange ("IKE") |
42 |
|
43 |
%changelog |
44 |
* Wed May 24 2023 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-36.sme |
45 |
- Change ipsec.conf log setting |
46 |
- Create /var/log/pluto/pluto.log |
47 |
- Add reauth 'yes' as an added option |
48 |
- Update createlinks |
49 |
|
50 |
* Mon Mar 01 2021 Brian Read <brianr@bjsystems.co.uk> 0.5-35.sme |
51 |
- Initial Import in SME10 tree [SME: 11405] |
52 |
- Update for systemd |
53 |
|
54 |
* Mon Feb 17 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-34.sme |
55 |
- auto insert leftsourceip and subnet from internal interface |
56 |
- Force right to have a value |
57 |
|
58 |
* Fri Feb 14 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-33.sme |
59 |
- update keyingtries |
60 |
- update virtual-private |
61 |
|
62 |
* Thu Jan 30 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-32.sme |
63 |
- Fix xl2tpd status check |
64 |
|
65 |
* Thu Oct 17 2019 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-31.sme |
66 |
- Allow rightsubnet for xl2tpd in virtual_private |
67 |
- Add check for empty virtual_private hosts |
68 |
|
69 |
* Sun Oct 13 2019 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-30.sme |
70 |
- Fix issue when there is no xl2tpd key |
71 |
|
72 |
* Sat Aug 31 2019 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-29.sme |
73 |
- Bump required Libreswan to 3.29 |
74 |
- add reauth option |
75 |
|
76 |
* Thu Jun 21 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-28.sme |
77 |
- Bump required Libreswan to 3.23 |
78 |
- Change forceencaps to encapsulation |
79 |
- Remove obsolete nat_traversal |
80 |
- Modify ipsec.conf for no rightsubnet in xl2tpd |
81 |
|
82 |
* Tue Sep 19 2017 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-27.sme |
83 |
- Allow variable network interface names - Stefano Zamboni |
84 |
|
85 |
* Thu Jun 15 2017 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-26.sme |
86 |
- add keep-alive option in main ipsec.conf |
87 |
- add forceencaps option overall default and per connection |
88 |
- small code tidy |
89 |
- Add support for L2TPD |
90 |
|
91 |
* Thu Jan 26 2017 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-25.sme |
92 |
- Fix the ipsec.conf as well |
93 |
- remove automatic \@ in IDs - Fixes [SME: 9729] |
94 |
|
95 |
* Thu Jan 26 2017 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-24.sme |
96 |
- remove automatic \@ in IDs - Fixes [SME: 9729] |
97 |
- fix swapped left/right IDs in password file |
98 |
|
99 |
* Wed Jan 25 2017 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-23.sme |
100 |
- Add the ability to use PEM/PKCS#12 certificates - fixes [SME: 9942] |
101 |
- lots of code tidying |
102 |
|
103 |
* Wed Dec 21 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-22.sme |
104 |
- update logrotate completely now I realise it is symlinked |
105 |
- remove UPDPort and add UPDPorts due to ipsec v2 |
106 |
|
107 |
* Wed Dec 21 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-21.sme |
108 |
- add more variations for ike v1/2 |
109 |
- remove logrotate template |
110 |
- add /etc/e-smith/events/logrotate/logfiles2timestamp/var/log/pluto.log |
111 |
- Fix some log noise when first installed and still disabled |
112 |
|
113 |
* Sat Apr 23 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-20.sme |
114 |
- Fix typo in createlinks for sysctl.conf |
115 |
|
116 |
* Mon Apr 04 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-19.sme |
117 |
- Fix ID in ipsec.secrets if ID is set |
118 |
|
119 |
* Thu Mar 24 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-18.sme |
120 |
- Add debug db key to /etc/ipsec.conf |
121 |
- Remove setting public/private keys as they won't affect unless templates are re-expanded |
122 |
- Set xfrm_larval_drop drop correctly |
123 |
|
124 |
* Tue Mar 22 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-17.sme |
125 |
- Move pluto.log to /var/log/pluto |
126 |
- bump libreswan requires version to 3.16 |
127 |
- regenerate masq template on ipsec-update |
128 |
- change wiki location page |
129 |
- add sysctl.conf template |
130 |
- modify masq templates for ipsec status enabled/disabled |
131 |
- only load ipsec.conf rather than *.conf to avoid loading v6neighbor-hole.conf |
132 |
|
133 |
* Thu Mar 10 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-16.sme |
134 |
- Fix masq templates for missing db entries on install |
135 |
|
136 |
* Wed Mar 09 2016 JP Pialasse <tests@pialasse.com> 0.5-15.sme |
137 |
- first import in SME buildsys |
138 |
|
139 |
* Wed Feb 17 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-13 |
140 |
- Fix small typo in readme |
141 |
|
142 |
* Fri Dec 04 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-12 |
143 |
- Add keyingtries |
144 |
- Finally fix add issues using asynchronous |
145 |
|
146 |
* Wed Dec 02 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-11 |
147 |
- Determine host IPtype - static or dynamic IP |
148 |
- auto --up changed to exec |
149 |
- Add checks for Left/Right ID in secrets file |
150 |
|
151 |
* Tue Dec 01 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-10 |
152 |
- Allow dynamic addresses |
153 |
- Add iptype |
154 |
- disallow " in PSK passwords |
155 |
- Revised logging messages |
156 |
|
157 |
* Mon Nov 30 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-9 |
158 |
- Amended templates to allow for rsasig. Early cert settings removed |
159 |
|
160 |
* Wed Nov 25 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-8 |
161 |
- Revised masq templates - disable on ipsec disable |
162 |
- Template ipsec.secrets so Terry won't break it again |
163 |
- Set requires e-smith >=9 and libreswan >=3.14 |
164 |
|
165 |
* Wed Nov 18 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-7 |
166 |
- add 90adjustESP |
167 |
|
168 |
* Tue Nov 17 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-6 |
169 |
- more update to masq firewalls - change -p 50 to -p ESP |
170 |
|
171 |
* Tue Nov 17 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-5 |
172 |
- update masq firewall rules |
173 |
- document clean up |
174 |
|
175 |
* Wed May 27 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-4 |
176 |
- set dpd actions off if ipsec is 'add' |
177 |
- add salifetime key and rename ikelifetime and keylife |
178 |
- change defaults for salifetime and ikelifetime |
179 |
- add in rsasig support |
180 |
|
181 |
* Wed Apr 22 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-3 |
182 |
- change default ike from aes-sha to aes-sha1 |
183 |
|
184 |
* Tue Mar 24 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-2 |
185 |
- More minor fixes - should work OK with xl2tpd |
186 |
|
187 |
* Thu Mar 19 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-1 |
188 |
- Remove templates2expand and added to createlinks |
189 |
- modified ipsec.secret template |
190 |
- various other fixes |
191 |
|
192 |
* Fri Mar 13 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-5 |
193 |
- Big changes again - now have PreviousState to detect changes |
194 |
- Createlinks to S10 to run after expand-templates |
195 |
|
196 |
* Thu Mar 5 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-4 |
197 |
- Changed lots. Removed sysctl.conf template |
198 |
- Changed firewall template |
199 |
|
200 |
* Tue Mar 3 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-3 |
201 |
- Load of code tidying and prep from xl2tpd |
202 |
|
203 |
* Fri Feb 27 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-2 |
204 |
- Update action script and allow for system not in gateway mode |
205 |
- add ike and phase2alg db settings |
206 |
|
207 |
* Tue Feb 24 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-1 |
208 |
- New ipsec-action script |
209 |
- Numerous template changes |
210 |
|
211 |
* Fri Jan 16 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.3-1 |
212 |
- remove debugging lines |
213 |
- remove expand templates from spec file |
214 |
- add status check for ipsec.conf |
215 |
- add comment to masq template |
216 |
- updated db defaults |
217 |
- ipsec.conf not expanded on install |
218 |
- missed auto=start |
219 |
|
220 |
* Fri Jan 16 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-1 |
221 |
- remove rc.local modifications |
222 |
- add /etc/sysctl.conf patches |
223 |
|
224 |
* Thu Jan 15 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-1 |
225 |
- initial release |
226 |
|
227 |
%prep |
228 |
%setup |
229 |
%patch1 -p1 |
230 |
%patch2 -p1 |
231 |
%patch3 -p1 |
232 |
%patch4 -p1 |
233 |
%patch5 -p1 |
234 |
%patch6 -p1 |
235 |
%patch7 -p1 |
236 |
%patch8 -p1 |
237 |
%patch9 -p1 |
238 |
%patch10 -p1 |
239 |
%patch11 -p1 |
240 |
%patch12 -p1 |
241 |
%patch13 -p1 |
242 |
%patch14 -p1 |
243 |
%patch15 -p1 |
244 |
%patch16 -p1 |
245 |
%patch17 -p1 |
246 |
%patch18 -p1 |
247 |
%patch19 -p1 |
248 |
%patch20 -p1 |
249 |
|
250 |
%build |
251 |
perl createlinks |
252 |
|
253 |
%install |
254 |
rm -rf $RPM_BUILD_ROOT |
255 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
256 |
rm -f %{name}-%{version}-filelist |
257 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
258 |
echo "%doc COPYING" >> %{name}-%{version}-filelist |
259 |
|
260 |
|
261 |
%clean |
262 |
cd .. |
263 |
rm -rf %{name}-%{version} |
264 |
|
265 |
%files -f %{name}-%{version}-filelist |
266 |
%defattr(-,root,root) |
267 |
|
268 |
%pre |
269 |
%preun |
270 |
%post |
271 |
|
272 |
/sbin/e-smith/expand-template /etc/rc.d/init.d/masq |
273 |
#/sbin/e-smith/expand-template /etc/inittab |
274 |
#/sbin/init q |
275 |
|
276 |
if [[ ! -d /var/log/pluto ]] |
277 |
then |
278 |
mkdir /var/log/pluto |
279 |
fi |
280 |
|
281 |
echo "see https://wiki.contribs.org/Libreswan" |
282 |
|
283 |
%postun |
284 |
/sbin/e-smith/expand-template /etc/rc.d/init.d/masq |
285 |
#/sbin/e-smith/expand-template /etc/inittab |
286 |
#/sbin/init q |