]> git.pld-linux.org Git - packages/cyrus-imapd.git/commitdiff
- release 2, fix build against clamav-0.101.0 auto/th/cyrus-imapd-3.0.8-2
authorAdam Gołębiowski <adamg@pld-linux.org>
Mon, 10 Dec 2018 11:34:16 +0000 (12:34 +0100)
committerAdam Gołębiowski <adamg@pld-linux.org>
Mon, 10 Dec 2018 11:34:16 +0000 (12:34 +0100)
cyrus-imapd-clamav-0.101.patch [new file with mode: 0644]
cyrus-imapd.spec

diff --git a/cyrus-imapd-clamav-0.101.patch b/cyrus-imapd-clamav-0.101.patch
new file mode 100644 (file)
index 0000000..5a9f23f
--- /dev/null
@@ -0,0 +1,34 @@
+Support clamav >= 0.101.0, based on changes introduced in:
+
+https://github.com/Cisco-Talos/clamav-devel/commit/048a88e61558726bd9ba66ec3195b63d61d8a430
+
+--- cyrus-imapd-3.0.8/imap/cyr_virusscan.c.orig        2018-08-10 04:59:00.000000000 +0200
++++ cyrus-imapd-3.0.8/imap/cyr_virusscan.c     2018-12-10 10:51:08.776406893 +0100
+@@ -193,8 +193,17 @@
+     int r;
+     /* scan file */
++#if LIBCLAMAV_MAJORVER < 9
+     r = cl_scanfile(fname, virname, NULL, st->av_engine,
+                     CL_SCAN_STDOPT);
++#else 
++    static struct cl_scan_options options;
++    
++    memset(&options, 0, sizeof(struct cl_scan_options));
++    options.parse |= ~0; /* enable all parsers */
++
++    r = cl_scanfile(fname, virname, NULL, st->av_engine, &options);
++#endif
+     switch (r) {
+     case CL_CLEAN:
+--- cyrus-imapd-3.0.8/Makefile.am.orig 2018-12-10 12:15:51.580494168 +0100
++++ cyrus-imapd-3.0.8/Makefile.am      2018-12-10 12:14:59.394460523 +0100
+@@ -879,6 +879,7 @@
+ imap_cyr_sphinxmgr_LDADD = $(LD_UTILITY_ADD)
+ imap_cyr_virusscan_SOURCES = imap/cli_fatal.c imap/cyr_virusscan.c imap/mutex_fake.c
++imap_cyr_virusscan_CFLAGS = $(AM_CFLAGS) $(CLAMAV_CFLAGS) $(CFLAG_VISIBILITY)
+ imap_cyr_virusscan_LDADD = $(LD_UTILITY_ADD) $(CLAMAV_LIBS)
+ imap_ctl_zoneinfo_SOURCES = imap/cli_fatal.c imap/ctl_zoneinfo.c imap/mutex_fake.c imap/zoneinfo_db.c
index de36f907918dd88f4781ebbd5695f66c3326af31..00f97724c2ed1449e79ae96ea7856bb6d438f546 100644 (file)
@@ -8,7 +8,7 @@ Summary(pl.UTF-8):      Wysoko wydajny serwer IMAP i POP3
 Summary(pt_BR.UTF-8):  Um servidor de mail de alto desempenho que suporta IMAP e POP3
 Name:          cyrus-imapd
 Version:       3.0.8
-Release:       1
+Release:       2
 License:       BSD-like
 Group:         Networking/Daemons/POP3
 Source0:       ftp://ftp.cyrusimap.org/cyrus-imapd/%{name}-%{version}.tar.gz
@@ -27,6 +27,7 @@ Source12:     cyrus.conf
 Source13:      cyrus-sync.init
 Patch0:                %{name}-et.patch
 Patch1:                link.patch
+Patch2:                %{name}-clamav-0.101.patch
 URL:           http://www.cyrusimap.org/
 BuildRequires: autoconf >= 2.54
 BuildRequires: automake
@@ -169,6 +170,7 @@ Perlowy interfejs do biblioteki cyrus-imapd.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 rm -rf autom4te.cache
 
This page took 0.249869 seconds and 4 git commands to generate.