pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: postfix dovecot-sasl option



On Wed, Jan 16, 2008 at 02:45:53PM +0100, Geert Hendrickx wrote:
> The "dovecot-sasl" option for pkgsrc/mail/postfix enables xsasl_dovecot
> code in Postfix and drags in mail/dovecot as a dependency.  May I suggest
> to remove this option and build with -DDEF_SERVER_SASL_TYPE="dovecot" by
> default?


That should be with -DUSE_CYRUS_SASL.  -DDEF_SERVER_SASL_TYPE merely changes
the default value for "smtpd_sasl_type".

I'd add -DDEF_SERVER_SASL_TYPE=dovecot only when cyrus sasl is not selected,
to maintain backwards compatibility for both dovecot and cyrus SASL users if
they didn't explicitly set smtpd_sasl_type in their main.cf (this will only
affect users that built with both and didn't make an explicit choice in their
configuration, I think we can ignore this case).  See the patch in attachment.

        Geert


> 
> 
> Motivations:
> 
> - the code is in the Postfix distribution itself and does not depend on
>   dovecot at all for building, hence it is stupid to "have to" rebuild
>   Postfix when rebuilding dovecot.
> 
> - this makes a default pkgsrc-built Postfix more resemble a NetBSD-shipped
>   Postfix (which builds with dovecot SASL enabled).
> 
> 
>       Geert
> 
> 
Index: mail/postfix/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/postfix/Makefile,v
retrieving revision 1.211
diff -u -r1.211 Makefile
--- mail/postfix/Makefile       2 Dec 2007 02:17:24 -0000       1.211
+++ mail/postfix/Makefile       16 Jan 2008 14:12:07 -0000
@@ -30,7 +30,7 @@
 # CCARGS is a list of options to pass to the preprocessor/compiler.
 # AUXLIBS is a list of options to pass to the linker.
 #
-CCARGS=                # empty
+CCARGS=                -DUSE_SASL_AUTH
 AUXLIBS=       ${LDFLAGS}
 FIX_RPATH+=    AUXLIBS
 
Index: mail/postfix/options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mail/postfix/options.mk,v
retrieving revision 1.26
diff -u -r1.26 options.mk
--- mail/postfix/options.mk     14 Jan 2008 13:29:25 -0000      1.26
+++ mail/postfix/options.mk     16 Jan 2008 14:12:07 -0000
@@ -3,7 +3,7 @@
 # Global and legacy options
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.postfix
-PKG_SUPPORTED_OPTIONS= bdb ldap mysql mysql4 pcre pgsql sasl tls dovecot-sasl 
postfix-stress
+PKG_SUPPORTED_OPTIONS= bdb ldap mysql mysql4 pcre pgsql sasl tls postfix-stress
 PKG_SUGGESTED_OPTIONS= tls
 
 .include "../../mk/bsd.options.mk"
@@ -83,14 +83,15 @@
 .endif
 
 ###
-### SASL support for SMTP authentication.
+### Cyrus SASL support for SMTP authentication.
+### (Dovcot SASL support is built in by default.)
 ###
 .if !empty(PKG_OPTIONS:Msasl)
 .  include "../../security/cyrus-sasl/buildlink3.mk"
 BUILDLINK_INCDIRS.cyrus-sasl=  include/sasl
 SASLLIBDIR=    ${PREFIX}/lib/sasl2
 PWCHECK_METHOD=        auxprop
-CCARGS+=       -DUSE_SASL_AUTH -DUSE_CYRUS_SASL
+CCARGS+=       -DUSE_CYRUS_SASL
 AUXLIBS+=      -L${BUILDLINK_PREFIX.cyrus-sasl}/lib                    \
                ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
                -lsasl2
@@ -100,15 +101,7 @@
 MESSAGE_SUBST+=        SASLLIBDIR=${SASLLIBDIR}
 .else
 PLIST_SUBST+=  SASL="@comment "
-.endif
-
-###
-### SASL support for SMTP authentication (via Dovecot).
-###
-.if !empty(PKG_OPTIONS:Mdovecot-sasl)
-DEPENDS+=      dovecot-[0-9]*:../../mail/dovecot
-
-CCARGS+=       -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\"
+CCARGS+=       -DDEF_SERVER_SASL_TYPE=\"dovecot\"
 .endif
 
 ###
Index: mail/postfix-current/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/postfix-current/Makefile,v
retrieving revision 1.87
diff -u -r1.87 Makefile
--- mail/postfix-current/Makefile       30 Oct 2007 19:31:40 -0000      1.87
+++ mail/postfix-current/Makefile       16 Jan 2008 14:12:07 -0000
@@ -30,7 +30,7 @@
 # CCARGS is a list of options to pass to the preprocessor/compiler.
 # AUXLIBS is a list of options to pass to the linker.
 #
-CCARGS=                # empty
+CCARGS=                -DUSE_SASL_AUTH
 AUXLIBS=       ${LDFLAGS}
 FIX_RPATH+=    AUXLIBS
 
Index: mail/postfix-current/options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mail/postfix-current/options.mk,v
retrieving revision 1.16
diff -u -r1.16 options.mk
--- mail/postfix-current/options.mk     29 Apr 2007 19:27:36 -0000      1.16
+++ mail/postfix-current/options.mk     16 Jan 2008 14:12:07 -0000
@@ -3,7 +3,7 @@
 # Global and legacy options
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.postfix
-PKG_SUPPORTED_OPTIONS= bdb ldap mysql mysql4 pcre pgsql sasl tls dovecot-sasl
+PKG_SUPPORTED_OPTIONS= bdb ldap mysql mysql4 pcre pgsql sasl tls
 PKG_SUGGESTED_OPTIONS= tls
 
 .include "../../mk/bsd.options.mk"
@@ -83,7 +83,8 @@
 .endif
 
 ###
-### SASL support for SMTP authentication.
+### Cyrus SASL support for SMTP authentication.
+### (Dovcot SASL support is built in by default.)
 ###
 .if !empty(PKG_OPTIONS:Msasl)
 .  include "../../security/cyrus-sasl/buildlink3.mk"
@@ -100,13 +101,5 @@
 MESSAGE_SUBST+=        SASLLIBDIR=${SASLLIBDIR}
 .else
 PLIST_SUBST+=  SASL="@comment "
-.endif
-
-###
-### SASL support for SMTP authentication (via Dovecot).
-###
-.if !empty(PKG_OPTIONS:Mdovecot-sasl)
-DEPENDS+=      dovecot-[0-9]*:../../mail/dovecot
-
-CCARGS+=       -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\"
+CCARGS+=       -DDEF_SERVER_SASL_TYPE=\"dovecot\"
 .endif


Home | Main Index | Thread Index | Old Index