In addition, the packages in <em>main</em>
<list compact="compact">
<item>
- must not require a package outside of <em>main</em>
- for compilation or execution (thus, the package must
- not declare a "Depends", "Recommends", or
+ must not require or recommend a package outside
+ of <em>main</em> for compilation or execution (thus, the
+ package must not declare a "Depends", "Recommends", or
"Build-Depends" relationship on a non-<em>main</em>
package),
</item>
list of sections. At present, they are:
<em>admin</em>, <em>cli-mono</em>, <em>comm</em>, <em>database</em>,
<em>devel</em>, <em>debug</em>, <em>doc</em>, <em>editors</em>,
- <em>electronics</em>, <em>embedded</em>, <em>fonts</em>,
- <em>games</em>, <em>gnome</em>, <em>graphics</em>, <em>gnu-r</em>,
- <em>gnustep</em>, <em>hamradio</em>, <em>haskell</em>,
- <em>httpd</em>, <em>interpreters</em>, <em>java</em>, <em>kde</em>,
- <em>kernel</em>, <em>libs</em>, <em>libdevel</em>, <em>lisp</em>,
- <em>localization</em>, <em>mail</em>, <em>math</em>, <em>misc</em>,
+ <em>education</em>, <em>electronics</em>, <em>embedded</em>,
+ <em>fonts</em>, <em>games</em>, <em>gnome</em>, <em>graphics</em>,
+ <em>gnu-r</em>, <em>gnustep</em>, <em>hamradio</em>, <em>haskell</em>,
+ <em>httpd</em>, <em>interpreters</em>, <em>introspection</em>,
+ <em>java</em>, <em>kde</em>, <em>kernel</em>, <em>libs</em>,
+ <em>libdevel</em>, <em>lisp</em>, <em>localization</em>,
+ <em>mail</em>, <em>math</em>, <em>metapackages</em>, <em>misc</em>,
<em>net</em>, <em>news</em>, <em>ocaml</em>, <em>oldlibs</em>,
<em>otherosfs</em>, <em>perl</em>, <em>php</em>, <em>python</em>,
<em>ruby</em>, <em>science</em>, <em>shells</em>, <em>sound</em>,
For example, the <tt>emacsen-common</tt> package could
contain something like
<example compact="compact">
-if [ ! -e /usr/local/share/emacs ]
-then
- if mkdir /usr/local/share/emacs 2>/dev/null
- then
- chown root:staff /usr/local/share/emacs
- chmod 2775 /usr/local/share/emacs
+if [ ! -e /usr/local/share/emacs ]; then
+ if mkdir /usr/local/share/emacs 2>/dev/null; then
+ if chown root:staff /usr/local/share/emacs; then
+ chmod 2775 /usr/local/share/emacs || true
+ fi
fi
fi
</example>
</p>
</sect>
- <sect>
+ <sect id="cron-jobs">
<heading>Cron jobs</heading>
<p>
Packages must not modify the configuration file
<file>/etc/crontab</file>, and they must not modify the files in
- <file>/var/spool/cron/crontabs</file>.</p>
+ <file>/var/spool/cron/crontabs</file>.
+ </p>
<p>
- If a package wants to install a job that has to be executed
- via cron, it should place a file with the name of the
- package in one or more of the following directories:
+ If a package wants to install a job that has to be executed via
+ cron, it should place a file named as specified
+ in <ref id="cron-files"> into one or more of the following
+ directories:
<example compact="compact">
/etc/cron.hourly
/etc/cron.daily
As these directory names imply, the files within them are
executed on an hourly, daily, weekly, or monthly basis,
respectively. The exact times are listed in
- <file>/etc/crontab</file>.</p>
+ <file>/etc/crontab</file>.
+ </p>
<p>
All files installed in any of these directories must be
<p>
If a certain job has to be executed at some other frequency or
- at a specific time, the package should install a file
- <file>/etc/cron.d/<var>package</var></file>. This file uses the
- same syntax as <file>/etc/crontab</file> and is processed by
- <prgn>cron</prgn> automatically. The file must also be
+ at a specific time, the package should install a file in
+ <file>/etc/cron.d</file> with a name as specified
+ in <ref id="cron-files">. This file uses the same syntax
+ as <file>/etc/crontab</file> and is processed
+ by <prgn>cron</prgn> automatically. The file must also be
treated as a configuration file. (Note that entries in the
<file>/etc/cron.d</file> directory are not handled by
<prgn>anacron</prgn>. Thus, you should only use this
directory for jobs which may be skipped if the system is not
- running.)</p>
+ running.)
+ </p>
+
<p>
Unlike <file>crontab</file> files described in the IEEE Std
1003.1-2008 (POSIX.1) available from
execute scripts in
<file>/etc/cron.{hourly,daily,weekly,monthly}</file>.
</p>
+
+ <sect1 id="cron-files">
+ <p>
+ The file name of a cron job file should normally match the
+ name of the package from which it comes.
+ </p>
+
+ <p>
+ If a package supplies multiple cron job files files in the
+ same directory, the file names should all start with the name
+ of the package (possibly modified as described below) followed
+ by a hyphen (<tt>-</tt>) and a suitable suffix.
+ </p>
+
+ <p>
+ A cron job file name must not include any period or plus
+ characters (<tt>.</tt> or <tt>+</tt>) characters as this will
+ cause cron to ignore the file. Underscores (<tt>_</tt>)
+ should be used instead of <tt>.</tt> and <tt>+</tt>
+ characters.
+ </p>
+ </sect1>
</sect>
<sect id="menus">
<heading>Symbolic links</heading>
<p>
- In general, symbolic links within a top-level directory
- should be relative, and symbolic links pointing from one
- top-level directory into another should be absolute. (A
- top-level directory is a sub-directory of the root
- directory <file>/</file>.)
+ In general, symbolic links within a top-level directory should
+ be relative, and symbolic links pointing from one top-level
+ directory to or into another should be absolute. (A top-level
+ directory is a sub-directory of the root
+ directory <file>/</file>.) For example, a symbolic link
+ from <file>/usr/lib/foo</file> to <file>/usr/share/bar</file>
+ should be relative (<file>../share/bar</file>), but a symbolic
+ link from <file>/var/run</file> to <file>/run</file> should be
+ absolute.<footnote>
+ This is necessary to allow top-level directories to be
+ symlinks. If linking <file>/var/run</file>
+ to <file>/run</file> were done with the relative symbolic
+ link <file>../run</file>, but <file>/var</file> were a
+ symbolic link to <file>/srv/disk1</file>, the symbolic link
+ would point to <file>/srv/run</file> rather than the intended
+ target.
+ </footnote>
</p>
<p>
<p>
In addition, the copyright file must say where the upstream
- sources (if any) were obtained. It should name the original
- authors of the package and the Debian maintainer(s) who were
- involved with its creation.
+ sources (if any) were obtained, and should name the original
+ authors.
</p>
<p>