/[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.9 by jpp, Fri Jan 8 22:25:52 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.8 2021/01/08 16:04:20 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 5
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    
16  BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot  BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
17  BuildArchitectures: noarch  BuildArchitectures: noarch
18  Requires: e-smith-lib  Requires: e-smith-lib
# Line 32  BuildRequires: e-smith-devtools Line 34  BuildRequires: e-smith-devtools
34  SME Server enhancement to configure and run clamd and freshclam  SME Server enhancement to configure and run clamd and freshclam
35    
36  %changelog  %changelog
37    * Fri Jan 08 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-5.sme
38    - ease use of clamdtop [SME: 11313]
39    
40    * Wed Jan 06 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-4.sme
41    - fix Transaction check error [SME: 11311]
42    
43    * Sat Jan 02 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-2.sme
44    - add pid folder /run/clamd/ [SME: 11103]
45      few improvements
46    - create update event [SME: 11162]
47    
48  * 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
49  - Updated to use 0.103+ from EPEL [SME: 11194]  - Updated to use 0.103+ from EPEL [SME: 11194]
50  - Updated to use systemd  - Updated to use systemd for clamd [SME: 11103]
51    - Updated to use systemd for freshclam [SME: 11104]
52    
53  * 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
54  - 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 379  SME Server enhancement to configure and
379    
380  %prep  %prep
381  %setup  %setup
382  #%patch0 -p1  %patch0 -p1
383    mkdir -p root/run/clamd
384    rm -rf root/etc/e-smith/templates/usr/lib/systemd/system/freshclam.service.d
385    rm -rf root/usr/lib/systemd/system/freshclam.service.d
386    %patch1 -p1
387    
388  %build  %build
389  perl createlinks  perl createlinks
390    
391  %pre  %pre
392    if [ $1 -gt 1 ] ; then
393      if [ -e /var/service/clamd/run ] ; then
394           /usr/bin/sv d clamd
395           /usr/bin/sv d clamd/log
396      fi
397    fi
398    if [ $1 -gt 1 ] ; then
399      if [ -e /var/service/freshclam/run ] ; then
400           /usr/bin/sv d freshclam
401           /usr/bin/sv d freshclam/log
402      fi
403    fi
404  %post  %post
405    
406  # All a bit ugly clearing up due to migrating freshclam here and A5 updates  # All a bit ugly clearing up due to migrating freshclam here and A5 updates
407  # Most of this can go in due course  # Most of this can go in due course
408    
409  echo "File cleanup"  #echo "File cleanup"
410  # cleanup old files  # cleanup old files
411    
412  rm -f /etc/cron.d/clamav 2>/dev/null || true  # no clue where it comes from not in sme9, not in new rpms, not templated
413  rm -f /etc/logrotate.d/clamav 2>/dev/null || true  #rm -f /etc/cron.d/clamav 2>/dev/null || true
414  rm -f /etc/clamd.d/scan.conf  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
415  rm -rf /etc/e-smith/events/bootstrap-console-save/templates2expand/etc/cron.daily/freshclam  2>/dev/null || true  #rm -f /etc/logrotate.d/clamav 2>/dev/null || true
416  rm -f /etc/crond.daily/freshclam* 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
417  rm -rf /var/clamav 2>/dev/null || true  #rm -f /etc/clamd.d/scan.conf  2>/dev/null || true
418    # should only be removed from prep as it is owned by this rpm
419    #rm -rf /etc/e-smith/events/bootstrap-console-save/templates2expand/etc/cron.daily/freshclam  2>/dev/null || true
420    # clamav-db and clamd rpm owned, might remains because of the content
421    #rm -rf /var/clamav 2>/dev/null || true
422    
423  echo "Changing freshclam log owners"  echo "Changing freshclam log owners"
424  if [[ -d /var/log/freshclam ]]; then  if [[ -d /var/log/freshclam ]]; then
# Line 403  fi Line 436  fi
436  rm -rf $RPM_BUILD_ROOT  rm -rf $RPM_BUILD_ROOT
437  (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)  (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
438  /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \  /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
439      --dir /run/clamd 'attr(2775,clamscan,virusgroup)' \
440    --dir /var/log/freshclam 'attr(2755,clamupdate,clamupdate)' \    --dir /var/log/freshclam 'attr(2755,clamupdate,clamupdate)' \
441    --dir /var/log/clamd 'attr(2755,clamscan,clamscan)' \    --dir /var/log/clamd 'attr(2755,clamscan,clamscan)' \
442    --dir /var/spool/clamav/quarantine 'attr(2750,clamscan,clamscan)' \    --dir /var/spool/clamav/quarantine 'attr(2750,clamscan,clamscan)' \


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