Sat Jan 19 05:25:51 2013 UTC ()
Update to 2.1.13 and add support for NetBSD 6.0 libquota

Changes since 2.1.12:
        - Some fixes to cache file changes in v2.1.11.
        - fts-solr: Overlong UTF8 sequences in mails were rejected by Solr and
          caused the mails to not be indexed.
        - virtual storage: Sorting mailbox by from/to/cc/bcc didn't work.


(manu)
diff -r1.18 -r1.19 pkgsrc/mail/dovecot2/PLIST
diff -r1.28 -r1.29 pkgsrc/mail/dovecot2/distinfo
diff -r0 -r1.1 pkgsrc/mail/dovecot2/patches/patch-config.h.in
diff -r0 -r1.1 pkgsrc/mail/dovecot2/patches/patch-configure
diff -r0 -r1.1 pkgsrc/mail/dovecot2/patches/patch-configure.in
diff -r0 -r1.1 pkgsrc/mail/dovecot2/patches/patch-src_plugins_quota_Makefile.am
diff -r0 -r1.1 pkgsrc/mail/dovecot2/patches/patch-src_plugins_quota_Makefile.in
diff -r0 -r1.1 pkgsrc/mail/dovecot2/patches/patch-src_plugins_quota_quota-fs.c
diff -r0 -r1.1 pkgsrc/mail/dovecot2/patches/patch-src_plugins_quota_quota-fs.h

cvs diff -r1.18 -r1.19 pkgsrc/mail/dovecot2/PLIST (expand / switch to unified diff)

--- pkgsrc/mail/dovecot2/PLIST 2012/12/04 08:18:34 1.18
+++ pkgsrc/mail/dovecot2/PLIST 2013/01/19 05:25:51 1.19
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1@comment $NetBSD: PLIST,v 1.18 2012/12/04 08:18:34 tron Exp $ 1@comment $NetBSD: PLIST,v 1.19 2013/01/19 05:25:51 manu Exp $
2bin/doveadm 2bin/doveadm
3bin/doveconf 3bin/doveconf
4bin/dsync 4bin/dsync
5include/dovecot/abspath.h 5include/dovecot/abspath.h
6include/dovecot/access-lookup.h 6include/dovecot/access-lookup.h
7include/dovecot/anvil-client.h 7include/dovecot/anvil-client.h
8include/dovecot/aqueue.h 8include/dovecot/aqueue.h
9include/dovecot/array-decl.h 9include/dovecot/array-decl.h
10include/dovecot/array.h 10include/dovecot/array.h
11include/dovecot/askpass.h 11include/dovecot/askpass.h
12include/dovecot/auth-cache.h 12include/dovecot/auth-cache.h
13include/dovecot/auth-client-connection.h 13include/dovecot/auth-client-connection.h
14include/dovecot/auth-client-interface.h 14include/dovecot/auth-client-interface.h
@@ -692,20 +692,21 @@ share/examples/dovecot/conf.d/20-pop3.co @@ -692,20 +692,21 @@ share/examples/dovecot/conf.d/20-pop3.co
692share/examples/dovecot/conf.d/90-acl.conf 692share/examples/dovecot/conf.d/90-acl.conf
693share/examples/dovecot/conf.d/90-plugin.conf 693share/examples/dovecot/conf.d/90-plugin.conf
694share/examples/dovecot/conf.d/90-quota.conf 694share/examples/dovecot/conf.d/90-quota.conf
695share/examples/dovecot/conf.d/auth-checkpassword.conf.ext 695share/examples/dovecot/conf.d/auth-checkpassword.conf.ext
696share/examples/dovecot/conf.d/auth-deny.conf.ext 696share/examples/dovecot/conf.d/auth-deny.conf.ext
697share/examples/dovecot/conf.d/auth-ldap.conf.ext 697share/examples/dovecot/conf.d/auth-ldap.conf.ext
698share/examples/dovecot/conf.d/auth-master.conf.ext 698share/examples/dovecot/conf.d/auth-master.conf.ext
699share/examples/dovecot/conf.d/auth-passwdfile.conf.ext 699share/examples/dovecot/conf.d/auth-passwdfile.conf.ext
700share/examples/dovecot/conf.d/auth-sql.conf.ext 700share/examples/dovecot/conf.d/auth-sql.conf.ext
701share/examples/dovecot/conf.d/auth-static.conf.ext 701share/examples/dovecot/conf.d/auth-static.conf.ext
702share/examples/dovecot/conf.d/auth-system.conf.ext 702share/examples/dovecot/conf.d/auth-system.conf.ext
703share/examples/dovecot/conf.d/auth-vpopmail.conf.ext 703share/examples/dovecot/conf.d/auth-vpopmail.conf.ext
704share/examples/dovecot/dovecot-db.conf.ext 704share/examples/dovecot/dovecot-db.conf.ext
 705share/examples/dovecot/dovecot-dict-auth.conf.ext
