Bug#1082714: file-hierarchy.7: Some remarks and editorial changes for this man page
Bjarni Ingi Gislason
bjarniig at simnet.is
Tue Sep 24 22:23:40 BST 2024
Package: systemd
Version: 256.6-1
Severity: minor
Tags: patch
* What led up to the situation?
Checking for defects with
[test-][gn]roff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z <man page>
[test-groff is a script in the repository for "groff"] (local copy and
"troff" slightly changed by me).
* What was the outcome of this action?
Output from "test-groff -b -mandoc -rF0 -rHY=0 -K utf8 -t -ww -z ":
<stdin>:547: error: boxed table does not fit on page 6; use .TS H/.TH with a supporting macro package
Output from "test-nroff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z
troff: backtrace: file 'file-hierarchy.7':635
troff:file-hierarchy.7:635: warning: [page 7, line 9, diversion '3tbd4,0',
line 0]: cannot break line
troff: backtrace: file 'file-hierarchy.7':710
troff:file-hierarchy.7:710: warning: [page 7, line 107]: cannot break line
* What outcome did you expect instead?
No output (no warnings).
-.-
General remarks and further material, if a diff-file exist, are in the
attachments.
-- System Information:
Debian Release: trixie/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 6.10.9-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages systemd depends on:
ii libacl1 2.3.2-2
ii libapparmor1 3.1.7-1+b1
ii libaudit1 1:3.1.2-4+b1
ii libblkid1 2.40.2-8
ii libc6 2.40-2
ii libcap2 1:2.66-5
ii libmount1 2.40.2-8
ii libpam0g 1.5.3-7
ii libseccomp2 2.5.5-1+b1
ii libselinux1 3.7-3
ii libssl3t64 3.3.2-1
ii libsystemd-shared 256.6-1
ii libsystemd0 256.6-1
ii mount 2.40.2-8
Versions of packages systemd recommends:
ii dbus [default-dbus-system-bus] 1.14.10-4+b1
ii libzstd1 1.5.6+dfsg-1
pn linux-sysctl-defaults <none>
pn systemd-cryptsetup <none>
pn systemd-timesyncd | time-daemon <none>
Versions of packages systemd suggests:
ii libcryptsetup12 2:2.7.5-1
ii libgcrypt20 1.11.0-6
ii libidn2-0 2.3.7-2
ii liblz4-1 1.9.4-3
ii liblzma5 5.6.2-2
pn libtss2-rc0t64 <none>
pn libtss2-tcti-device0 <none>
pn polkitd <none>
pn systemd-boot <none>
pn systemd-container <none>
pn systemd-homed <none>
pn systemd-repart <none>
pn systemd-resolved <none>
pn systemd-userdbd <none>
Versions of packages systemd is related to:
pn dbus-user-session <none>
pn dracut <none>
ii initramfs-tools 0.145
pn libnss-systemd <none>
pn libpam-systemd <none>
ii udev 256.6-1
-- no debconf information
-------------- next part --------------
Any program (person), that produces man pages, should check its content for
defects by using
groff -mandoc -t -ww -b -z [ -K utf8 | k ] <man page>
The same goes for man pages that are used as an input.
For a style guide use
mandoc -T lint
-.-
So any 'generator' should check its products with the above mentioned
'groff', 'mandoc', and additionally with 'nroff ...'.
This is just a simple quality control measure.
The 'generator' may have to be corrected to get a better man page,
the source file may, and any additional file may.
Common defects:
Input text line longer than 80 bytes.
Not removing trailing spaces (in in- and output).
The reason for these trailing spaces should be found and eliminated.
Not beginning each input sentence on a new line.
Lines should thus be shorter.
See man-pages(7), item 'semantic newline'.
-.-
The difference between the formatted outputs can be seen with:
nroff -mandoc <file1> > <out1>
nroff -mandoc <file2> > <out2>
diff -u <out1> <out2>
and for groff, using
"printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - "
instead of \'nroff -mandoc\'
Add the option \'-t\', if the file contains a table.
Read the output of \'diff -u\' with \'less -R\' or similar.
-.-.
If \'man\' (man-db) is used to check the manual for warnings,
the following must be set:
The option "-warnings=w"
The environmental variable:
export MAN_KEEP_STDERR=yes (or any non-empty value)
or
(produce only warnings):
export MANROFFOPT="-ww -b -z"
export MAN_KEEP_STDERR=yes (or any non-empty value)
-.-.
Output from "mandoc -T lint file-hierarchy.7": (possibly shortened list)
mandoc: file-hierarchy.7:2:27: WARNING: missing date, using "": TH
mandoc: file-hierarchy.7:25:2: WARNING: skipping paragraph macro: PP after SH
mandoc: file-hierarchy.7:28:140: STYLE: input text line longer than 80 bytes: system and service m...
mandoc: file-hierarchy.7:40:2: WARNING: skipping paragraph macro: PP after SH
mandoc: file-hierarchy.7:43:166: STYLE: input text line longer than 80 bytes: The file system root...
mandoc: file-hierarchy.7:48:127: STYLE: input text line longer than 80 bytes: The boot partition u...
mandoc: file-hierarchy.7:56:209: STYLE: input text line longer than 80 bytes: is maintained separa...
mandoc: file-hierarchy.7:64:341: STYLE: input text line longer than 80 bytes: System\-specific con...
mandoc: file-hierarchy.7:69:618: STYLE: input text line longer than 80 bytes: The location for nor...
mandoc: file-hierarchy.7:76:95: STYLE: input text line longer than 80 bytes: The home directory o...
mandoc: file-hierarchy.7:85:282: STYLE: input text line longer than 80 bytes: The place to store g...
mandoc: file-hierarchy.7:94:157: STYLE: input text line longer than 80 bytes: for larger files\&.)...
mandoc: file-hierarchy.7:108:132: STYLE: input text line longer than 80 bytes: is accessible to oth...
mandoc: file-hierarchy.7:114:2: WARNING: skipping paragraph macro: PP after SH
mandoc: file-hierarchy.7:119:192: STYLE: input text line longer than 80 bytes: file system for syst...
mandoc: file-hierarchy.7:124:111: STYLE: input text line longer than 80 bytes: Runtime system logs\...
mandoc: file-hierarchy.7:133:150: STYLE: input text line longer than 80 bytes: instances\&. Always ...
mandoc: file-hierarchy.7:139:2: WARNING: skipping paragraph macro: PP after SH
mandoc: file-hierarchy.7:142:260: STYLE: input text line longer than 80 bytes: Vendor\-supplied ope...
mandoc: file-hierarchy.7:149:191: STYLE: input text line longer than 80 bytes: search path\&. It is...
mandoc: file-hierarchy.7:161:355: STYLE: input text line longer than 80 bytes: Static, private vend...
mandoc: file-hierarchy.7:175:137: STYLE: input text line longer than 80 bytes: /usr/lib64/\&. This ...
mandoc: file-hierarchy.7:193:268: STYLE: input text line longer than 80 bytes: Resources shared bet...
mandoc: file-hierarchy.7:195:270: STYLE: input text line longer than 80 bytes: Note that resources ...
mandoc: file-hierarchy.7:206:176: STYLE: input text line longer than 80 bytes: Repository for vendo...
mandoc: file-hierarchy.7:207:148: STYLE: input text line longer than 80 bytes: /etc/\&. This is use...
mandoc: file-hierarchy.7:213:100: STYLE: input text line longer than 80 bytes: /usr/share/factory/e...
mandoc: file-hierarchy.7:217:2: WARNING: skipping paragraph macro: PP after SH
mandoc: file-hierarchy.7:220:610: STYLE: input text line longer than 80 bytes: Persistent, variable...
mandoc: file-hierarchy.7:225:239: STYLE: input text line longer than 80 bytes: Persistent system ca...
mandoc: file-hierarchy.7:230:87: STYLE: input text line longer than 80 bytes: Persistent system da...
mandoc: file-hierarchy.7:235:137: STYLE: input text line longer than 80 bytes: Persistent system lo...
mandoc: file-hierarchy.7:250:120: STYLE: input text line longer than 80 bytes: /tmp/, this director...
mandoc: file-hierarchy.7:252:176: STYLE: input text line longer than 80 bytes: for small ephemeral ...
mandoc: file-hierarchy.7:270:2: WARNING: skipping paragraph macro: PP after SH
mandoc: file-hierarchy.7:275:131: STYLE: input text line longer than 80 bytes: instance, but might ...
mandoc: file-hierarchy.7:284:305: STYLE: input text line longer than 80 bytes: file system\&. Since...
mandoc: file-hierarchy.7:288:172: STYLE: input text line longer than 80 bytes: (for user programs) ...
mandoc: file-hierarchy.7:293:213: STYLE: input text line longer than 80 bytes: A virtual kernel fil...
mandoc: file-hierarchy.7:301:114: STYLE: input text line longer than 80 bytes: that exposes a numbe...
mandoc: file-hierarchy.7:303:93: STYLE: input text line longer than 80 bytes: files\&. In sandboxe...
mandoc: file-hierarchy.7:308:373: STYLE: input text line longer than 80 bytes: A virtual kernel fil...
mandoc: file-hierarchy.7:313:288: STYLE: input text line longer than 80 bytes: A virtual kernel fil...
mandoc: file-hierarchy.7:315:215: STYLE: input text line longer than 80 bytes: filesystem, which pr...
mandoc: file-hierarchy.7:320:198: STYLE: input text line longer than 80 bytes: /sys/fs/cgroup/unifi...
mandoc: file-hierarchy.7:323:2: WARNING: skipping paragraph macro: PP after SH
mandoc: file-hierarchy.7:327:109: STYLE: input text line longer than 80 bytes: /usr/bin/, ensuring ...
mandoc: file-hierarchy.7:333:96: STYLE: input text line longer than 80 bytes: /usr/lib/, ensuring ...
mandoc: file-hierarchy.7:345:95: STYLE: input text line longer than 80 bytes: /run/, ensuring that...
mandoc: file-hierarchy.7:348:2: WARNING: skipping paragraph macro: PP after SH
mandoc: file-hierarchy.7:349:231: STYLE: input text line longer than 80 bytes: User applications ma...
mandoc: file-hierarchy.7:355:257: STYLE: input text line longer than 80 bytes: Persistent user cach...
mandoc: file-hierarchy.7:362:233: STYLE: input text line longer than 80 bytes: Application configur...
mandoc: file-hierarchy.7:371:168: STYLE: input text line longer than 80 bytes: search path\&. It is...
mandoc: file-hierarchy.7:373:206: STYLE: input text line longer than 80 bytes: instead\&. Care shou...
mandoc: file-hierarchy.7:383:97: STYLE: input text line longer than 80 bytes: Location for placing...
mandoc: file-hierarchy.7:390:234: STYLE: input text line longer than 80 bytes: Resources shared bet...
mandoc: file-hierarchy.7:397:217: STYLE: input text line longer than 80 bytes: Application state\&....
mandoc: file-hierarchy.7:403:2: WARNING: skipping paragraph macro: PP after SS
mandoc: file-hierarchy.7:422:87: STYLE: input text line longer than 80 bytes: are writable\&. If a...
mandoc: file-hierarchy.7:425:108: STYLE: input text line longer than 80 bytes: /run/, it is recomme...
mandoc: file-hierarchy.7:452:2: WARNING: skipping paragraph macro: PP after SS
mandoc: file-hierarchy.7:457:171: STYLE: input text line longer than 80 bytes: hierarchies mounted ...
mandoc: file-hierarchy.7:460:323: STYLE: input text line longer than 80 bytes: /var/tmp), but may b...
mandoc: file-hierarchy.7:468:157: STYLE: input text line longer than 80 bytes: directory is availab...
mandoc: file-hierarchy.7:474:2: WARNING: skipping paragraph macro: PP after SH
mandoc: file-hierarchy.7:475:159: STYLE: input text line longer than 80 bytes: Unix file systems su...
mandoc: file-hierarchy.7:481:130: STYLE: input text line longer than 80 bytes: shall be the only lo...
mandoc: file-hierarchy.7:483:2: WARNING: skipping paragraph macro: PP after SH
mandoc: file-hierarchy.7:484:205: STYLE: input text line longer than 80 bytes: Developers of system...
mandoc: file-hierarchy.7:489:2: WARNING: skipping paragraph macro: br after sp
mandoc: file-hierarchy.7:537:112: STYLE: input text line longer than 80 bytes: The following direct...
mandoc: file-hierarchy.7:542:2: WARNING: skipping paragraph macro: br after sp
mandoc: file-hierarchy.7:598:2: WARNING: skipping paragraph macro: PP after SH
mandoc: file-hierarchy.7:599:2: WARNING: skipping paragraph macro: br before sp
mandoc: file-hierarchy.7:599:405: STYLE: input text line longer than 80 bytes: Programs running in ...
mandoc: file-hierarchy.7:604:2: WARNING: skipping paragraph macro: br after sp
mandoc: file-hierarchy.7:644:119: STYLE: input text line longer than 80 bytes: hierarchy, mirroring...
mandoc: file-hierarchy.7:646:122: STYLE: input text line longer than 80 bytes: The following direct...
mandoc: file-hierarchy.7:651:2: WARNING: skipping paragraph macro: br after sp
mandoc: file-hierarchy.7:689:2: WARNING: skipping paragraph macro: PP after SH
mandoc: file-hierarchy.7:690:2: WARNING: skipping paragraph macro: br at the end of SH
-.-.
Find a repeated word
! 195 --> makes
-.-
Strings longer than 3/4 of a standard line length (80)
Use "\:" to split the string at the end of an output line, for example a
long URLs (web address)
700 \%https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
710 \%http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03
-.-.
Wrong distance between sentences in the input file.
Separate the sentences and subordinate clauses; each begins on a new
line. See man-pages(7) ("Conventions for source file layout") and
"info groff" ("Input Conventions").
The best procedure is to always start a new sentence on a new line,
at least, if you are typing on a computer.
Remember coding: Only one command ("sentence") on each (logical) line.
E-mail: Easier to quote exactly the relevant lines.
Generally: Easier to edit the sentence.
Patches: Less unaffected text.
Search for two adjacent words is easier, when they belong to the same line,
and the same phrase.
The amount of space between sentences in the output can then be
controlled with the ".ss" request.
N.B.
The number of lines affected can be too large to be in a patch.
34:\m[blue]\fBXDG User Directories\fR\m[]\&\s-2\u[3]\d\s+2\&. This manual page describes a more generalized, though minimal and modernized subset of these specifications that defines more strictly the suggestions and restrictions systemd makes on the file system hierarchy\&.
43:The file system root\&. Usually writable, but this is not required\&. Possibly a temporary file system ("tmpfs")\&. Not shared with other hosts (unless read\-only)\&.
48:The boot partition used for bringing up the system\&. On EFI systems, this is possibly the EFI System Partition (ESP), also see
49:\fBsystemd-gpt-auto-generator\fR(8)\&. This directory is usually strictly local to the host, and should be considered read\-only, except when a new kernel or boot loader is installed\&. This directory only exists on systems that run on physical or emulated hardware that requires boot loaders\&.
56:is maintained separately from the EFI System Partition (ESP), the latter is mounted here\&. Tools that need to operate on the EFI system partition should look for it at this mount point first, and fall back to
64:System\-specific configuration\&. This directory may or may not be read\-only\&. Frequently, this directory is pre\-populated with vendor\-supplied configuration files, but applications should not make assumptions about this directory being fully populated or populated at all, and should fall back to defaults if configuration is missing\&.
69:The location for normal user\*(Aqs home directories\&. Possibly shared with other systems, and never read\-only\&. This directory should only be used for normal users, never for system users\&. This directory and possibly the directories contained within it might only become available or writable in late boot or even only after user authentication\&. This directory might be placed on limited\-functionality network file systems, hence applications should not assume the full set of file API is available on this directory\&. Applications should generally not reference this directory directly, but via the per\-user
76:The home directory of the root user\&. The root user\*(Aqs home directory is located outside of
85:The place to store general server payload, managed by the administrator\&. No restrictions are made how this directory is organized internally\&. Generally writable, and possibly shared among systems\&. This directory might become available or writable only very late during boot\&.
90:The place for small temporary files\&. This directory is usually mounted as a
92:instance, and should hence not be used for larger files\&. (Use
94:for larger files\&.) This directory is usually flushed at boot\-up\&. Also, files that are not accessed within a certain time may be automatically deleted\&.
110:\fBmkdtemp\fR(3), and similar calls\&. For more details, see
119:file system for system packages to place runtime data, socket files, and similar\&. This directory is flushed on boot, and generally writable for privileged programs only\&. Always writable\&.
124:Runtime system logs\&. System components may place private logs in this directory\&. Always writable, even when
133:instances\&. Always writable, flushed at each reboot and when the user logs out\&. User code should not reference this directory directly, but via the
142:Vendor\-supplied operating system resources\&. Usually read\-only, but this is not required\&. Possibly shared between multiple hosts\&. This directory should not be modified by the administrator, except when installing or removing vendor\-supplied packages\&.
149:search path\&. It is recommended not to place binaries in this directory that are not useful for invocation from a shell (such as daemon binaries); these should be placed in a subdirectory of
161: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
169:\fI$libdir\fR\&. The architecture identifier to use is defined on
171:list\&. Legacy locations of
175:/usr/lib64/\&. This directory should not be used for package\-specific data, unless this data is architecture\-dependent, too\&. To query
193:Resources shared between multiple packages, such as documentation, man pages, time zone information, fonts and other resources\&. Usually, the precise location and format of files stored below this directory is subject to specifications that ensure interoperability\&.
195:Note that resources placed in this directory typically are under shared ownership, i\&.e\&. multiple different packages have provide and consume these resources, on equal footing, without any obvious primary owner\&. This makes makes things systematically different from
206:Repository for vendor\-supplied default configuration files\&. This directory should be populated with pristine vendor versions of all configuration files that may be placed in
207:/etc/\&. This is useful to compare the local configuration of a system with vendor defaults and to populate the local configuration with defaults\&.
220:Persistent, variable system data\&. Writable during normal system operation\&. This directory might be pre\-populated with vendor\-supplied data, but applications should be able to reconstruct necessary files and directories in this subhierarchy should they be missing, as the system might start up without this directory being populated\&. Persistency is recommended, but optional, to support ephemeral systems\&. This directory might become available or writable only very late during boot\&. Components that are required to operate during early boot hence shall not unconditionally rely on this directory\&.
225:Persistent system cache data\&. System components 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\&.
230:Persistent system data\&. System components may place private data in this directory\&.
235:Persistent system logs\&. System components may place private logs in this directory, though it is recommended to do most logging via the
249:The place for larger and persistent temporary files\&. In contrast to
250:/tmp/, this directory is usually mounted from a persistent physical file system and can thus accept larger files\&. (Use
252:for small ephemeral files\&.) This directory is generally not flushed at boot\-up, but time\-based cleanup of files that have not been accessed for a certain time is applied\&.
266:\fBmkdtemp\fR(3), and similar calls should be used\&. For further details about this directory, see
273:The root directory for device nodes\&. Usually, this directory is mounted as a
275:instance, but might be of a different type in sandboxed/containerized setups\&. This directory is managed jointly by the kernel and
276:\fBsystemd-udevd\fR(8), and should not be written to by other components\&. A number of special purpose virtual file systems might be mounted below this directory\&.
282:\fBshm_open\fR(3)\&. This directory is flushed on boot, and is a
284:file system\&. Since all users have write access to this directory, special care should be taken to avoid name clashes and vulnerabilities\&. For normal users, shared memory segments in this directory are usually deleted when the user logs out\&. Usually, it is a better idea to use memory mapped files in
293:A virtual kernel file system exposing the process list and other functionality\&. This file system is mostly an API to interface with the kernel and not a place where normal files may be stored\&. For details, see
294:\fBproc\fR(5)\&. A number of special purpose virtual file systems might be mounted below this directory\&.
301:that exposes a number of kernel tunables\&. The primary way to configure the settings in this API file tree is via
303:files\&. In sandboxed/containerized setups, this directory is generally mounted read\-only\&.
308:A virtual kernel file system exposing discovered devices and other functionality\&. This file system is mostly an API to interface with the kernel and not a place where normal files may be stored\&. In sandboxed/containerized setups, this directory is generally mounted read\-only\&. A number of special purpose virtual file systems might be mounted below this directory\&.
313:A virtual kernel file system exposing process control groups (cgroups)\&. This file system is an API to interface with the kernel and not a place where normal files may be stored\&. On current systems running in the default "unified" mode, this directory serves as the mount point for the
315:filesystem, which provides a unified cgroup hierarchy for all resource controllers\&. On systems with non\-default configurations, this directory may instead be a tmpfs filesystem containing mount points for various
320:/sys/fs/cgroup/unified/, but cgroup2 will not have resource controllers attached\&. In sandboxed/containerized setups, this directory may either not exist or may include a subset of functionality\&.
339:\fI$libdir\fR, ensuring that binaries referencing this legacy path correctly find their dynamic loader\&. This symlink only exists on architectures whose ABI places the dynamic loader in this path\&.
349:User applications may want to place files and directories in the user\*(Aqs home directory\&. They should follow the following basic structure\&. Note that some of these directories are also standardized (though more weakly) by the
350:\m[blue]\fBXDG Base Directory Specification\fR\m[]\&\s-2\u[2]\d\s+2\&. Additional locations for high\-level user resources are defined by
355: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
362:Application configuration\&. 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 in this directory be missing\&. If an application finds
371: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
373: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\&.
383:Location for placing public dynamic libraries\&. The architecture identifier to use is defined on
390: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
397:Application 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 state in this directory be missing\&. If an application finds
422:are writable\&. If an unprivileged system process needs a private writable directory in
442:\fBnodev\fR, which means that set\-user\-id mode and character or block special devices are not interpreted on those file systems\&. In general it is not possible to mount them
443:\fBnoexec\fR, because various programs use those directories for dynamically generated or optimized code, and with that flag those use cases would break\&. Using this flag is OK on special\-purpose installations or systems where all software that may be installed is known and doesn\*(Aqt require such functionality\&. See the discussion of
457:hierarchies mounted read\-only, possibly only allowing write access during package upgrades\&. Other part of the hierarchy are generally mounted read\-write (in particular
460:/var/tmp), but may be read\-only when the kernel remounts the file system read\-only in response to errors, or when the system is booted read\-only for recovery purposes\&. To the extent reasonable, applications should be prepared to execute without write access, so that for example, failure to save non\-essential data to
468:directory is available since the earliest boot and is always writable\&. It should be used for any runtime data and sockets, so that write access to e\&.g\&.
479:is the only location below which device nodes shall be placed\&. Similarly,
481:shall be the only location to place sockets and FIFOs\&. Regular files, directories and symlinks may be used in all directories\&.
484:Developers of system packages should follow strict rules when placing their files in the file system\&. The following table lists recommended locations for specific types of files supplied by the vendor\&.
508:Package executables that shall appear in the \fI$PATH\fR executable search path, compiled for any of the supported architectures compatible with the operating system\&. It is not recommended to place internal binaries or binaries that are not commonly invoked from the shell in this directory, such as daemon binaries\&. As this directory is shared with most other packages of the system, special care should be taken to pick unique names for files placed here, that are unlikely to clash with other package\*(Aqs files\&.
513: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\&.
523:Private other vendor resources of the package that are architecture\-specific and cannot be shared between architectures\&. Note that this generally does not include private executables since binaries of a specific architecture may be freely invoked from any other supported system architecture\&.
563: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 \fBtmpfiles.d\fR(5) 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\&.
568:Runtime data for the package\&. Packages must be able to create the necessary subdirectories in this tree on their own, since the directory is flushed automatically on boot\&. Alternatively, a \fBtmpfiles.d\fR(5) fragment may be used to create the necessary directories during boot, or the \fIRuntimeDirectory=\fR directive of service units may be used to create them at service startup (see \fBsystemd.unit\fR(5) for details)\&.
573:Runtime log data for the package\&. As above, the package needs to make sure to create this directory if necessary, as it will be flushed on every boot\&.
578: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\&. To create an empty directory, a \fBtmpfiles.d\fR(5) fragment or the \fICacheDirectory=\fR directive of service units (see \fBsystemd.unit\fR(5)) may be used\&.
583:Persistent private data of the package\&. This is the primary place to put persistent data that does not fall into the other categories listed\&. Packages should be able to create the necessary subdirectories in this tree on their own, since the directory might be missing on boot\&. To create an empty directory, a \fBtmpfiles.d\fR(5) fragment or the \fIStateDirectory=\fR directive of service units (see \fBsystemd.unit\fR(5)) may be used\&.
588:Persistent log data of the package\&. As above, the package should make sure to create this directory if necessary, possibly using \fBtmpfiles.d\fR(5) or \fILogsDirectory=\fR (see \fBsystemd.exec\fR(5)), as it might be missing\&.
593:Persistent spool/queue data of the package\&. As above, the package should make sure to create this directory if necessary, as it might be missing\&.
599:Programs running in user context should follow strict rules when placing their own files in the user\*(Aqs 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\&. (User applications installed system\-wide are covered by the rules outlined above for vendor files\&.)
622:Package executables that shall appear in the \fI$PATH\fR 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\*(Aqs files\&.
627:Public shared libraries of the package\&. As above, be careful with using overly generic names, and pick unique names for your libraries to place here to avoid name clashes\&.
669:User\-specific configuration for the package\&. It is required to default to safe fallbacks if this configuration is missing\&.
679: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\&.
-.-.
Change a HYPHEN-MINUS (code 0x55, 2D) to a dash
(\-, minus) if it matches "[[:alph:]]-[[:alpha:]]" in the name of an
option).
Facilitates the copy and paste of an option in UTF-8 text.
Is not needed in ordinary words like "mother-in-law", that are not
copied and pasted to a command line (which needs ASCII code)
700:\%https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
705:\%https://www.freedesktop.org/wiki/Software/xdg-user-dirs
-.-.
Output from "test-groff -b -mandoc -rF0 -rHY=0 -K utf8 -t -ww -z ":
<stdin>:547: error: boxed table does not fit on page 6; use .TS H/.TH with a supporting macro package
Output from "test-nroff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z
troff: backtrace: file 'file-hierarchy.7':635
troff:file-hierarchy.7:635: warning: [page 7, line 9, diversion '3tbd4,0',
line 0]: cannot break line
troff: backtrace: file 'file-hierarchy.7':710
troff:file-hierarchy.7:710: warning: [page 7, line 107]: cannot break line
-.-
Additionally:
Abbrevations get a '\&' added after their final full stop (.) to mark them as
such and not as an end of sentence.
There is no need to add a '\&' before a full stop (.) if it has a character
before it!
-------------- next part --------------
--- file-hierarchy.7 2024-09-24 02:51:13.649325547 +0000
+++ file-hierarchy.7.new 2024-09-24 04:44:29.298074937 +0000
@@ -22,7 +22,6 @@
.SH "NAME"
file-hierarchy \- File system hierarchy overview
.SH "DESCRIPTION"
-.PP
Operating systems using the
\fBsystemd\fR(1)
system and service manager are organized based on a file system hierarchy inspired by UNIX, more specifically the hierarchy described in the
@@ -37,7 +36,6 @@ Many of the paths described here can be
\fBsystemd-path\fR(1)
tool\&.
.SH "GENERAL STRUCTURE"
-.PP
/
.RS 4
The file system root\&. Usually writable, but this is not required\&. Possibly a temporary file system ("tmpfs")\&. Not shared with other hosts (unless read\-only)\&.
@@ -111,7 +109,6 @@ is accessible to other users of the syst
\m[blue]\fBUsing /tmp/ and /var/tmp/ Safely\fR\m[]\&\s-2\u[5]\d\s+2\&.
.RE
.SH "RUNTIME DATA"
-.PP
/run/
.RS 4
A
@@ -136,7 +133,6 @@ environment variable, as documented in t
\m[blue]\fBXDG Base Directory Specification\fR\m[]\&\s-2\u[2]\d\s+2\&.
.RE
.SH "VENDOR\-SUPPLIED OPERATING SYSTEM RESOURCES"
-.PP
/usr/
.RS 4
Vendor\-supplied operating system resources\&. Usually read\-only, but this is not required\&. Possibly shared between multiple hosts\&. This directory should not be modified by the administrator, except when installing or removing vendor\-supplied packages\&.
@@ -192,7 +188,7 @@ for the primary architecture of the syst
.RS 4
Resources shared between multiple packages, such as documentation, man pages, time zone information, fonts and other resources\&. Usually, the precise location and format of files stored below this directory is subject to specifications that ensure interoperability\&.
.sp
-Note that resources placed in this directory typically are under shared ownership, i\&.e\&. multiple different packages have provide and consume these resources, on equal footing, without any obvious primary owner\&. This makes makes things systematically different from
+Note that resources placed in this directory typically are under shared ownership, i.e.\& multiple different packages have provide and consume these resources, on equal footing, without any obvious primary owner\&. This makes things systematically different from
/usr/lib/, where ownership is generally not shared\&.
.RE
.PP
@@ -214,7 +210,6 @@ Similar to
/var/\&.
.RE
.SH "PERSISTENT VARIABLE SYSTEM DATA"
-.PP
/var/
.RS 4
Persistent, variable system data\&. Writable during normal system operation\&. This directory might be pre\-populated with vendor\-supplied data, but applications should be able to reconstruct necessary files and directories in this subhierarchy should they be missing, as the system might start up without this directory being populated\&. Persistency is recommended, but optional, to support ephemeral systems\&. This directory might become available or writable only very late during boot\&. Components that are required to operate during early boot hence shall not unconditionally rely on this directory\&.
@@ -267,7 +262,6 @@ apply:
\m[blue]\fBUsing /tmp/ and /var/tmp/ Safely\fR\m[]\&\s-2\u[5]\d\s+2\&.
.RE
.SH "VIRTUAL KERNEL AND API FILE SYSTEMS"
-.PP
/dev/
.RS 4
The root directory for device nodes\&. Usually, this directory is mounted as a
@@ -320,7 +314,6 @@ is mounted it will be mounted on
/sys/fs/cgroup/unified/, but cgroup2 will not have resource controllers attached\&. In sandboxed/containerized setups, this directory may either not exist or may include a subset of functionality\&.
.RE
.SH "COMPATIBILITY SYMLINKS"
-.PP
/bin/, /sbin/, /usr/sbin/
.RS 4
These compatibility symlinks point to
@@ -345,7 +338,6 @@ This compatibility symlink points to
/run/, ensuring that programs referencing this legacy path correctly find their runtime data\&.
.RE
.SH "HOME DIRECTORY"
-.PP
User applications may want to place files and directories in the user\*(Aqs home directory\&. They should follow the following basic structure\&. Note that some of these directories are also standardized (though more weakly) by the
\m[blue]\fBXDG Base Directory Specification\fR\m[]\&\s-2\u[2]\d\s+2\&. Additional locations for high\-level user resources are defined by
\m[blue]\fBxdg\-user\-dirs\fR\m[]\&\s-2\u[3]\d\s+2\&.
@@ -400,7 +392,6 @@ set, it should use the directory specifi
.RE
.SH "WRITE ACCESS"
.SS "Unprivileged Write Access"
-.PP
Unprivileged processes generally lack write access to most of the hierarchy\&.
.PP
The exceptions for normal users are
@@ -449,7 +440,6 @@ and
in
\fBmmap\fR(2)\&.
.SS "Lack of Write Access on Read\-Only Systems and during System Recovery"
-.PP
As noted above, some systems operate with the
/usr
and
@@ -465,13 +455,12 @@ does not prevent the application from ru
.PP
The
/run/
-directory is available since the earliest boot and is always writable\&. It should be used for any runtime data and sockets, so that write access to e\&.g\&.
+directory is available since the earliest boot and is always writable\&. It should be used for any runtime data and sockets, so that write access to e.g.\&
/etc
or
/var
is not needed\&.
.SH "NODE TYPES"
-.PP
Unix file systems support different types of file nodes, including regular files, directories, symlinks, character and block device nodes, sockets and FIFOs\&.
.PP
It is strongly recommended that
@@ -480,7 +469,6 @@ is the only location below which device
/run/
shall be the only location to place sockets and FIFOs\&. Regular files, directories and symlinks may be used in all directories\&.
.SH "SYSTEM PACKAGES"
-.PP
Developers of system packages should follow strict rules when placing their files in the file system\&. The following table lists recommended locations for specific types of files supplied by the vendor\&.
.sp
.it 1 an-trap
@@ -497,10 +485,6 @@ T}:T{
Purpose
T}
.T&
-l l
-l l
-l l
-l l
l l.
T{
/usr/bin/
@@ -550,12 +534,6 @@ T}:T{
Purpose
T}
.T&
-l l
-l l
-l l
-l l
-l l
-l l
l l.
T{
/etc/\fIpackage\fR/
@@ -595,7 +573,6 @@ T}
.TE
.sp 1
.SH "USER PACKAGES"
-.PP
Programs running in user context should follow strict rules when placing their own files in the user\*(Aqs 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\&. (User applications installed system\-wide are covered by the rules outlined above for vendor files\&.)
.sp
.it 1 an-trap
@@ -603,19 +580,13 @@ Programs running in user context should
.nr an-break-flag 1
.br
.B Table\ \&3.\ \&Vendor package file locations under the home directory of the user
+.nr longest_column \w'~/\&.local/lib/\fIarch\-id\fR/\fIpackage\fR/'
.TS
allbox tab(:);
-lB lB.
-T{
-Directory
-T}:T{
-Purpose
-T}
+lBW(\n[longest_column]u) lB.
+Directory:Purpose
.T&
-l l
-l l
-l l
-l l.
+lW(\n[longest_column]u) l.
T{
~/\&.local/bin/
T}:T{
@@ -637,6 +608,7 @@ T}:T{
Private other vendor resources of the package that are architecture\-specific and cannot be shared between architectures\&.
T}
.TE
+.rr longest_column
.sp 1
.PP
Additional static vendor files with shared ownership may be installed in the
@@ -648,7 +620,6 @@ The following directories shall be used
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
-.br
.B Table\ \&4.\ \&User package variable file locations
.TS
allbox tab(:);
@@ -659,9 +630,6 @@ T}:T{
Purpose
T}
.T&
-l l
-l l
-l l
l l.
T{
~/\&.config/\fIpackage\fR/
@@ -686,7 +654,6 @@ T}
.TE
.sp 1
.SH "SEE ALSO"
-.PP
\fBsystemd\fR(1), \fBhier\fR(7), \fBsystemd-path\fR(1), \fBsystemd-gpt-auto-generator\fR(8), \fBsysctl.d\fR(5), \fBtmpfiles.d\fR(5), \fBpkg-config\fR(1), \fBsystemd.unit\fR(5)
.SH "NOTES"
.IP " 1." 4
@@ -697,17 +664,17 @@ File System Hierarchy
.IP " 2." 4
XDG Base Directory Specification
.RS 4
-\%https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
+\%https://standards.freedesktop.org/\:basedir\-spec/basedir\-spec\-latest.html
.RE
.IP " 3." 4
XDG User Directories
.RS 4
-\%https://www.freedesktop.org/wiki/Software/xdg-user-dirs
+\%https://www.freedesktop.org/wiki/Software/xdg\-user\-dirs
.RE
.IP " 4." 4
IEEE Std 1003.1
.RS 4
-\%http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03
+\%http://pubs.opengroup.org/\:onlinepubs/\:9699919799/\:basedefs/\:V1_chap08.html#tag_08_03
.RE
.IP " 5." 4
Using /tmp/ and /var/tmp/ Safely
More information about the Pkg-systemd-maintainers
mailing list