1 |
%define name smeserver-letsencrypt |
%define name smeserver-letsencrypt |
2 |
%define version 0.4 |
%define version 0.5 |
3 |
%define release 1 |
%define release 3 |
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 |
|
|
15 |
BuildRoot: /var/tmp/%{name}-%{version} |
BuildRoot: /var/tmp/%{name}-%{version} |
16 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
17 |
BuildRequires: e-smith-devtools |
BuildRequires: e-smith-devtools |
18 |
Requires: e-smith-release >= 8.0 |
Requires: e-smith-release >= 9.0 |
19 |
Requires: dehydrated >= 0.3.1 |
Requires: dehydrated >= 0.6 |
20 |
AutoReqProv: no |
AutoReqProv: no |
21 |
|
|
22 |
%description |
%description |
24 |
https://letsencrypt.org/ |
https://letsencrypt.org/ |
25 |
|
|
26 |
%changelog |
%changelog |
27 |
|
* Tue Oct 13 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-3.sme |
28 |
|
- remove Licence key from config template [SME:10636] |
29 |
|
|
30 |
|
* Tue Jun 19 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-2.sme |
31 |
|
- remove debug print lines |
32 |
|
|
33 |
|
* Tue Jun 12 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-1.sme |
34 |
|
- Update to v2 API [SME:10595] |
35 |
|
- Add key letsencrypt hostOverride to ignore 'Self' host check |
36 |
|
- This requires v0.6 of dehydrated |
37 |
|
|
38 |
|
* Wed Jun 06 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-6.sme |
39 |
|
- Fix missing event actions [SME: 10315] |
40 |
|
|
41 |
|
* Thu May 31 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-5.sme |
42 |
|
- Fix typo in Accept Terms |
43 |
|
- add domain-delete to createlinks [SME: 10315] |
44 |
|
- Update requires release to SME v9 |
45 |
|
- Update requires dehydrated to v0.5 |
46 |
|
|
47 |
|
* Fri Aug 18 2017 Jean-Philipe Pialasse <tests@pialasse.com> 0.4-4.sme |
48 |
|
- change ACCEPT_TERMS template position to appear after shebang in config file [SME: 10410] |
49 |
|
|
50 |
|
* Wed Jul 12 2017 Jean-Philipe Pialasse <tests@pialasse.com> 0.4-3.sme |
51 |
|
- remove workaround for curl dns resolution [SME: 10300] |
52 |
|
- should be corrected at dnscache level (djbdns-1.05-10) |
53 |
|
|
54 |
|
* Fri Apr 28 2017 Jean-Philipe Pialasse <tests@pialasse.com> 0.4-2.sme |
55 |
|
- help accept licence [SME: 10253] |
56 |
|
- workaround for curl issues |
57 |
|
- spec tidying |
58 |
|
|
59 |
* 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 |
60 |
- first attempt at using stock letsencrypt script |
- first attempt at using stock letsencrypt script |
61 |
|
|
180 |
|
|
181 |
%prep |
%prep |
182 |
%setup |
%setup |
183 |
|
%patch0 -p1 |
184 |
|
%patch1 -p1 |
185 |
|
|
186 |
%build |
%build |
187 |
perl createlinks |
perl createlinks |
206 |
%preun |
%preun |
207 |
|
|
208 |
%post |
%post |
209 |
if [[ ! -e /etc/letsencrypt.sh ]]; |
# if previously installed letsencrypt.sh, but first migration to dehydrated |
210 |
then mv -f /etc/letsencrypt.sh /etc/letsencrypt.sh.old; |
if [[ -e /etc/letsencrypt.sh ]] && [[ ! -e /etc/dehydrated ]]; |
211 |
|
then |
212 |
|
# assume in production |
213 |
|
# CA="https://acme-v01.api.letsencrypt.org/directory" ; |
214 |
|
# CAHASH="$(echo "${CA}" | urlbase64)" |
215 |
|
# mkdir /etc/dehydrated; |
216 |
|
# mkdir -p /etc/dehydrated/accounts |
217 |
|
# cp -a /etc/letsencrypt.sh/private_key.json /etc/dehydrated/accounts/${CAHASH}/registration_info.json |
218 |
|
# cp -a /etc/letsencrypt.sh/private_key.pem /etc/dehydrated/accounts/${CAHASH}/account_key.pem |
219 |
|
# cp -a /etc/letsencrypt.sh/certs /etc/dehydrated/ |
220 |
|
mv -f /etc/letsencrypt.sh /etc/letsencrypt.sh.old; |
221 |
|
fi |
222 |
|
|
223 |
|
# if letsencrypt still there but already migrated to dehydrated |
224 |
|
if [[ -e /etc/letsencrypt.sh ]] && [[ -e /etc/dehydrated/certs ]]; |
225 |
|
then |
226 |
|
mv -f /etc/letsencrypt.sh /etc/letsencrypt.sh.old; |
227 |
fi |
fi |
228 |
|
|
229 |
|
# if first installation of dehydrated |
230 |
if [[ ! -e /etc/dehydrated ]]; |
if [[ ! -e /etc/dehydrated ]]; |
231 |
then mkdir /etc/dehydrated; |
then mkdir /etc/dehydrated; |
232 |
fi |
fi |
251 |
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 |
252 |
|
|
253 |
|
|
|
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 "###################################################################" |
|
254 |
|
|
255 |
%postun |
%postun |