Bug 236612 - Default filesystem layout should follow FHS optional package standards
Summary: Default filesystem layout should follow FHS optional package standards
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Directory Server
Version: 1.0.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nathan Kinder
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks: 152373 240316 FDS1.1.0
TreeView+ depends on / blocked
 
Reported: 2007-04-16 19:11 UTC by Nathan Kinder
Modified: 2015-12-07 17:00 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-07 17:00:09 UTC
Embargoed:


Attachments (Terms of Use)
CVS Diffs (9.05 KB, patch)
2007-04-16 19:11 UTC, Nathan Kinder
no flags Details | Diff
Revised Diffs (10.18 KB, patch)
2007-04-17 22:52 UTC, Nathan Kinder
no flags Details | Diff
Additional Diffs (12.44 KB, patch)
2007-04-25 23:13 UTC, Nathan Kinder
no flags Details | Diff

Description Nathan Kinder 2007-04-16 19:11:49 UTC
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.

Comment 1 Nathan Kinder 2007-04-16 19:11:50 UTC
Created attachment 152711 [details]
CVS Diffs

Comment 2 Nathan Kinder 2007-04-17 22:52:49 UTC
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.

Comment 3 Noriko Hosoi 2007-04-18 20:44:20 UTC
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?

Comment 4 Nathan Kinder 2007-04-18 20:52:24 UTC
(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.

Comment 5 Nathan Kinder 2007-04-24 18:14:23 UTC
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

Comment 6 Nathan Kinder 2007-04-25 23:13:15 UTC
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.

Comment 7 Noriko Hosoi 2007-04-25 23:43:33 UTC
Your fix looks good.

Comment 8 Nathan Kinder 2007-04-26 02:40:18 UTC
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


Note You need to log in before you can comment on or make changes to this bug.