65878a
From b2d9ad357e136b289238eb05648c504d0c0bc06b Mon Sep 17 00:00:00 2001
65878a
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
65878a
Date: Tue, 24 Dec 2013 10:21:45 -0500
65878a
Subject: [PATCH] man,units: tmpfiles.d(5) cleanup
65878a
65878a
Condition for /lib (necessary for split /usr) was missing from the unit.
65878a
65878a
Some changes which were done in tmpfiles.d(5) were not carried over to
65878a
systemd-tmpfiles(1).
65878a
65878a
Also use markup where possible.
65878a
65878a
Conflicts:
65878a
	man/tmpfiles.d.xml
65878a
---
65878a
 man/systemd-tmpfiles.xml                |  53 ++++++----
65878a
 man/tmpfiles.d.xml                      | 168 +++++++++++++++++++-------------
65878a
 units/systemd-tmpfiles-setup.service.in |   1 +
65878a
 3 files changed, 134 insertions(+), 88 deletions(-)
65878a
65878a
diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml
65878a
index ba727e1..91c0372 100644
65878a
--- a/man/systemd-tmpfiles.xml
65878a
+++ b/man/systemd-tmpfiles.xml
65878a
@@ -54,7 +54,9 @@
65878a
 
65878a
         <refsynopsisdiv>
65878a
                 <cmdsynopsis>
65878a
-                        <command>systemd-tmpfiles <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt" rep="repeat">CONFIGURATION FILE</arg></command>
65878a
+                        <command>systemd-tmpfiles</command>
65878a
+                        <arg choice="opt" rep="repeat">OPTIONS</arg>
65878a
+                        <arg choice="opt" rep="repeat"><replaceable>CONFIGFILE</replaceable></arg>
65878a
                 </cmdsynopsis>
65878a
 
65878a
                 <para><filename>systemd-tmpfiles-setup.service</filename></para>
65878a
@@ -67,22 +69,20 @@
65878a
                 <title>Description</title>
65878a
 
65878a
                 <para><command>systemd-tmpfiles</command> creates,
65878a
-                deletes and cleans up volatile and temporary files and
65878a
+                deletes, and cleans up volatile and temporary files and
65878a
                 directories, based on the configuration file format and
65878a
-                location specified in <citerefentry>
65878a
-                        <refentrytitle>tmpfiles.d</refentrytitle>
65878a
-                        <manvolnum>5</manvolnum>
65878a
-                </citerefentry>.</para>
65878a
+                location specified in
65878a
+                <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
65878a
+                </para>
65878a
 
65878a
                 <para>If invoked with no arguments, it applies all
65878a
                 directives from all configuration files. If one or
65878a
                 more filenames are passed on the command line, only
65878a
                 the directives in these files are applied. If only
65878a
                 the basename of a configuration file is specified,
65878a
-                all configuration directories as specified in <citerefentry>
65878a
-                        <refentrytitle>tmpfiles.d</refentrytitle>
65878a
-                        <manvolnum>5</manvolnum>
65878a
-                </citerefentry> are searched for a matching file.</para>
65878a
+                all configuration directories as specified in
65878a
+                <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
65878a
+                are searched for a matching file.</para>
65878a
         </refsect1>
65878a
 
65878a
         <refsect1>
65878a
@@ -94,12 +94,25 @@
65878a
 
65878a
                         <varlistentry>
65878a
                                 <term><option>--create</option></term>
65878a
-                                <listitem><para>If this option is passed, all
65878a
-                                files and directories marked with f,
65878a
-                                F, d, D in the configuration files are
65878a
-                                created. Files and directories marked with z,
65878a
-                                Z have their ownership, access mode and security
65878a
-                                labels set.</para></listitem>
65878a
+                                <listitem><para>If this option is
65878a
+                                passed, all files and directories
65878a
+                                marked with <varname>f</varname>,
65878a
+                                <varname>F</varname>,
65878a
+                                <varname>w</varname>,
65878a
+                                <varname>d</varname>,
65878a
+                                <varname>D</varname>,
65878a
+                                <varname>p</varname>,
65878a
+                                <varname>L</varname>,
65878a
+                                <varname>c</varname>,
65878a
+                                <varname>b</varname>,
65878a
+                                <varname>m</varname> in the
65878a
+                                configuration files are created or
65878a
+                                written to. Files and directories
65878a
+                                marked with <varname>z</varname>,
65878a
+                                <varname>Z</varname>,
65878a
+                                <varname>m</varname> have their
65878a
+                                ownership, access mode and security
65878a
+                                labels set. </para></listitem>
65878a
                         </varlistentry>
