1 |
unnilennium |
1.1 |
%define name smeserver-letsencrypt |
2 |
jcrisp |
1.7 |
%define version 0.5 |
3 |
jcrisp |
1.9 |
%define release 3 |
4 |
unnilennium |
1.1 |
Summary: Plugin to enable letsencrypt certificates |
5 |
|
|
Name: %{name} |
6 |
|
|
Version: %{version} |
7 |
|
|
Release: %{release} |
8 |
|
|
License: GNU GPL version 2 |
9 |
|
|
URL: https://letsencrypt.org/ |
10 |
|
|
Group: SMEserver/addon |
11 |
|
|
Source: %{name}-%{version}.tar.gz |
12 |
jcrisp |
1.8 |
Patch0: smeserver-letsencrypt-remove-debug-lines.patch |
13 |
jcrisp |
1.9 |
Patch1: smeserver-letsencrypt-remove-licence.patch |
14 |
unnilennium |
1.2 |
|
15 |
unnilennium |
1.1 |
BuildRoot: /var/tmp/%{name}-%{version} |
16 |
|
|
BuildArchitectures: noarch |
17 |
|
|
BuildRequires: e-smith-devtools |
18 |
jcrisp |
1.5 |
Requires: e-smith-release >= 9.0 |
19 |
jcrisp |
1.7 |
Requires: dehydrated >= 0.6 |
20 |
unnilennium |
1.1 |
AutoReqProv: no |
21 |
|
|
|
22 |
|
|
%description |
23 |
|
|
Lets Encrypt is a free, automated, and open certificate authority |
24 |
|
|
https://letsencrypt.org/ |
25 |
|
|
|
26 |
|
|
%changelog |
27 |
jcrisp |
1.9 |
* 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 |
jcrisp |
1.8 |
* Tue Jun 19 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-2.sme |
31 |
|
|
- remove debug print lines |
32 |
|
|
|
33 |
jcrisp |
1.7 |
* 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 |
jcrisp |
1.6 |
* Wed Jun 06 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-6.sme |
39 |
|
|
- Fix missing event actions [SME: 10315] |
40 |
|
|
|
41 |
jcrisp |
1.5 |
* 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 |
unnilennium |
1.4 |
* 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 |
unnilennium |
1.3 |
* 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 |
unnilennium |
1.2 |
* 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 |
unnilennium |
1.1 |
* Sat Feb 04 2017 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-1 |
60 |
|
|
- first attempt at using stock letsencrypt script |
61 |
|
|
|
62 |
|
|
* Wed Sep 14 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.3-1 |
63 |
|
|
- Due to madness at letsencrypt the script had to be renamed for copyright reasons |
64 |
|
|
- move /etc/letsencrypt.sh to /etc/dehydrated |
65 |
|
|
- change references to letsencrypt.sh to dehydrated |
66 |
|
|
- Fix typos in readme |
67 |
|
|
|
68 |
|
|
* Wed Aug 3 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-10 |
69 |
|
|
- Some tweaks from JPP for the domains.txt file |
70 |
|
|
|
71 |
|
|
* Wed Aug 3 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-9 |
72 |
|
|
- Fix version differences with between v8 and v9 |
73 |
|
|
|
74 |
|
|
* Thu Jul 14 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-8 |
75 |
|
|
- Remove spaces in POSTIN [[]] |
76 |
|
|
|
77 |
|
|
* Mon Jun 27 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-7 |
78 |
|
|
- fix another typo in bash scripts |
79 |
|
|
- fix typo in Docs |
80 |
|
|
|
81 |
|
|
* Fri Jun 10 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-6 |
82 |
|
|
- Fix typo in domains.txt |
83 |
|
|
- Set configure default type none |
84 |
|
|
|
85 |
|
|
* Tue May 31 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-5 |
86 |
|
|
- update incorrect bash scripts in spec file |
87 |
|
|
|
88 |
|
|
* Tue May 31 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-4 |
89 |
|
|
- update letsencrypt requires |
90 |
|
|
|
91 |
|
|
* Mon May 30 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-3 |
92 |
|
|
- add support for letsencrypt.sh v0.2 |
93 |
|
|
- config.sh renamed to config |
94 |
|
|
- fix trailing / on urls in 40ACME |
95 |
|
|
|
96 |
|
|
* Mon Apr 04 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-2 |
97 |
|
|
- letsencrypt.sh now calls deploy-cert with an argument for the chain file |
98 |
|
|
- thanks to Dan Brown |
99 |
|
|
|
100 |
|
|
* Tue Mar 29 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-1 |
101 |
|
|
- Remove letsencrypt.sh script and put in separate RPM |
102 |
|
|
|
103 |
|
|
* Tue Mar 29 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-21 |
104 |
|
|
- modify hook script templates as per Dan Browd contribution |
105 |
|
|
|
106 |
|
|
* Thu Mar 17 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-20 |
107 |
|
|
- updated letsencrypt.sh |
108 |
|
|
- https://github.com/lukas2511/letsencrypt.sh/commit/429c5250ede7ff4af3b6f37b39925cfa5afee278 |
109 |
|
|
- Add "" to wellknown path in config.sh |
110 |
|
|
|
111 |
|
|
* Fri Feb 05 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-19 |
112 |
|
|
- updated letsencrypt.sh |
113 |
|
|
- https://github.com/lukas2511/letsencrypt.sh/commit/21c18dd3b8c2572b894d9ec2e5c3fc2589f56f32 |
114 |
|
|
|
115 |
|
|
* Tue Jan 26 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-18 |
116 |
|
|
- updated letsencrypt.sh |
117 |
|
|
- https://github.com/lukas2511/letsencrypt.sh/commit/79ff846e267c30d85988f79f58b81bc7bd91790c |
118 |
|
|
|
119 |
|
|
* Sat Jan 23 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-17 |
120 |
|
|
- Fix typos in hook-script |
121 |
|
|
- Add latest letsencrypt.sh script |
122 |
|
|
|
123 |
|
|
* Wed Jan 20 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-16 |
124 |
|
|
- Minor fixes including typo in cron.daily |
125 |
|
|
|
126 |
|
|
* Tue Jan 19 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-15 |
127 |
|
|
- Missed a " |
128 |
|
|
- remove ' from Let's encrypt and add URL |
129 |
|
|
|
130 |
|
|
* Tue Jan 19 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-14 |
131 |
|
|
- Updated readme and install notes |
132 |
|
|
- Allow either domains or hosts |
133 |
|
|
|
134 |
|
|
* Mon Jan 18 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-13 |
135 |
|
|
- Add missing templates.metadata file |
136 |
|
|
- modify spec file wording |
137 |
|
|
|
138 |
|
|
* Mon Jan 18 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-12 |
139 |
|
|
- Set hookscript to always run unless letsencrypt is disabled |
140 |
|
|
- Add cron.daily script to console-save action and set perms |
141 |
|
|
|
142 |
|
|
* Sun Jan 17 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-11 |
143 |
|
|
- Fix hook-script.sh perms using templates.metadata |
144 |
|
|
|
145 |
|
|
* Sun Jan 17 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-10 |
146 |
|
|
- Add latest revision of letsencrypt.sh |
147 |
|
|
- add hookscript.sh templates and various fixes |
148 |
|
|
|
149 |
|
|
* Sat Jan 16 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-9 |
150 |
|
|
- Add latest revision of letsencrypt.sh |
151 |
|
|
|
152 |
|
|
* Fri Jan 15 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-8 |
153 |
|
|
- set +x on hook-script and correct file name in config |
154 |
|
|
|
155 |
|
|
* Fri Jan 15 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-7 |
156 |
|
|
- Add missing curly brace |
157 |
|
|
- Move Status check line up so we can generate empty file if disabled |
158 |
|
|
|
159 |
|
|
* Fri Jan 15 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-6 |
160 |
|
|
- Add hookScript key |
161 |
|
|
|
162 |
|
|
* Fri Jan 15 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-5 |
163 |
|
|
- Modify spec file to add paths and set permisssions |
164 |
|
|
|
165 |
|
|
* Thu Jan 14 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-4 |
166 |
|
|
- Modify file paths and cron script |
167 |
|
|
|
168 |
|
|
* Thu Jan 14 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-3 |
169 |
|
|
- updated bash script in spec file |
170 |
|
|
- updated file locations in README.MD |
171 |
|
|
|
172 |
|
|
* Wed Jan 13 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-2 |
173 |
|
|
- Moved config.sh file location |
174 |
|
|
- added cron.daily template - only works if letsencrypt is enabled |
175 |
|
|
- added check to create /etc/letsencrypt.sh directory if it does not exist |
176 |
|
|
- added latest letsencrypt.sh script |
177 |
|
|
|
178 |
|
|
* Thu Jan 07 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-1 |
179 |
|
|
- initial release |
180 |
|
|
|
181 |
|
|
%prep |
182 |
|
|
%setup |
183 |
jcrisp |
1.8 |
%patch0 -p1 |
184 |
jcrisp |
1.9 |
%patch1 -p1 |
185 |
unnilennium |
1.1 |
|
186 |
|
|
%build |
187 |
|
|
perl createlinks |
188 |
|
|
|
189 |
|
|
%install |
190 |
|
|
rm -rf $RPM_BUILD_ROOT |
191 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
192 |
|
|
rm -f %{name}-%{version}-filelist |
193 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
194 |
|
|
echo "%doc COPYING" >> %{name}-%{version}-filelist |
195 |
|
|
|
196 |
|
|
|
197 |
|
|
%clean |
198 |
|
|
cd .. |
199 |
|
|
rm -rf %{name}-%{version} |
200 |
|
|
|
201 |
|
|
%files -f %{name}-%{version}-filelist |
202 |
|
|
%defattr(-,root,root) |
203 |
|
|
|
204 |
|
|
%pre |
205 |
|
|
|
206 |
|
|
%preun |
207 |
|
|
|
208 |
|
|
%post |
209 |
unnilennium |
1.2 |
# if previously installed letsencrypt.sh, but first migration to dehydrated |
210 |
|
|
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 |
unnilennium |
1.1 |
fi |
228 |
|
|
|
229 |
unnilennium |
1.2 |
# if first installation of dehydrated |
230 |
unnilennium |
1.1 |
if [[ ! -e /etc/dehydrated ]]; |
231 |
|
|
then mkdir /etc/dehydrated; |
232 |
|
|
fi |
233 |
|
|
|
234 |
|
|
if [[ -f /usr/local/bin/config.sh ]]; |
235 |
|
|
then mv -f /usr/local/bin/config.sh /usr/local/bin/config.sh.orig; |
236 |
|
|
fi |
237 |
|
|
|
238 |
|
|
if [[ -f /usr/local/bin/config ]]; |
239 |
|
|
then mv -f /usr/local/bin/config /usr/local/bin/config.old; |
240 |
|
|
fi |
241 |
|
|
|
242 |
|
|
if [[ -f /usr/local/bin/domain.txt ]]; |
243 |
|
|
then mv -f /usr/local/bin/domains.txt /usr/local/bin/domains.txt.orig; |
244 |
|
|
fi |
245 |
|
|
|
246 |
|
|
if [[ ! -e /home/e-smith/files/ibays/Primary/html/.well-known/acme-challenge ]]; |
247 |
|
|
then mkdir -p /home/e-smith/files/ibays/Primary/html/.well-known/acme-challenge; |
248 |
|
|
fi |
249 |
|
|
|
250 |
|
|
chmod -R 0775 /home/e-smith/files/ibays/Primary/html/.well-known |
251 |
|
|
chown -R apache:shared /home/e-smith/files/ibays/Primary/html/.well-known |
252 |
|
|
|
253 |
|
|
|
254 |
|
|
|
255 |
|
|
%postun |