/[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.1 by stephdl, Fri Feb 5 23:45:20 2016 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.5 2015/12/01 18:14:45 vip-ire 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.6.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-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
19  Requires: e-smith-base  Requires: e-smith-base >= 5.8.0-63
20  Requires: clamav >= 0.94  Requires: clamav >= 0.103
21  Requires: clamd >= 0.94  Requires: clamd >= 0.103
22  Requires: clamav-db  Requires: clamav-data
23    Requires: clamav-update
24  Requires: e-smith-formmagick >= 1.4.0-12  Requires: e-smith-formmagick >= 1.4.0-12
25    Requires: smeserver-spamassassin >= 2.7.0
26  Provides: e-smith-clamav  Provides: e-smith-clamav
27  Obsoletes: e-smith-clamav  Obsoletes: e-smith-clamav
28  Obsoletes: e-smith-antivirus  Obsoletes: e-smith-antivirus
# Line 29  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
49    - Updated to use 0.103+ from EPEL [SME: 11194]
50    - 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
54    - increase lower memory limit to 1GB [SME: 10833]
55    
56    * Thu Oct 24 2019 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-3.sme
57    - fix for AllowSupplementaryGroups warning [SME: 10813]
58      thanks to  bunkobugsy
59    
60    * Thu May 12 2016 Daniel Berteaud <daniel@firewall-services.com> 2.6.0-2.sme
61    - Rebuild for [SME: 9393]
62    
63  * Sat Feb 06 2016 stephane de Labrusse <stephdl@de-labrusse.fr> 2.6.0-1.sme  * Sat Feb 06 2016 stephane de Labrusse <stephdl@de-labrusse.fr> 2.6.0-1.sme
64  - Initial release to sme10  - Initial release to sme10
65    
# Line 348  SME Server enhancement to configure and Line 379  SME Server enhancement to configure and
379    
380  %prep  %prep
381  %setup  %setup
382    %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  rm -f /etc/cron.d/clamav  
406    # All a bit ugly clearing up due to migrating freshclam here and A5 updates
407    # Most of this can go in due course
408    
409    #echo "File cleanup"
410    # cleanup old files
411    
412    # no clue where it comes from not in sme9, not in new rpms, not templated
413    #rm -f /etc/cron.d/clamav 2>/dev/null || true
414    # this is clamd-0.100.2-2.el7.sme.x86_64 owned and not templated, removing the rpm will remove it ; useless
415    #rm -f /etc/logrotate.d/clamav 2>/dev/null || true
416    # 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 -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"
424    if [[ -d /var/log/freshclam ]]; then
425      chown -R clamupdate:clamupdate /var/log/freshclam;
426      chown -R clamupdate:clamupdate /var/log/freshclam/*;
427    fi
428    
429    echo "Changing clamd log owners"
430    if [[ -d /var/log/clamd ]]; then
431      chown -R clamscan:clamscan /var/log/clamd;
432      chown -R clamscan:clamscan /var/log/clamd/*;
433    fi
434    
435  %install  %install
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    --file /var/service/freshclam/run 'attr(0755,root,root)' \    --dir /run/clamd 'attr(2775,clamscan,virusgroup)' \
440    --file /var/service/freshclam/log/run 'attr(0755,root,root)' \    --dir /var/log/freshclam 'attr(2755,clamupdate,clamupdate)' \
441    --dir /var/log/freshclam 'attr(2750,smelog,clamav)' \    --dir /var/log/clamd 'attr(2755,clamscan,clamscan)' \
442    --file /var/service/clamd/run 'attr(0755,root,root)' \    --dir /var/spool/clamav/quarantine 'attr(2750,clamscan,clamscan)' \
   --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)' \  
443    --file /sbin/e-smith/freshclam-update-failed 'attr(0755,root,root)' \    --file /sbin/e-smith/freshclam-update-failed 'attr(0755,root,root)' \
444    --file /sbin/e-smith/freshclam-update-ok 'attr(0755,root,root)' \    --file /sbin/e-smith/freshclam-update-ok 'attr(0755,root,root)' \
445    --file /sbin/e-smith/smeserver-clamscan 'attr(0755,root,root)' \    --file /sbin/e-smith/smeserver-clamscan 'attr(0755,root,root)' \
446      --file /usr/lib/systemd/system/clamd.service 'attr(0644,root,root)' \
447      --file /usr/lib/systemd/system/freshclam.service 'attr(0644,root,root)' \
448      --dir /usr/lib/systemd/system/clamd.service.d 'attr(0755,root,root)' \
449      --dir /usr/lib/systemd/system/freshclam.service.d 'attr(0755,root,root)' \
450    > %{name}-%{version}-%{release}-filelist    > %{name}-%{version}-%{release}-filelist
451    
452  %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