705share/examples/dovecot/dovecot-dict-sql.conf.ext 706share/examples/dovecot/dovecot-dict-sql.conf.ext
706share/examples/dovecot/dovecot-ldap.conf.ext 707share/examples/dovecot/dovecot-ldap.conf.ext
707share/examples/dovecot/dovecot-openssl.cnf 708share/examples/dovecot/dovecot-openssl.cnf
708share/examples/dovecot/dovecot-sql.conf.ext 709share/examples/dovecot/dovecot-sql.conf.ext
709share/examples/dovecot/dovecot.conf 710share/examples/dovecot/dovecot.conf
710share/examples/dovecot/mkcert.sh 711share/examples/dovecot/mkcert.sh
711share/examples/rc.d/dovecot 712share/examples/rc.d/dovecot

cvs diff -r1.28 -r1.29 pkgsrc/mail/dovecot2/distinfo (expand / switch to unified diff)

--- pkgsrc/mail/dovecot2/distinfo 2012/12/04 09:28:24 1.28
+++ pkgsrc/mail/dovecot2/distinfo 2013/01/19 05:25:51 1.29
@@ -1,13 +1,20 @@ @@ -1,13 +1,20 @@
1$NetBSD: distinfo,v 1.28 2012/12/04 09:28:24 adam Exp $ 1$NetBSD: distinfo,v 1.29 2013/01/19 05:25:51 manu Exp $
2 2
3SHA1 (dovecot-2.1.12.tar.gz) = 6bbff6c8d9e4be8c2fa95d0adff28f692099a88c 3SHA1 (dovecot-2.1.13.tar.gz) = 76c631f799c389731c75e5c8afef7722f0438c70
4RMD160 (dovecot-2.1.12.tar.gz) = ebf122130988e5c243a0bdc89be0088ab5aa8acb 4RMD160 (dovecot-2.1.13.tar.gz) = c6ed60d0183e0ece0119d32dde218b09b6c89910
5Size (dovecot-2.1.12.tar.gz) = 3839088 bytes 5Size (dovecot-2.1.13.tar.gz) = 3843407 bytes
6SHA1 (patch-aa) = 882f0c9fcf3acdfd2feaf7919309f770324f9843 6SHA1 (patch-aa) = 882f0c9fcf3acdfd2feaf7919309f770324f9843
7SHA1 (patch-ab) = 218948585c96492a832ea903f31a6f9ad9fc69f0 7SHA1 (patch-ab) = 218948585c96492a832ea903f31a6f9ad9fc69f0
8SHA1 (patch-ac) = dc5db4870b14bf2424f0c957f5cf7f1a289fefe6 8SHA1 (patch-ac) = dc5db4870b14bf2424f0c957f5cf7f1a289fefe6
9SHA1 (patch-ae) = 51d8cb998cc2ded8bfc767710e465b752c50e656 9SHA1 (patch-ae) = 51d8cb998cc2ded8bfc767710e465b752c50e656
10SHA1 (patch-af) = 6d4b339898cba762243c1ff415e0fd09e3dec750 10SHA1 (patch-af) = 6d4b339898cba762243c1ff415e0fd09e3dec750
11SHA1 (patch-aj) = 9e7970d29d11c097b9588ad16611f6d0e48235c2 11SHA1 (patch-aj) = 9e7970d29d11c097b9588ad16611f6d0e48235c2
12SHA1 (patch-ak) = ca4edaa46472a0cb609cea4d06893c7bd1312f54 12SHA1 (patch-ak) = ca4edaa46472a0cb609cea4d06893c7bd1312f54
 13SHA1 (patch-config.h.in) = d6eb5879d71a838f17e3f2d33350d80a546f6ef4
 14SHA1 (patch-configure) = 1252abb974a641f316a80365c371b579d7d030c8
 15SHA1 (patch-configure.in) = 22676c2acc2967142231e447e44c3b033982bc0e
