Documentation/Labs/FHSCompliantDirectoryStructure

From Slicer Wiki
Revision as of 16:58, 10 April 2014 by JChris.FillionR (talk | contribs) (Created page with 'The current install tree structure as documented on Documentation/Nightly/Developers is not compliant with the [http://www.pathname.com/fhs/|File Hierarchy Standard]. This pa…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home < Documentation < Labs < FHSCompliantDirectoryStructure

The current install tree structure as documented on Documentation/Nightly/Developers is not compliant with the Hierarchy Standard. This page aims at documentation how the structure could be updated.


From Matthew Woehlke - April 10, 2014:

I was thinking more about the bin/Python / bin/python-real issue, and got to thinking, it would be nice if Slicer did a better job following the FHS. Right now, anyone trying to install Slicer to a standard location (especially /usr, but even /usr/local) would make a mess of their file system.

To remedy this, I would suggest the following changes:

- move /Slicer [1] to /bin/
- move /bin/Python [2] to one of:
  - /lib/python-${PyVer}/site-packages
  - /lib/python-${PyVer}/site-packages/slicer${VerMajor}
  - /share/Slicer-${Ver}/
    - ...and move SlicerWizard to /lib/python-${PyVer}/site-packages
- move /lib/Python/* [3] to /
- move /lib/TclTk/* [3] to /
- move /lib/QtPlugins [4] to /lib/Slicer-${Ver}/
- move /lib/Slicer*/<third party libs> [3] to /lib/
- move /bin/Slicer{LauncherSettings.ini,SplashScreen.png} [5] to
  /share/Slicer-${Ver}/

Honoring LIB_SUFFIX would also be nice.

Ideally, SlicerLauncherSettings.ini and SlicerSplashScreen.png (currently in /bin) should also be elsewhere (possibly /etc and /share, respectively, or both under /share), but that might be difficult due to how the launcher is set up. (OTOH the first item may require launcher changes anyway, in which case it would be better to go ahead and move them.)

What do you think?


Footnotes:

1. FHS (e.g. 3.1) strongly discourages adding entries to / or /usr. Anyway, this clearly should be in /bin so that it is in a reasonable PATH. On UNIX systems where PREFIX=/opt/... (or perhaps as a CMake option), it might be okay to install a symlink in PREFIX. On Windows, a shortcut could be used similarly.

2. 3.4.2 forbids subdirectories in /bin. While not stated explicitly for /usr/bin, many systems now symlink /bin to /usr/bin, implicitly forwarding the prohibition.) Additionally, the files contained herein are not executables but are library code that clearly belong under /lib or /share.

3. For a standard installation, all products should be installed to ${PREFIX}; <product>_PREFIX=${Slicer_PREFIX}/lib/<product> is non-standard.

4. Convention for third party Qt plugins (e.g. see KDE) is a subdirectory (e.g. plugins) of /lib/<product>.

5. These non-executable files do not belong in /bin. While the .ini could possible be placed in /etc, this requires special handling in the case that PREFIX=/usr; /share/Slicer-${Ver} also seems like a reasonable location and does not have this issue.