/[smeserver]/rpms/clamav/sme9/clamav.spec
ViewVC logotype

Diff of /rpms/clamav/sme9/clamav.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.3 by slords, Thu Jun 6 14:01:47 2013 UTC Revision 1.26 by jpp, Thu Mar 7 03:51:29 2019 UTC
# Line 11  Line 11 
11  %{?rh7:%define _without_milter 1}  %{?rh7:%define _without_milter 1}
12  %{?el2:%define _without_milter 1}  %{?el2:%define _without_milter 1}
13    
14    # Work around https://bugzilla.clamav.net/show_bug.cgi?id=12162 by bundling
15    # newer zlib version from RHEL/CentOS 7 (#1600458)
16    %global zlibversion 1.2.7
17    %global zlibrelease 17%{?dist}
18    
19    
20  Summary: Anti-virus software  Summary: Anti-virus software
21  Name: clamav  Name: clamav
22  Version: 0.97.8  Version: 0.100.2
23  Release: 1%{?dist}  Release: 5%{?dist}
24  License: GPL  # ClamAV is GPLv2, zlib is zlib, /contrib/dotzlib/ has Boost license
25    %if 0%{?zlibversion:1} && 0%{?zlibrelease:1}
26    License: GPLv2 and zlib and Boost
27    %else
28    License: GPLv2
29    %endif
30    
31    
32  Group: Applications/System  Group: Applications/System
33  URL: http://www.clamav.net/  URL: http://www.clamav.net/
34    
# Line 24  Source1: clamav.init Line 37  Source1: clamav.init
37  Source2: clamav-milter.init  Source2: clamav-milter.init
38  Source10: http://db.local.clamav.net/main.cvd  Source10: http://db.local.clamav.net/main.cvd
39  Source11: http://db.local.clamav.net/daily.cvd  Source11: http://db.local.clamav.net/daily.cvd
40    
41    %if 0%{?zlibversion:1} && 0%{?zlibrelease:1}
42    # Cheerfully borrowed from zlib.spec in RHEL/CentOS 7
43    Source90:   http://www.zlib.net/zlib-%{zlibversion}.tar.bz2
44    #Source90: zlib-1.2.7.tar.bz2
45    %endif
46    
47    %if 0%{?zlibversion:1} && 0%{?zlibrelease:1}
48    # Cheerfully borrowed from zlib.spec in RHEL/CentOS 7, see
49    # also https://git.centos.org/tree/rpms!zlib.git/c7/SOURCES
50    Patch90:       zlib-1.2.5-minizip-fixuncrypt.patch
51    # resolves: #805113
52    Patch91:       zlib-1.2.7-optimized-s390.patch
53    # resolves: #844791
54    Patch92:       zlib-1.2.7-z-block-flush.patch
55    # resolves: #1127330
56    Patch93:       zlib-1.2.7-fix-serious-but-very-rare-decompression-bug-in-inftr.patch
57    # resolves: #1337441
58    Patch94:       zlib-1.2.7-Fix-bug-where-gzopen-gzclose-would-write-an-empty-fi.patch
59    %endif
60    
61  BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root  BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
62    
63  BuildRequires: bzip2-devel  BuildRequires: bzip2-devel
64  BuildRequires: curl-devel  BuildRequires: curl-devel
65  BuildRequires: gmp-devel  BuildRequires: gmp-devel
66  BuildRequires: ncurses-devel  BuildRequires: ncurses-devel
 BuildRequires: zlib-devel  
