svn commit: r549452 - in head/mail: . mailman3 mailman3/files

Steve Wills swills at FreeBSD.org
Mon Sep 21 15:43:22 UTC 2020


Author: swills
Date: Mon Sep 21 15:43:19 2020
New Revision: 549452
URL: https://svnweb.freebsd.org/changeset/ports/549452

Log:
  mail/mailman3: create port
  
  Mailman is free software for managing electronic mail discussion
  and e-newsletter lists. Mailman is integrated with the web, making
  it easy for users to manage their accounts and for list owners to
  administer their lists. Mailman supports built-in archiving, automatic
  bounce processing, content filtering, digest delivery, spam filters,
  and more.
  
  WWW: http://www.list.org/
  
  PR:		225543
  Submitted by:	Charlie Li <ml+freebsd at vishwin.info> (with changes from pi)

Added:
  head/mail/mailman3/
  head/mail/mailman3/Makefile   (contents, props changed)
  head/mail/mailman3/distinfo   (contents, props changed)
  head/mail/mailman3/files/
  head/mail/mailman3/files/mailman.in   (contents, props changed)
  head/mail/mailman3/files/patch-src_mailman_config_mailman.cfg   (contents, props changed)
  head/mail/mailman3/files/patch-src_mailman_config_mhonarc.cfg   (contents, props changed)
  head/mail/mailman3/files/patch-src_mailman_config_postfix.cfg   (contents, props changed)
  head/mail/mailman3/files/patch-src_mailman_config_schema.cfg   (contents, props changed)
  head/mail/mailman3/files/patch-src_mailman_config_tests_test__configuration.py   (contents, props changed)
  head/mail/mailman3/files/patch-src_mailman_core_initialize.py   (contents, props changed)
  head/mail/mailman3/files/patch-src_mailman_rest_tests_test__systemconf.py   (contents, props changed)
  head/mail/mailman3/files/patch-src_mailman_testing_mhonarc.cfg   (contents, props changed)
  head/mail/mailman3/files/patch-src_mailman_tests_test__configfile.py   (contents, props changed)
  head/mail/mailman3/pkg-descr   (contents, props changed)
  head/mail/mailman3/pkg-message   (contents, props changed)
Modified:
  head/mail/Makefile   (contents, props changed)

Modified: head/mail/Makefile
==============================================================================
--- head/mail/Makefile	Mon Sep 21 15:40:04 2020	(r549451)
+++ head/mail/Makefile	Mon Sep 21 15:43:19 2020	(r549452)
@@ -203,6 +203,7 @@
     SUBDIR += mailgraph
     SUBDIR += mailhog
     SUBDIR += mailman
+    SUBDIR += mailman3
     SUBDIR += mailscanner
     SUBDIR += mailsync
     SUBDIR += mailutils

Added: head/mail/mailman3/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/mailman3/Makefile	Mon Sep 21 15:43:19 2020	(r549452)
@@ -0,0 +1,43 @@
+# $FreeBSD$
+
+PORTNAME=	mailman
+PORTVERSION=	3.3.1
+CATEGORIES=	mail
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	vishwin at vishwin.info
+COMMENT=	GNU Mailing List Management System, Core
+
+LICENSE=	GPLv3+
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}aiosmtpd>=1.1:mail/py-aiosmtpd@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}alembic>0:databases/py-alembic@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}atpublic>0:devel/py-atpublic@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}click>0:devel/py-click@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}dnspython>=1.14.0:dns/py-dnspython@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}falcon>=1.0.0.rc1:www/py-falcon@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}flufl.bounce>0:mail/py-flufl.bounce@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}flufl.i18n>=2.0:devel/py-flufl.i18n@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}flufl.lock>=3.1:devel/py-flufl.lock@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}lazr.config>0:devel/py-lazr.config@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}passlib>0:security/py-passlib@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}sqlalchemy12>1.2.3:databases/py-sqlalchemy12@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}zope.component>0:devel/py-zope.component@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}zope.configuration>0:devel/py-zope.configuration@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}zope.event>0:devel/py-zope.event@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}zope.interface>0:devel/py-zope.interface@${PY_FLAVOR}
+
+USES=		python:3.5+
+USE_PYTHON=	autoplist distutils
+USE_RC_SUBR=	mailman
+
+SUB_LIST=	PYTHON_CMD=${PYTHON_CMD}
+
+USERS=		mailman
+GROUPS=		mailman
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>

