/[smeserver]/rpms/smeserver-clamav/sme10/smeserver-clamav.spec
ViewVC logotype

Diff of /rpms/smeserver-clamav/sme10/smeserver-clamav.spec

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

Revision 1.4 by jpp, Wed Nov 27 03:52:30 2019 UTC Revision 1.5 by jcrisp, Wed Dec 16 17:06:02 2020 UTC
# Line 1  Line 1 
1  # $Id: smeserver-clamav.spec,v 1.3 2019/10/25 03:14:56 jpp Exp $  # $Id: smeserver-clamav.spec,v 1.4 2019/11/27 03:52:30 jpp 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.6.0  %define version 2.7.0
7  %define release 4  %define release 1
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.6.0-bz10813-AllowSupplementaryGroups.patch  #Patch0: smeserver-clamav-2.7.0-bz123454-som-fix.patch
 Patch1: smeserver-clamav-2.6.0-bz10833-lowerMEMLIMITto1g.patch  
14  BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot  BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
15  BuildArchitectures: noarch  BuildArchitectures: noarch
16  Requires: e-smith-lib  Requires: e-smith-lib
17  Requires: e-smith-base  Requires: e-smith-base >= 5.8.0-63
18  Requires: clamav >= 0.94  Requires: clamav >= 0.103
19  Requires: clamd >= 0.94  Requires: clamd >= 0.103
20  Requires: clamav-db  Requires: clamav-data
21    Requires: clamav-update
22  Requires: e-smith-formmagick >= 1.4.0-12  Requires: e-smith-formmagick >= 1.4.0-12
23    Requires: smeserver-spamassassin >= 2.7.0
24  Provides: e-smith-clamav  Provides: e-smith-clamav
25  Obsoletes: e-smith-clamav  Obsoletes: e-smith-clamav
26  Obsoletes: e-smith-antivirus  Obsoletes: e-smith-antivirus
# Line 31  BuildRequires: e-smith-devtools Line 32  BuildRequires: e-smith-devtools
32  SME Server enhancement to configure and run clamd and freshclam  SME Server enhancement to configure and run clamd and freshclam
33    
34  %changelog  %changelog
35    * Wed Dec 16 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 2.7.0-1
36    - Updated to use 0.103+ from EPEL [SME: 11194]
37    - Updated to use systemd
38    
39  * 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
40  - increase lower memory limit to 1GB [SME: 10833]  - increase lower memory limit to 1GB [SME: 10833]
41    
# Line 360  SME Server enhancement to configure and Line 365  SME Server enhancement to configure and
365    
366  %prep  %prep
367  %setup  %setup
368  %patch0 -p1  #%patch0 -p1
 %patch1 -p1  
369    
370  %build  %build
371  perl createlinks  perl createlinks
# Line 369  perl createlinks Line 373  perl createlinks
373  %pre  %pre
374    
375  %post  %post
376  rm -f /etc/cron.d/clamav  
377    # All a bit ugly clearing up due to migrating freshclam here and A5 updates
378    # Most of this can go in due course
379    
380    echo "File cleanup"
381    # cleanup old files
382    
383    rm -f /etc/cron.d/clamav 2>/dev/null || true
384    rm -f /etc/logrotate.d/clamav 2>/dev/null || true
385    rm -f /etc/clamd.d/scan.conf  2>/dev/null || true
386    rm -rf /etc/e-smith/events/bootstrap-console-save/templates2expand/etc/cron.daily/freshclam  2>/dev/null || true
387    rm -f /etc/crond.daily/freshclam* 2>/dev/null || true
388    rm -rf /var/clamav 2>/dev/null || true
389    
390    echo "Changing freshclam log owners"
391    if [[ -d /var/log/freshclam ]]; then
392      chown -R clamupdate:clamupdate /var/log/freshclam;
393      chown -R clamupdate:clamupdate /var/log/freshclam/*;
394    fi
395    
396    echo "Changing clamd log owners"
397    if [[ -d /var/log/clamd ]]; then
398      chown -R clamscan:clamscan /var/log/clamd;
399      chown -R clamscan:clamscan /var/log/clamd/*;
400    fi
401    
402  %install  %install
403  rm -rf $RPM_BUILD_ROOT  rm -rf $RPM_BUILD_ROOT
404  (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)  (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
405  /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \  /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
406    --file /var/service/freshclam/run 'attr(0755,root,root)' \    --dir /var/log/freshclam 'attr(2755,clamupdate,clamupdate)' \
407    --file /var/service/freshclam/log/run 'attr(0755,root,root)' \    --dir /var/log/clamd 'attr(2755,clamscan,clamscan)' \
408    --dir /var/log/freshclam 'attr(2750,smelog,clamav)' \    --dir /var/spool/clamav/quarantine 'attr(2750,clamscan,clamscan)' \
   --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)' \  
409    --file /sbin/e-smith/freshclam-update-failed 'attr(0755,root,root)' \    --file /sbin/e-smith/freshclam-update-failed 'attr(0755,root,root)' \
410    --file /sbin/e-smith/freshclam-update-ok 'attr(0755,root,root)' \    --file /sbin/e-smith/freshclam-update-ok 'attr(0755,root,root)' \
411    --file /sbin/e-smith/smeserver-clamscan 'attr(0755,root,root)' \    --file /sbin/e-smith/smeserver-clamscan 'attr(0755,root,root)' \
412      --file /usr/lib/systemd/system/clamd.service 'attr(0644,root,root)' \
413      --file /usr/lib/systemd/system/freshclam.service 'attr(0644,root,root)' \
414      --dir /usr/lib/systemd/system/clamd.service.d 'attr(0755,root,root)' \
415      --dir /usr/lib/systemd/system/freshclam.service.d 'attr(0755,root,root)' \
416    > %{name}-%{version}-%{release}-filelist    > %{name}-%{version}-%{release}-filelist
417    
418  %clean  %clean


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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