ports/167102: [patch] net/openldap24-server 2.4.30 add MDB backend support and fix plist

Hirohisa Yamaguchi umq at ueo.co.jp
Thu Apr 19 17:30:11 UTC 2012


>Number:         167102
>Category:       ports
>Synopsis:       [patch] net/openldap24-server 2.4.30 add MDB backend support and fix plist
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 19 17:30:10 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Hirohisa Yamaguchi
>Release:        FreeBSD 9.0-RELEASE amd64
>Organization:
<organization of PR author (multiple lines)>
>Environment:
System: FreeBSD calliope.****.org 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root at farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64

>Description:
	1. I want a knob for mdb-backend in net/openldap24-server
	2. the pkg-plist appears to have some leftovers

>How-To-Repeat:
	for 2.
	 make -C /usr/ports/net/openldap24-server clean install
	 pkg_delete openldap-server-2.4.30

>Fix:

	The patch follows:
	 1. add Memory-Mapped DB backend support
	 2. fix pkg-plist
	 3. delete sites which do not have the distfile from MASTER_SITES
	 4. drop pkg-install in favor of USERS/GROUPS


Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/net/openldap24-server/Makefile,v
retrieving revision 1.198
diff -u -r1.198 Makefile
--- Makefile	18 Apr 2012 17:39:09 -0000	1.198
+++ Makefile	19 Apr 2012 17:07:53 -0000
@@ -11,17 +11,11 @@
 CATEGORIES=		net databases
 MASTER_SITES=		ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
 			ftp://gd.tuwien.ac.at/infosys/network/OpenLDAP/%SUBDIR%/ \
-			ftp://ftp.matrix.com.br/pub/openldap/%SUBDIR%/ \
-			ftp://ftp.ucr.ac.cr/pub/Unix/openldap/%SUBDIR%/ \
 			ftp://ftp.ntua.gr/mirror/OpenLDAP/%SUBDIR%/ \
 			ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/%SUBDIR%/ \
 			ftp://ftp.u-aizu.ac.jp/pub/net/openldap/%SUBDIR%/ \
-			ftp://ftp.holywar.net/pub/OpenLDAP/%SUBDIR%/ \
 			ftp://ftp.nl.uu.net/pub/unix/db/openldap/%SUBDIR%/ \
-			ftp://ftp.linux.pt/pub/mirrors/OpenLDAP/%SUBDIR%/ \
-			ftp://ftp.rediris.es/mirror/OpenLDAP/%SUBDIR%/ \
-			ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/%SUBDIR%/ \
-			ftp://ftp.plig.org/pub/OpenLDAP/%SUBDIR%/
+			ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/%SUBDIR%/
 MASTER_SITE_SUBDIR=	openldap-release
 PKGNAMESUFFIX?=		-server
 EXTRACT_SUFX=		.tgz
@@ -39,6 +33,8 @@
 USE_OPENSSL=		yes
 MAKE_JOBS_SAFE=		yes
 USE_AUTOTOOLS=		libtool
+USERS=			ldap
+GROUPS=			ldap
 
 WANT_OPENLDAP_VER?=	24
 .if ${WANT_OPENLDAP_VER} != 24
@@ -46,7 +42,7 @@
 .endif
 
 PORTREVISION_CLIENT=	0
-PORTREVISION_SERVER=	0
+PORTREVISION_SERVER=	1
 OPENLDAP_SHLIB_MAJOR=	8
 
 OPTIONS=	SASL "With (Cyrus) SASL2 support" off \
@@ -57,6 +53,7 @@
 		ACI "Per-object ACI (experimental)" off \
 		BDB "With BerkeleyDB backend" on \
 		DNSSRV "With Dnssrv backend" off \
+		MDB "With Memory-Mapped DB backend" off \
 		PASSWD "With Passwd backend" off \
 		PERL "With Perl backend" off \
 		RELAY "With Relay backend" off \