Added: head/mail/mailman3/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/mailman3/distinfo	Mon Sep 21 15:43:19 2020	(r549452)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1590347054
+SHA256 (mailman-3.3.1.tar.gz) = b8cfa4b50453abf2b499b272db17c25865d81a49208c43b004ec4989c88eae45
+SIZE (mailman-3.3.1.tar.gz) = 1184548

Added: head/mail/mailman3/files/mailman.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/mailman3/files/mailman.in	Mon Sep 21 15:43:19 2020	(r549452)
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# $FreeBSD$
+# 
+# PROVIDE: mailman
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+# 
+# Add these lines to /etc/rc.conf or /etc/rc.conf.local to enable
+# mailman:
+# 
+# mailman_enable (bool):	Set to NO by default.
+# 				Set it to YES to enable mailman.
+# mailman_config (path):	Set to %%PREFIX%%/mailman/etc/mailman.cfg
+#				by default.
+
+. /etc/rc.subr
+
+name=mailman
+rcvar=mailman_enable
+
+load_rc_config $name
+
+: ${mailman_enable:=NO}
+: ${mailman_config="%%PREFIX%%/mailman/etc/mailman.cfg"}
+
+command_interpreter=%%PYTHON_CMD%%
+command=%%PREFIX%%/bin/${name}
+
+start_cmd="mailman_command start"
+stop_cmd="mailman_command stop"
+restart_cmd="mailman_command restart"
+status_cmd="mailman_command status"
+info_cmd="mailman_command info"
+extra_commands=info
+
+required_files="%%PREFIX%%/${name}/etc/${name}.cfg"
+pidfile="%%PREFIX%%/${name}/master.pid"
+
+command_args="-C ${mailman_config}"
+
+mailman_command()
+{
+	LANG=en_US.UTF-8 /usr/bin/su -m ${name} -c "${command_interpreter} ${command} ${command_args} ${rc_arg}"
+}
+
+run_rc_command "$1"

Added: head/mail/mailman3/files/patch-src_mailman_config_mailman.cfg
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/mailman3/files/patch-src_mailman_config_mailman.cfg	Mon Sep 21 15:43:19 2020	(r549452)
@@ -0,0 +1,24 @@
+--- src/mailman/config/mailman.cfg.orig	2018-01-22 20:19:40 UTC
++++ src/mailman/config/mailman.cfg
+@@ -34,14 +34,17 @@ var_dir: $cwd/var
+ [paths.fhs]
+ # Filesystem Hiearchy Standard 2.3
+ # http://www.pathname.com/fhs/pub/fhs-2.3.html
+-bin_dir: /sbin
++bin_dir: /usr/local/bin
+ var_dir: /var/lib/mailman
+ queue_dir: /var/spool/mailman
+ log_dir: /var/log/mailman
+-lock_dir: /var/lock/mailman
+-etc_dir: /etc
+-ext_dir: /etc/mailman.d
++lock_dir: /var/spool/lock/mailman
++etc_dir: /usr/local/etc
++ext_dir: /usr/local/etc/mailman.d
+ pid_file: /var/run/mailman/master.pid
++
++[paths.home]
++var_dir: /usr/local/mailman
+ 
+ [language.en]
+ 

Added: head/mail/mailman3/files/patch-src_mailman_config_mhonarc.cfg
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/mailman3/files/patch-src_mailman_config_mhonarc.cfg	Mon Sep 21 15:43:19 2020	(r549452)
@@ -0,0 +1,8 @@
+--- src/mailman/config/mhonarc.cfg.orig	2017-03-28 19:07:28 UTC
++++ src/mailman/config/mhonarc.cfg
+@@ -24,4 +24,4 @@ base_url: http://$hostname/archives/$fqdn_listname
+ 
+ # If the archiver works by calling a command on the local machine, this is the
+ # command to call.
+-command: /usr/bin/mhonarc -outdir /path/to/archive/$listname -add
++command: /usr/local/bin/mhonarc -outdir /path/to/archive/$listname -add

Added: head/mail/mailman3/files/patch-src_mailman_config_postfix.cfg
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/mailman3/files/patch-src_mailman_config_postfix.cfg	Mon Sep 21 15:43:19 2020	(r549452)
@@ -0,0 +1,11 @@
+--- src/mailman/config/postfix.cfg.orig	2017-08-10 03:04:28 UTC
++++ src/mailman/config/postfix.cfg
+@@ -5,7 +5,7 @@
+ # db file, from the associated plain text files.  The file being updated will
+ # be appended to this string (with a separating space), so it must be
+ # appropriate for os.system().
+-postmap_command: /usr/sbin/postmap
++postmap_command: /usr/local/sbin/postmap
+ 
+ # This variable describes the type of transport maps that will be generated by
+ # mailman to be used with postfix for LMTP transport. By default, it is set to

