RFC: MacPorts Filesystem Hierarchy Standard
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
js wrote:
I am really like to hear from all of you. Any comments, suggestions and even critique would be appreciated. ...
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.
Work is in progress to allow the applications and frameworks directories to be changed, to allow for non-root installations. Currently they are /Applications/MacPorts and /Library/Frameworks, though. So it is correct for the present, but might change later.
- src Doesn't exist...
RPM uses (a subdirectory of) this directory when building as root. Not that building as root is recommended, but it is still default... src |-- apple `-- macports |-- BUILD |-- RPMS | |-- fat | |-- i386 | |-- noarch | `-- ppc |-- SOURCES |-- SPECS `-- SRPMS Note: the name "macports" will change to the default name "rpm", when upgrading from old RPM 4.4.9 to newer RPM 4.5 or to RPM 5.0 --anders
js wrote:
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.
So is this meant to replace porthier(7)? Than you should write it up as a patch for the manual page. I don't think we need yet another place for it. Coordinate with markd and simon on this.
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].
Why are you referencing to OpenBSD hier? Mac OS X also has a man page `hier'.
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)
Append, not prepend.
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.
Write ${prefix} instead of /opt/local, or if it goes into the man page, it could be expanded during install. The applications dir should be changeable in future versions, but at the moment it is still hardcoded in ports, so this is right. [snip]
- db Miscellaneous, automatically generated system-specific database files. For example, ... what? (Note that currently mysql data directory is created here. This is not correct.)
No idea what is meant to reside here. Sure, mysqlX could also go into var/mysqlX. Rainer
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.
So is this meant to replace porthier(7)? Than you should write it up as a patch for the manual page. I don't think we need yet another place for it. Coordinate with markd and simon on this.
No, I meant to replace hier part of the Guide. After this change, porthier change would be followed.
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].
Why are you referencing to OpenBSD hier? Mac OS X also has a man page `hier'.
In my experience, OpenBSD is the most rigid system with high quality documentations. That's why I refered to it.
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)
Append, not prepend.
Bad English writer... Thanks.
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.
Write ${prefix} instead of /opt/local, or if it goes into the man page, it could be expanded during install.
The applications dir should be changeable in future versions, but at the moment it is still hardcoded in ports, so this is right.
I'll change this line like "${prefix}, which is changeable and default to /opt/local"
- db Miscellaneous, automatically generated system-specific database files. For example, ... what? (Note that currently mysql data directory is created here. This is not correct.)
No idea what is meant to reside here. Sure, mysqlX could also go into var/mysqlX.
BSDs save system-specific data like locate.database here. might be good place to put macports dir.
js wrote:
- db Miscellaneous, automatically generated system-specific database files. For example, ... what? (Note that currently mysql data directory is created here. This is not correct.)
No idea what is meant to reside here. Sure, mysqlX could also go into var/mysqlX.
BSDs save system-specific data like locate.database here. might be good place to put macports dir.
var/macports moved from var/db/dports in the DarwinPorts -> MacPorts rename effort. Rainer
participants (3)
-
Anders F Björklund
-
js
-
Rainer Müller