Wed Feb 17 15:10:11 2021 UTC ()
isync: Update to 1.4.0

* Import upstream patch to fix runtime errors.

Changelog:
This is a feature release that comes with significant new functionality:

- The IMAP '$Forwarded' / Maildir 'P' (passed) flag is supported now.

- Support for configuring a TLS cipher string was added.

- IMAP mailbox subscriptions are supported now.

- The IMAP user query can be scripted now.

- Added built-in support for the macOS Keychain.

- Messages excluded by MaxSize will now result in placeholders.

Compatibility concerns:

- The 'isync' compatibility wrapper was removed.

- A C11 compiler is required for building now.

- The validity of the config file is checked more stricly now, including:
  - Appearance of options in unexpected places
  - The capitalization of INBOX

- The new TLSv1.3 flag must be added to SSLVersions if the option is
  used, unless disabling that version is desired (which is unlikely).

- Removed support for the obsolete/insecure SSL v3.

- The use of Master/Slave terminology has been deprecated.

Bugfixes:

- All bugfixes up to 1.3.4 are included.
- IMAP protocol errors are handled more robustly now.
- Fixed support for SASL's built-in EXTERNAL mechanism.
- Improved reliability of synchronization when resuming interrupted runs.
- Fixed MaxSize being ignored under certain circumstances when only one of
  New and ReNew was requested.
- Fixed a network inefficiency occurring with server-side mailboxes that
  receive new messages only via mbsync.


(ryoon)
diff -r1.50 -r1.51 pkgsrc/mail/isync/Makefile
diff -r1.6 -r1.7 pkgsrc/mail/isync/PLIST
diff -r1.20 -r1.21 pkgsrc/mail/isync/distinfo
diff -r1.6 -r1.7 pkgsrc/mail/isync/patches/patch-ae
diff -r1.2 -r0 pkgsrc/mail/isync/patches/patch-src_compat_Makefile.in
diff -r1.1 -r1.2 pkgsrc/mail/isync/patches/patch-src_drv__imap.c

cvs diff -r1.50 -r1.51 pkgsrc/mail/isync/Makefile (expand / switch to unified diff)

--- pkgsrc/mail/isync/Makefile 2020/08/31 18:09:56 1.50
+++ pkgsrc/mail/isync/Makefile 2021/02/17 15:10:11 1.51
@@ -1,17 +1,16 @@ @@ -1,17 +1,16 @@
1# $NetBSD: Makefile,v 1.50 2020/08/31 18:09:56 wiz Exp $ 1# $NetBSD: Makefile,v 1.51 2021/02/17 15:10:11 ryoon Exp $
2 2
3DISTNAME= isync-1.3.1 3DISTNAME= isync-1.4.0
4PKGREVISION= 3 
5CATEGORIES= mail net 4CATEGORIES= mail net
6MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=isync/} 5MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=isync/}
7 6
8MAINTAINER= tonio@NetBSD.org 7MAINTAINER= tonio@NetBSD.org
9HOMEPAGE= http://isync.sourceforge.net/ 8HOMEPAGE= http://isync.sourceforge.net/
10COMMENT= Synchronize a maildir with an imap server 9COMMENT= Synchronize a maildir with an imap server
11LICENSE= gnu-gpl-v2 10LICENSE= gnu-gpl-v2
12 11
13USE_LANGUAGES= c99 12USE_LANGUAGES= c99
14USE_TOOLS+= perl 13USE_TOOLS+= perl
15BDB_ACCEPTED= db4 db5 14BDB_ACCEPTED= db4 db5
16GNU_CONFIGURE= yes 15GNU_CONFIGURE= yes
17CONFIGURE_ARGS+= --with-ssl=${BUILDLINK_PREFIX.openssl} 16CONFIGURE_ARGS+= --with-ssl=${BUILDLINK_PREFIX.openssl}

cvs diff -r1.6 -r1.7 pkgsrc/mail/isync/PLIST (expand / switch to unified diff)

