/[smecontribs]/rpms/smeserver-letsencrypt/contribs10/smeserver-letsencrypt.spec
ViewVC logotype

Contents of /rpms/smeserver-letsencrypt/contribs10/smeserver-letsencrypt.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.10 - (show annotations) (download)
Wed Jun 15 12:44:29 2022 UTC (23 months ago) by brianr
Branch: MAIN
CVS Tags: smeserver-letsencrypt-0_5-22
Changes since 1.9: +6 -1 lines
* Wed Jun 15 2022 Brian Read <brianr@bjsystems.co.uk> 0.5-22.sme
- Add action to check if dehydrated.timer is running and stop it if so [SME: 11996]

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

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed