Sophie

Sophie

distrib > Mandriva > 2007.0 > x86_64 > by-pkgid > b0cc1e3379830da9e41fcc2afd6c3978 > files > 45

openldap-2.3.27-1mdv2007.0.src.rpm

%define pkg_name	openldap
%define version	2.3.27
%define rel 1

%{?!mklibname:%{error:You are missing macros, build will fail, see http://qa.mandriva.com/twiki/bin/view/Main/BackPorting}}

%{?!distsuffix:%define distsuffix mdk}
%{?!distversion:%define distversion %(echo $[%{mdkversion}/10])}
%{?!mkrel:%define mkrel(c:) %{-c:0.%{-c*}.}%{!?_with_unstable:%(perl -e '$_="%{1}";m/(.\*\\D\+)?(\\d+)$/;$rel=${2}-1;re;print "$1$rel";').%{?subrel:%subrel}%{!?subrel:1}.%{distversion}%{?_with_unstable:%{1}}%{distsuffix}}}

%define release %mkrel %rel

#defaults
%define build_system 0
%define build_alternatives 0
%define build_modules 1
%define build_modpacks 0
%define build_slp 0
%global build_migration 0

%if %{?mdkversion:0}%{?!mdkversion:1}
# OK, we're not on a Mandriva box ... set this to the lowest we support
# and define a new macro we can use to know we're not in Mandriva
%define mdkversion 1000
%global notmdk 1
%endif

%if %mdkversion >= 200600
%define build_system 1
%else
%global build_migration 1
%define _with_migration 1
%endif

%if %mdkversion < 1010
%global __libtoolize /bin/true
%endif


%{?_with_system: %global build_system 1}
%{?_without_system: %global build_system 0}
%{?_with_modules: %global build_modules 1}
%{?_without_modules: %global build_modules 0}
%{?_with_slp: %global build_slp 1}
%{?_without_slp: %global build_slp 0}

%define major 		2.3_0
%define fname ldap
%define libname %mklibname %fname %major
%define migtools_ver 	45
# db42 with the txn_nolog patch is no longer necessary, just 4.2.52.4 (10.1)
%if %mdkversion >= 1010
%global db4_internal 0
%else
%global db4_internal 1
%endif
%{?_with_db4internal: %global db4_internal 1}
%{?_without_db4internal: %global db4_internal 0}
%define dbver 4.2.52
%define dbname %(a=%dbver;echo ${a%.*})

%define ol_ver_major 2.3
%if %build_system
%define ol_major %{nil}
%define ol_suffix %nil
%else
%define ol_major 2.3
%define ol_suffix 23
%endif

%if %build_alternatives || !%build_system
%define alternative_major 2.3
%else
%define alternatives_major %{nil}
%endif

%global clientbin	ldapadd,ldapcompare,ldapdelete,ldapmodify,ldapmodrdn,ldappasswd,ldapsearch,ldapwhoami
%if %db4_internal
%global serverbin	slapd_db_archive,slapd_db_checkpoint,slapd_db_deadlock,slapd_db_dump,slapd_db_load,slapd_db_printlog,slapd_db_recover,slapd_db_stat,slapd_db_upgrade,slapd_db_verify
%else
%global serverbin	%{nil}
%endif
%define serversbin	slapadd,slapcat,slapd,slapdn,slapindex,slappasswd,slaptest,slurpd,slapacl,slapauth

#localstatedir is passed directly to configure, and we want it to be /var/lib
#define _localstatedir %{_var}/run
%define	_libexecdir	%{_sbindir}

# Allow --with[out] SASL at rpm command line build
%{?_without_SASL: %{expand: %%define _without_cyrussasl --without-cyrus-sasl}}
%{?_with_SASL: %{expand: %%define _with_cyrussasl --with-cyrus-sasl}}
%{!?_with_cyrussasl: %{!?_without_cyrussasl: %global _with_cyrussasl --with-cyrus-sasl}}
%{?_with_cyrussasl: %define _with_cyrussasl --with-cyrus-sasl}
%{?_without_cyrussasl: %define _without_cyrussasl --without-cyrus-sasl}
%{?_with_gdbm: %global db_conv dbb}
%{!?_with_gdbm: %global db_conv gdbm}
%global sql 1
%{?_without_sql: %global sql 0}
%global back_perl 0

Summary: 	LDAP servers and sample clients
Name: 		%{pkg_name}%{ol_major}
Version: 	%{version}
Release: 	%{release}
License: 	Artistic
Group: 		System/Servers
URL: 		http://www.openldap.org

# Openldap source
Source0: 	ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/%{pkg_name}-%{version}.tgz


## To generate ths tarball, check the docs out of CVS:
# cvs -d :pserver:anonymous@cvs.OpenLDAP.org:/repo/OpenLDAP co \
# -r OPENLDAP_REL_ENG_2_3 guide
## patch the docs:
# cd guide/admin
# bzcat `rpm --eval %_sourcedir`/openldap-2.3-admin-guide-add-vendor-doc.patch.bz2 \
# | patch -p0
# tar xjvf `rpm --eval %_sourcedir`/openldap-2.3-vendor-docs.tar.bz2
## build the docs
# make guide.html
## tar them up
# mkdir openldap-guide
# cp *.html *.gif ../images/LDAPlogo.gif openldap-guide
# tar cjvf `rpm --eval %_sourcedir`/openldap-guide-2.3.tar.bz2 openldap-guide
## To update the README-openldap2.3.mdk as well:
# sdf -2text vendor-standalone.sdf
# mv vendor-standalone.txt `rpm --eval %_sourcedir`/README-openldap2.3.mdk
## ensure your changes get back into the package:
# cvs diff | bzip2 -c > \
# `rpm --eval %_sourcedir`/openldap-2.3-admin-guide-add-vendor-doc.patch.bz2
# tar cjvf `rpm --eval %_sourcedir`/openldap-2.3-vendor-docs.tar.bz2 vendor*.sdf

Source12:	openldap-guide-2.3.tar.bz2
Source13:	README-openldap2.3.mdk

# Specific source
Source1: 	ldap.init
Source2: 	%{pkg_name}.sysconfig
Source19:	gencert.sh
Source20:	ldap.logrotate
Source21:	slapd.conf
Source22:	DB_CONFIG
Source23:	ldap.conf
Source24:	slapd.access.conf
Source25:	ldap-hot-db-backup
Source26:	ldap-reinitialise-slave
Source27:	ldap-common

# Migration tools
Source11:	http://www.padl.com/download/MigrationTools-%{migtools_ver}.tar.bz2
Source3: 	migration-tools.txt
Source4: 	migrate_automount.pl

%if %db4_internal
Source30: http://www.sleepycat.com/update/snapshot/db-%{dbver}.tar.bz2
%endif

# Extended Schema 
Source50: 	rfc822-MailMember.schema
Source51: 	autofs.schema
Source52: 	kerberosobject.schema
# Get from qmail-ldap patch (http://www.nrg4u.com/qmail/)
Source53: 	qmail.schema
Source54: 	mull.schema
# Get from samba source, examples/LDAP/samba.schema
Source55: 	samba.schema
Source56: 	http://debian.jones.dk/debian/local/honda/pool-ldapv3/woody-jones/openldap2/schemas/netscape-profile.schema
Source57: 	http://debian.jones.dk/debian/local/honda/pool-ldapv3/woody-jones/openldap2/schemas/trust.schema
Source58: 	http://debian.jones.dk/debian/local/honda/pool-ldapv3/woody-jones/openldap2/schemas/dns.schema
Source59: 	http://debian.jones.dk/debian/local/honda/pool-ldapv3/woody-jones/openldap2/schemas/cron.schema
Source60:	http://debian.jones.dk/debian/local/honda/pool-ldapv3/woody-jones/openldap2/schemas/qmailControl.schema
Source61:	krb5-kdc.schema
Source62:	kolab.schema
# from evolution package
Source63:	evolutionperson.schema
# from rfc2739, updated for schema correctness, used by evo for calendar attrs 
Source64:	calendar.schema
# from README.LDAP in sudo (pre-1.6.8) CVS:
Source65:	sudo.schema
# from bind sdb_ldap page:http://www.venaas.no/ldap/bind-sdb/dnszone-schema.txt
Source66:	dnszone.schema
# from http://cvs.pld.org.pl/SOURCES/openldap-dhcp.schema
Source67: 	dhcp.schema
# from pam_ldap source
Source68: 	ldapns.schema

# Doc sources, used to build SOURCE12 and SOURCE13 above
Source100:	openldap-2.3-admin-guide-add-vendor-doc.patch.bz2
Source101:	openldap-2.3-vendor-docs.tar.bz2

# Chris Patches
Patch0: 	%{pkg_name}-2.3.4-config.patch.bz2
Patch1:		%{pkg_name}-2.0.7-module.patch.bz2

# For now, only build support for SMB (no krb5) changing support in smbk5passwd
# overlay:
Patch2:		openldap-2.3.4-smbk5passwd-only-smb.patch.bz2

# RH + PLD Patches
Patch15:	%{pkg_name}-cldap.patch.bz2

# Migration tools Patch
Patch40: 	MigrationTools-34-instdir.patch.bz2
Patch41: 	MigrationTools-36-mktemp.patch.bz2
Patch42: 	MigrationTools-27-simple.patch.bz2
Patch43: 	MigrationTools-26-suffix.patch.bz2
Patch45:	MigrationTools-45-i18n.patch.bz2
# schema patch
Patch46: 	openldap-2.0.21-schema.patch.bz2
# http://qa.mandriva.com/show_bug.cgi?id=15499
Patch48:	MigrationTools-45-structural.patch.bz2

Patch50: http://www.sleepycat.com/update/4.2.52/patch.4.2.52.1
Patch51: http://www.sleepycat.com/update/4.2.52/patch.4.2.52.2
Patch55: http://www.sleepycat.com/update/4.2.52/patch.4.2.52.3
Patch56: http://www.sleepycat.com/update/4.2.52/patch.4.2.52.4
Patch52: db-4.2.52-amd64-mutexes.patch.bz2
%if %db4_internal
# used by s_config, which is required by above patch:
BuildRequires:	ed autoconf%{?notmdk: >= 2.5}
%else
# txn_nolog added in 4.2.52-6mdk
BuildRequires: 	db4-devel = %{dbver}
%endif

Patch53: %pkg_name-2.2.19-ntlm.patch.bz2
# preserves the temp file used to import data if an error occured
Patch54: MigrationTools-40-preserveldif.patch.bz2

#patches in CVS
# see http://www.stanford.edu/services/directory/openldap/configuration/openldap-build.html
# for other possibly interesting patches
Patch102: openldap-2.3.24-its4589.patch


%{?_with_cyrussasl:BuildRequires: 	%{?!notmdk:libsasl-devel}%{?notmdk:cyrus-sasl-devel}}
%{?_with_kerberos:BuildRequires:	krb5-devel}
BuildRequires:	openssl-devel, perl
%if %build_slp
BuildRequires: openslp-devel
%endif
#BuildRequires: libgdbm1-devel
%if %sql
BuildRequires: 	unixODBC-devel
%endif
%if %back_perl
BuildRequires:	perl-devel
%endif
BuildRequires:  ncurses-devel >= 5.0
BuildRequires: tcp_wrappers%{?!notmdk:-devel} libtool%{?!notmdk:-devel}
BuildRequires:  krb5-devel
# for make test:
BuildRequires:	diffutils
BuildRoot: 	%{_tmppath}/%{name}-%{version}-root
Requires: 	%libname = %{version}-%{release}
Requires:	shadow-utils, setup >= 2.2.0-6mdk
#%{mklibname db 4.3}

%description
OpenLDAP is an open source suite of LDAP (Lightweight Directory Access
Protocol) applications and development tools.  The suite includes a
stand-alone LDAP server (slapd) and stand-alone LDAP replication server
(slurpd) which are in the -servers package, libraries for implementing the 
LDAP protocol (in the lib packages), and utilities, tools, and sample clients 
(in the -clients package). The openldap binary package includes configuration
files used by the libraries.

Install openldap if you need LDAP applications and tools.

%package servers
Summary: 	OpenLDAP servers and related files
Group: 		System/Servers
Requires(pre):	%{?!notmdk:rpm-helper}%{?notmdk:/usr/sbin/useradd} fileutils
%if !%build_modpacks
Provides:	%{name}-back_dnssrv = %{version}-%{release}
Provides:	%{name}-back_ldap = %{version}-%{release}
Provides:	%{name}-back_passwd = %{version}-%{release}
Provides:	%{name}-back_sql = %{version}-%{release}
Obsoletes:	%{name}-back_dnssrv < %{version}-%{release}
Obsoletes:	%{name}-back_ldap < %{version}-%{release}
Obsoletes:	%{name}-back_passwd < %{version}-%{release}
Obsoletes:	%{name}-back_sql < %{version}-%{release}
%endif
%if !%db4_internal
Requires(pre):	db4-utils
Requires(post):	db4-utils
Requires:	db4-utils
%endif
%if %{?_with_cyrussasl:1}%{!?_with_cyrussasl:0}
%define saslver %(echo -e "#include <sasl/sasl.h>\\nSASL_VERSION_MAJOR SASL_VERSION_MINOR SASL_VERSION_STEP"|cpp|awk 'END {printf "%s.%s.%s",$1,$2,$3}')
%define sasllib %mklibname sasl 2
#Ensure we have the sasl library we compiled against available in post so
#slapadd etc works
Requires(post):	%{?!notmdk:%sasllib}%{?notmdk:cyrus-sasl} = %saslver
%endif
Requires: 	%libname = %{version}-%{release}
Conflicts:	kolab < 1.9.5-0.20050801.4mdk

%description servers
OpenLDAP Servers

This package contains the OpenLDAP servers, slapd (LDAP server) and slurpd
(replication daemon), additional backends, configuration files, schema 
definitions required for operation, and database maintenance tools

This server package was compiled with support for the %{?_with_gdbm:gdbm}%{!?_with_gdbm:berkeley}
database library.

%package clients
Summary: 	OpenLDAP clients and related files
Group: 		System/Servers
Requires: 	%libname = %{version}-%{release}

%description clients
OpenLDAP clients

This package contains command-line ldap clients (ldapsearch, ldapadd etc)

%if %build_migration
%package migration
Summary: 	Set of scripts for migration of a nis domain to a ldap directory
Group: 		System/Configuration/Other
Requires: 	%{name}-servers = %{version}
Requires: 	%{name}-clients = %{version}
Requires: 	perl-MIME-Base64

%description migration
This package contains a set of scripts for migrating data from local files
(ie /etc/passwd) or a nis domain to an ldap directory.
%endif

%package -n %libname
Summary: 	OpenLDAP libraries
Group: 		System/Libraries
Provides:       lib%fname = %version-%release
# This is needed so all libldap2 applications get /etc/openldap/ldap.conf
# which was moved from openldap-clients to openldap in 2.1.25-4mdk
Requires:	%{name} >= 2.1.25-4mdk

%description -n %libname
This package includes the libraries needed by ldap applications.


%package -n %libname-devel
Summary: 	OpenLDAP development libraries and header files
Group: 		Development/C
Provides: 	lib%fname-devel = %version-%release
Requires: 	%libname = %{version}-%release
%if %build_system
Provides:       openldap-devel = %{version}-%{release}
Provides:	openldap2-devel = %{version}-%{release}
Obsoletes: 	openldap-devel
%endif
Conflicts:	libldap1-devel
Conflicts:	%mklibname -d ldap 2
Conflicts:	%mklibname -d ldap 2.2_7

%description -n %libname-devel
This package includes the development libraries and header files
needed for compiling applications that use LDAP internals.  Install
this package only if you plan to develop or will need to compile
LDAP clients.


%package -n %{libname}-static-devel
Summary: 	OpenLDAP development static libraries
Group: 		Development/C
Provides: 	lib%fname-devel-static = %version-%release
Provides: 	lib%fname-static-devel = %version-%release
Requires: 	%libname-devel = %{version}-%release
%if %build_system
Provides:	openldap-devel-static = %{version}-%{release}
Provides:	openldap-static-devel = %{version}-%{release}
Obsoletes: 	openldap-devel-static
%endif
Conflicts:	libldap1-devel


%description -n %libname-static-devel
OpenLDAP development static libraries

%if %build_modpacks
%package back_dnssrv
Summary: 	Module dnssrv for OpenLDAP 
Group: 		System/Libraries
Requires: 	%libname = %{version}-%{release}
Requires: 	openldap-servers = %{version}-%{release}

%description back_dnssrv
The dnssrv daabase backend module for OpenLDAP daemon

%package back_ldap
Summary: 	Module ldap for OpenLDAP 
Group: 		System/Libraries
Requires: 	%libname = %{version}-%{release}
Requires: 	openldap-servers = %{version}-%{release}

%description back_ldap
The ldap database backend module for OpenLDAP daemon


%package back_passwd
Summary: 	Module passwd for OpenLDAP 
Group: 		System/Libraries
Requires: 	%libname = %{version}-%release
Requires: 	openldap-servers = %{version}-%release

%description back_passwd
The passwd database backend module for OpenLDAP daemon
%endif
%if %sql && %build_modpacks
%package back_sql
Summary: 	Module sql for OpenLDAP 
Group: 		System/Libraries
Requires: 	%libname = %{version}-%{release}
Requires: 	openldap-servers = %{version}-%{release}

%description back_sql
The sql database backend module for OpenLDAP daemon
%endif

%package doc
Summary: 	OpenLDAP documentation and administration guide
Group: 		Books/Computer books
Requires: 	openldap
Provides:	openldap-guide
Obsoletes:	openldap-guide

%description doc
OpenLDAP documentation, incuding RFCs and the adminitration guide


%prep
%if %db4_internal
%setup -q -n %{pkg_name}-%{version} %{?_with_migration:-a 11} -a 30 
pushd db-%{dbver} >/dev/null
#upstream patches
%patch50
%patch51
%patch55
%patch56

%ifnarch %ix86
%patch52 -p1 -b .amd64-mutexes
(cd dist && ./s_config)
%endif
popd >/dev/null
%else
%setup -q  -n %{pkg_name}-%{version} %{?_with_migration:-a 11}
%endif

%patch0 -p1 -b .config
perl -pi -e 's/^(#define\s+DEFAULT_SLURPD_REPLICA_DIR.*)ldap(.*)/${1}ldap%{ol_major}${2}/' servers/slurpd/slurp.h
perl -pi -e 's/LDAP_DIRSEP "run" //g' include/ldap_defaults.h
%patch1 -p1 -b .module
%patch2 -p1 -b .only-smb

%patch15 -p1 -b .cldap 


%if %build_migration
pushd MigrationTools-%{migtools_ver}
%patch40 -p1 -b .instdir
%patch41 -p1 -b .mktemp
%patch42 -p1 -b .simple
%patch43 -p1 -b .suffix
%patch45 -p2 -b .i18n
%patch48 -p2 -b .account
%patch54 -p1 -b .preserve
popd
%endif

%patch46 -p1 -b .mdk
#bgmilne %patch47 -p1 -b .maildropschema
%patch53 -p1 -b .ntlm

# patches from CVS
#%patch102 -b .its4589


# README:
cp %{SOURCE13} README.mdk

#rm -f tests/scripts/test018*

%build
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot}
#disable icecream:
PATH=`echo $PATH|perl -pe 's,:[\/\w]+icecream[\/\w]+:,:,g'`
%serverbuild

%if %db4_internal
dbdir=`pwd`/db-instroot
pushd db-%{dbver}/build_unix
CONFIGURE_TOP="../dist" %configure2_5x \
        --enable-shared --disable-static \
        --with-uniquename=_openldap_slapd%{ol_suffix}_mdk \
	--program-prefix=slapd%{ol_major}_ \
%ifarch %{ix86}
	--disable-posixmutexes --with-mutex=x86/gcc-assembly
%endif
%ifarch alpha
	--disable-posixmutexes --with-mutex=ALPHA/gcc-assembly
%endif
%ifarch ia64
	--disable-posixmutexes --with-mutex=ia64/gcc-assembly
%endif
%ifarch ppc
	--disable-posixmutexes --with-mutex=PPC/gcc-assembly
%endif
%ifarch sparc
	--disable-posixmutexes --with-mutex=Sparc/gcc-assembly
%endif

#--with-mutex=POSIX/pthreads/library
#JMD: use --disable-posixmutexes so it works on a non-NPTL kernel, and use
#assembler mutexes since they're *way* faster and correctly implemented.

perl -pi -e 's/^(libdb_base=\s+)\w+/\1libslapd%{ol_suffix}_db/g' Makefile
#Fix soname and libname in libtool:
perl -pi -e 's/shared_ext/shrext/g' libtool
make
rm -Rf $dbdir
mkdir -p $dbdir
make DESTDIR=$dbdir install
ln -sf ${dbdir}/%{_libdir}/libslapd%{ol_suffix}_db-%{dbname}.so ${dbdir}/%{_libdir}/libdb-%{dbname}.so
popd
export CPPFLAGS="-I${dbdir}/%{_includedir} $CPPFLAGS"
export LDFLAGS="-L${dbdir}/%{_libdir} $LDFLAGS"
export LD_LIBRARY_PATH="${dbdir}/%{_libdir}"
%endif

unset CONFIGURE_TOP

#FIXME: Some script backends should not be used with threads, mostly shell/perl

%if !%build_system
perl -pi -e 's,(progname = "\w+)",${1}%{ol_major}",g' servers/slapd/*.c
perl -pi -e 's,({"slap\w+)",${1}%{ol_major}",g' servers/slapd/main.c
%endif

# don't choose db4.3 even if it is available
export ol_cv_db_db_4_dot_3=no
# try and miss linuxthreads, so we get a threading lib on glibc2.4:
%if %mdkversion > 200600
export ol_cv_header_linux_threads=no
%endif
#rh only:
export CPPFLAGS="-I%{_prefix}/kerberos/include $CPPFLAGS"
%if %{?openldap_fd_setsize:1}%{!?openldap_fd_setsize:0}
CPPFLAGS="$CPPFLAGS -DOPENLDAP_FD_SETSIZE=%{openldap_fd_setsize}"
%endif
export LDFLAGS="-L%{_prefix}/kerberos/%{_lib} $LDFLAGS"
# building for systems with kernel < 2.6 requires building without epoll support
%if %{mdkversion} < 1000 || %{?_without_epoll:1}%{!?_without_epoll:0}
export ac_cv_header_sys_epoll_h=no
%endif

%configure2_5x \
	--with-subdir=%{name} \
%if !%build_system
	--program-suffix=%{ol_major} \
%endif
	--localstatedir=/var/run/ldap%{ol_major} \
	--enable-dynamic \
	--enable-syslog \
	--enable-proctitle \
	--enable-ipv6 \
	--enable-local \
	%{?_with_cyrussasl} %{?_without_cyrussasl} \
	%{?_with_kerberos} %{?_without_kerberos} \
	--with-threads \
	--with-tls \
	--enable-slapd \
	--enable-aci \
	--enable-cleartext \
	--enable-crypt \
	--enable-lmpasswd \
	%{?_with_kerberos:--enable-kpasswd} \
	%{?_with_cyrussasl:--enable-spasswd} \
%if %build_modules
	--enable-modules \
%endif
	--enable-rewrite \
	--enable-rlookups \
%if %build_slp
	--enable-slp \
%endif
	--enable-wrappers \
	--enable-bdb=yes \
	--enable-dnssrv=mod \
	--enable-hdb=yes \
	--enable-ldap=mod \
	--enable-ldbm=yes \
	--enable-meta=mod \
	--enable-monitor=mod \
	--enable-passwd=mod \
%if %back_perl
	--enable-perl=mod \
%endif
	--enable-relay=mod \
%if %sql
	--enable-sql=mod \
%endif
	--enable-overlays=mod \
	--enable-shared

# These options are no longer available
#	--enable-cldap \
#	--enable-multimaster \

%if !%build_system
perl -pi -e 's/^(ldap_subdir\s+=\s+.*)%{pkg_name}/$1%{name}/g' Makefile
%endif

# (oe) amd64 fix
perl -pi -e "s|^AC_CFLAGS.*|AC_CFLAGS = $CFLAGS -fPIC|g" libraries/librewrite/Makefile

make depend 

make 
make -C contrib/slapd-modules/smbk5pwd

%check
%if %{!?_without_test:1}%{?_without_test:0}
#disable icecream:
#PATH=`echo $PATH|perl -pe 's,:[\/\w]+icecream[\/\w]+:,:,g'`
%if %db4_internal
dbdir=`pwd`/db-instroot
export LD_LIBRARY_PATH="${dbdir}/%{_libdir}"
%endif
# meta test seems to timeout on the Mandriva cluster:
export TEST_META=no
make -C tests %{!?tests:bdb}%{?tests:%tests}
%endif

%install
#disable icecream:
#PATH=`echo $PATH|perl -pe 's,:[\/\w]+icecream[\/\w]+:,:,g'`
export DONT_GPRINTIFY=1
cp -af contrib/slapd-modules/smbk5pwd/README{,.smbk5passwd}
rm -Rf %{buildroot}

%if %db4_internal
pushd db-%{dbver}/build_unix
%makeinstall_std
for i in %{buildroot}/%{_bindir}/db_*;do mv $i ${i/db_/slapd_db_};done
popd
%endif

%makeinstall_std

cp  contrib/slapd-modules/smbk5pwd/.libs/smbk5pwd.so* %{buildroot}/%{_libdir}/%{name}


### some hack
perl -pi -e "s| -L../liblber/.libs||g" %{buildroot}%{_libdir}/libldap.la

perl -pi -e  "s,-L$RPM_BUILD_DIR\S+%{_libdir},,g" %{buildroot}/%{_libdir}/lib*.la
#sed -i -e "s|-L$RPM_BUILD_DIR/%{name}-%{version}/db-instroot/%{_libdir}||g" %{buildroot}/%{_libdir}/*la
#%{buildroot}/%{_libdir}/%{name}/*.la 

### Init scripts
install -d %{buildroot}%{_initrddir}
install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/ldap%{ol_major}

install -d %{buildroot}%{_sysconfdir}/sysconfig
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/ldap%{ol_major}

install -m 640 %{SOURCE21} %{SOURCE23} %{SOURCE24} %{buildroot}%{_sysconfdir}/%{name}
#install -d %{_buildroot}/%{_sysconfdir}/%{name}/slapd.d

### repository dir
install -d %{buildroot}%{_var}/lib/ldap%{ol_major}

### DB_CONFIG for bdb backend
install -m644 %{SOURCE22} %{buildroot}%{_var}/lib/ldap%{ol_major}

### run dir
install -d %{buildroot}%{_var}/run/ldap%{ol_major}

### Server defaults
echo "localhost" > %{buildroot}%{_sysconfdir}/%{name}/ldapserver

### we don't need the default files 
rm -f %{buildroot}/etc/%{name}/*.default 
rm -f %{buildroot}/etc/%{name}/schema/*.default 


### Standard schemas should not be changed by users
install -d %{buildroot}%{_datadir}/%{name}/schema
mv -f %{buildroot}%{_sysconfdir}/%{name}/schema/* %{buildroot}%{_datadir}/%{name}/schema/

### install additional schemas
for i in %{SOURCE50} %{SOURCE51} %{SOURCE52} %{SOURCE53} %{SOURCE54} \
	%{SOURCE55} %{SOURCE56} %{SOURCE57} %{SOURCE58} %{SOURCE59} \
	%{SOURCE60} %{SOURCE61} %{SOURCE62} %{SOURCE63} %{SOURCE64} \
	%{SOURCE65} %{SOURCE66} %{SOURCE67} %{SOURCE68}; do
install -m 644 $i %{buildroot}%{_datadir}/%{name}/schema/
done

install -d %{buildroot}/%{_datadir}/%{name}/scripts
install -m 755 %{SOURCE25} %{SOURCE26} %{SOURCE27} %{buildroot}/%{_datadir}/%{name}/scripts/
for i in hourly daily weekly monthly yearly
do
	install -d %{buildroot}/%{_sysconfdir}/cron.${i}
	ln -s %{_datadir}/%{name}/scripts/ldap-hot-db-backup %{buildroot}/%{_sysconfdir}/cron.${i}/ldap-hot-db-backup%{ol_major}
done

### create local.schema
echo "# This is a good place to put your schema definitions " > %{buildroot}%{_sysconfdir}/%{name}/schema/local.schema
chmod 644 %{buildroot}%{_sysconfdir}/%{name}/schema/local.schema

### deal with the migration tools
%if %build_migration
install -d %{buildroot}%{_datadir}/%{name}/migration
install -m 755 MigrationTools-%{migtools_ver}/{*.pl,*.sh,*.txt,*.ph} %{buildroot}%{_datadir}/%{name}/migration
install -m 644 MigrationTools-%{migtools_ver}/README %{SOURCE3} %{buildroot}%{_datadir}/%{name}/migration
install -m 755 %{SOURCE4} %{buildroot}%{_datadir}/%{name}/migration

cp MigrationTools-%{migtools_ver}/README README.migration
cp %{SOURCE3} TOOLS.migration
%endif

### Guide
mkdir -p %{buildroot}/%{_docdir}/
tar xvjf %{SOURCE12} -C %{buildroot}/%{_docdir}/
mv %{buildroot}/%{_docdir}/{%{pkg_name},%{name}}-guide ||:

### gencert.sh
install -m 755 %{SOURCE19} %{buildroot}/%{_datadir}/%{name}

### log repository
install -m 700 -d %{buildroot}/var/log/ldap%{ol_major}
install -d %{buildroot}%{_sysconfdir}/logrotate.d
install -m 644 %{SOURCE20} %{buildroot}%{_sysconfdir}/logrotate.d/ldap%{ol_major}


# get the buildroot out of the man pages
perl -pi -e "s|%{buildroot}||g" %{buildroot}%{_mandir}/*/*.*

mkdir -p %{buildroot}%{_sysconfdir}/ssl/%{name}

#rename binaries
%if !%{build_system} || %build_alternatives
for OLD in %{buildroot}/%{_bindir}/{%{clientbin}}
do
    NEW=`echo ${OLD}%{alternative_major}`
    mv -f $OLD $NEW ||:
    if [ -L $NEW ]
    then ln -sf `readlink $NEW`%{alternative_major} $NEW
    fi
done
for OLD in %{buildroot}/%{_mandir}/man?/{%{clientbin},ldap.conf,ldif}*
do
    if [ -e $OLD ]
    then
        BASE=`perl -e '$_="'${OLD}'"; m,(%buildroot)(.*?)(\.[0-9]),;print "$1$2\n";'`
        EXT=`echo $OLD|sed -e 's,'${BASE}',,g'`
        NEW=`echo ${BASE}%{alternative_major}${EXT}`
        mv $OLD $NEW
    fi
done
%endif
%if !%build_system
for OLD in %{buildroot}/%{_bindir}/{%{serverbin}} %{buildroot}/%{_sbindir}/{%{serversbin}}
do
    NEW=`echo ${OLD}%{ol_major}`
    mv $OLD $NEW -f ||:
    if [ -L $NEW ]
        then ln -sf `readlink $NEW`%{ol_major} $NEW
    fi
done
# And the man pages too:
%if %db4_internal
for OLD in %{buildroot}/%{_mandir}/man?/{%{serverbin},%{serversbin},slapo}*
%else
for OLD in %{buildroot}/%{_mandir}/man?/{%{serversbin},slapo}*
%endif
do
    if [ -e $OLD ]
    then
        BASE=`perl -e '$_="'${OLD}'"; m,(%buildroot)(.*?)(\.[0-9]),;print "$1$2\n";'`
#        BASE=`perl -e '$name="'${OLD}'"; print "",($name =~ /(.*?)\.[0-9]/), "\n";'`
	EXT=`echo $OLD|sed -e 's,'${BASE}',,g'`
	NEW=`echo ${BASE}%{ol_major}${EXT}`
	mv $OLD $NEW
    fi
done
%endif

#Fix binary names and config paths in scripts/configs
perl -pi -e 's,/%{pkg_name}/,/%{name}/,g;s,(/ldap\w?)\b,${1}%{ol_major},g;s,(%{_bindir}/slapd_db_\w+),${1}%{ol_major},g;s,(%{_sbindir}/sl(apd|urpd|aptest))\b,${1}%{ol_major},g;s/ldap%{ol_major}-common/ldap-common/g;s,ldap%{ol_major}.pem,ldap.pem,g;s,/usr/lib,%{_libdir},g' %{buildroot}/{%{_sysconfdir}/%{name}/slapd.conf,%{_initrddir}/ldap%{ol_major},%{_datadir}/%{name}/scripts/*}
perl -pi -e 's/ldap/ldap%{ol_major}/' %{buildroot}/%{_sysconfdir}/logrotate.d/ldap%{ol_major}

mv %{buildroot}/var/run/ldap%{ol_major}/openldap-data/DB_CONFIG.example %{buildroot}/%{_var}/lib/ldap%{ol_major}/

%clean 
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot}
#rm -rf $RPM_BUILD_DIR/%{name}-%{version}


%pre servers
%_pre_useradd ldap %{_var}/lib/ldap /bin/false
# allowing slapd to read hosts.allow and hosts.deny
%{_bindir}/gpasswd -a ldap adm 1>&2 > /dev/null || :

%if build_system
LDAPUSER=ldap
LDAPGROUP=ldap
[ -e "/etc/sysconfig/%{name}" ] && . "/etc/sysconfig/%{name}"
SLAPDCONF=${SLAPDCONF:-/etc/%{name}/slapd.conf}

#decide whether we need to migrate at all:
MIGRATE=`%{_sbindir}/slapd%{ol_major} -VV 2>&1|while read a b c d e;do case $d in (2.3.*) echo nomigrate;;(2.*) echo migrate;;esac;done`

if [ "$1" -ne 1 -a -e "$SLAPDCONF" -a "$MIGRATE" != "nomigrate" ]
then 
SLAPD_STATUS=`LANG=C LC_ALL=C NOLOCALE=1 service ldap%{ol_major} status 2>/dev/null|grep -q stopped;echo $?`
[ $SLAPD_STATUS -eq 1 ] && service ldap%{ol_major} stop
#`awk '/^[:space:]*directory[:space:]*\w*/ {print $2}' /etc/%{name}/slapd.conf`
dbs=`awk 'BEGIN {OFS=":"} /[:space:]*^database[:space:]*\w*/ {db=$2;suf="";dir=""}; /^[:space:]*suffix[:space:]*\w*/ {suf=$2;if((db=="bdb"||db=="ldbm"||db=="hdb")&&(suf!=""&&dir!="")) print dir,suf};/^[:space:]*directory[:space:]*\w*/ {dir=$2; if((db=="bdb"||db=="ldbm"||db="hdb")&&(suf!=""&&dir!="")) print dir,suf};' "$SLAPDCONF" $(awk  '/^[[:blank:]]*include[[:blank:]]*/ {print $2}' "$SLAPDCONF")|sed -e 's/"//g'`
for db in $dbs
do
	dbdir=${db/:*/}
	dbsuffix=${db/*:/}
	[ -e /etc/sysconfig/ldap%{ol_major} ] && . /etc/sysconfig/ldap%{ol_major}
# data migration between incompatible versions
# openldap >= 2.2.x have slapcat as a link to slapd, older releases do not
	if [ "${AUTOMIGRATE:-yes}" == "yes" -a -f %{_sbindir}/slapcat ]
	then
		ldiffile="rpm-migrate-to-%{ol_ver_major}.ldif"
		# dont do backups more than onc
		if [ ! -e "${dbdir}/${ldiffile}-imported" -a ! -e "${dbdir}/${ldiffile}-import-failed" ];then
		echo "Migrating pre-OpenLDAP-%{ol_ver_major} data"
		echo "Making a backup of $dbsuffix to ldif file ${dbdir}/$ldiffile"
		# For some reason, slapcat works in the shell when slapd is
		# running but not via rpm ...
		slapcat -b "$dbsuffix" -l ${dbdir}/${ldiffile} ||:
		fi
	fi
done
[ $SLAPD_STATUS -eq 1 ] && service ldap%{ol_major} start || :
fi
%endif

%post servers
/sbin/ldconfig
SLAPD_STATUS=`LANG=C LC_ALL=C NOLOCALE=1 service ldap%{ol_major} status 2>/dev/null|grep -q stopped;echo $?`
[ $SLAPD_STATUS -eq 1 ] && service ldap%{ol_major} stop
# bgmilne: part 2 of gdbm->dbb conversion for data created with 
# original package for 9.1:
dbnum=1
LDAPUSER=ldap
LDAPGROUP=ldap
[ -e "/etc/sysconfig/%{name}" ] && . "/etc/sysconfig/%{name}"
SLAPDCONF=${SLAPDCONF:-/etc/%{name}/slapd.conf}
if [ -e "$SLAPDCONF" ] 
then
dbs=`awk 'BEGIN {OFS=":"} /[:space:]*^database[:space:]*\w*/ {db=$2;suf="";dir=""}; /^[:space:]*suffix[:space:]*\w*/ {suf=$2;if((db=="bdb"||db=="ldbm")&&(suf!=""&&dir!="")) print dir,suf};/^[:space:]*directory[:space:]*\w*/ {dir=$2; if((db=="bdb"||db=="ldbm")&&(suf!=""&&dir!="")) print dir,suf};' "$SLAPDCONF" $(awk  '/^[[:blank:]]*include[[:blank:]]*/ {print $2}' "$SLAPDCONF")|sed -e 's/"//g'`
for db in $dbs
do	
	dbdir=${db/:*/}
	dbsuffix=${db/*:/}
	ldiffile="rpm-migrate-to-%{ol_ver_major}.ldif"
	if [ -e "${dbdir}/${ldiffile}" ]
	then
		echo -e "\n\nImporting $dbsuffix"
		if [ -e ${dbdir}/ldap-rpm-backup ]
		then 
			echo "Warning: Old ldap backup data in ${dbdir}/ldap-rpm-backup"
			echo "These files will be removed"
			rm -f ${dbdir}/ldap-rpm-backup/*
		fi
	
		echo "Moving the database files fom ${dbdir} to ${dbdir}/ldap-rpm-backup"
		mkdir -p ${dbdir}/ldap-rpm-backup
		mv -f ${dbdir}/{*.bdb,*.gdbm,*.dbb,log.*,__db*} ${dbdir}/ldap-rpm-backup 2>/dev/null
		echo "Importing $dbsuffix from ${dbdir}/${ldiffile}"
		if slapadd%{ol_major} -q -cv -b "$dbsuffix" -l ${dbdir}/${ldiffile} > \
		${dbdir}/rpm-ldif-import.log 2>&1
		then
			mv -f ${dbdir}/${ldiffile} ${dbdir}/${ldiffile}-imported
			echo "Import complete, see log ${dbdir}/rpm-ldif-import.log"
			echo "If any entries were not migrated, see ${dbdir}/${ldiffile}-imported"
		else
			mv -f ${dbdir}/${ldiffile} ${dbdir}/${ldiffile}-import-failed
			echo "Import failed on ${dbdir}/${ldifffile}, see ${dbdir}/rpm-ldif-import.log"
			echo "An ldif dump of $dbsuffix has been saved as ${dbdir}/${ldiffile}-import-failed"
			echo -e "\nYou can import it manually by running (as root):"
			echo "# service ldap%{ol_major} stop"
			echo "# slapadd%{ol_major} -c -l ${dbdir}/${ldiffile}-import-failed"
			echo "# chown $LDAPUSER:$LDAPGROUP ${dbdir}/*"
			echo "# service ldap%{ol_major} start"
		fi
	fi

	chown ${LDAPUSER}:${LDAPGROUP} -R ${dbdir}
	# openldap-2.0.x->2.1.x on ldbm/dbb backend seems to need reindex regardless:
	#slapindex -n $dbnum
	#dbnum=$[dbnum+1]
done
fi
[ $SLAPD_STATUS -eq 1 ] && service ldap%{ol_major} start

# Setup log facility for OpenLDAP
if [ -f %{_sysconfdir}/syslog.conf ] ;then

	# clean syslog
	perl -pi -e "s|^.*ldap%{ol_major}.*\n||g" %{_sysconfdir}/syslog.conf 

	typeset -i cntlog
	cntlog=0

	# probe free local-users
	while [ `grep -c local${cntlog} %{_sysconfdir}/syslog.conf` -gt 0 ]
	do 
		cntlog=${cntlog}+1
	done

	if [ ${cntlog} -le 9 ];then
		echo "# added by %{name}-%{version} r""pm $(date)" >> %{_sysconfdir}/syslog.conf
#   modified by Oden Eriksson
#		echo "local${cntlog}.*       /var/log/ldap/ldap.log" >> %{_sysconfdir}/syslog.conf
		echo -e "local${cntlog}.*\t\t\t\t\t\t\t-/var/log/ldap%{ol_major}/ldap.log" >> %{_sysconfdir}/syslog.conf

		# reset syslog daemon
		if [ -f /var/lock/subsys/syslog ]; then
        		service syslog restart  > /dev/null 2>/dev/null || : 
		fi
	else
		echo "I can't set syslog local-user!"
	fi
		
	# set syslog local-user in /etc/sysconfig/ldap
	perl -pi -e "s|^.*SLAPDSYSLOGLOCALUSER.*|SLAPDSYSLOGLOCALUSER=\"LOCAL${cntlog}\"|g" %{_sysconfdir}/sysconfig/ldap%{ol_major}

fi

# generate the ldap.pem cert here instead of the initscript
if [ ! -e %{_sysconfdir}/ssl/%{name}/ldap.pem ] ; then
  if [ -x %{_datadir}/%{name}/gencert.sh ] ; then
    echo "Generating self-signed certificate..."
    pushd %{_sysconfdir}/ssl/%{name}/ > /dev/null
    yes ""|%{_datadir}/%{name}/gencert.sh >/dev/null 2>&1
    chmod 640 ldap.pem
    chown root:ldap ldap.pem
    popd > /dev/null
  fi
  echo "To generate a self-signed certificate, you can use the utility"
  echo "%{_datadir}/%{name}/gencert.sh..."
fi

pushd %{_sysconfdir}/%{name}/ > /dev/null
for i in slapd.conf slapd.access.conf ; do
	if [ -f $i ]; then
		chmod 0640 $i
		chown root:ldap $i
	fi
done
popd > /dev/null


%_post_service ldap%{ol_major}

# nscd reset
if [ -f /var/lock/subsys/nscd ]; then
        service nscd restart  > /dev/null 2>/dev/null || : 
fi


%preun servers
%_preun_service ldap%{ol_major}


%postun servers
/sbin/ldconfig
if [ $1 = 0 ]; then 
	# remove ldap entry 
	perl -pi -e "s|^.*ldap.*\n||g" %{_sysconfdir}/syslog.conf 

	# reset syslog daemon
	if [ -f /var/lock/subsys/syslog ]; then
	        service syslog restart  > /dev/null 2>/dev/null || : 
	fi
fi
%_postun_userdel ldap


%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig

%triggerpostun -- openldap-clients < 2.1.25-5mdk
# We may have openldap client configuration in /etc/ldap.conf
# which now needs to be in /etc/openldap/ldap.conf
if [ -f /etc/ldap.conf ] 
then
	mv -f /etc/%{name}/ldap.conf /etc/%{name}/ldap.conf.rpmfix
	cp -af /etc/ldap.conf /etc/%{name}/ldap.conf
fi

%files
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/%{name}/ldapserver
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/ldap.conf
%{_mandir}/man5/ldap.conf%{ol_major}.5*
%{_mandir}/man5/ldif%{ol_major}.5*
%doc README.mdk


%files doc
%defattr(-,root,root)
%doc ANNOUNCEMENT CHANGES COPYRIGHT LICENSE README 
%if %build_migration
%doc README.migration TOOLS.migration
%endif
%doc doc/rfc doc/drafts
#%config(noreplace) %{_sysconfdir}/%{name}/ldapfilter.conf
#%config(noreplace) %{_sysconfdir}/%{name}/ldapsearchprefs.conf
#%config(noreplace) %{_sysconfdir}/%{name}/ldaptemplates.conf
#%{_datadir}/%{name}/ldapfriendly
#%{_mandir}/man5/ldapfilter.conf.5*
#%{_mandir}/man5/ldapfriendly.5*
#%{_mandir}/man5/ldapsearchprefs.conf.5*
#%{_mandir}/man5/ldaptemplates.conf.5*
%doc %{_docdir}/%{name}-guide

%if %build_migration
%files migration
%defattr(-,root,root)
%{_datadir}/%{name}/migration
%endif


%files servers
%defattr(-,root,root)
%dir %{_sysconfdir}/%{name}
%dir %{_sysconfdir}/%{name}/schema
#%dir %{_sysconfdir}/%{name}/slapd.d
#%attr(640,root,ldap) %config(noreplace) %{_sysconfdir}/ssl/openldap/ldap.pem
%attr(640,root,ldap) %config(noreplace) %{_sysconfdir}/%{name}/slapd.conf
%attr(640,root,ldap) %{_sysconfdir}/%{name}/DB_CONFIG.example
%attr(640,root,ldap) %config %{_sysconfdir}/%{name}/slapd.access.conf

%dir %{_sysconfdir}/ssl/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/schema/*.schema
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/schema
%{_datadir}/%{name}/schema/*.schema
%{_datadir}/%{name}/schema/*.ldif
%{_datadir}/%{name}/schema/README
#%dir %{_datadir}/%{name}/ucdata
#%{_datadir}/%{name}/ucdata/*.dat
%{_datadir}/%{name}/scripts
%{_sysconfdir}/cron.hourly/ldap-hot-db-backup%{ol_major}
%{_sysconfdir}/cron.daily/ldap-hot-db-backup%{ol_major}
%{_sysconfdir}/cron.weekly/ldap-hot-db-backup%{ol_major}
%{_sysconfdir}/cron.monthly/ldap-hot-db-backup%{ol_major}
%{_sysconfdir}/cron.yearly/ldap-hot-db-backup%{ol_major}

%config(noreplace) %{_sysconfdir}/sysconfig/ldap%{ol_major}
%config(noreplace) %{_initrddir}/ldap%{ol_major}
%attr(750,ldap,ldap) %dir %{_var}/lib/ldap%{ol_major}
%config(noreplace) %{_var}/lib/ldap%{ol_major}/DB_CONFIG
%{_var}/lib/ldap%{ol_major}/DB_CONFIG.example
%attr(755,ldap,ldap) %dir /var/run/ldap%{ol_major}
#%{_datadir}/openldap/*.help
%{_datadir}/%{name}/gencert.sh
%{_sbindir}/*


%dir %{_libdir}/%{name}
%if %build_modules && !%build_modpacks
%{_libdir}/%{name}/*.la
%{_libdir}/%{name}/*.so*
#%exclude %{_libdir}/%{name}/*.a
%endif

%{_mandir}/man5/slap*.5*
%{_mandir}/man8/*

%attr(750,ldap,ldap) %dir /var/log/ldap%{ol_major}
%config(noreplace) %{_sysconfdir}/logrotate.d/ldap%{ol_major}

%if %db4_internal
#internal version of db4
%{_libdir}/libslapd%{ol_suffix}_db*
%attr(755,root,root)%{_bindir}/slapd_db*
%exclude %{_prefix}/docs
%exclude %{_includedir}/db*.h
%endif

%doc contrib/slapd-modules/smbk5pwd/README.smbk5passwd

%files clients
%defattr(-,root,root)
%{_bindir}/ldap*
%{_mandir}/man1/*
#%{_mandir}/man5/ud.conf.5*

%files -n %libname
%defattr(-,root,root)
%{_libdir}/lib*.so.*


%files -n %libname-devel
%defattr(-,root,root)
%{_libdir}/libl*.so
%{_libdir}/libl*.la
%{_includedir}/l*.h
%{_includedir}/s*.h
%{_mandir}/man3/*

%files -n %libname-static-devel
%defattr(-,root,root)
%{_libdir}/lib*.a

%if %build_modpacks
%files back_dnssrv
%defattr(-,root,root)
%{_libdir}/%{name}/back_dnssrv.la
%{_libdir}/%{name}/back_dnssrv*.so.*
%{_libdir}/%{name}/back_dnssrv*.so

%files back_ldap
%defattr(-,root,root)
%{_libdir}/%{name}/back_ldap.la
%{_libdir}/%{name}/back_ldap*.so.*
%{_libdir}/%{name}/back_ldap*.so

%files back_passwd
%defattr(-,root,root)
%{_libdir}/%{name}/back_passwd.la
%{_libdir}/%{name}/back_passwd*.so.*
%{_libdir}/%{name}/back_passwd*.so
%endif #build_modpacks

%if %sql && %build_modpacks
%files back_sql
%defattr(-,root,root)
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/back_sql.la
%{_libdir}/%{name}/back_sql.a
%{_libdir}/%{name}/back_sql*.so.*
%{_libdir}/%{name}/back_sql*.so
%endif

# Todo:
# - add cron-job to remove transaction logs (bdb)

%changelog
# Changelog for packages rebuilt on stable releases (leave it first):
%{!?_with_unstable:* %(LC_ALL=C date +"%a %b %d %Y") %{packager} %{version}-%{release}}
%{!?_with_unstable: - rebuild of %{version}-%{rel}mdk for %{distsuffix}%{distversion}}
* Wed Aug 23 2006 Buchan Milne <bgmilne@mandriva.org>
+ 2006-08-23 14:22:13 (57726)
- New version 2.3.27


* Wed Aug 23 2006 Buchan Milne <bgmilne@mandriva.org>
+ 2006-08-23 14:19:03 (57725)
Import openldap

* Tue Aug 15 2006 Buchan Milne <bgmilne@mandriva.org> 2.3.25-1mdv2007.0
- 2.3.25
- init script: use subsys file named after process (fixes status), 
  fix status check in recover

* Wed Jul 12 2006 Buchan Milne <bgmilne@mandriva.org> 2.3.24-3mdv2007.0
- include patch for ITS4589
- dont use wildcards in files list (some old versions of rpm dont like that)

* Tue Jul 11 2006 Buchan Milne <bgmilne@mandriva.org> 2.3.24-2mdv2007.0
- apply file size limits during start (set in /etc/sysconfig/ldap)
- fix modulepath in slapd.conf on biarch platforms (#23400)
- put the ldapi socket in a more sensible place, /var/run/ldap/ldapi (#22420)
- use slapd -VV, not slapd -V (which starts slapd too) for version check,
  fixes #19245.
- allow setting the maximum file descriptor limit in slapd at compile time,
  use --define 'openldap_fd_setsize 8192' or similar.
- update samba.schema

* Tue Jun 06 2006 Buchan Milne <bgmilne@mandriva.org> 2.3.24-1mdv2007.0
- New release 2.3.24
- only disable linuxthreads check on cooker
- update ldap-hot-db-backup to remove old archived transaction logs (after
  7 days by default)
- install cron symlinks for ldap-hot-db-backup, and adjust it for this
- fix ppolicy issues (ITS4576)

* Thu May 18 2006 Buchan Milne <bgmilne@mandriva.org> 2.3.23-1mdk
- New release 2.3.23

* Tue May 02 2006 Buchan Milne <bgmilne@mandriva.org> 3.2.21-2mdk
- add patches for ITSs 4499, 4500, 4503, 4504, 4512, 4513, and a slurpd 
  potential overflow from Quanahs page

* Thu Apr 27 2006 Buchan Milne <bgmilne@mandriva.org> 2.3.21-1mdk
- New release 2.3.21
- merge fixes from CS4 branch:
  - added patch to fix password policy control value
  - enabled spasswd (fixes #21753)
  - added indexes for syncprov replication
  - updated samba schema file with what is provided in samba 3.0.21c
  - added sample index line for when using syncprov
  - fixed #21066 (limits must be in database section)
- fix ldap-common to only consider bdb and hdb (not ldbm)

* Mon Feb 20 2006 Buchan Milne <bgmilne@mandriva.org> 2.3.20-1mdk
- New release 2.3.20

* Thu Jan 26 2006 Buchan Milne <bgmilne@mandriva.org> 2.3.19-1mdk
- New release 2.3.19

* Wed Jan 18 2006 Buchan Milne <bgmilne@mandriva.org> 2.3.18-1mdk
- New release 2.3.18

* Mon Jan 09 2006 Olivier Blin <oblin@mandriva.com> 2.3.13-3mdk
- convert parallel init to LSB

* Mon Jan 02 2006 Olivier Blin <oblin@mandriva.com> 2.3.13-2mdk
- parallel init support

* Thu Dec 01 2005 Buchan Milne <bgmilne@mandriva.org> 2.3.13-1mdk
- 2.3.13
- run recovery by default again
- disable meta-concurrency test for now

* Tue Nov 22 2005 Buchan Milne <bgmilne@mandriva.org> 2.3.12-1mdk
- 2.3.12
- no-transaction patch no longer necessary, drop db-4.2.52-6mdk requirement
- drop patches from cvs
- fix quoting of urls in init script (#19911)

* Sun Nov 13 2005 Oden Eriksson <oeriksson@mandriva.com> 2.3.11-7mdk
- rebuilt against openssl-0.9.8a

* Wed Nov 02 2005 Buchan Milne <bgmilne@mandriva.org> 2.3.11-6mdk
- ITS 4108 -  thread crash, fix from CVS

* Fri Oct 28 2005 Buchan Milne <bgmilne@mandriva.org> 2.3.11-5mdk
- fix logrotate (including for non-system case)

* Wed Oct 26 2005 Buchan Milne <bgmilne@mandriva.org> 2.3.11-4mdk
- fix init script

* Wed Oct 26 2005 Buchan Milne <bgmilne@mandriva.org> 2.3.11-3mdk
- fix slaptest modification in initscript in non-system case

* Wed Oct 26 2005 Buchan Milne <bgmilne@mandriva.org> 2.3.11-2mdk
- fixes to scripts (put all backups under one place, handle empty suffix)
- check configuration file in init script before restarting, and add
  check option (and force-restart if you really want to kill your slapd)

* Fri Oct 14 2005 Buchan Milne <bgmilne@mandriva.org> 2.3.11-1mdk
- 2.3.11
- provide means to build without epoll (--without epoll)
- drop p100

* Tue Oct 11 2005 Buchan Milne <bgmilne@mandriva.org> 2.3.9-2mdk
- disable epoll when building for distributions with a 2.4 kernel
- fix lib require for non-system case

* Mon Oct 10 2005 Buchan Milne <bgmilne@mandriva.org> 2.3.9-1mdk
- 2.3.9
- test041 is disabled upstream
- ITS 4035 - rootdn incorrect in cn=config backend/database (Andreas)

* Thu Oct 06 2005 Buchan Milne <bgmilne@linux-mandrake.com> 2.3.8-1mdk
- New release 2.3.8
- drop upstream patches (p100-102)
- openldap (since 2.3.7) includes up-to-date libtool, ensure we keep it on
  older distros (and no longer patch it in etc)
- only run tests for bdb backend by default (--define 'tests all' to run all)
- test041 seems broken

* Tue Sep 27 2005 Buchan Milne <bgmilne@mandriva.org> 2.3.7-1mdk
- ITS 3989 fix ID used for syncprov_findbase (p100)
- fix rwm-2.3.so.0: undefined symbol: rewrite_info_init (p101)
- ITS 4020 slapd dies with empty uniqueMember attributes (p102)
- fix database dir for build on RH

* Mon Sep 19 2005 Buchan Milne <bgmilne@mandriva.org> 2.3.6-4mdk
- rework init script so permissions checking (which was only called during 
  recovery) is done by default again (#16518), and add "recover" option to handle
  recovery sanely

* Fri Sep 16 2005 Buchan Milne <bgmilne@mandriva.org> 2.3.6-3mdk
- check slapd version to avoid unnecessary export/import
- fix typo in previous change to init script
- add acl for sambaDomain to slapd.access.conf
- add some more slapd.conf examples (load overlays, limits for syncrepl)

* Wed Sep 14 2005 Buchan Milne <bgmilne@linux-mandrake.com> 2.3.6-2mdk
- hacks for clean building on other/older distros (mdk10.0, fc1->rhel4)
- fix test for db4_internal case
- return correct exit codes in init script

* Mon Aug 29 2005 Buchan Milne <bgmilne@linux-mandrake.com> 2.3.6-1mdk
- conflict with kolab with broken template slapd.conf
- Sun Aug 28 2005 Oden Eriksson <oeriksson@mandriva.com>
  - fixed one %%lib/%%{_lib} error
  - make the devel sub package conflict with libldap2.2_7-devel
- Mon Aug 22 2005 Buchan Milne <bgmilne@linux-mandrake.com>
  - 2.3.6
  - drop p3 (sent upstream)
  - use BerkelyDB4.2 patch from source distribution
  - update docs from CVS, and add Mandriva section (re-used for README.mdk)
  - test and update migration from previous versions with db migration

* Mon Aug 08 2005 Buchan Milne <bgmilnelinux-mandrake.com> 2.3.4-4mdk
- fixes from Christiaan Welvaart <cjw@daneel.dyndns.org> allowing building
  with openldap-devel installed:
  - use new libtool and autotools
  - disable parallel make (make depend fails with icecream)

* Tue Aug 02 2005 Buchan Milne <bgmilne@linux-mandrake.com> 2.3.4-3mdk
- fix build with db4.3 run-time library present
- build with system db4.2 on 2006 and later

* Wed Jul 20 2005 Buchan Milne <bgmilne@linux-mandrake.com> 2.3.4-2mdk
- dont run db_recover in scriptlets or init script, not only is it
  unnecessary, it can prevent startup
- update/sync configure options
- update built-in db4.2 for the db4_internal case (and default to it for now)
- ship overlays from contrib too (smbk5pwd)

* Tue Jun 21 2005 Buchan Milne <bgmilne@linux-mandrake.com> 2.3.4-1mdk
- 2.3.4
- drop patches included upstream (p20, p21)

* Tue Jun 21 2005 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.27-2mdk
- init script fixes
  - fix ownership of database directories (#16518)
  - ease translations (inspired by #16491)
  - factorise use of user to run slurpd and db tools (also in rpm scriptlets)
  - enable SSL if SLAPDURLLIST is not set and we have certs
- fixes in preparation for openldap2.3
  - macro-ize more hardcoded versions

* Fri Jun 17 2005 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.27-1mdk
- New release 2.2.27
- drop migration subpackage (which will be packaged seperately)
- move 'make test' to %%check

* Thu Jun 09 2005 Andreas Hasenack <andreas@mandriva.com> 2.2.24-4mdk
- added account objectclass to migration tools when EXTENDED_SCHEMA is not
  being used (#15499)
- added preserve patch for migrationtools so that the temporary ldif file used
  during the import is not removed in the event of an error

* Wed Jun 01 2005 Andreas Hasenack <andreas@mandriva.com> 2.2.24-3mdk
- restart in %%pre and %%post has to deal with locales other than english
- rebuilt with newer sasl (2.1.22)

* Thu Apr 21 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 2.2.24-2mdk
- fix smbk5pwd build:
  - fix Patch20: use libtool archives in build dir for libldap_r and liblber
  - build openldap first so these archives are available

* Mon Apr 18 2005 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.24-1mdk
- 2.2.24
- update qmail schema (Tibor Pittich)
- buildconflicts with libdb4.3

* Wed Apr 06 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.2.23-5mdk
- add -fPIC to cflags for librewrite to fix build on amd64
- fix deps

* Fri Apr 01 2005 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.23-4mdk
- add conflict for devel package to allow upgrade (#14536)
- require the version of sasl we built against in post (#15056)
- dont use attributes in slapd.access.conf that were not available in
  default schemas before to not break upgrade (#15056)
- build with modules, but not in seperate packages (fixes upgrade with 
  module packages installed)
- handle databases defined in included files (fix upgrade for Kolab)
- allow disabling of database recovery at startup
- ship smbk5passwd module from cvs (p20), and make it work right (p21)
- disable parallel build (breaks building with modules)
- build against system db4.2 again
- only backup to ldif once for upgrade

* Mon Feb 07 2005 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.23-3mdk
- sync slapd.access.conf with version from openldap2.2 package
- unmark slapd.access.conf as noreplace, and warn the user to this fact

* Fri Feb 04 2005 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.23-2mdk
- fix typo in migration
- migrate data only once, even if the first failed
- fix libtool file fix
- provide backends when built without module support

* Wed Jan 26 2005 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.23-1mdk
- 2.2.23
- fix changelog (from bad merge)
- version the guide source
- run make test once
- fix migration (should migrate all ldbm or bdb database defined in slapd.conf)

* Fri Jan 21 2005 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.20-3mdk
- buildconflicts with older openldap-devel, so we don't link to parts
  of it in the devel package
- be able to disable tests (via --without test)
- fix typo in Contacts ACL
- add changelog for distro-specific release

* Wed Jan 05 2005 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.20-2mdk
- run make test in build
- build against system db4.2 on 10.1

* Tue Jan 04 2005 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.20-1mdk
- 2.2.20
- fix default slurpd replica path when not system ldap (#12745)
- stop slurpd if it is running, even if we couldn't stop slapd (#12760)
- allow overriding of replica detection in the init script when starting
  slurpd, via STARTSLURPD in the sysconfig file (#11552)
- fix rpmlint summary-ended-with-dot
- fix requires for -migration
- build against internal db4.2, otherwise we segfault? (#12759)

* Thu Dec 23 2004 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.19-3mdk
- really revert to db-4.2 (and enforce it now)
- fix conflict with system openldap (man pages)
- don't use attributes/objectclasses from obsolete samba2 schema in 
  slapd.access.conf

* Wed Dec 15 2004 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.19-2mdk
- use mkrel (conditionally define it) for distribution specific release tag
- revert to db-4.2 until Sleepycat bug #11505 is fixed
- update ntlm patch (p53), and apply it now
- fix calls to slapd_db* when not system ldap
- allow build-time setting of system (--with-system)
- macro-ise db4 libname
- update docs (finally) and document how to do it

* Mon Nov 29 2004 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.19-1mdk
- 2.2.19
- only do hostname-based release maths on i586 for now (and fix it too)
- drop p55 (final fix in upstream) and p54 (merged upstream)
- build against system db-4.3 on 10.2 and later

* Tue Nov 16 2004 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.18-3mdk
- better db4.3 patch (Quanah's)
- memleak fixes from HEAD (Quanah's)
- use original samba.schema, samba2 schema is now obsolete (samba2 retired)
- rename -devel-static to -static-devel
- don't provide unversioned -develprovides when not system

* Wed Nov 10 2004 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.18-2mdk
- build with internal db4.3
- ship db4 patches even if we don't build with internal db4

* Mon Oct 25 2004 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.18-1mdk
- 2.2.18
- drop buildconflicts
- fix last few "parallel install" issues (also fixes #12199)
- fix build without system db4
- add distribution-specific release number

* Fri Oct 08 2004 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.17-1mdk
- 2.2.17
- allow building as non-system, provision to alternativise (taken from samba)
  (syslog/logrotate config still needs fixing)

* Sun Aug 22 2004 Buchan Milne <bgmilne@linux-mandrake.com> 2.2.15-1mdk
- 2.2.15

* Sun Aug 01 2004 Buchan Milne <bgmilne@linux-mandrake.com> 2.1.29-6mdk
- slapd.init - only run recovery in start (don't destroy memory cache)
- rewrite of backup and reinitialise scripts
- slapd.conf, slapd.access.conf - better default ACLs
- add ldapns.schema, for migrating host attributes from "account" objectclass

* Thu Jun 17 2004 Jean-Michel Dault <jmdault@mandrakesoft.com> 2.1.29-5mdk
- change ldap.conf permissions to 644 so anyone can read the file. It's
  needed so Evolution and others can work.
- add autoconf2.5 and ed to buildrequires
- disable posix mutexes, this breaks setups with non-NPTL kernels,
  low-end processors (VIA, K6, P1), and User-Mode Linux
- use assembler mutexes whenever possible, since they're the fastest on
  Linux.

* Tue May 18 2004 Florin <florin@mandrakesoft.com> 2.1.29-4mdk
- fix the awk lines in the scripts

* Tue May 18 2004 Florin <florin@mandrakesoft.com> 2.1.29-3mdk
- add the ntlm.patch (required by fcrozat)

* Fri Apr 23 2004 Florin <florin@mandrakesoft.com> 2.1.29-2mdk
- add the forgotten dhcp.schema

* Fri Apr 02 2004 Buchan Milne <bgmilne@linux-mandrake.com> 2.1.29-1mdk
- 2.1.29 marked as stable
- drop patch 3
- add some example scripts for hot database backups / removal of old
  transaction logs.
- add schema for evolution, dnszone, sudo, dhcp, drop dns, cron (not valid,
  and never implemented)
- update ACLs to allow users to add contacts (ie via Evo).

* Thu Mar 25 2004 Florin <florin@mandrakesoft.com> 2.1.25-6mdk
- comment out the TLS_CACERT      /etc/ssl/cacert.pem line in ldap.conf
 the file doesn't exist anyway and it breaks the non TLS behaviour

* Wed Mar 24 2004 Buchan Milne <bgmilne@linux-mandrake.com> 2.1.25-5mdk
- db4.2.52.2
- fix replica uri support (patch from CVS/2.1.26/2.1.27)
- revert to using /etc/openldap/ldap.conf instead of /etc/ldap.conf (#4462)
- don't ship /var/run/ldap/openldap-slurpd
- merge fixes from amd64 branch (thanks Gwenole)
- set TMPDIR in init script to keep kerberos binds working after restart
  (Denis Havlik)
- better default slapd.access.conf and ldap.conf (don't require CA-signed certs)

* Fri Mar 12 2004 Frederic Crozat <fcrozat@mandrakesoft.com> 2.1.25-4mdk
- don't remove too much info in .la files otherwise other builds 
  might fail.

* Mon Feb 16 2004 Buchan Milne <bgmilne@linux-mandrake.com> 2.1.25-3mdk
- Build against internal version of db4 (so we can use db-4.2.52.1)
- adjust init script to not check for slurpd.pid (configuration specific)
  and handle 'replica uri' (Tibor).
- automatically run db_recover (or slapd_db_recover) during start/stop/restart
  for bdb databases
- fix hot-dump/restore pre/post scripts to handle multiple dbs
- include a sane copy of kolab.schema, and enable it and samba.schema in
  default config
- add example DB_CONFIG file

* Wed Jan 28 2004 Buchan Milne <bgmilne@linux-mandrake.com> 2.1.25-2mdk
- revert to 2.1.25

* Mon Jan 26 2004 Buchan Milne <bgmilne@linux-mandrake.com> 2.1.26-1mdk
- 2.1.26

* Thu Jan 15 2004 Buchan Milne <bgmilne@linux-mandrake.com> 2.1.25-1mdk
- 2.1.25
- Mirgration-tools 0.45 
- removed migration tools p44 (fixed upstream)
- updated migration tools p45 (including fix for schema compliance)
- slapd.conf: default to bdb backend, add examples for monitor backend
- updated samba (for samba-3.0.x with legacy entries uncommented) and qmail 
  (fixes syntax numbers) schemas
- ldap init script: start correctly without TLS (misc), more accurate regex's,
  and stop slurpd if config file doesn't have replica's, but slurpd is running
- return of patch0 (place ldap data and slurpd replog in /var/lib/ldap)

* Mon Jan 12 2004 Buchan Milne <bgmilne@linux-mandrake.com> 2.1.22-7mdk
- enable meta, perl and monitor modules (dynamic)

* Mon Dec 15 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 2.1.22-6mdk
- rebuild with latest openssl
- use column instead of period for chown [POSIX 1003.2]
- add /var/run/ldap/openldap-slurp

* Thu Aug 14 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.1.22-5mdk
- Fix deps

* Mon Aug 11 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.1.22-4mdk
- Nuke rpath, make it know about -lssl

* Thu Jul 31 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.1.22-3mdk
- Fix mklibnamification

* Wed Jul 09 2003 Buchan Milne <bgmilne@linux-mandrake.com> 2.1.22-2mdk
- index on install/upgrade (should fix 2.0.x->2.1.x assuming no schema
  violations)
- TODO: test/patch migration tools, provide update default config 
  (bdb, better ACLs)

* Tue Jul 01 2003 Buchan Milne <bgmilne@linux-mandrake.com> 2.1.22-1mdk
- 2.1.22
- Merge changes from sparc team on 2.0.x (as below)

* Fri Jun 13 2003 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.0.27-7mdk
- add --without-sql
- %%mklibname
- openldap-servers: add PreReq rpm-helper

* Fri May 23 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.1.20-1mdk
- 2.1.20

* Sun May 18 2003 Buchan Milne <bgmilne@linux-mandrake.com> 2.1.19-1mdk
- Openldap 2.1, with sasl2 and db4
- Update kerberosobject.schema (to include krbName atttribute removed from
  core.schema) and add krb5-kdc.schema (removed upstream).

* Tue Apr 29 2003 Vincent Danen <vdanen@linux-mandrake.com> 2.0.27-6mdk
- patch to fix library order for slapd so that unix crypt md5 hashes work
  properly

* Wed Apr 23 2003 Buchan Milne <bgmilne@linux-mandrake.com> 2.0.27-5mdk
- Specify the ldbm-api, so we don't get a random one ... and get the wrong
  one. Seems berkeley is better, and that's what 9.0 had.
- OK, maybe we should make it optional, for people who have had the
  misfortune of already "upgrading". Options are now:
  --with[out] cyrussasl (new) or --with[out] SASL (synonyms) (default: with)
  --with[out] kerberos (new) (default: without)
  --with gdbm (new) (defaults to berkeley without this option)
- Trash the message in post about a file that was removed a long time ago
  (with no changelog entry :-().
- configure options given in the same order as the --help (to easily read it)
- make --short-cricuit work to test scripts
  -DON'T CLEAN THE BUILDDIR!!! (that's what --clean is for)
  -clean the buildroot in install
- Provide automatic migration of ldap data from previous db format
  to current db format for a single database (multi-db installations
  are on your own). Any 9.1 installation with a single database should
  work after upgrading to this one, regardless of which db format
  is currently in use (gdbm as in the 9.1 packages or berkeley as in 9.0).

* Mon Jan 20 2003 Florin <florin@mandrakesoft.com> 2.0.27-4mdk
- rebuild and remove the schema dir ownership 

* Fri Jan 17 2003 Florin <florin@mandrakesoft.com> 2.0.27-3mdk
- add the maildrop schema (V. Guardiola's idea)

* Fri Jan 17 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.27-2mdk
- fix added syslog entry

* Mon Nov 04 2002 Vincent Danen <vdanen@mandrakesoft.com> 2.0.27-1mdk
- 2.0.27
- start slurpd as user ldap, not root (re: bgmilne)

* Wed Sep 11 2002 Vincent Danen <vdanen@mandrakesoft.com> 2.0.25-7mdk
- put /etc/ssl/openldap in openldap-server package since openldap-server
  does not specifically need the openldap package (re: Juhani Kurki)
- better cleanup
- fix libldap.la (re: Lonnie Borntreger)

* Thu Aug 01 2002 Vincent Danen <vdanen@mandrakesoft.com> 2.0.25-6mdk
- really put ldap.pem into /etc/ssl/openldap
- use %%_{pre,postun}_user{add,del} macros for ldap user in servers

* Fri Jul 26 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.0.25-5mdk
- Enable build --with[out] SASL
- Patch25: Stop self-requiring when linking libldap.so. Aka. link with
  liblber that was just compiled

* Wed Jul 24 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.0.25-4mdk
- rebuild for new readline

* Thu Jul 11 2002 Frederic Lepied <flepied@mandrakesoft.com> 2.0.25-3mdk
- rebuild to have the correct provides

* Wed Jul 10 2002 Sylvestre Taburet <staburet@mandrakesoft.com> 2.0.25-2mdk
- sync samba.schema with samba-2.2.5

* Wed Jun 19 2002 Vincent Danen <vdanen@mandrakesoft.com> 2.0.25-1mdk
- 2.0.25
- MigrationTools 40
- include a basic loglevel in slapd.conf so we can get some logging by
  default
- add qmailControl.schema
- take samba.schema from samba 2.2.3a
- remove references to patches no longer included
- spec cleanups
- since setup pkg contains ldap user, let's remove all {user,group}{del,add}
  stuff; still keep adding ldap user to adm group for the time being
- put /etc/openldap/ldap.conf back
- make ldap.pem in %%post instead of the initscript
- clean up the initscript so it's output is not so annoying
- put ldap.pem into /etc/ssl/openldap

* Tue Mar 12 2002 Daouda LO <daouda@mandrakesoft.com> 2.0.21-4mdk
- split the LANG variable to get correct country code.

* Thu Feb 14 2002 Vincent Danen <vdanen@mandrakesoft.com> 2.0.21-3mdk
- fix typeo in misc.schema

* Mon Jan 28 2002 Vincent Danen <vdanen@mandrakesoft.com> 2.0.21-2mdk
- fix typeo in schema patch
- fix some rpmlint warnings
- fix slapd.conf; remove missing nadf.schema reference
- fix logrotate entry so slapd is restarted only if it's already running
  (re: mr@uue.org)

* Tue Jan 22 2002 Vincent Danen <vdanen@mandrakesoft.com> 2.0.21-1mdk
- 2.0.21 (security update)
- regenerate schema patch

* Tue Dec 25 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.0.19-1mdk
- 2.0.19 for general usage.

* Thu Dec 06 2001 Philippe Libat <philippe@mandrakesoft.com> 2.0.18-3mdk
- fix static librairies (Patch24+libtool comment)

* Mon Nov 26 2001 Philippe Libat <philippe@mandrakesoft.com> 2.0.18-2mdk
- add new schema
- Migration Tools v39

* Fri Oct 26 2001 Vincent Saugey <vince@mandrakesoft.com> 2.0.18-1mdk
- Up to 2.0.18

* Tue Oct 16 2001 Vincent Saugey <vince@mandrakesoft.com> 2.0.17-1mdk
- Up to 2.0.17

* Thu Oct 11 2001 Christian Belisle <cbelisle@mandrakesoft.com> 2.0.15-2mdk
- new db3.

* Sat Sep 22 2001 Vincent Saugey <vince@mandrakesoft.com> 2.0.15-1mdk
- Up to 2.0.15, SSL fix

* Tue Sep 11 2001 Vincent Saugey <vince@mandrakesoft.com> 2.0.14-1mdk
- Up 2.0.14, Fixed slurpd millionth second bug.

* Mon Sep 10 2001 Vincent Saugey <vince@mandrakesoft.com> 2.0.13-1mdk
- Up to 2.0.13

* Fri Aug 31 2001 Vincent Saugey <vince@mandrakesoft.com> 2.0.12-1mdk
- Up to 2.0.12

* Fri Aug 24 2001 Vincent Saugey <vince@mandrakesoft.com> 2.0.11-6mdk
- Adding some directory in package (thanks to fcrozat)

* Thu Jul 05 2001 Philippe Libat <philippe@mandrakesoft.com> 2.0.11-6mdk
- new db3

* Mon Jul 02 2001 Philippe Libat <philippe@mandrakesoft.com> 2.0.11-5mdk
- fix requires on openldap-migration

* Wed Jun 27 2001 Vincent Saugey <vince@mandrakesoft.com> 2.0.11-4mdk
- Change typo fault in gencert script

* Mon Jun 11 2001 Vincent Saugey <vince@mandrakesoft.com> 2.0.11-3mdk
- Rebuild with some change
- Rebuild with cooker's libtool
- Remove slapcat because cooker broken libtool 
- Auto preset common name by hostname in gencert

* Mon May 28 2001 Christian Zoffoli <czoffoli@mandrakesoft.com> 2.0.11-2mdk
- added a statically compiled slapcat (named slapcat-gdbm) to dump gdbm DBs 
  to LDIF files also with an OpenLDAP compiled with Berkeley DB support
- added BuildRequires: db3-devel
- fixed certificate search in the init script
- added some conversion infos in the init script

* Mon May 28 2001 Vincent Saugey <vince@mandrakesoft.com> 2.0.11-1mdk
- Update to 2.0.11
- Build on 8.0, cooker devel environnement is broken

* Tue May 22 2001 Vincent Saugey <vince@mandrakesoft.com> 2.0.10-1mdk
- Adding default run level in init file
- Up to 2.0.10
- Don't get patched file in migration package
- Set default country in gencert.sh by default lang
- Now generate certificate at first start of server
- Correct strange space in sldap.conf patch (it made warning message on start
  of slapd)
- Using berkeley base for storing

* Mon May 21 2001 Vincent Saugey <vince@mandrakesoft.com> 2.0.9-2mdk
- Require setup with ldap user (remove user creation in few time, please ugrade).
- Adding i18n for migration tools patch.

* Sat May 19 2001 Christian Zoffoli <czoffoli@linux-mandrake.com> 2.0.9-1mdk
- 2.0.9
- removed no more needed openldap-2.0.8-ipv6-configure.patch (ITS#1146)
- new openldap-2.0.9-slapd.conf.patch (added basic ACL)

* Tue May 15 2001 Christian Zoffoli <czoffoli@linux-mandrake.com> 2.0.8-3mdk
- added Conflicts: openldap1-devel
- clean up in spec

* Mon May 14 2001 Vincent Saugey <vince@mandrakesoft.com> 2.0.8-2mdk
- Rebuild on cooker environnement (Thx to : Christian Zoffoli)

* Sat May 12 2001 Christian Zoffoli <czoffoli@linux-mandrake.com> 2.0.8-1mdk
- 2.0.8
- removed not needed openldap-norbert.patch
- updated openldap-2.0.8-slapd.conf.patch
- added openldap-2.0.8-ipv6-configure.patch

* Thu May 10 2001 Vincent Saugey <vince@mandrakesoft.com> 2.0.7-9mdk
- Really fall in love Christian's work !!!
- Removed not needen rh patch 
- Assembled html admin guide in one file
- Changed number of patch and source for easy maintenance
- Added migration package

* Tue May 08 2001 Christian Zoffoli <czoffoli@linux-mandrake.com> 2.0.7-8mdk
- added static libraries
- s!Copyright!License

* Mon May 07 2001 Christian Zoffoli <czoffoli@linux-mandrake.com> 2.0.7-7mdk
- added reset permissions on post macro
- merged with last RH patches
- removed ldap.conf
- improved post - postun - preun macros
- fixed tcp_wrapper support (allowing slapd to read hosts.*)
- fixed man pages (removed buildroot)

* Thu Apr 26 2001 Christian Zoffoli <czoffoli@linux-mandrake.com> 2.0.7-6mdk
- complete spec restyle
- Migration Tools v37
- merge with RH patches
- merge with PLD patches
- added SSL/TLS, unixODBC support
- added modules: dnssrv, sql, ldap, passwd
- added static modules: ldbm, shell
- changed default schema location
- added libldap2-static-devel package
- added openldap-servers package
- added openldap-clients package
- added openldap-guide package (added guide)
- added ldap user/group
- OpenLDAP executed as ldap  :O
- fixed slapd - slurpd DB paths
- fixed module path
- massive changes on default slapd.conf
- added Netscape Roaming profiles schema
- added QMAIL schema
- added kerberos schema
- added autofs schema
- added samba schema (MS AD)
- improved init script
- added certificate generation
- added syslog support (with autoprobe local-user) + logrotate 

* Mon Apr 09 2001 Vincent Saugey <vince@mandrakesoft.com> 2.0.7-5mdk
- Adaptation of default config file (bug#: 3044, by peter.boerner@lhsystems.com) 

* Mon Apr 02 2001 Vincent Saugey <vince@mandrakesoft.com> 2.0.7-4mdk
- Using build server macro

* Fri Mar 09 2001 Vincent Saugey <vince@mandrakesoft.com> 2.0.7-3mdk
- Rebuild with sasl support
- Correct bad link in man page

* Mon Feb 19 2001 Vincent Saugey <vince@mandrakesoft.com> 2.0.7-2mdk
- adding provide openldap-devel to libldap-devel package

* Tue Feb 13 2001 Vincent Saugey <vince@mandrakesoft.com> 2.0.7-1mdk
- Libificatizication
- Up to 2.0.7 (promize at French linux-expo, sorry for late)
- Update Migration tools to 2.0.7

* Tue Oct 17 2000 Vincent Saugey <vince@mandrakesoft.com> 2.0.6-1mdk
- Up to 2.0.6
- Macrozification

* Wed Aug 30 2000 Etienne Faure <etienne@mandrakesoft.com> 1.2.9-7mdk
- rebuilt with _mandir macro

* Fri Jul 07 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.2.9-6mdk.
- Remove make tests.

* Fri Apr 21 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.2.9-5mdk
- Move default databases to /var/lib/ldap and not /usr/tmp/
- Add redhat patch.
- Clean up.

* Tue Mar 21 2000 Jerome Dumonteil <jd@mandrakesoft.com>
- error in changelog

* Mon Mar 13 2000 Jerome Dumonteil <jd@mandrakesoft.com>
- Upgrade to versin 1.2.9
- use of _prefix

* Tue Nov 30 1999 Jerome Dumonteil <jd@mandrakesoft.com>
- Upgrade version of MigrationTools.
- use of _tmppath and prefix

* Sun Nov 07 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Get your life easy, patch the sources for bzman.

* Tue Nov 02 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- First mandrake release.

* Mon Sep 13 1999 Bill Nottingham <notting@redhat.com>
- strip files

* Sat Sep 11 1999 Bill Nottingham <notting@redhat.com>
- update to 1.2.7
- fix some bugs from bugzilla (#4885, #4887, #4888, #4967)
- take include files out of base package

* Fri Aug 27 1999 Jeff Johnson <jbj@redhat.com>
- missing ;; in init script reload) (#4734).

* Tue Aug 24 1999 Cristian Gafton <gafton@redhat.com>
- move stuff from /usr/libexec to /usr/sbin
- relocate config dirs to /etc/openldap

* Mon Aug 16 1999 Bill Nottingham <notting@redhat.com>
- initscript munging

* Wed Aug 11 1999 Cristian Gafton <gafton@redhat.com>
- add the migration tools to the package

* Fri Aug 06 1999 Cristian Gafton <gafton@redhat.com>
- upgrade to 1.2.6
- add rc.d script
- split -devel package

* Sun Feb 07 1999 Preston Brown <pbrown@redhat.com>
- upgrade to latest stable (1.1.4), it now uses configure macro.

* Fri Jan 15 1999 Bill Nottingham <notting@redhat.com>
- build on arm, glibc2.1

* Wed Oct 28 1998 Preston Brown <pbrown@redhat.com>
- initial cut.
- patches for signal handling on the alpha