- Overhaul the way we handle with LDAP data directory, populate

the data directory upon start, not upon install. [1]
 - Update to OpenLDAP 2.4.11.
 - Modify bsd.port.mk to fit with the shared libary version bump [2]
   This has no impact to package building yet as 2.4.x is not the
   default version.

Submitted by:	Mikhail Goriachev <mikhailg webanoide org> [1]
Approved by:	portmgr (marcus) [2]
This commit is contained in:
Xin LI 2008-07-20 03:35:42 +00:00
parent fb129bc0ff
commit 38231e45ad
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=217167
8 changed files with 50 additions and 40 deletions

View file

@ -1705,7 +1705,7 @@ LIB_DEPENDS+= ldap-2.2.7:${PORTSDIR}/net/openldap22${_OPENLDAP_FLAVOUR}-client
.elif ${WANT_OPENLDAP_VER} == 23
LIB_DEPENDS+= ldap-2.3.2:${PORTSDIR}/net/openldap23${_OPENLDAP_FLAVOUR}-client
.elif ${WANT_OPENLDAP_VER} == 24
LIB_DEPENDS+= ldap-2.4.2:${PORTSDIR}/net/openldap24${_OPENLDAP_FLAVOUR}-client
LIB_DEPENDS+= ldap-2.4.3:${PORTSDIR}/net/openldap24${_OPENLDAP_FLAVOUR}-client
.else
IGNORE= cannot be built with unknown OpenLDAP version: ${WANT_OPENLDAP_VER}
.endif

View file

@ -6,7 +6,7 @@
#
PORTNAME= openldap
DISTVERSION= 2.4.10
DISTVERSION= 2.4.11
PORTREVISION= ${OPENLDAP_PORTREVISION}
CATEGORIES= net databases
MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
@ -39,7 +39,7 @@ BROKEN= incompatible OpenLDAP version: ${WANT_OPENLDAP_VER}
.endif
PORTREVISION_CLIENT= 0
PORTREVISION_SERVER= 1
PORTREVISION_SERVER= 0
.if !defined(CLIENT_ONLY)
OPTIONS= SASL "With (Cyrus) SASL2 support" off \

View file

@ -1,3 +1,3 @@
MD5 (openldap-2.4.10.tgz) = 519171f3e562bfced7afac7756cf7bf5
SHA256 (openldap-2.4.10.tgz) = e460b1ef2a7a50ec8d7bd70c29d5cb3191f091fab50b96a7e10454ee8e4d0902
SIZE (openldap-2.4.10.tgz) = 4453204
MD5 (openldap-2.4.11.tgz) = 920fedbbb5bc61c2ca52c56edeef770a
SHA256 (openldap-2.4.11.tgz) = 76e57147a2373015f306f2e72128330e51d5c0f1056b4713283234dfd16c1c9c
SIZE (openldap-2.4.11.tgz) = 4941654

View file

