Building slapd with modules included

Asked by Ryan Steele

I am very interested in rebuilding slapd with the autogroup slapd module included (similar to the way ppolicy and dynlist are already included). I've attempted to do so by editing the rules file to run a shell script that cd's into contrib/slapd-modules/autogroup/ and runs a 'make', before cd'ing back to the original directory, but that fails because it can't find certain header files (which are generated by running a 'make && make depend' in the pristine source tree). I've also tried putting the contrib directory in debian/build/ and running similar commands, but I still end up with missing header files.

I'm sure I'm making some elementary mistakes, but I couldn't find, in any of the documentation, how one should 'appropriately' go about having dpkg-buildpackage successfully build a slapd module for the purposes of having the package provide the shared object file. In the process of building, it modifies the top-level directory significantly (there ends up being no Makefile, only a, and I can't find any directory which I can successfully build the modules from. Of course, I can use the pristine Ubuntu source to run 'make && make depend', after which the modules build just fine, but that's clearly the antithesis of what I'm striving for, which is an inclusion of the module build in the overall package building process carried out by dpkg-buildpackage.

I would be most appreciative if someone could point me to documentation describing this, or briefly explain how one should go about it. Thank you!

Question information

English Edit question
Ubuntu openldap2.3 Edit question
No assignee Edit question
Solved by:
Ryan Steele
Last query:
Last reply:
Revision history for this message
Ryan Steele (ryan-g-steele) said :

FWIW, the $sourceroot/debian/build/include/ directory is missing a lot of the headers present in the $sourceroot/include/ during the build process (for example, the ac directory). The same problem is present with $sourceroot/debian/build/servers/slapd/ versus $sourceroot/servers/slapd/ (for example, slap.h and config.h). Again, I'm sure the problem is probably simple, but I haven't found a "clean" way of accomplishing the task at hand, and I'd be most appreciative of any insights or pointers to the proper documentation.

Revision history for this message
Ryan Steele (ryan-g-steele) said :

Nevermind, I resolved the problem by adjusting the CPPFLAGS variable in the Makefile to include the necessary directories. The module now compiles cleanly using dpkg-buildpackage.