Date: Sun, 6 Jan 2002 02:42:35 -0600 (CST) From: "Scot W. Hetzel" <hetzels@westbend.net> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/33603: Update to cyrus-sasl 1.5.27 Message-ID: <200201060842.g068gZR28862@mail.westbend.net>
next in thread | raw e-mail | index | archive | help
>Number: 33603 >Category: ports >Synopsis: Update to cyrus-sasl 1.5.27 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sun Jan 06 00:50:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Scot W. Hetzel >Release: FreeBSD 4.5-PRERELEASE i386 >Organization: West Bend Internet >Environment: System: FreeBSD mail.westbend.net 4.5-PRERELEASE FreeBSD 4.5-PRERELEASE #3: Sun Dec 30 14:14:21 CST 2001 root@wbiW009.westbend.net:/usr/obj/usr/src/sys/GENERIC-SMP i386 >Description: The attached patch updates the cyrus-sasl port to version 1.5.27. Additional changes: - Moved Java config variables to scripts/configure.sasl (still disabled) - Added SASL APOP patch from Ken Murchison - Changed LDAP/MySQL patch to version maintained at Cyrus-Utils (cyrus-utils.sourceforge.com) (this removes patch-ag thru patch-ak). - Changed initialization of sasldb file The port was using touch to create a 0 byte sasldb file. When saslpasswd created a user in the sasldb file, it would cause a "Segmentation fault" the first time saslpasswd was used (this wasn't a fatal error, as the user was created in the sasldb file). The port now creates a user with saslpasswd and then deletes that user (Only if the sasldb file doesn't exist). The port needs to do this so that it can set the proper permissions on the sasldb file. - sasldb file removed on uninstallation, only if no users are in the file ( [ `/usr/local/sbin/sasldblistusers | wc -l` -eq 0 ] ). - Removed the ipv6 patch, due to no version is available for 1.5.27. NOTE: This also fixes the problem where 1.5.24 would not build with the Latest DB3 port. >How-To-Repeat: >Fix: Changed Files: Makefile distinfo pkg-deinstall pkg-install pkg-message pkg-plist files/patch-ab scripts/configure.sasl Removed Files: files/patch-ag files/patch-ah files/patch-ai files/patch-aj files/patch-ak files/patch-lib::common.c Index: Makefile =================================================================== RCS file: /home/ncvs/ports/security/cyrus-sasl/Makefile,v retrieving revision 1.32 diff -u -r1.32 Makefile --- Makefile 24 Dec 2001 21:58:42 -0000 1.32 +++ Makefile 5 Jan 2002 23:55:42 -0000 @@ -6,15 +6,25 @@ # PORTNAME= cyrus-sasl -PORTVERSION= 1.5.24 -PORTREVISION= 8 +PORTVERSION= 1.5.27 +PORTREVISION= 0 CATEGORIES= security -MASTER_SITES= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/%SUBDIR% \ +MASTER_SITES= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/%SUBDIR%/ \ + http://prdownloads.sourceforge.net/cyrus-utils/ \ + http://www.surf.org.uk/downloads/ \ + ftp://ftp.westbend.net/pub/cyrus-mail/%SUBDIR%/ \ + ${MASTER_SITE_SOURCEFORGE} \ ftp://ftp.hanse.de/sites/transit/mirror/ftp.andrew.cmu.edu/pub/cyrus-mail/ -MASTER_SITE_SUBDIR= ./ OLD-VERSIONS/sasl/ +MASTER_SITE_SUBDIR= . OLD-VERSIONS/sasl cyrus-utils -PATCH_SITES= http://www.imasy.or.jp/~ume/ipv6/ -PATCHFILES= ${DISTNAME}-ipv6-20010321.diff.gz +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ + sasl-${PORTVERSION}-ldap-ssl-filter-mysql-patch3.tgz + +PATCH_SITES= ftp://ftp.westbend.net/pub/cyrus-mail/contrib/ +PATCHFILES= sasl_apop_patch.gz + +#PATCH_SITES= http://www.imasy.or.jp/~ume/ipv6/ +#PATCHFILES= ${DISTNAME}-ipv6-${IPV6_VER}.diff.gz MAINTAINER= hetzels@westbend.net @@ -22,6 +32,8 @@ INSTALLS_SHLIB= yes +IPV6_VER= 20010321 + MAN3= sasl.3 sasl_authorize_t.3 sasl_callbacks.3 sasl_checkpass.3 \ sasl_client_init.3 sasl_client_new.3 sasl_client_start.3 \ sasl_client_step.3 sasl_decode.3 sasl_done.3 sasl_encode.3 \ @@ -43,32 +55,22 @@ --enable-static \ --enable-login \ --with-pwcheck=/var/pwcheck \ - --with-dblib=ndbm \ --with-rc4=openssl SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ PREFIX="${PREFIX}" \ TOUCH="${TOUCH}" \ MKDIR="${MKDIR}" \ - ENABLE_DB3="${ENABLE_DB3}" \ - ENABLE_MYSQL="${ENABLE_MYSQL}" \ - ENABLE_LDAP="${ENABLE_LDAP}" - -# ENABLE_* variables can be used by depending ports to enable options. + REALCURDIR="${.CURDIR}" \ + WITH_DB3="${WITH_DB3}" \ + WITH_JAVA="${WITH_JAVA}" \ + WITH_MYSQL="${WITH_MYSQL}" \ + WITH_LDAP1="${WITH_LDAP1}" \ + WITH_LDAP2="${WITH_LDAP2}" # JavaSASL needs someone to look at to get it to build -#JAVADIR= jdk1.1.8 -#JAVALIBDIR= ${PREFIX}/${JAVADIR}/lib/i386/green_threads/ - -#.if defined(USE_JAVA) || exists(${LOCALBASE}/${JAVADIR}/bin/java) -#BUILD_DEPENDS= ${LOCALBASE}/${JAVADIR}/bin/java:${PORTSDIR}/java/jdk -#CONFIGURE_ARGS+= --with-java \ -# --with-javabase=${LOCALBASE}/include -# -#CONFIGURE_ENV= JAVAC="${LOCALBASE}/${JAVADIR}/bin/javac" \ -# JAVAH="${LOCALBASE}/${JAVADIR}/bin/javah" \ -# JAVADOC="${LOCALBASE}/${JAVADIR}/bin/javadoc" -#.endif +JAVADIR= jdk1.1.8 +JAVALIBDIR= ${PREFIX}/${JAVADIR}/lib/i386/green_threads/ .if defined(KRB5_HOME) && exists(${KRB5_HOME}) CONFIGURE_ARGS+= --enable-gssapi=${KRB5_HOME} @@ -92,18 +94,13 @@ DOCS= AUTHORS COPYING ChangeLog INSTALL NEWS README TODO -DOC2= draft-leach-digest-sasl-05.txt \ - draft-newman-auth-scram-03.txt \ - rfc1321.txt rfc2095.txt rfc2104.txt \ - rfc2222.txt rfc2245.txt - -HTDOCS= gssapi index programming sysadmin - PLIST_SUB= PREFIX=${PREFIX} \ GSSAPI=${GSSAPI} \ EBONES=${EBONES} \ DOCSDIR=${DOCSDIR:S/^${PREFIX}\///} \ +LDAP_MYSQL_PATCH= ldap-mysql_sasl/sasl-ldap+mysql.patch + PKGDEINSTALL= ${WRKDIR}/pkg-deinstall PKGINSTALL= ${WRKDIR}/pkg-install PKGMESSAGE= ${WRKDIR}/pkg-message @@ -111,6 +108,14 @@ pre-fetch: @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.sasl +.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) +.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" +.endif + +pre-patch: + @(cd ${WRKSRC} && ${PATCH} -p1 < ${WRKDIR}/${LDAP_MYSQL_PATCH} && \ + ${MV} configure.orig configure) + # Fix sasldb name in pkg-install/deinstall scripts post-patch: @${SED} -e "/%%SASLDB%%/s##${SASLDB_NAME}#g" \ @@ -119,8 +124,11 @@ ${.CURDIR}/pkg-deinstall > ${PKGDEINSTALL} @${SED} -e "/%%SASLDB%%/s##${SASLDB_NAME}#g" \ -e "/%%PREFIX%%/s##${PREFIX}#g" \ - -e "/%%DOCSDIR%%/s##${DOCSDIR}#g" \ ${.CURDIR}/pkg-message > ${PKGMESSAGE} +.ifdef LDAP_MYSQL_MSG + @${ECHO} ${LDAP_MYSQL_MSG} | /usr/bin/fmt -w 67 >> ${PKGMESSAGE} + @${ECHO} >> ${PKGMESSAGE} +.endif pre-configure: @(cd ${WRKSRC} && ${AUTOHEADER}) @@ -134,19 +142,16 @@ > ${PREFIX}/etc/rc.d/pwcheck.sh @${CHMOD} 755 ${PREFIX}/etc/rc.d/pwcheck.sh ${INSTALL} -d -m 770 -o cyrus -g cyrus /var/pwcheck - @${LN} ${PREFIX}/sbin/pwcheck ${PREFIX}/sbin/pwcheck_pwnam .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} .for file in ${DOCS} @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR} .endfor -.for file in ${DOC2} - @${INSTALL_DATA} ${WRKSRC}/doc/${file} ${DOCSDIR} -.endfor + (cd ${WRKSRC}/doc ; \ + for file in `make -V EXTRA_DIST` ; do \ + ${INSTALL_DATA} ${WRKSRC}/doc/$${file} ${DOCSDIR} ; \ + done) @${INSTALL_DATA} ${FILESDIR}/Sendmail.README ${DOCSDIR} -.for file in ${HTDOCS} - @${INSTALL_DATA} ${WRKSRC}/doc/${file}.html ${DOCSDIR} -.endfor .endif @PKG_PREFIX=${PREFIX} BATCH=${BATCH} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${CAT} ${PKGMESSAGE} @@ -154,8 +159,8 @@ post-clean: @${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc -.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) -.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" -.endif +#if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) +#include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" +#endif .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /home/ncvs/ports/security/cyrus-sasl/distinfo,v retrieving revision 1.6 diff -u -r1.6 distinfo --- distinfo 13 Aug 2001 04:01:25 -0000 1.6 +++ distinfo 5 Jan 2002 22:07:23 -0000 @@ -1,2 +1,3 @@ -MD5 (cyrus-sasl-1.5.24.tar.gz) = ac3837c071c258b80021325936db2583 -MD5 (cyrus-sasl-1.5.24-ipv6-20010321.diff.gz) = a306953c91d9fbf2f4676ef394b38449 +MD5 (cyrus-sasl-1.5.27.tar.gz) = 76ea426e2e2da3b8d2e3a43af5488f3b +MD5 (sasl-1.5.27-ldap-ssl-filter-mysql-patch3.tgz) = 19e6783c1f4095e265648d26c4679544 +MD5 (sasl_apop_patch.gz) = 6bf7a34b73d1c8d139d2269069d1ba4c Index: pkg-deinstall =================================================================== RCS file: /home/ncvs/ports/security/cyrus-sasl/pkg-deinstall,v retrieving revision 1.2 diff -u -r1.2 pkg-deinstall --- pkg-deinstall 20 Dec 2001 12:18:57 -0000 1.2 +++ pkg-deinstall 22 Dec 2001 17:49:38 -0000 @@ -15,7 +15,13 @@ # delete sasldb database delete_sasldb() { - [ -f ${SASLDB_NAME} -a ! -s ${SASLDB_NAME} ] && rm ${SASLDB_NAME} + if [ -f ${SASLDB_NAME} ] ; then + if [ `${PKG_PREFIX}/sbin/sasldblistusers | wc -l` -eq 0 ] ; then + rm ${SASLDB_NAME} + else + echo "WARNING: Users SASL passwords are in ${SASLDB_NAME}, keeping this file" + fi + fi } # This should really be uninstalled by Sendmail Index: pkg-install =================================================================== RCS file: /home/ncvs/ports/security/cyrus-sasl/pkg-install,v retrieving revision 1.5 diff -u -r1.5 pkg-install --- pkg-install 20 Dec 2001 12:18:57 -0000 1.5 +++ pkg-install 5 Jan 2002 20:03:11 -0000 @@ -73,7 +73,8 @@ create_sasldb() { if [ ! -f ${SASLDB_NAME} ]; then - touch ${SASLDB_NAME} + echo "test" | ${PKG_PREFIX}/sbin/saslpasswd -p -c cyrus + ${PKG_PREFIX}/sbin/saslpasswd -d cyrus chown cyrus:mail ${SASLDB_NAME} chmod 640 ${SASLDB_NAME} fi Index: pkg-message =================================================================== RCS file: /home/ncvs/ports/security/cyrus-sasl/pkg-message,v retrieving revision 1.3 diff -u -r1.3 pkg-message --- pkg-message 20 Dec 2001 12:18:57 -0000 1.3 +++ pkg-message 5 Jan 2002 22:56:28 -0000 @@ -1,15 +1,12 @@ -%%PREFIX%%/etc/%%SASLDB%% now needs to be created -before applications that depend on SASL are used. - su cyrus - %%PREFIX%%/sbin/saslpasswd -c userid - -You will also need to start the pwcheck daemon: +You may need to start the pwcheck daemon for authentication with +the system password files: %%PREFIX%%/etc/rc.d/pwcheck.sh start -Read the documentation in %%DOCSDIR%% +or you can use sasldb for authentication, to add users use: + + saslpasswd -c username How to enable SMTP AUTH with system Sendmail 8.11 - Sendmail.README -How to use LDAP or MySQL for passwords - see html/sysadmin.html Index: pkg-plist =================================================================== RCS file: /home/ncvs/ports/security/cyrus-sasl/pkg-plist,v retrieving revision 1.11 diff -u -r1.11 pkg-plist --- pkg-plist 20 Dec 2001 12:18:57 -0000 1.11 +++ pkg-plist 5 Jan 2002 20:02:04 -0000 @@ -33,9 +33,7 @@ lib/sasl/libplain.so.1 sbin/sasldblistusers sbin/saslpasswd -sbin/pwcheck_pwnam -@exec ln %D/sbin/pwcheck_pwnam %D/sbin/pwcheck -@unexec rm -f %D/sbin/pwcheck +sbin/pwcheck %%PORTDOCS%%%%DOCSDIR%%/AUTHORS %%PORTDOCS%%%%DOCSDIR%%/COPYING %%PORTDOCS%%%%DOCSDIR%%/ChangeLog @@ -44,13 +42,13 @@ %%PORTDOCS%%%%DOCSDIR%%/README %%PORTDOCS%%%%DOCSDIR%%/Sendmail.README %%PORTDOCS%%%%DOCSDIR%%/TODO -%%PORTDOCS%%%%DOCSDIR%%/draft-leach-digest-sasl-05.txt %%PORTDOCS%%%%DOCSDIR%%/draft-newman-auth-scram-03.txt %%PORTDOCS%%%%DOCSDIR%%/rfc1321.txt %%PORTDOCS%%%%DOCSDIR%%/rfc2095.txt %%PORTDOCS%%%%DOCSDIR%%/rfc2104.txt %%PORTDOCS%%%%DOCSDIR%%/rfc2222.txt %%PORTDOCS%%%%DOCSDIR%%/rfc2245.txt +%%PORTDOCS%%%%DOCSDIR%%/rfc2831.txt %%PORTDOCS%%%%DOCSDIR%%/gssapi.html %%PORTDOCS%%%%DOCSDIR%%/index.html %%PORTDOCS%%%%DOCSDIR%%/programming.html Index: files/patch-ab =================================================================== RCS file: /home/ncvs/ports/security/cyrus-sasl/files/patch-ab,v retrieving revision 1.10 diff -u -r1.10 patch-ab --- files/patch-ab 17 Nov 2000 15:06:24 -0000 1.10 +++ files/patch-ab 27 Nov 2001 18:55:40 -0000 @@ -1,5 +1,5 @@ ---- configure.in.orig Thu Jul 20 21:35:01 2000 -+++ configure.in Thu Nov 16 09:07:00 2000 +--- configure.in.orig Tue Nov 27 11:45:28 2001 ++++ configure.in Tue Nov 27 12:49:28 2001 @@ -66,8 +66,9 @@ dnl check for -R, etc. switch CMU_GUESS_RUNPATH_SWITCH @@ -12,126 +12,17 @@ AM_DISABLE_STATIC -@@ -232,6 +233,13 @@ +@@ -235,6 +236,13 @@ + berkeley) SASL_DB_BACKEND="db_${dblib}.lo" AC_DEFINE(SASL_BERKELEYDB) - SASL_DB_LIB="-ldb" + for db3loc in ${prefix} /usr/local /usr + do + if test -d ${db3loc}/include/db3; then -+ CPPFLAGS="-I${db3loc}/include/db3 $CPPFLAGS" -+ break ++ CPPFLAGS="-I${db3loc}/include/db3 $CPPFLAGS" ++ break + fi + done ;; *) AC_MSG_WARN([Disabling SASL authentication database support]) -@@ -310,6 +318,88 @@ - fi - AM_CONDITIONAL(PWCHECK, test "$with_pwcheck" != no) - -+dnl MySQL -+AC_ARG_WITH(mysql, [ --with-mysql=PATH enable authentication from MySQL database [no] ], -+ with_mysql=$withval, -+ with_mysql=no) -+ -+if test -z "$with_mysql"; then -+ for mysqlloc in lib/mysql lib -+ do -+ if test -f ${prefix}/${mysqlloc}/libmysqlclient.a; then -+ with_mysql="${prefix}" -+ break -+ elif test -f /usr/local/${mysqlloc}/libmysqlclient.a; then -+ with_mysql="/usr/local" -+ break -+ elif test -f /usr/${mysqlloc}/libmysqlclient.a; then -+ with_mysql="/usr" -+ break -+ fi -+ done -+fi -+ -+LIB_MYSQL="" -+case "$with_mysql" in -+ no) true;; -+ ""|yes) AC_CHECK_LIB(mysqlclient, mysql_select_db, -+ AC_DEFINE(HAVE_MYSQL) -+ LIB_MYSQL="-lmysqlclient", -+ with_mysql=no);; -+ *) if test -d ${with_mysql}/include/mysql; then -+ CPPFLAGS="$CPPFLAGS -I${with_mysql}/include/mysql" -+ else -+ CPPFLAGS="$CPPFLAGS -I${with_mysql}/include" -+ fi -+ if test -d ${with_mysql}/lib/mysql; then -+ LDFLAGS="$LDFLAGS -L${with_mysql}/lib/mysql" -+ fi -+ AC_DEFINE(HAVE_MYSQL) -+ LIB_MYSQL="-lmysqlclient";; -+esac -+AC_SUBST(LIB_MYSQL) -+ -+dnl LDAP -+AC_ARG_WITH(ldap, [ --with-ldap=PATH enable authentication from LDAP [no] ], -+ with_ldap=$withval, -+ with_ldap=no) -+ -+if test -z "$with_ldap"; then -+ for ldaploc in lib/ldap lib -+ do -+ if test -f ${prefix}/${ldaploc}/libldap.a; then -+ with_ldap="${prefix}" -+ break -+ elif test -f /usr/local/${ldaploc}/libldap.a; then -+ with_ldap="/usr/local" -+ break -+ elif test -f /usr/${ldaploc}/libldap.a; then -+ with_ldap="/usr" -+ break -+ fi -+ done -+fi -+ -+LIB_LDAP="" -+case "$with_ldap" in -+ no) true;; -+ ""|yes) AC_CHECK_LIB(ldap, ldap_open, -+ AC_DEFINE(HAVE_LDAP) -+ LIB_LDAP="-lldap -llber", -+ with_ldap=no);; -+ *) if test -d ${with_ldap}/include/ldap; then -+ CPPFLAGS="${CPPFLAGS} -I${with_ldap}/include/ldap" -+ else -+ CPPFLAGS="${CPPFLAGS} -I${with_ldap}/include" -+ fi -+ if test -d ${with_ldap}/lib/ldap; then -+ LDFLAGS="$LDFLAGS -L${with_ldap}/lib/ldap" -+ fi -+ AC_DEFINE(HAVE_LDAP) -+ LIB_LDAP="-lldap -llber";; -+esac -+AC_SUBST(LIB_LDAP) -+ - dnl CRAM-MD5 - AC_ARG_ENABLE(cram, [ --enable-cram enable CRAM-MD5 authentication [yes] ], - cram=$enableval, -@@ -434,11 +524,15 @@ - fi - - if test "$with_des" != no; then -+ case "$host_os" in -+ freebsd*) -+ COM_ERR="-lcom_err" -+ ;; -+ esac - AC_CHECK_HEADER(krb.h, -- AC_CHECK_LIB(krb, krb_mk_priv, COM_ERR="", -- AC_CHECK_LIB(krb, krb_mk_priv, COM_ERR="-lcom_err", -- AC_WARN(No Kerberos V4 found); krb4=no, -ldes -lcom_err), -- -ldes), -+ AC_CHECK_LIB(krb, krb_mk_priv,:, -+ AC_WARN(No Kerberos V4 found); krb4=no, -+ -ldes $COM_ERR), - AC_WARN(No Kerberos V4 found); krb4=no) - else - AC_WARN(No DES library found for Kerberos V4 support) Index: scripts/configure.sasl =================================================================== RCS file: /home/ncvs/ports/security/cyrus-sasl/scripts/configure.sasl,v retrieving revision 1.10 diff -u -r1.10 configure.sasl --- scripts/configure.sasl 20 Dec 2001 12:18:57 -0000 1.10 +++ scripts/configure.sasl 6 Jan 2002 07:59:44 -0000 @@ -1,51 +1,68 @@ #!/bin/sh # $FreeBSD: ports/security/cyrus-sasl/scripts/configure.sasl,v 1.10 2001/12/20 12:18:57 ijliao Exp $ -if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then +if [ -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc ]; then exit fi -SASLDB_NAME=sasldb.db - tempfile=`mktemp -t checklist` if [ "${BATCH}" ]; then - if [ "x${ENABLE_DB3}" = "xYES" ]; then - OPTIONS=\"DB3\" + if [ "${WITH_DB3}" ]; then + OPTIONS="\"DB3\"" + else + OPTIONS="\"NDBM\"" fi - if [ "x${ENABLE_MYSQL}" = "xYES" ]; then + if [ "${WITH_JAVA}" ]; then + OPTIONS="${OPTIONS} \"JAVA\"" + fi + if [ "${WITH_MYSQL}" ]; then OPTIONS="${OPTIONS} \"MySQL\"" fi - if [ "x${ENABLE_LDAP}" = "xYES" ]; then - OPTIONS="${OPTIONS} \"OpenLDAP\"" + if [ "${WITH_LDAP2}" ]; then + OPTIONS="${OPTIONS} \"OpenLDAP2\"" + elif [ "${WITH_LDAP1}" ]; then + OPTIONS="${OPTIONS} \"OpenLDAP1\"" fi - if [ "x${OPTIONS}" != "x" ]; then + if [ "${OPTIONS}" != "x" ]; then set ${OPTIONS} fi else - if [ "x${ENABLE_DB3}" = "xYES" -o -f ${PREFIX}/lib/libdb3.so ] ; then + if [ "${WITH_DB3}" -o -f ${PREFIX}/lib/libdb3.so ] ; then SET_DB3="ON" + SET_NDBM="OFF" else SET_DB3="OFF" + SET_NDBM="ON" fi - if [ "x${ENABLE_MYSQL}" = "xYES" -o -f ${PREFIX}/lib/mysql/libmysqlclient.so ] ; then + if [ "${WITH_JAVA}" ] ; then + SET_JAVA="ON" + else + SET_JAVA="OFF" + fi + if [ "${WITH_MYSQL}" -o -f ${PREFIX}/lib/mysql/libmysqlclient.so ] ; then SET_MYSQL="ON" else SET_MYSQL="OFF" fi - if [ "x${ENABLE_LDAP}" = "xYES" -o \ - -f ${PREFIX}/lib/libldap.so -a -f ${PREFIX}/lib/liblber.so ] ; then - SET_LDAP="ON" - else - SET_LDAP="OFF" + + #Perfer LDAP2 over LDAP1 + SET_LDAP1="OFF" + SET_LDAP2="OFF" + if [ "${WITH_LDAP2}" -o -f ${PREFIX}/lib/libldap.so.2 -a -f ${PREFIX}/lib/liblber.so.2 ] ; then + SET_LDAP2="ON" + elif [ "${WITH_LDAP1}" -o -f ${PREFIX}/lib/libldap.so.1 -a -f ${PREFIX}/lib/liblber.so.1 ]; then + SET_LDAP1="ON" fi /usr/bin/dialog --title "Additional SASL options" --clear \ --checklist "\n\ Please select desired options:" -1 -1 16 \ +NDBM "ndbm DB package" ${SET_NDBM} \ DB3 "Berkeley DB package, revision 3" ${SET_DB3} \ MySQL "MySQL password Authentication" ${SET_MYSQL} \ -OpenLDAP "OpenLDAP password Authentication" ${SET_LDAP} \ +OpenLDAP1 "OpenLDAP 1.x support" ${SET_LDAP1} \ +OpenLDAP2 "OpenLDAP 2.x support" ${SET_LDAP2} \ 2> $tempfile retval=$? @@ -66,34 +83,83 @@ esac fi -${MKDIR} ${WRKDIRPREFIX}${CURDIR} -exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc +${MKDIR} ${WRKDIRPREFIX}${REALCURDIR} +exec > ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc echo "PREFIX= ${PREFIX}" while [ "$1" ]; do case $1 in + \"NDBM\") + if [ "${DBLIB}" ]; then + echo "ndbm and db3 are mutually exclusive." > /dev/stderr + rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc + exit 1 + fi + echo "CONFIGURE_ARGS+= --with-dblib=ndbm" + echo "SASLDB_NAME= sasldb.db" + DBLIB=1 + ;; \"DB3\") + if [ "${DBLIB}" ]; then + echo "ndbm and db3 are mutually exclusive." > /dev/stderr + rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc + exit 1 + fi echo "LIB_DEPENDS+= db3.2:\${PORTSDIR}/databases/db3" - echo "CONFIGURE_ARGS+=--with-dblib=berkeley" - SASLDB_NAME=sasldb + echo "CONFIGURE_ARGS+= --with-dblib=berkeley" + echo "SASLDB_NAME= sasldb" + DBLIB=1 + ;; + \"JAVA\") + echo "JAVA is disabled, Ignoring option" > /dev/stderr + ;; + \"DISABLED\") + echo "RUN_DEPENDS= \${LOCALBASE}/\${JAVADIR}/bin/java:\${PORTSDIR}/java/jdk" + echo "CONFIGURE_ARGS+= --with-java \\" + echo " --with-javabase=\${LOCALBASE}/include" + echo "CONFIGURE_ENV+= JAVAC=\"\${LOCALBASE}/\${JAVADIR}/bin/javac\" \\" + echo " JAVAH=\"\${LOCALBASE}/\${JAVADIR}/bin/javah" \\" + echo " JAVADOC=\"\${LOCALBASE}/\${JAVADIR}/bin/javadoc\" ;; \"MySQL\") echo "LIB_DEPENDS+= mysqlclient.10:\${PORTSDIR}/databases/mysql323-client" - echo "CONFIGURE_ARGS+=--with-mysql=\${PREFIX}" + echo "CONFIGURE_ARGS+= --with-mysql=\${PREFIX}" + MSG=1 ;; - \"OpenLDAP\") + \"OpenLDAP1\") + if [ "$OPENLDAP2" ]; then + echo "OpenLDAP1 and OpenLDAP2 are mutually exclusive." > /dev/stderr + rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc + exit 1 + fi echo "LIB_DEPENDS+= ldap.1:\${PORTSDIR}/net/openldap" echo "LIB_DEPENDS+= lber.1:\${PORTSDIR}/net/openldap" - echo "CONFIGURE_ARGS+=--with-ldap=\${PREFIX}" + echo "CONFIGURE_ARGS+= --with-ldap=\${PREFIX}" + OPENLDAP1=1 + MSG=1 + ;; + \"OpenLDAP2\") + if [ "$OPENLDAP1" ]; then + echo "OpenLDAP1 and OpenLDAP2 are mutually exclusive." > /dev/stderr + rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc + exit 1 + fi + echo "LIB_DEPENDS+= ldap.2:\${PORTSDIR}/net/openldap2" + echo "LIB_DEPENDS+= lber.2:\${PORTSDIR}/net/openldap2" + echo "CONFIGURE_ARGS+= --with-ldap=\${PREFIX}" + OPENLDAP2=1 + MSG=1 ;; *) echo "Invalid option(s): $*" > /dev/stderr - rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc exit 1 ;; esac shift done -echo "SASLDB_NAME= ${SASLDB_NAME}" +if [ "x${MSG}" != "x" ]; then + echo "LDAP_MYSQL_MSG= \"See sysadmin.html in the Cyrus-SASL docs directory for informaion on using LDAP or MySQL for authentication.\"" +fi >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201060842.g068gZR28862>