From nobody Tue Dec 27 15:26:00 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NhJQK1vsqz2cJrt; Tue, 27 Dec 2022 15:26:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NhJQK1Gs3z3KKr; Tue, 27 Dec 2022 15:26:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672154761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K7Mu3fyChLBS/bit1X3V73WqxcPqAjw1RD8NaLEL+80=; b=b+TDHg8xNSq3qYNF2SuM8yA1P0q2/O3lA+qSzAJd6Ighob5Sfe982aNy4IwaEF9xKvhXrq Po1bf/ZocWBR2N6ky9CejDo7vf+KWZU0ftlmIZ5n0lEDPFutXd0yZQQizs+jQf7wg7he+z +BqMV9oKK/w8fN5qNMxa97S2yn5fAkky67xjt3Zwjn2+ohtm0pPrevllmUy6n3vHZxs1+p U9jvVDB/tktsRk+ZYp8LnXakFiiTLNxdJFGAdPunmCEIw0n5jzU/m5yN8OzQ7ip+Q1Ag01 1A+ah3MlO/yVDp0PFIKu/+ZBbuOjewalcLRChi/roCCD/SgEnNtwiwFJUa3F6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672154761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K7Mu3fyChLBS/bit1X3V73WqxcPqAjw1RD8NaLEL+80=; b=fIwuhJ9hQXU55myO+R6OlQ7sNjjavK/cemERJYqxwVRCki1BMReZhUf2QEJKSn+SyPrsvn XekbW6CEy9Wr/4bqI2yFM2DUjSH/jhzA56Ihmyn1WE/3JQ0cgBt1Oj9+VLIF8J73p5wyJK W/3CMPx3ajqNwI1KZPttwaTyjyJWI/W9LxTAM/l9hgiSR2tuPaq9dDpHyMADjsHQ/8Yaux 7EheZgFdf82UAngu/I1K8rQDym69uvWej5aXzSUd5oSeRG2xw7P3TG3GHsiTB14K+cG3RS dEi9TQyOUuW82vg01hV1gyj6F9yfZ28gslAbbMv/HwKkyquuQYKtsuYqJyXvbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1672154761; a=rsa-sha256; cv=none; b=QRBH/ilKbHAnIVe8l5cTfHNVShrHFAJOI0yL5u+rIAOx+CPU8OyjRKL2KS18DvFeilAkIp mr94KtamE6GmcegM7XzvxVYbPQX1bZJaRpxpoybAe2oIByvLtfERii7lxNN2FtNCv7qVVi fl4almq7S1qdk2yiJmd3D0IMncISM0ONUVJMi+5GRR5Glr6u8TxH9nhXQpheFI2hqkO5Gv n3g0Lzw5iREFoyv5W+zqHceg9wXZ0bm4wUfuNt9+1bACCDJk1hjV3Y7MtwR2oUE9busw6x XjkJ5FF1m+vmAiS5NDeKPMdM/U3wPvbg2Jtt8tQPnt9NwoX38i1KdB8AkctvAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NhJQK0LQTzFMB; Tue, 27 Dec 2022 15:26:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2BRFQ0k1039563; Tue, 27 Dec 2022 15:26:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BRFQ00Q039562; Tue, 27 Dec 2022 15:26:00 GMT (envelope-from git) Date: Tue, 27 Dec 2022 15:26:00 GMT Message-Id: <202212271526.2BRFQ00Q039562@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Kurt Jaeger Subject: git: 9dc8d74ac07b - main - mail/offlineimap3: Two-way synchronization of local Maildir and IMAP folders (new port) List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pi X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9dc8d74ac07b580cb1e57194956f0f23a03d4555 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pi: URL: https://cgit.FreeBSD.org/ports/commit/?id=9dc8d74ac07b580cb1e57194956f0f23a03d4555 commit 9dc8d74ac07b580cb1e57194956f0f23a03d4555 Author: Derek Schrock AuthorDate: 2022-12-27 15:22:20 +0000 Commit: Kurt Jaeger CommitDate: 2022-12-27 15:22:20 +0000 mail/offlineimap3: Two-way synchronization of local Maildir and IMAP folders (new port) OfflineIMAP is software that downloads your email mailbox(es) as local Maildirs. OfflineIMAP will synchronize both sides via IMAP. PR: 262233 Author: Derek Schrock Reviewed by: koobs Differential Revision: https://reviews.freebsd.org/D34388 --- mail/Makefile | 1 + mail/py-offlineimap3/Makefile | 90 ++++++++++++++++++++++ mail/py-offlineimap3/distinfo | 3 + .../files/patch-offlineimap_imapserver.py | 11 +++ .../files/patch-test_tests_test__01__basic.py | 59 ++++++++++++++ mail/py-offlineimap3/pkg-descr | 2 + 6 files changed, 166 insertions(+) diff --git a/mail/Makefile b/mail/Makefile index 48cc9bcbfe1a..967ae6987d77 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -514,6 +514,7 @@ SUBDIR += py-milter SUBDIR += py-notmuch SUBDIR += py-notmuch2 + SUBDIR += py-offlineimap3 SUBDIR += py-postfix-mta-sts-resolver SUBDIR += py-premailer SUBDIR += py-pymailq diff --git a/mail/py-offlineimap3/Makefile b/mail/py-offlineimap3/Makefile new file mode 100644 index 000000000000..ad6d8f495172 --- /dev/null +++ b/mail/py-offlineimap3/Makefile @@ -0,0 +1,90 @@ +PORTNAME= offlineimap3 +DISTVERSIONPREFIX= v +DISTVERSION= 8.0.0-18 +DISTVERSIONSUFFIX= -g${GH_TAGNAME} +CATEGORIES= mail python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= dereks@lifeofadishwasher.com +COMMENT= Two-way synchronization of local Maildir and IMAP folders +WWW= https://github.com/OfflineIMAP/offlineimap3 + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + +# setup.py requires these during build time. Possible move to setup/install_requires: +# https://github.com/OfflineIMAP/offlineimap3/issues/110 +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}distro>=0:sysutils/py-distro@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}imaplib2>=3.5:mail/py-imaplib2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}rfc6555>=0:mail/py-rfc6555@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}sqlite3>=0:databases/py-sqlite3@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}certifi>=2020.6.20:security/py-certifi@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}distro>=0:sysutils/py-distro@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}imaplib2>=3.5:mail/py-imaplib2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}rfc6555>=0:mail/py-rfc6555@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}sqlite3>=0:databases/py-sqlite3@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}urllib3>=1.25.9:net/py-urllib3@${PY_FLAVOR} + +# Upstream doesn't have exact version currently only able to test up to 3.9 since +# imaplib2 is 3.6-3.9. +USES= pytest python:3.7-3.9 + +# Project is currently not publishing to pypi sdist. pypi/naming status: +# https://github.com/OfflineIMAP/offlineimap3/issues/111 +USE_GITHUB= yes +GH_ACCOUNT= OfflineIMAP +GH_TAGNAME= 253f97a3e947 + +USE_PYTHON= autoplist concurrent distutils + +CONFLICTS_INSTALL= mail/py-offlineimap + +NO_ARCH= yes + +PORTDOCS= * +PORTEXAMPLES= offlineimap.conf + +OPTIONS_DEFINE= DOCS EXAMPLES GSSAPI MANPAGES +OPTIONS_DEFAULT= MANPAGES + +COMMON_BUILD_DEPENDS= a2x:textproc/asciidoc \ + gmake:devel/gmake + +DOCS_BUILD_DEPENDS= ${COMMON_BUILD_DEPENDS} \ + ${PYTHON_PKGNAMEPREFIX}sphinx>=0:textproc/py-sphinx@${PY_FLAVOR} + +GSSAPI_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gssapi>=1.6.9:security/py-gssapi@${PY_FLAVOR} + +MANPAGES_BUILD_DEPENDS= ${COMMON_BUILD_DEPENDS} +MANPAGES_PLIST_FILES+= man/man1/offlineimap.1.gz \ + man/man7/offlineimapui.7.gz + +# In concurrent env. sphinx-build is only exist for py38 add "-${PYTHON_VER}" to command +post-patch: + cd ${WRKSRC} && \ + ${REINPLACE_CMD} '/^SPHINXBUILD = sphinx-build$$/s/$$/-${PYTHON_VER}/' \ + docs/Makefile + +post-build-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} + cd ${WRKSRC}/docs && ${GMAKE} docs && \ + cd html && \ + ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} \ + '! ( -name .lock -or -name .buildinfo )' + +post-build-MANPAGES-on: + ${MKDIR} ${STAGEDIR}${MAN7PREFIX}/man/man7/ + ${MKDIR} ${STAGEDIR}${MAN7PREFIX}/man/man1/ + cd ${WRKSRC}/docs && ${GMAKE} man && \ + ${INSTALL_MAN} offlineimapui.7 ${STAGEDIR}${MAN7PREFIX}/man/man7/ && \ + ${INSTALL_MAN} offlineimap.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/ + +post-install-EXAMPLES-on: + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/offlineimap.conf ${STAGEDIR}${EXAMPLESDIR} + +pre-test: + cd ${WRKSRC} && \ + ${CP} test/credentials.conf.sample test/credentials.conf + +.include diff --git a/mail/py-offlineimap3/distinfo b/mail/py-offlineimap3/distinfo new file mode 100644 index 000000000000..fe44869552b3 --- /dev/null +++ b/mail/py-offlineimap3/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1671226862 +SHA256 (OfflineIMAP-offlineimap3-v8.0.0-18-g253f97a3e947-253f97a3e947_GH0.tar.gz) = c1bcc5e18df029bf377dafbef38aeb651455238b60279e45aad2c81d2b95da0f +SIZE (OfflineIMAP-offlineimap3-v8.0.0-18-g253f97a3e947-253f97a3e947_GH0.tar.gz) = 703329 diff --git a/mail/py-offlineimap3/files/patch-offlineimap_imapserver.py b/mail/py-offlineimap3/files/patch-offlineimap_imapserver.py new file mode 100644 index 000000000000..9655d920c7f8 --- /dev/null +++ b/mail/py-offlineimap3/files/patch-offlineimap_imapserver.py @@ -0,0 +1,11 @@ +--- offlineimap/imapserver.py.orig 2022-02-27 05:55:01 UTC ++++ offlineimap/imapserver.py +@@ -879,7 +879,7 @@ class IdleThread: + while not success: + imapobj = self.parent.acquireconnection() + try: +- imapobj.select(self.folder) ++ imapobj.select(imaputil.foldername_to_imapname(self.folder)) + except OfflineImapError as e: + if e.severity == OfflineImapError.ERROR.FOLDER_RETRY: + # Connection closed, release connection and retry. diff --git a/mail/py-offlineimap3/files/patch-test_tests_test__01__basic.py b/mail/py-offlineimap3/files/patch-test_tests_test__01__basic.py new file mode 100644 index 000000000000..615492c8fe8d --- /dev/null +++ b/mail/py-offlineimap3/files/patch-test_tests_test__01__basic.py @@ -0,0 +1,59 @@ +--- test/tests/test_01_basic.py.orig 2022-03-04 03:43:46 UTC ++++ test/tests/test_01_basic.py +@@ -17,6 +17,8 @@ import unittest + import logging + from test.OLItest import OLITestLib + ++import pytest ++ + # Things need to be setup first, usually setup.py initializes everything. + # but if e.g. called from command line, we take care of default values here: + if not OLITestLib.cred_file: +@@ -47,6 +49,7 @@ class TestBasicFunctions(unittest.TestCase): + def tearDown(self): + OLITestLib.delete_remote_testfolders() + ++ @pytest.mark.skip(reason="skpping test needs remote auth") + def test_01_olistartup(self): + """Tests if OLI can be invoked without exceptions + +@@ -60,6 +63,7 @@ class TestBasicFunctions(unittest.TestCase): + "mails, but sync led to {0} folders and {1} mails" + .format(boxes, mails)) + ++ @pytest.mark.skip(reason="skpping test needs remote auth") + def test_02_createdir(self): + """Create local 'OLItest 1', sync""" + OLITestLib.delete_maildir('') # Delete all local maildir folders +@@ -71,6 +75,7 @@ class TestBasicFunctions(unittest.TestCase): + "mails, but sync led to {0} folders and {1} mails" + .format(boxes, mails)) + ++ @pytest.mark.skip(reason="skpping test needs remote auth") + def test_03_createdir_quote(self): + """Create local 'OLItest "1"' maildir, sync + +@@ -87,6 +92,7 @@ class TestBasicFunctions(unittest.TestCase): + "mails, but sync led to {0} folders and {1} mails" + .format(boxes, mails)) + ++ @pytest.mark.skip(reason="skpping test needs remote auth") + def test_04_nametransmismatch(self): + """Create mismatching remote and local nametrans rules + +@@ -108,6 +114,7 @@ class TestBasicFunctions(unittest.TestCase): + # Write out default config file again + OLITestLib.write_config_file() + ++ @pytest.mark.skip(reason="skpping test needs remote auth") + def test_05_createmail(self): + """Create mail in OLItest 1, sync, wipe folder sync + +@@ -133,6 +140,7 @@ class TestBasicFunctions(unittest.TestCase): + "assigned the IMAP's UID number, but {0} messages had no valid ID " + .format(len([None for x in uids if x is None]))) + ++ @pytest.mark.skip(reason="skpping test needs remote auth") + def test_06_createfolders(self): + """Test if createfolders works as expected + diff --git a/mail/py-offlineimap3/pkg-descr b/mail/py-offlineimap3/pkg-descr new file mode 100644 index 000000000000..17b73c0fa280 --- /dev/null +++ b/mail/py-offlineimap3/pkg-descr @@ -0,0 +1,2 @@ +OfflineIMAP is software that downloads your email mailbox(es) as +local Maildirs. OfflineIMAP will synchronize both sides via IMAP.