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

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

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


Revision 1.21 - (hide annotations) (download)
Wed Mar 11 18:36:06 2020 UTC (4 years, 7 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-letsencrypt-0_5-14
Changes since 1.20: +11 -3 lines
* Wed Mar 11 2020 Jean-Philipe Pialasse <tests@pialasse.com> 0.5-14.sme
- take 2: remove dangling cron.daily dir missed in 0.5-12 [SME: 10862]

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

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