65878a
 
65878a
                         <varlistentry>
65878a
@@ -113,9 +126,11 @@
65878a
                         <varlistentry>
65878a
                                 <term><option>--remove</option></term>
65878a
                                 <listitem><para>If this option is
65878a
-                                passed, all files and directories marked
65878a
-                                with r, R in the configuration files
65878a
-                                are removed.</para></listitem>
65878a
+                                passed, all files and directories
65878a
+                                marked with <varname>r</varname>,
65878a
+                                <varname>R</varname> in the
65878a
+                                configuration files are
65878a
+                                removed.</para></listitem>
65878a
                         </varlistentry>
65878a
                         <varlistentry>
65878a
                                 <term><option>--prefix=PATH</option></term>
65878a
diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml
65878a
index e8b630d..a00637b 100644
65878a
--- a/man/tmpfiles.d.xml
65878a
+++ b/man/tmpfiles.d.xml
65878a
@@ -67,23 +67,32 @@
65878a
                 <title>Configuration Format</title>
65878a
 
65878a
                 <para>Each configuration file shall be named in the
65878a
-                style of <filename><package>.conf</filename>.
65878a
-                Files in <filename>/etc/</filename> override files
65878a
-                with the same name in <filename>/usr/lib/</filename>
65878a
-                and <filename>/run/</filename>.  Files in
65878a
-                <filename>/run/</filename> override files with the same
65878a
-                name in <filename>/usr/lib/</filename>. Packages
65878a
+                style of
65878a
+                <filename><replaceable>package</replaceable>.conf</filename>
65878a
+                or
65878a
+                <filename><replaceable>package</replaceable>-<replaceable>part</replaceable>.conf</filename>.
65878a
+                The second variant should be used when it is desirable
65878a
+                to make it easy to override just this part of
65878a
+                configuration.</para>
65878a
+
65878a
+                <para>Files in <filename>/etc/tmpfiles.d</filename>
65878a
+                override files with the same name in
65878a
+                <filename>/usr/lib/tmpfiles.d</filename> and
65878a
+                <filename>/run/tmpfiles.d</filename>. Files in
65878a
+                <filename>/run/tmpfiles.d</filename> override files
65878a
+                with the same name in
65878a
+                <filename>/usr/lib/tmpfiles.d</filename>. Packages
65878a
                 should install their configuration files in
65878a
-                <filename>/usr/lib/</filename>. Files in
65878a
-                <filename>/etc/</filename> are reserved for the local
65878a
-                administrator, who may use this logic to override the
65878a
-                configuration files installed by vendor packages. All
65878a
-                configuration files are sorted by their filename in
65878a
-                lexicographic order, regardless in which of the
65878a
-                directories they reside. If multiple files specify the
65878a
-                same path, the entry in the file with the lexicographically
65878a
-                earliest name will be applied, all all other conflicting
65878a
-                entries logged as errors.</para>
65878a
+                <filename>/usr/lib/tmpfiles.d</filename>. Files in
65878a
+                <filename>/etc/tmpfiles.d</filename> are reserved for
65878a
+                the local administrator, who may use this logic to
65878a
+                override the configuration files installed by vendor
65878a
+                packages. All configuration files are sorted by their
65878a
+                filename in lexicographic order, regardless in which
65878a
+                of the directories they reside. If multiple files
65878a
+                specify the same path, the entry in the file with the
65878a
+                lexicographically earliest name will be applied, all
65878a
+                all other conflicting entries logged as errors.</para>
65878a
 
65878a
                 <para>If the administrator wants to disable a
65878a
                 configuration file supplied by the vendor, the
