summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2016-03-02 14:13:45 +0000
committerume <ume@FreeBSD.org>2016-03-02 14:13:45 +0000
commitb31cd6dce16220d55ba963975061333b5145c468 (patch)
tree0df689846593dab955ba5ea570d930631877a676
parentbdb74a5c7a387ef6475cd907bcb90d3e96fd659d (diff)
downloadFreeBSD-ports-b31cd6dce16220d55ba963975061333b5145c468.zip
FreeBSD-ports-b31cd6dce16220d55ba963975061333b5145c468.tar.gz
- Make SASLdb excludable.
- Make SASLdb buildable with GDBM. - Make sure to disable the plugins where it is not required.
-rw-r--r--security/cyrus-sasl2-gssapi/Makefile7
-rw-r--r--security/cyrus-sasl2-ldapdb/Makefile4
-rw-r--r--security/cyrus-sasl2-saslauthd/Makefile36
-rw-r--r--security/cyrus-sasl2-srp/Makefile2
-rw-r--r--security/cyrus-sasl2/Makefile33
-rw-r--r--security/cyrus-sasl2/Makefile.common51
-rw-r--r--security/cyrus-sasl2/files/pkg-deinstall.in12
-rw-r--r--security/cyrus-sasl2/files/pkg-install.in14
-rw-r--r--security/cyrus-sasl2/pkg-plist18
9 files changed, 94 insertions, 83 deletions
diff --git a/security/cyrus-sasl2-gssapi/Makefile b/security/cyrus-sasl2-gssapi/Makefile
index 1640a1d..5769b98 100644
--- a/security/cyrus-sasl2-gssapi/Makefile
+++ b/security/cyrus-sasl2-gssapi/Makefile
@@ -5,13 +5,12 @@ PORTREVISION= 7
COMMENT= SASL GSSAPI authentication plugin
-CONFIGURE_ARGS+=--enable-gssapi
-
OPTIONS_SINGLE= GSSAPI
OPTIONS_SINGLE_GSSAPI= GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT
OPTIONS_DEFAULT= GSSAPI_BASE
-GSSAPI_BASE_USES= gssapi
-GSSAPI_BASE_CONFIGURE_ENABLE= gssapi
+GSSAPI_BASE_USES= gssapi:base
+GSSAPI_BASE_CONFIGURE_ON= --enable-gssapi="${GSSAPIBASEDIR}" \
+ --with-gss_impl=heimdal
GSSAPI_HEIMDAL_USES= gssapi:heimdal,flags
GSSAPI_HEIMDAL_CONFIGURE_ON= --enable-gssapi="${GSSAPIBASEDIR}" \
--with-gss_impl=heimdal
diff --git a/security/cyrus-sasl2-ldapdb/Makefile b/security/cyrus-sasl2-ldapdb/Makefile
index 8dbca49..99c1e12 100644
--- a/security/cyrus-sasl2-ldapdb/Makefile
+++ b/security/cyrus-sasl2-ldapdb/Makefile
@@ -5,11 +5,11 @@ PORTREVISION= 5
COMMENT= SASL LDAPDB auxprop plugin
+CYRUS_CONFIGURE_ARGS= --enable-ldapdb --with-ldap=${LOCALBASE}
+
USE_OPENLDAP= yes
.if defined(WITH_OPENLDAP_VER)
WANT_OPENLDAP_VER= ${WITH_OPENLDAP_VER}
.endif
-CONFIGURE_ARGS+=--enable-ldapdb --with-ldap=${LOCALBASE}
-
.include "${.CURDIR}/../../security/cyrus-sasl2/Makefile.common"
diff --git a/security/cyrus-sasl2-saslauthd/Makefile b/security/cyrus-sasl2-saslauthd/Makefile
index 976e66c..dac2afc 100644
--- a/security/cyrus-sasl2-saslauthd/Makefile
+++ b/security/cyrus-sasl2-saslauthd/Makefile
@@ -11,25 +11,33 @@ INSTALL_WRKSRC= ${WRKSRC}/saslauthd
USE_RC_SUBR= saslauthd
-CONFIGURE_ARGS= --enable-login \
- --enable-auth-sasldb \
- --with-saslauthd=${SASLAUTHD_RUNPATH}
+CYRUS_CONFIGURE_ARGS= --with-saslauthd=${SASLAUTHD_RUNPATH}
CONFIGURE_ENV+= andrew_cv_runpath_switch=none
-OPTIONS_DEFINE= BDB DOCS OPENLDAP HTTPFORM
-BDB_CONFIGURE_ON= --with-dblib=berkeley \
- --with-bdb-libdir=${BDB_LIB_DIR} \
- --with-bdb-incdir=${BDB_INCLUDE_DIR} \
- --with-bdb=${BDB_LIB_NAME}
-BDB_USE= BDB=yes
-BDB_CONFIGURE_OFF= --with-dblib=ndbm
+OPTIONS_DEFINE= DOCS HTTPFORM OPENLDAP
+OPTIONS_RADIO= GSSAPI SASLDB
+OPTIONS_RADIO_SASLDB= BDB1 BDB GDBM
+OPTIONS_DEFAULT= BDB1
+
+HTTPFORM_DESC= Enable HTTP form authentication
+HTTPFORM_CONFIGURE_ENABLE=httpform
OPENLDAP_DESC= Use OpenLDAP
OPENLDAP_USE= OPENLDAP=yes
OPENLDAP_CONFIGURE_ON= --with-ldap=${LOCALBASE}
-HTTPFORM_DESC= Enable HTTP form authentication
-HTTPFORM_CONFIGURE_ENABLE=httpform
-OPTIONS_RADIO= GSSAPI
+SASLDB_DESC= Experimental SASLdb authentication module
+BDB_USE= BDB=yes
+BDB_CONFIGURE_ON= --enable-auth-sasldb \
+ --with-dblib=berkeley \
+ --with-bdb-libdir=${BDB_LIB_DIR} \
+ --with-bdb-incdir=${BDB_INCLUDE_DIR} \
+ --with-bdb=${BDB_LIB_NAME}
+BDB1_CONFIGURE_ON= --enable-auth-sasldb \
+ --with-dblib=ndbm
+GDBM_CONFIGURE_ON= --enable-auth-sasldb \
+ --with-dblib=gdbm \
+ --with-gdbm=${LOCALBASE}
+
.if exists(/usr/lib/libkrb5.a)
OPTIONS_RADIO_GSSAPI+= GSSAPI_BASE
OPTIONS_DEFAULT+= GSSAPI_BASE
@@ -45,4 +53,6 @@ GSSAPI_MIT_USES= gssapi:mit
GSSAPI_MIT_CONFIGURE_ON= --enable-gssapi="${GSSAPIBASEDIR}" \
--with-gss_impl=mit
+DOCS= AUTHORS COPYING ChangeLog INSTALL LDAP_SASLAUTHD NEWS README
+
.include "${.CURDIR}/../../security/cyrus-sasl2/Makefile.common"
diff --git a/security/cyrus-sasl2-srp/Makefile b/security/cyrus-sasl2-srp/Makefile
index 724c3a6..df351f4 100644
--- a/security/cyrus-sasl2-srp/Makefile
+++ b/security/cyrus-sasl2-srp/Makefile
@@ -4,7 +4,7 @@ PKGNAMESUFFIX= -srp
COMMENT= SASL SRP authentication plugin
-CONFIGURE_ARGS+=--enable-srp
+CYRUS_CONFIGURE_ARGS= --enable-srp
OPTIONS_DEFINE= SRP_SETPASS
OPTIONS_DEFAULT= SRP_SETPASS
diff --git a/security/cyrus-sasl2/Makefile b/security/cyrus-sasl2/Makefile
index c0ce934..c059d39 100644
--- a/security/cyrus-sasl2/Makefile
+++ b/security/cyrus-sasl2/Makefile
@@ -7,18 +7,18 @@ COMMENT= RFC 2222 SASL (Simple Authentication and Security Layer)
USES= cpe libtool:keepla pathfix perl5
USE_PERL5= patch
-CONFIGURE_ARGS+=--enable-auth-sasldb \
- --with-saslauthd=${SASLAUTHD_RUNPATH}
+CYRUS_CONFIGURE_ARGS= --with-saslauthd=${SASLAUTHD_RUNPATH}
NO_OPTIONS_SORT= yes
OPTIONS_DEFINE= ALWAYSTRUE AUTHDAEMOND DOCS KEEP_DB_OPEN \
- OBSOLETE_CRAM_ATTR BDB MYSQL PGSQL
-OPTIONS_RADIO= SQLITE
+ OBSOLETE_CRAM_ATTR MYSQL PGSQL
+OPTIONS_RADIO= SASLDB SQLITE
+OPTIONS_RADIO_SASLDB= BDB1 BDB GDBM
OPTIONS_RADIO_SQLITE= SQLITE2 SQLITE3
OPTIONS_GROUP= PLUGIN
OPTIONS_GROUP_PLUGIN= ANONYMOUS CRAM DIGEST LOGIN NTLM OTP PLAIN SCRAM
-OPTIONS_DEFAULT= ANONYMOUS AUTHDAEMOND OBSOLETE_CRAM_ATTR CRAM DIGEST \
- LOGIN NTLM OTP PLAIN SCRAM
+OPTIONS_DEFAULT= ANONYMOUS AUTHDAEMOND BDB1 OBSOLETE_CRAM_ATTR CRAM \
+ DIGEST LOGIN NTLM OTP PLAIN SCRAM
OPTIONS_SUB= yes
ALWAYSTRUE_DESC= Alwaystrue password verifier (discouraged)
ALWAYSTRUE_CONFIGURE_ENABLE=alwaystrue
@@ -29,12 +29,15 @@ KEEP_DB_OPEN_DESC= Keep handle to Berkeley DB open
KEEP_DB_OPEN_CONFIGURE_ENABLE=keep-db-open
OBSOLETE_CRAM_ATTR_DESC=cmusaslsecretCRAM-MD5 auxprop property
OBSOLETE_CRAM_ATTR_CONFIGURE_OFF=--enable-obsolete_cram_attr=no
+SASLDB_DESC= SASLdb auxprop plugin
BDB_USE= BDB=yes
BDB_CONFIGURE_ON= --with-dblib=berkeley \
--with-bdb-libdir=${BDB_LIB_DIR} \
--with-bdb-incdir=${BDB_INCLUDE_DIR} \
--with-bdb=${BDB_LIB_NAME}
-BDB_CONFIGURE_OFF= --with-dblib=ndbm
+BDB1_CONFIGURE_ON= --with-dblib=ndbm
+GDBM_CONFIGURE_ON= --with-dblib=gdbm \
+ --with-gdbm=${LOCALBASE}
MYSQL_USE= MYSQL=yes
MYSQL_CONFIGURE_ON= --with-mysql=${LOCALBASE}
MYSQL_CONFIGURE_OFF= --without-mysql
@@ -64,4 +67,20 @@ PLAIN_CONFIGURE_ENABLE= plain
SCRAM_DESC= SCRAM authentication
SCRAM_CONFIGURE_ENABLE= scram
+DOCS= AUTHORS COPYING ChangeLog INSTALL INSTALL.TXT NEWS README
+
+DOC2= ONEWS TODO draft-burdis-cat-srp-sasl-xx.txt \
+ draft-ietf-sasl-anon-xx.txt draft-ietf-sasl-crammd5-xx.txt \
+ draft-ietf-sasl-gssapi-xx.txt draft-ietf-sasl-plain-xx.txt \
+ draft-ietf-sasl-rfc2222bis-xx.txt draft-ietf-sasl-rfc2831bis-xx.txt \
+ draft-ietf-sasl-saslprep-xx.txt draft-murchison-sasl-login-xx.txt \
+ draft-newman-sasl-c-api-xx.txt rfc1321.txt rfc1939.txt rfc2104.txt \
+ rfc2195.txt rfc2222.txt rfc2243.txt rfc2245.txt rfc2289.txt \
+ rfc2444.txt rfc2595.txt rfc2831.txt rfc2945.txt rfc3174.txt \
+ server-plugin-flow.fig testing.txt
+
+HTDOCS= advanced appconvert components gssapi index install macosx \
+ mechanisms options plugprog programming readme sysadmin upgrading \
+ windows
+
.include "${.CURDIR}/../../security/cyrus-sasl2/Makefile.common"
diff --git a/security/cyrus-sasl2/Makefile.common b/security/cyrus-sasl2/Makefile.common
index e75205d..32c4b18 100644
--- a/security/cyrus-sasl2/Makefile.common
+++ b/security/cyrus-sasl2/Makefile.common
@@ -29,10 +29,14 @@ CONFIGURE_ARGS+=--disable-anon \
--disable-digest \
--disable-gssapi \
--disable-krb4 \
+ --disable-login \
--disable-ntlm \
--disable-otp \
--disable-plain \
- --disable-scram
+ --disable-scram \
+ --disable-srp \
+ --with-dblib=none
+CONFIGURE_ARGS+=${CYRUS_CONFIGURE_ARGS}
MAKE_ENV+= INSTALL_STRIP_FLAG=${STRIP}
DOCSDIR= ${PREFIX}/share/doc/cyrus-sasl2
@@ -59,7 +63,6 @@ CYRUS_BUILD_TARGET?= ${PORTNAME}
INSTALL_WRKSRC= ${WRKSRC}/plugins
LIB_DEPENDS= libsasl2.so:${PORTSDIR}/security/cyrus-sasl2
USES= libtool:build
-CONFIGURE_ARGS+=--with-dblib=none
PLIST_FILES+= lib/sasl2/lib${CYRUS_BUILD_TARGET}.a \
lib/sasl2/lib${CYRUS_BUILD_TARGET}.so \
@@ -76,13 +79,21 @@ CONFIGURE_ARGS+=--with-openssl=yes
CONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE}
.endif
+.if ${ARCH} == "amd64"
+CPPFLAGS+= -fPIC
+.endif
+
.if ${CYRUS_BUILD_TARGET} == "cyrus-sasl"
-.if ${PORT_OPTIONS:MBDB}
+.if ${PORT_OPTIONS:MBDB1}
+SASLDB_NAME= sasldb2.db
+.elif ${PORT_OPTIONS:MBDB}
INVALID_BDB_VER=2
SASLDB_NAME= sasldb2
+.elif ${PORT_OPTIONS:MGDBM}
+SASLDB_NAME= sasldb2
.else
-SASLDB_NAME= sasldb2.db
+SASLDB= "@comment "
.endif
.if ${PORT_OPTIONS:MMYSQL} || ${PORT_OPTIONS:MPGSQL} || \
@@ -92,31 +103,12 @@ CONFIGURE_ARGS+=--enable-sql
SQL= "@comment "
.endif
-.if ${ARCH} == "amd64"
-CPPFLAGS+= -fPIC
-.endif
-
-DOCS= AUTHORS COPYING ChangeLog INSTALL INSTALL.TXT NEWS README
-
-DOC2= ONEWS TODO draft-burdis-cat-srp-sasl-xx.txt \
- draft-ietf-sasl-anon-xx.txt draft-ietf-sasl-crammd5-xx.txt \
- draft-ietf-sasl-gssapi-xx.txt draft-ietf-sasl-plain-xx.txt \
- draft-ietf-sasl-rfc2222bis-xx.txt draft-ietf-sasl-rfc2831bis-xx.txt \
- draft-ietf-sasl-saslprep-xx.txt draft-murchison-sasl-login-xx.txt \
- draft-newman-sasl-c-api-xx.txt rfc1321.txt rfc1939.txt rfc2104.txt \
- rfc2195.txt rfc2222.txt rfc2243.txt rfc2245.txt rfc2289.txt \
- rfc2444.txt rfc2595.txt rfc2831.txt rfc2945.txt rfc3174.txt \
- server-plugin-flow.fig testing.txt
-
-HTDOCS= advanced appconvert components gssapi index install macosx \
- mechanisms options plugprog programming readme sysadmin upgrading \
- windows
-
SUB_FILES= pkg-deinstall pkg-install pkg-message
SUB_LIST= CYRUS_USER=${CYRUS_USER} CYRUS_GROUP=${CYRUS_GROUP} \
- SASLDB=${SASLDB_NAME}
+ SASLDB_NAME=${SASLDB_NAME}
PLIST_SUB+= PREFIX=${PREFIX} \
+ SASLDB=${SASLDB} \
SQL=${SQL} \
DOCSDIR=${DOCSDIR:S/^${PREFIX}\///}
@@ -156,17 +148,10 @@ WANT_OPENLDAP_VER= ${WITH_OPENLDAP_VER}
.endif
.endif
-.if ${PORT_OPTIONS:MGSSAPI_BASE} || ${PORT_OPTIONS:MGSSAPI_HEIMDAL} || \
- ${PORT_OPTIONS:MGSSAPI_MIT}
-CONFIGURE_ARGS+=--enable-gssapi
-.endif
-
.if ${SASLAUTHD_RUNPATH} != /var/run/saslauthd
RUNPATH= "@comment "
.endif
-DOCS= AUTHORS COPYING ChangeLog INSTALL LDAP_SASLAUTHD NEWS README
-
PLIST_SUB= PREFIX=${PREFIX} \
DOCSDIR=${DOCSDIR:S/^${PREFIX}\///} \
RUNPATH=${RUNPATH}
@@ -175,7 +160,9 @@ SUB_LIST+= SASLAUTHD_RUNPATH=${SASLAUTHD_RUNPATH}
do-build:
cd ${WRKSRC}/include && ${MAKE}
+.if ${PORT_OPTIONS:MBDB1} || ${PORT_OPTIONS:MBDB} || ${PORT_OPTIONS:MGDBM}
cd ${WRKSRC}/sasldb && ${MAKE}
+.endif
cd ${WRKSRC}/saslauthd && ${MAKE}
cd ${WRKSRC}/saslauthd && ${MAKE} saslcache
cd ${WRKSRC}/saslauthd && ${MAKE} testsaslauthd
diff --git a/security/cyrus-sasl2/files/pkg-deinstall.in b/security/cyrus-sasl2/files/pkg-deinstall.in
index 77a3b09..56ee6ec 100644
--- a/security/cyrus-sasl2/files/pkg-deinstall.in
+++ b/security/cyrus-sasl2/files/pkg-deinstall.in
@@ -7,16 +7,13 @@
#set -vx
PKG_BATCH=${BATCH:=NO}
-
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
-
-SASLDB_NAME=${PKG_PREFIX}/etc/%%SASLDB%%
-
+SASLDB_NAME=%%SASLDB_NAME%%
+SASLDB_NAME=${SASLDB_NAME:+${PKG_PREFIX}/etc/%%SASLDB_NAME%%}
CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%}
CYRUS_GROUP=${CYRUS_GROUP:=%%CYRUS_GROUP%%}
# delete sasldb database
-
delete_sasldb() {
if [ -f ${SASLDB_NAME} ] ; then
if [ `${PKG_PREFIX}/sbin/sasldblistusers2 | wc -l` -eq 0 ]; then
@@ -39,10 +36,11 @@ delete_user() {
case $2 in
DEINSTALL)
- delete_sasldb
+ if [ -n "${SASLDB_NAME}" ]; then
+ delete_sasldb
+ fi
;;
POST-DEINSTALL)
delete_user
;;
-
esac
diff --git a/security/cyrus-sasl2/files/pkg-install.in b/security/cyrus-sasl2/files/pkg-install.in
index 55ac7a6..5ca26a8 100644
--- a/security/cyrus-sasl2/files/pkg-install.in
+++ b/security/cyrus-sasl2/files/pkg-install.in
@@ -8,18 +8,15 @@
#set -vx
PKG_BATCH=${BATCH:=NO}
-
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
-
-SASLDB_NAME=${PKG_PREFIX}/etc/%%SASLDB%%
-
+SASLDB_NAME=%%SASLDB_NAME%%
+SASLDB_NAME=${SASLDB_NAME:+${PKG_PREFIX}/etc/%%SASLDB_NAME%%}
CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%}
CYRUS_GROUP=${CYRUS_GROUP:=%%CYRUS_GROUP%%}
#
# create 'cyrus' user and group before installing
#
-
create_user() {
USER=${CYRUS_USER}
GROUP=${CYRUS_GROUP}
@@ -91,12 +88,13 @@ case $2 in
;;
POST-INSTALL)
if [ "${PKG_BATCH}" = "NO" ]; then
- create_sasldb
- elif [ ! -f ${SASLDB_NAME} ]; then
+ if [ -n "${SASLDB_NAME}" ]; then
+ create_sasldb
+ fi
+ elif [ -n "${SASLDB_NAME}" -a ! -f ${SASLDB_NAME} ]; then
echo "*** We do not create ${SASLDB_NAME} automatically in"
echo "*** BATCH mode. Please create it by yourself. It should be"
echo "*** owner: ${CYRUS_USER}, group: mail, mode: 0640."
fi
;;
-
esac
diff --git a/security/cyrus-sasl2/pkg-plist b/security/cyrus-sasl2/pkg-plist
index adc4294..35ce196 100644
--- a/security/cyrus-sasl2/pkg-plist
+++ b/security/cyrus-sasl2/pkg-plist
@@ -55,11 +55,11 @@ lib/libsasl2.so.3.0.0
%%PLAIN%%lib/sasl2/libplain.so
%%PLAIN%%lib/sasl2/libplain.so.3
%%PLAIN%%lib/sasl2/libplain.so.3.0.0
-lib/sasl2/libsasldb.a
-lib/sasl2/libsasldb.la
-lib/sasl2/libsasldb.so
-lib/sasl2/libsasldb.so.3
-lib/sasl2/libsasldb.so.3.0.0
+%%SASLDB%%lib/sasl2/libsasldb.a
+%%SASLDB%%lib/sasl2/libsasldb.la
+%%SASLDB%%lib/sasl2/libsasldb.so
+%%SASLDB%%lib/sasl2/libsasldb.so.3
+%%SASLDB%%lib/sasl2/libsasldb.so.3.0.0
libdata/pkgconfig/libsasl2.pc
man/man3/sasl.3.gz
man/man3/sasl_authorize_t.3.gz
@@ -105,11 +105,11 @@ man/man3/sasl_setprop.3.gz
man/man3/sasl_user_exists.3.gz
man/man3/sasl_verifyfile_t.3.gz
man/man8/pluginviewer.8.gz
-man/man8/sasldblistusers2.8.gz
-man/man8/saslpasswd2.8.gz
+%%SASLDB%%man/man8/sasldblistusers2.8.gz
+%%SASLDB%%man/man8/saslpasswd2.8.gz
sbin/pluginviewer
-sbin/sasldblistusers2
-sbin/saslpasswd2
+%%SASLDB%%sbin/sasldblistusers2
+%%SASLDB%%sbin/saslpasswd2
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
%%PORTDOCS%%%%DOCSDIR%%/COPYING
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
OpenPOWER on IntegriCloud