1 <!doctype debiandoc system>
5 <title> Policy checklist for upgrading your packages </title>
6 <author> Bill Allombert <email/ballombe@debian.org/ </author>
7 <author> Josip Rodin </author>
8 <author> Julian Gilbey </author>
9 <author> Russ Allbery <email/rra@debian.org/ </author>
10 <author> Manoj Srivastava <email/srivasta@debian.org/
12 <chapt> About the checklist
14 The checklist below has been created to simplify the upgrading process
15 of old packages. Note that this list is not "official"; it simply
16 gives an indication of what has changed and whether you are likely to
17 need to make changes to your package in light of this. If you have
18 doubts about a certain topic, if you need more details, or if you
19 think some other package does not comply with policy, please refer to
20 the Policy Manual itself. All of the changes from version 3.0.0
21 onwards indicate which section of the Policy Manual discusses the
22 issue: [3.4] means section 3.4. The section numbering changed when
23 the packaging manual was incorporated into policy; the section numbers
24 used below refer to the current version.
26 Here is how the check list works: Check which policy version your
27 package was checked against last (indicated in the "Standards-Version"
28 field of the source package). Then move upwards until the top and
29 check which of the items on the list might concern your package. Note
30 which sections of policy discuss this, and then check out the Policy
31 Manual for details. If you are upgrading from Policy version < 2.5.0,
32 it may be easier to check through the whole of policy instead of
33 picking your way through this list.
37 <sect id="3.9.5.0"> Version 3.9.5.0
43 <tag>5.4, 5.6.24</tag>
44 <item><tt>Checksums-Sha1</tt> and <tt>Checksums-Sha256</tt> are now
45 mandatory in <file>.dsc</file> files.
47 <tag>5.6.25, 5.8.1</tag>
48 <item>The <tt>DM-Upload-Allowed</tt> field is obsolete. Permissions
49 are now granted via <em>dak-commands</em> files.
51 <item>New section documenting the <tt>Package-List</tt> field in Debian
55 <item>New section documenting the <tt>Package-Type</tt> field in source
56 package control files.
59 <item>New section documenting the <tt>Dgit</tt> field in Debian
63 <item>The exception to the FHS for the <file>/selinux</file> was removed.
66 <item>Packages should remove all obsolete configuration files without
67 local changes during upgrades. The <prgn>dpkg-maintscript-helper</prgn>
68 tool, available from the <package>dpkg</package> package since
69 <em>Wheezy</em>, can help with this.
72 <item>The name of the files and directories installed by binary packages
73 must be encoded in UTF-8 and should be restricted to ASCII when possible.
74 In the system PATH, they must be restricted to ASCII.
77 <item>Stop recommending to serve HTML documents from
78 <file>/usr/share/doc/<var>package</var></file>.
81 <item>Packages distributing Info documents should use
82 <package>install-info</package>'s trigger, and do not need anymore
83 to depend on <tt>dpkg (>= 1.15.4) | install-info</tt>.
86 <item>The <tt>escape</tt> capability is now documented.
89 <item><tt>mp3-decoder</tt> and <tt>mp3-encoder</tt> are removed.</item>
92 <sect id="3.9.4.0"> Version 3.9.4.0
95 Released August, 2012.
99 <item>New <em>tasks</em> archive section.
102 <item><tt>build-arch</tt> and <tt>build-indep</tt> are now mandatory
103 targets in <file>debian/rules</file>.
106 <item>New section documenting the <tt>Vcs-*</tt> fields, which are
107 already in widespread use. Note the mechanism for specifying the Git
108 branch used for packaging in the Vcs-Git field.
111 <item>The deprecated relations < and > now must not be used.
114 <item>New <tt>Built-Using</tt> field, which must be used to document the
115 source packages for any binaries that are incorporated into this package
116 at build time. This is used to ensure that the archive meets license
117 requirements for providing source for all binaries.
120 <item>Policy for dependencies between shared libraries and other
121 packages has been largely rewritten to document the <tt>symbols</tt>
122 system and more clearly document handling of shared library ABI
123 changes. <file>symbols</file> files are now recommended
124 over <file>shlibs</file> files in most situations. All maintainers of
125 shared library packages should review the entirety of this section.
128 <item>Packages must not assume the <file>/run</file> directory exists or
129 is usable without a dependency on <tt>initscripts (>= 2.88dsf-13.3)</tt>
130 until the stable release of Debian supports <file>/run</file>.
133 <item>Packages including MIME configuration can now rely on triggers and
134 do not need to call update-mime.</item>
136 <item>New section documenting general requirements for alternate init
137 systems and specific requirements for integrating with upstart.
140 <item>All copyright files must be encoded in UTF-8.
144 <sect id="3.9.3.0"> Version 3.9.3.0
147 Released February, 2012.
151 <item>New archive sections <em>education</em>, <em>introspection</em>,
152 and <em>metapackages</em> added.
155 <item>The <tt>Architecture</tt> field in <file>*.dsc</file> files may
156 now contain the value <tt>any all</tt> for source packages building both
157 architecture-independent and architecture-dependent packages.
160 <item>If a dependency is restricted to particular architectures, the
161 list of architectures must be non-empty.
164 <item><file>/run</file> is allowed as an exception to the FHS and
165 replaces <file>/var/run</file>. <file>/run/lock</file>
166 replaces <file>/var/lock</file>. The FHS requirements for the older
167 directories apply to these directories as well. Backward compatibility
168 links will be maintained and packages need not switch to
169 referencing <file>/run</file> directly yet. Files in <file>/run</file>
170 should be stored in a temporary file system.
173 <item>New section spelling out the requirements for packages that use
174 files in <file>/run</file>, <file>/var/run</file>,
175 or <file>/var/lock</file>. This generalizes information previously only
179 <item>Cron job file names must not contain <tt>.</tt> or <tt>+</tt> or
180 they will be ignored by cron. They should replace those characters
181 with <tt>_</tt>. If a package provides multiple cron job files in the
182 same directory, they should each start with the package name (possibly
183 modified as above), <tt>-</tt>, and then some suitable suffix.
186 <item>Packages using doc-base do not need to call install-docs anymore.
189 <item>Packages that declare the same <tt>conffile</tt> may see left-over
190 configuration files from each other even if they conflict.
193 <item>The Policy rules around Motif libraries were just a special case
194 of normal rules for non-free dependencies and were largely obsolete, so
195 they have been removed.
198 <item><file>debian/copyright</file> is no longer required to list the
199 Debian maintainers involved in the creation of the package (although
200 note that the requirement to list copyright information is unchanged).
202 <tag>copyright-format</tag>
203 <item>Version 1.0 of the "Machine-readable <file>debian/copyright</file>
204 file" specification is included.
207 <item>This separate document has been retired and and its (short)
208 contents merged into Policy section 9.7. There are no changes to the
212 <item>Packages may declare an interest in the <var>perl-major-upgrade</var>
213 trigger to be notified of major upgrades of perl.
216 <item><tt>ttf-japanese-{mincho, gothic}</tt> is renamed to
217 <tt>fonts-japanese-{mincho, gothic}</tt>.
221 <sect id="3.9.2.0"> Version 3.9.2.0
224 Released April, 2011.
228 <item>Multiple clarifications throughout Policy where "installed" was
229 used and the more precise terms "unpacked" or "configured" were
233 <item>The maintainer address must accept mail from Debian role accounts
234 and the BTS. At least one human must be listed with their personal
235 email address in <tt>Uploaders</tt> if the maintainer is a shared email
236 address. The duties of a maintainer are also clearer.
239 <item>All control fields are now classified as simple, folded, or
240 multiline, which governs whether their values must be a single line or
241 may be continued across multiple lines and whether line breaks are
245 <item>Parsers are allowed to accept paragraph separation lines
246 containing whitespace, but control files should use completely empty
247 lines. Ordering of paragraphs is significant. Field names must be
248 composed of printable ASCII characters except colon and must not begin
252 <item>The <tt>DM-Upload-Allowed</tt> field is now documented.
255 <item>The system state maintainer scripts can rely upon during each
256 possible invocation is now documented. In several less-common cases,
257 this is stricter than Policy had previously documented. Packages with
258 complex maintainer scripts should be reviewed in light of this new
262 <item>The impact on system state when maintainer scripts that are part
263 of a circular dependency are run is now documented. Circular
264 dependencies are now a should not.
267 <item>The system state when <prgn>postinst</prgn> and <prgn>prerm</prgn>
268 scripts are run is now documented, and the documentation of the special
269 case of dependency state for <prgn>postrm</prgn> scripts has been
270 improved. <prgn>postrm</prgn> scripts are required to gracefully skip
271 actions if their dependencies are not available.
274 <item>GNU/Hurd systems are allowed <file>/hurd</file>
275 and <file>/servers</file> directories in the root filesystem.
278 <item>Packages installing to architecture-specific subdirectories of
279 <file>/usr/lib</file> must use the value returned by
280 <prgn>dpkg-architecture -qDEB_HOST_MULTIARCH</prgn>, not by
281 <prgn>dpkg-architecture -qDEB_HOST_GNU_TYPE</prgn>; this is a path change
282 on i386 architectures and a no-op for other architectures.
285 <item><tt>mailx</tt> is now a virtual package provided by packages that
286 install <prgn>/usr/bin/mailx</prgn> and implement at least the
287 POSIX-required interface.
291 <sect id="3.9.1.0"> Version 3.9.1.0
298 <item>Date-based version components should be given as the four-digit
299 year, two-digit month, and then two-digit day, but may have embedded
303 <item>Maintainer scripts must pass <tt>--package</tt>
304 to <prgn>dpkg-divert</prgn> when creating or removing diversions and
305 must not use <tt>--local</tt>.
308 <item>Only <prgn>dpkg-gencontrol</prgn> supports variable substitution.
309 <prgn>dpkg-genchanges</prgn> (for <file>*.changes</file>)
310 and <prgn>dpkg-source</prgn> (for <file>*.dsc</file>) do not.
313 <item>Architecture restrictions and wildcards are also allowed in binary
314 package relationships provided that the binary package is not
315 architecture-independent.
318 <item><tt>Conflicts</tt> and <tt>Breaks</tt> should only be used when
319 there are file conflicts or one package breaks the other, not just
320 because two packages provide similar functionality but don't interfere.
323 <item>The SONAME of a library should change whenever the ABI of the
324 library changes in a way that isn't backward-compatible. It should not
325 change if the library ABI changes are backward-compatible. Discourage
326 bundling shared libraries together in one package.
329 <item>Ada Library Information (<file>*.ali</file>) files must be
332 <tag>8.6.1, 8.6.2, 8.6.5</tag>
333 <item>Packages should normally not include a <file>shlibs.local</file>
334 file since we now have complete <file>shlibs</file> coverage.
337 <item>The SONAME of a library may instead be of the
338 form <tt><var>name</var>-<var>major-version</var>.so</tt>.
341 <item>Libtool <file>.la</file> files should not be installed for public
342 libraries. If they're required (for <tt>libltdl</tt>, for instance),
343 the <tt>dependency_libs</tt> setting should be emptied. Library
344 packages historically including <file>.la</file> files must continue to
345 include them (with <tt>dependency_libs</tt> emptied) until all libraries
346 that depend on that library have removed or emptied
347 their <file>.la</file> files.
350 <item>Libraries no longer need to be built with <tt>-D_REENTRANT</tt>,
351 which was an obsolete LinuxThreads requirement. Instead, say explicitly
352 that libraries should be built with threading support and to be
353 thread-safe if the library supports this.
356 <item><file>/bin/sh</file> scripts may assume that <prgn>kill</prgn>
357 supports an argument of <tt>-<var>signal</var></tt>,
358 that <prgn>kill</prgn> and <prgn>trap</prgn> support the numeric signals
359 listed in the XSI extension, and that signal 13 (SIGPIPE) can be trapped
360 with <prgn>trap</prgn>.
363 <item>Use of <file>/etc/logrotate.d/<var>package</var></file> for
364 logrotate rules is now recommended.
367 <item>Control information files should be owned by <tt>root:root</tt>
368 and either mode 644 or mode 755.
370 <tag>11.4, 11.8.3, 11.8.4</tag>
371 <item>Packages providing alternatives for <prgn>editor</prgn>,
372 <prgn>pager</prgn>, <prgn>x-terminal-emulator</prgn>, or
373 <prgn>x-window-manager</prgn> should also provide a slave alternative
374 for the corresponding manual page.
377 <item>Cgi-bin executable files may be installed in subdirectories
378 of <file>/usr/lib/cgi-bin</file> and web servers should serve out
379 executables in those subdirectories.
382 <item>The GPL version 1 is now included in common-licenses and should be
383 referenced from there instead of included in the <file>copyright</file>
388 <sect id="3.9.0.0"> Version 3.9.0.0
394 <tag>4.4, 5.6.15</tag>
395 <item>The required format for the date in a changelog entry and in the
396 Date control field is now precisely specified.
399 <item>A control paragraph must not contain more than one instance of a
400 particular field name.
402 <tag>5.4, 5.5, 5.6.24</tag>
403 <item>The <tt>Checksums-Sha1</tt> and <tt>Checksums-Sha256</tt> fields
404 in <file>*.dsc</file> and <file>*.changes</file> files are now
405 documented and recommended.
407 <tag>5.5, 5.6.16</tag>
408 <item>The <tt>Format</tt> field of <file>.changes</file> files is now
409 1.8. The <tt>Format</tt> field syntax for source
410 package <file>.dsc</file> files allows a subtype in parentheses, and it
411 is used for a different purpose than the <tt>Format</tt> field
412 for <file>.changes</file> files.
415 <item>The syntax of the <tt>Maintainer</tt> field is now must rather
419 <item>The comma separating entries in <tt>Uploaders</tt> is now must
422 <tag>5.6.8, 7.1, 11.1.1</tag>
423 <item>Architecture wildcards may be used in addition to specific
424 architectures in <file>debian/control</file> and <file>*.dsc</file>
425 Architecture fields, and in architecture restrictions in build
429 <item>Maintainer scripts are no longer guaranteed to run with a
430 controlling terminal and must be able to fall back to noninteractive
431 behavior (debconf handles this). Maintainer scripts may abort if there
432 is no controlling terminal and no reasonable default for a high-priority
433 question, but should avoid this if possible.
435 <tag>7.3, 7.6.1</tag>
436 <item><tt>Breaks</tt> should be used with <tt>Replaces</tt> for moving
437 files between packages.
440 <item><tt>Breaks</tt> should normally be used instead
441 of <tt>Conflicts</tt> for transient issues and moving files between
442 packages. New documentation of when each should be used.
445 <item>Use <tt>Conflicts</tt> with <tt>Provides</tt> if only one provider
446 of a virtual facility can be installed at a time.
449 <item>All shared library development files are no longer required to be
450 in the <tt>-dev</tt> package, only be available when the <tt>-dev</tt>
451 package is installed. This allows the <tt>-dev</tt> package to be split
452 as long as it depends on the additional packages.
455 <item>The UID range of user accounts is extended to 1000-59999.
457 <tag>9.3.2, 10.4</tag>
458 <item><file>init.d</file> scripts are a possible exception from the
459 normal requirement to use <tt>set -e</tt> in each shell script.
462 <item>The UCB BSD license was removed from the list of licenses that
463 should be referenced from <file>/usr/share/common-licenses/BSD</file>.
464 It should instead be included directly
465 in <file>debian/copyright</file>, although it will still be in
466 common-licenses for the time being.
469 <item><tt>SETTITLE</tt> is now documented (it has been supported for
470 some time). <tt>SETTITLE</tt> is like <tt>TITLE</tt> but takes a
471 template instead of a string to allow translation.
474 <item><package>perl-base</package> now
475 provides <package>perlapi-<var>abiname</var></package> instead of a
476 package based solely on the Perl version. Perl packages must now depend
477 on <package>perlapi-$Config{debian_abi}</package>, falling back
478 on <tt>$Config{version}</tt> if <tt>$Config{debian_abi}</tt> is not set.
481 <item>Packages using <file>Makefile.PL</file> should use
482 <tt>DESTDIR</tt> rather than <tt>PREFIX</tt> to install into the package
483 staging area. <tt>PREFIX</tt> only worked due to a Debian-local patch.
487 <sect id="3.8.4.0"> Version 3.8.4.0
494 <item> An FHS exception has been granted for multiarch libraries.
495 Permitting files to instead be installed to <file>/lib/triplet</file> and
496 <file>/usr/lib/triplet</file> directories.
499 <item>Packages may not contain named pipes and should instead create
500 them in postinst and remove them in prerm or postrm.
503 <item><file>/sys</file> and <file>/selinux</file> directories are explicitly
504 allowed as an exception to the FHS.
508 <sect id="3.8.3.0"> Version 3.8.3.0
514 <item>DEB_*_ARCH_CPU and DEB_*_ARCH_OS variables are now documented and
515 recommended over GNU-style variables for that information.
518 <item>Source package Architecture fields may contain <em/all/ in
519 combination with other architectures. Clarify when <em/all/ and <em/any/
520 may be used in different versions of the field.
523 <item>The Debian archive software does not support uploading
524 to multiple distributions with one <file>*.changes</file> file.
527 <item>The Binary field may span multiple lines.
530 <item>Shared library packages are no longer allowed to install libraries
531 in a non-standard location and modify <file/ld.so.conf/. Packages
532 should either be installed in a standard library directory or packages
533 using them should be built with RPATH.
536 <item>Installation directories for X programs have been clarified.
537 Packages are no longer required to pre-depend on x11-common before
538 installing into <file>/usr/include/X11</file>
539 and <file>/usr/lib/X11</file>.
542 <item>Manual pages are no longer required to contain only characters
543 representable in the legacy encoding for that language.
546 <item>Localized man pages should either be kept up-to-date with
547 the original version or warn that they're not up-to-date, either
548 with warning text or by showing missing or changed portions in the
552 <item>install-info is now handled via triggers so packages no
553 longer need to invoke it in maintainer scripts. Info documents
554 should now have directory sections and entries in the document.
555 Packages containing info documents should add a dependency to
556 support partial upgrades.
559 <item>The requirement for Perl modules to have a versioned
560 Depend and Build-Depend on <tt>perl >= 5.6.0-16</tt> has been removed.
564 <sect id="3.8.2.0"> Version 3.8.2.0
571 <item>The list of archive sections has been significantly expanded. See
572 <url id="http://lists.debian.org/debian-devel-announce/2009/03/msg00010.html"
573 name="this debian-devel-announce message">
574 for the list of new sections and rules for how to categorize
578 <item>All packages must use debconf or equivalent for user prompting,
579 though essential packages or their dependencies may also fall
580 back on other methods.
583 <item>The requirements for source package names are now explicitly
587 <item>Legacy XFree86 servers no longer get a special exception from the
588 FHS permitting <file>/etc/X11/XF86Config-4</file>.
591 <item>Removed obsolete dependency requirements for packages that use
592 <file>/var/mail</file>.
595 <item>Speedo fonts are now deprecated. The X backend was disabled
599 <item>The GNU Free Documentation License version 1.3 is included in
600 common-licenses and should be referenced from there.
604 <sect id="3.8.1.0"> Version 3.8.1.0
611 <item>Care should be taken when adding functionality to essential and
612 such additions create an obligation to support that functionality
613 in essential forever unless significant work is done.
616 <item>Changelog files must be encoded in UTF-8.
619 <item>Some format requirements for changelog files are now "must"
623 <item>Alternative changelog formats have been removed. Debian only
624 supports one changelog format for the Debian Archive.
627 <item>New nocheck option for DEB_BUILD_OPTIONS indicating any build-time
628 test suite provided by the package should not be run.
631 <item>All control files must be encoded in UTF-8.
634 <item><file>debian/control</file> allows comment lines starting with #
635 with no preceding whitespace.
638 <item>Init scripts ending in .sh are not handled specially. They are not
639 sourced and are not guaranteed to be run by <prgn>/bin/sh</prgn> regardless
640 of the #! line. This brings Policy in line with the long-standing
641 behavior of the init system in Debian.
644 <item>The start action of an init script must exit successfully and not
645 start the daemon again if it's already running.
648 <item><file>/var/run</file> and <file>/var/lock</file> may be mounted as
649 temporary filesystems, and init scripts must therefore create any necessary
650 subdirectories dynamically.
653 <item> <file>/bin/sh</file> scripts may assume that local can take multiple
654 variable arguments and supports assignment.
657 <item>User mailboxes may be mode 600 and owned by the user rather than
658 mode 660, owned by user, and group mail.
662 <sect id="3.8.0.0"> Version 3.8.0.0
669 <item>The base section has been removed. contrib and non-free have been
670 removed from the section list; they are only categories. The base
671 system is now defined by priority.
673 <item>If <prgn>dpkg-source -x</prgn> doesn't provide the source that will be
674 compiled, a debian/rules patch target is recommended and should do whatever
676 <tag>4.9.1, 10.1</tag>
677 <item>Standardized the format of DEB_BUILD_OPTIONS. Specified permitted
678 characters for tags, required that tags be whitespace-separated,
679 allowed packages to assume non-conflicting tags, and required
680 unknown flags be ignored.
682 <item>Added parallel=n to the standardized DEB_BUILD_OPTIONS tags,
683 indicating that a package should be built using up to n parallel
684 processes if the package supports it
686 <item>Debian packages should not use convenience copies of code from other
687 packages unless the included package is explicitly intended to be
690 <item>If dpkg-source -x doesn't produce source ready for editing and
691 building with dpkg-buildpackage, packages should include a
692 <file>debian/README.source</file> file explaining how to generate
693 the patched source, add a new modification, and remove an existing
694 modification. This file may also be used to document packaging a
695 new upstream release and any other complexity of the Debian build
698 <item>The Uploaders field in debian/control may be wrapped.
700 <item>An empty Debian revision is equivalent to a Debian revision of 0 in
703 <item>New Homepage field for upstream web sites.
704 <tag>6.5, 6.6, 7</tag>
705 <item>The Breaks field declares that this package breaks another and
706 prevents installation of the breaking package unless the package
707 named in Breaks is deconfigured first. This field should not be
708 used until the dpkg in Debian stable supports it.
710 <item>Clarify which files should go into a shared library package, into a
711 separate package, or into the -dev package. Suggest -tools instead
712 of -runtime for runtime support programs, since that naming is more
715 <item>Files in <file>/etc/cron.{hourly,daily,weekly,monthly}</file> must be
716 configuration files (upgraded from should). Mention the hourly
719 <item>Packages providing <file>/etc/X11/Xresources</file> files need not
720 conflict with <tt> xbase (<< 3.3.2.3a-2)</tt>, which is
723 <item>Manual pages in locale-specific directories should use either the
724 legacy encoding for that directory or UTF-8. Country names should
725 not be included in locale-specific manual page directories unless
726 indicating a significant difference in the language. All
727 characters in the manual page source should be representable in the
728 legacy encoding for a locale even if the man page is encoded in
731 <item>The Apache 2.0 license is now in common-licenses and should be
732 referenced rather than quoted in <file>debian/copyright</file>.
734 <item>Packages in contrib and non-free should state in the copyright file
735 that the package is not part of Debian GNU/Linux and briefly
738 <item>Underscore (_) is allowed in debconf template names.
741 <sect id="3.7.3.0"> Version 3.7.3.0
748 <item>Package version numbers may contain tildes, which sort before
749 anything, even the end of a part.
751 <item>Scripts may assume that <file>/bin/sh</file> supports local (at a basic
752 level) and that its test builtin (if any) supports -a and -o binary
755 <item>The substitution variable ${binary:Version} should be used in place
756 of ${Source-Version} for dependencies between packages of the same
758 <tag>menu policy</tag>
759 <item>Substantial reorganization and renaming of sections in the Debian
760 menu structure. Packages with menu entries should be reviewed to
761 see if the menu section has been renamed or if one of the new
762 sections would be more appropriate.
764 <item>The Source field in a .changes file may contain a version number
767 <item>The acceptable values for the Urgency field are low, medium, high,
768 critical, or emergency.
770 <item>The shlibs file now allows an optional type field, indicating the
771 type of package for which the line is valid. The only currently
772 supported type is udeb, used with packages for the Debian
775 <item>Packages following the Debian Configuration management
776 specification must allow for translation of their messages by using
777 a gettext-based system such as po-debconf.
779 <item>GFDL 1.2, GPL 3, and LGPL 3 are now in common-licenses and should
780 be referenced rather than quoted in debian/copyright.
783 <sect id="3.7.2.2"> Version 3.7.2.2
789 <tag>6.1</tag> <item>Maintainer scripts must not be world writeable (up from a
790 should to a must)</item>
793 <sect id="3.7.2.0"> Version 3.7.2.0
799 <tag>11.5</tag> <item>Revert the cgi-lib change. </item>
802 <sect id="3.7.1.0"> Version 3.7.1.0
809 <item>It is now possible to create shared libraries without
810 relocatable code (using -fPIC) in certain exceptional cases,
811 provided some procedures are followed, and for creating static
812 libraries with relocatable code (again, using -fPIC).
813 Discussion on debian-devel@lists.debian.org, getting a rough
814 consensus, and documenting it in README.Debian constitute most
817 <item>Packages should install any relevant files into the directories
818 <file>/usr/include/X11/</file> and <file>/usr/lib/X11/</file>, but if
819 they do so, they must pre-depend on <tt>x11-common (>= 1:7.0.0)</tt>
822 <sect id="3.7.0.0"> Version 3.7.0.0
829 <item>Packages shipping web server CGI files are expected to install
830 them in <file>/usr/lib/cgi-lib/</file> directories. This location change
831 perhaps should be documented in NEWS
833 <item>Web server packages should include a standard scriptAlias of
834 cgi-lib to <file>/usr/lib/cgi-lib</file>.
836 <item>The version of FHS mandated by policy has been upped to
837 2.3. There should be no changes required for most packages,
838 though new top level directories <file>/media</file>, <file>/srv</file>,
839 etc. may be of interest.
840 <tag>5.1, 5.6.3</tag>
841 <item>All fields, apart from the Uploaders field, in the control file
842 are supposed to be a single logical line, which may be spread
843 over multiple physical lines (newline followed by space is
844 elided). However, any parser for the control file must allow
845 the Uploaders field to be spread over multiple physical lines
846 as well, to prepare for future changes.
848 <item>When scripts are installed into a directory in the system
849 PATH, the script name should not include an extension that
850 denotes the scripting language currently used to implement it.
853 <item>packages that invoke initscripts now must use invoke-rc.d to do
854 so since it also pays attention to run levels and other local
856 <tag>11.8.5.2, 11.8.7, etc</tag>
857 <item>We no longer use <file>/usr/X11R6</file>, since we have
858 migrated away to using Xorg paths. This means, for one thing, fonts
859 live in <file>/usr/share/fonts/X11/</file> now, and <file>/usr/X11R6</file>
863 <sect id="3.6.2.0"> Version 3.6.2.0
870 <item>Recommend. doc-base, and not menu, for registering package documentation.
873 <item>Run time support programs should live in subdirectories of
874 <file>/usr/lib/</file> or <file>/usr/share</file>, and preferably the shared
875 lib is named the same as the package name (to avoid name collisions).
878 <item>It is recommended that HTTP servers provide an alias /images to
879 allow packages to share image files with the web server
883 <sect id="3.6.1.0"> Version 3.6.1.0
890 <item>Prompting the user should be done using debconf. Non debconf
891 user prompts are now deprecated.
894 <sect id="3.6.0.0"> Version 3.6.0
901 <item>Restructuring causing shifts in section numbers and bumping of
902 the minor version number:
904 <item>Many packaging manual appendices that were integrated into policy
905 sections are now empty, and replaced with links to the Policy.
906 In particular, the appendices that included the list of control
907 fields were updated (new fields like Closes, Changed-By were added)
908 and the list of fields for each of control, .changes and .dsc files
909 is now in Policy, and they're marked mandatory, recommended or
910 optional based on the current practice and the behavior of the
911 deb-building tool-chain.
913 <item>Elimination of needlessly deep section levels, primarily in the
914 chapter Debian Archive, from which two new chapters were split out,
915 Binary packages and Source packages. What remained was reordered
916 properly, that is, some sects became sects etc.
918 <item>Several sections that were redundant, crufty or simply not designed
919 with any sort of vision, were rearranged according to the formula that
920 everything should be either in the same place or properly interlinked.
921 Some things remained split up between different chapters when they
922 talked about different aspects of files: their content, their syntax,
923 and their placement in the file system. In particular, see the new
924 sections about changelog files.
925 <tag>menu policy</tag>
926 <item>Added Games/Simulation and Apps/Education to menu
929 <item>Debian changelogs should be UTF-8 encoded.
931 <item>shared libraries must be linked against all libraries that they
932 use symbols from in the same way that binaries are.
934 <item>build-depends-indep need not be satisfied during clean
938 <sect id="3.5.10.0"> Version 3.5.10
945 <item>packages providing the x-terminal-emulator virtual package
946 ought to ensure that they interpret the command line exactly
949 <item>Window managers compliant with the Window Manager Specification
950 Project may add 40 points for ranking in the alternatives
953 <sect id="3.5.9.0"> Version 3.5.9.0
960 <item>The section describing the Description: package field once again has
961 full details of the long description format.
963 <item>Clarified that if a package has non-build-essential
964 build-dependencies, it should have them listed in the Build-Depends
965 and related fields (i.e. it's not merely optional).
967 <item>When asked to restart a service that isn't already running,
968 the init script should start the service.
970 <item>If the purpose of a package is to provide examples, then the
971 example files can be installed into <file>/usr/share/doc/package</file>
972 (rather than <file>/usr/share/doc/package/examples</file>).
975 <sect id="3.5.8.0"> Version 3.5.8.0
982 <item>It is no longer necessary to keep a log of changes to the upstream
983 sources in the copyright file. Instead, all such changes should be
984 documented in the changelog file.
986 <item><var/Build-Depends/, <var/Build-Conflicts/, <var/Build-Depends-Indep/,
987 and <var/Build-Conflicts-Indep/ must also be satisfied when the clean
989 <tag>menu policy</tag>
990 <item>A new Apps/Science menu section is available
991 <tag>debconf policy</tag>
992 <item>debconf specification cleared up, various changes.
994 <item>It is no longer recommended to create symlinks from nonexistent
995 manual pages to undocumented(7). Missing manual pages for programs
999 <sect id="3.5.7.0"> Version 3.5.7.0
1006 <item>Packages no longer have to ask permission to call MAKEDEV in
1007 postinst, merely notifying the user ought to be enough.
1009 <item>cryptographic software may now be included in the main
1012 <item>task packages are no longer permitted; tasks are now created by a
1013 special Tasks: field in the control file.
1015 <item>window managers that support netwm can now add 20 points when
1016 they add themselves as an alternative for
1017 <file>/usr/bin/x-window-manager</file>
1019 <item>The default compilation options have now changed, one should
1020 provide debugging symbols in all cases, and optionally step
1021 back optimization to -O0, depending on the DEB_BUILD_OPTIONS
1022 environment variable.
1024 <item>Added mention of build-arch, build-indep, etc, in describing
1025 the relationships with `Build-Depends', `Build-Conflicts',
1026 `Build-Depends-Indep', and `Build-Conflicts-Indep'. May need to
1027 review the new rules.
1029 <item>Changed rules on how, and when, to invoke ldconfig in maintainer
1030 scripts. Long rationale.
1034 Added the last note in 3.5.6 upgrading checklist item regarding build
1035 rules, please see below
1038 <sect id="3.5.6.0"> Version 3.5.6.0
1045 <item>Emacs and TeX are no longer mandated by policy to be priority
1048 <item>Programs that access docs need to do so via <file>/usr/share/doc</file>,
1049 and not via <file>/usr/doc/</file> as was the policy previously
1051 <item>Putting documentation in <file>/usr/doc</file> versus
1052 <file>/usr/share/doc</file> is now a ``serious'' policy violation.
1054 <item>For web servers, one should not provide non-local access to the
1055 <file>/usr/share/doc</file> hierarchy. If one can't provide access
1056 controls for the http://localhost/doc/ directory, then it is preferred
1057 that one ask permission to expose that information during the install.
1059 <item>There are new rules for build-indep/build-arch targets and
1060 there is a new Build-Depend-Indep semantic.
1063 <sect id="3.5.5.0"> Version 3.5.5.0
1070 <item>Manpages should not rely on header information to have
1071 alternative manpage names available; it should only use
1072 symlinks or .so pages to do this
1075 <item><em> Clarified note in 3.5.3.0 upgrading checklist regarding
1076 examples and templates: this refers only to those examples used
1077 by scripts; see section 10.7.3 for the whole story</em>
1080 <item>Included a new section 10.9.1 describing the use of
1081 dpkg-statoverride; this does not have the weight of policy
1084 <item>Clarify Standards-Version: you don't need to rebuild your
1085 packages just to change the Standards-Version!
1088 <item>Plugins are no longer bound by all the rules of shared
1091 <tag>X Windows related things:</tag>
1094 <item>Clarification of priority levels of X Window System related
1098 <item>Rules for defining x-terminal-emulator improved </item>
1100 <item>X Font policy rewritten: you must read this if you provide
1101 fonts for the X Window System
1104 <item>Packages must not ship <file>/usr/X11R6/lib/X11/app-defaults/</file>
1107 <item>X-related packages should usually use the regular FHS
1108 locations; imake-using packages are exempted from this
1111 <item>OpenMotif linked binaries have the same rules as
1112 OSF/Motif-linked ones
1117 <sect id="3.5.4.0"> Version 3.5.4.0
1118 <p> Released Apr 2001.
1122 <item>The system-wide mail directory is now /var/mail, no longer
1123 /var/spool/mail. Any packages accessing the mail spool should
1124 access it via /var/mail and include a suitable Depends field;
1127 <tag>11.9; perl-policy</tag>
1128 <item>The perl policy is now part of Debian policy
1129 proper. Perl programs and modules should follow the current Perl
1134 <sect id="3.5.3.0"> Version 3.5.3.0
1135 <p> Released Apr 2001
1139 <item>Build-Depends arch syntax has been changed to be less
1140 ambiguous. This should not affect any current packages
1143 <item>Examples and templates files for use by scripts should now live
1144 in <file>/usr/share/<package></file> or
1145 <file>/usr/lib/<package></file>, with symbolic links from
1146 <file>/usr/share/doc/<package>/examples</file> as needed
1150 <sect id="3.5.2.0"> Version 3.5.2.0
1152 <p> Released Feb 2001.
1156 <item>X app-defaults directory has moved from
1157 <file>/usr/X11R6/lib/X11/app-defaults</file> to
1158 <file>/etc/X11/app-defaults</file>
1162 <sect id="3.5.1.0"> Version 3.5.1.0
1164 <p> Released Feb 2001.
1168 <item>dpkg-shlibdeps now uses objdump, so shared libraries have to be
1169 run through dpkg-shlibdeps as well as executables
1173 <sect id="3.5.0.0"> Version 3.5.0.0
1175 <p> Released Jan 2001.
1179 <item>Font packages for the X Window System must now declare a
1180 dependency on xutils (>= 4.0.2)
1184 <sect id="3.2.1.1"> Version 3.2.1.1
1186 <p> Released Jan 2001.
1190 <item>Daemon startup scripts in <file>/etc/init.d/</file> should not contain
1191 modifiable parameters; these should be moved to a file in
1192 <file>/etc/default/</file>
1195 <item>Files in <file>/usr/share/doc</file> must not be referenced by any
1196 program. If such files are needed, they must be placed in
1197 <file>/usr/share/<package>/</file>, and symbolic links
1198 created as required in <file>/usr/share/doc/<package>/</file>
1201 <item>Much of the packaging manual has now been imported into the
1206 <sect id="3.2.1.0"> Version 3.2.1.0
1208 <p> Released Aug 00.
1212 <item>A package of priority standard or higher may provide two
1213 binaries, one compiled with support for the X Window System,
1214 and the other without
1218 <sect id="3.2.0.0"> Version 3.2.0.0
1220 <p> Released Aug 00.
1224 <item>By default executables should not be built with the debugging
1225 option -g. Instead, it is recommended to support building the
1226 package with debugging information optionally. Details in
1229 <item>Policy for packages where the upstream uses HTML changelog
1230 files has been expanded. In short, a plain text changelog file
1231 should always be generated for the upstream changes
1234 <item>Please note that the new release of the X window system (3.2)
1235 shall probably need sweeping changes in policy
1238 <item>Policy for packages providing the following X-based features
1242 <item>X server (virtual package xserver) </item>
1244 <item>X terminal emulator (virtual package x-terminal-emulator) </item>
1246 <item>X window manager (virtual package x-window-manager, and
1247 <file>/usr/bin/x-window-manager</file> alternative, with priority
1248 calculation guidelines)
1251 <item>X fonts (this section has been written from scratch) </item>
1253 <item>X application defaults </item>
1257 <item>Policy for packages using the X Window System and FHS issues
1261 <item>No package may contain or make hard links to conffiles </item>
1263 <item>Noted that newer dpkg versions do not require extreme care in
1264 always creating the shared lib before the symlink, so the unpack
1269 <sect id="3.1.1.0"> Version 3.1.1.0
1271 <p> Released Nov 1999.
1275 <item>Correction to semantics of architecture lists in Build-Depends
1276 etc. Should not affect many packages
1280 <sect id="3.1.0.0"> Version 3.1.0.0
1282 <p> Released Oct 1999.
1286 <item><file>/usr/doc/<package></file> has to be a symlink pointing to
1287 <file>/usr/share/doc/<package></file>, to be maintained by postinst
1291 <item>Introduced source dependencies (Build-Depends, etc.) </item>
1293 <item><file>/etc/rc.boot</file> has been deprecated in favour of
1294 <file>/etc/rcS.d</file>. (Packages should not be touching this directory,
1295 but should use update-rc.d instead)
1298 <item>update-rc.d is now the <em>only</em> allowable way of accessing the
1299 <file>/etc/rc?.d/[SK]??*</file> links. Any scripts which manipulate them
1300 directly must be changed to use update-rc.d instead. (This is
1301 because the file-rc package handles this information in an
1305 <item>Architecture-specific examples go in
1306 <file>/usr/lib/<package>/examples</file>
1307 with symlinks from <file>/usr/share/doc/<package>/examples/*</file>
1308 or from <file>/usr/share/doc/<package>/examples</file> itself
1311 <item>Updated FHS to a 2.1 draft; this reverts <file>/var/state</file> to
1312 <file>/var/lib</file>
1314 <tag>9.7; mime-policy</tag>
1315 <item>Added MIME sub-policy document </item>
1317 <item>VISUAL is allowed as a (higher priority) alternative to EDITOR
1320 <item>Modified liblockfile description, which affects
1321 mailbox-accessing programs. Please see the policy document for
1325 <item>If a package provides a changelog in HTML format, a text-only
1326 version should also be included. (Such a version may be prepared
1327 using <prgn>lynx -dump -nolist</prgn>.)
1330 <item>Description of how to handle version numbers based on dates
1335 <sect id="3.0.1.0"> Version 3.0.1.0
1337 <p> Released Jul 1999.
1341 <item>Added the clarification that the .la files are essential for
1342 the packages using libtool's libltdl library, in which case the .la
1343 files must go in the run-time library package
1347 <sect id="3.0.0.0"> Version 3.0.0.0
1349 <p> Released Jun 1999.
1353 <item>Debian formally moves from the FSSTND to the FHS. This is a
1354 major change, and the implications of this move are probably
1358 <item>Only 3 digits of the Standards version need be included in
1359 control files, though all four digits are still permitted.
1362 <item>The location of the GPL has changed to
1363 <file>/usr/share/common-licenses</file>. This may require changing the
1364 copyright files to point to the correct location of the GPL and
1365 other major licenses
1368 <item>Packages that use libtool to create shared libraries must
1369 include the .la files in the -dev packages
1372 <item>Use logrotate to rotate log files
1375 <item>section 5.8 has been rewritten (Programs for the X Window
1378 <tag>9.6; menu-policy</tag>
1379 <item>There is now an associated menu policy, in a separate document,
1380 that carries the full weight of Debian policy
1383 <item>Programs which need to modify the files <file>/var/run/utmp</file>,
1384 <file>/var/log/wtmp</file> and <file>/var/log/lastlog</file> must be
1385 installed setgid utmp
1389 Please note that section numbers below this point may not be up to date
1392 <sect id="2.5.0.0"> Version 2.5.0.0
1394 <p> Released Oct 1998.
1398 <item>Rearranged the manual to create a new Section 4, Files
1400 <item>Section 3.3 ("Files") was moved to Section 4. The Sections
1401 that were Section 4 and Section 5 were moved down to become
1402 Section 5 and Section 6.
1404 <item>What was Section 5.5 ("Log files") is now a subsection of the
1405 new Section 4 ("Files"), becoming section 4.8, placed after
1406 "Configuration files", moving the Section 4.8 ("Permissions
1407 and owners") to Section 4.9. All subsections of the old
1408 Section 5 after 5.5 were moved down to fill in the number
1412 <item>Modified the section about changelog files to accommodate
1413 upstream changelogs which were formatted as HTML. These
1414 upstream changelog files should now be accessible as
1415 <file>/usr/doc/package/changelog.html.gz</file>
1417 <item>Symlinks are permissible to link the real, or upstream,
1418 changelog name to the Debian mandated name.
1420 <item>Clarified that HTML documentation should be present in some
1421 package, though not necessarily the main binary package.
1423 <item>Corrected all references to the location of the copyright
1424 files. The correct location is <file>/usr/doc/package/copyright</file>
1426 <item>Ratified the architecture specification strings to cater to the
1431 <sect id="2.4.1.0"> Version 2.4.1.0
1433 <p> Released Apr 1998.
1435 <sect1> Policy Manual:
1437 <tag>Updated section 3.3.5 Symbolic links:</tag>
1438 <item>symbolic links within a toplevel directory should be relative,
1439 symbolic links between toplevel directories should be absolute
1440 (cf., Policy Weekly Issue#6, topic 2)
1443 <tag>Updated section 4.9 Games:</tag>
1444 <item>manpages for games should be installed in <file>/usr/man/man6</file>
1445 (cf., Policy Weekly Issue#6, topic 3)
1449 <sect1> Packaging Manual:
1451 <item>Updated prefix of chapter 12, Shared Libraries:
1452 ldconfig must be called in the postinst script if the package
1453 installs shared libraries
1454 (cf., Policy Weekly Issue #6, fixes:bug#20515)
1458 <sect id="2.4.0.0"> Version 2.4.0.0
1460 <p> Released Jan 1998
1463 <tag>Updated section 3.3.4 Scripts:</tag>
1465 <item>/bin/sh may be any POSIX compatible shell
1466 <item>scripts including bashisms have to specify <file>/bin/bash</file>
1468 <item>scripts which create files in world-writable directories
1469 (e.g., in <file>/tmp</file>) should use tempfile or mktemp for creating
1473 <tag>Updated section 3.3.5 Symbolic Links:</tag>
1474 <item>symbolic links referencing compressed files must have the same
1475 file extension as the referenced file
1478 <tag>Updated section 3.3.6 Device files:</tag>
1479 <item><file>/dev/tty*</file> serial devices should be used instead of
1480 <file>/dev/cu*</file>
1483 <tag>Updated section 3.4.2 Writing the scripts in <file>/etc/init.d</file>:
1485 <item>all <file>/etc/init.d</file> scripts have to provide the following
1486 options: start, stop, restart, force-reload
1487 <item>the reload option is optional and must never stop and restart
1491 <tag>Updated section 3.5 Cron jobs:
1492 <item>cron jobs that need to be executed more often than daily should
1493 be installed into <file>/etc/cron.d</file>
1496 <tag>Updated section 3.7 Menus:
1497 <item>removed section about how to register HTML docs to `menu'
1498 (the corresponding section in 4.4, Web servers and applications,
1499 has been removed in policy 2.2.0.0 already, so this one was
1503 <tag>New section 3.8 Keyboard configuration:
1504 <item>details about how the backspace and delete keys should be
1508 <tag>New section 3.9 Environment variables:
1509 <item>no program must depend on environment variables to get a
1510 reasonable default configuration
1513 <tag>New section 4.6 News system configuration:
1514 <item><file>/etc/news/organization</file> and <file>/etc/news/server</file>
1515 should be supported by all news servers and clients
1518 <tag>Updated section 4.7 Programs for the X Window System:
1520 <item>programs requiring a non-free Motif library should be provided
1521 as foo-smotif and foo-dmotif package
1523 <item>if lesstif works reliably for such program, it should be linked
1524 against lesstif and not against a non-free Motif library
1528 <tag>Updated section 4.9 Games:
1529 <item>games for X Windows have to be installed in <file>/usr/games</file>,
1534 <sect id="2.3.0.0"> Version 2.3.0.1, 2.3.0.0
1536 <p> Released Sep 1997.
1539 <item>new section `4.2 Daemons' including rules for
1540 <file>/etc/services</file>, <file>/etc/protocols</file>,
1541 <file>/etc/rpc</file>, and <file>/etc/inetd.conf</file>
1544 <item>updated section about `Configuration files':
1545 packages may not touch other packages' configuration files
1548 <item>MUAs and MTAs have to use liblockfile</item>
1551 <sect id="2.2.0.0"> Version 2.2.0.0
1553 <p> Released July 1997.
1556 <item>added section 4.1 `Architecture specification strings':
1559 where <arch> is one of the following:
1560 i386, alpha, arm, m68k, powerpc, sparc.
1563 <item>detailed rules for <file>/usr/local</file></item>
1565 <item>user ID's</item>
1567 <item>editor/pager policy</item>
1569 <item>cron jobs</item>
1571 <item>device files</item>
1573 <item>don't install shared libraries as executable</item>
1575 <item>app-defaults files may not be conffiles</item>
1578 <sect id="2.1.3.0"> Version 2.1.3.2, 2.1.3.1, 2.1.3.0
1580 <p> Released Mar 1997.
1583 <item>two programs with different functionality must not have the
1586 <item>"Webstandard 3.0"</item>
1588 <item>"Standard for Console Messages"</item>
1590 <item>Libraries should be compiled with `-D_REENTRANT'</item>
1592 <item>Libraries should be stripped with <prgn>strip --strip-unneeded</prgn>
1596 <sect id="2.1.2.0"> Version 2.1.2.2, 2.1.2.1, 2.1.2.0
1598 <p> Released Nov 1996.
1601 <item>Some changes WRT shared libraries
1604 <sect id="2.1.1.0"> Version 2.1.1.0
1606 <p> Released Sep 1996.
1609 <item>No hard links in source packages</item>
1611 <item>Do not use <prgn>dpkg-divert</prgn> or <prgn>update-alternatives</prgn>
1612 without consultation </item>
1614 <item>Shared libraries must be installed stripped </item>
1617 <sect id="2.1.0.0"> Version 2.1.0.0
1619 <p> Released Aug 1996.
1622 <item>Upstream changelog must be installed too </item>