--- pkgsrc/mail/isync/PLIST 2018/09/19 13:08:14 1.6
+++ pkgsrc/mail/isync/PLIST 2021/02/17 15:10:11 1.7
@@ -1,15 +1,12 @@ @@ -1,15 +1,12 @@
1@comment $NetBSD: PLIST,v 1.6 2018/09/19 13:08:14 schmonz Exp $ 1@comment $NetBSD: PLIST,v 1.7 2021/02/17 15:10:11 ryoon Exp $
2bin/isync 
3bin/mbsync 2bin/mbsync
4bin/mbsync-get-cert 3bin/mbsync-get-cert
5bin/mdconvert 4bin/mdconvert
6man/man1/isync.1 
7man/man1/mbsync.1 5man/man1/mbsync.1
8man/man1/mdconvert.1 6man/man1/mdconvert.1
9share/doc/isync/AUTHORS 7share/doc/isync/AUTHORS
10share/doc/isync/ChangeLog 8share/doc/isync/ChangeLog
11share/doc/isync/NEWS 9share/doc/isync/NEWS
12share/doc/isync/README 10share/doc/isync/README
13share/doc/isync/TODO 11share/doc/isync/TODO
14share/examples/isync/isyncrc.sample 
15share/examples/isync/mbsyncrc.sample 12share/examples/isync/mbsyncrc.sample

cvs diff -r1.20 -r1.21 pkgsrc/mail/isync/distinfo (expand / switch to unified diff)

--- pkgsrc/mail/isync/distinfo 2020/06/12 13:46:22 1.20
+++ pkgsrc/mail/isync/distinfo 2021/02/17 15:10:11 1.21
@@ -1,10 +1,9 @@ @@ -1,10 +1,9 @@
1$NetBSD: distinfo,v 1.20 2020/06/12 13:46:22 ryoon Exp $ 1$NetBSD: distinfo,v 1.21 2021/02/17 15:10:11 ryoon Exp $
2 2
3SHA1 (isync-1.3.1.tar.gz) = 6806fbe99537c119d2c4e40b9189d4d05f870bda 3SHA1 (isync-1.4.0.tar.gz) = ccd641b0f08de6f68378fac60f01cc13f1fe718c
4RMD160 (isync-1.3.1.tar.gz) = 65ce1693e2eec5619fc9648e6c568eb4bf9679be 4RMD160 (isync-1.4.0.tar.gz) = 58e71c09c8757bb31b3bdbc5ecd4c9ca0e287e6c
5SHA512 (isync-1.3.1.tar.gz) = 59d702d41d4a4e72f03cb282b414d0bb859593171763e845bc24d116a74f807a79e5be61f1dd1f59a9ece492322bceac156b08958a246cbfbe7f230fab4cdda2 5SHA512 (isync-1.4.0.tar.gz) = 6520bcfd9dc5d7c1d51d048c1814104815a3f76a3258ed79c06b22af07d4648340b1c4314175dc448bb109187c3af56565362c58fc744741b1806894e62374f5
6Size (isync-1.3.1.tar.gz) = 311868 bytes 6Size (isync-1.4.0.tar.gz) = 334991 bytes
7SHA1 (patch-ae) = e1a1badcb99fe6089a15a259985933aceedfc110 7SHA1 (patch-ae) = a3bdbdd05e32474bf76f8110561bdcea9b72b0c3
8SHA1 (patch-src_Makefile.in) = b989a7627dbb7c989dd26c3e20beeceb000a7a47 8SHA1 (patch-src_Makefile.in) = b989a7627dbb7c989dd26c3e20beeceb000a7a47
9SHA1 (patch-src_compat_Makefile.in) = ffaba182c6b6b5c50fe82104d508438a3b62ecfd 9SHA1 (patch-src_drv__imap.c) = d27230038c7442c6a0f63ccbb566b67cb1812632
10SHA1 (patch-src_drv__imap.c) = bfb7c6a91eb32b98d082bc6c2b183bf5f1a4561d 

cvs diff -r1.6 -r1.7 pkgsrc/mail/isync/patches/patch-ae (expand / switch to unified diff)

