summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support
diff options
context:
space:
mode:
authorJackie Huang <jackie.huang@windriver.com>2014-09-29 06:09:10 -0400
committerMartin Jansa <Martin.Jansa@gmail.com>2014-10-10 12:47:34 +0200
commiteb65ab684d824be1d12524cb307d9e59925147c1 (patch)
tree875253c57eaa7e86e70d21b58cc396fb9c2de342 /meta-oe/recipes-support
parent17ff23b4a4a0e5ed7efde107fb00296f1ebd5fdd (diff)
downloadmeta-openembedded-eb65ab684d824be1d12524cb307d9e59925147c1.tar.gz
openldap: update version to 2.4.39
Changed: * Move slapd from ${libexecdir} to ${sbin}: Installing slapd under ${sbin} is more FHS and LSB compliance * Manage init script by inheriting update-rc.d, than postinst * Add status for initscript * Rename the patch named with commit id to gnutls-Avoid-use-of-deprecated-function.patch * Add a patch for CVE-2013-4449 * Add a patch to use /dev/urandom for entropy * Allow tls obtains random bits from /dev/urandom: The URANDOM_DEVICE is undefined for cross-compiling, define it as /dev/urandom to allow tls obtains random bits from /dev/urandom. * Add PACKAGECONFIG for mdb, ndb, relay and sock * Remove unsupported config for ldbm * Add license file Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r--meta-oe/recipes-support/openldap/openldap-2.4.39/ITS-7723-fix-reference-counting.patch38
-rw-r--r--meta-oe/recipes-support/openldap/openldap-2.4.39/gnutls-Avoid-use-of-deprecated-function.patch (renamed from meta-oe/recipes-support/openldap/openldap-2.4.23/0205e83f4670d10ad3c6ae4b8fc5ec1d0c7020c0.patch)0
-rw-r--r--meta-oe/recipes-support/openldap/openldap-2.4.39/initscript (renamed from meta-oe/recipes-support/openldap/openldap-2.4.23/initscript)10
-rw-r--r--meta-oe/recipes-support/openldap/openldap-2.4.39/install-strip.patch (renamed from meta-oe/recipes-support/openldap/openldap-2.4.23/install-strip.patch)0
-rw-r--r--meta-oe/recipes-support/openldap/openldap-2.4.39/kill-icu.patch (renamed from meta-oe/recipes-support/openldap/openldap-2.4.23/kill-icu.patch)0
-rw-r--r--meta-oe/recipes-support/openldap/openldap-2.4.39/openldap-2.4.28-gnutls-gcrypt.patch (renamed from meta-oe/recipes-support/openldap/openldap-2.4.23/openldap-2.4.28-gnutls-gcrypt.patch)0
-rw-r--r--meta-oe/recipes-support/openldap/openldap-2.4.39/openldap-m4-pthread.patch (renamed from meta-oe/recipes-support/openldap/openldap-2.4.23/openldap-m4-pthread.patch)0
-rw-r--r--meta-oe/recipes-support/openldap/openldap-2.4.39/use-urandom.patch38
-rw-r--r--meta-oe/recipes-support/openldap/openldap_2.4.39.bb (renamed from meta-oe/recipes-support/openldap/openldap_2.4.23.bb)81
9 files changed, 125 insertions, 42 deletions
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.39/ITS-7723-fix-reference-counting.patch b/meta-oe/recipes-support/openldap/openldap-2.4.39/ITS-7723-fix-reference-counting.patch
new file mode 100644
index 000000000..9a0f4cb14
--- /dev/null
+++ b/meta-oe/recipes-support/openldap/openldap-2.4.39/ITS-7723-fix-reference-counting.patch
@@ -0,0 +1,38 @@
1From 59688044386dfeee0c837a15133f4e878f1bb661 Mon Sep 17 00:00:00 2001
2From: Jan Synacek <jsynacek@redhat.com>
3Date: Wed, 13 Nov 2013 09:06:54 +0100
4Subject: [PATCH] ITS#7723 fix reference counting
5
6Upstream-Status: Backport
7
8Commit 59688044386dfeee0c837a15133f4e878f1bb661 upstream
9
10Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
11Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
12---
13 libraries/librewrite/session.c | 2 ++
14 1 files changed, 2 insertions(+), 0 deletions(-)
15
16diff --git a/libraries/librewrite/session.c b/libraries/librewrite/session.c
17index fcc7698..02fc054 100644
18--- a/libraries/librewrite/session.c
19+++ b/libraries/librewrite/session.c
20@@ -161,6 +161,7 @@ rewrite_session_find(
21 #ifdef USE_REWRITE_LDAP_PVT_THREADS
22 if ( session ) {
23 ldap_pvt_thread_mutex_lock( &session->ls_mutex );
24+ session->ls_count++;
25 }
26 ldap_pvt_thread_rdwr_runlock( &info->li_cookies_mutex );
27 #endif /* USE_REWRITE_LDAP_PVT_THREADS */
28@@ -178,6 +179,7 @@ rewrite_session_return(
29 )
30 {
31 assert( session != NULL );
32+ session->ls_count--;
33 ldap_pvt_thread_mutex_unlock( &session->ls_mutex );
34 }
35
36--
371.7.5.4
38
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.23/0205e83f4670d10ad3c6ae4b8fc5ec1d0c7020c0.patch b/meta-oe/recipes-support/openldap/openldap-2.4.39/gnutls-Avoid-use-of-deprecated-function.patch
index dffd3ca51..dffd3ca51 100644
--- a/meta-oe/recipes-support/openldap/openldap-2.4.23/0205e83f4670d10ad3c6ae4b8fc5ec1d0c7020c0.patch
+++ b/meta-oe/recipes-support/openldap/openldap-2.4.39/gnutls-Avoid-use-of-deprecated-function.patch
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.23/initscript b/meta-oe/recipes-support/openldap/openldap-2.4.39/initscript
index 1395f7256..08d1067a7 100644
--- a/meta-oe/recipes-support/openldap/openldap-2.4.23/initscript
+++ b/meta-oe/recipes-support/openldap/openldap-2.4.39/initscript
@@ -5,8 +5,10 @@
5# > update-rc.d openldap defaults 60 5# > update-rc.d openldap defaults 60
6# 6#
7 7
8# Source function library.
9. /etc/init.d/functions
8 10
9slapd=/usr/libexec/slapd 11slapd=/usr/sbin/slapd
10test -x "$slapd" || exit 0 12test -x "$slapd" || exit 0
11 13
12 14
@@ -21,8 +23,12 @@ case "$1" in
21 start-stop-daemon --stop --quiet --pidfile /var/run/slapd.pid 23 start-stop-daemon --stop --quiet --pidfile /var/run/slapd.pid
22 echo "." 24 echo "."
23 ;; 25 ;;
26 status)
27 status $slapd;
28 exit $?
29 ;;
24 *) 30 *)
25 echo "Usage: /etc/init.d/openldap {start|stop}" 31 echo "Usage: /etc/init.d/openldap {start|stop|status}"
26 exit 1 32 exit 1
27esac 33esac
28 34
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.23/install-strip.patch b/meta-oe/recipes-support/openldap/openldap-2.4.39/install-strip.patch
index 2992b7030..2992b7030 100644
--- a/meta-oe/recipes-support/openldap/openldap-2.4.23/install-strip.patch
+++ b/meta-oe/recipes-support/openldap/openldap-2.4.39/install-strip.patch
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.23/kill-icu.patch b/meta-oe/recipes-support/openldap/openldap-2.4.39/kill-icu.patch
index dcf541137..dcf541137 100644
--- a/meta-oe/recipes-support/openldap/openldap-2.4.23/kill-icu.patch
+++ b/meta-oe/recipes-support/openldap/openldap-2.4.39/kill-icu.patch
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.23/openldap-2.4.28-gnutls-gcrypt.patch b/meta-oe/recipes-support/openldap/openldap-2.4.39/openldap-2.4.28-gnutls-gcrypt.patch
index c7b1552c1..c7b1552c1 100644
--- a/meta-oe/recipes-support/openldap/openldap-2.4.23/openldap-2.4.28-gnutls-gcrypt.patch
+++ b/meta-oe/recipes-support/openldap/openldap-2.4.39/openldap-2.4.28-gnutls-gcrypt.patch
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.23/openldap-m4-pthread.patch b/meta-oe/recipes-support/openldap/openldap-2.4.39/openldap-m4-pthread.patch
index b669b7254..b669b7254 100644
--- a/meta-oe/recipes-support/openldap/openldap-2.4.23/openldap-m4-pthread.patch
+++ b/meta-oe/recipes-support/openldap/openldap-2.4.39/openldap-m4-pthread.patch
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.39/use-urandom.patch b/meta-oe/recipes-support/openldap/openldap-2.4.39/use-urandom.patch
new file mode 100644
index 000000000..e7b988faf
--- /dev/null
+++ b/meta-oe/recipes-support/openldap/openldap-2.4.39/use-urandom.patch
@@ -0,0 +1,38 @@
1openldap: assume /dev/urandom exists
2
3When we are cross-compiling, we want to assume
4that /dev/urandom exists. We could change the source
5code to look for it, but this is the easy way out.
6
7Upstream-Status: pending
8
9Signed-off-by: Joe Slater <jslater@windriver.com>
10
11
12--- a/configure.in
13+++ b/configure.in
14@@ -2142,8 +2142,8 @@ fi
15
16 dnl ----------------------------------------------------------------
17 dnl Check for entropy sources
18+dev=no
19 if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
20- dev=no
21 if test -r /dev/urandom ; then
22 dev="/dev/urandom";
23 elif test -r /idev/urandom ; then
24@@ -2156,9 +2156,11 @@ if test $cross_compiling != yes && test
25 dev="/idev/random";
26 fi
27
28- if test $dev != no ; then
29- AC_DEFINE_UNQUOTED(URANDOM_DEVICE,"$dev",[set to urandom device])
30- fi
31+elif test $cross_compiling == yes ; then
32+ dev="/dev/urandom";
33+fi
34+if test $dev != no ; then
35+ AC_DEFINE_UNQUOTED(URANDOM_DEVICE,"$dev",[set to urandom device])
36 fi
37
38 dnl ----------------------------------------------------------------
diff --git a/meta-oe/recipes-support/openldap/openldap_2.4.23.bb b/meta-oe/recipes-support/openldap/openldap_2.4.39.bb
index b2693b5b0..243e38f39 100644
--- a/meta-oe/recipes-support/openldap/openldap_2.4.23.bb
+++ b/meta-oe/recipes-support/openldap/openldap_2.4.39.bb
@@ -1,5 +1,6 @@
1# OpenLDAP, a license free (see http://www.OpenLDAP.org/license.html) 1# OpenLDAP, a license free (see http://www.OpenLDAP.org/license.html)
2# 2#
3SUMMARY = "OpenLDAP Directory Service"
3DESCRIPTION = "OpenLDAP Software is an open source implementation of the Lightweight Directory Access Protocol." 4DESCRIPTION = "OpenLDAP Software is an open source implementation of the Lightweight Directory Access Protocol."
4HOMEPAGE = "http://www.OpenLDAP.org/license.html" 5HOMEPAGE = "http://www.OpenLDAP.org/license.html"
5# The OpenLDAP Public License - see the HOMEPAGE - defines 6# The OpenLDAP Public License - see the HOMEPAGE - defines
@@ -8,7 +9,9 @@ HOMEPAGE = "http://www.OpenLDAP.org/license.html"
8# basically BSD. opensource.org does not record this license 9# basically BSD. opensource.org does not record this license
9# at present (so it is apparently not OSI certified). 10# at present (so it is apparently not OSI certified).
10LICENSE = "OpenLDAP" 11LICENSE = "OpenLDAP"
11LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=3d82d3085f228af211a6502c7ea7c3c7" 12LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=f2bdbaa4f50199a00b6de2ca7ec1db05 \
13 file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972 \
14"
12SECTION = "libs" 15SECTION = "libs"
13 16
14LDAP_VER = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}" 17LDAP_VER = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}"
@@ -16,22 +19,23 @@ LDAP_VER = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}"
16SRC_URI = "ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${BP}.tgz \ 19SRC_URI = "ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${BP}.tgz \
17 file://openldap-m4-pthread.patch \ 20 file://openldap-m4-pthread.patch \
18 file://kill-icu.patch \ 21 file://kill-icu.patch \
19 file://0205e83f4670d10ad3c6ae4b8fc5ec1d0c7020c0.patch \ 22 file://gnutls-Avoid-use-of-deprecated-function.patch \
20 file://openldap-2.4.28-gnutls-gcrypt.patch \ 23 file://openldap-2.4.28-gnutls-gcrypt.patch \
24 file://ITS-7723-fix-reference-counting.patch \
25 file://use-urandom.patch \
21 file://initscript \ 26 file://initscript \
22" 27"
23SRC_URI[md5sum] = "90150b8c0d0192e10b30157e68844ddf" 28SRC_URI[md5sum] = "b0d5ee4b252c841dec6b332d679cf943"
24SRC_URI[sha256sum] = "5a5ede91d5e8ab3c7f637620aa29a3b96eb34318a8b26c8eef2d2c789fc055e3" 29SRC_URI[sha256sum] = "8267c87347103fef56b783b24877c0feda1063d3cb85d070e503d076584bf8a7"
25 30
26DEPENDS = "util-linux groff-native" 31DEPENDS = "util-linux groff-native"
27 32
28PR = "r1"
29# The original top.mk used INSTALL, not INSTALL_STRIP_PROGRAM when 33# The original top.mk used INSTALL, not INSTALL_STRIP_PROGRAM when
30# installing .so and executables, this fails in cross compilation 34# installing .so and executables, this fails in cross compilation
31# environments 35# environments
32SRC_URI += "file://install-strip.patch" 36SRC_URI += "file://install-strip.patch"
33 37
34inherit autotools-brokensep 38inherit autotools-brokensep update-rc.d
35 39
36# CV SETTINGS 40# CV SETTINGS
37# Required to work round AC_FUNC_MEMCMP which gets the wrong answer 41# Required to work round AC_FUNC_MEMCMP which gets the wrong answer
@@ -47,7 +51,7 @@ EXTRA_OECONF += "--with-yielding-select=yes"
47EXTRA_OECONF += "--enable-dynamic" 51EXTRA_OECONF += "--enable-dynamic"
48 52
49PACKAGECONFIG ??= "gnutls modules \ 53PACKAGECONFIG ??= "gnutls modules \
50 ldap meta monitor null passwd shell proxycache dnssrv \ 54 bdb hdb ldap meta monitor null passwd shell proxycache dnssrv \
51" 55"
52#--with-tls with TLS/SSL support auto|openssl|gnutls [auto] 56#--with-tls with TLS/SSL support auto|openssl|gnutls [auto]
53PACKAGECONFIG[gnutls] = "--with-tls=gnutls,,gnutls libgcrypt" 57PACKAGECONFIG[gnutls] = "--with-tls=gnutls,,gnutls libgcrypt"
@@ -64,14 +68,9 @@ EXTRA_OECONF += "--enable-crypt"
64# SLAPD BACKEND 68# SLAPD BACKEND
65# 69#
66# The backend must be set by the configuration. This controls the 70# The backend must be set by the configuration. This controls the
67# required database, the default database, bdb, is turned off but 71# required database.
68# can be turned back on again and it *is* below! The monitor backend
69# is also disabled. If you try to change the backends but fail to
70# enable a single one the build will fail in an obvious way.
71#
72EXTRA_OECONF += "--disable-bdb --disable-hdb --disable-monitor"
73# 72#
74# Backends="bdb dnssrv hdb ldap ldbm meta monitor null passwd perl shell sql" 73# Backends="bdb dnssrv hdb ldap mdb meta monitor ndb null passwd perl relay shell sock sql"
75# 74#
76# Note that multiple backends can be built. The ldbm backend requires a 75# Note that multiple backends can be built. The ldbm backend requires a
77# build-time choice of database API. The bdb backend forces this to be 76# build-time choice of database API. The bdb backend forces this to be
@@ -82,27 +81,19 @@ md = "${libexecdir}/openldap"
82#--enable-bdb enable Berkeley DB backend no|yes|mod yes 81#--enable-bdb enable Berkeley DB backend no|yes|mod yes
83# The Berkely DB is the standard choice. This version of OpenLDAP requires 82# The Berkely DB is the standard choice. This version of OpenLDAP requires
84# the version 4 implementation or better. 83# the version 4 implementation or better.
85PACKAGECONFIG[bdb] = "--enable-bdb=mod,--enable-bdb=no,db" 84PACKAGECONFIG[bdb] = "--enable-bdb=yes,--enable-bdb=no,db"
86 85
87#--enable-dnssrv enable dnssrv backend no|yes|mod no 86#--enable-dnssrv enable dnssrv backend no|yes|mod no
88PACKAGECONFIG[dnssrv] = "--enable-dnssrv=mod,--enable-dnssrv=no" 87PACKAGECONFIG[dnssrv] = "--enable-dnssrv=mod,--enable-dnssrv=no"
89 88
90#--enable-hdb enable Hierarchical DB backend no|yes|mod no 89#--enable-hdb enable Hierarchical DB backend no|yes|mod no
91# This forces ldbm to use Berkeley too, remove to use gdbm 90PACKAGECONFIG[hdb] = "--enable-hdb=yes,--enable-hdb=no,db"
92PACKAGECONFIG[hdb] = "--enable-hdb=mod,--enable-hdb=no,db"
93 91
94#--enable-ldap enable ldap backend no|yes|mod no 92#--enable-ldap enable ldap backend no|yes|mod no
95PACKAGECONFIG[ldap] = "--enable-ldap=mod,--enable-ldap=no," 93PACKAGECONFIG[ldap] = "--enable-ldap=mod,--enable-ldap=no,"
96 94
97#--enable-ldbm enable ldbm backend no|yes|mod no 95#--enable-mdb enable mdb database backend no|yes|mod [yes]
98# ldbm requires further specification of the underlying database API, because 96PACKAGECONFIG[mdb] = "--enable-mdb=mod,--enable-mdb=no,"
99# bdb is enabled above this must be set to berkeley, however the config
100# defaults this correctly so --with-ldbm-api is *not* set. The build will
101# fail if bdb is removed, but no database is built to provide the
102# support for ldbm
103# guide.html:<P>back-ldbm was both slow and unreliable. Its byzantine indexing code was prone to spontaneous corruption, as were the underlying database libraries that were commonly used (e.g. GDBM or NDBM). back-bdb and back-hdb are superior in every aspect, with simplified indexing to avoid index corruption, fine-grained locking for greater concurrency, hierarchical caching for greater performance, streamlined on-disk format for greater efficiency and portability, and full transaction support for greater reliability.</P>
104# configure: WARNING: unrecognized options: --disable-silent-rules, --enable-ldbm, --with-ldbm-api
105#PACKAGECONFIG[ldbm] = "--enable-ldbm=mod --with-ldbm-api=gdbm,--enable-ldbm-no,gdbm"
106 97
107#--enable-meta enable metadirectory backend no|yes|mod no 98#--enable-meta enable metadirectory backend no|yes|mod no
108PACKAGECONFIG[meta] = "--enable-meta=mod,--enable-meta=no," 99PACKAGECONFIG[meta] = "--enable-meta=mod,--enable-meta=no,"
@@ -110,6 +101,9 @@ PACKAGECONFIG[meta] = "--enable-meta=mod,--enable-meta=no,"
110#--enable-monitor enable monitor backend no|yes|mod yes 101#--enable-monitor enable monitor backend no|yes|mod yes
111PACKAGECONFIG[monitor] = "--enable-monitor=mod,--enable-monitor=no," 102PACKAGECONFIG[monitor] = "--enable-monitor=mod,--enable-monitor=no,"
112 103
104#--enable-ndb enable MySQL NDB Cluster backend no|yes|mod [no]
105PACKAGECONFIG[ndb] = "--enable-ndb=mod,--enable-ndb=no,"
106
113#--enable-null enable null backend no|yes|mod no 107#--enable-null enable null backend no|yes|mod no
114PACKAGECONFIG[null] = "--enable-null=mod,--enable-null=no," 108PACKAGECONFIG[null] = "--enable-null=mod,--enable-null=no,"
115 109
@@ -122,10 +116,16 @@ PACKAGECONFIG[passwd] = "--enable-passwd=mod,--enable-passwd=no,"
122# up the build machine perl - not good (inherit perlnative?) 116# up the build machine perl - not good (inherit perlnative?)
123PACKAGECONFIG[perl] = "--enable-perl=mod,--enable-perl=no,perl" 117PACKAGECONFIG[perl] = "--enable-perl=mod,--enable-perl=no,perl"
124 118
119#--enable-relay enable relay backend no|yes|mod [yes]
120PACKAGECONFIG[relay] = "--enable-relay=mod,--enable-relay=no,"
121
125#--enable-shell enable shell backend no|yes|mod no 122#--enable-shell enable shell backend no|yes|mod no
126# configure: WARNING: Use of --without-threads is recommended with back-shell 123# configure: WARNING: Use of --without-threads is recommended with back-shell
127PACKAGECONFIG[shell] = "--enable-shell=mod --without-threads,--enable-shell=no," 124PACKAGECONFIG[shell] = "--enable-shell=mod --without-threads,--enable-shell=no,"
128 125
126#--enable-sock enable sock backend no|yes|mod [no]
127PACKAGECONFIG[sock] = "--enable-sock=mod,--enable-sock=no,"
128
129#--enable-sql enable sql backend no|yes|mod no 129#--enable-sql enable sql backend no|yes|mod no
130# sql requires some sql backend which provides sql.h, sqlite* provides 130# sql requires some sql backend which provides sql.h, sqlite* provides
131# sqlite.h (which may be compatible but hasn't been tried.) 131# sqlite.h (which may be compatible but hasn't been tried.)
@@ -141,7 +141,10 @@ PACKAGECONFIG[proxycache] = "--enable-proxycache=mod,--enable-proxycache=no,"
141FILES_${PN}-overlay-proxycache = "${md}/pcache-*.so.*" 141FILES_${PN}-overlay-proxycache = "${md}/pcache-*.so.*"
142PACKAGES += "${PN}-overlay-proxycache" 142PACKAGES += "${PN}-overlay-proxycache"
143 143
144CPPFLAGS_append = " -D_GNU_SOURCE" 144# Append URANDOM_DEVICE='/dev/urandom' to CPPFLAGS:
145# This allows tls to obtain random bits from /dev/urandom, by default
146# it was disabled for cross-compiling.
147CPPFLAGS_append = " -D_GNU_SOURCE -DURANDOM_DEVICE=\'/dev/urandom\'"
145 148
146do_configure() { 149do_configure() {
147 cp ${STAGING_DATADIR_NATIVE}/libtool/config/ltmain.sh ${S}/build 150 cp ${STAGING_DATADIR_NATIVE}/libtool/config/ltmain.sh ${S}/build
@@ -176,23 +179,21 @@ do_install_append() {
176 chmod 755 ${D}${sysconfdir}/init.d/openldap 179 chmod 755 ${D}${sysconfdir}/init.d/openldap
177 # This is duplicated in /etc/openldap and is for slapd 180 # This is duplicated in /etc/openldap and is for slapd
178 rm -f ${D}${localstatedir}/openldap-data/DB_CONFIG.example 181 rm -f ${D}${localstatedir}/openldap-data/DB_CONFIG.example
182
183 # Installing slapd under ${sbin} is more FHS and LSB compliance
184 mv ${D}${libexecdir}/slapd ${D}/${sbindir}/slapd
185 SLAPTOOLS="slapadd slapcat slapdn slapindex slappasswd slaptest slapauth slapacl slapschema"
186 cd ${D}/${sbindir}/
187 rm -f ${SLAPTOOLS}
188 for i in ${SLAPTOOLS}; do ln -sf slapd $i; done
189
179 rmdir "${D}${localstatedir}/run" 190 rmdir "${D}${localstatedir}/run"
180 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" 191 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
181} 192}
182 193
183pkg_postinst_${PN}-slapd () { 194INITSCRIPT_PACKAGES = "${PN}-slapd"
184 if test -n "${D}"; then 195INITSCRIPT_NAME_${PN}-slapd = "openldap"
185 D="-r $D" 196INITSCRIPT_PARAMS_${PN}-slapd = "defaults"
186 fi
187 update-rc.d $D openldap defaults
188}
189
190pkg_prerm_${PN}-slapd () {
191 if test -n "${D}"; then
192 D="-r $D"
193 fi
194 update-rc.d $D openldap remove
195}
196 197
197PACKAGES_DYNAMIC += "^openldap-backends.* ^openldap-backend-.*" 198PACKAGES_DYNAMIC += "^openldap-backends.* ^openldap-backend-.*"
198 199