PDA

Bekijk de volledige versie : OpenLDAP



Jean-Fabrice
01-03-2005, 10:01
I would like your opinion on running openldap on wl500g.
As I have written a php/openldap based directory, I think it would be great to host it on a wl-hdd instead of a always_on PC.

Before starting my compiltion trip, do experts (either openldap experts or wl500g experts) think that such hardware (wl500/wl-hdd) will be enough robust to handle openldap ? I will have very few access to openldap (no more than 2 per seconds).

Thanks for your opinion.

JF

Jean-Fabrice
18-03-2005, 09:43
Hi all !

I have successfully compiled openldap 2.2.23 with gdbm backend for my wl500g/wlhdd.

Problems I had to solve during compilation were :
1) dn_expand function is normally part of glibc libresolv. As uclic libresolv is a stub, there is no dn_expand :(
I then have to patch uclibc 0.9.19 provided by Oleg with 1.9.2.7-4 with the following patch and recompile it (by the way, I also activated wchar_t in uclibc because openldap's configure claims to need it).
Patch to add dn_expand to uclibc :
http://www.uclibc.org/lists/uclibc-cvs/2003-October/003690.html
As the patch author says, dn_expand is needed by openldap and ipsec-tools (maybe others...)

2) I first tried to use berkeley db (bdb) as backend but openldap didn't start with it. BDB needs mutexes for files locking which seems to be absent from the firmware. I then compiled gdbm and it works now.

My questions are :
- Oleg, do you think you can add the dn_expand patch to your uclibc distribution / firmware binaries ? and also to add wchar_t support ? Is it usefull / interessant ?
- Any tips for my mutexes problem ?
- My openldap binaries is compiled against patched uclibc 0.9.19 but runs on a non_patched_uclibc_0.9.19 compiled firmware. I guess that if my binaries are dynamically linked they will need an up to date libuclibc in order to find dn_expand / work properly, no ? I think I have to recompile 1.9.2.7-4 with my patched uclibc, can you confirm this supposition ?
- Is there a way to store private compiled shared libs somewhere else than in /lib. I have tried to put them on a mount point, update /etc/ld.so.conf and run ldconfig without success.

Now if people are interested, I can provide binaries and libs for :
- thttpd 2.21b + php 5.04 (whith xml, ldap, zlib, libjpeg, gd, libpng support) : 3.7MB
- opendlap 2.2.23 (sladp/slurpd) with gdbm 1.8.3 support : 1.6MB
- gdbm 1.8.3 lib

voila, thanks for your help and sorry again for my english :(

Styno
18-03-2005, 10:11
voila, thanks for your help and sorry again for my english :(No problem with your English here, it's perfectly OK :)

I am interested in the thttpd + php5 can you post the binary here? Thanks.

Jean-Fabrice
18-03-2005, 10:20
Binary is too large to be upload @chupa.
Find it here : http://www.bobo-rousselin.com/wl/thttpd-php5.tar.gz

Oleg
18-03-2005, 12:13
- Oleg, do you think you can add the dn_expand patch to your uclibc distribution / firmware binaries ? and also to add wchar_t support ? Is it usefull / interessant ?

This depends on the new libc size, if does not affect it too much, then I could add this for sure. Another option is to check if dn_expand and wchar_t is actually needed...


- Any tips for my mutexes problem ?

Does it use pthreads mutexes? If so, then most likely uclibc does not have them... Look for the patch again.



- My openldap binaries is compiled against patched uclibc 0.9.19 but runs on a non_patched_uclibc_0.9.19 compiled firmware. I guess that if my binaries are dynamically linked they will need an up to date libuclibc in order to find dn_expand / work properly, no ? I think I have to recompile 1.9.2.7-4 with my patched uclibc, can you confirm this supposition ?

Most likely it will sigfault once dn_expand will be called, so you need to add new uclibc to the firmware.


- Is there a way to store private compiled shared libs somewhere else than in /lib. I have tried to put them on a mount point, update /etc/ld.so.conf and run ldconfig without success.

both ld.so.conf and ld.so.cache are ignored by uclibc. Actually, I've added /opt/lib as one of the place where it's looking for the libraries. This used by installable packages (ipk). Please consider packing openldap in the ipk, also check unslung repository - they've openldap package, but I've not tried to compile it yet.


Now if people are interested, I can provide binaries and libs for :
- thttpd 2.21b + php 5.04 (whith xml, ldap, zlib, libjpeg, gd, libpng support) : 3.7MB
- opendlap 2.2.23 (sladp/slurpd) with gdbm 1.8.3 support : 1.6MB
- gdbm 1.8.3 lib

voila, thanks for your help and sorry again for my english :(
Please do not redistribute binaries in this way. Instead please try to pack them into packages (also check unslung repositories). If you interested in this, then I could provide you current Makefile used to build packages.

Jean-Fabrice
18-03-2005, 15:32
Ok Oleg.
Here is the ipkg : http://www.bobo-rousselin.com/wl/ipkg/
Can you pm me your Makefile ?

I have tried openldap ipkg from openwrt but it is compiled against libc6 and then not functionnal.

As for the mutexes, it uses posix mutexes, yes. I have tried compiling with Unix International mutexes without success..

And fod dn_expand, I think openldap really need it, but I haven't investigate in the code. Maybe it will work as far as you don't use and ldap function wich call dn_expand but who knows...

Thanks aganin for all your help
Will be back soon with nices ipkg...

rwhitby
19-03-2005, 08:52
Can you pm me your Makefile ?


See http://www.nslu2-linux.org/wiki/Unslung/Packages for the Unslung packages. They have previously been built for armeb and glibc, but with a five line change to the top-level Makefile, at least 92 of them built straight away for the wl500g.

Oleg and I are hoping that people will contribute patches back to Unslung so that Unslung builds for both the NSLU2 and the WL500g. I have given Oleg write access to the Unslung CVS repository, and added code to the top-level Makefile so that Oleg can add patches back into the Unslung packages without stopping them building for the NSLU2 too. So please send Unslung package patches to Oleg.

See http://www.nslu2-linux.org/wiki/Unslung/AddAPackageToUnslung for details of how to build the Unslung packages from source and
http://www.nslu2-linux.org/wiki/Unslung/PackagingBestPractices for our packaging best practices. The changes to the top-level Makefile should be obvious to experienced package developers like Jean-Fabrice, but we will son add code to that Makefile to make it automatic with just a single-line change.

The hardest thing about increasing the number of packages that build from 92 to the full complement of 278 (and growing every day) Unslung packages will be adding the patches to make the packages build with uclibc instead of glibc.

-- Rod

sarlacc
17-03-2008, 09:30
Does anybody have OpenLdap working on Asus? Could you please write a little step-by-step howto? Thanks

isaay
14-06-2009, 20:14
Hello,

I installed Openldap from http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/openldap_2.3.43-1_mipsel.ipk.
After i configured slapd.conf

include /opt/etc/openldap/schema/core.schema
pidfile /opt/var/run/slapd.pid
argsfile /opt/var/run/slapd.args
################################################## #####################
# BDB database definitions
################################################## #####################
database bdb
suffix "dc=isaay,dc=lan"
rootdn "cn=admin,dc=isaay,dc=lan"
rootpw admin
directory /opt/var/openldap-data
index objectClass eq

i also configured DB_CONF in /opt/var/openldap-data

set_lg_max 5242880
set_cachesize 0 5242880 1
txn_checkpoint 128 15 0

when i start /opt/etc/init.d/S58slapd with -d 4 option
I receive the folowing message :

# ./S58slapd
@(#) $OpenLDAP: slapd 2.3.43 (Jul 21 2008 07:07:58) $
@builder:/home/slug/optware/oleg/builds/openldap/servers/slapd
daemon_init: <null>
=> ldap_bv2dn(dc=isaay,dc=lan,0)
<= ldap_bv2dn(dc=isaay,dc=lan)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(dc=isaay,dc=lan)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(dc=isaay,dc=lan)=0
=> ldap_bv2dn(cn=admin,dc=isaay,dc=lan,0)
<= ldap_bv2dn(cn=admin,dc=isaay,dc=lan)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(cn=admin,dc=isaay,dc=lan)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(cn=admin,dc=isaay,dc=lan)=0
=> ldap_bv2dn(cn=Subschema,0)
<= ldap_bv2dn(cn=Subschema)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(cn=subschema)=0
bdb_db_open: dc=isaay,dc=lan
bdb(dc=isaay,dc=lan): unrecognized name-value pair: txn_checkpoint
bdb_db_open: Database cannot be opened, err 22. Restore from backup!
bdb(dc=isaay,dc=lan): DB_ENV->lock_id_free interface requires an environment configured for the locking subsystem
bdb(dc=isaay,dc=lan): txn_checkpoint interface requires an environment configured for the transaction subsystem
bdb_db_close: txn_checkpoint failed: Invalid argument (22)
backend_startup_one: bi_db_open failed! (22)
bdb_db_close: alock_close failed
slapd stopped.
connections_destroy: nothing to destroy.

It is a new ldap installation so there is no database in /opt/var/openldap-data ? openldap-data is 0700 mod.

What's wrong ?

isaay
15-06-2009, 21:04
Have you succeded in configuring openLDAP ?

Maxiller
17-09-2009, 19:09
Same thing.
Any news?

havrosh
08-03-2010, 14:51
Same thing.
Any news?

Hi there,

is there any solution? I have the same problem with bdb database

zm_michael
10-10-2011, 20:45
hello!

did you have any solution ?