FreeBSD Bugzilla – Attachment 232566 Details for
Bug 262233
[NEW PORT] mail/offlineimap3: Two-way synchronization of local Maildir and IMAP folders
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
mail/py-offlineimap3 v2 including tests
0001-mail-py-offlineimap3-New-port-mail-py-offlineimap3.patch (text/plain), 9.49 KB, created by
Derek Schrock
on 2022-03-18 23:44:32 UTC
(
hide
)
Description:
mail/py-offlineimap3 v2 including tests
Filename:
MIME Type:
Creator:
Derek Schrock
Created:
2022-03-18 23:44:32 UTC
Size:
9.49 KB
patch
obsolete
>From 5f450249fe8c62c07e360c215de069fbf8684928 Mon Sep 17 00:00:00 2001 >From: Derek Schrock <dereks@lifeofadishwasher.com> >Date: Sun, 27 Feb 2022 00:47:21 -0500 >Subject: [PATCH] mail/py-offlineimap3: New port mail/py-offlineimap3 > >New port mail/py-offlineimap3. > >Two-way synchronization of local Maildir and IMAP folders, the python3 >version of offlineimap. > >- Add patch [1] to fix spaces in idle folders. >- Using github until project is registered in pypa. >- Due to imaplib2 not currenly supporting 3.10, pinning to 3.7-3.9 >- Patching tests to skip ones that require user auth and a remote server > >Differential Revision: https://reviews.freebsd.org/D34389 > >[1] https://github.com/OfflineIMAP/offlineimap3/issues/109 >--- > mail/Makefile | 1 + > mail/py-offlineimap3/Makefile | 89 +++++++++++++++++++ > 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 | 4 + > 6 files changed, 167 insertions(+) > create mode 100644 mail/py-offlineimap3/Makefile > create mode 100644 mail/py-offlineimap3/distinfo > create mode 100644 mail/py-offlineimap3/files/patch-offlineimap_imapserver.py > create mode 100644 mail/py-offlineimap3/files/patch-test_tests_test__01__basic.py > create mode 100644 mail/py-offlineimap3/pkg-descr > >diff --git a/mail/Makefile b/mail/Makefile >index af4fd9afee..a7a53ae5a4 100644 >--- a/mail/Makefile >+++ b/mail/Makefile >@@ -506,6 +506,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 0000000000..d7824b16f7 >--- /dev/null >+++ b/mail/py-offlineimap3/Makefile >@@ -0,0 +1,89 @@ >+PORTNAME= offlineimap3 >+PORTVERSION= 8.0.0 >+DISTVERSIONPREFIX= v >+CATEGORIES= mail python >+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} >+ >+MAINTAINER= dereks@lifeofadishwasher.com >+COMMENT= Two-way synchronization of local Maildir and IMAP folders >+ >+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} >+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${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= 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 >+ >+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} >+ >+do-test: >+ @cd ${WRKSRC} && \ >+ ${CP} test/credentials.conf.sample test/credentials.conf && \ >+ ${PYTHON_CMD} -m pytest -v -rs -o addopts= test/ >+ >+.include <bsd.port.mk> >diff --git a/mail/py-offlineimap3/distinfo b/mail/py-offlineimap3/distinfo >new file mode 100644 >index 0000000000..1f1c88fe69 >--- /dev/null >+++ b/mail/py-offlineimap3/distinfo >@@ -0,0 +1,3 @@ >+TIMESTAMP = 1645914524 >+SHA256 (OfflineIMAP-offlineimap3-v8.0.0_GH0.tar.gz) = 5d40c163ca2fbf89658116e29f8fa75050d0c34c29619019eee1a84c90fcab32 >+SIZE (OfflineIMAP-offlineimap3-v8.0.0_GH0.tar.gz) = 702509 >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 0000000000..9655d920c7 >--- /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 0000000000..615492c8fe >--- /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 0000000000..02c6befd39 >--- /dev/null >+++ b/mail/py-offlineimap3/pkg-descr >@@ -0,0 +1,4 @@ >+OfflineIMAP is software that downloads your email mailbox(es) as >+local Maildirs. OfflineIMAP will synchronize both sides via IMAP. >+ >+WWW: https://github.com/OfflineIMAP/offlineimap3 >-- >2.35.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 262233
:
232151
|
232566
|
235734
|
237446
|
238848