1 |
# $Id: smeserver-clamav.spec,v 1.4 2019/11/27 03:52:30 jpp Exp $ |
# $Id: smeserver-clamav.spec,v 1.19 2022/05/04 13:19:21 terryfage Exp $ |
2 |
|
|
3 |
Summary: SME Server module to configure clamav |
Summary: SME Server module to configure clamav |
4 |
%define name smeserver-clamav |
%define name smeserver-clamav |
5 |
Name: %{name} |
Name: %{name} |
6 |
%define version 2.7.0 |
%define version 2.7.0 |
7 |
%define release 1 |
%define release 16 |
8 |
Version: %{version} |
Version: %{version} |
9 |
Release: %{release}%{?dist} |
Release: %{release}%{?dist} |
10 |
License: GPL |
License: GPL |
11 |
Group: System Environment/Base |
Group: System Environment/Base |
12 |
Source: %{name}-%{version}.tar.xz |
Source: %{name}-%{version}.tar.xz |
13 |
#Patch0: smeserver-clamav-2.7.0-bz123454-som-fix.patch |
Patch0: smeserver-clamav-2.7.0-bz11103-improvements.patch |
14 |
|
Patch1: smeserver-clamav-2.7.0-bz11313-clamdtop.patch |
15 |
|
Patch2: smeserver-clamav-2.7.0-bz11520-clamd2scan.conf.patch |
16 |
|
Patch3: smeserver-clamav-2.7.0-bz11755-identify-freshclam-error.patch |
17 |
|
Patch4: smeserver-clamav-2.7.0-bz11695-properties.patch |
18 |
|
Patch5: smeserver-clamav-2.7.0-bz11695-propertyfix.patch |
19 |
|
Patch6: smeserver-clamav-2.7.0-bz11963-logrotate.patch |
20 |
|
Patch7: smeserver-clamav-2.7.0-bz12184.patch |
21 |
|
|
22 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
23 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
24 |
Requires: e-smith-lib |
Requires: e-smith-lib |
40 |
SME Server enhancement to configure and run clamd and freshclam |
SME Server enhancement to configure and run clamd and freshclam |
41 |
|
|
42 |
%changelog |
%changelog |
43 |
|
* Tue Nov 22 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-16.sme |
44 |
|
- review post-actions [SME: 12184] |
45 |
|
|
46 |
|
* Wed May 04 2022 Zsolt Vasarhelyi <vasarhelyizsolt@hotmail.com> 2.7.0-15.sme |
47 |
|
- logrotate clamd keeps logging to old log [SME: 11963] |
48 |
|
|
49 |
|
* Mon Mar 14 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-14.sme |
50 |
|
- remove default property ArchiveBlockEncrypted [SME: 11695] |
51 |
|
|
52 |
|
* Sat Jan 01 2022 Terry Fage <tfage@yahoo.com.au> 2.7.0-13.sme |
53 |
|
- fix property name error 2.7.0-12.sme [SME: 11695] |
54 |
|
|
55 |
|
* Mon Dec 20 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-12.sme |
56 |
|
- fix spec file error 2.7.0-11.sme [SME: 11474] |
57 |
|
|
58 |
|
* Mon Dec 20 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-11.sme |
59 |
|
- rename property ArchiveBlockEncrypted to AlertEncrypted as per upstream [SME: 11695] |
60 |
|
added properties AlertBrokenExecutables AlertExceedsMax AlertOLE2Macros |
61 |
|
AlertPartitionIntersection AlertPhishingCloak and AlertPhishingSSLMismatch |
62 |
|
with default no |
63 |
|
added property HeuristicAlerts with default yes |
64 |
|
- fix noise on centos2sme [SME: 11474] |
65 |
|
|
66 |
|
* Mon Nov 15 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-10.sme |
67 |
|
- identify from which server is freshclam error [SME: 11755] |
68 |
|
fix from Graeme Fleming |
69 |
|
|
70 |
|
* Wed Jun 09 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-9.sme |
71 |
|
- fix typo in logrotate [SME: 11608] |
72 |
|
|
73 |
|
* Sun Apr 18 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-8.sme |
74 |
|
- fix typo and missing +x [SME: 11520] |
75 |
|
|
76 |
|
* Wed Apr 07 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-6.sme |
77 |
|
- fix issues with non epel standard scan.conf [SME: 11520] |
78 |
|
move clamd.conf to scan.conf |
79 |
|
remove alias for clamtop |
80 |
|
add a wrapper for clamdscan to force --fdpass |
81 |
|
|
82 |
|
* Fri Jan 08 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-5.sme |
83 |
|
- ease use of clamdtop [SME: 11313] |
84 |
|
|
85 |
|
* Wed Jan 06 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-4.sme |
86 |
|
- fix Transaction check error [SME: 11311] |
87 |
|
|
88 |
|
* Sat Jan 02 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-2.sme |
89 |
|
- add pid folder /run/clamd/ [SME: 11103] |
90 |
|
few improvements |
91 |
|
- create update event [SME: 11162] |
92 |
|
|
93 |
* Wed Dec 16 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 2.7.0-1 |
* Wed Dec 16 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 2.7.0-1 |
94 |
- Updated to use 0.103+ from EPEL [SME: 11194] |
- Updated to use 0.103+ from EPEL [SME: 11194] |
95 |
- Updated to use systemd |
- Updated to use systemd for clamd [SME: 11103] |
96 |
|
- Updated to use systemd for freshclam [SME: 11104] |
97 |
|
|
98 |
* Tue Nov 26 2019 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-4.sme |
* Tue Nov 26 2019 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-4.sme |
99 |
- increase lower memory limit to 1GB [SME: 10833] |
- increase lower memory limit to 1GB [SME: 10833] |
424 |
|
|
425 |
%prep |
%prep |
426 |
%setup |
%setup |
427 |
#%patch0 -p1 |
%patch0 -p1 |
428 |
|
mkdir -p root/run/clamd |
429 |
|
rm -rf root/etc/e-smith/templates/usr/lib/systemd/system/freshclam.service.d |
430 |
|
rm -rf root/usr/lib/systemd/system/freshclam.service.d |
431 |
|
%patch1 -p1 |
432 |
|
%patch2 -p1 |
433 |
|
%patch3 -p1 |
434 |
|
%patch4 -p1 |
435 |
|
%patch5 -p1 |
436 |
|
%patch6 -p1 |
437 |
|
%patch7 -p1 |
438 |
|
|
439 |
%build |
%build |
440 |
perl createlinks |
perl createlinks |
441 |
|
|
442 |
%pre |
%pre |
443 |
|
if [ $1 -gt 1 ] ; then |
444 |
|
if [ -e /var/service/clamd/run ] ; then |
445 |
|
/usr/bin/sv d clamd |
446 |
|
/usr/bin/sv d clamd/log |
447 |
|
fi |
448 |
|
fi |
449 |
|
if [ $1 -gt 1 ] ; then |
450 |
|
if [ -e /var/service/freshclam/run ] ; then |
451 |
|
/usr/bin/sv d freshclam |
452 |
|
/usr/bin/sv d freshclam/log |
453 |
|
fi |
454 |
|
fi |
455 |
%post |
%post |
456 |
|
# removing old conf file |
457 |
|
if [[ -f /etc/clamd.d/clamd.conf ]]; then |
458 |
|
rm -f /etc/clamd.d/clamd.conf |
459 |
|
fi |
460 |
|
|
461 |
# All a bit ugly clearing up due to migrating freshclam here and A5 updates |
#echo "Changing freshclam log owners" |
|
# Most of this can go in due course |
|
|
|
|
|
echo "File cleanup" |
|
|
# cleanup old files |
|
|
|
|
|
rm -f /etc/cron.d/clamav 2>/dev/null || true |
|
|
rm -f /etc/logrotate.d/clamav 2>/dev/null || true |
|
|
rm -f /etc/clamd.d/scan.conf 2>/dev/null || true |
|
|
rm -rf /etc/e-smith/events/bootstrap-console-save/templates2expand/etc/cron.daily/freshclam 2>/dev/null || true |
|
|
rm -f /etc/crond.daily/freshclam* 2>/dev/null || true |
|
|
rm -rf /var/clamav 2>/dev/null || true |
|
|
|
|
|
echo "Changing freshclam log owners" |
|
462 |
if [[ -d /var/log/freshclam ]]; then |
if [[ -d /var/log/freshclam ]]; then |
463 |
chown -R clamupdate:clamupdate /var/log/freshclam; |
chown -R clamupdate:clamupdate /var/log/freshclam; |
|
chown -R clamupdate:clamupdate /var/log/freshclam/*; |
|
464 |
fi |
fi |
465 |
|
|
466 |
echo "Changing clamd log owners" |
#echo "Changing clamd log owners" |
467 |
if [[ -d /var/log/clamd ]]; then |
if [[ -d /var/log/clamd ]]; then |
468 |
chown -R clamscan:clamscan /var/log/clamd; |
chown -R clamscan:clamscan /var/log/clamd; |
|
chown -R clamscan:clamscan /var/log/clamd/*; |
|
469 |
fi |
fi |
470 |
|
|
471 |
%install |
%install |
472 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
473 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
474 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
475 |
|
--dir /run/clamd 'attr(2775,clamscan,virusgroup)' \ |
476 |
--dir /var/log/freshclam 'attr(2755,clamupdate,clamupdate)' \ |
--dir /var/log/freshclam 'attr(2755,clamupdate,clamupdate)' \ |
477 |
--dir /var/log/clamd 'attr(2755,clamscan,clamscan)' \ |
--dir /var/log/clamd 'attr(2755,clamscan,clamscan)' \ |
478 |
--dir /var/spool/clamav/quarantine 'attr(2750,clamscan,clamscan)' \ |
--dir /var/spool/clamav/quarantine 'attr(2750,clamscan,clamscan)' \ |
479 |
|
--file /sbin/clamdscan 'attr(0755,root,root)' \ |
480 |
--file /sbin/e-smith/freshclam-update-failed 'attr(0755,root,root)' \ |
--file /sbin/e-smith/freshclam-update-failed 'attr(0755,root,root)' \ |
481 |
--file /sbin/e-smith/freshclam-update-ok 'attr(0755,root,root)' \ |
--file /sbin/e-smith/freshclam-update-ok 'attr(0755,root,root)' \ |
482 |
--file /sbin/e-smith/smeserver-clamscan 'attr(0755,root,root)' \ |
--file /sbin/e-smith/smeserver-clamscan 'attr(0755,root,root)' \ |