@ -1,6 +1,6 @@
--- servers/slapd/Makefile.in.orig Fri Sep 2 00:28:10 2005
+++ servers/slapd/Makefile.in Sun Sep 4 17:34:37 2005
@@ -372,7 +372,6 @@
--- servers/slapd/Makefile.in.orig 2008-02-11 15:26:43.000000000 -0800
+++ servers/slapd/Makefile.in 2008-07-19 20:10:16.023473779 -0700
@@ -374,7 +374,6 @@
install-slapd: FORCE
-$(MKDIR) $(DESTDIR)$(libexecdir)
@ -8,7 +8,7 @@
$(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 \
slapd$(EXEEXT) $(DESTDIR)$(libexecdir)
@for i in $(SUBDIRS); do \
@@ -403,16 +402,18 @@
@@ -405,16 +404,18 @@
touch all-cffiles
install-schema: FORCE
@ -21,24 +21,24 @@
@SD=$(DESTDIR)$(schemadir) ; \
- files=`cd $(srcdir)/schema ; echo README *.ldif *.schema` ; \
+ files=`cd $(srcdir)/schema ; echo README *.ldif` ; \
+ for i in $$files ; do \
+ echo $(INSTALL) $(INSTALLFLAGS) -m 444 schema/$$i $$SD/$$i ; \
+ $(INSTALL) $(INSTALLFLAGS) -m 444 $(srcdir)/schema/$$i $$SD/$$i ; \
+ done ; \
+ files=`cd $(srcdir)/schema ; echo *.schema` ; \
for i in $$files ; do \
echo $(INSTALL) $(INSTALLFLAGS) -m 444 schema/$$i $$SD/$$i ; \
$(INSTALL) $(INSTALLFLAGS) -m 444 $(srcdir)/schema/$$i $$SD/$$i ; \
+ done ; \
+ files=`cd $(srcdir)/schema ; echo *.schema` ; \
+ for i in $$files ; do \
+ echo $(INSTALL) $(INSTALLFLAGS) -m 444 schema/$$i $$SD/$$i ; \
+ $(INSTALL) $(INSTALLFLAGS) -m 444 $(srcdir)/schema/$$i $$SD/$$i ; \
+ $(INSTALL) $(INSTALLFLAGS) -m 444 $(srcdir)/schema/$$i $$SD/$$i.default ; \
done
install-conf: FORCE
@@ -429,8 +430,6 @@
install-db-config: FORCE
@@ -432,8 +433,6 @@
@-$(MKDIR) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir)
@-$(INSTALL) -m 700 -d $(DESTDIR)$(localstatedir)/openldap-data
- $(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \
- $(DESTDIR)$(localstatedir)/openldap-data/DB_CONFIG.example
$(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \
- $(DESTDIR)$(localstatedir)/openldap-data/DB_CONFIG.example
- $(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \
$(DESTDIR)$(sysconfdir)/DB_CONFIG.example
install-tools: FORCE

View file

@ -5,6 +5,10 @@
ECHO_CMD=echo
if [ -f "%%PREFIX%%/etc/openldap/slapd.conf" ]; then
DBDIR=`awk '$1 == "directory" {print $2}' "%%PREFIX%%/etc/openldap/slapd.conf"`
fi
case $2 in
POST-DEINSTALL)
${ECHO_CMD}
@ -13,9 +17,13 @@ POST-DEINSTALL)
${ECHO_CMD} "it any longer, you may want to issue the"
${ECHO_CMD} "following commands:"
${ECHO_CMD}
if [ -d %%DATABASEDIR%% ]; then
if ([ "${DBDIR}" ] && [ -d "${DBDIR}" ]) || ([ ! "${DBDIR}" ] && [ -d %%DATABASEDIR%% ]); then
${ECHO_CMD} "- to delete the OpenLDAP database permanently (losing all data):"
${ECHO_CMD} " rm -Rf %%DATABASEDIR%%"
if [ "${DBDIR}" ] && [ -d "${DBDIR}" ]; then
${ECHO_CMD} " rm -Rf ${DBDIR}"
else
${ECHO_CMD} " rm -Rf %%DATABASEDIR%%"
fi
${ECHO_CMD}
fi
${ECHO_CMD} "- to remove the OpenLDAP user:"

View file

@ -49,6 +49,10 @@ start_precmd()
""|[Nn][Oo][Nn][Ee]|[Dd][Ee][Ff][Aa][Uu][Ll][Tt])
;;
*)
if [ ! -d "${DBDIR}" ]; then
mkdir -p "${DBDIR}"
cp "%%PREFIX%%/etc/openldap/DB_CONFIG.example" "${DBDIR}/DB_CONFIG"
fi
chown "$slapd_owner" "%%LDAP_RUN_DIR%%"
chown -RL "$slapd_owner" "${DBDIR}"
chmod 700 "${DBDIR}"

View file

