1 |
%define name smeserver-letsencrypt |
%define name smeserver-letsencrypt |
2 |
%define version 0.4 |
%define version 0.5 |
3 |
%define release 1 |
%define release 6 |
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 |
BuildRoot: /var/tmp/%{name}-%{version} |
BuildRoot: /var/tmp/%{name}-%{version} |
18 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
19 |
BuildRequires: e-smith-devtools |
BuildRequires: e-smith-devtools |
20 |
Requires: e-smith-release >= 8.0 |
Requires: e-smith-release >= 9.0 |
21 |
Requires: dehydrated >= 0.3.1 |
Requires: dehydrated >= 0.6 |
22 |
AutoReqProv: no |
AutoReqProv: no |
23 |
|
|
24 |
%description |
%description |
26 |
https://letsencrypt.org/ |
https://letsencrypt.org/ |
27 |
|
|
28 |
%changelog |
%changelog |
29 |
|
* Mon Dec 31 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-5.sme |
30 |
|
- Fix typo error in cron.daily [SME: 10681] |
31 |
|
|
32 |
|
* Sun Dec 23 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-5.sme |
33 |
|
- Fix changed V1 staging URL [SME: 10595] |
34 |
|
- Thanks Terry Fage |
35 |
|
|
36 |
|
* Wed Dec 12 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-4.sme |
37 |
|
- log to file rather than /dev/null [SME: 10412] |
38 |
|
|
39 |
|
* Tue Oct 13 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-3.sme |
40 |
|
- remove Licence key from config template [SME:10636] |
41 |
|
|
42 |
|
* Tue Jun 19 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-2.sme |
43 |
|
- remove debug print lines |
44 |
|
|
45 |
|
* Tue Jun 12 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-1.sme |
46 |
|
- Update to v2 API [SME:10595] |
47 |
|
- Add key letsencrypt hostOverride to ignore 'Self' host check |
48 |
|
- This requires v0.6 of dehydrated |
49 |
|
|
50 |
|
* Wed Jun 06 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-6.sme |
51 |
|
- Fix missing event actions [SME: 10315] |
52 |
|
|
53 |
|
* Thu May 31 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-5.sme |
54 |
|
- Fix typo in Accept Terms |
55 |
|
- add domain-delete to createlinks [SME: 10315] |
56 |
|
- Update requires release to SME v9 |
57 |
|
- Update requires dehydrated to v0.5 |
58 |
|
|
59 |
|
* Fri Aug 18 2017 Jean-Philipe Pialasse <tests@pialasse.com> 0.4-4.sme |
60 |
|
- change ACCEPT_TERMS template position to appear after shebang in config file [SME: 10410] |
61 |
|
|
62 |
|
* Wed Jul 12 2017 Jean-Philipe Pialasse <tests@pialasse.com> 0.4-3.sme |
63 |
|
- remove workaround for curl dns resolution [SME: 10300] |
64 |
|
- should be corrected at dnscache level (djbdns-1.05-10) |
65 |
|
|
66 |
|
* Fri Apr 28 2017 Jean-Philipe Pialasse <tests@pialasse.com> 0.4-2.sme |
67 |
|
- help accept licence [SME: 10253] |
68 |
|
- workaround for curl issues |
69 |
|
- spec tidying |
70 |
|
|
71 |
* 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 |
72 |
- first attempt at using stock letsencrypt script |
- first attempt at using stock letsencrypt script |
73 |
|
|
192 |
|
|
193 |
%prep |
%prep |
194 |
%setup |
%setup |
195 |
|
%patch0 -p1 |
196 |
|
%patch1 -p1 |
197 |
|
%patch2 -p1 |
198 |
|
%patch3 -p1 |
199 |
|
%patch4 -p1 |
200 |
|
|
201 |
%build |
%build |
202 |
perl createlinks |
perl createlinks |
221 |
%preun |
%preun |
222 |
|
|
223 |
%post |
%post |
224 |
if [[ ! -e /etc/letsencrypt.sh ]]; |
# if previously installed letsencrypt.sh, but first migration to dehydrated |
225 |
then mv -f /etc/letsencrypt.sh /etc/letsencrypt.sh.old; |
if [[ -e /etc/letsencrypt.sh ]] && [[ ! -e /etc/dehydrated ]]; |
226 |
|
then |
227 |
|
# assume in production |
228 |
|
# CA="https://acme-v01.api.letsencrypt.org/directory" ; |
229 |
|
# CAHASH="$(echo "${CA}" | urlbase64)" |
230 |
|
# mkdir /etc/dehydrated; |
231 |
|
# mkdir -p /etc/dehydrated/accounts |
232 |
|
# cp -a /etc/letsencrypt.sh/private_key.json /etc/dehydrated/accounts/${CAHASH}/registration_info.json |
233 |
|
# cp -a /etc/letsencrypt.sh/private_key.pem /etc/dehydrated/accounts/${CAHASH}/account_key.pem |
234 |
|
# cp -a /etc/letsencrypt.sh/certs /etc/dehydrated/ |
235 |
|
mv -f /etc/letsencrypt.sh /etc/letsencrypt.sh.old; |
236 |
|
fi |
237 |
|
|
238 |
|
# if letsencrypt still there but already migrated to dehydrated |
239 |
|
if [[ -e /etc/letsencrypt.sh ]] && [[ -e /etc/dehydrated/certs ]]; |
240 |
|
then |
241 |
|
mv -f /etc/letsencrypt.sh /etc/letsencrypt.sh.old; |
242 |
fi |
fi |
243 |
|
|
244 |
|
# if first installation of dehydrated |
245 |
if [[ ! -e /etc/dehydrated ]]; |
if [[ ! -e /etc/dehydrated ]]; |
246 |
then mkdir /etc/dehydrated; |
then mkdir /etc/dehydrated; |
247 |
fi |
fi |
266 |
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 |
267 |
|
|
268 |
|
|
|
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 "###################################################################" |
|
269 |
|
|
270 |
%postun |
%postun |