65878a
@@ -93,10 +102,10 @@
65878a
                 same filename.</para>
65878a
 
65878a
                 <para>The configuration format is one line per path
65878a
-                containing action, path, mode, ownership, age and argument
65878a
+                containing type, path, mode, ownership, age, and argument
65878a
                 fields:</para>
65878a
 
65878a
-                <programlisting>Type Path        Mode UID  GID  Age Argument
65878a
+                <programlisting>#Type Path        Mode UID  GID  Age Argument
65878a
 d    /run/user   0755 root root 10d -
65878a
 L    /tmp/foobar -    -    -    -   /dev/null</programlisting>
65878a
 
65878a
@@ -109,12 +118,12 @@ L    /tmp/foobar -    -    -    -   /dev/null</programlisting>
65878a
                         <variablelist>
65878a
                                 <varlistentry>
65878a
                                         <term><varname>f</varname></term>
65878a
-                                        <listitem><para>Create a file if it does not exist yet (optionally writing a short string into it, if the argument parameter is passed)</para></listitem>
65878a
+                                        <listitem><para>Create a file if it does not exist yet. If the argument parameter is given, it will be written to the file.</para></listitem>
65878a
                                 </varlistentry>
65878a
 
65878a
                                 <varlistentry>
65878a
                                         <term><varname>F</varname></term>
65878a
-                                        <listitem><para>Create or truncate a file (optionally writing a short string into it, if the argument parameter is passed)</para></listitem>
65878a
+                                        <listitem><para>Create or truncate a file. If the argument parameter is given, it will be written to the file.</para></listitem>
65878a
                                 </varlistentry>
65878a
 
65878a
                                 <varlistentry>
65878a
@@ -127,32 +136,32 @@ L    /tmp/foobar -    -    -    -   /dev/null</programlisting>
65878a
 
65878a
                                 <varlistentry>
65878a
                                         <term><varname>d</varname></term>
65878a
-                                        <listitem><para>Create a directory if it does not exist yet</para></listitem>
65878a
+                                        <listitem><para>Create a directory if it does not exist yet.</para></listitem>
65878a
                                 </varlistentry>
65878a
 
65878a
                                 <varlistentry>
65878a
                                         <term><varname>D</varname></term>
65878a
-                                        <listitem><para>Create or empty a directory</para></listitem>
65878a
+                                        <listitem><para>Create or empty a directory.</para></listitem>
65878a
                                 </varlistentry>
65878a
 
65878a
                                 <varlistentry>
65878a
                                         <term><varname>p</varname></term>
65878a
-                                        <listitem><para>Create a named pipe (FIFO) if it does not exist yet</para></listitem>
65878a
+                                        <listitem><para>Create a named pipe (FIFO) if it does not exist yet.</para></listitem>
65878a
                                 </varlistentry>
65878a
 
65878a
                                 <varlistentry>
65878a
                                         <term><varname>L</varname></term>
65878a
-                                        <listitem><para>Create a symlink if it does not exist yet</para></listitem>
65878a
+                                        <listitem><para>Create a symlink if it does not exist yet.</para></listitem>
65878a
                                 </varlistentry>
65878a
 
65878a
                                 <varlistentry>
65878a
                                         <term><varname>c</varname></term>
65878a
-                                        <listitem><para>Create a character device node if it does not exist yet</para></listitem>
65878a
+                                        <listitem><para>Create a character device node if it does not exist yet.</para></listitem>
65878a
                                 </varlistentry>
65878a
 
65878a
                                 <varlistentry>
65878a
                                         <term><varname>b</varname></term>
65878a
-                                        <listitem><para>Create a block device node if it does not exist yet</para></listitem>
65878a
+                                        <listitem><para>Create a block device node if it does not exist yet.</para></listitem>
65878a
                                 </varlistentry>
65878a
 
65878a
                                 <varlistentry>
65878a
@@ -174,11 +183,12 @@ L    /tmp/foobar -    -    -    -   /dev/null</programlisting>
65878a
                                         as controlled with the Age
65878a
                                         parameter. Note that lines of
65878a
                                         this type do not influence the
