1 |
# $Id: smeserver-clamav.spec,v 1.8 2021/01/08 16:04:20 jpp Exp $ |
2 |
|
3 |
Summary: SME Server module to configure clamav |
4 |
%define name smeserver-clamav |
5 |
Name: %{name} |
6 |
%define version 2.7.0 |
7 |
%define release 5 |
8 |
Version: %{version} |
9 |
Release: %{release}%{?dist} |
10 |
License: GPL |
11 |
Group: System Environment/Base |
12 |
Source: %{name}-%{version}.tar.xz |
13 |
Patch0: smeserver-clamav-2.7.0-bz11103-improvements.patch |
14 |
Patch1: smeserver-clamav-2.7.0-bz11313-clamdtop.patch |
15 |
|
16 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
17 |
BuildArchitectures: noarch |
18 |
Requires: e-smith-lib |
19 |
Requires: e-smith-base >= 5.8.0-63 |
20 |
Requires: clamav >= 0.103 |
21 |
Requires: clamd >= 0.103 |
22 |
Requires: clamav-data |
23 |
Requires: clamav-update |
24 |
Requires: e-smith-formmagick >= 1.4.0-12 |
25 |
Requires: smeserver-spamassassin >= 2.7.0 |
26 |
Provides: e-smith-clamav |
27 |
Obsoletes: e-smith-clamav |
28 |
Obsoletes: e-smith-antivirus |
29 |
Obsoletes: clamav-es |
30 |
Obsoletes: clamav-es-libs |
31 |
BuildRequires: e-smith-devtools |
32 |
|
33 |
%description |
34 |
SME Server enhancement to configure and run clamd and freshclam |
35 |
|
36 |
%changelog |
37 |
* Fri Jan 08 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-5.sme |
38 |
- ease use of clamdtop [SME: 11313] |
39 |
|
40 |
* Wed Jan 06 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-4.sme |
41 |
- fix Transaction check error [SME: 11311] |
42 |
|
43 |
* Sat Jan 02 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-2.sme |
44 |
- add pid folder /run/clamd/ [SME: 11103] |
45 |
few improvements |
46 |
- create update event [SME: 11162] |
47 |
|
48 |
* Wed Dec 16 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 2.7.0-1 |
49 |
- Updated to use 0.103+ from EPEL [SME: 11194] |
50 |
- Updated to use systemd for clamd [SME: 11103] |
51 |
- Updated to use systemd for freshclam [SME: 11104] |
52 |
|
53 |
* Tue Nov 26 2019 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-4.sme |
54 |
- increase lower memory limit to 1GB [SME: 10833] |
55 |
|
56 |
* Thu Oct 24 2019 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-3.sme |
57 |
- fix for AllowSupplementaryGroups warning [SME: 10813] |
58 |
thanks to bunkobugsy |
59 |
|
60 |
* Thu May 12 2016 Daniel Berteaud <daniel@firewall-services.com> 2.6.0-2.sme |
61 |
- Rebuild for [SME: 9393] |
62 |
|
63 |
* Sat Feb 06 2016 stephane de Labrusse <stephdl@de-labrusse.fr> 2.6.0-1.sme |
64 |
- Initial release to sme10 |
65 |
|
66 |
* Tue Dec 1 2015 Daniel Berteaud <daniel@firewall-services.com> 2.4.0-5.sme |
67 |
- Disable unofficial sigs for filesystem scans [SME: 9142] |
68 |
|
69 |
* Tue Sep 8 2015 Daniel Berteaud <daniel@firewall-services.com> 2.4.0-4.sme |
70 |
- Double the memory limit as we do not have enough room [SME: 8933] |
71 |
|
72 |
* Thu Jul 3 2014 Ian Wells <esmith@wellsi.com> 2.4.0-3.sme |
73 |
- Increase MemLimit to 700M for clamav-0.98 [SME: 8483] |
74 |
|
75 |
* Mon Jul 8 2013 Chris Burnat <devlist@burnat.com> 2.4.0-2.sme |
76 |
- Move clamscan scheduling to complete before 99-raid-check [SME: 7758] |
77 |
|
78 |
* Thu Jan 31 2013 Shad L. Lords <slords@mail.com> 2.4.0-1.sme |
79 |
- Roll new stream for sme9 |
80 |
|
81 |
* Mon Jun 14 2010 Ian Wells <esmith@wellsi.com> 2.2.0-12.sme |
82 |
- Re-work patch to improve and document template [SME: 6011] |
83 |
|
84 |
* Sat Jun 5 2010 Ian Wells <esmith@wellsi.com> 2.2.0-11.sme |
85 |
- template /etc/cron.daily/freshclam, and make it a NO-OP [SME: 6011] |
86 |
|
87 |
* Sun Apr 18 2010 Jonathan Martens <smeserver-contribs@snetram.nl> 2.2.0-10.sme |
88 |
- Increase MemLimit to 600M for clamav-0.96 [SME: 5868] |
89 |
|
90 |
* Fri Apr 02 2010 Filippo Carletti <filippo.carletti@gmail.com> 2.2.0-9.sme |
91 |
- Increase MemLimit to 300M for clamav-0.96 [SME: 5868] |
92 |
|
93 |
* Sat Feb 6 2010 Stephen Noble <support@dungog.net> 2.2.0-8.sme |
94 |
- Setup logrotate for /var/log/clamd/clamscan.log [SME: 5570] |
95 |
|
96 |
* Fri Nov 6 2009 Jonathan Martens <smeserver-contribs@snetram.nl> 2.2.0-7.sme |
97 |
- Remove create option from logrotate configuration [SME: 5570] |
98 |
- Fix version number in previous changelog entry |
99 |
|
100 |
* Fri Nov 6 2009 Jonathan Martens <smeserver-contribs@snetram.nl> 2.2.0-6.sme |
101 |
- Setup logrotate for /var/log/clamd/smeserver-clamscan.log [SME: 5570] |
102 |
- Minor changelog fixes in version number |
103 |
|
104 |
* Wed Nov 4 2009 Jonathan Martens <smeserver-contribs@snetram.nl> 2.2.0-5.sme |
105 |
- Change default value for HeuristicScanPrecedence to yes [SME: 5204] |
106 |
|
107 |
* Tue Jun 2 2009 Shad L. Lords <slords@mail.com> 2.2.0-4.sme |
108 |
- Fix permissions on freshclam.conf file [SME: 5319] |
109 |
|
110 |
* Mon Apr 13 2009 Jonathan Martens <smeserver-contribs@snetram.nl> 2.2.0-3.sme |
111 |
- Add HeuristicScanPrecedence option, default disabled [SME: 4598] |
112 |
|
113 |
* Thu Nov 27 2008 Stephen Noble <support@dungog.net> 2.2.0-2.sme |
114 |
- Obsolete e-smith-antivirus [SME: 4786] |
115 |
|
116 |
* Tue Oct 7 2008 Shad L. Lords <slords@mail.com> 2.2.0-1.sme |
117 |
- Roll new stream to separate sme7/sme8 trees [SME: 4633] |
118 |
|
119 |
* Mon Sep 22 2008 Stephen Noble <support@dungog.net> 1.2.0-26 |
120 |
- Remove obsolete locale tags [SME: 4235] |
121 |
|
122 |
* Sun Aug 10 2008 Shad L. Lords <slords@mail.com> 1.2.0-25 |
123 |
- Remove links to crontab in all but clamav-update [SME: 4494] |
124 |
|
125 |
* Wed Apr 30 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.2.0-24 |
126 |
- Remove any /etc/cron.d/clamav file. We moved the content to /etc/crontab |
127 |
[SME: 1047], but we need to remove any leftover file from earlier template |
128 |
expansion, which, if present, could cause the nightly file scanning to be |
129 |
run twice. [SME: 4266] |
130 |
|
131 |
* Sun Apr 27 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.2.0-23 |
132 |
- Add common <base> tags to e-smith-formmagick's general [SME: 4288] |
133 |
|
134 |
* Fri Apr 25 2008 Charlie Brady <charlie_brady@mitel.com> 1.2.0-22 |
135 |
- Add Obsoletes headers to force removal of clamav-es and |
136 |
clamav-es-libs. [SME 4167] |
137 |
|
138 |
* Fri Apr 18 2008 Shad L. Lords <slords@mail.com> 1.2.0-21 |
139 |
- Update defaults for clamav 0.93 [SME: 4223] |
140 |
|
141 |
* Fri Apr 18 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.2.0-20 |
142 |
- Move cron template from cron.d to crontab [SME: 1047] |
143 |
|
144 |
* Tue Mar 18 2008 Shad L. Lords <slords@mail.com> 1.2.0-19 |
145 |
- Fix clamav version string [SME: 4060] |
146 |
|
147 |
* Wed Feb 13 2008 Stephen Noble <support@dungog.net> 1.2.0-18 |
148 |
- Remove <base> tags now in general [SME: 3915] |
149 |
|
150 |
* Sun Feb 10 2008 Stephen Noble <support@dungog.net> 1.2.0-17 |
151 |
- Remove duplicate <base> entries [SME: 3890] |
152 |
|
153 |
* Mon Jan 07 2008 Stephen Noble <support@dungog.net> 1.2.0-16 |
154 |
- Cosmetic removal of word entire on panel [SME: 3483] |
155 |
|
156 |
* Thu Sep 06 2007 Filippo Carletti <filippo.carletti@gmail.com> 1.2.0-15 |
157 |
- Fix freshclam.conf permissions [SME: 3375] |
158 |
|
159 |
* Fri Jun 08 2007 Charlie Brady <charlie_brady@mitel.com> 1.2.0-14 |
160 |
- Use full paths in update-failed script - tai64nlocal was not |
161 |
being found in $PATH. [SME: 1686] |
162 |
|
163 |
* Sun Apr 29 2007 Shad L. Lords <slords@mail.com> |
164 |
- Clean up spec so package can be built by koji/plague |
165 |
|
166 |
* Wed Apr 18 2007 Shad L. Lords <slords@mail.com> 1.2.0-13 |
167 |
- Up memory limit for clamd again [SME: 2743] |
168 |
|
169 |
* Wed Feb 21 2007 Shad L. Lords <slords@mail.com> 1.2.0-12 |
170 |
- Up memory limit for clamd [SME: 2528] |
171 |
|
172 |
* Wed Feb 14 2007 Shad L. Lords <slords@mail.com> 1.2.0-11 |
173 |
- Update for clamav v0.90 [SME: 2508] |
174 |
|
175 |
* Tue Feb 13 2007 Shad L. Lords <slords@mail.com> 1.2.0-10 |
176 |
- Improve algorithm for displaying errors [SME: 1686] |
177 |
|
178 |
* Mon Feb 12 2007 Shad L. Lords <slords@mail.com> 1.2.0-9 |
179 |
- Improve sed expression for freshclam failures [SME: 1686] |
180 |
|
181 |
* Mon Feb 12 2007 Shad L. Lords <slords@mail.com> 1.2.0-8 |
182 |
- Allow clamav to read freshclam update log [SME: 1686] |
183 |
|
184 |
* Fri Jan 26 2007 Shad L. Lords <slords@mail.com> 1.2.0-7 |
185 |
- Provide more feedback on freshclam events [SME: 1686] |
186 |
|
187 |
* Wed Dec 13 2006 Federico Simoncelli <federico.simoncelli@gmail.com> 1.2.0-6 |
188 |
- Added support for options: max-ratio, no-html, no-mail. [SME: 2024] |
189 |
- Redirected the stderr output to /var/log/clamd/smeserver-clamscan.log. |
190 |
[SME: 2004] |
191 |
|
192 |
* Thu Dec 07 2006 Shad L. Lords <slords@mail.com> |
193 |
- Update to new release naming. No functional changes. |
194 |
- Make Packager generic |
195 |
|
196 |
* Wed Nov 29 2006 Gordon Rowell <gordonr@gormand.com.au> 1.2.0-04 |
197 |
- Restrict filesystem scan to /home/e-smith/files by default [SME: 2082] |
198 |
|
199 |
* Sun Aug 27 2006 Charlie Brady <charlieb@e-smith.com> 1.2.0-03 |
200 |
- Fix --exclude arg syntax. [SME: 1889] |
201 |
|
202 |
* Fri Jun 16 2006 Gordon Rowell <gordonr@gormand.com.au> 1.2.0-02 |
203 |
- Fix typo in ArchiveBlockEntrypted [SME: 1584] |
204 |
|
205 |
* Wed Mar 15 2006 Charlie Brady <charlie_brady@mitel.com> 1.2.0-01 |
206 |
- Roll stable stream version. [SME: 1016] |
207 |
|
208 |
* Tue Mar 14 2006 Gordon Rowell <gordonr@gormand.com.au> 1.1.2-10 |
209 |
- Restart crond in clamav-update so cron notices cron.d/clamav [SME: 966] |
210 |
|
211 |
* Wed Feb 8 2006 Gavin Weight <gweight@gmail.com> 1.1.2-09 |
212 |
- Added migrate fragment for clamav DatabaseMirror. [SME: 83] |
213 |
|
214 |
* Fri Jan 27 2006 Gordon Rowell <gordonr@gormand.com.au> 1.1.2-08 |
215 |
- Bump release number to ensure patch is in CVS |
216 |
|
217 |
* Wed Jan 18 2006 Gordon Rowell <gordonr@gormand.com.au> 1.1.2-07 |
218 |
- Expand MEMLIMIT in bootstrap-console-save (and don't attempt to |
219 |
restart the service there) |
220 |
|
221 |
* Wed Jan 18 2006 Gordon Rowell <gordonr@gormand.com.au> 1.1.2-06 |
222 |
- Change back to softlimit -a [SME: 426] |
223 |
|
224 |
* Wed Jan 18 2006 Gordon Rowell <gordonr@gormand.com.au> 1.1.2-05 |
225 |
- Set db default for clamd{MemLimit}==80M and use it in the run script |
226 |
- Expand templates in events rather than run file [SME: 426] |
227 |
|
228 |
* Mon Oct 17 2005 Gordon Rowell <gordonr@gormand.com.au> 1.1.2-04 |
229 |
- Fix typos in smeserver-clamscan [SF: 1304217] |
230 |
|
231 |
* Fri Oct 14 2005 Gordon Rowell <gordonr@gormand.com.au> 1.1.2-03 |
232 |
- Move all L10Ns to smeserver-locale [SF: 1309520] |
233 |
|
234 |
* Mon Sep 26 2005 Gordon Rowell <gordonr@gormand.com.au> 1.1.2-02 |
235 |
- Added Italian L10N - Thanks Filippo Carletti [SF: 1309266] |
236 |
|
237 |
* Mon Sep 26 2005 Gordon Rowell <gordonr@gormand.com.au> 1.1.2-01 |
238 |
- Roll patches to 1.1.1-06 |
239 |
- Add German L10N |
240 |
|
241 |
* Mon Sep 26 2005 Gordon Rowell <gordonr@gormand.com.au> 1.1.1-06 |
242 |
- Exclude /var and all of /usr/share (not just /usr/share/doc) from |
243 |
filesystem scan [SF: 1304217] |
244 |
|
245 |
* Fri Sep 23 2005 Gordon Rowell <gordonr@gormand.com.au> 1.1.1-05 |
246 |
- French L10N fixes [SF: 1242586] |
247 |
|
248 |
* Sat Aug 20 2005 Gordon Rowell <gordonr@gormand.com.au> 1.1.1-04 |
249 |
- French L10N - Merci Didier Rambeau [SF: 1242586] |
250 |
|
251 |
* Sat Aug 20 2005 Gordon Rowell <gordonr@gormand.com.au> 1.1.1-03 |
252 |
- Don't scan quarantine area, even if quarantining is disabled [SF: 1245655] |
253 |
|
254 |
* Fri Aug 19 2005 Charlie Brady <charlieb@e-smith.com> 1.1.1-02 |
255 |
- Add Provides: header, to satisfy any package which requires defunct |
256 |
e-smith-clamav. |
257 |
|
258 |
* Thu Aug 18 2005 Gordon Rowell <gordonr@gormand.com.au> |
259 |
- [1.1.1-01] |
260 |
- Package renamed to smeserver-clamav [SF: 1263460] |
261 |
|
262 |
* Thu Aug 18 2005 Gordon Rowell <gordonr@gormand.com.au> |
263 |
- [1.1.0-08sme02] |
264 |
- Rename /sbin/e-smith/clamscan to smeserver-clamscan [SF: 1263460] |
265 |
|
266 |
* Thu Aug 18 2005 Gordon Rowell <gordonr@gormand.com.au> |
267 |
- [1.1.0-08sme01] |
268 |
- Disable quarantining by default, add panel toggle [SF: 1245655] |
269 |
|
270 |
* Tue Aug 9 2005 Gordon Rowell <gordonr@gormand.com.au> |
271 |
- [1.1.0-08] |
272 |
- Add --move=$clamav{QuarantineDirectory} to clamscan, |
273 |
exclude directory from being scanned, add database default |
274 |
and set permissions in spec file [SF: 1245655] |
275 |
|
276 |
* Thu Aug 4 2005 Charlie Brady <charlieb@e-smith.com> |
277 |
- [1.1.0-07] |
278 |
- Remove freshclam runs from clamav crontab template - we |
279 |
now run supervised freshclam instance. [SF: 1251944] |
280 |
|
281 |
* Thu Aug 4 2005 Shad Lords <slords@mail.com> |
282 |
- [1.1.0-06] |
283 |
- Include db entry to exclude /proc, /sys and |
284 |
/usr/share/doc from scans [SF: 1243741, 1243831] |
285 |
|
286 |
* Wed Jul 27 2005 Gordon Rowell <gordonr@gormand.com.au> |
287 |
- [1.1.0-05] |
288 |
- Exclude /proc, /sys and /usr/share/doc from scans |
289 |
[SF: 1243741, 1243831] |
290 |
- Run freshclam with --quiet instead of --verbose [SF: 1245602] |
291 |
|
292 |
* Fri Jul 22 2005 Charlie Brady <charlieb@e-smith.com> |
293 |
- [1.1.0-04] |
294 |
- Fix typo in en-us lexicon. [SF: 1242585] |
295 |
|
296 |
* Mon May 30 2005 Charlie Brady <charlieb@e-smith.com> |
297 |
- [1.1.0-03] |
298 |
- Fix last-updated section and labels [Gordon: SF-1200428] |
299 |
|
300 |
* Tue May 17 2005 Charlie Brady <charlieb@e-smith.com> |
301 |
- [1.1.0-02] |
302 |
- Add clamav-update event directory. |
303 |
- Modify some of the panel code to avoid logging of multiple db property |
304 |
transactions. |
305 |
|
306 |
* Fri May 13 2005 Gordon Rowell <gordonr@gormand.com.au> |
307 |
- [1.1.0-01gr06] |
308 |
- Read the timestamp of the clamav database files in the panel |
309 |
to show the last updated time [SF:1200428] |
310 |
- Change /sbin/e-smith/freshclam-update-ok to /bin/sh, with no |
311 |
content. |
312 |
- TODO: make the update mails configurable |
313 |
|
314 |
* Fri May 6 2005 Gordon Rowell <gordonr@gormand.com.au> |
315 |
- [1.1.0-01gr05] |
316 |
- And hide the sections |
317 |
|
318 |
* Fri May 6 2005 Gordon Rowell <gordonr@gormand.com.au> |
319 |
- [1.1.0-01gr04] |
320 |
- Fix up section bars |
321 |
|
322 |
* Fri May 6 2005 Gordon Rowell <gordonr@gormand.com.au> |
323 |
- [1.1.0-01gr03] |
324 |
- Removed the qmailscan_integration part of the panel |
325 |
- Removed the database mirror select box. Anyone who isn't |
326 |
satisfied with using db.local.clamav.net can set the hostname |
327 |
in the database directly. |
328 |
- Hid the updates and proxy sections, based on |
329 |
$clamav{ShowProxySection} and $clamav{ShowUpdatesSection} |
330 |
- Panel looks rather bare now |
331 |
- Read the last updated date from $clamav{SignaturesUpdated} |
332 |
- Modified /sbin/e-smith/freshclam-update-ok to set the above value |
333 |
- Morphed /etc/clamscan template into /sbin/e-smith/clamscan, |
334 |
which can read the db directly. |
335 |
|
336 |
* Fri May 6 2005 Gordon Rowell <gordonr@gormand.com.au> |
337 |
- [1.1.0-01gr02] |
338 |
- Use db.local.clamav.net by default (rather than db.us). |
339 |
|
340 |
* Fri May 6 2005 Gordon Rowell <gordonr@gormand.com.au> |
341 |
- [1.1.0-01gr01] |
342 |
- Bump version to 1.1.0-01gr01 to upgrade over Shad's 1.0.0 |
343 |
- Roll new tarball after major merge of Shad's work. |
344 |
|
345 |
* Fri May 6 2005 Gordon Rowell <gordonr@gormand.com.au> |
346 |
- [0.0.1-06gr02] |
347 |
- Cleaned up patch and startup symlinks |
348 |
|
349 |
* Fri May 6 2005 Gordon Rowell <gordonr@gormand.com.au> |
350 |
- [0.0.1-06gr01] |
351 |
- Merge in Shad Lords' e-smith-spamassassin work (based in part |
352 |
on work from Damien Curtain) and panel |
353 |
- Moved freshclam run script options to database defaults |
354 |
- Created /sbin/e-smith/freshclam-update-{failed,ok} |
355 |
|
356 |
* Tue Apr 19 2005 Charlie Brady <charlieb@e-smith.com> |
357 |
- [0.0.1-06] |
358 |
- Add missing log directories. |
359 |
|
360 |
* Tue Apr 19 2005 Charlie Brady <charlieb@e-smith.com> |
361 |
- [0.0.1-05] |
362 |
- Don't start freshclam or clamd until after bootstrap-console. |
363 |
- Move all symlink creation into createlinks script. |
364 |
|
365 |
* Mon Mar 21 2005 Charlie Brady <charlieb@e-smith.com> |
366 |
- [0.0.1-04] |
367 |
- Fix data directory in freshclam configuration. |
368 |
|
369 |
* Fri Feb 18 2005 Charlie Brady <charlieb@e-smith.com> 0.0.1-03 |
370 |
- Config fixes for clamav-0.83 |
371 |
|
372 |
* Wed Feb 09 2005 Charlie Brady <charlieb@e-smith.com> |
373 |
- [0.0.1-02] |
374 |
- Add Requires headers for clamd and clamav-db. |
375 |
|
376 |
* Wed Feb 09 2005 Charlie Brady <charlieb@e-smith.com> |
377 |
- [0.0.1-01] |
378 |
- Initial |
379 |
|
380 |
%prep |
381 |
%setup |
382 |
%patch0 -p1 |
383 |
mkdir -p root/run/clamd |
384 |
rm -rf root/etc/e-smith/templates/usr/lib/systemd/system/freshclam.service.d |
385 |
rm -rf root/usr/lib/systemd/system/freshclam.service.d |
386 |
%patch1 -p1 |
387 |
|
388 |
%build |
389 |
perl createlinks |
390 |
|
391 |
%pre |
392 |
if [ $1 -gt 1 ] ; then |
393 |
if [ -e /var/service/clamd/run ] ; then |
394 |
/usr/bin/sv d clamd |
395 |
/usr/bin/sv d clamd/log |
396 |
fi |
397 |
fi |
398 |
if [ $1 -gt 1 ] ; then |
399 |
if [ -e /var/service/freshclam/run ] ; then |
400 |
/usr/bin/sv d freshclam |
401 |
/usr/bin/sv d freshclam/log |
402 |
fi |
403 |
fi |
404 |
%post |
405 |
|
406 |
# All a bit ugly clearing up due to migrating freshclam here and A5 updates |
407 |
# Most of this can go in due course |
408 |
|
409 |
#echo "File cleanup" |
410 |
# cleanup old files |
411 |
|
412 |
# no clue where it comes from not in sme9, not in new rpms, not templated |
413 |
#rm -f /etc/cron.d/clamav 2>/dev/null || true |
414 |
# this is clamd-0.100.2-2.el7.sme.x86_64 owned and not templated, removing the rpm will remove it ; useless |
415 |
#rm -f /etc/logrotate.d/clamav 2>/dev/null || true |
416 |
# this is clamav-filesystem-0.103.0-1.el7.noarch owned, should be done elsewhere, will be readded everytime the rpm is updated |
417 |
#rm -f /etc/clamd.d/scan.conf 2>/dev/null || true |
418 |
# should only be removed from prep as it is owned by this rpm |
419 |
#rm -rf /etc/e-smith/events/bootstrap-console-save/templates2expand/etc/cron.daily/freshclam 2>/dev/null || true |
420 |
# clamav-db and clamd rpm owned, might remains because of the content |
421 |
#rm -rf /var/clamav 2>/dev/null || true |
422 |
|
423 |
echo "Changing freshclam log owners" |
424 |
if [[ -d /var/log/freshclam ]]; then |
425 |
chown -R clamupdate:clamupdate /var/log/freshclam; |
426 |
chown -R clamupdate:clamupdate /var/log/freshclam/*; |
427 |
fi |
428 |
|
429 |
echo "Changing clamd log owners" |
430 |
if [[ -d /var/log/clamd ]]; then |
431 |
chown -R clamscan:clamscan /var/log/clamd; |
432 |
chown -R clamscan:clamscan /var/log/clamd/*; |
433 |
fi |
434 |
|
435 |
%install |
436 |
rm -rf $RPM_BUILD_ROOT |
437 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
438 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
439 |
--dir /run/clamd 'attr(2775,clamscan,virusgroup)' \ |
440 |
--dir /var/log/freshclam 'attr(2755,clamupdate,clamupdate)' \ |
441 |
--dir /var/log/clamd 'attr(2755,clamscan,clamscan)' \ |
442 |
--dir /var/spool/clamav/quarantine 'attr(2750,clamscan,clamscan)' \ |
443 |
--file /sbin/e-smith/freshclam-update-failed 'attr(0755,root,root)' \ |
444 |
--file /sbin/e-smith/freshclam-update-ok 'attr(0755,root,root)' \ |
445 |
--file /sbin/e-smith/smeserver-clamscan 'attr(0755,root,root)' \ |
446 |
--file /usr/lib/systemd/system/clamd.service 'attr(0644,root,root)' \ |
447 |
--file /usr/lib/systemd/system/freshclam.service 'attr(0644,root,root)' \ |
448 |
--dir /usr/lib/systemd/system/clamd.service.d 'attr(0755,root,root)' \ |
449 |
--dir /usr/lib/systemd/system/freshclam.service.d 'attr(0755,root,root)' \ |
450 |
> %{name}-%{version}-%{release}-filelist |
451 |
|
452 |
%clean |
453 |
rm -rf $RPM_BUILD_ROOT |
454 |
|
455 |
%files -f %{name}-%{version}-%{release}-filelist |
456 |
%defattr(-,root,root) |