Index: Makefile =================================================================== RCS file: /exports/cvsroot-freebsd/ports/mail/mailman/Makefile,v retrieving revision 1.90 diff -u -r1.90 Makefile --- Makefile 15 Jun 2011 17:06:18 -0000 1.90 +++ Makefile 18 Jun 2011 12:50:47 -0000 @@ -27,13 +27,15 @@ HTDIG "htdig integration patches" off \ NAMAZU2 "make private archives searchable with namazu2" off -HAS_CONFIGURE= yes +USE_AUTOTOOLS= autoconf +GNU_CONFIGURE_PREFIX= ${MAILMANDIR} USE_PYTHON= yes MAKE_JOBS_SAFE= yes -CONFIGURE_ARGS+= --prefix=${MAILMANDIR} --with-python=${PYTHON_CMD} \ +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-mail-gid=${MAIL_GID} --with-cgi-gid=${CGI_GID} \ + --with-permcheck=no SUB_FILES= pkg-message SUB_LIST+= MAILMANDIR=${MAILMANDIR} USE_RC_SUBR= mailman @@ -51,6 +53,9 @@ # # End of user-configurable variables. +USERS= ${MM_USERNAME} +GROUPS= ${MM_GROUPNAME} + MAILMANDIR= ${PREFIX}/${MM_DIR} PKGINSTALL= ${WRKDIR}/pkg-install PKGDEINSTALL= ${WRKDIR}/pkg-deinstall @@ -69,7 +74,7 @@ .if defined(WITH_SENDMAIL) .if defined(WITH_EXIM3) || defined(WITH_EXIM4) || defined(WITH_POSTFIX) || \ defined(WITH_COURIER) -BROKEN= choose only one MTA integration +IGNORE= can only have one MTA selected to integrate with .endif MAIL_GID?= mailnull .endif @@ -77,7 +82,7 @@ .if defined(WITH_EXIM3) .if defined(WITH_SENDMAIL) || defined(WITH_EXIM4) || defined(WITH_POSTFIX) || \ defined(WITH_COURIER) -BROKEN= choose only one MTA integration +IGNORE= can only have one MTA selected to integrate with .endif MAIL_GID?= nobody .endif @@ -85,7 +90,7 @@ .if defined(WITH_EXIM4) .if defined(WITH_SENDMAIL) || defined(WITH_EXIM3) || defined(WITH_POSTFIX) || \ defined(WITH_COURIER) -BROKEN= choose only one MTA integration +IGNORE= can only have one MTA selected to integrate with .endif MAIL_GID?= mail .endif @@ -93,16 +98,16 @@ .if defined(WITH_POSTFIX) .if defined(WITH_SENDMAIL) || defined(WITH_EXIM3) || defined(WITH_EXIM4) || \ defined(WITH_COURIER) -BROKEN= choose only one MTA integration +IGNORE= can only have one MTA selected to integrate with .endif -MAIL_GID?= mailman +MAIL_GID?= nobody EXTRA_PATCHES+= ${FILESDIR}/postfix-verp.diff .endif .if defined(WITH_COURIER) .if defined(WITH_SENDMAIL) || defined(WITH_EXIM3) || defined(WITH_EXIM4) || \ defined(WITH_POSTFIX) -BROKEN= choose only one MTA integration +IGNORE= can only have one MTA selected to integrate with .endif MAIL_GID?= courier .endif @@ -149,29 +154,14 @@ post-patch: @${REINPLACE_CMD} -e 's#%%LOCALBASE%%#${LOCALBASE}#g' \ ${WRKSRC}/Mailman/Defaults.py.in - -pre-configure:: -# Mailman's configure script needs the "mailman" user/group to exist, so -# $PKGINSTALL has to be patched before the do-configure target executes. @${SED} \ - -e 's#%%USER%%#${MM_USERNAME}#g' -e 's#%%UID%%#${MM_USERID}#g' \ - -e 's#%%GROUP%%#${MM_GROUPNAME}#g' -e 's#%%GID%%#${MM_GROUPID}#g' \ - -e 's#%%MAILMANDIR%%#${MAILMANDIR}#g' ${MASTERDIR}/pkg-install > \ - ${PKGINSTALL} - @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - -post-configure: + -e 's#%%USER%%#${MM_USERNAME}#g' \ + -e 's#%%MAILMANDIR%%#${MAILMANDIR}#g' \ + ${MASTERDIR}/pkg-install > ${PKGINSTALL} @${SED} \ -e 's#%%USER%%#${MM_USERNAME}#g' -e 's#%%GROUP%%#${MM_GROUPNAME}#g' \ -e 's#%%PREFIX%%#${PREFIX}#g' -e 's#%%MAILMANDIR%%#${MAILMANDIR}#g' \ ${MASTERDIR}/pkg-deinstall > ${PKGDEINSTALL} -# port system auditors complain if dir is created prior to install -# but configure demands it be there. we delete it now if empty, -# so it will be re-created. For existing installs, this is ignored - @- ${RMDIR} ${MAILMANDIR} 2> /dev/null - -pre-install: - @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL post-install: @${RM} -f ${MAILMANDIR}/pythonlib/*.egg-info Index: pkg-deinstall =================================================================== RCS file: /exports/cvsroot-freebsd/ports/mail/mailman/pkg-deinstall,v retrieving revision 1.13 diff -u -r1.13 pkg-deinstall --- pkg-deinstall 15 Jun 2011 17:06:18 -0000 1.13 +++ pkg-deinstall 18 Jun 2011 12:50:47 -0000 @@ -23,10 +23,6 @@ echo "---> /usr/bin/crontab -u "%%USER%%" -r" fi - echo "---> Stopping Mailman's qrunner daemon" - %%PREFIX%%/etc/rc.d/mailman.sh stop >/dev/null 2>&1 - /bin/sleep 2 - echo "---> Preserving the \"last_mailman_version\" file" /bin/cp -f %%MAILMANDIR%%/data/last_mailman_version /var/tmp/ @@ -51,10 +47,6 @@ /bin/mv -f /var/tmp/last_mailman_version %%MAILMANDIR%%/data/ fi - echo '---> - If you are not using Mailman any more, you should manually delete' - echo '---> - the "%%USER%%" user and "%%GROUP%%" group.' - echo '---> - You may delete them with "pw groupdel %%GROUP%%; pw userdel %%USER%%".' - ;; esac Index: pkg-install =================================================================== RCS file: /exports/cvsroot-freebsd/ports/mail/mailman/pkg-install,v retrieving revision 1.10 diff -u -r1.10 pkg-install --- pkg-install 15 Jun 2011 17:06:18 -0000 1.10 +++ pkg-install 18 Jun 2011 12:50:47 -0000 @@ -6,49 +6,11 @@ case $2 in -PRE-INSTALL) - echo "---> Starting install script:" - - if [ -z "%%MAILMANDIR%%" -o \ - -z "%%USER%%" -o -z "%%GROUP%%" -o \ - -z "%%UID%%" -o -z "%%GID%%" ]; then - echo "ERROR: A required pragma was empty" - exit 1 - fi - - # Create group if required - if pw group show "%%GROUP%%" >/dev/null 2>&1; then - echo "---> Using existing group \"%%GROUP%%\"" - else - echo "---> Adding group \"%%GROUP%%\" (%%GID%%)" - /usr/sbin/pw groupadd %%GROUP%% -g %%GID%% || exit 1 - fi - - # Create user if required - if pw user show "%%USER%%" >/dev/null 2>&1; then - echo "---> Using existing user \"%%USER%%\"" - else - echo "---> Adding user \"%%USER%%\" (%%UID%%)" - pw useradd "%%USER%%" -u "%%UID%%" -g "%%GROUP%%" -h - \ - -d "%%MAILMANDIR%%" -s "/sbin/nologin" -c "Mailman Owner" || exit 1 - fi - - # Create home directory if required - if [ -d "%%MAILMANDIR%%" ]; then - echo "---> Using existing Mailman directory (%%MAILMANDIR%%)" - echo " (There may be existing active mailing lists - this installation will" - echo " attempt to preserve them.)" - else - echo "---> Creating Mailman directory (%%MAILMANDIR%%)" - (umask 002 && /bin/mkdir -p "%%MAILMANDIR%%") || exit 1 - /usr/sbin/chown -R "%%USER%%:%%GROUP%%" "%%MAILMANDIR%%" || exit 1 - /bin/chmod g+s "%%MAILMANDIR%%" || exit 1 - fi - ;; - POST-INSTALL) echo "---> Starting post-install script:" + /bin/chmod g+s "%%MAILMANDIR%%" || exit 1 + echo "---> Checking crontab(5) file for user \"%%USER%%\"" if [ -e /var/cron/allow ]; then Index: pkg-plist =================================================================== RCS file: /exports/cvsroot-freebsd/ports/mail/mailman/pkg-plist,v retrieving revision 1.42 diff -u -r1.42 pkg-plist --- pkg-plist 15 Jun 2011 17:06:18 -0000 1.42 +++ pkg-plist 18 Jun 2011 12:50:47 -0000 @@ -1,4 +1,5 @@ @comment $FreeBSD: ports/mail/mailman/pkg-plist,v 1.42 2011/06/15 17:06:18 crees Exp $ +@stopdaemon mailman @unexec if cmp -s %D/%%MMDIR%%/Mailman/mm_cfg.py %D/%%MMDIR%%/Mailman/mm_cfg.py.dist; then rm -f %D/%%MMDIR%%/Mailman/mm_cfg.py; fi @unexec rm -f %D/%%MMDIR%%/Mailman/mm_cfg.pyc @exec mkdir -p %D/%%MMDIR%%/archives Index: files/patch-configure-in =================================================================== RCS file: files/patch-configure-in diff -N files/patch-configure-in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-configure-in 18 Jun 2011 12:50:47 -0000 @@ -0,0 +1,70 @@ + +$FreeBSD$ + +Mailman tests for existence of users during configure -- unfortunately +this creates a problem; we create the users just before install. + +We remove the testing part. + +--- configure.in.bak 2010-09-20 19:18:27.000000000 +0100 ++++ configure.in 2011-06-14 20:20:29.209438957 +0100 +@@ -311,28 +311,7 @@ + # $2 == user id to check for + AC_SUBST($1) + changequote(,) +-if test -z "$$1" +-then +- cat > conftest.py < conftest.py <