65878a
-                                        effect of r or R lines. Lines
65878a
-                                        of this type accept
65878a
+                                        effect of <varname>r</varname>
65878a
+                                        or <varname>R</varname> lines.
65878a
+                                        Lines of this type accept
65878a
                                         shell-style globs in place of
65878a
-                                        normal path
65878a
-                                        names.</para></listitem>
65878a
+                                        normal path names.
65878a
+                                        </para></listitem>
65878a
                                 </varlistentry>
65878a
 
65878a
                                 <varlistentry>
65878a
@@ -187,28 +197,31 @@ L    /tmp/foobar -    -    -    -   /dev/null</programlisting>
65878a
                                         during cleaning. Use this type
65878a
                                         to exclude paths from clean-up
65878a
                                         as controlled with the Age
65878a
-                                        parameter. Unlike x this
65878a
+                                        parameter. Unlike
65878a
+                                        <varname>x</varname>, this
65878a
                                         parameter will not exclude the
65878a
-                                        content if path is a directory,
65878a
-                                        but only directory itself.
65878a
-                                        Note that lines of this type do
65878a
-                                        not influence the effect of r
65878a
-                                        or R lines. Lines of this type
65878a
-                                        accept shell-style globs in
65878a
-                                        place of normal path
65878a
-                                        names.</para></listitem>
65878a
+                                        content if path is a
65878a
+                                        directory, but only directory
65878a
+                                        itself. Note that lines of
65878a
+                                        this type do not influence the
65878a
+                                        effect of <varname>r</varname>
65878a
+                                        or <varname>R</varname> lines.
65878a
+                                        Lines of this type accept
65878a
+                                        shell-style globs in place of
65878a
+                                        normal path names.
65878a
+                                        </para></listitem>
65878a
                                 </varlistentry>
65878a
 
65878a
                                 <varlistentry>
65878a
                                         <term><varname>r</varname></term>
65878a
                                         <listitem><para>Remove a file
65878a
-                                        or directory if it
65878a
-                                        exists. This may not be used
65878a
-                                        to remove non-empty
65878a
-                                        directories, use R for
65878a
-                                        that. Lines of this type
65878a
-                                        accept shell-style globs in
65878a
-                                        place of normal path
65878a
+                                        or directory if it exists.
65878a
+                                        This may not be used to remove
65878a
+                                        non-empty directories, use
65878a
+                                        <varname>R</varname> for that.
65878a
+                                        Lines of this type accept
65878a
+                                        shell-style globs in place of
65878a
+                                        normal path
65878a
                                         names.</para></listitem>
65878a
                                 </varlistentry>
65878a
 
65878a
@@ -308,11 +321,14 @@ L    /tmp/foobar -    -    -    -   /dev/null</programlisting>
65878a
                         <para>The file access mode to use when
65878a
                         creating this file or directory. If omitted or
65878a
                         when set to -, the default is used: 0755 for
65878a
-                        directories, 0644 for all other file
65878a
-                        objects. For z, Z lines, if omitted or when set
65878a
-                        to -, the file access mode will not be
65878a
-                        modified. This parameter is ignored for x, r,
65878a
-                        R, L lines.</para>
65878a
+                        directories, 0644 for all other file objects.
65878a
+                        For <varname>z</varname>, <varname>Z</varname>
65878a
+                        lines, if omitted or when set to
65878a
+                        <literal>-</literal>, the file access mode
65878a
+                        will not be modified. This parameter is
65878a
+                        ignored for <varname>x</varname>,
65878a
+                        <varname>r</varname>, <varname>R</varname>,
65878a
+                        <varname>L</varname> lines.</para>
65878a
                 </refsect2>
65878a
 
65878a
                 <refsect2>
65878a
@@ -321,10 +337,15 @@ L    /tmp/foobar -    -    -    -   /dev/null</programlisting>
65878a
                         <para>The user and group to use for this file
65878a
                         or directory. This may either be a numeric
65878a
                         user/group ID or a user or group name. If
