Description of problem: Instead of hardcoding the paths of mozldap, libdb, dirsec libs and tools, set them via autoconf.
Created attachment 139372 [details] cvs diffs configure.ac m4/{db.m4,mozldap.m4} Files: configure.ac m4/db.m4 m4/mozldap.m4 Changes: 1) added template files to AC_CONFIG_FILES list 2) added db_bindir and ldapsdk_bindir to pass their tools path to the template files. The paths are hardcoded for now. Notes: 1. The templates' in files are being added in the next attachment. 2. The template files are not "installed" now.
Created attachment 139374 [details] diffs between template-*.pl and template-*.pl.in files Files: template-bak2db.pl.in template-ns-activate.pl.in template-cl-dump.pl.in* template-ns-inactivate.pl.in template-db2bak.pl.in template-ns-newpwpolicy.pl.in* template-db2index.pl.in template-repl-monitor-cgi.pl.in* template-db2ldif.pl.in template-repl-monitor.pl.in* template-ldif2db.pl.in template-verify-db.pl.in template-ns-accountstatus.pl.in Description: Since only the paths are replaced by autoconf, attaching just the diff output.
Ok.
Looks good.
Created attachment 139403 [details] cvs diffs (ldapserver - revised) I removed template-dsml-active.pl from configure.ac, which does not have any substitution (and more likely, ldapserver does not have to install the script?) +AC_CONFIG_FILES([ldap/admin/src/scripts/template-dsml-activate.pl])
Created attachment 139406 [details] cvs commit message Reviewed by Rich and Nathan (Thank you!!) Checked in into HEAD.
Created attachment 139419 [details] cvs diff configure.ac Makefile.am Files: configure.ac MAkefile.am Changes; 1) added task perl script templates to "install" at @sysconfdir@@scripttemplatedir@ to Makefile.am 2) added scripttemplatedir = /fedora-ds/script-templates to configure.ac Question: changing these files, Makefile.in and configure are also updated. Am I supposed to check them in? M Makefile.am M Makefile.in M configure M configure.ac
There are a few things that need to be changed. We should not be installing the "template-*.pl" files from "$(srcdir)" in Makefile.am. The files that configure generates from the "template-*.in" fiels will be generated in the build area, not the source area (unless you are building directly from the ldapserver directory). You should just remove "$(srcdir)/" from the list of files specified in the "task_SCRIPTS" variable. We should also remove the old "template-*.pl" files from the source tree as soon as we stop building with the old Makefiles. As for your question about Makefile.in and configure, you should check them in. I usually don't send them out for review as the diffs for them are always huge whenever they are regenerated.
When you change configure.ac, Makefile.am, or one of the .m4 files, you should run autoreconf -vfi in the ldapserver directory to make sure all of the files are generated properly. Then check in those files, plus Makefile.in and configure (and possibly aclocal.m4). You may have to use cvs checkin -f to force a file to be committed if all autoreconf did was to change the file's timestamp.
Created attachment 139439 [details] cvs diffs (ldapserver) Files: Makefile.am configure.ac ldap/admin/src/create_instance.c ldap/admin/src/scripts/template-verify-db.pl.in (diffs are not attached) Makefile.in configure Changes: 1) removed $(srcdir)/ as Nathan pointed out in the Comment #8. 2) autotoolized the shell-based scripts in the instance directory (e.g., start-slapd). This was needed since dirsec and mozldap libraries are not in the same directory or in the rpath any more. (attaching the *.in files next) fi 3) fixed a typo (found .o in the source list) I could launch the server on my RHEL4 box! $ perl usr/lib/fedora-ds/ds_newinst.pl /tmp/install.inf Success! Your new directory server instance was created We should not be installing the "template-*.pl" files from "$(srcdir)" in Makefile.am. The files that configure generates from the "template-*.in" fiels will be generated in the build area, not the source area (unless you are building directly from the ldapserver directory). You should just remove "$(srcdir)/" from the list of files specified in the "task_SCRIPTS" variable.
Created attachment 139440 [details] .in files for the server shell scripts New Files: template-bak2db.in template-db2bak.in template-db2index.in template-db2ldif.in template-ldif2db.in template-ldif2ldap.in template-monitor.in template-restoreconfig.in template-saveconfig.in template-start-slapd.in template-stop-slapd.in template-suffix2instance.in template-upgradedb.in template-vlvindex.in Changes: . set dirsec library paths in the shell scripts.
Looks good, but you don't need to define "newinstdir" in Makefile.am since it's the same as "serverdir". You can just add "ds_newinst.pl" to "server_SCRIPTS" instead.
Created attachment 139492 [details] cvs diff Makefile.am Changed ds_newinst.pl install directory to use serverdir as Nathan pointed out in the review. > but you don't need to define "newinstdir" in Makefile.am since it's the same as "serverdir". You can just add "ds_newinst.pl" to "server_SCRIPTS" instead.
Created attachment 139494 [details] cvs commit message Reviewed by Rich and Nathan (Thank you!!) Checked in into HEAD.
Created attachment 139497 [details] cvs diff branding/{fedora,rhds}/brandver.dat Files: branding/fedora/brandver.dat branding/rhds/brandver.dat Changes: 1) added configure.ac 2) commented out *.spec (branding script fails)
Created attachment 139498 [details] sample install info file Basically, I'm using the same info file generated by setup except one line in [General] prefix= /export/servers/ds72_core If prefix and ServerRoot do not exist, new instance is created from root. (that is, /usr/lib/<brand>-ds/slapd-<id>.)
Created attachment 139523 [details] cvs commit message ({fedora,rhds}/brandver.dat) Reviewed by Nathan (Thank you!!) Checked in into HEAD
Checked source tree/location: $ pwd /share/dev4/ds/ds80/builds/20071129.1/earthquake_rhel4/ldapserver/ldap/admin/src/scripts In the directory, there is only one template perl script which is not processed by autoconf, but the script is not supported on 8.0 (DSML related). $ ls template*.pl template-dsml-activate.pl I.e., verified. Related bug: Summary: clean up template-scriptname which is derived from template-scriptname.in https://bugzilla.redhat.com/show_bug.cgi?id=229576