13SHA1 (patch-src_lib_network.c) = 31e666492a2ce7c660e04f5e6aa57018b047940d 16SHA1 (patch-src_lib_network.c) = 31e666492a2ce7c660e04f5e6aa57018b047940d
 17SHA1 (patch-src_plugins_quota_Makefile.am) = 2cce87a5c4f34aa726f94c2eb9c3ceb77bd066dd
 18SHA1 (patch-src_plugins_quota_Makefile.in) = 84375b23af9f18fc2eee24c90524e4be23128ced
 19SHA1 (patch-src_plugins_quota_quota-fs.c) = f91b5dfe0344416fef08c02a95fa7221abbf66c9
 20SHA1 (patch-src_plugins_quota_quota-fs.h) = 418ca8bc45140999196e64cde7265a76628d55f9

File Added: pkgsrc/mail/dovecot2/patches/Attic/patch-config.h.in
$NetBSD: patch-config.h.in,v 1.1 2013/01/19 05:25:51 manu Exp $

Support NetBSD's libquota

--- config.h.in.orig	2013-01-18 18:24:40.000000000 +0100
+++ config.h.in	2013-01-18 18:27:26.000000000 +0100
@@ -283,8 +283,14 @@
 
 /* Define to 1 if you have the `quotactl' function. */
 #undef HAVE_QUOTACTL
 
+/* Define to 1 if you have the <quota.h> header file. */
+#undef HAVE_QUOTA_H
+
+/* Define if you have quota_open() */
+#undef HAVE_QUOTA_OPEN
+
 /* Define if Q_QUOTACTL exists */
 #undef HAVE_Q_QUOTACTL
 
 /* Define if you have RLIMIT_AS for setrlimit() */

File Added: pkgsrc/mail/dovecot2/patches/Attic/patch-configure
--- configure.orig	2013-01-07 08:52:01.000000000 +0100
+++ configure	2013-01-19 02:57:06.000000000 +0100
@@ -631,8 +631,9 @@
 BUILD_SOLR_TRUE
 CURL_LIBS
 CURL_CFLAGS
 CURLCONFIG
+QUOTA_LIBS
 HAVE_RQUOTA_FALSE
 HAVE_RQUOTA_TRUE
 RPCGEN
 BUILD_ZLIB_PLUGIN_FALSE
@@ -18047,9 +18048,10 @@
 
 
 for ac_header in strings.h stdint.h unistd.h dirent.h malloc.h inttypes.h \
   sys/uio.h sys/sysmacros.h sys/resource.h sys/select.h libgen.h \
-  sys/quota.h sys/fs/ufs_quota.h ufs/ufs/quota.h jfs/quota.h sys/fs/quota_common.h \
+  sys/quota.h sys/fs/ufs_quota.h ufs/ufs/quota.h jfs/quota.h \
+  quota.h sys/fs/quota_common.h \
   mntent.h sys/mnttab.h sys/event.h sys/time.h sys/mkdev.h linux/dqblk_xfs.h \
   xfs/xqm.h execinfo.h ucontext.h malloc_np.h sys/utsname.h sys/vmount.h \
   sys/utsname.h glob.h linux/falloc.h ucred.h
 do :
@@ -24214,8 +24216,72 @@
   HAVE_RQUOTA_FALSE=
 fi
 
 
