pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mail/pymsgauth Update to new external pymsgauth-filter...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e54950d9be40
branches: trunk
changeset: 380685:e54950d9be40
user: schmonz <schmonz%pkgsrc.org@localhost>
date: Sat May 19 16:26:16 2018 +0000
description:
Update to new external pymsgauth-filter patch. The command name has
changed, and a new environment variable can be set so that users who
haven't configured pymsgauth can have their messages passed through
(unchanged). Bump PKGREVISION.
diffstat:
mail/pymsgauth/Makefile | 10 +++-
mail/pymsgauth/PLIST | 4 +-
mail/pymsgauth/distinfo | 8 ++-
mail/pymsgauth/patches/patch-pymsgauth-tag | 17 -------
mail/pymsgauth/patches/patch-pymsgauth.py | 67 ------------------------------
5 files changed, 14 insertions(+), 92 deletions(-)
diffs (160 lines):
diff -r 5a11cba3b947 -r e54950d9be40 mail/pymsgauth/Makefile
--- a/mail/pymsgauth/Makefile Sat May 19 13:41:51 2018 +0000
+++ b/mail/pymsgauth/Makefile Sat May 19 16:26:16 2018 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.15 2017/06/17 13:55:06 schmonz Exp $
+# $NetBSD: Makefile,v 1.16 2018/05/19 16:26:16 schmonz Exp $
#
DISTNAME= pymsgauth-2.1.0
-PKGREVISION= 7
+PKGREVISION= 8
CATEGORIES= mail
MASTER_SITES= ${HOMEPAGE}
@@ -11,6 +11,10 @@
COMMENT= Automatically process qsecretary confirmation requests
LICENSE= gnu-gpl-v2
+FILTER_PATCH+= pymsgauth-2.1.0-filter-20180519.patch
+PATCHFILES+= ${FILTER_PATCH}
+SITES.${FILTER_PATCH}= https://schmonz.com/qmail/pymsgauthfilter/
+
PYMSGAUTH_PROGRAMS= pymsgauth-*
DOCS= BUGS CHANGELOG COPYING pymsgauth.txt
HTMLDOCS= pymsgauth.html
@@ -30,7 +34,7 @@
INSTALLATION_DIRS= ${SHAREDIR} ${DOCDIR} ${HTMLDOCDIR} ${EGDIR} bin
pre-install:
- cd ${WRKSRC} && ${RM} -f *.orig
+ cd ${WRKSRC} && ${RM} -f *.orig *.orig_dist
do-install:
for f in ${REPLACE_PYTHON}; do \
diff -r 5a11cba3b947 -r e54950d9be40 mail/pymsgauth/PLIST
--- a/mail/pymsgauth/PLIST Sat May 19 13:41:51 2018 +0000
+++ b/mail/pymsgauth/PLIST Sat May 19 16:26:16 2018 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.3 2017/06/17 13:55:06 schmonz Exp $
+@comment $NetBSD: PLIST,v 1.4 2018/05/19 16:26:16 schmonz Exp $
share/doc/html/pymsgauth/pymsgauth.html
share/doc/pymsgauth/BUGS
share/doc/pymsgauth/CHANGELOG
@@ -8,6 +8,6 @@
share/pymsgauth/ConfParser.py
share/pymsgauth/pymsgauth-clean
share/pymsgauth/pymsgauth-confirm
+share/pymsgauth/pymsgauth-filter
share/pymsgauth/pymsgauth-mail
-share/pymsgauth/pymsgauth-tag
share/pymsgauth/pymsgauth.py
diff -r 5a11cba3b947 -r e54950d9be40 mail/pymsgauth/distinfo
--- a/mail/pymsgauth/distinfo Sat May 19 13:41:51 2018 +0000
+++ b/mail/pymsgauth/distinfo Sat May 19 16:26:16 2018 +0000
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.3 2017/06/17 13:55:06 schmonz Exp $
+$NetBSD: distinfo,v 1.4 2018/05/19 16:26:16 schmonz Exp $
+SHA1 (pymsgauth-2.1.0-filter-20180519.patch) = d24bb90e16af02d6c3eedd33230ff7367103e070
+RMD160 (pymsgauth-2.1.0-filter-20180519.patch) = 4a4ad66016b1ce1c36797358fb5016bcb0eacd32
+SHA512 (pymsgauth-2.1.0-filter-20180519.patch) = d5bb0ce886daf5b18c604012636ba2853879cb35e9995806b379f007e624e9919d5d81613c141787f62213f2a3c0696e2979d8d5e1bfce57b32024bc871deb43
+Size (pymsgauth-2.1.0-filter-20180519.patch) = 3138 bytes
SHA1 (pymsgauth-2.1.0.tar.gz) = fe6c60022529ce2444db3423f84d44e457ae61bb
RMD160 (pymsgauth-2.1.0.tar.gz) = 0a5d7d6be65d9623647a3dfe014cb89a2c213183
SHA512 (pymsgauth-2.1.0.tar.gz) = a53ab929659106903a0c0fb83984a478d3bf32556467cf2ccf88d36f7b749a692edc3253a49ef78b0a3fe6e7475cca1ae583d4b8bc162fb693b395b6ab80ebc1
Size (pymsgauth-2.1.0.tar.gz) = 17915 bytes
-SHA1 (patch-pymsgauth-tag) = 44d27f8d915752c35cd07acd556490d93945d21e
-SHA1 (patch-pymsgauth.py) = 2d27f17b1c37d7e4646a69424bec68aa3380c29f
diff -r 5a11cba3b947 -r e54950d9be40 mail/pymsgauth/patches/patch-pymsgauth-tag
--- a/mail/pymsgauth/patches/patch-pymsgauth-tag Sat May 19 13:41:51 2018 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-$NetBSD: patch-pymsgauth-tag,v 1.1 2017/06/17 13:55:06 schmonz Exp $
-
-Add pymsgauth-tag, a Unix filter that takes an RFC822 mail message on stdin
-and prints it to stdout, adding a pymsgauth token in the header if needed.
-
---- pymsgauth-tag.orig 2017-05-31 01:57:20.000000000 +0000
-+++ pymsgauth-tag
-@@ -0,0 +1,9 @@
-+#!/usr/bin/python
-+
-+from pymsgauth import *
-+
-+import cStringIO
-+import sys
-+
-+msg = tokenize_message_if_needed (cStringIO.StringIO (sys.stdin.read ()))
-+sys.stdout.write (msg)
diff -r 5a11cba3b947 -r e54950d9be40 mail/pymsgauth/patches/patch-pymsgauth.py
--- a/mail/pymsgauth/patches/patch-pymsgauth.py Sat May 19 13:41:51 2018 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-$NetBSD: patch-pymsgauth.py,v 1.1 2017/06/17 13:55:06 schmonz Exp $
-
-Add pymsgauth-tag, a Unix filter that takes an RFC822 mail message on stdin
-and prints it to stdout, adding a pymsgauth token in the header if needed.
-
---- pymsgauth.py.orig 2003-12-15 16:49:28.000000000 +0000
-+++ pymsgauth.py
-@@ -362,9 +362,24 @@ def sendmail_wrapper (args):
- mailcmd += args
- log (TRACE, 'mailcmd == %s' % mailcmd)
- buf = cStringIO.StringIO (sys.stdin.read())
-- msg = rfc822.Message (buf, seekable=1)
-+ new_buf = tokenize_message_if_needed (buf, args)
-+
-+ send_mail (new_buf, mailcmd)
-+ if (new_buf != buf.getvalue ()):
-+ log (TRACE, 'Sent tokenized mail.')
-+ else:
-+ log (TRACE, 'Passed mail through unchanged.')
-+
-+ except StandardError, txt:
-+ log (FATAL, 'Fatal: caught exception (%s)' % txt)
-+ log_exception ()
-+ sys.exit (1)
-
-+#############################
-+def should_tokenize_message (msg, *args):
-+ try:
- sign_message = 0
-+
- for arg in args:
- if arg in config['token_recipient']:
- sign_message = 1
-@@ -378,15 +393,27 @@ def sendmail_wrapper (args):
- if recip in config['token_recipient']:
- sign_message = 1
- break
-- if sign_message:
-+
-+ return sign_message
-+
-+ except StandardError, txt:
-+ log (FATAL, 'Fatal: caught exception (%s)' % txt)
-+ log_exception ()
-+ sys.exit (1)
-+
-+#############################
-+def tokenize_message_if_needed (buf, *args):
-+ try:
-+ read_config ()
-+ log (TRACE)
-+ msg = rfc822.Message (buf, seekable=1)
-+
-+ if should_tokenize_message (msg, args):
- token = gen_token (msg)
- log (INFO, 'Generated token %s.' % token)
-- new_buf = '%s: %s\n' % (config['auth_field'], token) + buf.getvalue ()
-- send_mail (new_buf, mailcmd)
-- log (TRACE, 'Sent tokenized mail.')
-+ return '%s: %s\n' % (config['auth_field'], token) + buf.getvalue ()
- else:
-- send_mail (buf.getvalue (), mailcmd)
-- log (TRACE, 'Passed mail through unchanged.')
-+ return buf.getvalue ()
-
- except StandardError, txt:
- log (FATAL, 'Fatal: caught exception (%s)' % txt)
Home |
Main Index |
Thread Index |
Old Index