--- pkgsrc/mail/isync/patches/patch-ae 2014/04/24 14:48:44 1.6
+++ pkgsrc/mail/isync/patches/patch-ae 2021/02/17 15:10:11 1.7
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1$NetBSD: patch-ae,v 1.6 2014/04/24 14:48:44 schmonz Exp $ 1$NetBSD: patch-ae,v 1.7 2021/02/17 15:10:11 ryoon Exp $
2 2
3Avoid segfault when parsing configuration file under NetBSD. 3Avoid segfault when parsing configuration file under NetBSD.
4 4
5--- src/config.c.orig 2013-12-13 17:54:37.000000000 +0000 5--- src/config.c.orig 2021-01-01 13:46:36.000000000 +0000
6+++ src/config.c 6+++ src/config.c
7@@ -316,7 +316,7 @@ int 7@@ -320,7 +320,7 @@ int
8 load_config( const char *where, int pseudo ) 8 load_config( const char *where )
9 { 9 {
10 conffile_t cfile; 10 conffile_t cfile;
11- store_conf_t *store, **storeapp = &stores; 11- store_conf_t *store, **storeapp = &stores;
12+ store_conf_t *store = NULL, **storeapp = &stores; 12+ store_conf_t *store = NULL, **storeapp = &stores;
13 channel_conf_t *channel, **channelapp = &channels; 13 channel_conf_t *channel, **channelapp = &channels;
14 group_conf_t *group, **groupapp = &groups; 14 group_conf_t *group, **groupapp = &groups;
15 string_list_t *chanlist, **chanlistapp; 15 string_list_t *chanlist, **chanlistapp;

File Deleted: pkgsrc/mail/isync/patches/Attic/patch-src_compat_Makefile.in

cvs diff -r1.1 -r1.2 pkgsrc/mail/isync/patches/patch-src_drv__imap.c (expand / switch to unified diff)

--- pkgsrc/mail/isync/patches/patch-src_drv__imap.c 2020/06/12 13:46:22 1.1
+++ pkgsrc/mail/isync/patches/patch-src_drv__imap.c 2021/02/17 15:10:11 1.2
@@ -1,15 +1,103 @@ @@ -1,15 +1,103 @@
1$NetBSD: patch-src_drv__imap.c,v 1.1 2020/06/12 13:46:22 ryoon Exp $ 1$NetBSD: patch-src_drv__imap.c,v 1.2 2021/02/17 15:10:11 ryoon Exp $
2 2
3* Google's Gmail access token is longer than 80 bytes. 3* Fix some runtime errors.
 4 From upstream Git: 9e3041de9367113f3b2d7d7543d2eae4c78e2c67 to 95a83c8220861185906df5b38eed589984847bfb
4 5
5--- src/drv_imap.c.orig 2019-03-10 10:27:55.000000000 +0000 6--- src/drv_imap.c
6+++ src/drv_imap.c 7+++ src/drv_imap.c
7@@ -1867,7 +1867,7 @@ ensure_password( imap_server_conf_t *srv 8@@ -924,6 +924,7 @@ parse_imap_list( imap_store_t *ctx, char **sp, parse_list_state_t *sts )
8 if (cmd) { 9 }
9 FILE *fp; 10 bail:
10 int ret; 11 free_list( sts->head );
11- char buffer[80]; 12+ sts->level = 0;
12+ char buffer[1024]; 13 return LIST_BAD;
 14 }
13  15
14 if (*cmd == '+') { 16@@ -1181,7 +1182,8 @@ parse_fetch_rsp( imap_store_t *ctx, list_t *list, char *s ATTR_UNUSED )
15 flushn(); 17 for (cmdp = ctx->in_progress; cmdp; cmdp = cmdp->next)
 18 if (cmdp->param.uid == uid)
 19 goto gotuid;
 20- goto badrsp;
 21+ error( "IMAP error: unexpected FETCH response with BODY (UID %u)\n", uid );
 22+ return LIST_BAD;
 23 gotuid:
 24 msgdata = ((imap_cmd_fetch_msg_t *)cmdp)->msg_data;
 25 msgdata->data = body->val;
 26@@ -1208,9 +1210,8 @@ parse_fetch_rsp( imap_store_t *ctx, list_t *list, char *s ATTR_UNUSED )
 27 memcpy( cur->tuid, tuid, TUIDL );
 28 status &= ~(M_FLAGS | M_RECENT | M_SIZE | M_HEADER);
 29 } else {
 30- badrsp:
 31- error( "IMAP error: unexpected FETCH response (UID %u)\n", uid );
 32- return LIST_BAD;
 33+ // These may come in as a result of STORE FLAGS despite .SILENT.
 34+ status &= ~(M_FLAGS | M_RECENT);
 35 }
 36
 37 if (status) {
 38@@ -1252,48 +1253,53 @@ parse_response_code( imap_store_t *ctx, imap_cmd_t *cmd, char *s )
 39 if (!s || *s != '[')
 40 return RESP_OK; /* no response code */
 41 s++;
 42- if (!(p = strchr( s, ']' ))) {
 43- bad_resp:
 44+ if (!(arg = next_arg( &s ))) {
 45 error( "IMAP error: malformed response code\n" );
 46 return RESP_CANCEL;
 47 }
 48- *p++ = 0;
 49- if (!(arg = next_arg( &s )))
 50- goto bad_resp;
 51 if (!strcmp( "UIDVALIDITY", arg )) {
 52 if (!(arg = next_arg( &s )) ||
 53- (ctx->uidvalidity = strtoul( arg, &earg, 10 ), *earg))
 54+ (ctx->uidvalidity = strtoul( arg, &earg, 10 ), *earg != ']'))
 55 {
 56 error( "IMAP error: malformed UIDVALIDITY status\n" );
 57 return RESP_CANCEL;
 58 }
 59 } else if (!strcmp( "UIDNEXT", arg )) {
 60 if (!(arg = next_arg( &s )) ||
 61- (ctx->uidnext = strtoul( arg, &earg, 10 ), *earg))
 62+ (ctx->uidnext = strtoul( arg, &earg, 10 ), *earg != ']'))
 63 {
 64 error( "IMAP error: malformed UIDNEXT status\n" );
 65 return RESP_CANCEL;
 66 }
 67 } else if (!strcmp( "CAPABILITY", arg )) {
 68+ if (!(p = strchr( s, ']' ))) {
 69+ error( "IMAP error: malformed CAPABILITY status\n" );
 70+ return RESP_CANCEL;
 71+ }
 72+ *p = 0;
 73 parse_capability( ctx, s );
 74- } else if (!strcmp( "ALERT", arg )) {
 75+ } else if (!strcmp( "ALERT]", arg )) {
 76 /* RFC2060 says that these messages MUST be displayed
 77 * to the user
 78 */
 79- for (; isspace( (uchar)*p ); p++);
 80- error( "*** IMAP ALERT *** %s\n", p );
 81+ if (!s) {
 82+ error( "IMAP error: malformed ALERT status\n" );
 83+ return RESP_CANCEL;
 84+ }
 85+ for (; isspace( (uchar)*s ); s++);
 86+ error( "*** IMAP ALERT *** %s\n", s );
 87 } else if (cmd && !strcmp( "APPENDUID", arg )) {
 88 if (!(arg = next_arg( &s )) ||
 89 (ctx->uidvalidity = strtoul( arg, &earg, 10 ), *earg) ||
 90 !(arg = next_arg( &s )) ||
 91- (((imap_cmd_out_uid_t *)cmd)->out_uid = strtoul( arg, &earg, 10 ), *earg))
 92+ (((imap_cmd_out_uid_t *)cmd)->out_uid = strtoul( arg, &earg, 10 ), *earg != ']'))
 93 {
 94 error( "IMAP error: malformed APPENDUID status\n" );
 95 return RESP_CANCEL;
 96 }
 97 } else if (!strcmp( "PERMANENTFLAGS", arg )) {
 98 parse_list_init( &ctx->parse_list_sts );
 99- if (parse_imap_list( NULL, &s, &ctx->parse_list_sts ) != LIST_OK) {
 100+ if (parse_imap_list( NULL, &s, &ctx->parse_list_sts ) != LIST_OK || *s != ']') {
 101 error( "IMAP error: malformed PERMANENTFLAGS status\n" );
 102 return RESP_CANCEL;
 103 }