aboutsummaryrefslogtreecommitdiff
path: root/security/cyrus-sasl2
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2016-03-02 14:13:45 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2016-03-02 14:13:45 +0000
commitb49e7032a330a20d2c65ee8bc5d5052d6210d91d (patch)
tree0df689846593dab955ba5ea570d930631877a676 /security/cyrus-sasl2
parentc874aec956bcd8f31ed1341db73872992328dc86 (diff)
Notes
Diffstat (limited to 'security/cyrus-sasl2')
-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
5 files changed, 65 insertions, 63 deletions
diff --git a/security/cyrus-sasl2/Makefile b/security/cyrus-sasl2/Makefile
index c0ce9340f809..c059d392b9dd 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 e75205d05a51..32c4b18785c6 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 77a3b09a06e1..56ee6ecd3bec 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 55ac7a69b6a0..5ca26a87880d 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 adc429445399..35ce196a1b92 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