/[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.12 - (show annotations) (download)
Sat Jul 30 17:33:51 2022 UTC (21 months ago) by brianr
Branch: MAIN
CVS Tags: smeserver-letsencrypt-0_5-24, HEAD
Changes since 1.11: +8 -5 lines
* Sat Jul 30 2022 Brian Read <brianr@bjsystems.co.uk> 0.5-24.sme
- Re-build and link to latest devtools [SME: 11997]

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

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