Tuesday, December 06, 2022

Re: [new port] getmail6

On Tue, Dec 06, 2022 at 03:24:51PM +0000, Stuart Henderson wrote:
> On 2022/12/06 15:22, Stuart Henderson wrote:
> > ah, there's no sdist on pypi, only a wheel. how about this instead?
> >
> > I have left the getmails patch alone for now as I can't test it but the
> > pgrep invocation is wrong, it should probably search for something like
> > "^/bin/sh /usr/local/bin/getmails$" and then I expect the set -e will
> > work.
>
> ...or here's an (untested) version with that proposed change.
> (sorry for the spam!)

appreciated :)

Both Martin's latest tarball and your diff are OK with me.

If indeed everything works just like the py2 port, then I prefer the
straight update.

But I'll leave that decision to Martin as maintainer/user.


>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/mail/getmail/Makefile,v
> retrieving revision 1.102
> diff -u -p -r1.102 Makefile
> --- Makefile 11 Mar 2022 19:34:37 -0000 1.102
> +++ Makefile 6 Dec 2022 15:24:14 -0000
> @@ -1,24 +1,22 @@
> COMMENT= IMAP/POP3/SDPS mail retriever
>
> -MODPY_EGG_VERSION= 5.16
> -DISTNAME= getmail-${MODPY_EGG_VERSION}
> +MODPY_EGG_VERSION= 6.18.10
> +GH_ACCOUNT= getmail6
> +GH_PROJECT= getmail6
> +GH_TAGNAME= v${MODPY_EGG_VERSION}
> +PKGNAME= getmail-${MODPY_EGG_VERSION}
> CATEGORIES= mail
>
> -HOMEPAGE= http://pyropus.ca/software/getmail/
> +# https://github.com/getmail6/getmail6
> +HOMEPAGE= https://getmail6.org/
>
> MAINTAINER= Martin Ziemer <horrad@horrad.de>
>
> # GPLv2
> PERMIT_PACKAGE= Yes
>
> -MASTER_SITES= ${HOMEPAGE}/old-versions/
> -
> MODULES= lang/python
> -
> -# No Python 3 support as of 5.16
> -# https://pyropus.ca/software/getmail/documentation.html#python3
> -MODPY_VERSION = ${MODPY_DEFAULT_VERSION_2}
> -
> +MODPY_PYBUILD= setuptools
> NO_TEST= Yes
>
> EXDIR= ${PREFIX}/share/examples/getmail
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/mail/getmail/distinfo,v
> retrieving revision 1.81
> diff -u -p -r1.81 distinfo
> --- distinfo 24 Nov 2021 09:06:39 -0000 1.81
> +++ distinfo 6 Dec 2022 15:24:14 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (getmail-5.16.tar.gz) = auj46u+avEZQUMO2TlWjGvvc1Mbt8xl7W1m71WymZ/o=
> -SIZE (getmail-5.16.tar.gz) = 180577
> +SHA256 (getmail6-6.18.10.tar.gz) = DlYXz6LMh8WyWWNPWfVyjfOyVoqSyqVkdn4lb3mGatY=
> +SIZE (getmail6-6.18.10.tar.gz) = 205481
> Index: patches/patch-getmails
> ===================================================================
> RCS file: patches/patch-getmails
> diff -N patches/patch-getmails
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-getmails 6 Dec 2022 15:24:14 -0000
> @@ -0,0 +1,43 @@
> +# Fix for use on OpenBSD and ignore Directories in folder
> +
> +Index: getmails
> +--- getmails.orig
> ++++ getmails
> +@@ -28,7 +28,7 @@ BASE1=${1##*/}
> + [ "$BASE1" != "${BASE1#$2}" ] && return 0 || return 1
> + }
> + UID_BY_ID=$(id -u)
> +-PID_GETMAILS=$(pgrep -U $UID_BY_ID '^getmails$')
> ++PID_GETMAILS=$(pgrep -U $UID_BY_ID '^/bin/sh /usr/local/bin/getmails$')
> + if [ "x$PID_GETMAILS" != "x$$" ]; then
> + echo "The getmails script is already running as PID=\"$PID_GETMAILS\" ." >&2
> + exit 1
> +@@ -44,7 +44,7 @@ if [ -f $getmailrcdir/stop ]; then
> + echo "Do not run getmail ... (if not, remove $getmailrcdir/stop)" >&2
> + exit 1
> + fi
> +-rcfiles="/usr/bin/getmail"
> ++rcfiles="/usr/local/bin/getmail"
> + # Address concerns raised by #863856
> + # emacs backup files: foo~ foo#
> + # vim backup files: foo~ foo.swp
> +@@ -57,7 +57,8 @@ if $para ; then
> + ! endwith "$file" '#' && \
> + ! startswith "$file" 'oldmail-' && \
> + ! endwith "$file" '.swp' && \
> +- ! endwith "$file" '.bak' ; then
> ++ ! endwith "$file" '.bak' && \
> ++ [ -f "$file" ]; then
> + $rcfiles --rcfile "$file" "$@" &
> + pids="$pids $!"
> + fi
> +@@ -79,7 +80,8 @@ else
> + ! endwith "$file" '#' && \
> + ! startswith "$file" 'oldmail-' && \
> + ! endwith "$file" '.swp' && \
> +- ! endwith "$file" '.bak' ; then
> ++ ! endwith "$file" '.bak' && \
> ++ [ -f "$file" ]; then
> + rcfiles="$rcfiles --rcfile \"$file\""
> + fi
> + done
> Index: patches/patch-setup_py
> ===================================================================
> RCS file: /cvs/ports/mail/getmail/patches/patch-setup_py,v
> retrieving revision 1.5
> diff -u -p -r1.5 patch-setup_py
> --- patches/patch-setup_py 11 Mar 2022 19:34:37 -0000 1.5
> +++ patches/patch-setup_py 6 Dec 2022 15:24:14 -0000
> @@ -1,25 +1,16 @@
> Index: setup.py
> --- setup.py.orig
> +++ setup.py
> -@@ -39,12 +39,11 @@ GETMAILDOCDIR = os.path.join(
> - datadir or prefix,
> - 'share',
> - 'doc',
> -- 'getmail-%s' % __version__
> -+ 'getmail'
> - )
> +@@ -36,10 +36,10 @@ for (pos, arg) in enumerate(args):
> + # hack hack hack hack hack hack hack
> + datadir = args[pos + 1]
>
> - GETMAILMANDIR = os.path.join(
> - datadir or prefix,
> -- 'share',
> - 'man',
> - 'man1'
> - )
> -@@ -101,7 +100,6 @@ setup(
> - data_files=[
> - (GETMAILDOCDIR, [
> - './README',
> -- './getmail.spec',
> - 'docs/BUGS',
> - 'docs/COPYING',
> - 'docs/CHANGELOG',
> +-DOCDIR = os.path.join('share','doc','getmail-%s' % __version__)
> ++DOCDIR = os.path.join('share','doc','getmail')
> + GETMAILDOCDIR = os.path.join(datadir or prefix, DOCDIR)
> +
> +-MANDIR = os.path.join('share','man','man1')
> ++MANDIR = os.path.join('man','man1')
> + GETMAILMANDIR = os.path.join( datadir or prefix, MANDIR)
> +
> + if '--show-default-install-dirs' in args:
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/mail/getmail/pkg/PLIST,v
> retrieving revision 1.16
> diff -u -p -r1.16 PLIST
> --- pkg/PLIST 11 Mar 2022 19:34:37 -0000 1.16
> +++ pkg/PLIST 6 Dec 2022 15:24:14 -0000
> @@ -3,47 +3,61 @@ bin/getmail-gmail-xoauth-tokens
> bin/getmail_fetch
> bin/getmail_maildir
> bin/getmail_mbox
> -lib/python${MODPY_VERSION}/site-packages/getmail-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info
> +bin/getmails
> +lib/python${MODPY_VERSION}/site-packages/getmail6-${MODPY_EGG_VERSION}.dist-info/
> +lib/python${MODPY_VERSION}/site-packages/getmail6-${MODPY_EGG_VERSION}.dist-info/METADATA
> +lib/python${MODPY_VERSION}/site-packages/getmail6-${MODPY_EGG_VERSION}.dist-info/RECORD
> +lib/python${MODPY_VERSION}/site-packages/getmail6-${MODPY_EGG_VERSION}.dist-info/WHEEL
> +lib/python${MODPY_VERSION}/site-packages/getmail6-${MODPY_EGG_VERSION}.dist-info/top_level.txt
> lib/python${MODPY_VERSION}/site-packages/getmailcore/
> lib/python${MODPY_VERSION}/site-packages/getmailcore/__init__.py
> -lib/python${MODPY_VERSION}/site-packages/getmailcore/__init__.pyc
> -lib/python${MODPY_VERSION}/site-packages/getmailcore/_pop3ssl.py
> -lib/python${MODPY_VERSION}/site-packages/getmailcore/_pop3ssl.pyc
> +${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}/
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}_retrieverbases.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}_retrieverbases.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}baseclasses.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}baseclasses.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}constants.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}constants.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}destinations.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}destinations.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}exceptions.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}exceptions.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}filters.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}filters.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}imap_utf7.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}imap_utf7.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}logging.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}logging.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}message.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}message.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}retrievers.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}retrievers.${MODPY_PYC_MAGIC_TAG}pyc
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}utilities.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
> +lib/python${MODPY_VERSION}/site-packages/getmailcore/${MODPY_PYCACHE}utilities.${MODPY_PYC_MAGIC_TAG}pyc
> lib/python${MODPY_VERSION}/site-packages/getmailcore/_retrieverbases.py
> -lib/python${MODPY_VERSION}/site-packages/getmailcore/_retrieverbases.pyc
> lib/python${MODPY_VERSION}/site-packages/getmailcore/baseclasses.py
> -lib/python${MODPY_VERSION}/site-packages/getmailcore/baseclasses.pyc
> -lib/python${MODPY_VERSION}/site-packages/getmailcore/compatibility.py
> -lib/python${MODPY_VERSION}/site-packages/getmailcore/compatibility.pyc
> lib/python${MODPY_VERSION}/site-packages/getmailcore/constants.py
> -lib/python${MODPY_VERSION}/site-packages/getmailcore/constants.pyc
> lib/python${MODPY_VERSION}/site-packages/getmailcore/destinations.py
> -lib/python${MODPY_VERSION}/site-packages/getmailcore/destinations.pyc
> lib/python${MODPY_VERSION}/site-packages/getmailcore/exceptions.py
> -lib/python${MODPY_VERSION}/site-packages/getmailcore/exceptions.pyc
> lib/python${MODPY_VERSION}/site-packages/getmailcore/filters.py
> -lib/python${MODPY_VERSION}/site-packages/getmailcore/filters.pyc
> lib/python${MODPY_VERSION}/site-packages/getmailcore/imap_utf7.py
> -lib/python${MODPY_VERSION}/site-packages/getmailcore/imap_utf7.pyc
> lib/python${MODPY_VERSION}/site-packages/getmailcore/logging.py
> -lib/python${MODPY_VERSION}/site-packages/getmailcore/logging.pyc
> lib/python${MODPY_VERSION}/site-packages/getmailcore/message.py
> -lib/python${MODPY_VERSION}/site-packages/getmailcore/message.pyc
> lib/python${MODPY_VERSION}/site-packages/getmailcore/retrievers.py
> -lib/python${MODPY_VERSION}/site-packages/getmailcore/retrievers.pyc
> lib/python${MODPY_VERSION}/site-packages/getmailcore/utilities.py
> -lib/python${MODPY_VERSION}/site-packages/getmailcore/utilities.pyc
> @man man/man1/getmail.1
> @man man/man1/getmail_fetch.1
> @man man/man1/getmail_maildir.1
> @man man/man1/getmail_mbox.1
> +@man man/man1/getmails.1
> share/doc/getmail/
> share/doc/getmail/BUGS
> share/doc/getmail/CHANGELOG
> share/doc/getmail/COPYING
> share/doc/getmail/README
> share/doc/getmail/THANKS
> -share/doc/getmail/TODO
> share/doc/getmail/configuration.html
> share/doc/getmail/configuration.txt
> share/doc/getmail/documentation.html
>

No comments:

Post a Comment