pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mail/getmail6



Module Name:    pkgsrc
Committed By:   wiz
Date:           Sat Aug  9 20:10:23 UTC 2025

Modified Files:
        pkgsrc/mail/getmail6: Makefile PLIST distinfo
        pkgsrc/mail/getmail6/patches: patch-setup.py
Added Files:
        pkgsrc/mail/getmail6/patches: patch-getmailcore_baseclasses.py
Removed Files:
        pkgsrc/mail/getmail6: ALTERNATIVES

Log Message:
getmail6: update to 6.19.08.

Prepare for this replacing mail/getmail.

Version 6.19.08
14.May.2025
    - fix #105 by converting empty string to None, which has smtplib handling
    - fix #226 by handling all Exception instead of just OSError on SIGCHLD to parent
    - fix #239 by catching ssl.SSLError
    - Merge pull request #237 from meeuw/integration-tests
    - remove python 2 code: only supporting python 3
    - Merge pull request #238 from yshingai/v6.19.07-add-alias
    - support windows-874 cp874
    - Merge pull request #234 from meeuw/fix-incorrect-fsf-address
    - Merge pull request #233 from meeuw/fix-license
    - #220 allow uid_cache=true (latest UID from oldmail-file) in addition to uid_cache=<uidfile>

Version 6.19.07
26.January.2025
    - #225 Missing comma in getmailcore/message.py

Version 6.19.06
18.January.2025
    - #223 publish to pypi workflow
    - #219 #220 increase IMAP efficiency through uid_cache  (needs to be configured) storing last fetched UID
    - updated tests
    - update copyright to 2025

