RFC: MacPorts Filesystem Hierarchy Standard
js
ebgssth at gmail.com
Tue Mar 4 05:16:52 PST 2008
Hi,
I wrote the Filename hierarchy standard for MacPorts.
I know there's already porthier(7), but I thought it would be nice
to have more specific standard.
As you can see, this standard is still incomplete intentionally,
becauses this kind of task should be not done in solely and
I'd like to check if there are demands for this.
I am really like to hear from all of you.
Any comments, suggestions and even critique would be appreciated.
Thanks.
--------------------------------------------------------------------------------
MacPorts Filesystem Hierarchy Standard
Purpose
This document defines the standard placement of file and directory
installed by MacPorts. This document also intended to replace the
existing porthier(7)[1]. Every ports in MacPorts project should follow
this standard. Most of this based on hier(7)[2].
Naming Convension
When two or more ports have files in common, e.g. apachectl in apache
and apache2, each port must prepend the part of its major version
number to the files as a suffix. (e.g. apachectl for apache,
apachectl2 for apapche2)
When a port need to install multiple files, it must create a
directory named its port name and installs the files in
it. (e.g. macports/macports.conf, macports/mp_version)
The Filesystem
Prefix
Everything installed by MacPorts must be in /opt/local or
/Applications/MacPorts. The former is used for non-aqua applications
and may be changed by modifying macports.conf. The latter is for aqua
applications and cannot be changed.
Non Aqua Applications
${prefix} contains the following directories.
- bin
contains common utilities, programming tools, and applications.
- etc
contains system configuration files and scripts.
- include
Standard C include files.
- lib
System libraries.
- libexec
System daemons and utilities (executed by other programs).
For example, mysqld(a system daemon), apache/modules(a utility)
- sbin
System daemons and utilities (executed by users).
for example, httpd(a system daemon), ifstat(a utility)
- share
- info
Texinfo source files.
- man
- cat[0-9ln]
- man[0-9ln]
Manual pages.
- nls
National Language Support (NLS) catalogs.
- (LANGS)
- skel
Example `.' (dot) files for new accounts.
(FIXME: wonder we really need this)
- src
Doesn't exist...
- var
Multi-purpose log, temporary, transient and spool files.
- macports
- distfiles
- receipts
- registry
- distfiles
- software
- sources
- db
Miscellaneous, automatically generated system-specific database
files. For example, ... what?
(Note that currently mysql data directory is created here. This is
not correct.)
- run
System information files describing various info about the system
since it was booted. For example, pid files.
- log
Log files. Every program in MacPorts should write it logs to this place.
For example, var/log/apache/access, var/log/mysql/mysqld.err
- www
ServerRoot point for httpd(8).
[1] MacPorts File Hierarchy
http://guide.macports.org/#internals.hierarchy
[2] OpenBSD Reference Manual HIER(7)
http://www.openbsd.org/cgi-bin/man.cgi?query=hier&sektion=7
More information about the macports-dev
mailing list