Added: head/mail/mailman3/files/patch-src_mailman_config_schema.cfg
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/mailman3/files/patch-src_mailman_config_schema.cfg	Mon Sep 21 15:43:19 2020	(r549452)
@@ -0,0 +1,20 @@
+--- src/mailman/config/schema.cfg.orig	2018-01-22 20:19:40 UTC
++++ src/mailman/config/schema.cfg
+@@ -55,7 +55,7 @@ pending_request_life: 3d
+ cache_life: 7d
+ 
+ # Which paths.* file system layout to use.
+-layout: here
++layout: home
+ 
+ # Can MIME filtered messages be preserved by list owners?
+ filtered_messages_are_preservable: no
+@@ -65,7 +65,7 @@ filtered_messages_are_preservable: no
+ # where the substitution variable $filename is filled in by Mailman, and
+ # contains the path to the temporary file that the command should read from.
+ # The command should print the converted text to stdout.
+-html_to_plain_text_command: /usr/bin/lynx -dump $filename
++html_to_plain_text_command: /usr/local/bin/lynx -dump $filename
+ 
+ # Specify what characters are allowed in list names.  Characters outside of
+ # the class [-_.+=!$*{}~0-9a-z] matched case insensitively are never allowed,

Added: head/mail/mailman3/files/patch-src_mailman_config_tests_test__configuration.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/mailman3/files/patch-src_mailman_config_tests_test__configuration.py	Mon Sep 21 15:43:19 2020	(r549452)
@@ -0,0 +1,17 @@
+--- src/mailman/config/tests/test_configuration.py.orig	2018-01-08 11:00:18 UTC
++++ src/mailman/config/tests/test_configuration.py
+@@ -88,12 +88,12 @@ class TestExternal(unittest.TestCase):
+         filename = resource_filename('mailman.config', 'postfix.cfg')
+         parser = external_configuration(filename)
+         self.assertEqual(parser.get('postfix', 'postmap_command'),
+-                         '/usr/sbin/postmap')
++                         '/usr/local/sbin/postmap')
+ 
+     def test_external_configuration_by_path(self):
+         parser = external_configuration('python:mailman.config.postfix')
+         self.assertEqual(parser.get('postfix', 'postmap_command'),
+-                         '/usr/sbin/postmap')
++                         '/usr/local/sbin/postmap')
+ 
+     def test_missing_configuration_file(self):
+         with self.assertRaises(MissingConfigurationFileError) as cm:

Added: head/mail/mailman3/files/patch-src_mailman_core_initialize.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/mailman3/files/patch-src_mailman_core_initialize.py	Mon Sep 21 15:43:19 2020	(r549452)
@@ -0,0 +1,19 @@
+--- src/mailman/core/initialize.py.orig	2017-11-18 01:23:39 UTC
++++ src/mailman/core/initialize.py
+@@ -67,12 +67,12 @@ def search_for_configuration_file():
+     config_path = os.path.join(os.getenv('HOME', '~'), '.mailman.cfg')
+     if os.path.exists(config_path):
+         return os.path.abspath(config_path)
+-    # /etc/mailman.cfg
+-    config_path = '/etc/mailman.cfg'
++    # /usr/local/etc/mailman.cfg
++    config_path = '/usr/local/etc/mailman.cfg'
+     if os.path.exists(config_path):
+         return os.path.abspath(config_path)
+-    # /etc/mailman3/mailman.cfg
+-    config_path = '/etc/mailman3/mailman.cfg'
++    # /usr/local/etc/mailman3/mailman.cfg
++    config_path = '/usr/local/etc/mailman3/mailman.cfg'
+     if os.path.exists(config_path):
+         return os.path.abspath(config_path)
+     # $argv0/../../etc/mailman.cfg

