This patch updates the openldap port to use modules instead of being
monolithic. I've been using it in production for six months or so and
haven't had any issues.

Thanks...


Index: Makefile
===================================================================
RCS file: /cvs/ports/databases/openldap/Makefile,v
retrieving revision 1.161
diff -u -p -r1.161 Makefile
--- Makefile    12 Jan 2018 00:36:28 -0000      1.161
+++ Makefile    21 May 2018 02:38:50 -0000
@@ -9,7 +9,7 @@ DISTNAME =              openldap-2.4.45
 PKGNAME-main =         ${DISTNAME:S/-/-client-/}
 PKGNAME-server =       ${DISTNAME:S/-/-server-/}
 REVISION =             4
-REVISION-server =      5
+REVISION-server =      6
 
 # overwrite -main pkgname/path to strip FLAVOR, aci only affects the server
 FULLPKGNAME-main =     ${DISTNAME:S/-/-client-/}${FLAVOR_EXT:S/-aci//}
@@ -32,7 +32,7 @@ MAINTAINER =  Stuart Henderson <sthen@ope
 # OpenLDAP Public License
 PERMIT_PACKAGE_CDROM = Yes
 
-WANTLIB += c crypto ssl
+WANTLIB += c crypto ltdl ssl
 
 MASTER_SITES = http://mirror.switch.ch/ftp/mirror/OpenLDAP/openldap-release/ \
                
http://gd.tuwien.ac.at/infosys/network/OpenLDAP/openldap-release/ \
@@ -58,6 +58,7 @@ CONFIGURE_ARGS +=     --enable-ipv6 \
 
 # slapd options
 CONFIGURE_ARGS +=      --enable-slapd \
+                       --enable-modules \
                        --enable-cleartext \
                        --enable-crypt \
                        --enable-rewrite \
@@ -65,17 +66,19 @@ CONFIGURE_ARGS +=   --enable-slapd \
                        --enable-spasswd
 
 # slapd modules
-CONFIGURE_ARGS +=      --enable-bdb \
-                       --enable-dnssrv \
-                       --enable-hdb \
-                       --enable-ldap \
-                       --enable-meta \
-                       --enable-monitor \
-                       --enable-null \
-                       --enable-overlays \
-                       --enable-passwd \
-                       --enable-perl \
-                       --enable-shell
+CONFIGURE_ARGS +=      --enable-bdb=mod \
+                       --enable-dnssrv=mod \
+                       --enable-hdb=mod \
+                       --enable-ldap=mod \
+                       --enable-meta=mod \
+                       --enable-monitor=mod \
+                       --enable-null=mod \
+                       --enable-overlays=mod \
+                       --enable-passwd=mod \
+                       --enable-perl=mod \
+                       --enable-relay=mod \
+                       --enable-shell=mod \
+                       --enable-sock=mod
 
 # Enable MDB support, however note patch-servers_slapd_back-mdb_init_c.
 #
@@ -90,10 +93,10 @@ CONFIGURE_ARGS +=   --enable-bdb \
 # Therefore, the patch rejects an MDB configuration in which writemap
 # has not been set.
 #
-CONFIGURE_ARGS +=      --enable-mdb
+CONFIGURE_ARGS +=      --enable-mdb=mod
 
 .if ${FLAVOR:Maci}
-CONFIGURE_ARGS +=      --enable-aci
+CONFIGURE_ARGS +=      --enable-aci=mod
 .endif
 
 .if ${FLAVOR:Mgssapi}
@@ -113,7 +116,8 @@ MULTI_PACKAGES =    -main -server
 
 # formatting is ok with mandoc, but soelim is used at build time
 BUILD_DEPENDS +=       textproc/groff
-LIB_DEPENDS +=         security/cyrus-sasl2 
+LIB_DEPENDS +=         security/cyrus-sasl2 \
+                       devel/libtool,-ltdl
 WANTLIB +=             pthread sasl2
 CPPFLAGS +=            -I${LOCALBASE}/include/sasl
 
@@ -123,7 +127,7 @@ LIB_DEPENDS-server =        ${LIB_DEPENDS-main}
                        databases/db/v4,no_java,no_tcl
 
 CONFIGURE_ENV +=       CPPFLAGS="-I${LOCALBASE}/include/sasl 
-I${LOCALBASE}/include/db4 -I${LOCALBASE}/include" \
-                       LDFLAGS="-L${LOCALBASE}/lib/db4 -L${LOCALBASE}/lib"
+                       LDFLAGS="-L${LOCALBASE}/lib/db4 -L${LOCALBASE}/lib 
-Wl,--export-dynamic"
 
 RUN_DEPENDS-server =   databases/openldap,-main
 WANTLIB-server +=      ${WANTLIB} perl m icudata icuuc uuid
@@ -142,6 +146,9 @@ post-install:
        ${INSTALL_DATA} ${WRKSRC}/servers/slapd/DB_CONFIG \
                ${PREFIX}/share/examples/openldap
        @rm -rf ${DESTDIR}${SYSCONFDIR}/openldap
+       @for f in ${DESTDIR}/usr/local/libexec/openldap/*.so.* ; do \
+               ln -s $$(basename $$f) $$(echo $$f | sed -e 's/\.so\..*/.so/') 
; \
+       done
 
 pre-test:
        sed -i 's,^#!/bin/bash,#!${LOCALBASE}/bin/bash,' 
${WRKSRC}/tests/scripts/test064-constraint
Index: pkg/PLIST-server
===================================================================
RCS file: /cvs/ports/databases/openldap/pkg/PLIST-server,v
retrieving revision 1.22
diff -u -p -r1.22 PLIST-server
--- pkg/PLIST-server    26 Aug 2017 12:10:55 -0000      1.22
+++ pkg/PLIST-server    21 May 2018 02:38:50 -0000
@@ -71,6 +71,138 @@ sbin/slapindex
 sbin/slappasswd
 sbin/slapschema
 sbin/slaptest
+libexec/openldap/accesslog-2.4.so
+libexec/openldap/accesslog-2.4.so.12.8
+libexec/openldap/accesslog.so
+libexec/openldap/accesslog.so.12.8
+libexec/openldap/auditlog-2.4.so
+libexec/openldap/auditlog-2.4.so.12.8
+libexec/openldap/auditlog.so
+libexec/openldap/auditlog.so.12.8
+libexec/openldap/back_bdb-2.4.so
+libexec/openldap/back_bdb-2.4.so.12.8
+libexec/openldap/back_bdb.so
+libexec/openldap/back_bdb.so.12.8
+libexec/openldap/back_dnssrv-2.4.so
+libexec/openldap/back_dnssrv-2.4.so.12.8
+libexec/openldap/back_dnssrv.so
+libexec/openldap/back_dnssrv.so.12.8
+libexec/openldap/back_hdb-2.4.so
+libexec/openldap/back_hdb-2.4.so.12.8
+libexec/openldap/back_hdb.so
+libexec/openldap/back_hdb.so.12.8
+libexec/openldap/back_ldap-2.4.so
+libexec/openldap/back_ldap-2.4.so.12.8
+libexec/openldap/back_ldap.so
+libexec/openldap/back_ldap.so.12.8
+libexec/openldap/back_mdb-2.4.so
+libexec/openldap/back_mdb-2.4.so.12.8
+libexec/openldap/back_mdb.so
+libexec/openldap/back_mdb.so.12.8
+libexec/openldap/back_meta-2.4.so
+libexec/openldap/back_meta-2.4.so.12.8
+libexec/openldap/back_meta.so
+libexec/openldap/back_meta.so.12.8
+libexec/openldap/back_monitor-2.4.so
+libexec/openldap/back_monitor-2.4.so.12.8
+libexec/openldap/back_monitor.so
+libexec/openldap/back_monitor.so.12.8
+libexec/openldap/back_null-2.4.so
+libexec/openldap/back_null-2.4.so.12.8
+libexec/openldap/back_null.so
+libexec/openldap/back_null.so.12.8
+libexec/openldap/back_passwd-2.4.so
+libexec/openldap/back_passwd-2.4.so.12.8
+libexec/openldap/back_passwd.so
+libexec/openldap/back_passwd.so.12.8
+libexec/openldap/back_perl-2.4.so
+libexec/openldap/back_perl-2.4.so.12.8
+libexec/openldap/back_perl.so
+libexec/openldap/back_perl.so.12.8
+libexec/openldap/back_relay-2.4.so
+libexec/openldap/back_relay-2.4.so.12.8
+libexec/openldap/back_relay.so
+libexec/openldap/back_relay.so.12.8
+libexec/openldap/back_shell-2.4.so
+libexec/openldap/back_shell-2.4.so.12.8
+libexec/openldap/back_shell.so
+libexec/openldap/back_shell.so.12.8
+libexec/openldap/back_sock-2.4.so
+libexec/openldap/back_sock-2.4.so.12.8
+libexec/openldap/back_sock.so
+libexec/openldap/back_sock.so.12.8
+libexec/openldap/collect-2.4.so
+libexec/openldap/collect-2.4.so.12.8
+libexec/openldap/collect.so
+libexec/openldap/collect.so.12.8
+libexec/openldap/constraint-2.4.so
+libexec/openldap/constraint-2.4.so.12.8
+libexec/openldap/constraint.so
+libexec/openldap/constraint.so.12.8
+libexec/openldap/dds-2.4.so
+libexec/openldap/dds-2.4.so.12.8
+libexec/openldap/dds.so
+libexec/openldap/dds.so.12.8
+libexec/openldap/deref-2.4.so
+libexec/openldap/deref-2.4.so.12.8
+libexec/openldap/deref.so
+libexec/openldap/deref.so.12.8
+libexec/openldap/dyngroup-2.4.so
+libexec/openldap/dyngroup-2.4.so.12.8
+libexec/openldap/dyngroup.so
+libexec/openldap/dyngroup.so.12.8
+libexec/openldap/dynlist-2.4.so
+libexec/openldap/dynlist-2.4.so.12.8
+libexec/openldap/dynlist.so
+libexec/openldap/dynlist.so.12.8
+libexec/openldap/memberof-2.4.so
+libexec/openldap/memberof-2.4.so.12.8
+libexec/openldap/memberof.so
+libexec/openldap/memberof.so.12.8
+libexec/openldap/pcache-2.4.so
+libexec/openldap/pcache-2.4.so.12.8
+libexec/openldap/pcache.so
+libexec/openldap/pcache.so.12.8
+libexec/openldap/ppolicy-2.4.so
+libexec/openldap/ppolicy-2.4.so.12.8
+libexec/openldap/ppolicy.so
+libexec/openldap/ppolicy.so.12.8
+libexec/openldap/refint-2.4.so
+libexec/openldap/refint-2.4.so.12.8
+libexec/openldap/refint.so
+libexec/openldap/refint.so.12.8
+libexec/openldap/retcode-2.4.so
+libexec/openldap/retcode-2.4.so.12.8
+libexec/openldap/retcode.so
+libexec/openldap/retcode.so.12.8
+libexec/openldap/rwm-2.4.so
+libexec/openldap/rwm-2.4.so.12.8
+libexec/openldap/rwm.so
+libexec/openldap/rwm.so.12.8
+libexec/openldap/seqmod-2.4.so
+libexec/openldap/seqmod-2.4.so.12.8
+libexec/openldap/seqmod.so
+libexec/openldap/seqmod.so.12.8
+libexec/openldap/sssvlv-2.4.so
+libexec/openldap/sssvlv-2.4.so.12.8
+libexec/openldap/sssvlv.so
+libexec/openldap/sssvlv.so.12.8
+libexec/openldap/syncprov-2.4.so
+libexec/openldap/syncprov-2.4.so.12.8
+libexec/openldap/syncprov.so
+libexec/openldap/syncprov.so.12.8
+libexec/openldap/translucent-2.4.so
+libexec/openldap/translucent-2.4.so.12.8
+libexec/openldap/translucent.so
+libexec/openldap/translucent.so.12.8
+libexec/openldap/unique-2.4.so
+libexec/openldap/unique-2.4.so.12.8
+libexec/openldap/unique.so
+libexec/openldap/unique.so.12.8
+libexec/openldap/valsort-2.4.so
+libexec/openldap/valsort-2.4.so.12.8
+libexec/openldap/valsort.so
+libexec/openldap/valsort.so.12.8
 @mode 700
 @owner _openldap
 @sample /var/openldap-data/

Reply via email to