/[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.2 by vip-ire, Thu May 12 21:20:14 2016 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.1 2016/02/05 23:45:20 stephdl 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.6.0  %define version 2.7.0
7  %define release 2  %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-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
18  Requires: e-smith-base  Requires: e-smith-base >= 5.8.0-63
19  Requires: clamav >= 0.94  Requires: clamav >= 0.103
20  Requires: clamd >= 0.94  Requires: clamd >= 0.103
21  Requires: clamav-db  Requires: clamav-data
22    Requires: clamav-update
23  Requires: e-smith-formmagick >= 1.4.0-12  Requires: e-smith-formmagick >= 1.4.0-12
24    Requires: smeserver-spamassassin >= 2.7.0
25  Provides: e-smith-clamav  Provides: e-smith-clamav
26  Obsoletes: e-smith-clamav  Obsoletes: e-smith-clamav
27  Obsoletes: e-smith-antivirus  Obsoletes: e-smith-antivirus
# Line 29  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
45    - Updated to use 0.103+ from EPEL [SME: 11194]
46    - 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
50    - increase lower memory limit to 1GB [SME: 10833]
51    
52    * Thu Oct 24 2019 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-3.sme
53    - fix for AllowSupplementaryGroups warning [SME: 10813]
54      thanks to  bunkobugsy
55    
56  * Thu May 12 2016 Daniel Berteaud <daniel@firewall-services.com> 2.6.0-2.sme  * Thu May 12 2016 Daniel Berteaud <daniel@firewall-services.com> 2.6.0-2.sme
57  - Rebuild for [SME: 9393]  - Rebuild for [SME: 9393]
58    
# Line 351  SME Server enhancement to configure and Line 375  SME Server enhancement to configure and
375    
376  %prep  %prep
377  %setup  %setup
378    %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  rm -f /etc/cron.d/clamav  
401    # All a bit ugly clearing up due to migrating freshclam here and A5 updates
402    # Most of this can go in due course
403    
404    #echo "File cleanup"
405    # cleanup old files
406    
407    # no clue where it comes from not in sme9, not in new rpms, not templated
408    #rm -f /etc/cron.d/clamav 2>/dev/null || true
409    # this is clamd-0.100.2-2.el7.sme.x86_64 owned and not templated, removing the rpm will remove it ; useless
410    #rm -f /etc/logrotate.d/clamav 2>/dev/null || true
411    # 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 -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"
419    if [[ -d /var/log/freshclam ]]; then
420      chown -R clamupdate:clamupdate /var/log/freshclam;
421      chown -R clamupdate:clamupdate /var/log/freshclam/*;
422    fi
423    
424    echo "Changing clamd log owners"
425    if [[ -d /var/log/clamd ]]; then
426      chown -R clamscan:clamscan /var/log/clamd;
427      chown -R clamscan:clamscan /var/log/clamd/*;
428    fi
429    
430  %install  %install
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    --file /var/service/freshclam/run 'attr(0755,root,root)' \    --dir /run/clamd 'attr(2775,clamscan,virusgroup)' \
435    --file /var/service/freshclam/log/run 'attr(0755,root,root)' \    --dir /var/log/freshclam 'attr(2755,clamupdate,clamupdate)' \
436    --dir /var/log/freshclam 'attr(2750,smelog,clamav)' \    --dir /var/log/clamd 'attr(2755,clamscan,clamscan)' \
437    --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)' \  
438    --file /sbin/e-smith/freshclam-update-failed 'attr(0755,root,root)' \    --file /sbin/e-smith/freshclam-update-failed 'attr(0755,root,root)' \
439    --file /sbin/e-smith/freshclam-update-ok 'attr(0755,root,root)' \    --file /sbin/e-smith/freshclam-update-ok 'attr(0755,root,root)' \
440    --file /sbin/e-smith/smeserver-clamscan 'attr(0755,root,root)' \    --file /sbin/e-smith/smeserver-clamscan 'attr(0755,root,root)' \
441      --file /usr/lib/systemd/system/clamd.service 'attr(0644,root,root)' \
442      --file /usr/lib/systemd/system/freshclam.service 'attr(0644,root,root)' \
443      --dir /usr/lib/systemd/system/clamd.service.d 'attr(0755,root,root)' \
444      --dir /usr/lib/systemd/system/freshclam.service.d 'attr(0755,root,root)' \
445    > %{name}-%{version}-%{release}-filelist    > %{name}-%{version}-%{release}-filelist
446    
447  %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