[oe] [meta-oe][PATCH] OpenLDAP modules
Khem Raj
raj.khem at gmail.com
Sat Jan 23 21:59:52 UTC 2016
On Sat, Jan 23, 2016 at 1:46 PM, Bruno Vernay <brunovern.a at gmail.com> wrote:
> By the way, I wonder if there is a way to write test that would launch
> OpenLDAP in Qemu and check that OpenLDAP can answer a request for example,
> and not just build and fail at runtime ...
sure. look into ptest framework.
https://wiki.yoctoproject.org/wiki/Ptest
> Also would it be a good idea to write a readme to show some example on how
> to use the recipe, or would it be better in the recipe comment header ?
> Because I struggled a bit to find out and a simple example could have save
> me time.
> Thanks
> Bruno
>
> On Sat, Jan 23, 2016 at 10:31 PM BrunoVernay <brunovern.a at gmail.com> wrote:
>
>> ---
>> .../recipes-support/openldap/openldap_2.4.42.bb | 28
>> +++++++++++++++++++++-
>> 1 file changed, 27 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta-oe/recipes-support/openldap/openldap_2.4.42.bb
>> b/meta-oe/recipes-support/openldap/openldap_2.4.42.bb
>> index 49fcb56..23586b7 100644
>> --- a/meta-oe/recipes-support/openldap/openldap_2.4.42.bb
>> +++ b/meta-oe/recipes-support/openldap/openldap_2.4.42.bb
>> @@ -148,6 +148,8 @@ PACKAGES += "${PN}-overlay-proxycache"
>> # it was disabled for cross-compiling.
>> CPPFLAGS_append = " -D_GNU_SOURCE -DURANDOM_DEVICE=\'/dev/urandom\'"
>>
>> +LDFLAGS += "-pthread"
>> +
>> do_configure() {
>> cp ${STAGING_DATADIR_NATIVE}/libtool/build-aux/ltmain.sh ${S}/build
>> rm -f ${S}/libtool
>> @@ -166,7 +168,7 @@ LEAD_SONAME = "libldap-${LDAP_VER}.so.*"
>> PACKAGES += "${PN}-slapd ${PN}-slurpd ${PN}-bin"
>>
>> # Package contents - shift most standard contents to -bin
>> -FILES_${PN} = "${libdir}/lib*.so.* ${sysconfdir}/openldap/ldap.*
>> ${localstatedir}/openldap-data"
>> +FILES_${PN} = "${libdir}/lib*.so.* ${sysconfdir}/openldap/ldap.*
>> ${localstatedir}/${BPN}/data"
>> FILES_${PN}-slapd = "${sysconfdir}/init.d ${libexecdir}/slapd ${sbindir}
>> ${localstatedir}/run ${localstatedir}/volatile/run \
>> ${sysconfdir}/openldap/slapd.* ${sysconfdir}/openldap/schema \
>> ${sysconfdir}/openldap/DB_CONFIG.example ${systemd_unitdir}/system/*"
>> @@ -195,6 +197,18 @@ do_install_append() {
>> install -d ${D}${systemd_unitdir}/system/
>> install -m 0644 ${WORKDIR}/slapd.service
>> ${D}${systemd_unitdir}/system/
>> sed -i -e 's, at SBINDIR@,${sbindir},g'
>> ${D}${systemd_unitdir}/system/*.service
>> +
>> + # Uses mdm as the database
>> + # and localstatedir as data directory ...
>> + sed -e 's/# modulepath/modulepath/' \
>> + -e 's/# moduleload\s*back_bdb.*/moduleload back_mdb/' \
>> + -e 's/database\s*bdb/database mdb/' \
>> + -e 's%^directory\s*.*%directory ${localstatedir}/${BPN}/data/%'
>> \
>> + -i ${D}${sysconfdir}/openldap/slapd.conf
>> +
>> + mkdir -p ${D}${localstatedir}/${BPN}/data
>> +
>> +
>> }
>>
>> INITSCRIPT_PACKAGES = "${PN}-slapd"
>> @@ -206,8 +220,20 @@ SYSTEMD_AUTO_ENABLE_${PN}-slapd ?= "disable"
>>
>> PACKAGES_DYNAMIC += "^${PN}-backends.* ^${PN}-backend-.*"
>>
>> +# The modules require their .so to be dynamicaly loaded
>> +INSANE_SKIP_${PN}-backend-dnssrv += "dev-so"
>> +INSANE_SKIP_${PN}-backend-ldap += "dev-so"
>> +INSANE_SKIP_${PN}-backend-meta += "dev-so"
>> +INSANE_SKIP_${PN}-backend-mdb += "dev-so"
>> +INSANE_SKIP_${PN}-backend-monitor += "dev-so"
>> +INSANE_SKIP_${PN}-backend-null += "dev-so"
>> +INSANE_SKIP_${PN}-backend-passwd += "dev-so"
>> +INSANE_SKIP_${PN}-backend-shell += "dev-so"
>> +
>> +
>> python populate_packages_prepend () {
>> backend_dir = d.expand('${libexecdir}/openldap')
>> + do_split_packages(d, backend_dir, 'back_([a-z]*)\.so$',
>> 'openldap-backend-%s', 'OpenLDAP %s backend', prepend=True,
>> extra_depends='', allow_links=True)
>> do_split_packages(d, backend_dir, 'back_([a-z]*)\-.*\.so\..*$',
>> 'openldap-backend-%s', 'OpenLDAP %s backend', extra_depends='',
>> allow_links=True)
>>
>> metapkg = "${PN}-backends"
>> --
>> 2.5.0
>>
>>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
More information about the Openembedded-devel
mailing list