summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authormartti <martti>2008-02-12 14:17:16 +0000
committermartti <martti>2008-02-12 14:17:16 +0000
commitbd7da69950d5fa87a3859eb57c99e118f77e4495 (patch)
treea294236c397747f982f3449db26578f930f87e52 /mail
parente3ee5a9f84a608043a5deaaf90e7d76405f1322d (diff)
downloadpkgsrc-bd7da69950d5fa87a3859eb57c99e118f77e4495.tar.gz
Updated mail/clamav to 0.92.1
* Fix pkg/36853 with patch from Christos Zoulas (patch-ba) * Lots of bug fixes since 0.92
Diffstat (limited to 'mail')
-rw-r--r--mail/clamav/Makefile4
-rw-r--r--mail/clamav/buildlink3.mk4
-rw-r--r--mail/clamav/distinfo11
-rw-r--r--mail/clamav/patches/patch-ah12
-rw-r--r--mail/clamav/patches/patch-ba111
5 files changed, 127 insertions, 15 deletions
diff --git a/mail/clamav/Makefile b/mail/clamav/Makefile
index d7d3a456bb4..4f9309fee8e 100644
--- a/mail/clamav/Makefile
+++ b/mail/clamav/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.81 2007/12/18 08:16:10 martti Exp $
+# $NetBSD: Makefile,v 1.82 2008/02/12 14:17:16 martti Exp $
DISTNAME= clamav-${CLAMAV_VERSION}
PKGNAME= clamav-${CLAMAV_VERSION:S/-/./}
@@ -12,7 +12,7 @@ COMMENT= Anti-virus toolkit
PKG_INSTALLATION_TYPES= overwrite pkgviews
-CLAMAV_VERSION= 0.92
+CLAMAV_VERSION= 0.92.1
USE_LIBTOOL= yes
diff --git a/mail/clamav/buildlink3.mk b/mail/clamav/buildlink3.mk
index 79a39616bda..86debdc40bc 100644
--- a/mail/clamav/buildlink3.mk
+++ b/mail/clamav/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.14 2007/07/17 06:54:31 martti Exp $
+# $NetBSD: buildlink3.mk,v 1.15 2008/02/12 14:17:16 martti Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
CLAMAV_BUILDLINK3_MK:= ${CLAMAV_BUILDLINK3_MK}+
@@ -12,7 +12,7 @@ BUILDLINK_PACKAGES+= clamav
BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}clamav
.if ${CLAMAV_BUILDLINK3_MK} == "+"
-BUILDLINK_API_DEPENDS.clamav+= clamav>=0.91.1
+BUILDLINK_API_DEPENDS.clamav+= clamav>=0.92.1
BUILDLINK_PKGSRCDIR.clamav?= ../../mail/clamav
.endif # CLAMAV_BUILDLINK3_MK
diff --git a/mail/clamav/distinfo b/mail/clamav/distinfo
index 2e0dc609ee6..e9037558b33 100644
--- a/mail/clamav/distinfo
+++ b/mail/clamav/distinfo
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.49 2007/12/18 08:16:11 martti Exp $
+$NetBSD: distinfo,v 1.50 2008/02/12 14:17:16 martti Exp $
-SHA1 (clamav-0.92.tar.gz) = b6573acd9a7bb6bf3bd4b39a0102ce0be764c5bc
-RMD160 (clamav-0.92.tar.gz) = 37f0450b9b3c6fc863f94811ae372ece1677d791
-Size (clamav-0.92.tar.gz) = 14300798 bytes
+SHA1 (clamav-0.92.1.tar.gz) = 6ee4fa5a1c5f71eecc99beb17bc5f3c5a3b580ec
+RMD160 (clamav-0.92.1.tar.gz) = 5cf4b36a665dba6be366e94d02b6c8112048d647
+Size (clamav-0.92.1.tar.gz) = 15284752 bytes
SHA1 (patch-ad) = d738d2c31b821791789ad46d2bc84ad5f2093df4
SHA1 (patch-af) = 32922fa6a9f908c8fcd80452b505f39b29125b32
-SHA1 (patch-ah) = 346e35a163841d7f7f2f1579781329c289189379
+SHA1 (patch-ah) = f764dd96467f5f3522db544ed2e2acb5f4cf2ec8
+SHA1 (patch-ba) = 461c4d3afd04993105f2474dfd34bc559b52a8e1
diff --git a/mail/clamav/patches/patch-ah b/mail/clamav/patches/patch-ah
index ed3d574aef9..63f8e978fa0 100644
--- a/mail/clamav/patches/patch-ah
+++ b/mail/clamav/patches/patch-ah
@@ -1,8 +1,8 @@
-$NetBSD: patch-ah,v 1.12 2007/12/18 08:16:11 martti Exp $
+$NetBSD: patch-ah,v 1.13 2008/02/12 14:17:16 martti Exp $
---- clamav-milter/clamav-milter.c.orig 2007-12-13 00:41:25.000000000 +0200
-+++ clamav-milter/clamav-milter.c 2007-12-18 09:34:20.000000000 +0200
-@@ -3803,7 +3803,7 @@
+--- clamav-milter/clamav-milter.c.orig 2008-02-06 18:00:43.000000000 +0200
++++ clamav-milter/clamav-milter.c 2008-02-12 16:03:08.000000000 +0200
+@@ -3801,7 +3801,7 @@
* the postmaster, so include
* some useful information
*/
@@ -11,7 +11,7 @@ $NetBSD: patch-ah,v 1.12 2007/12/18 08:16:11 martti Exp $
sendmailId, privdata->from);
else
fprintf(sendmail, _("A message sent from %s to\n"),
-@@ -3817,7 +3817,7 @@
+@@ -3815,7 +3815,7 @@
fprintf(sendmail, _("\nThe message in question has been quarantined as %s\n"), privdata->filename);
if(hflag) {
@@ -20,7 +20,7 @@ $NetBSD: patch-ah,v 1.12 2007/12/18 08:16:11 martti Exp $
smfi_getsymval(ctx, "j"), privdata->from,
smfi_getsymval(ctx, "_"));
fputs(_("For your information, the original message headers were:\n\n"), sendmail);
-@@ -5000,7 +5000,7 @@
+@@ -4998,7 +4998,7 @@
cli_dbgmsg("qfile move '%s' to '%s'\n", privdata->filename, newname);
if(move(privdata->filename, newname) < 0) {
diff --git a/mail/clamav/patches/patch-ba b/mail/clamav/patches/patch-ba
new file mode 100644
index 00000000000..01e2cc4ccbc
--- /dev/null
+++ b/mail/clamav/patches/patch-ba
@@ -0,0 +1,111 @@
+$NetBSD: patch-ba,v 1.1 2008/02/12 14:17:16 martti Exp $
+
+Fix pkg/36853
+
+--- clamav-milter/clamav-milter.c.orig 2008-02-12 16:03:08.000000000 +0200
++++ clamav-milter/clamav-milter.c 2008-02-12 16:04:59.000000000 +0200
+@@ -90,6 +90,9 @@
+ #if HAVE_RESOLV_H
+ #include <arpa/nameser.h> /* for HEADER */
+ #include <resolv.h>
++#if __RES >= 20030124
++#define HAVE_BIND9
++#endif
+ #endif
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+@@ -505,6 +508,20 @@
+ #endif /*SESSION*/
+
+ static pthread_cond_t watchdog_cond = PTHREAD_COND_INITIALIZER;
++#ifndef HAVE_BIND9
++static pthread_mutex_t res_mutex = PTHREAD_MUTEX_INITIALIZER;
++#define RES_QUERY(len, h, c, t, q, s) \
++ do { \
++ pthread_mutex_lock(&res_mutex); \
++ len = res_query((h), (c), (t), (q), (s)); \
++ pthread_mutex_unlock(&res_mutex); \
++ } while (/*CONSTCOND*/0)
++#else
++static pthread_key_t res_key;
++#define RES_QUERY(len, h, c, t, q, s) \
++ len = res_nquery((res_state)pthread_getspecific(res_key), \
++ (h), (c), (t), (q), (s))
++#endif
+
+ #ifndef SHUT_RD
+ #define SHUT_RD 0
+@@ -2061,12 +2078,19 @@
+ logg(_("Starting %s\n"), clamav_version);
+ logg(_("*Debugging is on\n"));
+
++#ifndef HAVE_BIND9
+ if(!(_res.options&RES_INIT))
+ if(res_init() < 0) {
+ fprintf(stderr, "%s: Can't initialise the resolver\n",
+ argv[0]);
+ return EX_UNAVAILABLE;
+ }
++#else
++ if (pthread_key_create(&res_key, free)) {
++ perror("pthread_key_create");
++ return EX_UNAVAILABLE;
++ }
++#endif
+
+ if(blacklist_time) {
+ char name[MAXHOSTNAMELEN + 1];
+@@ -2577,6 +2601,18 @@
+ int sock = s->sock;
+ struct sockaddr *server = (struct sockaddr *)s->server;
+ int server_index = s->server_index;
++#ifdef HAVE_BIND9
++ res_state res = cli_calloc(1, sizeof(*res));
++ if (pthread_setspecific(res_key, res)) {
++ perror("pthread_setspecific");
++ free(res);
++ return NULL;
++ }
++ if (res_ninit(res) < 0) {
++ perror("res_ninit");
++ return NULL;
++ }
++#endif
+
+ if(last_failed_pings[server_index]) {
+ s->rc = 0;
+@@ -6137,7 +6173,7 @@
+ return NULL;
+ }
+
+- len = res_query(host, C_IN, T_MX, (u_char *)&q, sizeof(q));
++ RES_QUERY(len, host, C_IN, T_MX, (u_char *)&q, sizeof(q));
+ if(len < 0)
+ return t; /* Host has no MX records */
+
+@@ -6206,7 +6242,7 @@
+ if((host == NULL) || (*host == '\0'))
+ return t;
+
+- len = res_query(host, C_IN, T_A, (u_char *)&q, sizeof(q));
++ RES_QUERY(len, host, C_IN, T_A, (u_char *)&q, sizeof(q));
+ if(len < 0)
+ return t; /* Host has no A records */
+
+@@ -6265,7 +6301,6 @@
+ * an SPF system, we ONLY use SPF records to reduce phish false positives
+ * TODO: IPv6?
+ * TODO: cache queries?
+- * TODO: check res_query is thread safe
+ *
+ * INPUT: prevhosts, a list of hosts already searched: stops include loops
+ * e.g. mercado.com includes medrcadosw.com which includes mercado.com,
+@@ -6317,7 +6352,7 @@
+ *ptr = '\0';
+
+ logg("*SPF query '%s'\n", host);
+- len = res_query(host, C_IN, T_TXT, (u_char *)&q, sizeof(q));
++ RES_QUERY(len, host, C_IN, T_TXT, (u_char *)&q, sizeof(q));
+ if(len < 0) {
+ free(host);
+ return 0; /* Host has no TXT records */