Index: head/mail/mailman/Makefile =================================================================== --- head/mail/mailman/Makefile (revision 531726) +++ head/mail/mailman/Makefile (revision 531727) @@ -1,239 +1,242 @@ # Created by: n_hibma@qubesoft.com # $FreeBSD$ PORTNAME= mailman -DISTVERSION= 2.1.29 -PORTREVISION= 7 +DISTVERSION= 2.1.30 +PORTREVISION= 0 CATEGORIES= mail MASTER_SITES= GNU \ SF/${PORTNAME}/Mailman%202.1%20%28stable%29/${PORTVERSION} \ https://launchpad.net/mailman/${DISTVERSION:R}/${DISTVERSION}/+download/ DIST_SUBDIR= mailman PATCH_SITES= LOCAL/mandree PATCH_DIST_STRIP= -p1 MAINTAINER= mandree@FreeBSD.org COMMENT= Mailing list manager with user-friendly web front-end LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/gnu-COPYING-GPL -CONFLICTS= ja-mailman-2.1.* - USES= autoreconf cpe fakeroot python:2.7 shebangfix tar:tgz +CPE_VENDOR= gnu + USE_RC_SUBR= mailman SHEBANG_FILES= bin/msgfmt.py \ tests/fblast.py \ tests/onebounce.py -CPE_VENDOR= gnu - GNU_CONFIGURE= yes GNU_CONFIGURE_PREFIX= ${MAILMANDIR} CONFIGURE_ARGS+=--with-python=${PYTHON_CMD} \ --with-username=${MM_USERNAME} \ --with-groupname=${MM_GROUPNAME} \ --with-mail-gid=${MAIL_GID} --with-cgi-gid=${CGI_GID} \ --with-permcheck=no \ --with-mailhost=localhost \ --with-urlhost=localhost +CONFLICTS= ja-mailman-2.1.* + # The Mailman port supports a number of variables that may be tweaked at # build time. Getting the values of some of them right is crucial! # MM_USERNAME?= mailman MM_USERID?= 91 MM_GROUPNAME?= ${MM_USERNAME} MM_GROUPID?= ${MM_USERID} MM_DIR?= mailman CGI_GID?= www IMGDIR?= www/icons # # End of user-configurable variables. USERS= ${MM_USERNAME} GROUPS= ${MM_GROUPNAME} MAILMANDIR= ${PREFIX}/${MM_DIR} PLIST_SUB= MMDIR=${MM_DIR} IMGDIR=${IMGDIR} MM_USERNAME=${MM_USERNAME} MM_GROUPNAME=${MM_GROUPNAME} SUB_FILES= pkg-message pkg-install mailman.newsyslog.sample SUB_LIST= MAILMANDIR=${MAILMANDIR} USER=${MM_USERNAME} GROUP=${MM_GROUPNAME} PYTHON_CMD="${PYTHON_CMD}" PKGDEINSTALL= ${PKGINSTALL} PORTDOCS= ACKNOWLEDGMENTS BUGS FAQ INSTALL NEWS README README-I18N.en \ README.CONTRIB README.NETSCAPE \ README.USERAGENT TODO UPGRADING \ mailman-admin.txt \ mailman-install.txt \ mailman-member.txt \ FreeBSD-post-install-notes OPTIONS_SINGLE= MTA OPTIONS_SINGLE_MTA= COURIER EXIM4 OPENSMTPD POSTFIX SENDMAIL OPTIONS_DEFINE= HTDIG NAMAZU2 NOMAILPWD NLS DOCS OPTIONS_DEFAULT= SENDMAIL NOMAILPWD COURIER_DESC= for use with courier EXIM4_DESC= for use with exim4 OPENSMTPD_DESC= for use with opensmtpd - EXPERIMENTAL - POSTFIX_DESC= for use with postfix SENDMAIL_DESC= for use with sendmail HTDIG_DESC= - EXPERIMENTAL - htdig integration patches NAMAZU2_DESC= Make private archives searchable with namazu2 NOMAILPWD_DESC= Elide plaintext passwords from monthly reminders MTA_DESC= Integrate with which MTA? .include +SUB_LIST+= NLS="${PORT_OPTIONS:MNLS}" + # enforce EXAMPLES option, necessary so that @sample # can install the newsyslog file .if empty(PORT_OPTIONS:MEXAMPLES) PORT_OPTIONS+= EXAMPLES .endif .if ${PORT_OPTIONS:MNLS} USES+= gettext PLIST_SUB+= NLS="" .else PLIST_SUB+= NLS="@comment " MAKE_ARGS+= LANGUAGES=en .endif .if ${PORT_OPTIONS:MSENDMAIL} MAIL_GID?= mailnull .endif .if ${PORT_OPTIONS:MEXIM4} MAIL_GID?= mail .endif .if ${PORT_OPTIONS:MPOSTFIX} BUILD_DEPENDS+= postfix:mail/postfix RUN_DEPENDS+= postfix:mail/postfix MAIL_GID?= mailman EXTRA_PATCHES+= ${FILESDIR}/postfix-verp.diff .endif .if ${PORT_OPTIONS:MCOURIER} MAIL_GID?= courier .endif .if ${PORT_OPTIONS:MOPENSMTPD} MAIL_GID?= _smtpd .endif .if ${PORT_OPTIONS:MHTDIG} PKGNAMESUFFIX+= -with-htdig # how to create PATCHFILES: #X identify what is the version of msapiro's patches corresponding to the release. -#X fetch http://bazaar.launchpad.net/~msapiro/mailman/htdig/tarball/1781 +#X fetch http://bazaar.launchpad.net/~msapiro/mailman/htdig/tarball/1812 #X unpack this tarball, and the original distfile -#X diff -NEur original-unpack bazaar-unpack | xz --best -c >msapiro-htdig-1781.patch.xz +#X diff -NEur original-unpack bazaar-unpack | xz --best -c >msapiro-htdig-1812.patch.xz #X upload the latter with mode 0644 or similar to freefall's public_distfiles/ directory -_HTDIGREV= 1781 +_HTDIGREV= 1812 PATCHFILES+= msapiro-htdig-${_HTDIGREV}.patch.xz RUN_DEPENDS+= htdig:textproc/htdig PLIST_SUB+= SUB_HTDIG="" .else PLIST_SUB+= SUB_HTDIG="@comment " .endif .if ${PORT_OPTIONS:MNAMAZU2} RUN_DEPENDS+= mknmz:databases/namazu2 EXTRA_PATCHES+= ${FILESDIR}/extra-patch-Mailman-Cgi-private.py .endif .if ${PORT_OPTIONS:MNOMAILPWD} EXTRA_PATCHES+= ${FILESDIR}/extra-patch-mailpasswds .endif BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dnspython>=0:dns/py-dnspython@${PY_FLAVOR} RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dnspython>=0:dns/py-dnspython@${PY_FLAVOR} pre-everything:: @${ECHO} "" @${ECHO} "You may change the following build options:" @${ECHO} "" @${ECHO} "Option Default Value Description" @${ECHO} "------------- --------------- ------------------------------------------------" @${ECHO} "MM_USERNAME mailman The username of the Mailman user." @${ECHO} "MM_USERID 91 The user ID of the Mailman user." @${ECHO} "MM_GROUPNAME mailman The group to which the Mailman user will belong." @${ECHO} "MM_GROUPID \$$MM_USERID The group ID for the Mailman user." @${ECHO} "MM_DIR mailman Mailman will be installed in" @${ECHO} " ${PREFIX}/${MM_DIR}." @${ECHO} "CGI_GID www The group name or id under which your web" @${ECHO} " server executes CGI scripts." @${ECHO} "IMGDIR www/icons Icon images will be installed in" @${ECHO} " ${PREFIX}/${IMGDIR}." @${ECHO} "" post-patch: ${REINPLACE_CMD} -e 's#%%LOCALBASE%%#${LOCALBASE}#g' \ ${WRKSRC}/Mailman/Defaults.py.in ${REINPLACE_CMD} -e 's/^0,5,10/#&/' ${WRKSRC}/cron/crontab.in.in .if empty(PORT_OPTIONS:MNLS) ${REINPLACE_CMD} -e 's/messages//' ${WRKSRC}/Makefile.in .endif ${MV} ${WRKSRC}/configure.in ${WRKSRC}/configure.ac # suppress warning # post-patch-HTDIG-on is to fix https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238508 post-patch-HTDIG-on: # these should match those in ht://Dig's ${LOCALBASE}/bin/rundig ${REINPLACE_CMD} -E \ -e 's#^(DBDIR)=/opt/www/var/htdig#\1=${LOCALBASE}/share/htdig/database#' \ -e 's#^(COMMONDIR)=/opt/www/share/htdig#\1=${LOCALBASE}/share/htdig/common#' \ -e 's#^(BINDIR)=/opt/www/bin#\1=${LOCALBASE}/bin#' \ -e 's#^(conffile)=/opt/www/conf/#\1=${LOCALBASE}/etc/htdig/#' \ ${WRKSRC}/cron/rundig ${REINPLACE_CMD} -E \ -e 's#/opt/www/htdig/bin#${LOCALBASE}/bin#' \ ${WRKSRC}/Mailman/Cgi/remote?mmsearch .if ${PORT_OPTIONS:MPOSTFIX} pre-configure: ${ECHO} "MTA = 'Postfix'" >> ${WRKSRC}/Mailman/mm_cfg.py.dist.in .endif post-install: ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKDIR}/mailman.newsyslog.sample ${STAGEDIR}${EXAMPLESDIR} .for i in admindb admin confirm create edithtml listinfo options private \ rmlist roster subscribe ${STRIP_CMD} ${STAGEDIR}${MAILMANDIR}/cgi-bin/${i} .endfor .if ${PORT_OPTIONS:MHTDIG} .for i in htdig mmsearch ${STRIP_CMD} ${STAGEDIR}${MAILMANDIR}/cgi-bin/${i} .endfor .endif ${STRIP_CMD} ${STAGEDIR}${MAILMANDIR}/mail/mailman # Compile additional Python scripts: .for dir in bin (cd ${STAGEDIR}${MAILMANDIR} \ && ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \ -d ${MAILMANDIR}/${dir} ${dir}) .endfor @${RM} ${STAGEDIR}${MAILMANDIR}/pythonlib/*.egg-info @# mm_cfg.py is handled by pkg-plist, no need to archive a copy: @${RM} ${STAGEDIR}${MAILMANDIR}/Mailman/mm_cfg.py @${RM} ${STAGEDIR}${MAILMANDIR}/Mailman/mm_cfg.pyc @${MKDIR} ${STAGEDIR}${PREFIX}/${IMGDIR} ${CP} -p ${STAGEDIR}${MAILMANDIR}/icons/* ${STAGEDIR}${PREFIX}/${IMGDIR} ${INSTALL_DATA} ${FILESDIR}/powerlogo.png \ ${STAGEDIR}${PREFIX}/${IMGDIR}/ ${INSTALL_DATA} ${FILESDIR}/powerlogo.png \ ${STAGEDIR}${MAILMANDIR}/icons/ .if ${PORT_OPTIONS:MDOCS} ${CP} -R ${WRKSRC}/doc/* ${WRKSRC}/ @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${FILESDIR}/FreeBSD-post-install-notes ${STAGEDIR}${DOCSDIR} .for docfile in ${PORTDOCS:NFreeBSD-post-install-notes} ${INSTALL_DATA} ${WRKSRC}/${docfile} ${STAGEDIR}${DOCSDIR} .endfor .endif @${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} ${ECHO} "This marker file ensures that Python's upgrade-site-packages handles ${PKGNAME}." >${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/mailman-info.txt ${INSTALL_SCRIPT} ${PKGINSTALL} ${STAGEDIR}${MAILMANDIR}/bin/FreeBSD-post-install + ${FIND} ${STAGEDIR}${MAILMANDIR}/templates -type f -exec ${MV} '{}' '{}.sample' \; .include Index: head/mail/mailman/distinfo =================================================================== --- head/mail/mailman/distinfo (revision 531726) +++ head/mail/mailman/distinfo (revision 531727) @@ -1,5 +1,5 @@ -TIMESTAMP = 1533029722 -SHA256 (mailman/mailman-2.1.29.tgz) = 838872713601e8a124146e550f53709482c1ef168f1e16d201465c651cbf0d2c -SIZE (mailman/mailman-2.1.29.tgz) = 9376258 -SHA256 (mailman/msapiro-htdig-1781.patch.xz) = c7992e5eff2a1df8fb162cbca2e9c38fcf7fe8395f653d83301500ecafc7d424 -SIZE (mailman/msapiro-htdig-1781.patch.xz) = 50400 +TIMESTAMP = 1586853855 +SHA256 (mailman/mailman-2.1.30.tgz) = ea028d6106f776038cf135cdd786ebb14b4fe708d77386729c4a2253248d0364 +SIZE (mailman/mailman-2.1.30.tgz) = 9411262 +SHA256 (mailman/msapiro-htdig-1812.patch.xz) = 9294d42f52d2e0892220c06c74f8ee94fe650c892d68d36e79de6db5863849dd +SIZE (mailman/msapiro-htdig-1812.patch.xz) = 50412 Index: head/mail/mailman/files/patch-bin_check__perms =================================================================== --- head/mail/mailman/files/patch-bin_check__perms (nonexistent) +++ head/mail/mailman/files/patch-bin_check__perms (revision 531727) @@ -0,0 +1,30 @@ +This might be submitted upstream, had not upstream decided +that 2.1.30 is the final release. + +The messages/ directory with its .mo/.po files, and the +top installation directory, do not require group write +permissions. + +-- Matthias Andree (mandree@FreeBSD.org, 2020-04-14) + +--- bin/check_perms.orig 2020-04-13 17:08:14 UTC ++++ bin/check_perms +@@ -143,6 +143,9 @@ def checkwalk(arg, dirname, names): + elif (os.path.commonprefix((path, mm_cfg.QUEUE_DIR)) + == mm_cfg.QUEUE_DIR): + targetperms = QFILEPERMS ++ elif path == mm_cfg.PREFIX or '/messages' in path: ++ # don't require LC_MESSAGES to be group writable ++ targetperms = DIRPERMS & ~S_IWGRP & ~S_ISGID + else: + targetperms = DIRPERMS + octperms = oct(targetperms) +@@ -195,7 +195,7 @@ + if e.errno <> errno.ENOENT: raise + print C_('WARNING: directory does not exist: %(d)s') + continue +- if (mode & DIRPERMS) <> DIRPERMS: ++ if (mode & DIRPERMS) <> DIRPERMS and d <> mm_cfg.PREFIX: + STATE.ERRORS += 1 + print C_('directory must be at least 02775: %(d)s'), + if STATE.FIX: Property changes on: head/mail/mailman/files/patch-bin_check__perms ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/mailman/files/patch-messages_de_LC__MESSAGES_mailman.po =================================================================== --- head/mail/mailman/files/patch-messages_de_LC__MESSAGES_mailman.po (nonexistent) +++ head/mail/mailman/files/patch-messages_de_LC__MESSAGES_mailman.po (revision 531727) @@ -0,0 +1,11 @@ +--- messages/de/LC_MESSAGES/mailman.po.orig 2020-04-13 17:08:14 UTC ++++ messages/de/LC_MESSAGES/mailman.po +@@ -10792,7 +10792,7 @@ msgstr "WARNUNG: Verzeichnis existiert nicht: %(d)s" + + #: bin/check_perms:197 + msgid "directory must be at least 02775: %(d)s" +-msgstr "Verzeichnisrechte müssen midestens 02775 betragen: %(d)s" ++msgstr "Verzeichnisrechte müssen mindestens 02775 betragen: %(d)s" + + #: bin/check_perms:209 + msgid "checking perms on %(private)s" Property changes on: head/mail/mailman/files/patch-messages_de_LC__MESSAGES_mailman.po ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/mailman/files/pkg-install.in =================================================================== --- head/mail/mailman/files/pkg-install.in (revision 531726) +++ head/mail/mailman/files/pkg-install.in (revision 531727) @@ -1,231 +1,253 @@ #! /bin/sh # # $FreeBSD$ PATH=/bin:/usr/bin:/usr/sbin check_rcfile_fix_perms() { ( . /etc/rc.subr name="mailman" rcvar=mailman_enable load_rc_config $name : ${mailman_fix_perms="YES"} checkyesno mailman_fix_perms ) } add_default_virtuals() { cat >>"$1" <<_EOF # This and the next three lines added by FreeBSD's post-install script DEFAULT_EMAIL_HOST="$(hostname -f)" DEFAULT_URL_HOST="$(hostname -f)" add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) _EOF } move_newsyslog_conf() { oldfile=${PKG_PREFIX}/etc/newsyslog.conf.d/mailman.newsyslog newfile=${PKG_PREFIX}/etc/newsyslog.conf.d/mailman.conf samplefile=${PKG_PREFIX}/share/examples/mailman/mailman.newsyslog.sample if [ -f ${oldfile} ]; then echo "Configuration file found in old location: ${oldfile}" if cmp -s ${samplefile} ${newfile} > /dev/null; then echo "Configuration file in new location has not been modified from the default: ${newfile}" echo " => Moving old configuration file to new location" mv -f ${oldfile} ${newfile} else echo "Configuration file in new location has been modified from the default: ${newfile}" echo " => You should either delete the old file, or move it to the new location" fi fi } set -e MYTMP="$(mktemp -d "${TMPDIR-/tmp}/mminstall.XXXXXXXXXX")" trap "rm -rf \"$MYTMP\"" EXIT case "$2" in POST-INSTALL) echo "---> Starting post-install script" LC_ALL=C export LC_ALL move_newsyslog_conf # fix up permissions - this is under investigation; pkg or libarchive # goof up the group writable and/or setgid bits /usr/bin/find "%%MAILMANDIR%%/qfiles" -maxdepth 1 -type d -exec \ /bin/chmod u+rwx,g+rwsx,o-w "{}" + - /bin/chmod 02775 "%%MAILMANDIR%%" \ - "%%MAILMANDIR%%/Mailman" \ + + # deliberately skip "%%MAILMANDIR%%" itself below: + /bin/chmod 02775 \ + "%%MAILMANDIR%%/archives" \ + "%%MAILMANDIR%%/archives/public" \ "%%MAILMANDIR%%/bin" \ "%%MAILMANDIR%%/cgi-bin" \ + "%%MAILMANDIR%%/cron" \ + "%%MAILMANDIR%%/data" \ "%%MAILMANDIR%%/icons" \ - "%%MAILMANDIR%%/mail" \ - "%%MAILMANDIR%%/scripts" \ - "%%MAILMANDIR%%/tests" \ - "%%MAILMANDIR%%/pythonlib" \ - "%%MAILMANDIR%%/spam" \ + "%%MAILMANDIR%%/lists" \ "%%MAILMANDIR%%/locks" \ + "%%MAILMANDIR%%/mail" \ + "%%MAILMANDIR%%/Mailman" \ "%%MAILMANDIR%%/Mailman/Archiver" \ "%%MAILMANDIR%%/Mailman/Bouncers" \ "%%MAILMANDIR%%/Mailman/Cgi" \ "%%MAILMANDIR%%/Mailman/Commands" \ "%%MAILMANDIR%%/Mailman/Gui" \ "%%MAILMANDIR%%/Mailman/Handlers" \ "%%MAILMANDIR%%/Mailman/Logging" \ "%%MAILMANDIR%%/Mailman/MTA" \ "%%MAILMANDIR%%/Mailman/Queue" \ + "%%MAILMANDIR%%/pythonlib" \ + "%%MAILMANDIR%%/scripts" \ + "%%MAILMANDIR%%/spam" \ + "%%MAILMANDIR%%/tests" \ "%%MAILMANDIR%%/tests/bounces" \ - "%%MAILMANDIR%%/tests/msgs" \ - "%%MAILMANDIR%%/cron" \ - "%%MAILMANDIR%%/data" \ - "%%MAILMANDIR%%/lists" \ - "%%MAILMANDIR%%/archives" \ - "%%MAILMANDIR%%/archives/public" + "%%MAILMANDIR%%/tests/msgs" # this can be 2770 or 2771 but should not be stomped over test -d "%%MAILMANDIR%%/archives/private" \ || /usr/bin/install -m 02771 -g "%%GROUP%%" \ -d "%%MAILMANDIR%%/archives/private" /bin/chmod u+rwx,g+srwx "%%MAILMANDIR%%/archives/private" /bin/chmod u+rwx,g+srwx,o+rx "%%MAILMANDIR%%/logs" - /usr/bin/find "%%MAILMANDIR%%/messages" "%%MAILMANDIR%%/templates" -type d \ + if [ "NLS" = "%%NLS%%" ] ; then + /usr/bin/find "%%MAILMANDIR%%/messages" -type d \ + -exec chown "%%GROUP%%" '{}' + \ + -exec chmod 0755 '{}' + + fi + + /usr/bin/find "%%MAILMANDIR%%/templates" -type d \ -exec chmod 02775 '{}' + + + # if .sample files were not moved to destination... + # (pkg install --no-scripts) ... fix up + + # cp -n will not overwrite destination file, -p preserves permissions/owner etc. + /usr/bin/find "%%MAILMANDIR%%/templates" -type f -name '*.sample' \ + -exec /bin/sh -c 'f={};cp -np ${f} ${f%.sample}' \; + + test -s %%MAILMANDIR%%/Mailman/mm_cfg.py || cp -p %%MAILMANDIR%%/Mailman/mm_cfg.py.dist %%MAILMANDIR%%/Mailman/mm_cfg.py + + # This is subject to the EXAMPLES port option: + test -r ${PKG_PREFIX}/share/examples/mailman.newsyslog.sample && + cp -np ${PKG_PREFIX}/share/examples/mailman.newsyslog.sample \ + ${PKG_PREFIX}/etc/newsyslog.conf.d/mailman.conf echo "---> Running update" if test -r /var/tmp/last_mailman_version ; then mkdir -p "%%MAILMANDIR%%/data" mv -f /var/tmp/last_mailman_version "%%MAILMANDIR%%/data" fi LC_ALL=C "%%MAILMANDIR%%/bin/update" echo "---> Checking crontab(5) file for user \"%%USER%%\"" if [ -e /var/cron/allow ]; then grep -q "^%%USER%%\$" /var/cron/allow || \ printf '%s\n' "%%USER%%" >> /var/cron/allow fi if /usr/bin/crontab -u "%%USER%%" -l >"$MYTMP/crontab" ; then if test -s "$MYTMP/crontab" && ! cmp -s "$MYTMP/crontab" "%%MAILMANDIR%%/cron/crontab.in"; then echo "---> User \"%%USER%%\" already has a non-default crontab." echo "---> Not overwriting it." echo "---> Please review and merge any changes from the standard crontab file" echo "---> %%MAILMANDIR%%/cron/crontab.in" else echo "---> Installing crontab(5) file for user \"%%USER%%\"" /usr/bin/crontab -u "%%USER%%" "%%MAILMANDIR%%/cron/crontab.in" fi else echo "---> Installing crontab(5) file for user \"%%USER%%\"" /usr/bin/crontab -u "%%USER%%" "%%MAILMANDIR%%/cron/crontab.in" fi rm -f "$MYTMP/crontab" if check_rcfile_fix_perms ; then echo "---> Checking (and fixing) file and directory permissions" output="$("%%MAILMANDIR%%/bin/check_perms" -f 2>&1)" || : printf '%s\n' "$output" | egrep -v '^Re-run' || : else echo "---> rcfile sets mailman_fix_perms to no, skipping check_perms" fi # check if we need to add our hostname to the configuration: if cmp -s "%%MAILMANDIR%%/Mailman/mm_cfg.py" "%%MAILMANDIR%%/Mailman/mm_cfg.py.dist" \ || test "{'localhost': 'localhost'}" = "$(PYTHONPATH="%%MAILMANDIR%%/bin" "%%PYTHON_CMD%%" -c 'import paths;from Mailman import mm_cfg;_x=dict(mm_cfg.VIRTUAL_HOSTS);print repr(_x);')" then echo "---> adding default host configuration to %%MAILMANDIR%%/Mailman/mm_cfg.py." add_default_virtuals "%%MAILMANDIR%%/Mailman/mm_cfg.py" fi echo "---> Running assorted other checks" if egrep -q "^[ \t]*MTA.*=.*Postfix" "%%MAILMANDIR%%/Mailman/mm_cfg.py" ; then # run Postfix-specific checks POSTCONF=$(PATH="${PKG_PREFIX}/sbin:/usr/sbin:/sbin:$PATH" which postconf) if [ "x`${POSTCONF} -h myhostname`" != "xlocalhost" ] \ && ! egrep -q "^[ \t]*SMTPHOST.*=.*`${POSTCONF} -h myhostname`" \ "%%MAILMANDIR%%/Mailman/mm_cfg.py" then echo "" echo "Your Postfix hostname is non-default." echo -n "You must add \"SMTPHOST = '`${POSTCONF} -h myhostname`'" echo "\" to the bottom of mm_cfg.py (without quotes)." echo "" fi fi ;; ####### DEINSTALLATION PART ####### DEINSTALL) echo "---> Starting deinstall script" if /usr/bin/crontab -u "%%USER%%" -l | \ /usr/bin/diff -B -b - "%%MAILMANDIR%%/cron/crontab.in" >/dev/null 2>&1 ; then echo "---> Zeroing unchanged crontab for \"%%USER%%\"" /usr/bin/crontab -u "%%USER%%" -r /var/cron/allow.new$$ mv /var/cron/allow.new$$ /var/cron/allow fi else echo "---> Crontab for \"%%USER%%\" modified, not removed: please deinstall" echo "---> it manually if you no longer wish to use Mailman. E.g.:" echo "---> /usr/bin/crontab -u \"%%USER%%\" -r" fi echo "---> Preserving the \"last_mailman_version\" file" /bin/mv -f "%%MAILMANDIR%%/data/last_mailman_version" /var/tmp/ || : # If the errorlog is the only existing logfile, delete it. (If Mailman's # qrunner had not been running, then the process of trying to stop the # qrunner (above) will cause the errorlog to be written to. Hence, even if # the Mailman port/package is installed and immediately deinstalled, the # errorlog will exist.) if [ "`echo %%MAILMANDIR%%/logs/*`" = "%%MAILMANDIR%%/logs/error" ]; then echo "---> Deleting errorlog (It is the only existing logfile.)" /bin/rm -f "%%MAILMANDIR%%/logs/error" fi # attempt removal, but do not care if it is not empty /bin/rmdir "%%MAILMANDIR%%/archives/private/" 2>/dev/null || : # if configuration is unchanged, remove it explicitly, # @sample wouldn't work because we added our hostname cat "%%MAILMANDIR%%/Mailman/mm_cfg.py.dist" >"$MYTMP/mm_cfg.tmp" add_default_virtuals "$MYTMP/mm_cfg.tmp" if cmp -s "%%MAILMANDIR%%/Mailman/mm_cfg.py" "$MYTMP/mm_cfg.tmp" ; then echo "---> Removing default configuration file." rm -f "%%MAILMANDIR%%/Mailman/mm_cfg.py" fi ;; POST-DEINSTALL) echo "---> Starting post-deinstall script" set -- "%%MAILMANDIR%%/lists"/* if [ $# -gt 1 ] || [ "x$1" != "x%%MAILMANDIR%%/lists/*" ] ; then echo '---> %%MAILMANDIR%%/lists is not empty - this installation may have active lists! Listing max. 10:' find "%%MAILMANDIR%%/lists" -mindepth 1 -maxdepth 1 | head -n 10 || : echo "---> Restoring \"last_mailman_version\" file" if test -d "%%MAILMANDIR%%" ; then /bin/mkdir -p "%%MAILMANDIR%%/data" && \ /bin/mv -f /var/tmp/last_mailman_version "%%MAILMANDIR%%/data/" else /bin/rm -f /var/tmp/last_mailman_version fi fi ;; esac Index: head/mail/mailman/files/pkg-message.in =================================================================== --- head/mail/mailman/files/pkg-message.in (revision 531726) +++ head/mail/mailman/files/pkg-message.in (revision 531727) @@ -1,105 +1,84 @@ [ -{ type: install +{ message: </ and configure .namazurc. Refer to %%LOCALBASE%%/etc/namazu/namazurc.sample. -EOM -} -{ type: upgrade - message <