From 959ddb4700bbc1f70418a8c59a6eb7cb9a626b4f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 1 Jul 2014 13:50:19 +0200 Subject: man: document directories in $HOME, too, in file-hierarchy(7) --- man/file-hierarchy.xml | 245 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 229 insertions(+), 16 deletions(-) diff --git a/man/file-hierarchy.xml b/man/file-hierarchy.xml index a1b232d321..f8694a4c0a 100644 --- a/man/file-hierarchy.xml +++ b/man/file-hierarchy.xml @@ -257,8 +257,9 @@ /usr/bin - Binaries for user - commands, that shall appear in the + Binaries and + executables for user commands, that + shall appear in the $PATH search path. It is recommended not to place binaries in this directory that are @@ -278,17 +279,16 @@ /usr/lib - Static vendor data - that is compatible with all + Static, private vendor + data that is compatible with all architectures (though not necessarily architecture-independent). Note that - this includes internal - executables or other binaries that are - not regularly invoked from a - shell. Such binaries may be for any - architecture supported by the - system. Do not place public libraries - in this directory, use + this includes internal executables or + other binaries that are not regularly + invoked from a shell. Such binaries + may be for any architecture supported + by the system. Do not place public + libraries in this directory, use $libdir (see below), instead. @@ -296,7 +296,7 @@ $libdir Location for placing - dynamic libraries in. The precise + dynamic libraries. The precise location depends on the operating system and the architecture, and is sometimes @@ -614,6 +614,112 @@ + + Home Directory + + User applications may want to place files and + directories in the user's home directory. They should + follow the following basic structure. Note that some + of these directories are also standardized (though + more weakly) by the XDG + Base Directory Specification. + + + + ~/.cache + + Persistent user cache + data. User programs may place + non-essential data in this + directory. Flushing this directory + should have no effect on operation of + programs, except for increased + runtimes necessary to rebuild these + caches. If an application finds + $XDG_CACHE_HOME set + is should use the directory specified + in it instead of this + directory. + + + + ~/.config + + Application + configuration and state. When a new + user is created this directory will be + empty or not exist at + all. Applications should fall back to + defaults should their configuration or + state in this directory be missing. If + an application finds + $XDG_CONFIG_HOME set + is should use the directory specified + in it instead of this + directory. + + + + ~/.local/bin + + Executables that shall + appear in the user's + $PATH search + path. It is recommended not to place + executables in this directory that are + not useful for invocation from a + shell; these should be placed in a + subdirectory of + ~/.local/lib + instead. Care should be taken when + placing architecture-dependent + binaries in this place which might be + problematic if the home directory is + shared between multiple hosts with + different + architectures. + + + + ~/.local/lib + + Static, private vendor + data that is compatible with all + architectures. + + + + ~/.local/lib/arch-id + + Location for placing + public dynamic libraries. The architecture + identifier to use is defined on Multiarch Architecture Specifiers (Tuples) + list. + + + + ~/.local/share + + Resources shared + between multiple packages, such as + fonts or artwork. Usually, the precise + location and format of files stored + below this directory is subject to + specifications that ensure + interoperability. If + an application finds + $XDG_DATA_HOME set + is should use the directory specified + in it instead of this + directory. + + + + + + Unpriviliged Write Access @@ -669,10 +775,11 @@ Developers of system packages should follow strict rules when placing their own files in the file system. The following table lists recommended - locations for specific types of files. + locations for specific types of files supplied by the + vendor. - System Package Data Location + System Package Vendor Files Locations @@ -693,7 +800,7 @@ /usr/lib/package - Private static vendor resources of the package, including private binaries and libraries, or any other kind of read-only vendor data. + Private, static vendor resources of the package, including private binaries and libraries, or any other kind of read-only vendor data. $libdir/package @@ -703,6 +810,30 @@ /usr/include/package Public C/C++ APIs of public shared libraries of the package. + + +
+ + Additional static vendor files may be installed + in the /usr/share hierarchy, to + the locations defined by the various relevant + specifications. + + During runtime and for local configuration and + state additional directories are defined: + + + System Package Variable Files Locations + + + + + + Directory + Purpose + + + /etc/package System-specific configuration for the package. It is recommended to default to safe fallbacks if this configuration is missing, if this is possible. Alternatively, a tmpfiles.d5 fragment may be used to copy or symlink the necessary files and directories from /usr/share/factory during boot, via the L or C directives. @@ -717,7 +848,7 @@ /var/cache/package - Persistent cache data of the package. If this directory is flushed the application should work correctly on next invocation, though possibly slowed done due to the need to rebuild any local cache files. The application must be capable of recreating this directory should it be missing and necessary. + Persistent cache data of the package. If this directory is flushed the application should work correctly on next invocation, though possibly slowed down due to the need to rebuild any local cache files. The application must be capable of recreating this directory should it be missing and necessary. /var/lib/package @@ -736,6 +867,88 @@
+ + User Packages + + Programs running in user context should follow + strict rules when placing their own files in the + user's home directory. The following table lists + recommended locations in the home directory for + specific types of files supplied by the vendor if the + application is installed in the home directory. (Note + however, that user applications installed system-wide + should follow the rules outlined above regarding + placing vendor files.) + + + User Package Vendor File Locations + + + + + + Directory + Purpose + + + + + ~/.local/bin + Package executables that shall appear in the $PATH executable search path. It is not recommended to place internal executables or executables that are not commonly invoked from the shell in this directory, such as daemon executables. As this directory is shared with most other packages of the user special care should be taken to pick unique names for files placed here, that are unlikely to clash with other package's files. + + + ~/.local/lib/arch-id + Public shared libraries of the package. As above, be careful with using too generic names, and pick unique names for your libraries to place here to avoid name clashes. + + + ~/.local/lib/package + Private, static vendor resources of the package, compatible wih any architecture, or any other kind of read-only vendor data. + + + ~/.local/lib/arch-id/package + Private other vendor resources of the package that are architecture-specific and cannot be shared between architectures. + + + +
+ + Additional static vendor files may be installed + in the ~/.local/share hierarchy, + to the locations defined by the various relevant + specifications. + + During runtime and for local configuration and + state additional directories are defined: + + + User Package Variable File Locations + + + + + + Directory + Purpose + + + + + ~/.config/package + User-specific configuration and state for the package. It is required to default to safe fallbacks if this configuration is missing. + + + $XDG_RUNTIME_DIR/package + User runtime data for the package. + + + ~/.cache/package + Persistent cache data of the package. If this directory is flushed the application should work correctly on next invocation, though possibly slowed down due to the need to rebuild any local cache files. The application must be capable of recreating this directory should it be missing and necessary. + + + +
+
+ See Also -- cgit v1.2.3-54-g00ecf