Version 6.19.05
02.October.2024
    - fix #211: --only-oldmail-file command line = only_oldmail_file config: regenerate oldmail file with mails currenlty on server
    - fix #212: oldmail-* reverts when --to-oldmail-on-each-mail is used
    - Pyp2 fixes (#210)
    - fix #209: using the suggested simpler fix as pathlib is not used so far
    - build and upload sdist
    - Fix invalid SPDX expression

Version 6.19.04
25.August.2024
    - Update getmailrc-examples (#204, #206, #207)
    - #205: pop3: Support use_xoauth2

Version 6.19.03
08 July 2024
    - #199 fix: fails with "TypeError: IMAP4_SSL.__init__()" after changing to Python 3.12 (when keyfile/certfile in config)

Version 6.19.02
01 July 2024
    - #196 fix: handle KeyError (getmail-gmail-xoauth-tokens)
    - #197 fix: detect if --port is set to force the use of the local http server (getmail-gmail-xoauth-tokens)

Version 6.19.01
7 June 2024
    - #195 fix: make mark_read option act same as -ds,

Version 6.19.00
31 May 2024
    - #191 -m/--mark-read and mark_read in [options] of rcfile
    - #190 -o/--only-account to choose rcfile by username (=email)
    - #189 IMAP retrievers support imap_id_extension
    - #137 Add mailbox name to log line

Version 6.18.14
20 March 2024
    - fix make lint
    - fix #183: in case of TypeError keyfile and certfile are used later in wrap_socket (Python 3.12)
    - fix #182: make log to trace
    - Allow to customize 'redirect_uri' (pull request #179 from jerome-pouiller/master)
    - fix #176: Maildir Filename Generation Issue with Truncated Hostname (use full hostname)
    - remove "Labels" before deleting uid (pull request #175 from ewft/fix_gmail_deletion)
    - Redact real email in test data (pull request #170 from h3xx/remove-email)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 pkgsrc/mail/getmail6/ALTERNATIVES
cvs rdiff -u -r1.2 -r1.3 pkgsrc/mail/getmail6/Makefile \
    pkgsrc/mail/getmail6/PLIST pkgsrc/mail/getmail6/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/mail/getmail6/patches/patch-getmailcore_baseclasses.py
cvs rdiff -u -r1.2 -r1.3 pkgsrc/mail/getmail6/patches/patch-setup.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mail/getmail6/Makefile
diff -u pkgsrc/mail/getmail6/Makefile:1.2 pkgsrc/mail/getmail6/Makefile:1.3
--- pkgsrc/mail/getmail6/Makefile:1.2   Tue Oct 31 14:55:36 2023
+++ pkgsrc/mail/getmail6/Makefile       Sat Aug  9 20:10:23 2025
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.2 2023/10/31 14:55:36 schmonz Exp $
+# $NetBSD: Makefile,v 1.3 2025/08/09 20:10:23 wiz Exp $
 
-DISTNAME=              getmail6-6.18.13
-PKGREVISION=           1
+DISTNAME=              getmail6-6.19.08
 CATEGORIES=            mail
 MASTER_SITES=          ${MASTER_SITE_GITHUB:=getmail6/}
 GITHUB_TAG=            v${PKGVERSION_NOREV}
@@ -11,22 +10,18 @@ HOMEPAGE=           https://getmail6.org/
 COMMENT=               Secure, flexible, reliable fetchmail replacement
 LICENSE=               gnu-gpl-v2
 
+TOOL_DEPENDS+=         ${PYPKGPREFIX}-setuptools-[0-9]*:../../devel/py-setuptools
+
 USE_LANGUAGES=         # none
 
-REPLACE_PYTHON=                *.py getmail6core/*.py
+REPLACE_PYTHON=                *.py getmailcore/*.py
+
+CONFLICTS+=            getmail-[0-9]*
+# not yet
+#SUPERSEDES=           getmail-[0-9]*
 
-SUBST_CLASSES+=                core
-SUBST_STAGE.core=      pre-configure
-SUBST_FILES.core=      * */*
-SUBST_SED.core=                -e 's|getmailcore|getmail6core|g'
-
-post-extract:
-       cd ${WRKSRC} && \
-       for f in getmail* docs/getmail*.1; do \
-               g=$$(echo $$f | sed -e 's|getmail|getmail6|'); \
-               ${MV} $$f $$g; \
-       done
+WHEEL_NAME=            ${DISTNAME:S/08/8/}
 
 .include "../../lang/python/application.mk"
-.include "../../lang/python/egg.mk"
+.include "../../lang/python/wheel.mk"
 .include "../../mk/bsd.pkg.mk"
Index: pkgsrc/mail/getmail6/PLIST
diff -u pkgsrc/mail/getmail6/PLIST:1.2 pkgsrc/mail/getmail6/PLIST:1.3
--- pkgsrc/mail/getmail6/PLIST:1.2      Tue Oct 31 14:55:36 2023
+++ pkgsrc/mail/getmail6/PLIST  Sat Aug  9 20:10:23 2025
@@ -1,67 +1,67 @@
-@comment $NetBSD: PLIST,v 1.2 2023/10/31 14:55:36 schmonz Exp $
-bin/getmail6
-bin/getmail6-gmail-xoauth-tokens
-bin/getmail6_fetch
-bin/getmail6_maildir
-bin/getmail6_mbox
-bin/getmail6s
-man/man1/getmail6.1
-man/man1/getmail6_fetch.1
-man/man1/getmail6_maildir.1
-man/man1/getmail6_mbox.1
-man/man1/getmail6s.1
-share/doc/getmail6/BUGS
-share/doc/getmail6/CHANGELOG
-share/doc/getmail6/COPYING
-share/doc/getmail6/README
-share/doc/getmail6/THANKS
-share/doc/getmail6/configuration.html
-share/doc/getmail6/configuration.txt
-share/doc/getmail6/documentation.html
-share/doc/getmail6/documentation.txt
-share/doc/getmail6/faq.html
-share/doc/getmail6/faq.txt
-share/doc/getmail6/getmaildocs.css
-share/doc/getmail6/getmailrc-examples
-share/doc/getmail6/troubleshooting.html
-share/doc/getmail6/troubleshooting.txt
-${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
-${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
-${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
-${PYSITELIB}/${EGG_INFODIR}/top_level.txt
-${PYSITELIB}/getmail6core/__init__.py
-${PYSITELIB}/getmail6core/__init__.pyc
-${PYSITELIB}/getmail6core/__init__.pyo
-${PYSITELIB}/getmail6core/_retrieverbases.py
-${PYSITELIB}/getmail6core/_retrieverbases.pyc
-${PYSITELIB}/getmail6core/_retrieverbases.pyo
-${PYSITELIB}/getmail6core/baseclasses.py
-${PYSITELIB}/getmail6core/baseclasses.pyc
-${PYSITELIB}/getmail6core/baseclasses.pyo
-${PYSITELIB}/getmail6core/constants.py
-${PYSITELIB}/getmail6core/constants.pyc
-${PYSITELIB}/getmail6core/constants.pyo
-${PYSITELIB}/getmail6core/destinations.py
-${PYSITELIB}/getmail6core/destinations.pyc
-${PYSITELIB}/getmail6core/destinations.pyo
-${PYSITELIB}/getmail6core/exceptions.py
-${PYSITELIB}/getmail6core/exceptions.pyc
-${PYSITELIB}/getmail6core/exceptions.pyo
-${PYSITELIB}/getmail6core/filters.py
-${PYSITELIB}/getmail6core/filters.pyc
-${PYSITELIB}/getmail6core/filters.pyo
-${PYSITELIB}/getmail6core/imap_utf7.py
-${PYSITELIB}/getmail6core/imap_utf7.pyc
-${PYSITELIB}/getmail6core/imap_utf7.pyo
-${PYSITELIB}/getmail6core/logging.py
-${PYSITELIB}/getmail6core/logging.pyc
-${PYSITELIB}/getmail6core/logging.pyo
-${PYSITELIB}/getmail6core/message.py
-${PYSITELIB}/getmail6core/message.pyc
-${PYSITELIB}/getmail6core/message.pyo
-${PYSITELIB}/getmail6core/retrievers.py
-${PYSITELIB}/getmail6core/retrievers.pyc
-${PYSITELIB}/getmail6core/retrievers.pyo
-${PYSITELIB}/getmail6core/utilities.py
-${PYSITELIB}/getmail6core/utilities.pyc
-${PYSITELIB}/getmail6core/utilities.pyo
+@comment $NetBSD: PLIST,v 1.3 2025/08/09 20:10:23 wiz Exp $
+bin/getmail
+bin/getmail-gmail-xoauth-tokens
+bin/getmail_fetch
+bin/getmail_maildir
+bin/getmail_mbox
+bin/getmails
+${PYSITELIB}/${WHEEL_INFODIR}/METADATA
+${PYSITELIB}/${WHEEL_INFODIR}/RECORD
+${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
+${PYSITELIB}/${WHEEL_INFODIR}/top_level.txt
+${PYSITELIB}/getmailcore/__init__.py
+${PYSITELIB}/getmailcore/__init__.pyc
+${PYSITELIB}/getmailcore/__init__.pyo
+${PYSITELIB}/getmailcore/_retrieverbases.py
+${PYSITELIB}/getmailcore/_retrieverbases.pyc
+${PYSITELIB}/getmailcore/_retrieverbases.pyo
+${PYSITELIB}/getmailcore/baseclasses.py
+${PYSITELIB}/getmailcore/baseclasses.pyc
+${PYSITELIB}/getmailcore/baseclasses.pyo
+${PYSITELIB}/getmailcore/constants.py
+${PYSITELIB}/getmailcore/constants.pyc
+${PYSITELIB}/getmailcore/constants.pyo
+${PYSITELIB}/getmailcore/destinations.py
+${PYSITELIB}/getmailcore/destinations.pyc
+${PYSITELIB}/getmailcore/destinations.pyo
+${PYSITELIB}/getmailcore/exceptions.py
+${PYSITELIB}/getmailcore/exceptions.pyc
+${PYSITELIB}/getmailcore/exceptions.pyo
+${PYSITELIB}/getmailcore/filters.py
+${PYSITELIB}/getmailcore/filters.pyc
+${PYSITELIB}/getmailcore/filters.pyo
+${PYSITELIB}/getmailcore/imap_utf7.py
+${PYSITELIB}/getmailcore/imap_utf7.pyc
+${PYSITELIB}/getmailcore/imap_utf7.pyo
+${PYSITELIB}/getmailcore/logging.py
+${PYSITELIB}/getmailcore/logging.pyc
+${PYSITELIB}/getmailcore/logging.pyo
+${PYSITELIB}/getmailcore/message.py
+${PYSITELIB}/getmailcore/message.pyc
+${PYSITELIB}/getmailcore/message.pyo
+${PYSITELIB}/getmailcore/retrievers.py
+${PYSITELIB}/getmailcore/retrievers.pyc
+${PYSITELIB}/getmailcore/retrievers.pyo
+${PYSITELIB}/getmailcore/utilities.py
+${PYSITELIB}/getmailcore/utilities.pyc
+${PYSITELIB}/getmailcore/utilities.pyo
+man/man1/getmail.1
+man/man1/getmail_fetch.1
+man/man1/getmail_maildir.1
+man/man1/getmail_mbox.1
+man/man1/getmails.1
+share/doc/getmail/BUGS
+share/doc/getmail/CHANGELOG
+share/doc/getmail/COPYING
+share/doc/getmail/README
+share/doc/getmail/THANKS
+share/doc/getmail/configuration.html
+share/doc/getmail/configuration.txt
+share/doc/getmail/documentation.html
+share/doc/getmail/documentation.txt
+share/doc/getmail/faq.html
+share/doc/getmail/faq.txt
+share/doc/getmail/getmaildocs.css
+share/doc/getmail/getmailrc-examples
+share/doc/getmail/troubleshooting.html
+share/doc/getmail/troubleshooting.txt
Index: pkgsrc/mail/getmail6/distinfo
diff -u pkgsrc/mail/getmail6/distinfo:1.2 pkgsrc/mail/getmail6/distinfo:1.3
--- pkgsrc/mail/getmail6/distinfo:1.2   Tue Oct 31 14:55:36 2023
+++ pkgsrc/mail/getmail6/distinfo       Sat Aug  9 20:10:23 2025
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.2 2023/10/31 14:55:36 schmonz Exp $
+$NetBSD: distinfo,v 1.3 2025/08/09 20:10:23 wiz Exp $
 
-BLAKE2s (getmail6-6.18.13.tar.gz) = dd4523d32fa36b0d87a76e1175f448a77b4ff925ae8ed2e1140bcaa07540941b
-SHA512 (getmail6-6.18.13.tar.gz) = 437c057d6e3d499a2e11be82d4e69aafc24d74d42fb1fa51de06fccd33d6e9e1ef7bba20ae5fc070a80dd656f184386083d462f65b05dafcf516d7dc0b2138a0
-Size (getmail6-6.18.13.tar.gz) = 213033 bytes
-SHA1 (patch-setup.py) = 3e463ceca2d98a88f84cae3dca0172bf6af6a48e
+BLAKE2s (getmail6-6.19.08.tar.gz) = 9e6f20ddecdc6f43e5439d658747835c16d05435f82fad93240ec157942c9826
+SHA512 (getmail6-6.19.08.tar.gz) = 23a9770bdc4ed6425c94df11d6ba62dc678105e4430b024c0f696d44c35893427b13c1b26b25629ad3157fcde32a41d11482a1dfc7ba4f4940e21de2c5022ea4
+Size (getmail6-6.19.08.tar.gz) = 220470 bytes
+SHA1 (patch-getmailcore_baseclasses.py) = 947ffd338dff60c34d488acff40ed61d59282898
+SHA1 (patch-setup.py) = 33aea8c9c46a371f249182bc85d0674cc147702a

Index: pkgsrc/mail/getmail6/patches/patch-setup.py
diff -u pkgsrc/mail/getmail6/patches/patch-setup.py:1.2 pkgsrc/mail/getmail6/patches/patch-setup.py:1.3
--- pkgsrc/mail/getmail6/patches/patch-setup.py:1.2     Tue Oct 31 14:55:36 2023
+++ pkgsrc/mail/getmail6/patches/patch-setup.py Sat Aug  9 20:10:23 2025
@@ -1,15 +1,11 @@
-$NetBSD: patch-setup.py,v 1.2 2023/10/31 14:55:36 schmonz Exp $
+$NetBSD: patch-setup.py,v 1.3 2025/08/09 20:10:23 wiz Exp $
 
-Use standard pkgsrc paths. Avoid conflicting with getmail.
+Use standard pkgsrc paths.
 
---- setup.py.orig      2023-08-22 15:38:27.000000000 +0000
+--- setup.py.orig      2025-05-14 19:25:00.000000000 +0000
 +++ setup.py
-@@ -36,10 +36,10 @@ for (pos, arg) in enumerate(args):
-         # hack hack hack hack hack hack hack
-         datadir = args[pos + 1]
- 
--DOCDIR = os.path.join('share','doc','getmail-%s' % __version__)
-+DOCDIR = os.path.join('share','doc','getmail6')
+@@ -39,7 +39,7 @@ for (pos, arg) in enumerate(args):
+ DOCDIR = os.path.join('share','doc','getmail')
  GETMAILDOCDIR = os.path.join(datadir or prefix, DOCDIR)
  
 -MANDIR = os.path.join('share','man','man1')
@@ -17,43 +13,3 @@ Use standard pkgsrc paths. Avoid conflic
  GETMAILMANDIR = os.path.join( datadir or prefix, MANDIR)
  
  if '--show-default-install-dirs' in args:
-@@ -79,15 +79,15 @@ setup(
-         'Topic :: Utilities',
-     ],
-     packages=[
--        'getmailcore'
-+        'getmail6core'
-     ],
-     scripts=[
--        'getmail',
--        'getmails',
--        'getmail_fetch',
--        'getmail_maildir',
--        'getmail_mbox',
--        'getmail-gmail-xoauth-tokens',
-+        'getmail6',
-+        'getmail6s',
-+        'getmail6_fetch',
-+        'getmail6_maildir',
-+        'getmail6_mbox',
-+        'getmail6-gmail-xoauth-tokens',
-     ],
-     data_files=[
-         (DOCDIR, [
-@@ -108,11 +108,11 @@ setup(
-             'docs/troubleshooting.txt',
-         ]),
-         (MANDIR, [
--            'docs/getmails.1',
--            'docs/getmail.1',
--            'docs/getmail_fetch.1',
--            'docs/getmail_maildir.1',
--            'docs/getmail_mbox.1',
-+            'docs/getmail6s.1',
-+            'docs/getmail6.1',
-+            'docs/getmail6_fetch.1',
-+            'docs/getmail6_maildir.1',
-+            'docs/getmail6_mbox.1',
-         ]),
-     ],
- )

Added files:

Index: pkgsrc/mail/getmail6/patches/patch-getmailcore_baseclasses.py
diff -u /dev/null pkgsrc/mail/getmail6/patches/patch-getmailcore_baseclasses.py:1.1
--- /dev/null   Sat Aug  9 20:10:23 2025
+++ pkgsrc/mail/getmail6/patches/patch-getmailcore_baseclasses.py       Sat Aug  9 20:10:23 2025
@@ -0,0 +1,130 @@
+$NetBSD: patch-getmailcore_baseclasses.py,v 1.1 2025/08/09 20:10:23 wiz Exp $
+
+Use multiprocessing instead of mixing signals and threading condvars for process synchronization
+https://github.com/getmail6/getmail6/pull/246
+
+--- getmailcore/baseclasses.py.orig    2025-05-14 19:25:00.000000000 +0000
++++ getmailcore/baseclasses.py
+@@ -15,7 +15,7 @@ import codecs
+ from collections import namedtuple
+ import tempfile
+ import errno
+-from threading import Condition
++from multiprocessing import Process
+ 
+ from argparse import Namespace
+ import subprocess
+@@ -399,59 +399,29 @@ class ForkingBase(object):
+         log - an object of type getmailcore.logging.Logger()
+ 
+     '''
+-    def _SIGCHLD_handler(self, sig, stackframe):
+-        def notify():
+-            self.__child_exited.acquire()
+-            self.__child_exited.notify_all()
+-            self.__child_exited.release()
+-        self.log.trace('handler called for signal %s' % sig)
+-        try:
+-            pid, r = os.waitpid(self.child.childpid,0)
+-        except Exception as o:
+-            self.log.trace('handler called with exception (%s)' % o)
+-            notify()
+-            return
+-        if self.__orig_handler:
+-            signal.signal(signal.SIGCHLD, self.__orig_handler)
+-        self.__child_pid = pid
+-        self.__child_status = r
+-        self.log.trace('handler reaped child %s with status %s' % (pid, r))
+-        notify()
+-
+-    def _prepare_child(self):
+-        self.log.trace('')
+-        self.__child_exited = Condition()
+-        self.__child_pid = 0
+-        self.__child_status = None
+-        self.__orig_handler = None
+-        self.__orig_handler = signal.signal(signal.SIGCHLD, self._SIGCHLD_handler)
+-
+-    def _wait_for_child(self, childpid):
+-        self.__child_exited.acquire()
+-        if self.__child_exited.wait(60) == False:
+-            raise getmailOperationError('waiting child pid %d timed out'
+-                                        % childpid)
+-        self.__child_exited.release()
+-        if self.__child_pid != childpid:
+-            #self.log.error('got child pid %d, not %d' % (pid, childpid))
+-            raise getmailOperationError(
+-                'got child pid %d, not %d'
+-                % (self.__child_pid, childpid)
+-            )
+-        if os.WIFSTOPPED(self.__child_status):
+-            raise getmailOperationError(
+-                'child pid %d stopped by signal %d'
+-                % (self.__child_pid, os.WSTOPSIG(self.__child_status))
+-            )
+-        if os.WIFSIGNALED(self.__child_status):
++
++    def _wait_for_child(self, child):
++        proc = child.process
++        pid = proc.pid
++        proc.join(timeout=60)
++        # If child is still alive we joined due to timeout.
++        if (proc.is_alive()):
++            proc.terminate()
++        exitcode = proc.exitcode
++
++        if (exitcode is None):
++            raise getmailOperationError('child pid %d failed to exit' % pid)
++        if (exitcode < 0):
++            # Child killed by a signal
++            try:
++                sig = signal.Signals(-exitcode).name
++            except:
++                sig = str(-exitcode)
++
+             raise getmailOperationError(
+-                'child pid %d killed by signal %d'
+-                % (self.__child_pid, os.WTERMSIG(self.__child_status))
+-            )
+-        if not os.WIFEXITED(self.__child_status):
+-            raise getmailOperationError('child pid %d failed to exit'
+-                                        % self.__child_pid)
+-        exitcode = os.WEXITSTATUS(self.__child_status)
++                'child pid %d killed by signal %s'
++                % (pid, sig))
++
+         return exitcode
+ 
+     def _pipemail(self, msg, delivered_to, received, unixfrom, stdout, stderr):
+@@ -478,20 +448,17 @@ class ForkingBase(object):
+         self.child = child = Namespace()
+         child.stdout = TemporaryFile23()
+         child.stderr = TemporaryFile23()
+-        child.childpid = os.fork()
+-        if child.childpid != 0: # here (in the parent)
+-            self._prepare_child()
+-            self.log.trace('spawned child %d\n' % child.childpid)
+-            child.exitcode = self._wait_for_child(child.childpid)
+-            child.stderr.seek(0)
+-            child.err = child.stderr.read().strip().decode()
+-            child.stdout.seek(0)
+-            if with_out:
+-                child.out = child.stdout.read().strip()
+-            return child
+-        else: #== 0 in the child
+-            # calls child_replace_me to execl external command
+-            childfun(child.stdout, child.stderr)
++        child.process = Process(target=childfun, args=(child.stdout, child.stderr))
++        child.process.start()
++        child.childpid = child.process.pid
++        self.log.trace('spawned child %d\n' % child.childpid)
++        child.exitcode = self._wait_for_child(child)
++        child.stderr.seek(0)
++        child.err = child.stderr.read().strip().decode()
++        child.stdout.seek(0)
++        if with_out:
++            child.out = child.stdout.read().strip()
++        return child
+ 
+     def get_msginfo(self, msg):
+         msginfo = {}



Home | Main Index | Thread Index | Old Index