All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] OpenLDAP modules
@ 2016-01-23 21:31 BrunoVernay
  2016-01-23 21:46 ` Bruno Vernay
  2016-01-27 11:57 ` Martin Jansa
  0 siblings, 2 replies; 6+ messages in thread
From: BrunoVernay @ 2016-01-23 21:31 UTC (permalink / raw)
  To: openembedded-devel

---
 .../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,@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



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [meta-oe][PATCH] OpenLDAP modules
  2016-01-23 21:31 [meta-oe][PATCH] OpenLDAP modules BrunoVernay
@ 2016-01-23 21:46 ` Bruno Vernay
  2016-01-23 21:59   ` Khem Raj
  2016-01-27 11:57 ` Martin Jansa
  1 sibling, 1 reply; 6+ messages in thread
From: Bruno Vernay @ 2016-01-23 21:46 UTC (permalink / raw)
  To: openembedded-devel

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 ...
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@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,@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
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-oe][PATCH] OpenLDAP modules
  2016-01-23 21:46 ` Bruno Vernay
@ 2016-01-23 21:59   ` Khem Raj
  0 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2016-01-23 21:59 UTC (permalink / raw)
  To: openembeded-devel

On Sat, Jan 23, 2016 at 1:46 PM, Bruno Vernay <brunovern.a@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@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,@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@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-oe][PATCH] OpenLDAP modules
  2016-01-23 21:31 [meta-oe][PATCH] OpenLDAP modules BrunoVernay
  2016-01-23 21:46 ` Bruno Vernay
@ 2016-01-27 11:57 ` Martin Jansa
  1 sibling, 0 replies; 6+ messages in thread
From: Martin Jansa @ 2016-01-27 11:57 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 3756 bytes --]

On Sat, Jan 23, 2016 at 10:31:31PM +0100, BrunoVernay wrote:
> ---

Please follow
http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines

and improve commit message and add your SOB-line.

>  .../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,@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@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-oe][PATCH] OpenLDAP modules
  2016-01-19  7:41             ` [meta-oe][PATCH] " Bruno Vernay
@ 2016-01-19 11:36               ` Martin Jansa
  0 siblings, 0 replies; 6+ messages in thread
From: Martin Jansa @ 2016-01-19 11:36 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 5878 bytes --]

On Tue, Jan 19, 2016 at 07:41:40AM +0000, Bruno Vernay wrote:
> Here is a first try at a patch fixing OpenLDAP.
> I tested it on the Jethro branch and it works: from cleanall to the service
> running in Qemu.

Can you send it with git send-email, so that your e-mail client doesn't
mangle the lines?

> 
> From ee7ad184b3b500a711486f378e4a68fbd2a5ae11 Mon Sep 17 00:00:00 2001
> From: BrunoVernay <BrunoVern.a@gmail.com>
> Date: Tue, 19 Jan 2016 08:36:01 +0100
> Subject: [PATCH 1/1] Fixes build and configuration
> 
> ---
>  .../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,@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
> 
> 
> 
> 
> On Thu, Jan 14, 2016 at 7:19 PM Khem Raj <raj.khem@gmail.com> wrote:
> 
> >
> > > On Jan 14, 2016, at 9:22 AM, Bruno Vernay <brunovern.a@gmail.com> wrote:
> > >
> > > Thanks it works also.
> > >
> > > The second issue, that I still cannot resolve is that OpenLDAP requires a
> > > .la or .so to load its modules.
> > > The openldap config specify a file name like "back_mdb" and expect
> > either a
> > > back_mdb.la or back_mdb.so
> > >
> > > but both la or so are limited to -dev in Yocto, I don't see how to
> > overcome
> > > this rule???
> >
> > you can reset e.g. FILES_SOLIBSDEV = “"
> >
> > >
> > > Regards
> > >
> > >
> > > On Wed, Jan 13, 2016 at 7:36 PM Khem Raj <raj.khem@gmail.com> wrote:
> > >
> > >>
> > >>> On Jan 13, 2016, at 8:46 AM, Bruno Vernay <brunovern.a@gmail.com>
> > wrote:
> > >>>
> > >>> Adding this to my bbappend did the trick ...
> > >>>
> > >>> TARGET_CC_ARCH += "-lpthread”
> > >>
> > >> make it -pthread and add it to LDFLAGS
> > >>
> > >>>
> > >>> I may submit a patch
> > >>>
> > >>
> > >> --
> > >> _______________________________________________
> > >> Openembedded-devel mailing list
> > >> Openembedded-devel@lists.openembedded.org
> > >> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> > >>
> > > --
> > > _______________________________________________
> > > Openembedded-devel mailing list
> > > Openembedded-devel@lists.openembedded.org
> > > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> >
> > --
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> >
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-oe][PATCH] OpenLDAP modules
  2016-01-14 18:19           ` Khem Raj