@@ -140,7 +137,7 @@
 
 SCHEMATA=		collective corba core cosine duaconf dyngroup \
 			inetorgperson java misc \
-			nis openldap ppolicy
+			nis openldap pmi ppolicy
 
 LDAP_RUN_DIR?=		/var/run/openldap
 LOCALSTATEDIR?=		/var/db
@@ -186,7 +183,7 @@
 # server specific configuration
 
 USE_LDCONFIG=		${PREFIX}/libexec/openldap
-SUB_FILES+=		pkg-install pkg-message pkg-deinstall
+SUB_FILES+=		pkg-message pkg-deinstall
 USE_RC_SUBR=		slapd.sh
 
 EXTRA_PATCHES+=		${FILESDIR}/extrapatch-Makefile.in
@@ -355,6 +352,13 @@
 PLIST_SUB+=		BACK_DNSSRV="@comment "
 .endif
 
+.if defined(WITH_MDB)
+CONFIGURE_ARGS+=	--enable-mdb=${BACKEND_ENABLE}
+PLIST_SUB+=		BACK_MDB=${BACKEND_PLIST}
+.else
+PLIST_SUB+=		BACK_MDB="@comment "
+.endif
+
 .if defined(WITH_PASSWD)
 CONFIGURE_ARGS+=	--enable-passwd=${BACKEND_ENABLE}
 PLIST_SUB+=		BACK_PASSWD=${BACKEND_PLIST}
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/net/openldap24-server/pkg-plist,v
retrieving revision 1.49
diff -u -r1.49 pkg-plist
--- pkg-plist	18 Apr 2012 17:39:09 -0000	1.49
+++ pkg-plist	19 Apr 2012 17:07:53 -0000
@@ -1,26 +1,37 @@
 @comment $FreeBSD: ports/net/openldap24-server/pkg-plist,v 1.49 2012/04/18 17:39:09 delphij Exp $
 @unexec %%RC_DIR%%/etc/rc.d/slapd stop 2>&1 >/dev/null || true
-etc/openldap/slapd.ldif.default
-etc/openldap/slapd.ldif
+etc/openldap/schema/README
+etc/openldap/schema/collective.ldif
+etc/openldap/schema/collective.schema
+etc/openldap/schema/corba.ldif
+etc/openldap/schema/corba.schema
+etc/openldap/schema/core.ldif
+etc/openldap/schema/core.schema
+etc/openldap/schema/cosine.ldif
+etc/openldap/schema/cosine.schema
+etc/openldap/schema/duaconf.ldif
+etc/openldap/schema/duaconf.schema
+etc/openldap/schema/dyngroup.ldif
+etc/openldap/schema/dyngroup.schema
+etc/openldap/schema/inetorgperson.ldif
+etc/openldap/schema/inetorgperson.schema
+etc/openldap/schema/java.ldif
+etc/openldap/schema/java.schema
+etc/openldap/schema/misc.ldif
+etc/openldap/schema/misc.schema
+etc/openldap/schema/nis.ldif
+etc/openldap/schema/nis.schema
+etc/openldap/schema/openldap.ldif
+etc/openldap/schema/openldap.schema
+etc/openldap/schema/pmi.ldif
+etc/openldap/schema/pmi.schema
+etc/openldap/schema/ppolicy.ldif
+etc/openldap/schema/ppolicy.schema
 @unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi
 etc/openldap/slapd.conf.default
 @exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf
-etc/openldap/schema/ppolicy.ldif
-etc/openldap/schema/pmi.schema.default
-etc/openldap/schema/pmi.schema
-etc/openldap/schema/pmi.ldif
-etc/openldap/schema/openldap.ldif
-etc/openldap/schema/nis.ldif
-etc/openldap/schema/misc.ldif
-etc/openldap/schema/java.ldif
-etc/openldap/schema/inetorgperson.ldif
-etc/openldap/schema/dyngroup.ldif
-etc/openldap/schema/duaconf.ldif
-etc/openldap/schema/cosine.ldif
-etc/openldap/schema/core.ldif
-etc/openldap/schema/corba.ldif
-etc/openldap/schema/collective.ldif
-etc/openldap/schema/README
+etc/openldap/slapd.ldif
+etc/openldap/slapd.ldif.default
 etc/openldap/DB_CONFIG.example
 %%SLAPI%%lib/libslapi.a
 %%SLAPI%%lib/libslapi.la
@@ -56,6 +67,10 @@
 %%BACK_DNSSRV%%libexec/openldap/back_dnssrv-2.4.so.%%SHLIB_MAJOR%%
 %%BACK_DNSSRV%%libexec/openldap/back_dnssrv.la
 %%BACK_DNSSRV%%libexec/openldap/back_dnssrv.so
+%%BACK_MDB%%libexec/openldap/back_mdb-2.4.so
+%%BACK_MDB%%libexec/openldap/back_mdb-2.4.so.%%SHLIB_MAJOR%%
+%%BACK_MDB%%libexec/openldap/back_mdb.la
+%%BACK_MDB%%libexec/openldap/back_mdb.so
 %%BACK_PASSWD%%libexec/openldap/back_passwd-2.4.so
 %%BACK_PASSWD%%libexec/openldap/back_passwd-2.4.so.%%SHLIB_MAJOR%%
 %%BACK_PASSWD%%libexec/openldap/back_passwd.la
Index: files/pkg-install.in
===================================================================
RCS file: files/pkg-install.in
diff -N files/pkg-install.in
--- files/pkg-install.in	26 May 2006 02:44:25 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,44 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/net/openldap24-server/files/pkg-install.in,v 1.1 2006/05/26 02:44:25 delphij Exp $
-#
-
-CHOWN=/usr/sbin/chown
-ECHO_CMD=echo
-GREP=/usr/bin/grep
-PKG_INFO=/usr/sbin/pkg_info
-PW=/usr/sbin/pw
-
-FTPUSERS=/etc/ftpusers
-
-case $2 in
-PRE-INSTALL)
-  if ! ${PW} usershow -n ldap >/dev/null 2>&1; then
-    ${ECHO_CMD}
-    if ! ${PW} groupshow -n ldap >/dev/null 2>&1; then
-      if ! ${PW} groupadd -n ldap -g 389; then
-        ${ECHO_CMD} "*** Failed to add a group ldap with id 389."
-        ${ECHO_CMD}
-        ${ECHO_CMD} "Please add the ldap user manually with"
-        ${ECHO_CMD} "  ${PW} useradd -n ldap -g ldap -c 'OpenLDAP server' \\"
-        ${ECHO_CMD} "  -d /nonexistent -s /sbin/nologin -h -"        
-        ${ECHO_CMD} "and retry installing this package."
-        exit 1
-      fi
-      ${ECHO_CMD} "===>  Group 'ldap' created."
-    fi
-    if ! ${PW} useradd -n ldap -u 389 -g ldap -c 'OpenLDAP Server' \
-        -d /nonexistent -s /sbin/nologin -h -; then
-      ${ECHO_CMD} "*** Failed to add an user ldap with id 389."
-      ${ECHO_CMD}
-      ${ECHO_CMD} "Please add the ldap user manually with"
-      ${ECHO_CMD} "  ${PW} useradd -n ldap -g ldap -c 'OpenLDAP server' \\"
-      ${ECHO_CMD} "  -d /nonexistent -s /sbin/nologin -h -"        
-      ${ECHO_CMD} "and retry installing this package."
-      exit 1
-    fi
-    ${GREP} -qs '^ldap$' ${FTPUSERS} || ${ECHO_CMD} ldap >> ${FTPUSERS}
-    ${ECHO_CMD} "===>  Account 'ldap' created."
-  fi
-  ;;
-esac
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list