Added: head/mail/mailman3/files/patch-src_mailman_rest_tests_test__systemconf.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/mailman3/files/patch-src_mailman_rest_tests_test__systemconf.py	Mon Sep 21 15:43:19 2020	(r549452)
@@ -0,0 +1,11 @@
+--- src/mailman/rest/tests/test_systemconf.py.orig	2017-11-18 01:23:39 UTC
++++ src/mailman/rest/tests/test_systemconf.py
+@@ -41,7 +41,7 @@ class TestSystemConfiguration(unittest.TestCase):
+             default_language='en',
+             email_commands_max_lines='10',
+             filtered_messages_are_preservable='no',
+-            html_to_plain_text_command='/usr/bin/lynx -dump $filename',
++            html_to_plain_text_command='/usr/local/bin/lynx -dump $filename',
+             layout='testing',
+             listname_chars='[-_.0-9a-z]',
+             noreply_address='noreply',

Added: head/mail/mailman3/files/patch-src_mailman_testing_mhonarc.cfg
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/mailman3/files/patch-src_mailman_testing_mhonarc.cfg	Mon Sep 21 15:43:19 2020	(r549452)
@@ -0,0 +1,8 @@
+--- src/mailman/testing/mhonarc.cfg.orig	2015-12-10 06:48:42 UTC
++++ src/mailman/testing/mhonarc.cfg
+@@ -1,4 +1,4 @@
+ [general]
+ base_url: http://$hostname/archives/$fqdn_listname
+ 
+-command: /bin/echo "/usr/bin/mhonarc -add -dbfile $PRIVATE_ARCHIVE_FILE_DIR/${listname}.mbox/mhonarc.db -outdir $VAR_DIR/mhonarc/${listname} -stderr $LOG_DIR/mhonarc -stdout $LOG_DIR/mhonarc -spammode -umask 022"
++command: /bin/echo "/usr/local/bin/mhonarc -add -dbfile $PRIVATE_ARCHIVE_FILE_DIR/${listname}.mbox/mhonarc.db -outdir $VAR_DIR/mhonarc/${listname} -stderr $LOG_DIR/mhonarc -stdout $LOG_DIR/mhonarc -spammode -umask 022"

Added: head/mail/mailman3/files/patch-src_mailman_tests_test__configfile.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/mailman3/files/patch-src_mailman_tests_test__configfile.py	Mon Sep 21 15:43:19 2020	(r549452)
@@ -0,0 +1,24 @@
+--- src/mailman/tests/test_configfile.py.orig	2017-11-16 05:50:21 UTC
++++ src/mailman/tests/test_configfile.py
+@@ -161,8 +161,8 @@ class TestConfigFileSearchWithChroot(TestConfigFileBas
+                 self.assertEqual(search_for_configuration_file(), config_file)
+ 
+     def test_etc_file(self):
+-        # Test /etc/mailman.cfg
+-        fake_etc = '/etc'
++        # Test /usr/local/etc/mailman.cfg
++        fake_etc = '/usr/local/etc'
+         fake_testdir = self._make_fake(fake_etc)
+         config_file = os.path.join(fake_etc, 'mailman.cfg')
+         with fakedirs(fake_testdir):
+@@ -172,8 +172,8 @@ class TestConfigFileSearchWithChroot(TestConfigFileBas
+             self.assertEqual(search_for_configuration_file(), config_file)
+ 
+     def test_etc_mailman3_file(self):
+-        # Test /etc/mailman3/mailman.cfg
+-        fake_etc = '/etc/mailman3'
++        # Test /usr/local/etc/mailman3/mailman.cfg
++        fake_etc = '/usr/local/etc/mailman3'
+         fake_testdir = self._make_fake(fake_etc)
+         config_file = os.path.join(fake_etc, 'mailman.cfg')
+         with fakedirs(fake_testdir):

Added: head/mail/mailman3/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/mailman3/pkg-descr	Mon Sep 21 15:43:19 2020	(r549452)
@@ -0,0 +1,8 @@
+Mailman is free software for managing electronic mail discussion
+and e-newsletter lists. Mailman is integrated with the web, making
+it easy for users to manage their accounts and for list owners to
+administer their lists. Mailman supports built-in archiving, automatic
+bounce processing, content filtering, digest delivery, spam filters,
+and more.
+
+WWW: http://www.list.org/

Added: head/mail/mailman3/pkg-message
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/mailman3/pkg-message	Mon Sep 21 15:43:19 2020	(r549452)
@@ -0,0 +1,8 @@
+To initialise Mailman's runtime directories, log files and database
+for the first time, run
+
+  service mailman info
+
+You can then start Mailman by running:
+
+  service mailman start


More information about the svn-ports-all mailing list