diff options
author | manu <manu@pkgsrc.org> | 2013-01-19 05:25:51 +0000 |
---|---|---|
committer | manu <manu@pkgsrc.org> | 2013-01-19 05:25:51 +0000 |
commit | 510433441bd42be475275392567ce20543250117 (patch) | |
tree | 23ab630401a68c4911c619486e865ccc0902990d /mail/dovecot2 | |
parent | 8a59c02b7477633842d4bb7b050e44716ad956ab (diff) | |
download | pkgsrc-510433441bd42be475275392567ce20543250117.tar.gz |
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.
Diffstat (limited to 'mail/dovecot2')
-rw-r--r-- | mail/dovecot2/PLIST | 3 | ||||
-rw-r--r-- | mail/dovecot2/distinfo | 15 | ||||
-rw-r--r-- | mail/dovecot2/patches/patch-config.h.in | 21 | ||||
-rw-r--r-- | mail/dovecot2/patches/patch-configure | 97 | ||||
-rw-r--r-- | mail/dovecot2/patches/patch-configure.in | 30 | ||||
-rw-r--r-- | mail/dovecot2/patches/patch-src_plugins_quota_Makefile.am | 14 | ||||
-rw-r--r-- | mail/dovecot2/patches/patch-src_plugins_quota_Makefile.in | 36 | ||||
-rw-r--r-- | mail/dovecot2/patches/patch-src_plugins_quota_quota-fs.c | 88 | ||||
-rw-r--r-- | mail/dovecot2/patches/patch-src_plugins_quota_quota-fs.h | 31 |
9 files changed, 330 insertions, 5 deletions
diff --git a/mail/dovecot2/PLIST b/mail/dovecot2/PLIST index 32662b04043..d5b6ebd6957 100644 --- a/mail/dovecot2/PLIST +++ b/mail/dovecot2/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.18 2012/12/04 08:18:34 tron Exp $ +@comment $NetBSD: PLIST,v 1.19 2013/01/19 05:25:51 manu Exp $ bin/doveadm bin/doveconf bin/dsync @@ -702,6 +702,7 @@ share/examples/dovecot/conf.d/auth-static.conf.ext share/examples/dovecot/conf.d/auth-system.conf.ext share/examples/dovecot/conf.d/auth-vpopmail.conf.ext share/examples/dovecot/dovecot-db.conf.ext +share/examples/dovecot/dovecot-dict-auth.conf.ext share/examples/dovecot/dovecot-dict-sql.conf.ext share/examples/dovecot/dovecot-ldap.conf.ext share/examples/dovecot/dovecot-openssl.cnf diff --git a/mail/dovecot2/distinfo b/mail/dovecot2/distinfo index eac91ae9d0d..c4875e2a45e 100644 --- a/mail/dovecot2/distinfo +++ b/mail/dovecot2/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.28 2012/12/04 09:28:24 adam Exp $ +$NetBSD: distinfo,v 1.29 2013/01/19 05:25:51 manu Exp $ -SHA1 (dovecot-2.1.12.tar.gz) = 6bbff6c8d9e4be8c2fa95d0adff28f692099a88c -RMD160 (dovecot-2.1.12.tar.gz) = ebf122130988e5c243a0bdc89be0088ab5aa8acb -Size (dovecot-2.1.12.tar.gz) = 3839088 bytes +SHA1 (dovecot-2.1.13.tar.gz) = 76c631f799c389731c75e5c8afef7722f0438c70 +RMD160 (dovecot-2.1.13.tar.gz) = c6ed60d0183e0ece0119d32dde218b09b6c89910 +Size (dovecot-2.1.13.tar.gz) = 3843407 bytes SHA1 (patch-aa) = 882f0c9fcf3acdfd2feaf7919309f770324f9843 SHA1 (patch-ab) = 218948585c96492a832ea903f31a6f9ad9fc69f0 SHA1 (patch-ac) = dc5db4870b14bf2424f0c957f5cf7f1a289fefe6 @@ -10,4 +10,11 @@ SHA1 (patch-ae) = 51d8cb998cc2ded8bfc767710e465b752c50e656 SHA1 (patch-af) = 6d4b339898cba762243c1ff415e0fd09e3dec750 SHA1 (patch-aj) = 9e7970d29d11c097b9588ad16611f6d0e48235c2 SHA1 (patch-ak) = ca4edaa46472a0cb609cea4d06893c7bd1312f54 +SHA1 (patch-config.h.in) = d6eb5879d71a838f17e3f2d33350d80a546f6ef4 +SHA1 (patch-configure) = 1252abb974a641f316a80365c371b579d7d030c8 +SHA1 (patch-configure.in) = 22676c2acc2967142231e447e44c3b033982bc0e SHA1 (patch-src_lib_network.c) = 31e666492a2ce7c660e04f5e6aa57018b047940d +SHA1 (patch-src_plugins_quota_Makefile.am) = 2cce87a5c4f34aa726f94c2eb9c3ceb77bd066dd +SHA1 (patch-src_plugins_quota_Makefile.in) = 84375b23af9f18fc2eee24c90524e4be23128ced +SHA1 (patch-src_plugins_quota_quota-fs.c) = f91b5dfe0344416fef08c02a95fa7221abbf66c9 +SHA1 (patch-src_plugins_quota_quota-fs.h) = 418ca8bc45140999196e64cde7265a76628d55f9 diff --git a/mail/dovecot2/patches/patch-config.h.in b/mail/dovecot2/patches/patch-config.h.in new file mode 100644 index 00000000000..ff8cc9a7bc1 --- /dev/null +++ b/mail/dovecot2/patches/patch-config.h.in @@ -0,0 +1,21 @@ +$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() */ diff --git a/mail/dovecot2/patches/patch-configure b/mail/dovecot2/patches/patch-configure new file mode 100644 index 00000000000..65803184699 --- /dev/null +++ b/mail/dovecot2/patches/patch-configure @@ -0,0 +1,97 @@ +--- 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="" + diff --git a/mail/dovecot2/patches/patch-configure.in b/mail/dovecot2/patches/patch-configure.in new file mode 100644 index 00000000000..f1e5edb60e8 --- /dev/null +++ b/mail/dovecot2/patches/patch-configure.in @@ -0,0 +1,30 @@ +--- 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 + diff --git a/mail/dovecot2/patches/patch-src_plugins_quota_Makefile.am b/mail/dovecot2/patches/patch-src_plugins_quota_Makefile.am new file mode 100644 index 00000000000..2767f97f910 --- /dev/null +++ b/mail/dovecot2/patches/patch-src_plugins_quota_Makefile.am @@ -0,0 +1,14 @@ +--- 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 = \ diff --git a/mail/dovecot2/patches/patch-src_plugins_quota_Makefile.in b/mail/dovecot2/patches/patch-src_plugins_quota_Makefile.in new file mode 100644 index 00000000000..c830e5a260a --- /dev/null +++ b/mail/dovecot2/patches/patch-src_plugins_quota_Makefile.in @@ -0,0 +1,36 @@ +--- 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 diff --git a/mail/dovecot2/patches/patch-src_plugins_quota_quota-fs.c b/mail/dovecot2/patches/patch-src_plugins_quota_quota-fs.c new file mode 100644 index 00000000000..39a04dee707 --- /dev/null +++ b/mail/dovecot2/patches/patch-src_plugins_quota_quota-fs.c @@ -0,0 +1,88 @@ +$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) { diff --git a/mail/dovecot2/patches/patch-src_plugins_quota_quota-fs.h b/mail/dovecot2/patches/patch-src_plugins_quota_quota-fs.h new file mode 100644 index 00000000000..0cc06fe71fa --- /dev/null +++ b/mail/dovecot2/patches/patch-src_plugins_quota_quota-fs.h @@ -0,0 +1,31 @@ +$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 |