@ 2016-01-19  7:41             ` Bruno Vernay
  2016-01-19 11:36               ` Martin Jansa
  0 siblings, 1 reply; 6+ messages in thread
From: Bruno Vernay @ 2016-01-19  7:41 UTC (permalink / raw)
  To: openembedded-devel

Here is a first try at a patch fixing OpenLDAP.
I tested it on the Jethro branch and it works: from cleanall to the service
running in Qemu.

From ee7ad184b3b500a711486f378e4a68fbd2a5ae11 Mon Sep 17 00:00:00 2001
From: BrunoVernay <BrunoVern.a@gmail.com>
Date: Tue, 19 Jan 2016 08:36:01 +0100
Subject: [PATCH 1/1] Fixes build and configuration

---
 .../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,@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




On Thu, Jan 14, 2016 at 7:19 PM Khem Raj <raj.khem@gmail.com> wrote:

>
> > On Jan 14, 2016, at 9:22 AM, Bruno Vernay <brunovern.a@gmail.com> wrote:
> >
> > Thanks it works also.
> >
> > The second issue, that I still cannot resolve is that OpenLDAP requires a
> > .la or .so to load its modules.
> > The openldap config specify a file name like "back_mdb" and expect
> either a
> > back_mdb.la or back_mdb.so
> >
> > but both la or so are limited to -dev in Yocto, I don't see how to
> overcome
> > this rule???
>
> you can reset e.g. FILES_SOLIBSDEV = “"
>
> >
> > Regards
> >
> >
> > On Wed, Jan 13, 2016 at 7:36 PM Khem Raj <raj.khem@gmail.com> wrote:
> >
> >>
> >>> On Jan 13, 2016, at 8:46 AM, Bruno Vernay <brunovern.a@gmail.com>
> wrote:
> >>>
> >>> Adding this to my bbappend did the trick ...
> >>>
> >>> TARGET_CC_ARCH += "-lpthread”
> >>
> >> make it -pthread and add it to LDFLAGS
> >>
> >>>
> >>> I may submit a patch
> >>>
> >>
> >> --
> >> _______________________________________________
> >> Openembedded-devel mailing list
> >> Openembedded-devel@lists.openembedded.org
> >> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> >>
> > --
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-27 11:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-23 21:31 [meta-oe][PATCH] OpenLDAP modules BrunoVernay
2016-01-23 21:46 ` Bruno Vernay
2016-01-23 21:59   ` Khem Raj
2016-01-27 11:57 ` Martin Jansa
  -- strict thread matches above, loose matches on Subject: below --
2016-01-12 12:51 [meta-oe] " Bruno Vernay
2016-01-13 10:12 ` Bruno Vernay
2016-01-13 16:33   ` Bruno Vernay
2016-01-13 16:46     ` Bruno Vernay
2016-01-13 18:35       ` Khem Raj
2016-01-14 17:22         ` Bruno Vernay
2016-01-14 18:19           ` Khem Raj
2016-01-19  7:41             ` [meta-oe][PATCH] " Bruno Vernay
2016-01-19 11:36               ` Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.