1 |
%define name smeserver-letsencrypt |
%define name smeserver-letsencrypt |
2 |
%define version 0.4 |
%define version 0.5 |
3 |
%define release 1 |
%define release 12 |
4 |
Summary: Plugin to enable letsencrypt certificates |
Summary: Plugin to enable letsencrypt certificates |
5 |
Name: %{name} |
Name: %{name} |
6 |
Version: %{version} |
Version: %{version} |
9 |
URL: https://letsencrypt.org/ |
URL: https://letsencrypt.org/ |
10 |
Group: SMEserver/addon |
Group: SMEserver/addon |
11 |
Source: %{name}-%{version}.tar.gz |
Source: %{name}-%{version}.tar.gz |
12 |
|
Patch0: smeserver-letsencrypt-remove-debug-lines.patch |
13 |
|
Patch1: smeserver-letsencrypt-remove-licence.patch |
14 |
|
Patch2: smeserver-letsencrypt-log-to-file.patch |
15 |
|
Patch3: smeserver-letsencrypt-API1-URL-change.patch |
16 |
|
Patch4: smeserver-letsencrypt-fix-logging.patch |
17 |
|
Patch5: smeserver-letsencrypt-fix-logging-reverse.patch |
18 |
|
Patch6: smeserver-letsencrypt-fix-acme-v01-url.patch |
19 |
|
Patch7: smeserver-letsencrypt-fix-hook-entry.patch |
20 |
|
Patch8: smeserver-letsencrypt-change-cron-entry.patch |
21 |
|
|
22 |
BuildRoot: /var/tmp/%{name}-%{version} |
BuildRoot: /var/tmp/%{name}-%{version} |
23 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
24 |
BuildRequires: e-smith-devtools |
BuildRequires: e-smith-devtools |
25 |
Requires: e-smith-release >= 8.0 |
Requires: e-smith-release >= 9.0 |
26 |
Requires: dehydrated >= 0.3.1 |
Requires: dehydrated >= 0.6.5 |
27 |
AutoReqProv: no |
AutoReqProv: no |
28 |
|
|
29 |
%description |
%description |
31 |
https://letsencrypt.org/ |
https://letsencrypt.org/ |
32 |
|
|
33 |
%changelog |
%changelog |
34 |
|
* Sat Jan 18 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-12.sme |
35 |
|
- forgot to remove template-begin and cron.daily dir [SME: 10862] |
36 |
|
|
37 |
|
* Fri Jan 17 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-11.sme |
38 |
|
- force required version to 0.6.5 for EPEL version |
39 |
|
- Add new cron template for EPEL version of dehydrated [SME: 10862] |
40 |
|
|
41 |
|
* Fri Jan 17 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-10.sme |
42 |
|
- Fix incorrect HOOK entry in config [SME: 10861] |
43 |
|
|
44 |
|
* Fri Jan 04 2019 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-9.sme |
45 |
|
- Fix incorrect CA line in config [SME: 10688] |
46 |
|
|
47 |
|
* Mon Dec 31 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-8.sme |
48 |
|
- Reverse my previous error [SME: 10681] |
49 |
|
|
50 |
|
* Mon Dec 31 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-7.sme |
51 |
|
- fix spec file numbering |
52 |
|
|
53 |
|
* Mon Dec 31 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-6.sme |
54 |
|
- Fix typo error in cron.daily [SME: 10681] |
55 |
|
|
56 |
|
* Sun Dec 23 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-5.sme |
57 |
|
- Fix changed V1 staging URL [SME: 10595] |
58 |
|
- Thanks Terry Fage |
59 |
|
|
60 |
|
* Wed Dec 12 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-4.sme |
61 |
|
- log to file rather than /dev/null [SME: 10412] |
62 |
|
|
63 |
|
* Tue Oct 13 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-3.sme |
64 |
|
- remove Licence key from config template [SME:10636] |
65 |
|
|
66 |
|
* Tue Jun 19 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-2.sme |
67 |
|
- remove debug print lines |
68 |
|
|
69 |
|
* Tue Jun 12 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-1.sme |
70 |
|
- Update to v2 API [SME:10595] |
71 |
|
- Add key letsencrypt hostOverride to ignore 'Self' host check |
72 |
|
- This requires v0.6 of dehydrated |
73 |
|
|
74 |
|
* Wed Jun 06 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-6.sme |
75 |
|
- Fix missing event actions [SME: 10315] |
76 |
|
|
77 |
|
* Thu May 31 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-5.sme |
78 |
|
- Fix typo in Accept Terms |
79 |
|
- add domain-delete to createlinks [SME: 10315] |
80 |
|
- Update requires release to SME v9 |
81 |
|
- Update requires dehydrated to v0.5 |
82 |
|
|
83 |
|
* Fri Aug 18 2017 Jean-Philipe Pialasse <tests@pialasse.com> 0.4-4.sme |
84 |
|
- change ACCEPT_TERMS template position to appear after shebang in config file [SME: 10410] |
85 |
|
|
86 |
|
* Wed Jul 12 2017 Jean-Philipe Pialasse <tests@pialasse.com> 0.4-3.sme |
87 |
|
- remove workaround for curl dns resolution [SME: 10300] |
88 |
|
- should be corrected at dnscache level (djbdns-1.05-10) |
89 |
|
|
90 |
|
* Fri Apr 28 2017 Jean-Philipe Pialasse <tests@pialasse.com> 0.4-2.sme |
91 |
|
- help accept licence [SME: 10253] |
92 |
|
- workaround for curl issues |
93 |
|
- spec tidying |
94 |
|
|
95 |
* Sat Feb 04 2017 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-1 |
* Sat Feb 04 2017 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-1 |
96 |
- first attempt at using stock letsencrypt script |
- first attempt at using stock letsencrypt script |
97 |
|
|
216 |
|
|
217 |
%prep |
%prep |
218 |
%setup |
%setup |
219 |
|
%patch0 -p1 |
220 |
|
%patch1 -p1 |
221 |
|
%patch2 -p1 |
222 |
|
%patch3 -p1 |
223 |
|
%patch4 -p1 |
224 |
|
%patch5 -p1 |
225 |
|
%patch6 -p1 |
226 |
|
%patch7 -p1 |
227 |
|
%patch8 -p1 |
228 |
|
|
229 |
%build |
%build |
230 |
perl createlinks |
perl createlinks |
249 |
%preun |
%preun |
250 |
|
|
251 |
%post |
%post |
252 |
if [[ ! -e /etc/letsencrypt.sh ]]; |
# if previously installed letsencrypt.sh, but first migration to dehydrated |
253 |
then mv -f /etc/letsencrypt.sh /etc/letsencrypt.sh.old; |
if [[ -e /etc/letsencrypt.sh ]] && [[ ! -e /etc/dehydrated ]]; |
254 |
|
then |
255 |
|
# assume in production |
256 |
|
# CA="https://acme-v01.api.letsencrypt.org/directory" ; |
257 |
|
# CAHASH="$(echo "${CA}" | urlbase64)" |
258 |
|
# mkdir /etc/dehydrated; |
259 |
|
# mkdir -p /etc/dehydrated/accounts |
260 |
|
# cp -a /etc/letsencrypt.sh/private_key.json /etc/dehydrated/accounts/${CAHASH}/registration_info.json |
261 |
|
# cp -a /etc/letsencrypt.sh/private_key.pem /etc/dehydrated/accounts/${CAHASH}/account_key.pem |
262 |
|
# cp -a /etc/letsencrypt.sh/certs /etc/dehydrated/ |
263 |
|
mv -f /etc/letsencrypt.sh /etc/letsencrypt.sh.old; |
264 |
|
fi |
265 |
|
|
266 |
|
# if letsencrypt still there but already migrated to dehydrated |
267 |
|
if [[ -e /etc/letsencrypt.sh ]] && [[ -e /etc/dehydrated/certs ]]; |
268 |
|
then |
269 |
|
mv -f /etc/letsencrypt.sh /etc/letsencrypt.sh.old; |
270 |
fi |
fi |
271 |
|
|
272 |
|
# if first installation of dehydrated |
273 |
if [[ ! -e /etc/dehydrated ]]; |
if [[ ! -e /etc/dehydrated ]]; |
274 |
then mkdir /etc/dehydrated; |
then mkdir /etc/dehydrated; |
275 |
fi |
fi |
290 |
then mkdir -p /home/e-smith/files/ibays/Primary/html/.well-known/acme-challenge; |
then mkdir -p /home/e-smith/files/ibays/Primary/html/.well-known/acme-challenge; |
291 |
fi |
fi |
292 |
|
|
293 |
|
if [[ -d /etc/cron.daily/letsencrypt ]]; |
294 |
|
then rm -rf /etc/cron.daily/letsencrypt; |
295 |
|
fi |
296 |
|
|
297 |
chmod -R 0775 /home/e-smith/files/ibays/Primary/html/.well-known |
chmod -R 0775 /home/e-smith/files/ibays/Primary/html/.well-known |
298 |
chown -R apache:shared /home/e-smith/files/ibays/Primary/html/.well-known |
chown -R apache:shared /home/e-smith/files/ibays/Primary/html/.well-known |
299 |
|
|
300 |
|
|
|
echo "###################################################################" |
|
|
echo "" |
|
|
echo "************************************************************" |
|
|
echo " NOTE ! letsencrypt.sh has had to be renamed to 'dehydrated'" |
|
|
echo "************************************************************" |
|
|
echo "" |
|
|
echo "# After install please set your db keys" |
|
|
echo "# Make sure you set the letsencrypt status key to test" |
|
|
echo "# Enable some domains or hosts" |
|
|
echo "# Then run the following" |
|
|
echo "# signal-event console-save" |
|
|
echo "# dehydrated -c" |
|
|
echo "# Once you are satisfied set the letsencrypt status key to enabled" |
|
|
echo "# mv /etc/dehydrated/private_key.pem /etc/dehydrated/private_key.test" |
|
|
echo "# Run the dehydrated file again to generate your keys" |
|
|
echo "# signal-event console-save" |
|
|
echo "# dehydrated -c -x" |
|
|
echo "# Thereafter only use" |
|
|
echo "# dehydrated -c" |
|
|
echo "# If you make any key changes run console-save first" |
|
|
echo "###################################################################" |
|
301 |
|
|
302 |
%postun |
%postun |