Date: Sat, 19 May 2007 12:40:38 +0200 (CEST) From: Jan Srzednicki <w@wrzask.pl> To: FreeBSD-gnats-submit@FreeBSD.org Cc: krion@FreeBSD.org, trasz@FreeBSD.org Subject: ports/112784: [PATCH] mail/exim: enable dovecot authenticator, some cleanups Message-ID: <20070519104038.E062C1710F@oak.pl> Resent-Message-ID: <200705191110.l4JBA6VH099995@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 112784 >Category: ports >Synopsis: [PATCH] mail/exim: enable dovecot authenticator, some cleanups >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat May 19 11:10:06 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Jan Srzednicki >Release: FreeBSD 6.1-RELEASE-p10 i386 >Organization: >Environment: System: FreeBSD oak.pl 6.1-RELEASE-p10 FreeBSD 6.1-RELEASE-p10 #9: Sun Nov 5 00:29:10 CET >Description: Since version 4.64 (IIRC) Exim supports connecting to dovecot's (ports/mail/dovecot) auth daemon for authentication. This support doesn't set up any new dependencies, the whole code is included in Exim's distribution pack, so enabling it requires only turning on an option in Exim configuration Makefile. So does this patch. Additionally, I have performed some minor port cleanups, to both get rid of some portlint warnings and to use the USE_RC_SUBR macro set correctly (port.*.mk do the thing automagically, no need to play with that manually). Added file(s): - files/exim.sh.in Removed file(s): - files/exim.sh Port maintainer (krion@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: --- exim-4.67.patch begins here --- diff -ruN --exclude=CVS /usr/ports/mail/exim/Makefile /srv/home/root/tmp/exim-new-port/Makefile --- /usr/ports/mail/exim/Makefile Sun Apr 29 14:38:21 2007 +++ /srv/home/root/tmp/exim-new-port/Makefile Sat May 19 12:20:16 2007 @@ -6,8 +6,7 @@ # PORTNAME= exim -PORTVERSION?= ${EXIM_VERSION} -PORTREVISION= 0 +PORTVERSION= ${EXIM_VERSION} CATEGORIES= mail ipv6 MASTER_SITES= ${MASTER_SITE_EXIM:S/$/:exim/} MASTER_SITE_SUBDIR= exim4/:exim @@ -17,7 +16,7 @@ EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= krion@FreeBSD.org -COMMENT?= High performance MTA for Unix systems on the Internet +COMMENT= High performance MTA for Unix systems on the Internet .include "options" @@ -187,6 +186,7 @@ #WITHOUT_PAM= yes #WITHOUT_AUTH_CRAM_MD5= yes #WITHOUT_AUTH_PLAINTEXT= yes +#WITHOUT_AUTH_DOVECOT= yes #WITHOUT_AUTH_SPA= yes # # Enable support for authenticating via the Cyrus SASL library @@ -395,6 +395,10 @@ SEDLIST+= -e 's,^\# (AUTH_PLAINTEXT=),\1,' .endif +.if !defined(WITHOUT_DOVECOT) +SEDLIST+= -e 's,^\# (AUTH_DOVECOT=),\1,' +.endif + .if !defined(WITHOUT_AUTH_SPA) SEDLIST+= -e 's,^\# (AUTH_SPA=),\1,' .endif @@ -542,35 +546,20 @@ SEDLIST+= -e 's,^\# (WITH_OLD_DEMIME=),\1,' .endif -.include <bsd.port.pre.mk> - -.if defined(EXIMON_ONLY) && ${MASTERDIR} == ${PKGDIR} -.error EXIMON_ONLY is not user settable -.endif - .if !defined(EXIMON_ONLY) && !defined(WITHOUT_DAEMON) -USE_RC_SUBR= yes -.if defined(WITH_RCORDER) && ${OSVERSION} >= 500037 -RC_DIR= /etc/rc.d -RC_SUFX= -PLIST_SUB+= RCORDER="" \ - RC_DIR=${RC_DIR} \ - RC_SUFX=${RC_SUFX} -.else -RC_DIR= ${PREFIX}/etc/rc.d -RC_SUFX= .sh -PLIST_SUB+= RCORDER="@comment " \ - RC_DIR="%D/etc/rc.d" \ - RC_SUFX=${RC_SUFX} -.endif -SED_SCRIPT+= -e 's,%%RC_SUBR%%,${RC_SUBR},g' \ - -e 's,%%RC_DIR%%,${RC_DIR},g' \ - -e 's,%%RC_SUFX%%,${RC_SUFX},g' +USE_RC_SUBR= exim.sh PLIST_SUB+= DAEMON="" +SUB_LIST+= LOGDIR="${LOGDIR}" .else PLIST_SUB+= DAEMON="@comment " .endif +.include <bsd.port.pre.mk> + +.if defined(EXIMON_ONLY) && ${MASTERDIR} == ${PKGDIR} +.error EXIMON_ONLY is not user settable +.endif + .if ${OSVERSION} < 400014 WITHOUT_IPV6= yes .endif @@ -625,7 +614,7 @@ @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} configure) post-build: -.for script in exim ${DAILY_SCRIPTS} +.for script in ${DAILY_SCRIPTS} @${SED} ${SED_SCRIPT} ${FILESDIR}/${script}.sh > ${WRKDIR}/${script}.sh .endfor @${SED} ${SED_SCRIPT} ${FILESDIR}/POST-INSTALL-NOTES > \ @@ -645,7 +634,6 @@ post-install: .if !defined(WITHOUT_DAEMON) - @${INSTALL_SCRIPT} ${WRKDIR}/exim.sh ${DESTDIR}${RC_DIR}/exim${RC_SUFX} @${MKDIR} ${DESTDIR}${PREFIX}/etc/periodic/daily .for script in ${DAILY_SCRIPTS} @${INSTALL_SCRIPT} ${WRKDIR}/${script}.sh ${DESTDIR}${PREFIX}/etc/periodic/daily/${script} diff -ruN --exclude=CVS /usr/ports/mail/exim/files/exim.sh /srv/home/root/tmp/exim-new-port/files/exim.sh --- /usr/ports/mail/exim/files/exim.sh Mon Feb 20 21:47:11 2006 +++ /srv/home/root/tmp/exim-new-port/files/exim.sh Thu Jan 1 01:00:00 1970 @@ -1,63 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/mail/exim/files/exim.sh,v 1.9 2006/02/20 20:47:11 dougb Exp $ -# - -# PROVIDE: mail -# REQUIRE: LOGIN -# KEYWORD: shutdown -# we make mail start late, so that things like .forward's are not -# processed until the system is fully operational - -# -# Add the following lines to /etc/rc.conf to enable exim: -# -#exim_enable="YES" -# -# See exim(8) for flags -# - -. %%RC_SUBR%% - -name=exim -rcvar=`set_rcvar` - -command=%%PREFIX%%/sbin/exim -pidfile=/var/run/exim.pid -required_dirs=%%LOGDIR%% -required_files=%%PREFIX%%/etc/exim/configure - -start_precmd=start_precmd -stop_postcmd=stop_postcmd - -extra_commands="reload" - -start_precmd() -{ - case $sendmail_enable in - [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) - warn "sendmail_enable should be set to NONE" - ;; - [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) - case $sendmail_submit_enable in - [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) - warn "sendmail_submit_enable should be set to NO" - ;; - esac - ;; - [Nn][Oo][Nn][Ee]) - ;; - esac -} - -stop_postcmd() -{ - rm -f $pidfile -} - -# read settings, set default values -load_rc_config $name -: ${exim_enable="NO"} -: ${exim_flags="-bd -q30m"} - -run_rc_command "$1" diff -ruN --exclude=CVS /usr/ports/mail/exim/files/exim.sh.in /srv/home/root/tmp/exim-new-port/files/exim.sh.in --- /usr/ports/mail/exim/files/exim.sh.in Thu Jan 1 01:00:00 1970 +++ /srv/home/root/tmp/exim-new-port/files/exim.sh.in Sun Feb 26 13:26:23 2006 @@ -0,0 +1,63 @@ +#!/bin/sh +# +# $FreeBSD: ports/mail/exim/files/exim.sh,v 1.9 2006/02/20 20:47:11 dougb Exp $ +# + +# PROVIDE: mail +# REQUIRE: LOGIN +# KEYWORD: shutdown +# we make mail start late, so that things like .forward's are not +# processed until the system is fully operational + +# +# Add the following lines to /etc/rc.conf to enable exim: +# +#exim_enable="YES" +# +# See exim(8) for flags +# + +. %%RC_SUBR%% + +name=exim +rcvar=`set_rcvar` + +command=%%PREFIX%%/sbin/exim +pidfile=/var/run/exim.pid +required_dirs=%%LOGDIR%% +required_files=%%PREFIX%%/etc/exim/configure + +start_precmd=start_precmd +stop_postcmd=stop_postcmd + +extra_commands="reload" + +start_precmd() +{ + case $sendmail_enable in + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + warn "sendmail_enable should be set to NONE" + ;; + [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) + case $sendmail_submit_enable in + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + warn "sendmail_submit_enable should be set to NO" + ;; + esac + ;; + [Nn][Oo][Nn][Ee]) + ;; + esac +} + +stop_postcmd() +{ + rm -f $pidfile +} + +# read settings, set default values +load_rc_config $name +: ${exim_enable="NO"} +: ${exim_flags="-bd -q30m"} + +run_rc_command "$1" diff -ruN --exclude=CVS /usr/ports/mail/exim/options /srv/home/root/tmp/exim-new-port/options --- /usr/ports/mail/exim/options Wed Apr 5 00:27:36 2006 +++ /srv/home/root/tmp/exim-new-port/options Sat May 19 11:14:30 2007 @@ -70,6 +70,7 @@ #WITH_PAM #WITH_AUTH_CRAM_MD5 #WITH_AUTH_PLAINTEXT +#WITH_AUTH_DOVECOT #WITH_AUTH_SPA # Built-in support for the PAM, RFC 2195, RFC 2595 and # Microsoft "Secure Password Authentication" authentication mechanisms, @@ -228,6 +229,9 @@ .endif .ifndef WITHOUT_AUTH_PLAINTEXT WITH_AUTH_PLAINTEXT?=yes +.endif +.ifndef WITHOUT_AUTH_DOVECOT +WITH_AUTH_DOVECOT?=yes .endif .ifndef WITHOUT_AUTH_SPA WITH_AUTH_SPA?=yes diff -ruN --exclude=CVS /usr/ports/mail/exim/pkg-plist /srv/home/root/tmp/exim-new-port/pkg-plist --- /usr/ports/mail/exim/pkg-plist Fri Mar 23 11:38:57 2007 +++ /srv/home/root/tmp/exim-new-port/pkg-plist Sat May 19 12:21:56 2007 @@ -1,5 +1,4 @@ @comment $FreeBSD: ports/mail/exim/pkg-plist,v 1.45 2007/03/23 10:38:57 krion Exp $ -%%DAEMON%%@unexec [ ! -f /var/run/exim.pid ] || %%RC_DIR%%/exim%%RC_SUFX%% stop || true sbin/exim sbin/exim-%%EXIM_VERSION%% sbin/exim_checkaccess @@ -36,7 +35,7 @@ %%PORTDOCS%%%%DOCSDIR%%/pcrepattern.txt %%PORTDOCS%%%%DOCSDIR%%/pcretest.txt %%PORTDOCS%%%%DOCSDIR%%/spec.txt -%%PORTDOCS%%@dirrmtry %%DOCSDIR%% +%%PORTDOCS%%@dirrm %%DOCSDIR%% %%PORTDOCS%%%%EXAMPLESDIR%%/convert4r3 %%PORTDOCS%%%%EXAMPLESDIR%%/convert4r4 %%PORTDOCS%%%%EXAMPLESDIR%%/pcretest @@ -52,7 +51,5 @@ %%SA_EXIM%%@unexec if cmp -s %D/etc/exim/sa-exim.conf %D/etc/exim/sa-exim.conf.default; then rm -f %D/etc/exim/sa-exim.conf; fi %%SA_EXIM%%etc/exim/sa-exim.conf.default %%SA_EXIM%%@exec [ -f %B/sa-exim.conf ] || cp %B/%f %B/sa-exim.conf -@unexec rmdir %B 2>/dev/null || true -%%DAEMON%%%%RCORDER%%@cwd / -%%DAEMON%%etc/rc.d/exim%%RC_SUFX%% +@dirrmtry %B @dirrmtry %%LOGDIR%% --- exim-4.67.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070519104038.E062C1710F>