/[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.6 by jpp, Sun Jan 3 04:31:10 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.5 2020/12/16 17:06:02 jcrisp 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 2
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    * Sat Jan 02 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-2.sme
37    - add pid folder /run/clamd/ [SME: 11103]
38      few improvements
39    - create update event [SME: 11162]
40    
41  * 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
42  - Updated to use 0.103+ from EPEL [SME: 11194]  - Updated to use 0.103+ from EPEL [SME: 11194]
43  - Updated to use systemd  - Updated to use systemd for clamd [SME: 11103]
44    - Updated to use systemd for freshclam [SME: 11104]
45    
46  * 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
47  - 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 372  SME Server enhancement to configure and
372    
373  %prep  %prep
374  %setup  %setup
375  #%patch0 -p1  %patch0 -p1
376    mkdir -p root/run/clamd
377    rm -rf root/etc/e-smith/templates/usr/lib/systemd/system/freshclam.service.d
378    rm -rf root/usr/lib/systemd/system/freshclam.service.d
379    
380  %build  %build
381  perl createlinks  perl createlinks
382    
383  %pre  %pre
384    if [ $1 -gt 1 ] ; then
385      if [ -e /var/service/clamd/run ] ; then
386           /usr/bin/sv d clamd
387           /usr/bin/sv d clamd/log
388      fi
389    fi
390    if [ $1 -gt 1 ] ; then
391      if [ -e /var/service/freshclam/run ] ; then
392           /usr/bin/sv d freshclam
393           /usr/bin/sv d freshclam/log
394      fi
395    fi
396  %post  %post
397    
398  # 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
399  # Most of this can go in due course  # Most of this can go in due course
400    
401  echo "File cleanup"  #echo "File cleanup"
402  # cleanup old files  # cleanup old files
403    
404  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
405  rm -f /etc/logrotate.d/clamav 2>/dev/null || true  #rm -f /etc/cron.d/clamav 2>/dev/null || true
406  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
407  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
408  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
409  rm -rf /var/clamav 2>/dev/null || true  #rm -f /etc/clamd.d/scan.conf  2>/dev/null || true
410    # should only be removed from prep as it is owned by this rpm
411    #rm -rf /etc/e-smith/events/bootstrap-console-save/templates2expand/etc/cron.daily/freshclam  2>/dev/null || true
412    # clamav-db and clamd rpm owned, might remains because of the content
413    #rm -rf /var/clamav 2>/dev/null || true
414    
415  echo "Changing freshclam log owners"  echo "Changing freshclam log owners"
416  if [[ -d /var/log/freshclam ]]; then  if [[ -d /var/log/freshclam ]]; then
# Line 403  fi Line 428  fi
428  rm -rf $RPM_BUILD_ROOT  rm -rf $RPM_BUILD_ROOT
429  (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)  (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
430  /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \  /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
431      --dir /run/clamd 'attr(2775,clamscan,virusgroup)' \
432    --dir /var/log/freshclam 'attr(2755,clamupdate,clamupdate)' \    --dir /var/log/freshclam 'attr(2755,clamupdate,clamupdate)' \
433    --dir /var/log/clamd 'attr(2755,clamscan,clamscan)' \    --dir /var/log/clamd 'attr(2755,clamscan,clamscan)' \
434    --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