@ -14,58 +14,58 @@ etc/openldap/DB_CONFIG.example
%%SLAPI%%lib/libslapi.la
%%SLAPI%%lib/libslapi.so
%%SLAPI%%lib/libslapi-2.4.so
%%SLAPI%%lib/libslapi-2.4.so.2
%%SLAPI%%lib/libslapi-2.4.so.3
%%MODULES%%@exec mkdir -p %D/libexec/openldap
%%BACK_BDB%%libexec/openldap/back_bdb-2.4.so
%%BACK_BDB%%libexec/openldap/back_bdb-2.4.so.2
%%BACK_BDB%%libexec/openldap/back_bdb-2.4.so.3
%%BACK_BDB%%libexec/openldap/back_bdb.la
%%BACK_BDB%%libexec/openldap/back_bdb.so
%%BACK_HDB%%libexec/openldap/back_hdb-2.4.so
%%BACK_HDB%%libexec/openldap/back_hdb-2.4.so.2
%%BACK_HDB%%libexec/openldap/back_hdb-2.4.so.3
%%BACK_HDB%%libexec/openldap/back_hdb.la
%%BACK_HDB%%libexec/openldap/back_hdb.so
%%BACKEND%%libexec/openldap/back_ldap-2.4.so
%%BACKEND%%libexec/openldap/back_ldap-2.4.so.2
%%BACKEND%%libexec/openldap/back_ldap-2.4.so.3
%%BACKEND%%libexec/openldap/back_ldap.la
%%BACKEND%%libexec/openldap/back_ldap.so
%%BACKEND%%libexec/openldap/back_meta-2.4.so
%%BACKEND%%libexec/openldap/back_meta-2.4.so.2
%%BACKEND%%libexec/openldap/back_meta-2.4.so.3
%%BACKEND%%libexec/openldap/back_meta.la
%%BACKEND%%libexec/openldap/back_meta.so
%%BACKEND%%libexec/openldap/back_monitor-2.4.so
%%BACKEND%%libexec/openldap/back_monitor-2.4.so.2
%%BACKEND%%libexec/openldap/back_monitor-2.4.so.3
%%BACKEND%%libexec/openldap/back_monitor.la
%%BACKEND%%libexec/openldap/back_monitor.so
%%BACKEND%%libexec/openldap/back_null-2.4.so
%%BACKEND%%libexec/openldap/back_null-2.4.so.2
%%BACKEND%%libexec/openldap/back_null-2.4.so.3
%%BACKEND%%libexec/openldap/back_null.la
%%BACKEND%%libexec/openldap/back_null.so
%%BACK_DNSSRV%%libexec/openldap/back_dnssrv-2.4.so
%%BACK_DNSSRV%%libexec/openldap/back_dnssrv-2.4.so.2
%%BACK_DNSSRV%%libexec/openldap/back_dnssrv-2.4.so.3
%%BACK_DNSSRV%%libexec/openldap/back_dnssrv.la
%%BACK_DNSSRV%%libexec/openldap/back_dnssrv.so
%%BACK_PASSWD%%libexec/openldap/back_passwd-2.4.so
%%BACK_PASSWD%%libexec/openldap/back_passwd-2.4.so.2
%%BACK_PASSWD%%libexec/openldap/back_passwd-2.4.so.3
%%BACK_PASSWD%%libexec/openldap/back_passwd.la
%%BACK_PASSWD%%libexec/openldap/back_passwd.so
%%BACK_PERL%%libexec/openldap/back_perl-2.4.so
%%BACK_PERL%%libexec/openldap/back_perl-2.4.so.2
%%BACK_PERL%%libexec/openldap/back_perl-2.4.so.3
%%BACK_PERL%%libexec/openldap/back_perl.la
%%BACK_PERL%%libexec/openldap/back_perl.so
%%BACK_RELAY%%libexec/openldap/back_relay-2.4.so
%%BACK_RELAY%%libexec/openldap/back_relay-2.4.so.2
%%BACK_RELAY%%libexec/openldap/back_relay-2.4.so.3
%%BACK_RELAY%%libexec/openldap/back_relay.la
%%BACK_RELAY%%libexec/openldap/back_relay.so
%%BACK_SHELL%%libexec/openldap/back_shell-2.4.so
%%BACK_SHELL%%libexec/openldap/back_shell-2.4.so.2
%%BACK_SHELL%%libexec/openldap/back_shell-2.4.so.3
%%BACK_SHELL%%libexec/openldap/back_shell.la
%%BACK_SHELL%%libexec/openldap/back_shell.so
%%BACK_SOCK%%libexec/openldap/back_sock-2.4.so
%%BACK_SOCK%%libexec/openldap/back_sock-2.4.so.2
%%BACK_SOCK%%libexec/openldap/back_sock-2.4.so.3
%%BACK_SOCK%%libexec/openldap/back_sock.la
%%BACK_SOCK%%libexec/openldap/back_sock.so
%%BACK_SQL%%libexec/openldap/back_sql-2.4.so
%%BACK_SQL%%libexec/openldap/back_sql-2.4.so.2
%%BACK_SQL%%libexec/openldap/back_sql-2.4.so.3
%%BACK_SQL%%libexec/openldap/back_sql.la
%%BACK_SQL%%libexec/openldap/back_sql.so
libexec/slapd
@ -81,6 +81,4 @@ sbin/slaptest
@cwd /
@exec mkdir -p %%LDAP_RUN_DIR%%
@dirrmtry %%LDAP_RUN_DIR%%
@exec mkdir -p %%DATABASEDIR%%
@dirrmtry %%DATABASEDIR%%
@cwd %%PREFIX%%

View file

@ -21,17 +21,17 @@ include/ldap_schema.h
include/ldap_utf8.h
include/slapi-plugin.h
lib/liblber-2.4.so
lib/liblber-2.4.so.2
lib/liblber-2.4.so.3
lib/liblber.a
lib/liblber.la
lib/liblber.so
lib/libldap-2.4.so
lib/libldap-2.4.so.2
lib/libldap-2.4.so.3
lib/libldap.a
lib/libldap.la
lib/libldap.so
lib/libldap_r-2.4.so
lib/libldap_r-2.4.so.2
lib/libldap_r-2.4.so.3
lib/libldap_r.a
lib/libldap_r.la
lib/libldap_r.so