robbat2     14/10/27 05:33:59

  Added:                openldap-2.4.40-db-6.patch slapd-initd-2.4.40-r1
  Log:
  Bug #525110: Improve handling for DB-6; Bug #525408: fix init script; Bug 
#525126: use external lmdb
  
  (Portage version: 2.2.10/cvs/Linux x86_64, unsigned Manifest commit)

Revision  Changes    Path
1.1                  net-nds/openldap/files/openldap-2.4.40-db-6.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-nds/openldap/files/openldap-2.4.40-db-6.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-nds/openldap/files/openldap-2.4.40-db-6.patch?rev=1.1&content-type=text/plain

Index: openldap-2.4.40-db-6.patch
===================================================================
Re-allow building with >= BerkeleyDB-6.0.20.

If you do build/link against this version, please note that the licenses
PROHIBIT distribution of the binaries. We will enforce RESTRICT=bindist for
this.

X-Gentoo-Bug: 525110
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=525110

diff -ur openldap-2.4.40/build/openldap.m4 openldap-2.4.40.fix/build/openldap.m4
--- openldap-2.4.40/build/openldap.m4   2014-09-19 05:48:49.000000000 +0400
+++ openldap-2.4.40.fix/build/openldap.m4       2014-10-16 15:51:38.223985217 
+0400
@@ -553,13 +553,10 @@
 
 #define DB_VERSION_FULL        
((DB_VERSION_MAJOR<<16)|(DB_VERSION_MINOR<<8)|DB_VERSION_PATCH)
 
-/* require 4.4 or later, but less than 6.0.20 */
-#if DB_VERSION_FULL >= 0x040400 && DB_VERSION_FULL < 0x060014
+/* require 4.4 or later */
+#if DB_VERSION_FULL >= 0x040400
        __db_version_compat
 #endif
-#if DB_VERSION_FULL >= 0x060014
-#error "BerkeleyDB 6.0.20+ license is incompatible with LDAP"
-#endif
        ], [ol_cv_bdb_compat=yes], [ol_cv_bdb_compat=no])])
 ])
 



1.1                  net-nds/openldap/files/slapd-initd-2.4.40-r1

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-nds/openldap/files/slapd-initd-2.4.40-r1?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-nds/openldap/files/slapd-initd-2.4.40-r1?rev=1.1&content-type=text/plain

Index: slapd-initd-2.4.40-r1
===================================================================
#!/sbin/runscript
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: 
/var/cvsroot/gentoo-x86/net-nds/openldap/files/slapd-initd-2.4.40-r1,v 1.1 
2014/10/27 05:33:59 robbat2 Exp $

extra_commands="checkconfig"

[ -z "$INSTANCE" ] && INSTANCE="openldap${SVCNAME#slapd}"
PIDDIR=/run/openldap
PIDFILE=$PIDDIR/$SVCNAME.pid

depend() {
        need net
        before dbus hald avahi-daemon
        provide ldap
}

start() {
        checkpath -q -d ${PIDDIR} -o ldap:ldap 
        if ! checkconfig -Q ; then
                eerror "There is a problem with your slapd.conf!"
                return 1
        fi
        ebegin "Starting ldap-server"
        [ -n "$KRB5_KTNAME" ] && export KRB5_KTNAME
        eval start-stop-daemon --start --pidfile ${PIDFILE} --exec 
/usr/lib/openldap/slapd -- -u ldap -g ldap "${OPTS}"
        eend $?
}

stop() {
        ebegin "Stopping ldap-server"
        start-stop-daemon --stop --signal 2 --quiet --pidfile ${PIDFILE}
        eend $?
}

checkconfig() {
        # checks requested by bug #502948
        # Step 1: extract the last valid config file or config dir
        set -- $OPTS
        while [ -n "$*" ]; do
                opt=$1 ; shift
                if [ "$opt" = "-f" -o "$opt" = "-F" ] ; then
                        CONF=$1
                        shift
                fi
        done
        set --
        # Fallback
        CONF=${CONF-/etc/openldap/slapd.conf}
        [ -d $CONF ] && CONF=${CONF}/*
        DBDIRS=`eval awk '/^(directory|olcDbDirectory:)/{print $2}' $CONF`
        for d in $DBDIRS; do
                if [ ! -d $d ]; then
                        eerror "Directory $d in config does not exist!"
                        return 1
                fi
                /usr/bin/find $d ! -name DB_CONFIG ! -user ldap -o ! -group 
ldap |grep -sq .
                if [ $? -ne 0 ]; then
                        ewarn "You have files in $d not owned by the ldap user, 
you must ensure they are accessible to the slapd instance!"
                fi
                [ ! -e $d/DB_CONFIG ] && ewarn "$d/DB_CONFIG does not exist, 
slapd performance may be sub-optimal" 
        done
        # now test the config fully
        /usr/sbin/slaptest -u "$@" ${OPTS_CONF}
}




Reply via email to