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

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

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


Revision 1.20 - (show annotations) (download)
Mon Mar 9 22:49:14 2020 UTC (4 years, 8 months ago) by jcrisp
Branch: MAIN
CVS Tags: smeserver-letsencrypt-0_5-13
Changes since 1.19: +1 -1 lines
* Mon Mar 09 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.5-13.sme
- remove dangling cron.daily dir missed in 0.5-12 [SME: 10862]

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

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