+QUOTA_LIBS=""
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing quota_open" >&5
+$as_echo_n "checking for library containing quota_open... " >&6; }
+if ${ac_cv_search_quota_open+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char quota_open ();
+int
+main ()
+{
+return quota_open ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' quota; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_quota_open=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_quota_open+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_quota_open+:} false; then :
+
+else
+  ac_cv_search_quota_open=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_quota_open" >&5
+$as_echo "$ac_cv_search_quota_open" >&6; }
+ac_res=$ac_cv_search_quota_open
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+
+$as_echo "#define HAVE_QUOTA_OPEN /**/" >>confdefs.h
+
+  QUOTA_LIBS="-lquota"
+
+fi
+
+
+
 
 fts=" squat"
 not_fts=""
 

File Added: pkgsrc/mail/dovecot2/patches/Attic/patch-configure.in
--- configure.in.orig	2013-01-07 08:51:52.000000000 +0100
+++ configure.in	2013-01-19 02:56:47.000000000 +0100
@@ -288,9 +288,10 @@
 AC_DEFINE_UNQUOTED(DOVECOT_VERSION, "$PACKAGE_VERSION", Dovecot version)
 
 AC_CHECK_HEADERS(strings.h stdint.h unistd.h dirent.h malloc.h inttypes.h \
   sys/uio.h sys/sysmacros.h sys/resource.h sys/select.h libgen.h \
-  sys/quota.h sys/fs/ufs_quota.h ufs/ufs/quota.h jfs/quota.h sys/fs/quota_common.h \
+  sys/quota.h sys/fs/ufs_quota.h ufs/ufs/quota.h jfs/quota.h \
+  quota.h sys/fs/quota_common.h \
   mntent.h sys/mnttab.h sys/event.h sys/time.h sys/mkdev.h linux/dqblk_xfs.h \
   xfs/xqm.h execinfo.h ucontext.h malloc_np.h sys/utsname.h sys/vmount.h \
   sys/utsname.h glob.h linux/falloc.h ucred.h)
 
@@ -2609,8 +2610,15 @@
   have_rquota=yes
 fi
 AM_CONDITIONAL(HAVE_RQUOTA, test "$have_rquota" = "yes")
 
+QUOTA_LIBS=""
+AC_SEARCH_LIBS(quota_open, quota, [
+  AC_DEFINE(HAVE_QUOTA_OPEN,, Define if you have quota_open())
+  QUOTA_LIBS="-lquota"
+])
+AC_SUBST(QUOTA_LIBS)
+
 dnl
 dnl ** Full text search
 dnl
 

File Added: pkgsrc/mail/dovecot2/patches/Attic/patch-src_plugins_quota_Makefile.am
--- src/plugins/quota/Makefile.am.orig	2013-01-19 02:59:14.000000000 +0100
+++ src/plugins/quota/Makefile.am	2013-01-19 03:05:16.000000000 +0100
@@ -26,8 +26,11 @@
 	quota-maildir.c \
         quota-plugin.c \
 	quota-storage.c
 
+lib10_quota_plugin_la_LIBADD = \
+	$(QUOTA_LIBS)
+
 lib10_quota_plugin_la_SOURCES = $(quota_dist_sources)
 nodist_lib10_quota_plugin_la_SOURCES = $(RQUOTA_XDR)
 
 doveadm_module_LTLIBRARIES = \

File Added: pkgsrc/mail/dovecot2/patches/Attic/patch-src_plugins_quota_Makefile.in
--- src/plugins/quota/Makefile.in.orig	2013-01-19 03:09:26.000000000 +0100
+++ src/plugins/quota/Makefile.in	2013-01-19 03:07:06.000000000 +0100
@@ -84,9 +84,10 @@
 lib10_doveadm_quota_plugin_la_LINK = $(LIBTOOL) --tag=CC \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(AM_CFLAGS) $(CFLAGS) \
 	$(lib10_doveadm_quota_plugin_la_LDFLAGS) $(LDFLAGS) -o $@
-lib10_quota_plugin_la_LIBADD =
+am__DEPENDENCIES_1 =
+lib10_quota_plugin_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
 am__objects_1 = quota.lo quota-count.lo quota-fs.lo quota-dict.lo \
 	quota-dirsize.lo quota-maildir.lo quota-plugin.lo \
 	quota-storage.lo
 am_lib10_quota_plugin_la_OBJECTS = $(am__objects_1)
@@ -215,8 +216,9 @@
 PG_CONFIG = @PG_CONFIG@
 PKG_CONFIG = @PKG_CONFIG@
 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+QUOTA_LIBS = @QUOTA_LIBS@
 RANLIB = @RANLIB@
 RPCGEN = @RPCGEN@
 RUN_TEST = @RUN_TEST@
 SED = @SED@
@@ -319,8 +321,11 @@
 	quota-maildir.c \
         quota-plugin.c \
 	quota-storage.c
 
+lib10_quota_plugin_la_LIBADD = \
+	$(QUOTA_LIBS)
+
 lib10_quota_plugin_la_SOURCES = $(quota_dist_sources)
 nodist_lib10_quota_plugin_la_SOURCES = $(RQUOTA_XDR)
 doveadm_module_LTLIBRARIES = \
 	lib10_doveadm_quota_plugin.la

File Added: pkgsrc/mail/dovecot2/patches/Attic/patch-src_plugins_quota_quota-fs.c
$NetBSD: patch-src_plugins_quota_quota-fs.c,v 1.1 2013/01/19 05:25:51 manu Exp $

Support NetBSD's libquota

--- src/plugins/quota/quota-fs.c.orig	2013-01-18 18:05:57.000000000 +0100
+++ src/plugins/quota/quota-fs.c	2013-01-18 18:41:46.000000000 +0100
@@ -76,8 +76,11 @@
 
 	unsigned int inode_per_mail:1;
 	unsigned int user_disabled:1;
 	unsigned int group_disabled:1;
+#ifdef FS_QUOTA_NETBSD
+	struct quotahandle *qh;
+#endif
 };
 
 extern struct quota_backend quota_backend_fs;
 
