# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # net/openldap22-server # net/openldap22-server/Makefile # net/openldap22-server/distinfo # net/openldap22-server/files # net/openldap22-server/files/extrapatch-Makefile.in # net/openldap22-server/files/patch-build::top.mk # net/openldap22-server/files/patch-libraries::liblunicode::ucstr.c # net/openldap22-server/files/patch-libraries::liblutil::passwd.c # net/openldap22-server/files/patch-servers::slapd::back-perl # net/openldap22-server/files/patch-servers::slapd::daemon.c # net/openldap22-server/files/slapd.sh # net/openldap22-server/files/slurpd.sh # net/openldap22-server/pkg-descr # net/openldap22-server/pkg-install # net/openldap22-server/pkg-message # net/openldap22-server/pkg-plist # echo c - net/openldap22-server mkdir -p net/openldap22-server > /dev/null 2>&1 echo x - net/openldap22-server/Makefile sed 's/^X//' >net/openldap22-server/Makefile << 'END-of-net/openldap22-server/Makefile' X# New ports collection makefile for: openldap22-server X# Date created: 10 Jul 2003 X# Whom: Oliver Eikemeier X# X# $FreeBSD$ X# X XPORTNAME= openldap XPORTVERSION= ${OPENLDAP_VERSION}.a XPORTREVISION= ${OPENLDAP_PORTVERSION} XCATEGORIES= net databases XMASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \ X http://public.planetmirror.com/pub/openldap/%SUBDIR%/ \ X ftp://gd.tuwien.ac.at/infosys/network/OpenLDAP/%SUBDIR%/ \ X ftp://ftp.matrix.com.br/pub/openldap/%SUBDIR%/ \ X ftp://ftp.ucr.ac.cr/pub/Unix/openldap/%SUBDIR%/ \ X ftp://ftp.ntua.gr/mirror/OpenLDAP/%SUBDIR%/ \ X ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/%SUBDIR%/ \ X ftp://ftp.u-aizu.ac.jp/pub/net/openldap/%SUBDIR%/ \ X ftp://ftp.holywar.net/pub/OpenLDAP/%SUBDIR%/ \ X ftp://ftp.nl.uu.net/pub/unix/db/openldap/%SUBDIR%/ \ X ftp://ftp.linux.pt/pub/mirrors/OpenLDAP/%SUBDIR%/ \ X ftp://ftp.rediris.es/mirror/OpenLDAP/%SUBDIR%/ \ X ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/%SUBDIR%/ \ X http://openldap.cdpa.nsysu.edu.tw/OpenLDAP/%SUBDIR%/ \ X ftp://ftp.plig.org/pub/OpenLDAP/%SUBDIR%/ XMASTER_SITE_SUBDIR= openldap-test XPKGNAMESUFFIX= ${OPENLDAP_PKGNAMESUFFIX} XDISTNAME= openldap-${OPENLDAP_VERSION}alpha XEXTRACT_SUFX= .tgz X XMAINTAINER= eikemeier@fillmore-labs.com XCOMMENT?= Open source LDAP server implementation X XOPENLDAP_VERSION= 2.2.0 X XLATEST_LINK= ${PKGNAMEPREFIX}openldap22${PKGNAMESUFFIX} XCONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-* X XWANT_OPENLDAP_VER?= 22 X.if ${WANT_OPENLDAP_VER} != 22 XBROKEN= "incompatible OpenLDAP version: ${WANT_OPENLDAP_VER}" X.endif X X.if defined(CLIENT_ONLY) XOPENLDAP_PORTVERSION= 0 XOPENLDAP_PKGNAMESUFFIX?=-client X.else XOPENLDAP_PORTVERSION= 0 XOPENLDAP_PKGNAMESUFFIX?=-server X XLIB_DEPENDS+= ldap.2:${PORTSDIR}/net/openldap22-client X.endif X XUSE_OPENSSL= yes XUSE_REINPLACE= yes XUSE_LIBTOOL_VER= 14 X XDESCR= ${.CURDIR}/pkg-descr XPLIST= ${WRKDIR}/pkg-plist XPKGINSTALL= ${WRKDIR}/pkg-install XPKGMESSAGE= ${WRKDIR}/pkg-message X XLOCALSTATEDIR?= ${DESTDIR}/var/db XLDAP_RUN_DIR?= ${DESTDIR}/var/run/openldap X XPLIST_SUB+= LOCALSTATEDIR=${LOCALSTATEDIR} \ X LDAP_RUN_DIR=${LDAP_RUN_DIR} X XSED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \ X -e 's,%%LDAP_RUN_DIR%%,${LDAP_RUN_DIR},g' \ X -e 's,%%LOCALSTATEDIR%%,${LOCALSTATEDIR},g' X XCONFIGURE_ARGS= --with-threads \ X --with-tls=openssl \ X --enable-dynamic X X.if defined(WITH_SASL) XLIB_DEPENDS+= sasl2.2:${PORTSDIR}/security/cyrus-sasl2 XCONFIGURE_ARGS+= --with-cyrus-sasl X.else XCONFIGURE_ARGS+= --without-cyrus-sasl X.endif X X.if defined(CLIENT_ONLY) X# client specific configuration X XCONFIGURE_ARGS+= --disable-slapd X XINSTALLS_SHLIB= yes X X.else X# server specific configuration X XEXTRA_PATCHES+= ${FILESDIR}/extrapatch-Makefile.in X XCONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} \ X --enable-ldbm \ X --with-ldbm-api=berkeley \ X --enable-lmpasswd \ X --enable-ldap \ X --enable-meta \ X --enable-rewrite \ X --enable-null \ X --enable-monitor X XWITH_BDB_VER?= 41 X X.if ${WITH_BDB_VER} == 41 XLIB_DEPENDS+= db41.1:${PORTSDIR}/databases/db41 XCONFIGURE_ARGS+= --enable-bdb X.elif ${WITH_BDB_VER} == 4 XLIB_DEPENDS+= db4.0:${PORTSDIR}/databases/db4 XCONFIGURE_ARGS+= --disable-bdb X.elif ${WITH_BDB_VER} == 3 XLIB_DEPENDS+= db3.3:${PORTSDIR}/databases/db3 XCONFIGURE_ARGS+= --disable-bdb X.else X.error WITH_BDB_VER must be 3, 4 or 41 X.endif XLIBS+= -ldb${WITH_BDB_VER} XCPPFLAGS+= -I${LOCALBASE}/include/db${WITH_BDB_VER} X X.if defined(WITH_SHELL) XCONFIGURE_ARGS+= --enable-shell X.endif X X.if defined(WITH_PERL) XUSE_PERL5= yes XCONFIGURE_ARGS+= --enable-perl X.endif X X.if defined(WITH_SASL) XCONFIGURE_ARGS+= --enable-spasswd X.endif X X.if defined(WITH_ODBC) XLIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc XCONFIGURE_ARGS+= --enable-sql X.endif X X.if defined(WITH_SLAPI) XLIB_DEPENDS+= ltdl.4:${PORTSDIR}/devel/libltdl XCONFIGURE_ARGS+= --enable-slapi XPLIST_SUB+= SLAPI="" X.else XPLIST_SUB+= SLAPI="@comment " X.endif X X# Include tcp-wrapper support X.if !defined(WITHOUT_TCP_WRAPPERS) && exists(/usr/include/tcpd.h) XCONFIGURE_ARGS+= --enable-wrappers X.endif X X# end of client/server specific configuration X.endif X X# math.h uses _REENTRANT and stdio.h uses _THREAD_SAFE, so define both. XCPPFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \ X -I${LOCALBASE}/include XLDFLAGS+= -L${LOCALBASE}/lib X XCONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} XCONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \ X LDFLAGS="${LDFLAGS}" \ X LIBS="${LIBS}" X X.include X X.if defined(CLIENT_ONLY) X.include "${.CURDIR}/files/manpages" X.endif X Xpre-everything:: X @${ECHO} "=============================================================" X @${ECHO} X @${ECHO} "You can build ${PKGNAME} with the following options:" X @${ECHO} X.if defined(CLIENT_ONLY) X @${ECHO} "WITH_SASL with (Cyrus) SASL2 support" X.else X @${ECHO} "WITH_BDB_VER select BerkeleyDB version (default 4.1)" X @${ECHO} "WITH_SASL with (Cyrus) SASL2 password verification" X @${ECHO} "WITH_PERL with Perl backend" X @${ECHO} "WITH_SHELL with Shell backend" X @${ECHO} "WITH_ODBC with SQL backend" X @${ECHO} "WITH_SLAPI with Netscape SLAPI plugin API X @${ECHO} "WITHOUT_TCP_WRAPPERS without tcp wrapper support" X.endif X @${ECHO} X @${ECHO} "=============================================================" X @${ECHO} X Xpost-patch: X @${REINPLACE_CMD} -e 's,%LOCALSTATEDIR%/slapd\.,${LDAP_RUN_DIR}/slapd.,g' \ X ${WRKSRC}/servers/slapd/slapd.conf X Xpre-configure: X @${REINPLACE_CMD} -e '/^LIBTOOL=/s,\$$(top_builddir)/libtool,${LIBTOOL},g' \ X ${WRKSRC}/configure X Xpost-build: X.for script in slapd.sh slurpd.sh X @${SED} ${SED_SCRIPT} ${FILESDIR}/${script} >${WRKDIR}/${script} X.endfor X.for text in pkg-install pkg-message X @${SED} ${SED_SCRIPT} ${.CURDIR}/${text} >${WRKDIR}/${text} X.endfor X X.if !defined(CLIENT_ONLY) Xtest: build X @cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} \ X ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test X.endif X Xpre-install: X @${CP} ${.CURDIR}/pkg-plist ${PLIST} X.if defined(CLIENT_ONLY) X.if !defined(NOPORTDOCS) X @for dir in rfc drafts; do \ X ${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \ X | ${SED} -e "s,^${WRKSRC}/doc/,%%DOCSDIR%%/," \ X >>${PLIST}; \ X ${ECHO_CMD} "@dirrm %%DOCSDIR%%/$${dir}" >>${PLIST}; \ X done X @${ECHO_CMD} "@dirrm %%DOCSDIR%%" >>${PLIST} X.endif X.endif X Xpost-install: X.if defined(CLIENT_ONLY) X.if !defined(NOPORTDOCS) X @${MKDIR} ${DOCSDIR} X @for dir in rfc drafts; do \ X ${MKDIR} ${DOCSDIR}/$${dir}; \ X ${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \ X -exec ${INSTALL_DATA} {} ${DOCSDIR}/$${dir} \; ; \ X done X.endif X.else X.for script in slapd.sh slurpd.sh X @${INSTALL_SCRIPT} ${WRKDIR}/${script} ${PREFIX}/etc/rc.d/${script} X.endfor X @${MKDIR} ${LDAP_RUN_DIR} X @${CAT} ${PKGMESSAGE} X.endif X X.include END-of-net/openldap22-server/Makefile echo x - net/openldap22-server/distinfo sed 's/^X//' >net/openldap22-server/distinfo << 'END-of-net/openldap22-server/distinfo' XMD5 (openldap-2.2.0alpha.tgz) = 72fe342067b717a37b9697898dacfa0a END-of-net/openldap22-server/distinfo echo c - net/openldap22-server/files mkdir -p net/openldap22-server/files > /dev/null 2>&1 echo x - net/openldap22-server/files/extrapatch-Makefile.in sed 's/^X//' >net/openldap22-server/files/extrapatch-Makefile.in << 'END-of-net/openldap22-server/files/extrapatch-Makefile.in' X--- Makefile.in.orig Mon Apr 7 22:23:24 2003 X+++ Makefile.in Thu Jul 10 17:43:35 2003 X@@ -10,9 +10,11 @@ X ## in file LICENSE in the top-level directory of the distribution. X ## X X-SUBDIRS= include libraries clients servers tests doc X-CLEANDIRS= X-INSTALLDIRS= X+SUBDIRS= X+ALLDIRS= include libraries clients servers tests doc X+CLEANDIRS= include libraries clients servers tests doc X+DEPENDDIRS= include libraries clients servers tests doc X+INSTALLDIRS= servers X X makefiles: FORCE X ./config.status END-of-net/openldap22-server/files/extrapatch-Makefile.in echo x - net/openldap22-server/files/patch-build::top.mk sed 's/^X//' >net/openldap22-server/files/patch-build::top.mk << 'END-of-net/openldap22-server/files/patch-build::top.mk' X--- build/top.mk.orig Mon Apr 7 22:23:26 2003 X+++ build/top.mk Mon Jul 7 05:35:52 2003 X@@ -192,6 +192,8 @@ X SLAPD_LIBS = @SLAPD_LIBS@ @SLAPD_PERL_LDFLAGS@ @SLAPD_SQL_LDFLAGS@ @SLAPD_SQL_LIBS@ @SLAPD_SLP_LIBS@ X SLURPD_LIBS = @SLURPD_LIBS@ X X+SLAPI_LIBS = @SLAPI_LIBS@ X+ X # Our Defaults X CC = $(AC_CC) X DEFS = $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS) $(DEFINES) END-of-net/openldap22-server/files/patch-build::top.mk echo x - net/openldap22-server/files/patch-libraries::liblunicode::ucstr.c sed 's/^X//' >net/openldap22-server/files/patch-libraries::liblunicode::ucstr.c << 'END-of-net/openldap22-server/files/patch-libraries::liblunicode::ucstr.c' X--- libraries/liblunicode/ucstr.c.orig Fri Apr 11 03:57:10 2003 X+++ libraries/liblunicode/ucstr.c Sun Jul 6 02:50:32 2003 X@@ -10,7 +10,7 @@ X #include X #include X X-#include X+#include X X #include X #include END-of-net/openldap22-server/files/patch-libraries::liblunicode::ucstr.c echo x - net/openldap22-server/files/patch-libraries::liblutil::passwd.c sed 's/^X//' >net/openldap22-server/files/patch-libraries::liblutil::passwd.c << 'END-of-net/openldap22-server/files/patch-libraries::liblutil::passwd.c' X# X# ITS#2562: add missing arg to hash_lanman X# X--- libraries/liblutil/passwd.c.orig Fri May 2 13:29:29 2003 X+++ libraries/liblutil/passwd.c Sun Jun 22 03:08:18 2003 X@@ -632,7 +632,7 @@ X { X struct berval *hash; X X- hash = hash_lanman( scheme, cred ); X+ hash = hash_lanman( scheme, cred, text ); X return memcmp( &hash->bv_val[scheme->bv_len], passwd->bv_val, 32); X } X #endif /* SLAPD_LMHASH */ END-of-net/openldap22-server/files/patch-libraries::liblutil::passwd.c echo x - net/openldap22-server/files/patch-servers::slapd::back-perl sed 's/^X//' >net/openldap22-server/files/patch-servers::slapd::back-perl << 'END-of-net/openldap22-server/files/patch-servers::slapd::back-perl' Xdiff -Nur servers/slapd/back-perl/add.c.orig servers/slapd/back-perl/add.c X--- servers/slapd/back-perl/add.c.orig Sun May 25 03:56:59 2003 X+++ servers/slapd/back-perl/add.c Thu Jun 5 11:44:06 2003 X@@ -13,17 +13,19 @@ X * in file LICENSE in the top-level directory of the distribution. X */ X X-#include "portable.h" X- X-#include X+#include X+#include X+#undef _ /* #defined used by both Perl and ac/localize.h */ X X-#include "slap.h" X #ifdef HAVE_WIN32_ASPERL X #include "asperl_undefs.h" X #endif X X-#include X-#include X+#include "portable.h" X+ X+#include X+ X+#include "slap.h" X X #include "perl_back.h" X Xdiff -Nur servers/slapd/back-perl/bind.c.orig servers/slapd/back-perl/bind.c X--- servers/slapd/back-perl/bind.c.orig Sun May 25 03:56:59 2003 X+++ servers/slapd/back-perl/bind.c Thu Jun 5 11:44:06 2003 X@@ -13,18 +13,19 @@ X * in file LICENSE in the top-level directory of the distribution. X */ X X-#include "portable.h" X-/* init.c - initialize Perl backend */ X- X-#include X+#include X+#include X+#undef _ /* #defined used by both Perl and ac/localize.h */ X X-#include "slap.h" X #ifdef HAVE_WIN32_ASPERL X #include "asperl_undefs.h" X #endif X X-#include X-#include X+#include "portable.h" X+ X+#include X+ X+#include "slap.h" X X #include "perl_back.h" X Xdiff -Nur servers/slapd/back-perl/close.c.orig servers/slapd/back-perl/close.c X--- servers/slapd/back-perl/close.c.orig Sun May 25 03:56:59 2003 X+++ servers/slapd/back-perl/close.c Thu Jun 5 11:44:06 2003 X@@ -13,18 +13,19 @@ X * in file LICENSE in the top-level directory of the distribution. X */ X X-#include "portable.h" X-/* init.c - initialize shell backend */ X- X-#include X+#include X+#include X+#undef _ /* #defined used by both Perl and ac/localize.h */ X X-#include "slap.h" X #ifdef HAVE_WIN32_ASPERL X #include "asperl_undefs.h" X #endif X X-#include X-#include X+#include "portable.h" X+ X+#include X+ X+#include "slap.h" X X #include "perl_back.h" X Xdiff -Nur servers/slapd/back-perl/compare.c.orig servers/slapd/back-perl/compare.c X--- servers/slapd/back-perl/compare.c.orig Sun May 25 03:56:59 2003 X+++ servers/slapd/back-perl/compare.c Thu Jun 5 11:44:06 2003 X@@ -13,17 +13,19 @@ X * in file LICENSE in the top-level directory of the distribution. X */ X X-#include "portable.h" X- X-#include X+#include X+#include X+#undef _ /* #defined used by both Perl and ac/localize.h */ X X-#include "slap.h" X #ifdef HAVE_WIN32_ASPERL X #include "asperl_undefs.h" X #endif X X-#include X-#include X+#include "portable.h" X+ X+#include X+ X+#include "slap.h" X X #include "lutil.h" X #include "perl_back.h" Xdiff -Nur servers/slapd/back-perl/config.c.orig servers/slapd/back-perl/config.c X--- servers/slapd/back-perl/config.c.orig Sun May 25 03:56:59 2003 X+++ servers/slapd/back-perl/config.c Thu Jun 5 11:44:06 2003 X@@ -13,17 +13,19 @@ X * in file LICENSE in the top-level directory of the distribution. X */ X X-#include "portable.h" X- X-#include X+#include X+#include X+#undef _ /* #defined used by both Perl and ac/localize.h */ X X-#include "slap.h" X #ifdef HAVE_WIN32_ASPERL X #include "asperl_undefs.h" X #endif X X-#include X-#include X+#include "portable.h" X+ X+#include X+ X+#include "slap.h" X X #include "perl_back.h" X Xdiff -Nur servers/slapd/back-perl/delete.c.orig servers/slapd/back-perl/delete.c X--- servers/slapd/back-perl/delete.c.orig Sun May 25 03:56:59 2003 X+++ servers/slapd/back-perl/delete.c Thu Jun 5 11:44:06 2003 X@@ -13,17 +13,19 @@ X * in file LICENSE in the top-level directory of the distribution. X */ X X-#include "portable.h" X- X-#include X+#include X+#include X+#undef _ /* #defined used by both Perl and ac/localize.h */ X X-#include "slap.h" X #ifdef HAVE_WIN32_ASPERL X #include "asperl_undefs.h" X #endif X X-#include X-#include X+#include "portable.h" X+ X+#include X+ X+#include "slap.h" X X #include "perl_back.h" X Xdiff -Nur servers/slapd/back-perl/init.c.orig servers/slapd/back-perl/init.c X--- servers/slapd/back-perl/init.c.orig Sun May 25 03:56:59 2003 X+++ servers/slapd/back-perl/init.c Thu Jun 12 22:25:21 2003 X@@ -13,18 +13,19 @@ X * in file LICENSE in the top-level directory of the distribution. X */ X X-#include "portable.h" X- /* init.c - initialize shell backend */ X- X-#include X+#include X+#include X+#undef _ /* #defined used by both Perl and ac/localize.h */ X X-#include "slap.h" X #ifdef HAVE_WIN32_ASPERL X #include "asperl_undefs.h" X #endif X X-#include X-#include X+#include "portable.h" X+ X+#include X+ X+#include "slap.h" X X #include "perl_back.h" X X@@ -37,7 +38,7 @@ X X #ifdef SLAPD_PERL_DYNAMIC X X-int back_perl_LTX_init_module(int argc, char *argv[]) X+int init_module(int argc, char *argv[]) X { X BackendInfo bi; X Xdiff -Nur servers/slapd/back-perl/modify.c.orig servers/slapd/back-perl/modify.c X--- servers/slapd/back-perl/modify.c.orig Sun May 25 03:56:59 2003 X+++ servers/slapd/back-perl/modify.c Thu Jun 5 11:44:06 2003 X@@ -13,17 +13,19 @@ X * in file LICENSE in the top-level directory of the distribution. X */ X X-#include "portable.h" X- X-#include X+#include X+#include X+#undef _ /* #defined used by both Perl and ac/localize.h */ X X-#include "slap.h" X #ifdef HAVE_WIN32_ASPERL X #include "asperl_undefs.h" X #endif X X-#include X-#include X+#include "portable.h" X+ X+#include X+ X+#include "slap.h" X X #include "perl_back.h" X Xdiff -Nur servers/slapd/back-perl/modrdn.c.orig servers/slapd/back-perl/modrdn.c X--- servers/slapd/back-perl/modrdn.c.orig Sun May 25 03:56:59 2003 X+++ servers/slapd/back-perl/modrdn.c Thu Jun 5 11:44:06 2003 X@@ -26,17 +26,19 @@ X * X */ X X-#include "portable.h" X- X-#include X+#include X+#include X+#undef _ /* #defined used by both Perl and ac/localize.h */ X X-#include "slap.h" X #ifdef HAVE_WIN32_ASPERL X #include "asperl_undefs.h" X #endif X X-#include X-#include X+#include "portable.h" X+ X+#include X+ X+#include "slap.h" X X #include "perl_back.h" X Xdiff -Nur servers/slapd/back-perl/search.c.orig servers/slapd/back-perl/search.c X--- servers/slapd/back-perl/search.c.orig Sun May 25 03:56:59 2003 X+++ servers/slapd/back-perl/search.c Thu Jun 5 11:44:06 2003 X@@ -13,17 +13,19 @@ X * in file LICENSE in the top-level directory of the distribution. X */ X X-#include "portable.h" X- X-#include X+#include X+#include X+#undef _ /* #defined used by both Perl and ac/localize.h */ X X-#include "slap.h" X #ifdef HAVE_WIN32_ASPERL X #include "asperl_undefs.h" X #endif X X-#include X-#include X+#include "portable.h" X+ X+#include X+ X+#include "slap.h" X X #include "perl_back.h" X END-of-net/openldap22-server/files/patch-servers::slapd::back-perl echo x - net/openldap22-server/files/patch-servers::slapd::daemon.c sed 's/^X//' >net/openldap22-server/files/patch-servers::slapd::daemon.c << 'END-of-net/openldap22-server/files/patch-servers::slapd::daemon.c' X--- servers/slapd/daemon.c.orig Sat May 24 21:12:20 2003 X+++ servers/slapd/daemon.c Sun Jun 22 19:26:22 2003 X@@ -858,7 +858,7 @@ X #ifdef LDAP_PF_LOCAL X case AF_LOCAL: { X char *addr = ((struct sockaddr_un *)*sal)->sun_path; X-#if 0 /* don't muck with socket perms */ X+#if 1 X if ( chmod( addr, l.sl_perms ) < 0 && crit ) { X int err = sock_errno(); X #ifdef NEW_LOGGING END-of-net/openldap22-server/files/patch-servers::slapd::daemon.c echo x - net/openldap22-server/files/slapd.sh sed 's/^X//' >net/openldap22-server/files/slapd.sh << 'END-of-net/openldap22-server/files/slapd.sh' X#!/bin/sh X# X# $FreeBSD$ X Xslapd_program=%%PREFIX%%/libexec/slapd X Xslapd_pidfile=%%LDAP_RUN_DIR%%/slapd.pid X Xslapd_enable="NO" X Xslapd_args= X X# Add the following lines to /etc/rc.conf to enable slapd: X# X#slapd_enable="YES" X#slapd_args='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/????x-mod=0777 ldap://0.0.0.0/"' X# X# See sldap(8) for details X# X# Create a user 'ldap' and add '-u ldap -g ldap' to slapd_args X# if you want to run slapd as a non-privileged user (recommended) X# X X# Suck in the configuration variables. Xif [ -r /etc/defaults/rc.conf ]; then X . /etc/defaults/rc.conf X source_rc_confs Xelif [ -r /etc/rc.conf ]; then X . /etc/rc.conf Xfi X Xcase "$slapd_enable" in X[Yy][Ee][Ss]) X case "$1" in X start) X if [ -x ${slapd_program} ]; then X echo -n ' slapd' X eval ${slapd_program} ${slapd_args} X fi X ;; X stop) X if [ -f $slapd_pidfile ]; then X kill `cat $slapd_pidfile` X echo -n ' slapd' X else X echo ' slapd: not running' X fi X ;; X *) X echo "Usage: `basename $0` {start|stop}" >&2 X exit 64 X ;; X esac X ;; X*) X ;; Xesac X Xexit 0 END-of-net/openldap22-server/files/slapd.sh echo x - net/openldap22-server/files/slurpd.sh sed 's/^X//' >net/openldap22-server/files/slurpd.sh << 'END-of-net/openldap22-server/files/slurpd.sh' X#!/bin/sh X# X# $FreeBSD$ X Xslurpd_program=%%PREFIX%%/libexec/slurpd X Xslurpd_enable="NO" X Xslurpd_args= X X# Add the following line to /etc/rc.conf to enable slurpd: X# X#slurpd_enable="YES" X# X# See slurpd(8) for details X# X X# Suck in the configuration variables. Xif [ -r /etc/defaults/rc.conf ]; then X . /etc/defaults/rc.conf X source_rc_confs Xelif [ -r /etc/rc.conf ]; then X . /etc/rc.conf Xfi X Xcase "$slurpd_enable" in X[Yy][Ee][Ss]) X case "$1" in X start) X if [ -x ${slurpd_program} ]; then X echo -n ' slurpd' X ${slurpd_program} ${slurpd_args} X fi X ;; X stop) X if ! killall `basename ${slurpd_program}`; then X echo ' slurpd: not running' X fi X ;; X *) X echo "Usage: `basename $0` {start|stop}" >&2 X exit 64 X ;; X esac X ;; X*) X ;; Xesac X Xexit 0 END-of-net/openldap22-server/files/slurpd.sh echo x - net/openldap22-server/pkg-descr sed 's/^X//' >net/openldap22-server/pkg-descr << 'END-of-net/openldap22-server/pkg-descr' XOpenLDAP is a suite of Lightweight Directory Access Protocol (v3) servers, Xclients, utilities and development tools. X XThis release includes the following major components: X X * slapd - a stand-alone LDAP directory server X * slurpd - a stand-alone LDAP replication server X * LDIF tools - data conversion tools for use with slapd X XThis release is meant for testing purposes only, it is not for general use. X XWWW: http://www.OpenLDAP.org/ X X- Oliver Eikemeier Xeikemeier@fillmore-labs.com END-of-net/openldap22-server/pkg-descr echo x - net/openldap22-server/pkg-install sed 's/^X//' >net/openldap22-server/pkg-install << 'END-of-net/openldap22-server/pkg-install' X#!/bin/sh X# X# $FreeBSD$ X# Xif [ X"$2" != X"POST-INSTALL" ]; then X exit 0; Xfi X Xmkdir -p "%%LDAP_RUN_DIR%%" Xmkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-data" Xmkdir -p -m 700 "%%LOCALSTATEDIR%%/openldap-slurp" END-of-net/openldap22-server/pkg-install echo x - net/openldap22-server/pkg-message sed 's/^X//' >net/openldap22-server/pkg-message << 'END-of-net/openldap22-server/pkg-message' X************************************************************ X XThe OpenLDAP server package has been successfully installed. X XIn order to run the LDAP server, you need to edit X %%PREFIX%%/etc/openldap/slapd.conf Xto suit your needs and add the next lines to /etc/rc.conf: X slapd_enable="YES" X slapd_args='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/????x-mod=0777 ldap://0.0.0.0/"' X XThen start the server with X %%PREFIX%%/etc/rc.d/slapd.sh start Xor reboot. X XNOTE: There is no real reason to run slapd as root. Add X '-u ldap -g ldap' Xto slapd_args, create a user "ldap" with X pw add group ldap -g 389 X pw add user ldap -u 389 -g 389 -d /nonexistent \ X -c "OpenLDAP Server" -s /sbin/nologin -p "*" Xand do X chown -R ldap:ldap %%LDAP_RUN_DIR%% \ X %%LOCALSTATEDIR%%/openldap-data %%PREFIX%%/etc/openldap/slapd.conf Xand your server runs with a non-privileged user id. X X************************************************************ END-of-net/openldap22-server/pkg-message echo x - net/openldap22-server/pkg-plist sed 's/^X//' >net/openldap22-server/pkg-plist << 'END-of-net/openldap22-server/pkg-plist' X@comment $FreeBSD$ X@unexec %D/etc/rc.d/slapd.sh stop 2>/dev/null || true X@unexec %D/etc/rc.d/slurpd.sh stop 2>/dev/null || true Xetc/openldap/schema/README X@unexec if cmp -s %D/etc/openldap/schema/corba.schema %D/etc/openldap/schema/corba.schema.default; then rm -f %D/etc/openldap/schema/corba.schema; fi Xetc/openldap/schema/corba.schema.default X@exec [ -f %B/corba.schema ] || cp %B/%f %B/corba.schema X@unexec if cmp -s %D/etc/openldap/schema/core.schema %D/etc/openldap/schema/core.schema.default; then rm -f %D/etc/openldap/schema/core.schema; fi Xetc/openldap/schema/core.schema.default X@exec [ -f %B/core.schema ] || cp %B/%f %B/core.schema X@unexec if cmp -s %D/etc/openldap/schema/cosine.schema %D/etc/openldap/schema/cosine.schema.default; then rm -f %D/etc/openldap/schema/cosine.schema; fi Xetc/openldap/schema/cosine.schema.default X@exec [ -f %B/cosine.schema ] || cp %B/%f %B/cosine.schema X@unexec if cmp -s %D/etc/openldap/schema/inetorgperson.schema %D/etc/openldap/schema/inetorgperson.schema.default; then rm -f %D/etc/openldap/schema/inetorgperson.schema; fi Xetc/openldap/schema/inetorgperson.schema.default X@exec [ -f %B/inetorgperson.schema ] || cp %B/%f %B/inetorgperson.schema X@unexec if cmp -s %D/etc/openldap/schema/java.schema %D/etc/openldap/schema/java.schema.default; then rm -f %D/etc/openldap/schema/java.schema; fi Xetc/openldap/schema/java.schema.default X@exec [ -f %B/java.schema ] || cp %B/%f %B/java.schema X@unexec if cmp -s %D/etc/openldap/schema/misc.schema %D/etc/openldap/schema/misc.schema.default; then rm -f %D/etc/openldap/schema/misc.schema; fi Xetc/openldap/schema/misc.schema.default X@exec [ -f %B/misc.schema ] || cp %B/%f %B/misc.schema X@unexec if cmp -s %D/etc/openldap/schema/nis.schema %D/etc/openldap/schema/nis.schema.default; then rm -f %D/etc/openldap/schema/nis.schema; fi Xetc/openldap/schema/nis.schema.default X@exec [ -f %B/nis.schema ] || cp %B/%f %B/nis.schema X@unexec if cmp -s %D/etc/openldap/schema/openldap.schema %D/etc/openldap/schema/openldap.schema.default; then rm -f %D/etc/openldap/schema/openldap.schema; fi Xetc/openldap/schema/openldap.schema.default X@exec [ -f %B/openldap.schema ] || cp %B/%f %B/openldap.schema X@unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi Xetc/openldap/slapd.conf.default X@exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf X@unexec rmdir %D/etc/openldap/schema 2>/dev/null || true X@unexec rmdir %D/etc/openldap 2>/dev/null || true Xetc/rc.d/slapd.sh Xetc/rc.d/slurpd.sh X%%SLAPI%%lib/libslapi.a X%%SLAPI%%lib/libslapi.so X%%SLAPI%%lib/libslapi.so.2 Xlibexec/slapd Xlibexec/slurpd Xsbin/slapadd Xsbin/slapcat Xsbin/slapindex Xsbin/slappasswd X@unexec rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true X@unexec rmdir %%LOCALSTATEDIR%%/openldap-data 2>/dev/null || true X@unexec rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true END-of-net/openldap22-server/pkg-plist exit