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