diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index b0a9405..19d020c 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -8,10 +8,11 @@ # Disabled because of https://bugzilla.redhat.com/show_bug.cgi?id=1643801 # FIXME enable it back once double free issue is fixed %bcond_with cassandane +#bcond_without cassandane Name: cyrus-imapd Version: 3.0.8 -Release: 3%{?dist} +Release: 4%{?dist} %define ssl_pem_file /etc/pki/%name/%name.pem @@ -45,6 +46,9 @@ Patch2: patch-cyrus-rename-quota # vzic uses an old makefile that needs hacks to use the proper flags Patch3: patch-vzic-proper-cflags +# Allows building against clamav 0.101 +# https://github.com/cyrusimap/cyrus-imapd/issues/2621 +Patch4: patch-clamav101 Source10: cyrus-imapd.logrotate Source11: cyrus-imapd.pam-config @@ -83,8 +87,8 @@ Source91: patch-cassandane-no-syslog # Upstream ticket https://github.com/cyrusimap/cyrus-imapd/issues/1995 Source92: patch-cassandane-fix-annotator -BuildRequires: autoconf automake bison flex gcc gcc-c++ git groff libtool -BuildRequires: pkgconfig systemd transfig +BuildRequires: autoconf automake bison flex gcc gcc-c++ git glibc-langpack-en +BuildRequires: groff libtool pkgconfig systemd transfig BuildRequires: perl-devel perl-generators perl(ExtUtils::MakeMaker) BuildRequires: perl(Pod::Html) @@ -683,6 +687,10 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v %changelog +* Tue Jan 15 2019 Jason L Tibbitts III - 3.0.8-4 +- Allow building against ClamAV 0.101. +- Add build dependency on glibc-langpack-en to slience some Perl complaints. + * Thu Dec 13 2018 Pavel Zhukov - 3.0.8-3 - Temporary disable cassandane in master branch diff --git a/patch-clamav101 b/patch-clamav101 new file mode 100644 index 0000000..48ede62 --- /dev/null +++ b/patch-clamav101 @@ -0,0 +1,25 @@ +diff --git a/imap/cyr_virusscan.c b/imap/cyr_virusscan.c +index 863a858..b6c8980 100644 +--- a/imap/cyr_virusscan.c ++++ b/imap/cyr_virusscan.c +@@ -192,9 +192,19 @@ int clamav_scanfile(void *state, const char *fname, + struct clamav_state *st = (struct clamav_state *) state; + int r; + +- /* scan file */ ++#ifndef CL_SCAN_ARCHIVE /* clamav >= 0.101 */ ++ struct cl_scan_options options; ++ memset(&options, 0, sizeof(struct cl_scan_options)); ++ options.parse |= ~0; /* enable all parsers */ ++ options.general |= CL_SCAN_GENERAL_HEURISTICS; /* enable heuristic alert options */ ++ ++ r = cl_scanfile(fname, virname, NULL, st->av_engine, ++ &options); ++ ++#else + r = cl_scanfile(fname, virname, NULL, st->av_engine, + CL_SCAN_STDOPT); ++#endif + + switch (r) { + case CL_CLEAN: