--- rpms/smeserver-clamav/sme10/smeserver-clamav.spec 2021/01/06 22:21:20 1.7 +++ rpms/smeserver-clamav/sme10/smeserver-clamav.spec 2021/04/19 00:56:51 1.12 @@ -1,16 +1,18 @@ -# $Id: smeserver-clamav.spec,v 1.6 2021/01/03 04:31:10 jpp Exp $ +# $Id: smeserver-clamav.spec,v 1.11 2021/04/18 20:18:15 jpp Exp $ Summary: SME Server module to configure clamav %define name smeserver-clamav Name: %{name} %define version 2.7.0 -%define release 3 +%define release 8 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 BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArchitectures: noarch @@ -33,7 +35,19 @@ BuildRequires: e-smith-devtools SME Server enhancement to configure and run clamd and freshclam %changelog -* Wed Jan 06 2021 Jean-Philipe Pialasse 2.7.0-3.sme +* 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 @@ -379,6 +393,8 @@ SME Server enhancement to configure and 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 %build perl createlinks @@ -397,31 +413,18 @@ if [ $1 -gt 1 ] ; then fi fi %post +# removing old conf file +if [[ -f /etc/clamd.d/clamd.conf ]]; then + rm -f /etc/clamd.d/clamd.conf +fi -# All a bit ugly clearing up due to migrating freshclam here and A5 updates -# Most of this can go in due course - -#echo "File cleanup" -# cleanup old files - -# no clue where it comes from not in sme9, not in new rpms, not templated -#rm -f /etc/cron.d/clamav 2>/dev/null || true -# this is clamd-0.100.2-2.el7.sme.x86_64 owned and not templated, removing the rpm will remove it ; useless -#rm -f /etc/logrotate.d/clamav 2>/dev/null || true -# this is clamav-filesystem-0.103.0-1.el7.noarch owned, should be done elsewhere, will be readded everytime the rpm is updated -#rm -f /etc/clamd.d/scan.conf 2>/dev/null || true -# should only be removed from prep as it is owned by this rpm -#rm -rf /etc/e-smith/events/bootstrap-console-save/templates2expand/etc/cron.daily/freshclam 2>/dev/null || true -# clamav-db and clamd rpm owned, might remains because of the content -#rm -rf /var/clamav 2>/dev/null || true - -echo "Changing freshclam log owners" +#echo "Changing freshclam log owners" if [[ -d /var/log/freshclam ]]; then chown -R clamupdate:clamupdate /var/log/freshclam; chown -R clamupdate:clamupdate /var/log/freshclam/*; fi -echo "Changing clamd log owners" +#echo "Changing clamd log owners" if [[ -d /var/log/clamd ]]; then chown -R clamscan:clamscan /var/log/clamd; chown -R clamscan:clamscan /var/log/clamd/*; @@ -435,6 +438,7 @@ rm -rf $RPM_BUILD_ROOT --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)' \