@@ -525,9 +528,10 @@
 #endif
 }
 #endif
 
-#if defined(FS_QUOTA_LINUX) || defined(FS_QUOTA_BSDAIX)
+#if defined(FS_QUOTA_LINUX) || defined(FS_QUOTA_BSDAIX) || \
+    defined(FS_QUOTA_NETBSD)
 static void fs_quota_root_disable(struct fs_quota_root *root, bool group)
 {
 	if (group)
 		root->group_disabled = TRUE;
@@ -641,8 +645,46 @@
 	return 1;
 }
 #endif
 
+#ifdef FS_QUOTA_NETBSD
+static int
+fs_quota_get_netbsd(struct fs_quota_root *root, bool group, bool bytes,
+		    uint64_t *value_r, uint64_t *limit_r)
+{
+	struct quotakey qk;
+	struct quotaval qv;
+
+	if (root->qh == NULL) {
+		if ((root->qh = quota_open(root->mount->mount_path)) == NULL) {
+			i_error("cannot open quota for %s: %m",
+				root->mount->mount_path);
+			fs_quota_root_disable(root, group);
+			return 0;
+		}
+	} 
+
+	qk.qk_idtype = group ? QUOTA_IDTYPE_GROUP : QUOTA_IDTYPE_USER;
+	qk.qk_id = group ? root->gid : root->uid;
+	qk.qk_objtype = bytes ? QUOTA_OBJTYPE_BLOCKS : QUOTA_OBJTYPE_FILES;
+
+	if (quota_get(root->qh, &qk, &qv) != 0) {
+		if (errno == ESRCH) {
+			fs_quota_root_disable(root, group);
+			return 0;
+		}
+		i_error("quotactl(Q_GETQUOTA, %s) failed: %m",
+			root->mount->mount_path);
+		return -1;
+	}
+
+	*value_r = qv.qv_usage * DEV_BSIZE;
+	*limit_r = qv.qv_softlimit * DEV_BSIZE;
+
+	return 1;
+}
+#endif
+
 #ifdef FS_QUOTA_HPUX
 static int
 fs_quota_get_hpux(struct fs_quota_root *root, bool bytes,
 		  uint64_t *value_r, uint64_t *limit_r)
@@ -714,8 +756,10 @@
 			return 0;
 	}
 #ifdef FS_QUOTA_LINUX
 	return fs_quota_get_linux(root, group, bytes, value_r, limit_r);
+#elif defined (FS_QUOTA_NETBSD)
+	return fs_quota_get_netbsd(root, group, bytes, value_r, limit_r);
 #elif defined (FS_QUOTA_BSDAIX)
 	return fs_quota_get_bsdaix(root, group, bytes, value_r, limit_r);
 #else
 	if (group) {

File Added: pkgsrc/mail/dovecot2/patches/Attic/patch-src_plugins_quota_quota-fs.h
$NetBSD: patch-src_plugins_quota_quota-fs.h,v 1.1 2013/01/19 05:25:51 manu Exp $

Support NetBSD's libquota

--- src/plugins/quota/quota-fs.h.orig	2011-12-13 12:35:29.000000000 +0100
+++ src/plugins/quota/quota-fs.h	2013-01-18 20:10:34.000000000 +0100
@@ -5,8 +5,12 @@
 	defined (HAVE_STRUCT_DQBLK_CURSPACE)
 #  define HAVE_FS_QUOTA
 #endif
 
+#ifdef HAVE_QUOTA_OPEN
+#  include <quota.h> /* NetBSD with libquota */
+#endif
+
 #ifdef HAVE_SYS_QUOTA_H
 #  include <sys/quota.h> /* Linux, HP-UX */
 #elif defined(HAVE_SYS_FS_UFS_QUOTA_H)
 #  include <sys/fs/ufs_quota.h> /* Solaris */
@@ -36,5 +40,11 @@
 #else
 #  undef HAVE_FS_QUOTA
 #endif
 
+#ifdef HAVE_QUOTA_OPEN /* NetBSD with libquota */
+#  define FS_QUOTA_NETBSD
+#  define HAVE_FS_QUOTA
+#  undef FS_QUOTA_LINUX /* obtained because we also have <sys/quota.h> */
+#endif
+
 #endif