<item><ref id="fhs"></item>
<item><ref id="virtual_pkg"></item>
<item><ref id="menus"></item>
- <item><ref id="mime"></item>
<item><ref id="perl"></item>
<item><ref id="maintscriptprompt"></item>
<item><ref id="emacs"></item>
symlinked there, is relaxed to a recommendation.
</p>
</item>
+ <item>
+ <p>
+ The additional directory <file>/run</file> in the root
+ file system is allowed. <file>/run</file>
+ replaces <file>/var/run</file>, and the
+ subdirectory <file>/run/lock</file>
+ replaces <file>/var/lock</file>, with
+ the <file>/var</file> directories replaced by symlinks
+ for backwards compatibility. <file>/run</file>
+ and <file>/run/lock</file> must follow all of the
+ requirements in the FHS for <file>/var/run</file>
+ and <file>/var/lock</file>, respectively, such as file
+ naming conventions, file format requirements, or the
+ requirement that files be cleared during the boot
+ process. Files and directories residing
+ in <file>/run</file> should be stored on a temporary
+ file system.
+ </p>
+ </item>
<item>
<p>
The following directories in the root filesystem are
though the spool may still be physically located there.
</p>
</sect1>
+
+ <sect1 id="fhs-run">
+ <heading><file>/run</file> and <file>/run/lock</file></heading>
+
+ <p>
+ The directory <file>/run</file> is cleared at boot, normally
+ by being a mount point for a temporary file system. Packages
+ therefore must not assume that any files or directories
+ under <file>/run</file> other than <file>/run/lock</file>
+ exist unless the package has arranged to create those files or
+ directories since the last reboot. Normally, this is done by
+ the package via an init script. See <ref id="writing-init">
+ for more information.
+ </p>
+
+ <p>
+ Packages must not include files or directories
+ under <file>/run</file>, or under the <file>/var/run</file>
+ or <file>/var/lock</file> paths that are replaced with
+ symlinks or bind mounts to <file>/run</file> for backwards
+ compatibility.
+ </p>
+
+ <p>
+ Packages should use <file>/run</file> in preference
+ to <file>/var/run</file> and <file>/run/lock</file> in
+ preference to <file>/var/lock</file>.
+ </p>
+ </sect1>
</sect>
<sect>
</p>
<p>
- <file>/var/run</file> and <file>/var/lock</file> may be mounted
- as temporary filesystems<footnote>
- For example, using the <tt>RAMRUN</tt> and <tt>RAMLOCK</tt>
- options in <file>/etc/default/rcS</file>.
- </footnote>, so the <file>init.d</file> scripts must handle this
- correctly. This will typically amount to creating any required
- subdirectories dynamically when the <file>init.d</file> script
- is run, rather than including them in the package and relying on
- <prgn>dpkg</prgn> to create them.
+ Files and directories under <file>/run</file>, including ones
+ referred to via the compatibility paths <file>/var/run</file>
+ and <file>/var/lock</file>, are normally stored on a temporary
+ filesystem and are normally not persistent across a reboot.
+ The <file>init.d</file> scripts must handle this correctly.
+ This will typically mean creating any required subdirectories
+ dynamically when the <file>init.d</file> script is run.
+ See <ref id="fhs-run"> for more information.
</p>
</sect1>
</p>
<sect1 id="cron-files">
+ <heading>Cron job file names</heading>
+
<p>
The file name of a cron job file should normally match the
name of the package from which it comes.
MIME (Multipurpose Internet Mail Extensions, RFCs 2045-2049)
is a mechanism for encoding files and data streams and
providing meta-information about them, in particular their
- type (e.g. audio or video) and format (e.g. PNG, HTML,
+ type (e.g. audio or video) and format (e.g. PNG, HTML,
MP3).
</p>
</p>
<p>
- The MIME support policy can be found in the <tt>mime-policy</tt>
- files in the <tt>debian-policy</tt> package.
- It is also available from the Debian web mirrors at
- <tt><url name="/doc/packaging-manuals/mime-policy/"
- id="http://www.debian.org/doc/packaging-manuals/mime-policy/"></tt>.
+ The <package>mime-support</package> package provides the
+ <prgn>update-mime</prgn> program which allows packages to
+ register programs that can show, compose, edit or print
+ MIME types.
+ </p>
+
+ <p>
+ Packages containing such programs must register them
+ with <prgn>update-mime</prgn> as documented in <manref
+ name="update-mime" section="8">. They should <em>not</em> depend
+ on, recommend, or suggest <prgn>mime-support</prgn>. Instead,
+ they should just put something like the following in the
+ <tt>postinst</tt> and <tt>postrm</tt> scripts:
+
+ <example>
+ if [ -x /usr/sbin/update-mime ]; then
+ update-mime
+ fi
+ </example>
</p>
</sect>
<sect1>
<heading>Sharing configuration files</heading>
- <p>
- Packages which specify the same file as a
- <tt>conffile</tt> must be tagged as <em>conflicting</em>
- with each other. (This is an instance of the general rule
- about not sharing files. Note that neither alternatives
- nor diversions are likely to be appropriate in this case;
- in particular, <prgn>dpkg</prgn> does not handle diverted
- <tt>conffile</tt>s well.)
- </p>
-
- <p>
- The maintainer scripts must not alter a <tt>conffile</tt>
- of <em>any</em> package, including the one the scripts
- belong to.
- </p>
-
<p>
If two or more packages use the same configuration file
and it is reasonable for both to be installed at the same
and which manages the shared configuration files. (The
<tt>sgml-base</tt> package is a good example.)
</p>
+
+ <p>
+ If the configuration file cannot be shared as described above,
+ the packages must be marked as conflicting with each other.
+ Two packages that specify the same file as
+ a <tt>conffile</tt> must conflict. This is an instance of the
+ general rule about not sharing files. Neither alternatives
+ nor diversions are likely to be appropriate in this case; in
+ particular, <prgn>dpkg</prgn> does not handle diverted
+ <tt>conffile</tt>s well.
+ </p>
+
+ <p>
+ When two packages both declare the same <tt>conffile</tt>, they
+ may see left-over configuration files from each other even
+ though they conflict with each other. If a user removes
+ (without purging) one of the packages and installs the other,
+ the new package will take over the <tt>conffile</tt> from the
+ old package. If the file was modified by the user, it will be
+ treated the same as any other locally
+ modified <tt>conffile</tt> during an upgrade.
+ </p>
+
+ <p>
+ The maintainer scripts must not alter a <tt>conffile</tt>
+ of <em>any</em> package, including the one the scripts
+ belong to.
+ </p>
</sect1>
<sect1>