New commits:
commit f94f820d6792ffd0a38a00fbdb586d1f6904ed5f
Author: Arjan Bouter <abouter AT sourcemage.org>
Commit: Arjan Bouter <abouter AT sourcemage.org>
mariadb: added NDB for ndbcluster sub dependencies
commit 4b282b956835eae293c756daa70a2e0f08f4b88e
Author: Arjan Bouter <abouter AT sourcemage.org>
Commit: Arjan Bouter <abouter AT sourcemage.org>
mysql: added NDB for ndbcluster sub dependencies
commit 5a4c671a76d4ef78ac8aa416966c630b55943af9
Author: Arjan Bouter <abouter AT sourcemage.org>
Commit: Arjan Bouter <abouter AT sourcemage.org>
openldap: removed sluprd and ldbm as they are removed by upstream.
added comments to various backends and added some missing ones
added overlay support, made cleartext and crypt passwords optional.
Note: I'm not done with this spell yet, but it seems to work.
-if [[ "$SLAPD_LDBM" == "db" ]]; then
+if is_depends_enabled $SPELL db; then
LDFLAGS="-ldb $LDFLAGS"
fi &&
+# only add slapd options when actually building it
+if echo $OPENLDAP_SLAPD | grep -q enable; then
+
+ if [[ "${SLAPD_OVERLAYS}" == 'none' ]]; then
+ message 'skipping overlays'
+ elif [[ "${SLAPD_OVERLAYS}" == 'all' ]]; then
+ message 'adding all overlays' &&
+ OVERLAYS='--enable-overlays=mod'
+ else
+ for OVERLAY in ${SLAPD_OVERLAYS}; do
+ OVERLAYS="${OVERLAYS} --enable-${OVERLAY}=mod"
+ done
+ fi
+
+ SLAPD_OPTS="$OPENLDAP_SLAPD $SLAPD_ACL $SLAPD_ACI $SLAPD_DNSSRV
+ $SLAPD_MONITOR $SLAPD_CRYPT $SLAPD_CLEAR $SLAPD_REV
+ $SLAPD_SOCK $SLAPD_META $SLAPD_RELAY $OVERLAYS"
+else
+ SLAPD_OPTS="$OPENLDAP_SLAPD"
+fi &&
+
OPTS="$OPTS
- $OPENLDAP_SLAPD $SLAPD_ACI $SLAPD_DNSSRV $SLAPD_MONITOR
- $OPENLDAP_SLURPD
+ $SLAPD_OPTS
--enable-shared --enable-static
--enable-dynamic
--enable-local" &&
diff --git a/collab/openldap/CONFIGURE b/collab/openldap/CONFIGURE
index 69e5b19..8ba29f9 100755
--- a/collab/openldap/CONFIGURE
+++ b/collab/openldap/CONFIGURE
@@ -1,22 +1,57 @@
-config_query_option OPENLDAP_SLAPD 'Build SLAPD, the standalone LDAP
daemon?' y \
- '--enable-slapd --enable-modules --enable-cleartext --enable-crypt
--enable-rlookups' \
- '--disable-slapd' &&
+source $GRIMOIRE/config_query_multi.function &&
-config_query_option OPENLDAP_SLURPD 'Build SLURPD, the replication daemon?'
y \
- '--enable-slurpd' '--disable-slurpd' &&
+config_query_option OPENLDAP_SLAPD 'Build SLAPD, the standalone LDAP
daemon?' y \
+ '--enable-slapd --enable-modules' '--disable-slapd' &&
if echo $OPENLDAP_SLAPD | grep -q enable; then
- config_query_list SLAPD_LDBM 'Select LDBM backend (Berkeley DB
recommended)' \
- db none &&
- config_query_option SLAPD_DNSSRV 'Enable DNS "SRV" record backend?' y \
+ config_query_option SLAPD_DNSSRV 'Enable DNS backend? (LDAP server
locator)' n \
'--enable-dnssrv=mod' '--disable-dnssrv' &&
- config_query_option SLAPD_MONITOR 'Enable monitor backend?' y \
+ config_query_option SLAPD_META 'Enable metadirectory backend?' n \
+ '--enable-meta=mod' '--disable-meta' &&
+ config_query_option SLAPD_MONITOR 'Enable LDAP server monitor backend?' y \
'--enable-monitor=mod' '--disable-monitor' &&
- config_query_option SLAPD_ACI 'Enable per-object access control' n \
+ config_query_option SLAPD_SOCK 'Enable sock backend?' n \
+ '--enable-sock=mod' '--disable-sock' &&
+ config_query_option SLAPD_RELAY 'Enable relay backend?' n \
+ '--enable-relay=mod' '--disable-relay' &&
+ config_query_option SLAPD_ACL 'Enable EXPERIMENTAL loadable ACL?' n \
+ '--enable-dynacl' '--disable-dynacl' &&
+ if echo $SLAPD_ACL|grep -q enable; then
+ config_query_option SLAPD_ACI 'Enable per-object access control' n \
'--enable-aci' '--disable-aci'
+ fi &&
+ config_query_option SLAPD_CLEAR 'Enable cleartext passwords?' y \
+ '--enable-cleartext' '--disable-cleartext' &&
+ config_query_option SLAPD_CRYPT 'Enable crypt passwords?' n \
+ '--enable-crypt' '--disable-crypt' &&
+ config_query_option SLAPD_REV 'Enable reverse lookup of client hostnames?'
n \
+ '--enable-rlookups' '--disable-rlookups'
fi &&
config_query OPENLDAP_NTLM "Enable NTLM API support (needed for Evolution
Exchange plugin)?" n &&
+config_query_multi SLAPD_OVERLAYS \
+ "which overlays do you want supported?" \
+ none all \
+ accesslog auditlog collect constraint dds deref dyngroup \
+ dynlist memberof ppolicy proxycache refint retcode rwm \
+ seqmod sssvlv syncprov translucent unique valsort
+
+if list_find "$SLAPD_OVERLAYS" "all"; then
+ SLAPD_OVERLAYS="all"
+elif list_find "$SLAPD_OVERLAYS" "none"; then
+ SLAPD_OVERLAYS="none"
+fi &&
+
+if echo $OPENLDAP_SLURPD |grep -q enable ; then
+ if list_find "$SLAPD_OVERLAYS" "syncprov"; then
+ message 'slurpd has been replaced by the syncprov overlay'
+ else
+ message 'slurpd has been replaced by the syncprov overlay, adding it' &&
+ SLAPD_OVERLAYS="${SLAPD_OVERLAYS} syncprov"
+ fi &&
+ persistent_remove OPENLDAP_SLURPD
+fi &&
+
message "${MESSAGE_COLOR}If you care about security, check out http://timof.qipc.org/ldap/libldap.html .$DEFAULT_COLOR" &&
message "${MESSAGE_COLOR}The patch is not in the spell anymore because of
version mismatch...$DEFAULT_COLOR."
diff --git a/collab/openldap/DEPENDS b/collab/openldap/DEPENDS
index d5bafb0..e3b7aa3 100755
--- a/collab/openldap/DEPENDS
+++ b/collab/openldap/DEPENDS
@@ -12,30 +12,57 @@ optional_depends openssl \
'--without-tls' \
'for SSL/TLS support' &&
-optional_depends cyrus-sasl '--with-cyrus-sasl' '--without-cyrus-sasl'
\
+optional_depends cyrus-sasl '--with-cyrus-sasl' '--without-cyrus-sasl' \
'for SASL authentication, if SLAPD is a backend authenticator for SASL,
say "no"' &&
if echo $OPENLDAP_SLAPD | grep -q enable; then
- case "$SLAPD_LDBM" in
- db)
- depends db '--enable-ldbm=mod --enable-ldbm-api=berkeley'
- ;;
- esac
+ optional_depends db '--enable-bdb=mod --enable-hdb=mod' \
+ '--disable-bdb --disable-hdb' \
+ 'for Berkeley DB backend (recommended)' &&
optional_depends ODBC-MGR \
'--enable-sql=mod' \
'--disable-sql' \
- 'for SQL backend' &&
+ 'for SQL backend (experimental)' &&
+ if [[ $(get_spell_provider $SPELL ODBC-MGR) ]]; then
+ if is_depends_enabled $SPELL unixodbc; then
+ depends unixodbc --with-odbc=unixodbc
+ elif is_depends_enabled $SPELL libiodbc; then
+ depends libiodbc --with-odbc=iodbc
+ else
+ message "${PROBLEM_COLOR}unknown ODBC provider selected, please update
spell${DEFAULT_COLOR}"
+ fi
+ fi &&
+
+ optional_depends MYSQL '--enable-mdb=mod' '--disable-mdb' \
+ 'for MYSQL backend' &&
+
+ if [[ $(get_spell_provider $SPELL MYSQL) ]]; then
+ config_query_option SLAPD_NDB 'Enable MYSQL NDB cluster support?' n \
+ '--enable-ndb=mod' '--disable-ndb'
+ if echo $SLAPD_NDB |grep -q enable ; then
+ if is_depends_enabled $SPELL mariadb; then
+ depends -sub NDB mariadb
+ elif is_depends_enabled $SPELL mysql; then
+ depends -sub NDB mysql
+ fi
+ fi
+ fi