65878a
-                        omitted or when set to -, the default 0 (root)
65878a
-                        is used. For z, Z lines, when omitted or when set to -,
65878a
-                        the file ownership will not be modified.
65878a
-                        These parameters are ignored for x, r, R, L lines.</para>
65878a
+                        omitted or when set to <literal>-</literal>,
65878a
+                        the default 0 (root) is used. For
65878a
+                        <varname>z</varname>, <varname>Z</varname>
65878a
+                        lines, when omitted or when set to -, the file
65878a
+                        ownership will not be modified. These
65878a
+                        parameters are ignored for
65878a
+                        <varname>x</varname>, <varname>r</varname>,
65878a
+                        <varname>R</varname>, <varname>L</varname>
65878a
+                        lines.</para>
65878a
                 </refsect2>
65878a
 
65878a
                 <refsect2>
65878a
@@ -357,28 +378,37 @@ L    /tmp/foobar -    -    -    -   /dev/null</programlisting>
65878a
                         <para>When the age is set to zero, the files are cleaned
65878a
                         unconditionally.</para>
65878a
 
65878a
-                        <para>The age field only applies to lines starting with
65878a
-                        d, D and x. If omitted or set to -, no automatic clean-up
65878a
-                        is done.</para>
65878a
+                        <para>The age field only applies to lines
65878a
+                        starting with <varname>d</varname>,
65878a
+                        <varname>D</varname>, and
65878a
+                        <varname>x</varname>. If omitted or set to
65878a
+                        <literal>-</literal>, no automatic clean-up is
65878a
+                        done.</para>
65878a
 
65878a
                         <para>If the age field starts with a tilde
65878a
-                        character (~), the clean-up is only applied to
65878a
-                        files and directories one level inside the
65878a
-                        directory specified, but not the files and
65878a
-                        directories immediately inside it.</para>
65878a
+                        character <literal>~</literal>, the clean-up
65878a
+                        is only applied to files and directories one
65878a
+                        level inside the directory specified, but not
65878a
+                        the files and directories immediately inside
65878a
+                        it.</para>
65878a
                 </refsect2>
65878a
 
65878a
                 <refsect2>
65878a
                         <title>Argument</title>
65878a
 
65878a
-                        <para>For L lines determines the destination
65878a
-                        path of the symlink. For c, b determines the
65878a
+                        <para>For <varname>L</varname> lines
65878a
+                        determines the destination path of the
65878a
+                        symlink. For <varname>c</varname>,
65878a
+                        <varname>b</varname> determines the
65878a
                         major/minor of the device node, with major and
65878a
-                        minor formatted as integers, separated by :,
65878a
-                        e.g. "1:3". For f, F, w may be used to specify
65878a
-                        a short string that is written to the file,
65878a
-                        suffixed by a newline. Ignored for all other
65878a
-                        lines.</para>
65878a
+                        minor formatted as integers, separated by
65878a
+                        <literal>:</literal>, e.g.
65878a
+                        <literal>1:3</literal>. For
65878a
+                        <varname>f</varname>, <varname>F</varname>,
65878a
+                        and <varname>w</varname> may be used to
65878a
+                        specify a short string that is written to the
65878a
+                        file, suffixed by a newline. Ignored for all
65878a
+                        other lines.</para>
65878a
                 </refsect2>
65878a
 
65878a
         </refsect1>
65878a
diff --git a/units/systemd-tmpfiles-setup.service.in b/units/systemd-tmpfiles-setup.service.in
65878a
index 6f98063..3405e28 100644
65878a
--- a/units/systemd-tmpfiles-setup.service.in
65878a
+++ b/units/systemd-tmpfiles-setup.service.in
65878a
@@ -14,6 +14,7 @@ Conflicts=shutdown.target
65878a
 After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target
65878a
 Before=sysinit.target shutdown.target
65878a
 ConditionDirectoryNotEmpty=|/usr/lib/tmpfiles.d
65878a
+ConditionDirectoryNotEmpty=|/lib/tmpfiles.d
65878a
 ConditionDirectoryNotEmpty=|/usr/local/lib/tmpfiles.d
65878a
 ConditionDirectoryNotEmpty=|/etc/tmpfiles.d
65878a
 ConditionDirectoryNotEmpty=|/run/tmpfiles.d