67  %{!?_without_milter:BuildRequires: sendmail-devel >= 8.12}  %{!?_without_milter:BuildRequires: sendmail-devel >= 8.12}
68  BuildRequires: check-devel  BuildRequires: check-devel
69    BuildRequires: openssl-devel
70    BuildRequires: libxml2-devel
71    BuildRequires: pcre-devel
72    BuildRequires: xz
73    
74  ### Do not require the latest release of clamav-db specifically (people may use freshclam onward)  ### Do not require the latest release of clamav-db specifically (people may use freshclam onward)
75  #Requires: clamav-db = %{version}-%{release}  #Requires: clamav-db = %{version}-%{release}
76  Requires: clamav-db  Requires: clamav-db
77    
78    Provides: bundled(libmspack) = 0.5-0.1.alpha.modified_by_clamav
79    %if 0%{?zlibversion:1} && 0%{?zlibrelease:1}
80    Provides: bundled(zlib) = %{zlibversion}-%{zlibrelease}
81    %else
82    Requires: zlib-devel
83    %endif
84    
85  ### Fedora Extras introduced them differently :(  ### Fedora Extras introduced them differently :(
86  Obsoletes: libclamav <= %{version}-%{release}  Obsoletes: libclamav <= %{version}-%{release}
87  Obsoletes: clamav-lib <= %{version}-%{release}  Obsoletes: clamav-lib <= %{version}-%{release}
# Line 84  Requires(pre): /usr/sbin/groupadd Line 128  Requires(pre): /usr/sbin/groupadd
128  Requires(pre): /usr/sbin/useradd  Requires(pre): /usr/sbin/useradd
129    
130  ### Fedora Extras introduced them differently :(  ### Fedora Extras introduced them differently :(
131  Obsoletes: clamav-update <= %{version}-%{release}  Provides: clamav-update = %{version}-%{release}
132  Obsoletes: clamav-data <= %{version}-%{release}  Obsoletes: clamav-update < %{version}-%{release}
133    Provides: clamav-data = %{version}-%{release}
134    Obsoletes: clamav-data < %{version}-%{release}
135    Obsoletes: clamav-data-empty <= %{version}-%{release}
136    # Ugly to put these in the db-package, but needed
137    # here to handle upgrades on EL5.
138    Provides: clamav-filesystem = %{version}-%{release}
139    Obsoletes: clamav-filesystem < %{version}-%{release}
140    
141  %description db  %description db
142  The actual virus database for %{name}  The actual virus database for %{name}
# Line 119  you will need to install %{name}-devel. Line 170  you will need to install %{name}-devel.
170          s|^\@INSTALL_FRESHCLAM_CONF_TRUE\@|\t|g;          s|^\@INSTALL_FRESHCLAM_CONF_TRUE\@|\t|g;
171      ' database/Makefile.in etc/Makefile.in      ' database/Makefile.in etc/Makefile.in
172    
173  %{__perl} -pi.orig -e '  %{__perl} -pi -e '
174          s|^(Example)|#$1|;          s|^(Example)|#$1|;
175          s|^#(LogFile) .+$|$1 %{_localstatedir}/log/clamav/clamd.log|;          s|^#(LogFile) .+$|$1 %{_localstatedir}/log/clamav/clamd.log|;
176          s|^#(LogFileMaxSize) .*|$1 0|;          s|^#(LogFileMaxSize) .*|$1 0|;
# Line 147  you will need to install %{name}-devel. Line 198  you will need to install %{name}-devel.
198          s|^#(ArchiveMaxCompressionRatio) .+|$1 300|;          s|^#(ArchiveMaxCompressionRatio) .+|$1 300|;
199          s|^#(ArchiveBlockEncrypted)|$1|;          s|^#(ArchiveBlockEncrypted)|$1|;
200          s|^#(ArchiveBlockMax)|$1|;          s|^#(ArchiveBlockMax)|$1|;
201      ' etc/clamd.conf      ' etc/clamd.conf.sample >etc/clamd.conf
202    
203  %{__perl} -pi.orig -e '  %{__perl} -pi -e '
204          s|^(Example)|#$1|;          s|^(Example)|#$1|;
205          s|^#(AllowSupplementaryGroups) .+$|$1 yes|;          s|^#(AllowSupplementaryGroups) .+$|$1 yes|;
206          s|^#(ClamdSocket) .+$|$1 unix:%{_localstatedir}/run/clamav/clamd.sock|;          s|^#(ClamdSocket) .+$|$1 unix:%{_localstatedir}/run/clamav/clamd.sock|;
# Line 159  you will need to install %{name}-devel. Line 210  you will need to install %{name}-devel.
210          s|^#(LogTime)|$1|;          s|^#(LogTime)|$1|;
211          s|^#(MilterSocket) /.*$|$1 unix:%{_localstatedir}/clamav/clmilter.socket|;          s|^#(MilterSocket) /.*$|$1 unix:%{_localstatedir}/clamav/clmilter.socket|;
212          s|^#(User) .+$|$1 clamav|;          s|^#(User) .+$|$1 clamav|;
213      ' etc/clamav-milter.conf      ' etc/clamav-milter.conf.sample >etc/clamav-milter.conf
214    
215  %{__perl} -pi.orig -e '  %if 0%{?zlibversion:1} && 0%{?zlibrelease:1}
216    # Cheerfully borrowed from zlib.spec in RHEL/CentOS 7, see
217    # https://git.centos.org/blob/rpms!zlib.git/c7/SPECS!zlib.spec
218    tar xfj %{SOURCE90}
219    pushd zlib-%{zlibversion}
220    %patch90 -p1 -b .fixuncrypt
221    %ifarch s390 s390x
222    %patch91 -p1 -b .optimized-deflate
223    %endif
224    %patch92 -p1 -b .z-flush
225    %patch93 -p1
226    %patch94 -p1
227    popd
228    %endif
229    
230    %{__perl} -p -e '
231          s|^(Checks) .+$|$1 24|;          s|^(Checks) .+$|$1 24|;
232          s|^(Example)|#$1|;          s|^(Example)|#$1|;
233          s|^#(DatabaseDirectory) .+$|$1 %{_localstatedir}/clamav|;          s|^#(DatabaseDirectory) .+$|$1 %{_localstatedir}/clamav|;
# Line 169  you will need to install %{name}-devel. Line 235  you will need to install %{name}-devel.
235          s|^#(LogSyslog)|$1|;          s|^#(LogSyslog)|$1|;
236          s|^#(NotifyClamd) .+$|$1 %{_sysconfdir}/clamd.conf|;          s|^#(NotifyClamd) .+$|$1 %{_sysconfdir}/clamd.conf|;
237          s|^#(UpdateLogFile) .+$|$1 %{_localstatedir}/log/clamav/freshclam.log|;          s|^#(UpdateLogFile) .+$|$1 %{_localstatedir}/log/clamav/freshclam.log|;
238      ' etc/freshclam.conf      ' etc/freshclam.conf.sample >etc/freshclam.conf
239    
240  %{__cat} <<EOF >clamd.logrotate  %{__cat} <<EOF >clamd.logrotate
241  %{_localstatedir}/log/clamav/clamd.log {  %{_localstatedir}/log/clamav/clamd.log {
# Line 207  CLAMAV_FLAGS="--config-file=%{_sysconfdi Line 273  CLAMAV_FLAGS="--config-file=%{_sysconfdi
273  EOF  EOF
274    
275  %build  %build
276    %if 0%{?zlibversion:1} && 0%{?zlibrelease:1}
277    # Cheerfully borrowed from zlib.spec in RHEL/CentOS 7, see
278    # https://git.centos.org/blob/rpms!zlib.git/c7/SPECS!zlib.spec
279    pushd zlib-%{zlibversion}
280    %ifarch ppc64 ppc64le
281    export CFLAGS="$RPM_OPT_FLAGS -fPIC -O3"
282    %else
283    export CFLAGS="$RPM_OPT_FLAGS -fPIC"
284    %endif
285    
286    export LDFLAGS="$LDFLAGS -Wl,-z,relro"
287    
288    ./configure --libdir=%{_libdir} --includedir=%{_includedir} --prefix=%{_prefix} --static
289    make %{?_smp_mflags}
290    make install DESTDIR=%{_builddir}/%{name}-%{version}/zlib-%{zlibversion}-%{zlibrelease}
291    popd
292    %endif
293    
294    
295  %configure  \  %configure  \
296      --program-prefix="%{?_program_prefix}" \      --program-prefix="%{?_program_prefix}" \
297      --disable-clamav \      --disable-clamav \
# Line 220  EOF Line 305  EOF
305  %{!?_without_milter:--enable-milter} \  %{!?_without_milter:--enable-milter} \
306      --with-dbdir="%{_localstatedir}/clamav" \      --with-dbdir="%{_localstatedir}/clamav" \
307      --with-group="clamav" \      --with-group="clamav" \
308      --with-libcurl \      --with-libcurl=%{_prefix} \
309      --with-user="clamav"      --with-user="clamav" \
310    %if 0%{?zlibversion:1} && 0%{?zlibrelease:1}
311        --with-zlib=%{_builddir}/%{name}-%{version}/zlib-%{zlibversion}-%{zlibrelease}%{_prefix} \
312    %endif
313    
314  ### Disable JIT until it is implemented securely (RHbz #573191)  ### Disable JIT until it is implemented securely (RHbz #573191)
315  #    --enable-llvm \  #    --enable-llvm \
316  %{__make} %{?_smp_mflags}  %{__make} %{?_smp_mflags}
# Line 231  EOF Line 320  EOF
320  %{__make} install DESTDIR="%{buildroot}"  %{__make} install DESTDIR="%{buildroot}"
321    
322  %{__install} -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/clamd  %{__install} -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/clamd
323    %{__install} -Dp -m0644 etc/freshclam.conf %{buildroot}%{_sysconfdir}/freshclam.conf
324  %{__install} -Dp -m0755 freshclam.cron %{buildroot}%{_sysconfdir}/cron.daily/freshclam  %{__install} -Dp -m0755 freshclam.cron %{buildroot}%{_sysconfdir}/cron.daily/freshclam
325  %{__install} -Dp -m0644 freshclam.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/freshclam  %{__install} -Dp -m0644 freshclam.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/freshclam
326    %{__install} -Dp -m0644 etc/clamd.conf %{buildroot}%{_sysconfdir}/clamd.conf
327  %{__install} -Dp -m0644 clamd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/clamav  %{__install} -Dp -m0644 clamd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/clamav
328    
329  %if %{!?_without_milter:1}0  %if %{!?_without_milter:1}0
330    %{__install} -Dp -m0644 etc/clamav-milter.conf %{buildroot}%{_sysconfdir}/clamav-milter.conf
331  %{__install} -Dp -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/clamav-milter  %{__install} -Dp -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/clamav-milter
332  %{__install} -Dp -m0644 clamav-milter.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter  %{__install} -Dp -m0644 clamav-milter.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter
333  %else  %else
# Line 314  fi Line 406  fi
406    
407  %files  %files
408  %defattr(-, root, root, 0755)  %defattr(-, root, root, 0755)
409  %doc AUTHORS BUGS ChangeLog COPYING FAQ INSTALL NEWS README  %doc ChangeLog.md COPYING* INSTALL.md NEWS.md README.md
410  %doc docs/*.pdf etc/freshclam.conf  %doc etc/freshclam.conf.sample
411    %doc docs/*.pdf
412  ### Remove test virus documents as they trigger clamav  ### Remove test virus documents as they trigger clamav
413  #%doc test/  #%doc test/
414  %doc %{_mandir}/man1/sigtool.1*  %doc %{_mandir}/man1/sigtool.1*
# Line 331  fi Line 424  fi
424  %{_libdir}/libclamav.so.*  %{_libdir}/libclamav.so.*
425  %{_libdir}/libclamunrar.so.*  %{_libdir}/libclamunrar.so.*
426  %{_libdir}/libclamunrar_iface.so.*  %{_libdir}/libclamunrar_iface.so.*
427    %{_libdir}/libclammspack.so.*
428  # moved from -devel to here so clamd can work with rars when clamav-devel is not installed.  # moved from -devel to here so clamd can work with rars when clamav-devel is not installed.
429  %{_libdir}/libclamav.so  %{_libdir}/libclamav.so
430  %{_libdir}/libclamunrar.so  %{_libdir}/libclamunrar.so
431  %{_libdir}/libclamunrar_iface.so  %{_libdir}/libclamunrar_iface.so
432    %{_libdir}/libclammspack.so
433    %exclude %{_sysconfdir}/freshclam.conf.sample
434    
435  %files -n clamd  %files -n clamd
436  %defattr(-, root, root, 0755)  %defattr(-, root, root, 0755)
437  %doc etc/clamd.conf  %doc etc/clamd.conf.sample
438  %doc %{_mandir}/man1/clambc.1*  %doc %{_mandir}/man1/clambc.1*
439  %doc %{_mandir}/man1/clamconf.1*  %doc %{_mandir}/man1/clamconf.1*
440  %doc %{_mandir}/man1/clamdscan.1*  %doc %{_mandir}/man1/clamdscan.1*
# Line 358  fi Line 454  fi
454  %dir %{_localstatedir}/clamav/  %dir %{_localstatedir}/clamav/
455  %dir %{_localstatedir}/log/clamav/  %dir %{_localstatedir}/log/clamav/
456  %ghost %{_localstatedir}/log/clamav/clamd.log  %ghost %{_localstatedir}/log/clamav/clamd.log
457    
458  %exclude %{_localstatedir}/clamav/*  %exclude %{_localstatedir}/clamav/*
459    %exclude %{_sysconfdir}/clamd.conf.sample
460    
461  %if %{!?_without_milter:1}0  %if %{!?_without_milter:1}0
462  %files milter  %files milter
463  %defattr(-, root, root, 0755)  %defattr(-, root, root, 0755)
464    %doc etc/clamav-milter.conf.sample
465  %doc %{_mandir}/man5/clamav-milter.conf.5*  %doc %{_mandir}/man5/clamav-milter.conf.5*
466  %doc %{_mandir}/man8/clamav-milter.8*  %doc %{_mandir}/man8/clamav-milter.8*
467  %config(noreplace) %{_sysconfdir}/clamav-milter.conf  %config(noreplace) %{_sysconfdir}/clamav-milter.conf
# Line 372  fi Line 471  fi
471  %else  %else
472  %exclude %{_mandir}/man5/clamav-milter.conf.5*  %exclude %{_mandir}/man5/clamav-milter.conf.5*
473  %endif  %endif
474    %exclude %{_sysconfdir}/clamav-milter.conf.sample
475    
476  %files db  %files db
477  %defattr(-, root, root, 0755)  %defattr(-, root, root, 0755)
# Line 388  fi Line 488  fi
488  %{_bindir}/clamav-config  %{_bindir}/clamav-config
489  %{_includedir}/clamav.h  %{_includedir}/clamav.h
490  %{_libdir}/pkgconfig/libclamav.pc  %{_libdir}/pkgconfig/libclamav.pc
491    %{_libdir}/pkgconfig/libclammspack.pc
492  %exclude %{_libdir}/libclamav.la  %exclude %{_libdir}/libclamav.la
493  %exclude %{_libdir}/libclamunrar.la  %exclude %{_libdir}/libclamunrar.la
494  %exclude %{_libdir}/libclamunrar_iface.la  %exclude %{_libdir}/libclamunrar_iface.la
495    %exclude %{_libdir}/libclammspack.la
496    
497  %changelog  %changelog
498  * Sat May 4 2013 David Beveridge <dave@bevhost.com> - 0.97.8-1  * Wed Mar 06 2019 Jean-Philipe Pialasse <tests@pialasse.com> 0.100.2-5.sme
499    - Update clamav-db as per epel last spec file [SME: ]
500      to add clamav-update as provides
501    
502    * Tue Nov 13 2018 John Crisp <jcrisp@safeandsoundit.co.uk> - 0.100.2-4
503    - Fix incorrect version number in the previoius changelog entry
504    
505    * Mon Nov 12 2018 John Crisp <jcrisp@safeandsoundit.co.uk> - 0.100.3-1
506    - Bundle zlib 1.2.7-17.el7 to avoid malformed database errors (#1600458)
507    - [SME: 10645]
508    
509    * Wed Oct 24 2018 Daniel Berteaud <daniel@firewall-services.com> - 0.100.2-1.sme
510    - Update to 0.100.2 [SME: 10579]
511    
512    * Wed Mar 14 2018 Daniel Berteaud <daniel@firewall-services.com> - 0.99.4-1.sme
513    - Update to release 0.99.4 [SME: 10529]
514    
515    * Sat Jan 27 2018 Daniel Berteaud <daniel@firewall-services.com> - 0.99.3-1.sme
516    - Update to release 0.99.3 [SME: 10499]
517    
518    * Tue May 3 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.99.2-1.sme
519    - Update to release 0.99.2 [SME: 9489]
520    
521    * Thu Mar 3 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.99.1-1.sme
522    - Update to release 0.99.1 [SME: 9267]
523    
524    * Tue Jan 12 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.99-2.sme
525    - Add pcre-devel to BuildRequires [SME: 9151]
526    
527    * Wed Jan 6 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.99-1.sme
528    - Update to release 0.99 [SME: 9151]
529    
530    * Wed May 13 2015 Daniel Berteaud <daniel@firewall-services.com> - 0.98.7-1.sme
531    - Updated to release 0.98.7 [SME: 8922]
532    
533    * Thu Jan 29 2015 Daniel Berteaud <daniel@firewall-services.com> - 0.98.6-1.sme
534    - Updated to release 0.98.6 [SME: 8822]
535    
536    * Tue Dec 16 2014 Daniel Berteaud <daniel@firewall-services.com> - 0.98.5-1.sme
537    - Updated to release 0.98.5 [SME: 8729]
538    
539    * Sat Jun 21 2014 Ian Wells <esmith@wellsi.com> - 0.98.4-2.sme
540    - Add BuildRequires for openssl-devel and libxml2-devel [SME: 8457]
541    - Remove Packager and Vendor from spec file.
542    
543    * Thu Jun 17 2014 David Beveridge <dave@bevhost.com> - 0.98.4-1
544    - Updates to release 0.98.4.
545    
546    * Thu May 8 2014 David Beveridge <dave@bevhost.com> - 0.98.3-1
547    - Updated to release 0.98.3.
548    
549    * Sun Jan 26 2014 David Beveridge <dave@bevhost.com> - 0.98.1-1
550    - Updates to release 0.98.1.
551    
552    * Tue Sep 24 2013 Dag Wieers <dag@wieers.com> - 0.98-1
553    - Updated to release 0.98.
554    
555    * Tue May 07 2013 David Hrbáč <david@hrbac.cz> - 0.97.8-1
556  - Updated to release 0.97.8.  - Updated to release 0.97.8.
557    
558  * Wed Mar 20 2013 Dag Wieers <dag@wieers.com> - 0.97.7-1  * Wed Mar 20 2013 Dag Wieers <dag@wieers.com> - 0.97.7-1


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