Changes between Version 70 and Version 71 of Projects/OpenLDAP


Ignore:
Timestamp:
Jul 7, 2012, 12:17:34 AM (7 years ago)
Author:
C Rempel
Comment:

/* examples/openldap/BuildTests.sh */

Legend:

Unmodified
Added
Removed
Modified
  • Projects/OpenLDAP

    v70 v71  
    210210To make this port a long-term solution, I will need to port SASL to RTEMS as well (ldap-bind is deprecated in favor of ldap-sasl-bind)... that will be a hobby project for months from now...
    211211
     212=  network-demos/ldap/Makefile  =
     213
     214This subsection details out how to call a relocatiable application using the network-demos as an infrastucture.
     215==  network-demos/ldap  ==
     216Get a working demo by copying the http demo
     217 rtems-addon-packages$ cd network-demos
     218 rtems-addon-packages/network-demos$ cp -r http ldap
     219 rtems-addon-packages/network-demos$ cd ldap
     220==  network-demos/ldap/doit.sh  ==
     221Write a compiling and loading script.
     222 rtems-addon-packages/network-demos/ldap$ nano doit.sh
     223 #!/bin/sh
     224 make clean
     225 make
     226 qemu ... \
     227 ... \
     228 ...
     229
     230Run the script (to make sure it works).
     231 rtems-addon-packages/network-demos/ldap$ chmod +x doit.sh
     232 rtems-addon-packages/network-demos/ldap$ ./doit.sh
     233
     234Qemu should load with the http network demo
     235==  network-demos/ldap/init.c  ==
     236
     237Because invoking executables on a linux system are basically calls to main, we add a call to main in the init.c
     238
     239 + #include <main.h>
     240  rtems_task_Init(...)
     241 ...
     242 + char **argv;
     243 + argv[0]="-d";
     244 + argv[0]="1";
     245 + main(2, argv);
     246 ...
     247==  network-demos/ldap/Makefile  ==
     248
     249This is where binary relocatability gets REALLY interesting!  Because libslapd.a is a library and not a program, the dependencies have to be listed from most dependent to least dependent.
     250
     251So, I added the following to the network-demos/ldap/Makefile
     252
     253 ! override LD_LIBS += -lmghttpd -lslapd \
     254 + ../../openldap/servers/slapd/back-ldif/libback_ldif.a \
     255 + ../../openldap/servers/slapd/back-monitor/libback_monitor.a \
     256 + ../../openldap/servers/slapd/back-null/libback_null.a \
     257 + ../../openldap/servers/slapd/back-relay/libback_relay.a \
     258 + ../../openldap/servers/slapd/liboverlays.a \
     259 + ../../openldap/libraries/liblunicode/liblunicode.a \
     260 + ../../openldap/libraries/librewrite/librewrite.a \
     261 + ../../openldap/libraries/liblutil/liblutil.a \
     262 + -lldap_r -lldap -llber
     263
     264With all this, I am now able to call the slapd server, but now to figure out how to use the options, the config file, etc...
    212265==  examples/openldap/BuildTests.sh  ==
    213266