--- rpms/smeserver-clamav/sme10/smeserver-clamav.spec 2016/05/12 21:20:14 1.2 +++ rpms/smeserver-clamav/sme10/smeserver-clamav.spec 2021/12/20 14:43:14 1.15 @@ -1,23 +1,31 @@ -# $Id: smeserver-clamav.spec,v 1.1 2016/02/05 23:45:20 stephdl Exp $ +# $Id: smeserver-clamav.spec,v 1.14 2021/11/15 18:20:56 jpp Exp $ Summary: SME Server module to configure clamav %define name smeserver-clamav Name: %{name} -%define version 2.6.0 -%define release 2 +%define version 2.7.0 +%define release 11 Version: %{version} Release: %{release}%{?dist} License: GPL Group: System Environment/Base Source: %{name}-%{version}.tar.xz +Patch0: smeserver-clamav-2.7.0-bz11103-improvements.patch +Patch1: smeserver-clamav-2.7.0-bz11313-clamdtop.patch +Patch2: smeserver-clamav-2.7.0-bz11520-clamd2scan.conf.patch +Patch3: smeserver-clamav-2.7.0-bz11755-identify-freshclam-error.patch +Patch4: smeserver-clamav-2.7.0-bz11695-properties.patch + BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArchitectures: noarch Requires: e-smith-lib -Requires: e-smith-base -Requires: clamav >= 0.94 -Requires: clamd >= 0.94 -Requires: clamav-db +Requires: e-smith-base >= 5.8.0-63 +Requires: clamav >= 0.103 +Requires: clamd >= 0.103 +Requires: clamav-data +Requires: clamav-update Requires: e-smith-formmagick >= 1.4.0-12 +Requires: smeserver-spamassassin >= 2.7.0 Provides: e-smith-clamav Obsoletes: e-smith-clamav Obsoletes: e-smith-antivirus @@ -29,6 +37,53 @@ BuildRequires: e-smith-devtools SME Server enhancement to configure and run clamd and freshclam %changelog +* Mon Dec 20 2021 Jean-Philippe Pialasse 2.7.0-11.sme +- rename property ArchiveBlockEncrypted to AlertEncrypted as per upstream [SME: 11695] + added properties AlertBrokenExecutables AlertExceedsMax AlertOLE2Macros + AlertPartitionIntersection AlertPhishingCloak and AlertPhishingSSLMismatch + with default no + added property HeuristicAlerts with default yes +- fix noise on centos2sme [SME: 11474] + +* Mon Nov 15 2021 Jean-Philippe Pialasse 2.7.0-10.sme +- identify from which server is freshclam error [SME: 11755] + fix from Graeme Fleming + +* Wed Jun 09 2021 Jean-Philippe Pialasse 2.7.0-9.sme +- fix typo in logrotate [SME: 11608] + +* Sun Apr 18 2021 Jean-Philippe Pialasse 2.7.0-8.sme +- fix typo and missing +x [SME: 11520] + +* Wed Apr 07 2021 Jean-Philippe Pialasse 2.7.0-6.sme +- fix issues with non epel standard scan.conf [SME: 11520] + move clamd.conf to scan.conf + remove alias for clamtop + add a wrapper for clamdscan to force --fdpass + +* Fri Jan 08 2021 Jean-Philipe Pialasse 2.7.0-5.sme +- ease use of clamdtop [SME: 11313] + +* Wed Jan 06 2021 Jean-Philipe Pialasse 2.7.0-4.sme +- fix Transaction check error [SME: 11311] + +* Sat Jan 02 2021 Jean-Philipe Pialasse 2.7.0-2.sme +- add pid folder /run/clamd/ [SME: 11103] + few improvements +- create update event [SME: 11162] + +* Wed Dec 16 2020 John Crisp 2.7.0-1 +- Updated to use 0.103+ from EPEL [SME: 11194] +- Updated to use systemd for clamd [SME: 11103] +- Updated to use systemd for freshclam [SME: 11104] + +* Tue Nov 26 2019 Jean-Philipe Pialasse 2.6.0-4.sme +- increase lower memory limit to 1GB [SME: 10833] + +* Thu Oct 24 2019 Jean-Philipe Pialasse 2.6.0-3.sme +- fix for AllowSupplementaryGroups warning [SME: 10813] + thanks to bunkobugsy + * Thu May 12 2016 Daniel Berteaud 2.6.0-2.sme - Rebuild for [SME: 9393] @@ -351,29 +406,62 @@ SME Server enhancement to configure and %prep %setup +%patch0 -p1 +mkdir -p root/run/clamd +rm -rf root/etc/e-smith/templates/usr/lib/systemd/system/freshclam.service.d +rm -rf root/usr/lib/systemd/system/freshclam.service.d +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build perl createlinks %pre - +if [ $1 -gt 1 ] ; then + if [ -e /var/service/clamd/run ] ; then + /usr/bin/sv d clamd + /usr/bin/sv d clamd/log + fi +fi +if [ $1 -gt 1 ] ; then + if [ -e /var/service/freshclam/run ] ; then + /usr/bin/sv d freshclam + /usr/bin/sv d freshclam/log + fi +fi %post -rm -f /etc/cron.d/clamav +# removing old conf file +if [[ -f /etc/clamd.d/clamd.conf ]]; then + rm -f /etc/clamd.d/clamd.conf +fi + +#echo "Changing freshclam log owners" +if [[ -d /var/log/freshclam ]]; then + chown -R clamupdate:clamupdate /var/log/freshclam; +fi + +#echo "Changing clamd log owners" +if [[ -d /var/log/clamd ]]; then + chown -R clamscan:clamscan /var/log/clamd; +fi %install rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ - --file /var/service/freshclam/run 'attr(0755,root,root)' \ - --file /var/service/freshclam/log/run 'attr(0755,root,root)' \ - --dir /var/log/freshclam 'attr(2750,smelog,clamav)' \ - --file /var/service/clamd/run 'attr(0755,root,root)' \ - --file /var/service/clamd/log/run 'attr(0755,root,root)' \ - --dir /var/log/clamd 'attr(2750,smelog,smelog)' \ - --dir /var/spool/clamav/quarantine 'attr(2750,clamav,clamav)' \ + --dir /run/clamd 'attr(2775,clamscan,virusgroup)' \ + --dir /var/log/freshclam 'attr(2755,clamupdate,clamupdate)' \ + --dir /var/log/clamd 'attr(2755,clamscan,clamscan)' \ + --dir /var/spool/clamav/quarantine 'attr(2750,clamscan,clamscan)' \ + --file /sbin/clamdscan 'attr(0755,root,root)' \ --file /sbin/e-smith/freshclam-update-failed 'attr(0755,root,root)' \ --file /sbin/e-smith/freshclam-update-ok 'attr(0755,root,root)' \ --file /sbin/e-smith/smeserver-clamscan 'attr(0755,root,root)' \ + --file /usr/lib/systemd/system/clamd.service 'attr(0644,root,root)' \ + --file /usr/lib/systemd/system/freshclam.service 'attr(0644,root,root)' \ + --dir /usr/lib/systemd/system/clamd.service.d 'attr(0755,root,root)' \ + --dir /usr/lib/systemd/system/freshclam.service.d 'attr(0755,root,root)' \ > %{name}-%{version}-%{release}-filelist %clean