2007-01-16 00:07:16 +01:00
|
|
|
#
|
2011-02-21 13:23:22 +01:00
|
|
|
# spec file for package clamav
|
2007-01-16 00:07:16 +01:00
|
|
|
#
|
2018-01-26 17:21:11 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-16 00:07:16 +01:00
|
|
|
#
|
2008-09-05 22:14:53 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
- Update to version 0.100.2:
* bsc#1110723, CVE-2018-15378: Vulnerability in ClamAV's MEW
unpacking feature that could allow an unauthenticated, remote
attacker to cause a denial of service (DoS) condition on an
affected device.
* bsc#1103040, CVE-2018-14680, CVE-2018-14681, CVE-2018-14682:
more fixes for embedded libmspack.
* Make freshclam more robust against lagging signature mirrors.
* On-Access "Extra Scanning", an opt-in minor feature of
OnAccess scanning on Linux systems, has been disabled due to a
known issue with resource cleanup OnAccessExtraScanning will
be re-enabled in a future release when the issue is
resolved. In the mean-time, users who enabled the feature in
clamd.conf will see a warning informing them that the feature
is not active. For details, see:
https://bugzilla.clamav.net/show_bug.cgi?id=12048
- Restore exit code compatibility of freshclam with versions before
0.100.0 when the virus database is already up to date
(bsc#1104457, clamav-freshclam-exit.patch).
OBS-URL: https://build.opensuse.org/package/show/security/clamav?expand=0&rev=177
2018-10-04 11:52:49 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-16 00:07:16 +01:00
|
|
|
#
|
|
|
|
|
2011-02-21 13:23:22 +01:00
|
|
|
|
2018-07-26 11:55:19 +02:00
|
|
|
%define clamav_check --enable-check
|
2007-01-16 00:07:16 +01:00
|
|
|
Name: clamav
|
- Update to version 0.100.2:
* bsc#1110723, CVE-2018-15378: Vulnerability in ClamAV's MEW
unpacking feature that could allow an unauthenticated, remote
attacker to cause a denial of service (DoS) condition on an
affected device.
* bsc#1103040, CVE-2018-14680, CVE-2018-14681, CVE-2018-14682:
more fixes for embedded libmspack.
* Make freshclam more robust against lagging signature mirrors.
* On-Access "Extra Scanning", an opt-in minor feature of
OnAccess scanning on Linux systems, has been disabled due to a
known issue with resource cleanup OnAccessExtraScanning will
be re-enabled in a future release when the issue is
resolved. In the mean-time, users who enabled the feature in
clamd.conf will see a warning informing them that the feature
is not active. For details, see:
https://bugzilla.clamav.net/show_bug.cgi?id=12048
- Restore exit code compatibility of freshclam with versions before
0.100.0 when the virus database is already up to date
(bsc#1104457, clamav-freshclam-exit.patch).
OBS-URL: https://build.opensuse.org/package/show/security/clamav?expand=0&rev=177
2018-10-04 11:52:49 +02:00
|
|
|
Version: 0.100.2
|
2018-07-26 11:55:19 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Antivirus Toolkit
|
|
|
|
License: GPL-2.0-only
|
|
|
|
Group: Productivity/Security
|
|
|
|
URL: http://www.clamav.net
|
2018-07-31 11:13:16 +02:00
|
|
|
Source0: http://www.clamav.net/downloads/production/%name-%version.tar.gz
|
|
|
|
Source1: http://www.clamav.net/downloads/production/%name-%version.tar.gz.sig
|
2018-07-26 11:55:19 +02:00
|
|
|
Source4: clamav-rpmlintrc
|
|
|
|
Source6: clamav-tmpfiles.conf
|
|
|
|
Source7: service.clamd
|
|
|
|
Source8: service.freshclam
|
|
|
|
Source9: service.clamav-milter
|
|
|
|
Source11: clamav.keyring
|
|
|
|
Patch1: clamav-conf.patch
|
|
|
|
Patch4: clamav-disable-timestamps.patch
|
|
|
|
Patch5: clamav-obsolete-config.patch
|
2018-07-31 10:58:20 +02:00
|
|
|
Patch6: clamav-disable-yara.patch
|
- Update to version 0.100.2:
* bsc#1110723, CVE-2018-15378: Vulnerability in ClamAV's MEW
unpacking feature that could allow an unauthenticated, remote
attacker to cause a denial of service (DoS) condition on an
affected device.
* bsc#1103040, CVE-2018-14680, CVE-2018-14681, CVE-2018-14682:
more fixes for embedded libmspack.
* Make freshclam more robust against lagging signature mirrors.
* On-Access "Extra Scanning", an opt-in minor feature of
OnAccess scanning on Linux systems, has been disabled due to a
known issue with resource cleanup OnAccessExtraScanning will
be re-enabled in a future release when the issue is
resolved. In the mean-time, users who enabled the feature in
clamd.conf will see a warning informing them that the feature
is not active. For details, see:
https://bugzilla.clamav.net/show_bug.cgi?id=12048
- Restore exit code compatibility of freshclam with versions before
0.100.0 when the virus database is already up to date
(bsc#1104457, clamav-freshclam-exit.patch).
OBS-URL: https://build.opensuse.org/package/show/security/clamav?expand=0&rev=177
2018-10-04 11:52:49 +02:00
|
|
|
Patch7: clamav-freshclam-exit.patch
|
2017-11-28 10:00:11 +01:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2018-04-13 17:16:49 +02:00
|
|
|
BuildRequires: bc
|
2012-03-17 21:40:58 +01:00
|
|
|
BuildRequires: check-devel
|
|
|
|
BuildRequires: libbz2-devel
|
2018-02-14 13:23:33 +01:00
|
|
|
BuildRequires: libcurl-devel
|
2018-07-26 11:55:19 +02:00
|
|
|
BuildRequires: libjson-c-devel
|
2014-05-08 17:21:16 +02:00
|
|
|
BuildRequires: libopenssl-devel
|
2017-11-28 10:00:11 +01:00
|
|
|
BuildRequires: libtool
|
2014-05-08 17:21:16 +02:00
|
|
|
BuildRequires: libxml2-devel
|
2018-04-13 17:16:49 +02:00
|
|
|
BuildRequires: ncurses-devel
|
2018-07-26 11:55:19 +02:00
|
|
|
BuildRequires: pcre2-devel
|
2018-04-13 17:16:49 +02:00
|
|
|
BuildRequires: pkgconfig
|
2012-03-17 21:40:58 +01:00
|
|
|
BuildRequires: pwdutils
|
|
|
|
BuildRequires: python-devel
|
2018-04-13 17:16:49 +02:00
|
|
|
BuildRequires: sed
|
|
|
|
BuildRequires: sendmail-devel
|
2018-07-26 11:55:19 +02:00
|
|
|
BuildRequires: systemd-devel
|
|
|
|
BuildRequires: systemd-rpm-macros
|
2018-04-13 17:16:49 +02:00
|
|
|
BuildRequires: zlib-devel
|
2018-07-31 11:13:16 +02:00
|
|
|
Requires(pre): %_bindir/awk
|
|
|
|
Requires(pre): %_sbindir/groupadd
|
|
|
|
Requires(pre): %_sbindir/useradd
|
|
|
|
Requires(pre): %_sbindir/usermod
|
2018-07-26 11:55:19 +02:00
|
|
|
Requires(pre): /bin/sed
|
|
|
|
Requires(pre): /bin/tar
|
2007-01-16 00:07:16 +01:00
|
|
|
Obsoletes: clamav-db < 0.88.3
|
2018-07-31 11:13:16 +02:00
|
|
|
Provides: clamav-nodb = %version
|
2017-05-29 20:25:35 +02:00
|
|
|
Obsoletes: clamav-nodb <= 0.98.4
|
2014-06-12 15:36:29 +02:00
|
|
|
%systemd_requires
|
2007-01-16 00:07:16 +01:00
|
|
|
|
|
|
|
%description
|
2016-07-29 13:05:50 +02:00
|
|
|
ClamAV is an antivirus engine designed for detecting trojans,
|
|
|
|
viruses, malware and other malicious threats. It is the de-facto
|
|
|
|
standard for mail gateway scanning. It provides a multi-threaded
|
|
|
|
scanning daemon, command line utilities for on-demand file scanning,
|
|
|
|
and a tool for automatic signature updates. The core ClamAV library
|
|
|
|
provides numerous file format detection mechanisms, file unpacking
|
|
|
|
support, archive support, and multiple signature languages for
|
|
|
|
detecting threats.
|
2007-01-16 00:07:16 +01:00
|
|
|
|
2017-10-07 12:09:49 +02:00
|
|
|
%package -n libclamav7
|
|
|
|
Summary: ClamAV antivirus engine runtime
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n libclamav7
|
|
|
|
ClamAV is an antivirus engine designed for detecting trojans,
|
|
|
|
viruses, malware and other malicious threats.
|
|
|
|
|
2018-04-26 17:39:59 +02:00
|
|
|
%package -n libclammspack0
|
|
|
|
Summary: ClamAV antivirus engine runtime
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n libclammspack0
|
|
|
|
ClamAV is an antivirus engine designed for detecting trojans,
|
|
|
|
viruses, malware and other malicious threats.
|
|
|
|
|
2017-10-07 12:09:49 +02:00
|
|
|
%package devel
|
|
|
|
Summary: Development files for libclamav, an antivirus engine
|
|
|
|
Group: Development/Libraries/C and C++
|
2018-07-31 11:13:16 +02:00
|
|
|
Requires: libclamav7 = %version
|
2017-10-07 12:09:49 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
ClamAV is an antivirus engine designed for detecting trojans,
|
|
|
|
viruses, malware and other malicious threats.
|
|
|
|
|
|
|
|
This subpackage contains header files for developing applications
|
|
|
|
that want to make use of libclamav.
|
|
|
|
|
2007-01-16 00:07:16 +01:00
|
|
|
%prep
|
|
|
|
%setup -q
|
2018-04-13 17:16:49 +02:00
|
|
|
%patch1
|
2018-03-07 14:46:42 +01:00
|
|
|
%patch4
|
2018-04-18 16:49:27 +02:00
|
|
|
%patch5
|
2018-07-31 10:58:20 +02:00
|
|
|
%patch6
|
- Update to version 0.100.2:
* bsc#1110723, CVE-2018-15378: Vulnerability in ClamAV's MEW
unpacking feature that could allow an unauthenticated, remote
attacker to cause a denial of service (DoS) condition on an
affected device.
* bsc#1103040, CVE-2018-14680, CVE-2018-14681, CVE-2018-14682:
more fixes for embedded libmspack.
* Make freshclam more robust against lagging signature mirrors.
* On-Access "Extra Scanning", an opt-in minor feature of
OnAccess scanning on Linux systems, has been disabled due to a
known issue with resource cleanup OnAccessExtraScanning will
be re-enabled in a future release when the issue is
resolved. In the mean-time, users who enabled the feature in
clamd.conf will see a warning informing them that the feature
is not active. For details, see:
https://bugzilla.clamav.net/show_bug.cgi?id=12048
- Restore exit code compatibility of freshclam with versions before
0.100.0 when the virus database is already up to date
(bsc#1104457, clamav-freshclam-exit.patch).
OBS-URL: https://build.opensuse.org/package/show/security/clamav?expand=0&rev=177
2018-10-04 11:52:49 +02:00
|
|
|
%patch7
|
2007-01-16 00:07:16 +01:00
|
|
|
|
|
|
|
%build
|
2008-04-21 18:37:35 +02:00
|
|
|
CFLAGS="-fstack-protector"
|
2010-04-08 22:11:51 +02:00
|
|
|
CXXFLAGS="-fstack-protector"
|
2018-07-31 11:13:16 +02:00
|
|
|
export CFLAGS="%optflags $CFLAGS -fPIE -fno-strict-aliasing"
|
|
|
|
export CXXFLAGS="%optflags $CXXFLAGS -fPIE -fno-strict-aliasing -std=gnu++98"
|
2015-01-02 09:49:36 +01:00
|
|
|
export LDFLAGS="-pie"
|
2018-07-31 11:13:16 +02:00
|
|
|
%if "%_lib" == "lib64"
|
2013-12-18 09:10:11 +01:00
|
|
|
# tomsfastmath needs this for correct operation on 64-bit platforms
|
|
|
|
CFLAGS="$CFLAGS -DFP_64BIT"
|
|
|
|
%endif
|
2015-12-02 17:24:31 +01:00
|
|
|
%configure \
|
2007-01-16 00:07:16 +01:00
|
|
|
--disable-clamav \
|
|
|
|
--disable-static \
|
2018-07-31 14:08:01 +02:00
|
|
|
--with-dbdir=/var/lib/clamav \
|
2007-01-16 00:07:16 +01:00
|
|
|
--with-user=vscan \
|
|
|
|
--with-group=vscan \
|
2008-04-21 18:37:35 +02:00
|
|
|
--enable-milter \
|
2018-07-31 11:13:16 +02:00
|
|
|
%clamav_check \
|
2012-06-19 22:15:38 +02:00
|
|
|
--enable-clamdtop \
|
2017-08-01 18:41:00 +02:00
|
|
|
--disable-zlib-vcheck \
|
2018-07-30 13:28:31 +02:00
|
|
|
--disable-timestamps \
|
|
|
|
--disable-yara
|
2010-04-08 22:11:51 +02:00
|
|
|
|
2018-07-31 11:13:16 +02:00
|
|
|
make V=1 %?_smp_mflags
|
2007-07-16 07:48:13 +02:00
|
|
|
|
2007-01-16 00:07:16 +01:00
|
|
|
%install
|
2017-10-07 12:09:49 +02:00
|
|
|
%make_install
|
2018-07-31 14:08:01 +02:00
|
|
|
install -d -m755 %buildroot/var/lib/clamav
|
2018-07-31 11:13:16 +02:00
|
|
|
install -d -m755 %buildroot/%_tmpfilesdir
|
|
|
|
install -m644 %SOURCE6 %buildroot%_tmpfilesdir/clamav.conf
|
2018-07-31 14:08:01 +02:00
|
|
|
mkdir -p %buildroot/var/spool/amavis
|
2018-07-31 11:13:16 +02:00
|
|
|
mkdir -p -m 0755 %buildroot/run/clamav
|
|
|
|
find %buildroot -type f -name "*.la" -delete -print
|
2018-04-26 17:39:59 +02:00
|
|
|
|
|
|
|
# libclammspack is not meant to be linked against by anything but
|
|
|
|
# libclamav
|
2018-07-31 11:13:16 +02:00
|
|
|
rm %buildroot%_libdir/pkgconfig/libclammspack.pc
|
|
|
|
rm %buildroot%_libdir/libclammspack.so
|
2007-01-16 00:07:16 +01:00
|
|
|
|
2013-09-28 09:38:07 +02:00
|
|
|
# fix the new config file names
|
2018-07-31 11:13:16 +02:00
|
|
|
pushd %buildroot%_sysconfdir
|
2013-09-28 09:38:07 +02:00
|
|
|
mv clamd.conf.sample clamd.conf
|
|
|
|
mv clamav-milter.conf.sample clamav-milter.conf
|
|
|
|
mv freshclam.conf.sample freshclam.conf
|
|
|
|
popd
|
|
|
|
|
2014-03-28 17:04:21 +01:00
|
|
|
# Systemd...
|
2018-07-31 11:13:16 +02:00
|
|
|
install -d -m 0755 %buildroot/%_unitdir
|
|
|
|
install -m 0644 %SOURCE7 %buildroot/%_unitdir/clamd.service
|
|
|
|
install -m 0644 %SOURCE8 %buildroot/%_unitdir/freshclam.service
|
|
|
|
install -m 0644 %SOURCE9 %buildroot/%_unitdir/clamav-milter.service
|
|
|
|
rm -f %buildroot/%_unitdir/clamav-daemon.service
|
|
|
|
rm -f %buildroot/%_unitdir/clamav-daemon.socket
|
|
|
|
rm -f %buildroot/%_unitdir/clamav-freshclam.service
|
2018-07-26 11:55:19 +02:00
|
|
|
# this is broken if system does not have systemd so don't
|
2014-03-28 17:04:21 +01:00
|
|
|
# use it at all on systems without mandatory systemd
|
|
|
|
for srvname in clamd freshclam clamav-milter;do
|
2018-07-31 11:13:16 +02:00
|
|
|
(export PATH=%_prefix/sbin:/sbin:$PATH ;ln -sf $(which service) %buildroot/%_sbindir/rc${srvname})
|
2014-03-28 17:04:21 +01:00
|
|
|
done
|
|
|
|
|
2013-01-05 15:28:49 +01:00
|
|
|
%check
|
|
|
|
|
2013-09-28 09:41:14 +02:00
|
|
|
# regression tests
|
2013-01-05 15:28:49 +01:00
|
|
|
%if !0%{?qemu_user_space_build:1}
|
|
|
|
VALGRIND_GENSUP=1 make check
|
|
|
|
%endif
|
|
|
|
|
2017-10-07 12:09:49 +02:00
|
|
|
%post -n libclamav7 -p /sbin/ldconfig
|
|
|
|
%postun -n libclamav7 -p /sbin/ldconfig
|
2018-07-17 23:41:52 +02:00
|
|
|
%post -n libclammspack0 -p /sbin/ldconfig
|
|
|
|
%postun -n libclammspack0 -p /sbin/ldconfig
|
|
|
|
|
2007-01-16 00:07:16 +01:00
|
|
|
%files
|
2018-07-31 11:13:16 +02:00
|
|
|
%config(noreplace) %_sysconfdir/*.conf
|
2014-03-28 17:04:21 +01:00
|
|
|
#systemd...
|
2018-07-31 11:13:16 +02:00
|
|
|
%_unitdir/clamd.service
|
|
|
|
%_unitdir/freshclam.service
|
|
|
|
%_unitdir/clamav-milter.service
|
|
|
|
%_tmpfilesdir
|
2018-07-26 11:55:19 +02:00
|
|
|
%license COPYING*
|
2007-01-16 00:07:16 +01:00
|
|
|
%doc docs/*.pdf docs/html
|
2018-07-31 11:13:16 +02:00
|
|
|
%_mandir/*/*
|
|
|
|
%_bindir/*
|
|
|
|
%_sbindir/*
|
2007-01-16 00:07:16 +01:00
|
|
|
%defattr(-,vscan,vscan)
|
2018-07-31 14:08:01 +02:00
|
|
|
%dir %attr(750,vscan,vscan) /var/spool/amavis
|
|
|
|
%dir /var/lib/clamav
|
2016-07-21 16:03:06 +02:00
|
|
|
%ghost %attr(755,vscan,vscan) /run/clamav
|
2007-01-16 00:07:16 +01:00
|
|
|
|
2017-10-07 12:09:49 +02:00
|
|
|
%files -n libclamav7
|
2018-07-31 11:13:16 +02:00
|
|
|
%_libdir/libclam*.so.7*
|
2018-04-26 17:39:59 +02:00
|
|
|
|
|
|
|
%files -n libclammspack0
|
2018-07-31 11:13:16 +02:00
|
|
|
%_libdir/libclammspack.so.0*
|
2017-10-07 12:09:49 +02:00
|
|
|
|
|
|
|
%files devel
|
2018-07-31 11:13:16 +02:00
|
|
|
%_libdir/pkgconfig/*
|
|
|
|
%_libdir/libclam*.so
|
|
|
|
%_includedir/*
|
2017-10-07 12:09:49 +02:00
|
|
|
|
2007-01-16 00:07:16 +01:00
|
|
|
%pre
|
2018-07-31 11:13:16 +02:00
|
|
|
getent group vscan >/dev/null || %_sbindir/groupadd -r vscan
|
2016-07-29 13:05:50 +02:00
|
|
|
getent passwd vscan >/dev/null || \
|
2018-07-31 11:13:16 +02:00
|
|
|
%_sbindir/useradd -r -o -g vscan -u 65 -s /bin/false \
|
2018-07-31 14:08:01 +02:00
|
|
|
-c "Vscan account" -d /var/spool/amavis vscan
|
2018-07-31 11:13:16 +02:00
|
|
|
%_sbindir/usermod vscan -g vscan
|
2015-01-23 15:07:57 +01:00
|
|
|
%service_add_pre clamd.service freshclam.service clamav-milter.service
|
2007-02-25 12:09:43 +01:00
|
|
|
|
2015-01-23 15:07:57 +01:00
|
|
|
%post
|
2018-07-31 11:13:16 +02:00
|
|
|
systemd-tmpfiles --create %_tmpfilesdir/clamav.conf
|
2015-01-23 15:07:57 +01:00
|
|
|
%service_add_post clamd.service freshclam.service clamav-milter.service
|
|
|
|
|
2007-01-16 00:07:16 +01:00
|
|
|
%preun
|
2014-06-12 15:36:29 +02:00
|
|
|
%service_del_preun clamd.service freshclam.service clamav-milter.service
|
2007-01-16 00:07:16 +01:00
|
|
|
|
|
|
|
%postun
|
2014-06-12 15:36:29 +02:00
|
|
|
%service_del_postun clamd.service freshclam.service clamav-milter.service
|
2007-01-16 00:07:16 +01:00
|
|
|
|
2007-02-25 12:09:43 +01:00
|
|
|
%changelog
|