/[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.5 by jcrisp, Wed Dec 16 17:06:02 2020 UTC Revision 1.14 by jpp, Mon Nov 15 18:20:56 2021 UTC
# Line 1  Line 1 
1  # $Id: smeserver-clamav.spec,v 1.4 2019/11/27 03:52:30 jpp Exp $  # $Id: smeserver-clamav.spec,v 1.13 2021/06/09 15:33:00 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.7.0  %define version 2.7.0
7  %define release 1  %define release 10
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    
18  BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot  BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
19  BuildArchitectures: noarch  BuildArchitectures: noarch
20  Requires: e-smith-lib  Requires: e-smith-lib
# Line 32  BuildRequires: e-smith-devtools Line 36  BuildRequires: e-smith-devtools
36  SME Server enhancement to configure and run clamd and freshclam  SME Server enhancement to configure and run clamd and freshclam
37    
38  %changelog  %changelog
39    * Mon Nov 15 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-10.sme
40    - identify from which server is freshclam error [SME: 11755]
41      fix from  Graeme Fleming
42    
43    * Wed Jun 09 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-9.sme
44    - fix typo in logrotate [SME: 11608]
45    
46    * Sun Apr 18 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-8.sme
47    - fix typo and missing +x [SME: 11520]
48    
49    * Wed Apr 07 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-6.sme
50    - fix issues with non epel standard scan.conf [SME: 11520]
51      move clamd.conf to scan.conf
52      remove alias for clamtop
53      add a wrapper for clamdscan to force --fdpass
54    
55    * Fri Jan 08 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-5.sme
56    - ease use of clamdtop [SME: 11313]
57    
58    * Wed Jan 06 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-4.sme
59    - fix Transaction check error [SME: 11311]
60    
61    * Sat Jan 02 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-2.sme
62    - add pid folder /run/clamd/ [SME: 11103]
63      few improvements
64    - create update event [SME: 11162]
65    
66  * 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
67  - Updated to use 0.103+ from EPEL [SME: 11194]  - Updated to use 0.103+ from EPEL [SME: 11194]
68  - Updated to use systemd  - Updated to use systemd for clamd [SME: 11103]
69    - Updated to use systemd for freshclam [SME: 11104]
70    
71  * 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
72  - increase lower memory limit to 1GB [SME: 10833]  - increase lower memory limit to 1GB [SME: 10833]
# Line 365  SME Server enhancement to configure and Line 397  SME Server enhancement to configure and
397    
398  %prep  %prep
399  %setup  %setup
400  #%patch0 -p1  %patch0 -p1
401    mkdir -p root/run/clamd
402    rm -rf root/etc/e-smith/templates/usr/lib/systemd/system/freshclam.service.d
403    rm -rf root/usr/lib/systemd/system/freshclam.service.d
404    %patch1 -p1
405    %patch2 -p1
406    %patch3 -p1
407    
408  %build  %build
409  perl createlinks  perl createlinks
410    
411  %pre  %pre
412    if [ $1 -gt 1 ] ; then
413      if [ -e /var/service/clamd/run ] ; then
414           /usr/bin/sv d clamd
415           /usr/bin/sv d clamd/log
416      fi
417    fi
418    if [ $1 -gt 1 ] ; then
419      if [ -e /var/service/freshclam/run ] ; then
420           /usr/bin/sv d freshclam
421           /usr/bin/sv d freshclam/log
422      fi
423    fi
424  %post  %post
425    # removing old conf file
426    if [[ -f /etc/clamd.d/clamd.conf ]]; then
427       rm -f /etc/clamd.d/clamd.conf
428    fi
429    
430  # 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"  
431  if [[ -d /var/log/freshclam ]]; then  if [[ -d /var/log/freshclam ]]; then
432    chown -R clamupdate:clamupdate /var/log/freshclam;    chown -R clamupdate:clamupdate /var/log/freshclam;
433    chown -R clamupdate:clamupdate /var/log/freshclam/*;    chown -R clamupdate:clamupdate /var/log/freshclam/*;
434  fi  fi
435    
436  echo "Changing clamd log owners"  #echo "Changing clamd log owners"
437  if [[ -d /var/log/clamd ]]; then  if [[ -d /var/log/clamd ]]; then
438    chown -R clamscan:clamscan /var/log/clamd;    chown -R clamscan:clamscan /var/log/clamd;
439    chown -R clamscan:clamscan /var/log/clamd/*;    chown -R clamscan:clamscan /var/log/clamd/*;
# Line 403  fi Line 443  fi
443  rm -rf $RPM_BUILD_ROOT  rm -rf $RPM_BUILD_ROOT
444  (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)  (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
445  /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \  /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
446      --dir /run/clamd 'attr(2775,clamscan,virusgroup)' \
447    --dir /var/log/freshclam 'attr(2755,clamupdate,clamupdate)' \    --dir /var/log/freshclam 'attr(2755,clamupdate,clamupdate)' \
448    --dir /var/log/clamd 'attr(2755,clamscan,clamscan)' \    --dir /var/log/clamd 'attr(2755,clamscan,clamscan)' \
449    --dir /var/spool/clamav/quarantine 'attr(2750,clamscan,clamscan)' \    --dir /var/spool/clamav/quarantine 'attr(2750,clamscan,clamscan)' \
450      --file /sbin/clamdscan 'attr(0755,root,root)' \
451    --file /sbin/e-smith/freshclam-update-failed 'attr(0755,root,root)' \    --file /sbin/e-smith/freshclam-update-failed 'attr(0755,root,root)' \
452    --file /sbin/e-smith/freshclam-update-ok 'attr(0755,root,root)' \    --file /sbin/e-smith/freshclam-update-ok 'attr(0755,root,root)' \
453    --file /sbin/e-smith/smeserver-clamscan 'attr(0755,root,root)' \    --file /sbin/e-smith/smeserver-clamscan 'attr(0755,root,root)' \


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