summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-support
diff options
context:
space:
mode:
authorNam Ninh <nam.ninh@windriver.com>2015-09-17 11:17:17 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2015-09-17 11:20:28 -0400
commit4c84a134a256d5190788e20bdc625ba4b7026c31 (patch)
tree7f7f644bb50154d41e8b3bbddd7f2335e9dd5e3a /meta-openstack/recipes-support
parentfb1a2da1f3d278839e44aeaa524b7bd60028ff9c (diff)
downloadmeta-cloud-services-4c84a134a256d5190788e20bdc625ba4b7026c31.tar.gz
openldap: fix various build failures
Fix wrong hard-coded OPENLDAP_LIBEXECDIR that causes the following build failure: mv: cannot stat `<build_dir>/bitbake_build/tmp/work/core2-64-wrs-linux/openldap/2.4.39-r0/image/usr/lib64/openldap/slapd': No such file or directory The base openldat bb installs slapd under ${sbindir}, so LIBEXEC should be replaced with sbindir instead of OPENLDAP_LIBEXECDIR. The "run" directory is already removed in the base bb, so removing the second time causes this build failure: rmdir: failed to remove `<build_dir>/bitbake_build/tmp/work/core2-64-wrs-linux/openldap/2.4.39-r0/image/var/run': No such file or directory Finally, ops-base.ldif is needed in the initscript, so we also include it in the package. Signed-off-by: Nam Ninh <nam.ninh@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-support')
-rw-r--r--meta-openstack/recipes-support/openldap/openldap_2.4.39.bbappend9
1 files changed, 5 insertions, 4 deletions
diff --git a/meta-openstack/recipes-support/openldap/openldap_2.4.39.bbappend b/meta-openstack/recipes-support/openldap/openldap_2.4.39.bbappend
index 296e275..63f6064 100644
--- a/meta-openstack/recipes-support/openldap/openldap_2.4.39.bbappend
+++ b/meta-openstack/recipes-support/openldap/openldap_2.4.39.bbappend
@@ -8,7 +8,7 @@ SRC_URI += "file://ops-base.ldif"
8LDAP_DN ?= "dc=my-domain,dc=com" 8LDAP_DN ?= "dc=my-domain,dc=com"
9LDAP_DATADIR ?= "/etc/openldap-data/" 9LDAP_DATADIR ?= "/etc/openldap-data/"
10 10
11OPENLDAP_LIBEXECDIR = "/usr/libexec" 11OPENLDAP_LIBEXECDIR = "${libexecdir}"
12 12
13EXTRA_OECONF += "--libexecdir=${OPENLDAP_LIBEXECDIR}" 13EXTRA_OECONF += "--libexecdir=${OPENLDAP_LIBEXECDIR}"
14 14
@@ -16,11 +16,12 @@ do_install_append() {
16 install -D -m 0755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/openldap 16 install -D -m 0755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/openldap
17 sed -i -e 's/%DEFAULT_DN%/${LDAP_DN}/g' ${D}${sysconfdir}/init.d/openldap 17 sed -i -e 's/%DEFAULT_DN%/${LDAP_DN}/g' ${D}${sysconfdir}/init.d/openldap
18 sed -i -e 's#%LDAP_DATADIR%#${LDAP_DATADIR}#g' ${D}${sysconfdir}/init.d/openldap 18 sed -i -e 's#%LDAP_DATADIR%#${LDAP_DATADIR}#g' ${D}${sysconfdir}/init.d/openldap
19 sed -i -e 's#%LIBEXEC%#${OPENLDAP_LIBEXECDIR}#g' ${D}${sysconfdir}/init.d/openldap 19 # Base openldat bb installs slapd under ${sbin}
20 sed -i -e 's#%LIBEXEC%#${sbindir}#g' ${D}${sysconfdir}/init.d/openldap
20 21
21 # This is duplicated in /etc/openldap and is for slapd 22 # This is duplicated in /etc/openldap and is for slapd
22 rm -f ${D}${localstatedir}/openldap-data/DB_CONFIG.example 23 rm -f ${D}${localstatedir}/openldap-data/DB_CONFIG.example
23 rmdir "${D}${localstatedir}/run" 24 rm -rf "${D}${localstatedir}/run"
24 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" 25 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
25 26
26 # remove symlinks for backends, recreating in postinstall 27 # remove symlinks for backends, recreating in postinstall
@@ -68,5 +69,5 @@ inherit update-rc.d
68INITSCRIPT_NAME = "openldap" 69INITSCRIPT_NAME = "openldap"
69INITSCRIPT_PARAMS = "defaults" 70INITSCRIPT_PARAMS = "defaults"
70 71
71FILES_${PN} += "${OPENLDAP_LIBEXECDIR}/*" 72FILES_${PN} += "${OPENLDAP_LIBEXECDIR}/* ${sysconfdir}/openldap/ops-base.ldif"
72FILES_${PN}-dbg += "${OPENLDAP_LIBEXECDIR}/openldap/.debug ${OPENLDAP_LIBEXECDIR}/.debug" 73FILES_${PN}-dbg += "${OPENLDAP_LIBEXECDIR}/openldap/.debug ${OPENLDAP_LIBEXECDIR}/.debug"