Bug 236612 - Default filesystem layout should follow FHS optional package standards
Default filesystem layout should follow FHS optional package standards
Status: CLOSED CURRENTRELEASE
Product: 389
Classification: Community
Component: Directory Server (Show other bugs)
1.0.4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nathan Kinder
Viktor Ashirov
:
Depends On:
Blocks: 152373 240316 FDS1.1.0
  Show dependency treegraph
 
Reported: 2007-04-16 15:11 EDT by Nathan Kinder
Modified: 2015-12-07 12:00 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-07 12:00:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Nathan Kinder 2007-04-16 15:11:49 EDT
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 15:11:50 EDT
Created attachment 152711 [details]
CVS Diffs
Comment 2 Nathan Kinder 2007-04-17 18:52:49 EDT
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 16:44:20 EDT
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 16:52:24 EDT
(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 14:14:23 EDT
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 19:13:15 EDT
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 19:43:33 EDT
Your fix looks good.
Comment 8 Nathan Kinder 2007-04-25 22:40:18 EDT
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.