/[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.7 - (show annotations) (download)
Wed Mar 23 04:10:34 2022 UTC (2 years, 8 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-letsencrypt-0_5-19
Changes since 1.6: +6 -2 lines
* Wed Mar 23 2022 Jean-Philippe Pialasse <tests@pialasse.com> 0.5-19.sme
- use a general Alias for acme path and a proxypass [SME: 10637]

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

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