summaryrefslogtreecommitdiff
path: root/mail/dovecot2
diff options
context:
space:
mode:
authorwiedi <wiedi@pkgsrc.org>2015-09-04 18:49:36 +0000
committerwiedi <wiedi@pkgsrc.org>2015-09-04 18:49:36 +0000
commit784138aff44c7664e9289c9be029c1f4a36d7432 (patch)
tree53dd6efdd99a0af37f6779e2f2d8661aca894274 /mail/dovecot2
parenta776fa6f2cce45d01c3a7a63e848bea896632bdb (diff)
downloadpkgsrc-784138aff44c7664e9289c9be029c1f4a36d7432.tar.gz
Add a patch for dovecot to fix a hang on SmartOS.
While here also define the TEST_TARGET
Diffstat (limited to 'mail/dovecot2')
-rw-r--r--mail/dovecot2/Makefile6
-rw-r--r--mail/dovecot2/distinfo3
-rw-r--r--mail/dovecot2/patches/patch-src_lib_sendfile-util.c19
3 files changed, 25 insertions, 3 deletions
diff --git a/mail/dovecot2/Makefile b/mail/dovecot2/Makefile
index b6c3135180d..723ea6f09fc 100644
--- a/mail/dovecot2/Makefile
+++ b/mail/dovecot2/Makefile
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.77 2015/08/23 14:30:35 wiz Exp $
+# $NetBSD: Makefile,v 1.78 2015/09/04 18:49:36 wiedi Exp $
#
# when updating to a new release, update ABI depends in
# the buildlink3.mk file as well, since the plugins' version
# must match (see PR 49563).
DISTNAME= dovecot-2.2.18
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= mail
MASTER_SITES= http://www.dovecot.org/releases/${PKGVERSION_NOREV:R}/
@@ -23,6 +23,8 @@ CONFIGURE_ARGS+= --with-ssldir=${SSLDIR}
OPSYSVARS+= CONFIGURE_ENV
+TEST_TARGET= check
+
# Explicitly disable inotify on illumos, it is provided for Linux compat only.
CONFIGURE_ENV.SunOS+= ac_cv_func_inotify_init=no
diff --git a/mail/dovecot2/distinfo b/mail/dovecot2/distinfo
index 762daa235dc..75f6bfea436 100644
--- a/mail/dovecot2/distinfo
+++ b/mail/dovecot2/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.55 2015/05/17 00:12:45 taca Exp $
+$NetBSD: distinfo,v 1.56 2015/09/04 18:49:36 wiedi Exp $
SHA1 (dovecot-2.2.18.tar.gz) = 8309b5ef8d33d464eb7a6e1d3cba0b4e87c55eff
RMD160 (dovecot-2.2.18.tar.gz) = 847ca54f76210d0f06b1471bee62d6fcdc7b02c7
@@ -7,4 +7,5 @@ SHA1 (patch-aa) = ea185011f0c1ee3aa1ff528e61f6f356fe385666
SHA1 (patch-ab) = d637a64feec8e4eafacda149cf0193aa1b70a054
SHA1 (patch-ae) = 51d8cb998cc2ded8bfc767710e465b752c50e656
SHA1 (patch-af) = c066e94dd6593d16eec3e66f5f4d26f021918498
+SHA1 (patch-src_lib_sendfile-util.c) = 6ed7c42aa84afce2d5eee9e405f9d15ec6fdbce9
SHA1 (patch-src_stats_mail-stats.h) = 90645c2aab956a0119630da4b71905db704bffda
diff --git a/mail/dovecot2/patches/patch-src_lib_sendfile-util.c b/mail/dovecot2/patches/patch-src_lib_sendfile-util.c
new file mode 100644
index 00000000000..3ac9bd0ec80
--- /dev/null
+++ b/mail/dovecot2/patches/patch-src_lib_sendfile-util.c
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_lib_sendfile-util.c,v 1.1 2015/09/04 18:49:36 wiedi Exp $
+
+The call to sendfile on SmartOS can fail with EOPNOTSUPP. This is a valid error
+code and documented in the man page. This error code needs to be handled or
+else dovecot will retry the sendfile call endlessly and hang.
+
+This patch has been proposed upstream.
+
+--- src/lib/sendfile-util.c.orig 2015-01-05 20:20:07.000000000 +0000
++++ src/lib/sendfile-util.c
+@@ -116,7 +116,7 @@ ssize_t safe_sendfile(int out_fd, int in
+ if (errno == EINVAL) {
+ /* most likely trying to read past EOF */
+ ret = 0;
+- } else if (errno == EAFNOSUPPORT) {
++ } else if (errno == EAFNOSUPPORT || errno == EOPNOTSUPP) {
+ /* not supported, return Linux-like EINVAL so caller
+ sees only consistent errnos. */
+ errno = EINVAL;