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

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

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


Revision 1.11 - (hide annotations) (download)
Mon Jul 25 07:20:27 2022 UTC (2 years, 3 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-letsencrypt-0_5-23
Changes since 1.10: +6 -2 lines
* Mon Jul 25 2022 Jean-Philippe Pialasse <tests@pialasse.com> 0.5-23.sme
- add to core backup [SME: 12011]

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

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