Index: mail/mailutils/Makefile =================================================================== --- mail/mailutils/Makefile +++ mail/mailutils/Makefile @@ -2,20 +2,18 @@ # $FreeBSD$ PORTNAME= mailutils -PORTVERSION= 3.7 -PORTREVISION= 2 +PORTVERSION= 3.8 CATEGORIES= mail MASTER_SITES= GNU GNU_ALPHA -EXTRA_PATCHES= ${FILESDIR}/git-018df5d:-p1 \ - ${FILESDIR}/git-113e144:-p1 - MAINTAINER= zeus@gnu.org.ua COMMENT= Utilities, daemons, and filters for processing e-mail LICENSE= GPLv3+ -LIB_DEPENDS= libltdl.so:devel/libltdl +LIB_DEPENDS= libgc-threaded.so:devel/boehm-gc-threaded \ + libltdl.so:devel/libltdl \ + libunistring.so:devel/libunistring USES= gmake iconv libtool localbase readline tar:xz GNU_CONFIGURE= yes @@ -28,35 +26,34 @@ INFO= ${PORTNAME} PORTDOCS= AUTHORS ChangeLog NEWS README* THANKS TODO -OPTIONS_DEFINE= DEBUG DOCS EMACS GNUTLS GSSAPI GUILE MH NNTP NLS \ - PAM PYTHON +OPTIONS_DEFINE= DEBUG DOCS GNUTLS GSSAPI GUILE MH NNTP NLS PAM PYTHON OPTIONS_DEFAULT= GDBM GNUTLS PAM OPTIONS_MULTI= DB OPTIONS_MULTI_DB= BDB GDBM KYOTOCABINET LDAP MYSQL PGSQL TOKYOCABINET OPTIONS_SUB= yes DB_DESC= Database configuration -EMACS_DESC= Emacs interface to MH (implies MH) KYOTOCABINET_DESC= Kyoto Cabinet database support MH_DESC= MH (Message Handling) system support TOKYOCABINET_DESC= Tokyo Cabinet database support DEBUG_CONFIGURE_ON= --enable-debug -EMACS_USES= emacs:build -EMACS_IMPLIES= MH - GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls GNUTLS_CONFIGURE_WITH= gnutls GSSAPI_RUN_DEPENDS= cyrus-sasl-gssapi>0:security/cyrus-sasl2-gssapi +GSSAPI_USES= ssl GSSAPI_CONFIGURE_WITH= gssapi GUILE_LIB_DEPENDS= libguile-2.2.so:lang/guile2 libgmp.so:math/gmp GUILE_USES= makeinfo pkgconfig GUILE_CONFIGURE_WITH= guile +MH_CONFIGURE_ARGS= ac_cv_prog_EMACS=no MH_CONFIGURE_ENABLE= mh +MH_USES= emacs:noflavors +MH_VARS= EMACS_NO_DEPENDS=yes NNTP_CONFIGURE_ENABLE= nntp @@ -95,13 +92,16 @@ post-patch: @${REINPLACE_CMD} -e '/need_charset_alias=/s|true|false|' \ ${WRKSRC}/lib/gnu/Makefile.in - @${REINPLACE_CMD} -e '/chown/,+1s|ch|#&|' \ - ${WRKSRC}/dotlock/Makefile.in \ - ${WRKSRC}/maidag/Makefile.in + @${REINPLACE_CMD} -e '/chown/,+1s|ch|#&|' ${WRKSRC}/dotlock/Makefile.in @${REINPLACE_CMD} -e 's,-E,& -P,' ${WRKSRC}/libmu_scm/Makefile.in post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} +post-install-MH-on: + @${MKDIR} ${STAGEDIR}${EMACS_SITE_LISPDIR} + ${RLN} ${STAGEDIR}${DATADIR}/mh/mailutils-mh.el \ + ${STAGEDIR}${PREFIX}/${EMACS_SITE_LISPDIR} + .include Index: mail/mailutils/distinfo =================================================================== --- mail/mailutils/distinfo +++ mail/mailutils/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1561122130 -SHA256 (mailutils-3.7.tar.xz) = 187258d3848fe70201f85f7d9e0f3d3243d46faa0d342af39f2db834a8968abf -SIZE (mailutils-3.7.tar.xz) = 2846864 +TIMESTAMP = 1573650731 +SHA256 (mailutils-3.8.tar.xz) = 472da317f7f5fef7cf3c20a524979654d7c24709694ad4483e871063204b76f2 +SIZE (mailutils-3.8.tar.xz) = 2998596 Index: mail/mailutils/files/git-018df5d =================================================================== --- mail/mailutils/files/git-018df5d +++ /dev/null @@ -1,277 +0,0 @@ -From 018df5d628f4e093f7e45c00b48ffc11b234d8cf Mon Sep 17 00:00:00 2001 -From: Sergey Poznyakoff -Date: Tue, 23 Jul 2019 08:04:38 +0300 -Subject: Minor fix - -Check return from mu_message_get_num_parts ---- - imap4d/fetch.c | 32 ++++++++++++++++++------------- - imap4d/search.c | 24 ++++++++++++++--------- - libmu_scm/tests/testsuite.at | 2 +- - libmu_sieve/extensions/moderator.c | 9 +++++++-- - libmu_sieve/tests.c | 15 +++++++++++---- - mail/decode.c | 39 ++++++++++++++++++++++---------------- - mh/burst.c | 8 +++++++- - mh/mhn.c | 12 +++++++++--- - 8 files changed, 92 insertions(+), 49 deletions(-) - -diff --git a/imap4d/fetch.c b/imap4d/fetch.c -index 51921dd..fa0cea6 100644 ---- a/imap4d/fetch.c -+++ b/imap4d/fetch.c -@@ -491,7 +491,6 @@ bodystructure (mu_message_t msg, int extension) - static int - fetch_bodystructure0 (mu_message_t message, int extension) - { -- size_t nparts = 1; - size_t i; - int is_multipart = 0; - -@@ -500,20 +499,27 @@ fetch_bodystructure0 (mu_message_t message, int extension) - { - mu_content_type_t ct; - mu_header_t header = NULL; -+ size_t nparts; - int rc; - -- mu_message_get_num_parts (message, &nparts); -- -- /* Get all the sub messages. */ -- for (i = 1; i <= nparts; i++) -- { -- mu_message_t msg = NULL; -- mu_message_get_part (message, i, &msg); -- io_sendf ("("); -- fetch_bodystructure0 (msg, extension); -- io_sendf (")"); -- } /* for () */ -- -+ rc = mu_message_get_num_parts (message, &nparts); -+ if (rc) -+ { -+ mu_diag_funcall (MU_DIAG_ERR, "mu_message_get_num_parts", NULL, rc); -+ } -+ else -+ { -+ /* Get all the sub messages. */ -+ for (i = 1; i <= nparts; i++) -+ { -+ mu_message_t msg = NULL; -+ mu_message_get_part (message, i, &msg); -+ io_sendf ("("); -+ fetch_bodystructure0 (msg, extension); -+ io_sendf (")"); -+ } /* for () */ -+ } -+ - mu_message_get_header (message, &header); - - /* The subtype. */ -diff --git a/imap4d/search.c b/imap4d/search.c -index 8bc9770..0037964 100644 ---- a/imap4d/search.c -+++ b/imap4d/search.c -@@ -1019,17 +1019,23 @@ _match_multipart (struct parsebuf *pb, mu_message_t msg, char *text) - { - size_t i, nparts; - -- mu_message_get_num_parts (msg, &nparts); -- -- for (i = 1; i <= nparts; i++) -+ rc = mu_message_get_num_parts (msg, &nparts); -+ if (rc) - { -- mu_message_t submsg = NULL; -- -- if (mu_message_get_part (msg, i, &submsg) == 0) -+ mu_diag_funcall (MU_DIAG_ERR, "mu_message_get_num_parts", NULL, rc); -+ } -+ else -+ { -+ for (i = 1; i <= nparts; i++) - { -- result = _match_multipart (pb, submsg, text); -- if (result) -- break; -+ mu_message_t submsg = NULL; -+ -+ if (mu_message_get_part (msg, i, &submsg) == 0) -+ { -+ result = _match_multipart (pb, submsg, text); -+ if (result) -+ break; -+ } - } - } - } -diff --git a/libmu_scm/tests/testsuite.at b/libmu_scm/tests/testsuite.at -index 6bd1947..ba445f7 100644 ---- a/libmu_scm/tests/testsuite.at -+++ b/libmu_scm/tests/testsuite.at -@@ -14,7 +14,7 @@ m4_define([MU_GUILE_CHECK], - [AT_DATA([input.scm],[dnl - (use-modules ((mailutils mailutils)) - ((mailutils ancilla))) --(mu-register-format "mbox") -+(mu-register-format "mbox") - [$1] - ]) - m4_if(MU_TEST_MAILBOX,,,[MUT_MBCOPY($abs_top_srcdir/testsuite/MU_TEST_MAILBOX,mbox)]) -diff --git a/libmu_sieve/extensions/moderator.c b/libmu_sieve/extensions/moderator.c -index 3544d88..4fe2e83 100644 ---- a/libmu_sieve/extensions/moderator.c -+++ b/libmu_sieve/extensions/moderator.c -@@ -284,8 +284,13 @@ moderator_action (mu_sieve_machine_t mach) - mu_sieve_abort (mach); - } - -- mu_message_get_num_parts (msg, &nparts); -- -+ rc = mu_message_get_num_parts (msg, &nparts); -+ if (rc) -+ { -+ mu_sieve_error (mach, "mu_message_get_num_parts: %s", mu_strerror (rc)); -+ mu_sieve_abort (mach); -+ } -+ - if (nparts != 3) /* Mailman moderation requests have three parts */ - { - mu_sieve_error (mach, _("expected 3 parts, but found %lu"), -diff --git a/libmu_sieve/tests.c b/libmu_sieve/tests.c -index da3872f..c346747 100644 ---- a/libmu_sieve/tests.c -+++ b/libmu_sieve/tests.c -@@ -176,17 +176,24 @@ sieve_test_header (mu_sieve_machine_t mach) - v = mu_sieve_get_arg_untyped (mach, 1); - - clos.message = mach->msg; -+ clos.nparts = 0; - - if (mu_sieve_get_tag (mach, "mime", SVT_VOID, NULL)) - { - int ismime = 0; - -- mu_message_is_multipart (mach->msg, &ismime); -+ rc = mu_message_is_multipart (mach->msg, &ismime); -+ if (rc) -+ mu_diag_funcall (MU_DIAG_ERR, "mu_message_is_multipart", -+ NULL, rc); - if (ismime) -- mu_message_get_num_parts (mach->msg, &clos.nparts); -+ { -+ rc = mu_message_get_num_parts (mach->msg, &clos.nparts); -+ if (rc) -+ mu_diag_funcall (MU_DIAG_ERR, "mu_message_get_num_parts", -+ NULL, rc); -+ } - } -- else -- clos.nparts = 0; - - rc = mu_sieve_vlist_compare (mach, h, v, retrieve_header, NULL, &clos); - return rc; -diff --git a/mail/decode.c b/mail/decode.c -index 869fe2f..647f8cf 100644 ---- a/mail/decode.c -+++ b/mail/decode.c -@@ -172,7 +172,6 @@ mime_descend (struct mime_descend_closure *closure, - mime_descend_fn fun, void *data) - { - int status = 0; -- size_t nparts = 0; - mu_header_t hdr = NULL; - char *type; - char *encoding; -@@ -195,23 +194,31 @@ mime_descend (struct mime_descend_closure *closure, - if (ismime) - { - unsigned int j; -- -- mu_message_get_num_parts (closure->message, &nparts); -- -- for (j = 1; j <= nparts; j++) -+ size_t nparts; -+ -+ status = mu_message_get_num_parts (closure->message, &nparts); -+ if (status) - { -- mu_message_t message = NULL; -- -- if (mu_message_get_part (closure->message, j, &message) == 0) -+ mu_diag_funcall (MU_DIAG_ERR, "mu_message_get_num_parts", NULL, -+ status); -+ } -+ else -+ { -+ for (j = 1; j <= nparts; j++) - { -- msgset_t *set = msgset_expand (msgset_dup (closure->msgset), -- msgset_make_1 (j)); -- subclosure.msgset = set; -- subclosure.message = message; -- status = mime_descend (&subclosure, fun, data); -- msgset_free (set); -- if (status) -- break; -+ mu_message_t message = NULL; -+ -+ if (mu_message_get_part (closure->message, j, &message) == 0) -+ { -+ msgset_t *set = msgset_expand (msgset_dup (closure->msgset), -+ msgset_make_1 (j)); -+ subclosure.msgset = set; -+ subclosure.message = message; -+ status = mime_descend (&subclosure, fun, data); -+ msgset_free (set); -+ if (status) -+ break; -+ } - } - } - } -diff --git a/mh/burst.c b/mh/burst.c -index b512fa0..af04317 100644 ---- a/mh/burst.c -+++ b/mh/burst.c -@@ -75,8 +75,14 @@ int - burst_mime (mu_message_t msg) - { - size_t i, nparts; -+ int rc; - -- mu_message_get_num_parts (msg, &nparts); -+ rc = mu_message_get_num_parts (msg, &nparts); -+ if (rc) -+ { -+ mu_diag_funcall (MU_DIAG_ERR, "mu_message_get_num_parts", NULL, rc); -+ return rc; -+ } - - for (i = 1; i <= nparts; i++) - { -diff --git a/mh/mhn.c b/mh/mhn.c -index 8559261..ebe0e75 100644 ---- a/mh/mhn.c -+++ b/mh/mhn.c -@@ -1047,9 +1047,15 @@ handle_message (mu_message_t msg, msg_part_t part, msg_handler_t fun, void *data - if (ismime) - { - size_t i, nparts; -- -- mu_message_get_num_parts (msg, &nparts); -- -+ int rc; -+ -+ rc = mu_message_get_num_parts (msg, &nparts); -+ if (rc) -+ { -+ mu_diag_funcall (MU_DIAG_ERR, "mu_message_get_num_parts", NULL, rc); -+ return rc; -+ } -+ - msg_part_incr (part); - for (i = 1; i <= nparts; i++) - { --- -cgit v1.0-41-gc330 - Index: mail/mailutils/files/git-113e144 =================================================================== --- mail/mailutils/files/git-113e144 +++ /dev/null @@ -1,38 +0,0 @@ -From 113e144dedbebb5bc659eadc7f329450bb374606 Mon Sep 17 00:00:00 2001 -From: Sergey Poznyakoff -Date: Tue, 23 Jul 2019 11:08:04 +0300 -Subject: Fix mandatory locking - -* lib/manlock.c (mailbox_open_and_lock): Force proper locker if -a null locker is associated with the mailbox. ---- - lib/manlock.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff --git a/lib/manlock.c b/lib/manlock.c -index 4a3b2be..392c581 100644 ---- a/lib/manlock.c -+++ b/lib/manlock.c -@@ -126,6 +126,19 @@ mailbox_open_and_lock (mu_mailbox_t mbox, int flags) - return MU_ERR_FAILURE; - } - -+ if (lock) -+ { -+ status = mu_locker_get_flags (lock, &flags); -+ if (status) -+ { -+ mu_diag_funcall (MU_DIAG_ERROR, "mu_locker_get_flags", urlstr, -+ status); -+ return MU_ERR_FAILURE; -+ } -+ if (flags & MU_LOCKER_NULL) -+ lock = NULL; -+ } -+ - if (!lock && manlock_mandatory_locking && manlock_lock_dir) - { - char *fname = NULL; --- -cgit v1.0-41-gc330 - Index: mail/mailutils/pkg-plist =================================================================== --- mail/mailutils/pkg-plist +++ mail/mailutils/pkg-plist @@ -40,6 +40,7 @@ %%MH%%bin/mu-mh/whatnow %%MH%%bin/mu-mh/whom bin/popauth +bin/putmail bin/readmsg bin/sieve include/mailutils/acl.h @@ -163,6 +164,7 @@ include/mailutils/sys/tls-stream.h include/mailutils/sys/url.h include/mailutils/sys/xscript-stream.h +include/mailutils/sys/wordsplit.h include/mailutils/syslog.h include/mailutils/tls.h include/mailutils/types.h @@ -333,11 +335,11 @@ man/man1/popauth.1.gz sbin/comsatd sbin/imap4d -@(root,mail,4755) sbin/maidag +sbin/lmtpd +sbin/mda sbin/pop3d share/aclocal/mailutils.m4 -%%MH%%%%EMACS%%share/emacs/site-lisp/mailutils-mh.el -%%MH%%%%EMACS%%share/emacs/site-lisp/mailutils-mh.elc +%%MH%%%%EMACS_SITE_LISPDIR%%/mailutils-mh.el %%GUILE%%share/guile/site/2.2/mailutils/guile-procedures.txt %%GUILE%%share/guile/site/2.2/mailutils/mailutils.scm %%NLS%%share/locale/ca/LC_MESSAGES/mailutils.mo