1 |
unnilennium |
1.1 |
%define name smeserver-letsencrypt |
2 |
jcrisp |
1.7 |
%define version 0.5 |
3 |
jcrisp |
1.15 |
%define release 9 |
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 |
jcrisp |
1.10 |
Patch2: smeserver-letsencrypt-log-to-file.patch |
15 |
jcrisp |
1.11 |
Patch3: smeserver-letsencrypt-API1-URL-change.patch |
16 |
jcrisp |
1.12 |
Patch4: smeserver-letsencrypt-fix-logging.patch |
17 |
jcrisp |
1.14 |
Patch5: smeserver-letsencrypt-fix-logging-reverse.patch |
18 |
jcrisp |
1.15 |
Patch6: smeserver-letsencrypt-fix-acme-v01-url.patch |
19 |
unnilennium |
1.1 |
BuildRoot: /var/tmp/%{name}-%{version} |
20 |
|
|
BuildArchitectures: noarch |
21 |
|
|
BuildRequires: e-smith-devtools |
22 |
jcrisp |
1.5 |
Requires: e-smith-release >= 9.0 |
23 |
jcrisp |
1.7 |
Requires: dehydrated >= 0.6 |
24 |
unnilennium |
1.1 |
AutoReqProv: no |
25 |
|
|
|
26 |
|
|
%description |
27 |
|
|
Lets Encrypt is a free, automated, and open certificate authority |
28 |
|
|
https://letsencrypt.org/ |
29 |
|
|
|
30 |
|
|
%changelog |
31 |
jcrisp |
1.15 |
* Fri Jan 04 2019 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-9.sme |
32 |
|
|
- Fix incorrect CA line in config [SME: 10688] |
33 |
|
|
|
34 |
jcrisp |
1.14 |
* Mon Dec 31 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-8.sme |
35 |
jcrisp |
1.15 |
- Reverse my previous error [SME: 10681] |
36 |
jcrisp |
1.14 |
|
37 |
jcrisp |
1.13 |
* Mon Dec 31 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-7.sme |
38 |
|
|
- fix spec file numbering |
39 |
|
|
|
40 |
|
|
* Mon Dec 31 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-6.sme |
41 |
jcrisp |
1.12 |
- Fix typo error in cron.daily [SME: 10681] |
42 |
|
|
|
43 |
jcrisp |
1.11 |
* Sun Dec 23 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-5.sme |
44 |
|
|
- Fix changed V1 staging URL [SME: 10595] |
45 |
|
|
- Thanks Terry Fage |
46 |
|
|
|
47 |
jcrisp |
1.10 |
* Wed Dec 12 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-4.sme |
48 |
|
|
- log to file rather than /dev/null [SME: 10412] |
49 |
|
|
|
50 |
jcrisp |
1.9 |
* Tue Oct 13 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-3.sme |
51 |
|
|
- remove Licence key from config template [SME:10636] |
52 |
|
|
|
53 |
jcrisp |
1.8 |
* Tue Jun 19 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-2.sme |
54 |
|
|
- remove debug print lines |
55 |
|
|
|
56 |
jcrisp |
1.7 |
* Tue Jun 12 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-1.sme |
57 |
|
|
- Update to v2 API [SME:10595] |
58 |
|
|
- Add key letsencrypt hostOverride to ignore 'Self' host check |
59 |
|
|
- This requires v0.6 of dehydrated |
60 |
|
|
|
61 |
jcrisp |
1.6 |
* Wed Jun 06 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-6.sme |
62 |
|
|
- Fix missing event actions [SME: 10315] |
63 |
|
|
|
64 |
jcrisp |
1.5 |
* Thu May 31 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-5.sme |
65 |
|
|
- Fix typo in Accept Terms |
66 |
|
|
- add domain-delete to createlinks [SME: 10315] |
67 |
|
|
- Update requires release to SME v9 |
68 |
|
|
- Update requires dehydrated to v0.5 |
69 |
|
|
|
70 |
unnilennium |
1.4 |
* Fri Aug 18 2017 Jean-Philipe Pialasse <tests@pialasse.com> 0.4-4.sme |
71 |
|
|
- change ACCEPT_TERMS template position to appear after shebang in config file [SME: 10410] |
72 |
|
|
|
73 |
unnilennium |
1.3 |
* Wed Jul 12 2017 Jean-Philipe Pialasse <tests@pialasse.com> 0.4-3.sme |
74 |
|
|
- remove workaround for curl dns resolution [SME: 10300] |
75 |
|
|
- should be corrected at dnscache level (djbdns-1.05-10) |
76 |
|
|
|
77 |
unnilennium |
1.2 |
* Fri Apr 28 2017 Jean-Philipe Pialasse <tests@pialasse.com> 0.4-2.sme |
78 |
|
|
- help accept licence [SME: 10253] |
79 |
|
|
- workaround for curl issues |
80 |
|
|
- spec tidying |
81 |
|
|
|
82 |
unnilennium |
1.1 |
* Sat Feb 04 2017 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-1 |
83 |
|
|
- first attempt at using stock letsencrypt script |
84 |
|
|
|
85 |
|
|
* Wed Sep 14 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.3-1 |
86 |
|
|
- Due to madness at letsencrypt the script had to be renamed for copyright reasons |
87 |
|
|
- move /etc/letsencrypt.sh to /etc/dehydrated |
88 |
|
|
- change references to letsencrypt.sh to dehydrated |
89 |
|
|
- Fix typos in readme |
90 |
|
|
|
91 |
|
|
* Wed Aug 3 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-10 |
92 |
|
|
- Some tweaks from JPP for the domains.txt file |
93 |
|
|
|
94 |
|
|
* Wed Aug 3 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-9 |
95 |
|
|
- Fix version differences with between v8 and v9 |
96 |
|
|
|
97 |
|
|
* Thu Jul 14 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-8 |
98 |
|
|
- Remove spaces in POSTIN [[]] |
99 |
|
|
|
100 |
|
|
* Mon Jun 27 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-7 |
101 |
|
|
- fix another typo in bash scripts |
102 |
|
|
- fix typo in Docs |
103 |
|
|
|
104 |
|
|
* Fri Jun 10 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-6 |
105 |
|
|
- Fix typo in domains.txt |
106 |
|
|
- Set configure default type none |
107 |
|
|
|
108 |
|
|
* Tue May 31 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-5 |
109 |
|
|
- update incorrect bash scripts in spec file |
110 |
|
|
|
111 |
|
|
* Tue May 31 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-4 |
112 |
|
|
- update letsencrypt requires |
113 |
|
|
|
114 |
|
|
* Mon May 30 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-3 |
115 |
|
|
- add support for letsencrypt.sh v0.2 |
116 |
|
|
- config.sh renamed to config |
117 |
|
|
- fix trailing / on urls in 40ACME |
118 |
|
|
|
119 |
|
|
* Mon Apr 04 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-2 |
120 |
|
|
- letsencrypt.sh now calls deploy-cert with an argument for the chain file |
121 |
|
|
- thanks to Dan Brown |
122 |
|
|
|
123 |
|
|
* Tue Mar 29 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-1 |
124 |
|
|
- Remove letsencrypt.sh script and put in separate RPM |
125 |
|
|
|
126 |
|
|
* Tue Mar 29 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-21 |
127 |
|
|
- modify hook script templates as per Dan Browd contribution |
128 |
|
|
|
129 |
|
|
* Thu Mar 17 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-20 |
130 |
|
|
- updated letsencrypt.sh |
131 |
|
|
- https://github.com/lukas2511/letsencrypt.sh/commit/429c5250ede7ff4af3b6f37b39925cfa5afee278 |
132 |
|
|
- Add "" to wellknown path in config.sh |
133 |
|
|
|
134 |
|
|
* Fri Feb 05 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-19 |
135 |
|
|
- updated letsencrypt.sh |
136 |
|
|
- https://github.com/lukas2511/letsencrypt.sh/commit/21c18dd3b8c2572b894d9ec2e5c3fc2589f56f32 |
137 |
|
|
|
138 |
|
|
* Tue Jan 26 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-18 |
139 |
|
|
- updated letsencrypt.sh |
140 |
|
|
- https://github.com/lukas2511/letsencrypt.sh/commit/79ff846e267c30d85988f79f58b81bc7bd91790c |
141 |
|
|
|
142 |
|
|
* Sat Jan 23 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-17 |
143 |
|
|
- Fix typos in hook-script |
144 |
|
|
- Add latest letsencrypt.sh script |
145 |
|
|
|
146 |
|
|
* Wed Jan 20 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-16 |
147 |
|
|
- Minor fixes including typo in cron.daily |
148 |
|
|
|
149 |
|
|
* Tue Jan 19 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-15 |
150 |
|
|
- Missed a " |
151 |
|
|
- remove ' from Let's encrypt and add URL |
152 |
|
|
|
153 |
|
|
* Tue Jan 19 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-14 |
154 |
|
|
- Updated readme and install notes |
155 |
|
|
- Allow either domains or hosts |
156 |
|
|
|
157 |
|
|
* Mon Jan 18 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-13 |
158 |
|
|
- Add missing templates.metadata file |
159 |
|
|
- modify spec file wording |
160 |
|
|
|
161 |
|
|
* Mon Jan 18 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-12 |
162 |
|
|
- Set hookscript to always run unless letsencrypt is disabled |
163 |
|
|
- Add cron.daily script to console-save action and set perms |
164 |
|
|
|
165 |
|
|
* Sun Jan 17 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-11 |
166 |
|
|
- Fix hook-script.sh perms using templates.metadata |
167 |
|
|
|
168 |
|
|
* Sun Jan 17 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-10 |
169 |
|
|
- Add latest revision of letsencrypt.sh |
170 |
|
|
- add hookscript.sh templates and various fixes |
171 |
|
|
|
172 |
|
|
* Sat Jan 16 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-9 |
173 |
|
|
- Add latest revision of letsencrypt.sh |
174 |
|
|
|
175 |
|
|
* Fri Jan 15 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-8 |
176 |
|
|
- set +x on hook-script and correct file name in config |
177 |
|
|
|
178 |
|
|
* Fri Jan 15 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-7 |
179 |
|
|
- Add missing curly brace |
180 |
|
|
- Move Status check line up so we can generate empty file if disabled |
181 |
|
|
|
182 |
|
|
* Fri Jan 15 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-6 |
183 |
|
|
- Add hookScript key |
184 |
|
|
|
185 |
|
|
* Fri Jan 15 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-5 |
186 |
|
|
- Modify spec file to add paths and set permisssions |
187 |
|
|
|
188 |
|
|
* Thu Jan 14 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-4 |
189 |
|
|
- Modify file paths and cron script |
190 |
|
|
|
191 |
|
|
* Thu Jan 14 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-3 |
192 |
|
|
- updated bash script in spec file |
193 |
|
|
- updated file locations in README.MD |
194 |
|
|
|
195 |
|
|
* Wed Jan 13 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-2 |
196 |
|
|
- Moved config.sh file location |
197 |
|
|
- added cron.daily template - only works if letsencrypt is enabled |
198 |
|
|
- added check to create /etc/letsencrypt.sh directory if it does not exist |
199 |
|
|
- added latest letsencrypt.sh script |
200 |
|
|
|
201 |
|
|
* Thu Jan 07 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-1 |
202 |
|
|
- initial release |
203 |
|
|
|
204 |
|
|
%prep |
205 |
|
|
%setup |
206 |
jcrisp |
1.8 |
%patch0 -p1 |
207 |
jcrisp |
1.9 |
%patch1 -p1 |
208 |
jcrisp |
1.10 |
%patch2 -p1 |
209 |
jcrisp |
1.11 |
%patch3 -p1 |
210 |
jcrisp |
1.12 |
%patch4 -p1 |
211 |
jcrisp |
1.14 |
%patch5 -p1 |
212 |
jcrisp |
1.15 |
%patch6 -p1 |
213 |
unnilennium |
1.1 |
|
214 |
|
|
%build |
215 |
|
|
perl createlinks |
216 |
|
|
|
217 |
|
|
%install |
218 |
|
|
rm -rf $RPM_BUILD_ROOT |
219 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
220 |
|
|
rm -f %{name}-%{version}-filelist |
221 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
222 |
|
|
echo "%doc COPYING" >> %{name}-%{version}-filelist |
223 |
|
|
|
224 |
|
|
|
225 |
|
|
%clean |
226 |
|
|
cd .. |
227 |
|
|
rm -rf %{name}-%{version} |
228 |
|
|
|
229 |
|
|
%files -f %{name}-%{version}-filelist |
230 |
|
|
%defattr(-,root,root) |
231 |
|
|
|
232 |
|
|
%pre |
233 |
|
|
|
234 |
|
|
%preun |
235 |
|
|
|
236 |
|
|
%post |
237 |
unnilennium |
1.2 |
# if previously installed letsencrypt.sh, but first migration to dehydrated |
238 |
|
|
if [[ -e /etc/letsencrypt.sh ]] && [[ ! -e /etc/dehydrated ]]; |
239 |
|
|
then |
240 |
|
|
# assume in production |
241 |
|
|
# CA="https://acme-v01.api.letsencrypt.org/directory" ; |
242 |
|
|
# CAHASH="$(echo "${CA}" | urlbase64)" |
243 |
|
|
# mkdir /etc/dehydrated; |
244 |
|
|
# mkdir -p /etc/dehydrated/accounts |
245 |
|
|
# cp -a /etc/letsencrypt.sh/private_key.json /etc/dehydrated/accounts/${CAHASH}/registration_info.json |
246 |
|
|
# cp -a /etc/letsencrypt.sh/private_key.pem /etc/dehydrated/accounts/${CAHASH}/account_key.pem |
247 |
|
|
# cp -a /etc/letsencrypt.sh/certs /etc/dehydrated/ |
248 |
|
|
mv -f /etc/letsencrypt.sh /etc/letsencrypt.sh.old; |
249 |
|
|
fi |
250 |
|
|
|
251 |
|
|
# if letsencrypt still there but already migrated to dehydrated |
252 |
|
|
if [[ -e /etc/letsencrypt.sh ]] && [[ -e /etc/dehydrated/certs ]]; |
253 |
|
|
then |
254 |
|
|
mv -f /etc/letsencrypt.sh /etc/letsencrypt.sh.old; |
255 |
unnilennium |
1.1 |
fi |
256 |
|
|
|
257 |
unnilennium |
1.2 |
# if first installation of dehydrated |
258 |
unnilennium |
1.1 |
if [[ ! -e /etc/dehydrated ]]; |
259 |
|
|
then mkdir /etc/dehydrated; |
260 |
|
|
fi |
261 |
|
|
|
262 |
|
|
if [[ -f /usr/local/bin/config.sh ]]; |
263 |
|
|
then mv -f /usr/local/bin/config.sh /usr/local/bin/config.sh.orig; |
264 |
|
|
fi |
265 |
|
|
|
266 |
|
|
if [[ -f /usr/local/bin/config ]]; |
267 |
|
|
then mv -f /usr/local/bin/config /usr/local/bin/config.old; |
268 |
|
|
fi |
269 |
|
|
|
270 |
|
|
if [[ -f /usr/local/bin/domain.txt ]]; |
271 |
|
|
then mv -f /usr/local/bin/domains.txt /usr/local/bin/domains.txt.orig; |
272 |
|
|
fi |
273 |
|
|
|
274 |
|
|
if [[ ! -e /home/e-smith/files/ibays/Primary/html/.well-known/acme-challenge ]]; |
275 |
|
|
then mkdir -p /home/e-smith/files/ibays/Primary/html/.well-known/acme-challenge; |
276 |
|
|
fi |
277 |
|
|
|
278 |
|
|
chmod -R 0775 /home/e-smith/files/ibays/Primary/html/.well-known |
279 |
|
|
chown -R apache:shared /home/e-smith/files/ibays/Primary/html/.well-known |
280 |
|
|
|
281 |
|
|
|
282 |
|
|
|
283 |
|
|
%postun |