The current default filesystem layout of a Fedora Directory Server build is to lump everything FHS style underneath a prefix of /opt/fedora-ds. We should change this to follow the FHS standards for an optional software package, namely using /etc/opt and /var/opt. We will leave the "--with-fhs" configure option for using the /usr, /etc/, and /var layout that are used when packaging Fedora Directory Server for inclusion on Fedora Extras. The attached diffs implement this new default layout. In addition to using /var/opt and /etc/opt, I merged all of the component and server libraries into a single /opt/fedora-ds/lib directory. I also made the instance directories live in /opt/fedora-ds/slapd-<instance> instead of using the lib directory.
Created attachment 152711 [details] CVS Diffs
Created attachment 152861 [details] Revised Diffs After some feedback from Rich and Andrew, I've made a few modifications to my previous fix. I've made the default build store everything under the prefix, including the sysconfdir and localstatedir. The --with-fhs option retains it's old behavior of using /usr, /etc, and /var. A new --with-fhs-opt configure option will use the prefix (default is /opt/fedora-ds) for everything other that the sysconfdir and localstatedir. These two paths will be /etc/opt and /var/opt.
One question... If not IS_FHS, plugin_dir is going to be /lib/plugins? Do we want to put prefix in front of it? + +#if defined (IS_FHS) cf->plugin_dir = PR_smprintf("%s%cplugins", cf->sroot, FILE_PATHSEP); +#else + cf->plugin_dir = PR_smprintf("%s%cplugins", LIBDIR, FILE_PATHSEP); +#endif And this is not a part of your fix, but we are setting docdir to "/usr/doc" and prefix/doc. Had they better be /usr/share/doc and prefix/share/doc?
(In reply to comment #3) > One question... If not IS_FHS, plugin_dir is going to be /lib/plugins? Do we > want to put prefix in front of it? In the Makefile, the exec prefix is prepended when libdir is set. This ends up defining LIBDIR to /opt/fedora-ds/lib. The same thing applies to the docdir.
Checked into ldapserver (HEAD). Thanks to Rich and Noriko for reviews! Checking in configure; /cvs/dirsec/ldapserver/configure,v <-- configure new revision: 1.40; previous revision: 1.39 done Checking in configure.ac; /cvs/dirsec/ldapserver/configure.ac,v <-- configure.ac new revision: 1.26; previous revision: 1.25 done Checking in ldap/admin/src/create_instance.c; /cvs/dirsec/ldapserver/ldap/admin/src/create_instance.c,v <-- create_instance.c new revision: 1.54; previous revision: 1.53 done Checking in m4/fhs.m4; /cvs/dirsec/ldapserver/m4/fhs.m4,v <-- fhs.m4 new revision: 1.2; previous revision: 1.1 done
Created attachment 153468 [details] Additional Diffs I mistakenly assumed that we were using --with-fhs when building our RPM packages, but that's not the case. This was causing changes to the file layout in the RPM that wasn't intended. The attached changes should make our RPM and Solaris package layouts remain the same as before while allowing us to use the --with-fhs-opt switch on HP-UX.
Your fix looks good.
Thanks for the reviews Noriko and Rich! I've checked the changes into ldapserver (HEAD). Checking in config.h.in; /cvs/dirsec/ldapserver/config.h.in,v <-- config.h.in new revision: 1.6; previous revision: 1.5 done Checking in configure; /cvs/dirsec/ldapserver/configure,v <-- configure new revision: 1.41; previous revision: 1.40 done Checking in configure.ac; /cvs/dirsec/ldapserver/configure.ac,v <-- configure.ac new revision: 1.27; previous revision: 1.26 done Checking in ldap/admin/src/create_instance.c; /cvs/dirsec/ldapserver/ldap/admin/src/create_instance.c,v <-- create_instance.c new revision: 1.55; previous revision: 1.54 done Checking in m4/fhs.m4; /cvs/dirsec/ldapserver/m4/fhs.m4,v <-- fhs.m4 new revision: 1.3; previous revision: 1.2 done