1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
4 <!-- -*- Mode: Sgml -*-
8 <title>Policy checklist for upgrading your packages</title>
12 <h1>Policy checklist for upgrading your packages</h1>
14 <h2>About the checklist</h2>
17 The checklist below has been created to simplify the upgrading process
18 of old packages. Note that this list is not `official'; it simply
19 gives an indication of what has changed and whether you are likely to
20 need to make changes to your package in light of this. If you have
21 doubts about a certain topic, if you need more details, or if you
22 think some other package does not comply with policy, please refer to
23 the Policy Manual itself. All of the changes from version 3.0.0
24 onwards indicate which section of the Policy Manual discusses the
25 issue: [3.4] means section 3.4. The section numbering changed when
26 the packaging manual was incorporated into policy; the section numbers
27 used below refer to the current version.
31 Here is how the check list works: Check which policy version your
32 package complies with currently (indicated in the "Standards-Version"
33 field of the source package). Then move upwards until the top and
34 check which of the items on the list might concern your package. Note
35 which sections of policy discuss this, and then check out the Policy
36 Manual for details. If you are upgrading from Policy version < 2.5.0,
37 it may be easier to check through the whole of policy instead of
38 picking your way through this list.
41 <h2>The checklist</h2>
46 * Care should be taken when adding functionality to essential and
47 such additions create an obligation to support that functionality
48 in essential forever unless significant work is done. [3.8]
49 * Changelog files must be encoded in UTF-8. [4.4]
50 * Tighten some format requirements for changelog files from a should
52 * Remove alternative changelog formats. Debian only supports one
53 changelog format for the Debian Archive. [4.4.1]
54 * New nocheck option for DEB_BUILD_OPTIONS indicating any build-time
55 test suite provided by the package should not be run. [4.9.1]
56 * All control files must be encoded in UTF-8. [5.1]
57 * debian/control allows comment lines starting with # with no
58 preceding whitespace. [5.2]
59 * Init scripts ending in .sh are not handled specially. They are not
60 sourced and are not guaranteed to be run by /bin/sh regardless of
61 the #! line. This brings Policy in line with the long-standing
62 behavior of the init system in Debian. [9.3]
63 * The start action of an init script must exit successfully and not
64 start the daemon again if it's already running. [9.3.2]
65 * /var/run and /var/lock may be mounted as temporary filesystems, and
66 init scripts must therefore create any necessary subdirectories
68 * /bin/sh scripts may assume that local can take multiple variable
69 arguments and supports assignment. [10.4]
70 * User mailboxes may be mode 600 and owned by the user rather than
71 mode 660, owned by user, and group mail. [11.6]
75 * The base section has been removed. contrib and non-free have been
76 removed from the section list; they are only categories. The base
77 system is now defined by priority. [2.4, 3.7]
78 * If dpkg-source -x doesn't provide the source that will be compiled,
79 a debian/rules patch target is recommended and should do whatever
80 else is necessary. [4.9]
81 * Standardized the format of DEB_BUILD_OPTIONS. Specified permitted
82 characters for tags, required that tags be whitespace-separated,
83 allowed packages to assume non-conflicting tags, and required
84 unknown flags be ignored. [4.9.1, 10.1]
85 * Added parallel=n to the standardized DEB_BUILD_OPTIONS tags,
86 indicating that a package should be built using up to n parallel
87 processes if the package supports it [4.9.1]
88 * Debian packages should not use convenience copies of code from other
89 packages unless the included package is explicitly intended to be
91 * If dpkg-source -x doesn't produce source ready for editing and
92 building with dpkg-buildpackage, packages should include a
93 debian/README.source file explaining how to generate the patched
94 source, add a new modification, and remove an existing
95 modification. This file may also be used to document packaging a
96 new upstream release and any other complexity of the Debian build
98 * The Uploaders field in debian/control may be wrapped. [5.6.3]
99 * An empty Debian revision is equivalent to a Debian revision of 0 in
100 a version number. [5.6.12]
101 * New Homepage field for upstream web sites. [5.6.23]
102 * The Breaks field declares that this package breaks another and
103 prevents installation of the breaking package unless the package
104 named in Breaks is deconfigured first. This field should not be
105 used until the dpkg in Debian stable supports it. [6.5, 6.6, 7]
106 * Clarify which files should go into a shared library package, into a
107 separate package, or into the -dev package. Suggest -tools instead
108 of -runtime for runtime support programs, since that naming is more
109 common in Debian. [8.1, 8.2]
110 * Files in /etc/cron.{hourly,daily,weekly,monthly} must be
111 configuration files (upgraded from should). Mention the hourly
113 * Packages providing /etc/X11/Xresources files need not conflict with
114 xbase (<< 3.3.2.3a-2), which is long-obsolete. [11.8.6]
115 * Manual pages in locale-specific directories should use either the
116 legacy encoding for that directory or UTF-8. Country names should
117 not be included in locale-specific manual page directories unless
118 indicating a significant difference in the language. All
119 characters in the manual page source should be representable in the
120 legacy encoding for a locale even if the man page is encoded in
122 * The Apache 2.0 license is now in common-licenses and should be
123 referenced rather than quoted in debian/copyright. [12.5]
124 * Packages in contrib and non-free should state in the copyright file
125 that the package is not part of Debian GNU/Linux and briefly
127 * Underscore (_) is allowed in debconf template names. [debconf]
131 * Package version numbers may contain tildes, which sort before
132 anything, even the end of a part. [5.6.12]
133 * Scripts may assume that /bin/sh supports local (at a basic level)
134 and that its test builtin (if any) supports -a and -o binary
135 logical operators. [10.4]
136 * The substitution variable ${binary:Version} should be used in place
137 of ${Source-Version} for dependencies between packages of the same
139 * Substantial reorganization and renaming of sections in the Debian
140 menu structure. Packages with menu entries should be reviewed to
141 see if the menu section has been renamed or if one of the new
142 sections would be more appropriate. [menu policy]
143 * The Source field in a .changes file may contain a version number
144 in parentheses. [5.6.1]
145 * The acceptable values for the Urgency field are low, medium, high,
146 critical, or emergency. [5.6.17]
147 * The shlibs file now allows an optional type field, indicating the
148 type of package for which the line is valid. The only currently
149 supported type is udeb, used with packages for the Debian
151 * Packages following the Debian Configuration management
152 specification must allow for translation of their messages by using
153 a gettext-based system such as po-debconf. [3.9.1]
154 * GFDL 1.2, GPL 3, and LGPL 3 are now in common-licenses and should
155 be referenced rather than quoted in debian/copyright. [12.5]
159 * Maintainer scripts must not be world writeable (up from a
160 should to a must) [6.1]
164 * Revert the cgi-lib change. [11.5]
168 * It is now possible to create shared libraries without
169 relocatable code (using -fPIC) in certain exceptional cases,
170 provided some procedures are followed, and for creating static
171 libraries with relocatable code (again, using -fPIC).
172 Discussion on debian-devel@lists.debian.org, getting a rough
173 consensus, and documenting it in README.Debian constitute most
174 of the process. [10.2]
175 * Packages should install any relevant files into the directories
176 /usr/include/X11/and /usr/lib/X11/, but if they do so, they
177 must pre-depend on x11-common (>= 1:7.0.0) [11.8.7]
181 * Packages shipping web server CGI files are expected to install
182 them in /usr/lib/cgi-lib/ directories. This location change
183 perhaps should be documented in NEWS [11.5]
184 * Web server packages should include a standard scriptAlias of
185 cgi-lib to /usr/lib/cgi-lib. [11.5]
186 * The version of FHS mandated by policy has been upped to
187 2.3. There should be no changes required for most packages,
188 though new top level directories /media, /srv, etc may be of
190 * All fields, apart from the Uploaders field, in the control file
191 are supposed to be a single logical line, which may be spread
192 over multiple physical lines (newline followed by space is
193 elided). However, any parser for the control file must allow
194 the Uploaders field to be spread over multiple physical lines
195 as well, to prepare for future changes. [ 5.1, 5.6.3 ]
196 * When scripts are installed into a directory in the system
197 PATH, the script name should not include an extension that
198 denotes the scripting language currently used to implement it.
200 * packages that invoke initscripts now must use invoke-rc.d to do
201 so since it also pays attention to run levels and other local
202 constraints. [ 9.3.3.2 ]
203 * We no longer use /usr/X11R6, since we have migrated away to
204 using Xorg paths. This means, for one thing, fonts live in
205 /usr/share/fonts/X11/ now, and /usr/X11R6 is gone.
206 [ 11.8.5.2, 11.8.7, etc]
210 * Recommend doc-base, and not menu, for registering package documentation.
211 * Run time support programs should live in subdirectories of
212 /usr/lib/ or /usr/share, and preferably the shared lib is named
213 the same as the package name (to avoid name collisions). [8.1]
214 * It is recommended that HTTP servers provide an alias /images to
215 allow packages to share image files with the web server [11.5]
219 + Prompting the user should be done using debconf. Non debconf
220 user prompts are now deprecated. [3.10.1]
224 - Restructuring causing shifts in section numbers and bumping of
225 the minor version number:
226 + Many packaging manual appendices that were integrated into policy
227 sections are now empty, and replaced with links to the Policy.
228 In particular, the appendices that included the list of control
229 fields were updated (new fields like Closes, Changed-By were added)
230 and the list of fields for each of control, .changes and .dsc files
231 is now in Policy, and they're marked mandatory, recommended or
232 optional based on the current practice and the behavior of the
233 deb-building tool-chain.
234 + Elimination of needlessly deep section levels, primarily in the
235 chapter Debian Archive, from which two new chapters were split out,
236 Binary packages and Source packages. What remained was reordered
237 properly, that is, some sect1s became sects etc.
238 + Several sections that were redundant, crufty or simply not designed
239 with any sort of vision, were rearranged according to the formula that
240 everything should be either in the same place or properly interlinked.
241 Some things remained split up between different chapters when they
242 talked about different aspects of files: their content, their syntax,
243 and their placement in the file system. In particular, see the new
244 sections about changelog files.
245 - Added Games/Simulation and Apps/Education to menu sub-policy
247 - Debian changelogs should be UTF-8 encoded. [C.2.2]
248 - shared libraries must be linked against all libraries that they
249 use symbols from in the same way that binaries are. [10.2]
250 - build-depends-indep need not be satisfied during clean
255 - packages providing the x-terminal-emulator virtual package
256 ought to ensure that they interpret the command line exactly
257 like xterm does. [11.8.3]
258 - Window managers compliant with the Window Manager Specification
259 Project may add 40 points for ranking in the alternatives [11.8.4]
263 - The section describing the Description: package field once again has
264 full details of the long description format. [3.4.2]
265 - Clarified that if a package has non-build-essential
266 build-dependencies, it should have them listed in the Build-Depends
267 and related fields (i.e. it's not merely optional). [4.2]
268 - When asked to restart a service that isn't already running,
269 the init script should start the service. [9.3.2]
270 - If the purpose of a package is to provide examples, then the
271 example files can be installed into <tt>/usr/share/doc/package</tt>
272 (rather than <tt>/usr/share/doc/package/examples</tt>). [12.6]
276 - It is no longer necessary to keep a log of changes to the upstream
277 sources in the copyright file. Instead, all such changes should be
278 documented in the changelog file. [12.7]
279 - <tt>Build-Depends</tt>, <tt>Build-Conflicts</tt>,
280 <tt>Build-Depends-Indep</tt>, and
281 <tt>Build-Conflicts-Indep</tt> must also be satisfied when the
282 clean target is called. [7.6]
283 - A new Apps/Science menu section is available [menu policy]
284 - debconf specification cleared up, various changes. [debconf
286 - It is no longer recommended to create symlinks from nonexistent
287 manual pages to undocumented(7). Missing manual pages for programs
288 are still a bug. [12.1]
292 - Packages no longer have to ask permission to call MAKEDEV in
293 postinst, merely notifying the user ought to be enough. [10.6]
294 - cryptographic software may now be included in the main
296 - task packages are no longer permitted; tasks are now created by a
297 special Tasks: field in the control file. [3.9]
298 - window managers that support netwm can now add 20 points when
299 they add themselves as an alternative for
300 /usr/bin/x-window-manager [11.8.4]
301 - The default compilation options have now changed, one should
302 provide debugging symbols in all cases, and optionally step
303 back optimization to -O0, depending on the DEB_BUILD_OPTIONS
304 environment variable. [10.1]
305 - Added mention of build-arch, build-indep, etc, in describing
306 the relationships with `Build-Depends', `Build-Conflicts',
307 `Build-Depends-Indep', and `Build-Conflicts-Indep'. May need to
308 review the new rules. [7.6, 4.8]
309 - Changed rules on how, and when, to invoke ldconfig in maintainer
310 scripts. Long rationale. [8]
311 - [Added the last note in 3.5.6 upgrading checklist item regarding
312 build rules, please see below]
316 - Emacs and TeX are no longer mandated by policy to be priority
317 standard packages [2.5]
318 - Programs that access docs need to do so via /usr/share/doc, and
319 not via /usr/doc/ as was the policy previously [11.5]
320 - Putting documentation in /usr/doc versus /usr/share/doc is now
321 a ``serious'' policy violation. [12.3]
322 - For web servers, one should not provide non-local access to the
323 /usr/share/doc hierarchy. If one can't provide access controls for
324 the http://localhost/doc/ directory, then it is preferred that one
325 ask permission to expose that information during the install. [11.5]
326 - There are new rules for build-indep/build-arch targets and
327 there is a new Build-Depend-Indep semantic. [7]
331 - Manpages should not rely on header information to have
332 alternative manpage names available; it should only use
333 symlinks or .so pages to do this [12.1]
334 - [Clarified note in 3.5.3.0 upgrading checklist regarding
335 examples and templates: this refers only to those examples used
336 by scripts; see section 10.7.3 for the whole story]
337 - Included a new section 10.9.1 describing the use of
338 dpkg-statoverride; this does not have the weight of policy
339 - Clarify Standards-Version: you don't need to rebuild your
340 packages just to change the Standards-Version!
341 - Plugins are no longer bound by all the rules of shared
343 - X Windows related things:
344 * Clarification of priority levels of X Window System related
346 * Rules for defining x-terminal-emulator improved [11.8.3]
347 * X Font policy rewritten: you must read this if you provide
348 fonts for the X Window System [11.8.5]
349 * Packages must not ship /usr/X11R6/lib/X11/app-defaults/ [11.8.6]
350 * X-related packages should usually use the regular FHS
351 locations; imake-using packages are exempted from this [11.8.7]
352 * OpenMotif linked binaries have the same rules as
353 OSF/Motif-linked ones [11.8.8]
357 - The system-wide mail directory is now /var/mail, no longer
358 /var/spool/mail. Any packages accessing the mail spool should
359 access it via /var/mail and include a suitable Depends field;
361 - The perl policy is now part of Debian policy proper. Perl
362 programs and modules should follow the current Perl policy
367 - Build-Depends arch syntax has been changed to be less
368 ambiguous. This should not affect any current packages [7.1]
369 - Examples and templates files for use by scripts should now live
370 in /usr/share/<package> or /usr/lib/<package>, with
371 symbolic links from /usr/share/doc/<package>/examples as
376 - X app-defaults directory has moved from
377 /usr/X11R6/lib/X11/app-defaults to /etc/X11/app-defaults [11.8.6]
381 - dpkg-shlibdeps now uses objdump, so shared libraries have to be
382 run through dpkg-shlibdeps as well as executables [8.1]
386 - Font packages for the X Window System must now declare a
387 dependency on xutils (>= 4.0.2) [11.8.5]
391 - Daemon startup scripts in /etc/init.d/ should not contain
392 modifiable parameters; these should be moved to a file in
393 /etc/default/; see [9.3.2] for details
394 - Files in /usr/share/doc must not be referenced by any
395 program. If such files are needed, they must be placed in
396 /usr/share/<package>/, and symbolic links created as required
397 in /usr/share/doc/<package>/ [12.3]
398 - Much of the packaging manual has now been imported into the
403 - A package of priority standard or higher may provide two
404 binaries, one compiled with support for the X Window System,
405 and the other without [11.8.1]
409 - By default executables should not be built with the debugging
410 option -g. Instead, it is recommended to support building the
411 package with debugging information optionally. Details in [10.1]
412 - Policy for packages where the upstream uses HTML changelog
413 files has been expanded. In short, a plain text changelog file
414 should always be generated for the upstream changes [12.8]
415 - Please note that the new release of the X window system (3.2)
416 shall probably need sweeping changes in policy
417 - Policy for packages providing the following X-based features
419 - X server (virtual package xserver) [11.8.2]
420 - X terminal emulator (virtual package x-terminal-emulator) [11.8.3]
421 - X window manager (virtual package x-window-manager, and
422 /usr/bin/x-window-manager alternative, with priority
423 calculation guidelines) [11.8.4]
424 - X fonts (this section has been written from scratch) [12.8.5]
425 - X application defaults [11.8.6]
426 - Policy for packages using the X Window System and FHS issues
427 has been clarified; see [11.8.7]
428 - No package may contain or make hard links to conffiles [11.7.3]
429 - Noted that newer dpkg versions do not require extreme care in
430 always creating the shared lib before the symlink, so the unpack
435 - Correction to semantics of architecture lists in Build-Depends
436 etc. Should not affect many packages [7.1]
440 - /usr/doc/<package> has to be a symlink pointing to
441 /usr/share/doc/<package>, to be maintained by postinst
442 and prerm scripts. Details are in [defunct]
443 - Introduced source dependencies (Build-Depends, etc.) [7.1, 7.6]
444 - /etc/rc.boot has been deprecated in favour of /etc/rcS.d.
445 (Packages should not be touching this directory, but should use
446 update-rc.d instead) [9.3.4]
447 - update-rc.d is now the *only* allowable way of accessing the
448 /etc/rc?.d/[SK]??* links. Any scripts which manipulate them
449 directly must be changed to use update-rc.d instead. (This is
450 because the file-rc package handles this information in an
451 incompatible way.) [9.3.3]
452 - Architecture-specific examples go in /usr/lib/<package>/examples
453 with symlinks from /usr/share/doc/<package>/examples/* or from
454 /usr/share/doc/<package>/examples itself [12.7]
455 - Updated FHS to a 2.1 draft; this reverts /var/state to
457 - Added MIME sub-policy document [9.7; mime-policy]
458 - VISUAL is allowed as a (higher priority) alternative to EDITOR [12.4]
459 - Modified liblockfile description, which affects
460 mailbox-accessing programs. Please see the policy document for
462 - If a package provides a changelog in HTML format, a text-only
463 version should also be included. (Such a version may be prepared
464 using lynx -dump -nolist.) [12.7]
465 - Description of how to handle version numbers based on dates
470 - Added the clarification that the .la files are essential for the
471 packages using libtool's libltdl library, in which case the
472 .la files must go in the run-time library package [10.2]
476 - Debian formally moves from the FSSTND to the FHS. This is a
477 major change, and the implications of this move are probably
479 - Only 3 digits of the Standards version need be included in
480 control files, though all four digits are still permitted. [4.1]
481 - The location of the GPL has changed to
482 /usr/share/common-licenses. This may require changing the
483 copyright files to point to the correct location of the GPL and
484 other major licenses [12.6]
485 - Packages that use libtool to create shared libraries must
486 include the .la files in the -dev packages [10.2]
487 - Use logrotate to rotate log files [10.8]
488 - section 5.8 has been rewritten (Programs for the X Window
490 - There is now an associated menu policy, in a separate document,
491 that carries the full weight of Debian policy [9.6; menu-policy]
492 - Programs which need to modify the files /var/run/utmp,
493 /var/log/wtmp and /var/log/lastlog must be installed setgid utmp [11.3]
496 ** Please note that section numbers below this point may not be up to date **
502 - Rearranged the manual to create a new Section 4, Files
503 + Section 3.3 ("Files") was moved to Section 4. The Sections
504 that were Section 4 and Section 5 were moved down to become
505 Section 5 and Section 6.
506 + What was Section 5.5 ("Log files") is now a subsection of the
507 new Section 4 ("Files"), becoming section 4.8, placed after
508 "Configuration files", moving the Section 4.8 ("Permissions
509 and owners") to Section 4.9. All subsections of the old
510 Section 5 after 5.5 were moved down to fill in the number
512 - Modified the section about changelog files to accommodate
513 upstream changelogs which were formatted as HTML/ These
514 upstream changelog files should now be accessible as
515 /usr/doc/package/changelog.html.gz
516 + Symlinks are permissible to link the real, or upstream,
517 changelog name to the Debian mandated name.
518 - Clarified that HTML documentation should be present in some
519 package, though not necessarily the main binary package.
520 - Corrected all references to the location of the copyright
521 files. The correct location is /usr/doc/package/copyright
522 - Ratified the architecture specification strings to cater to the
528 - Updated section 3.3.5 Symbolic links:
529 + symbolic links within a toplevel directory should be relative,
530 symbolic links between toplevel directories should be absolute
531 (cf., Policy Weekly Issue#6, topic 2)
533 - Updated section 4.9 Games:
534 + manpages for games should be installed in /usr/man/man6
535 (cf., Policy Weekly Issue#6, topic 3)
538 - Updated prefix of chapter 12, Shared Libraries:
539 ldconfig must be called in the postinst script if the package
540 installs shared libraries
541 (cf., Policy Weekly Issue #6, fixes:bug#20515)
545 - Updated section 3.3.4 Scripts:
546 + /bin/sh may be any POSIX compatible shell
547 + scripts including bashisms have to specify /bin/bash as
549 + scripts which create files in world-writable directories
550 (e.g., in /tmp) should use tempfile or mktemp for creating
553 - Updated section 3.3.5 Symbolic Links:
554 + symbolic links referencing compressed files must have the same
555 file extension as the referenced file
557 - Updated section 3.3.6 Device files:
558 + /dev/tty* serial devices should be used instead of /dev/cu*
560 - Updated section 3.4.2 Writing the scripts [in /etc/init.d]:
561 + all /etc/init.d scripts have to provide the following options:
562 start, stop, restart, force-reload
563 + the reload option is optional and must never stop and restart
566 - Updated section 3.5 Cron jobs:
567 + cron jobs that need to be executed more often than daily should
568 be installed into /etc/cron.d
570 - Updated section 3.7 Menus:
571 + removed section about how to register HTML docs to `menu'
572 (the corresponding section in 4.4, Web servers and applications,
573 has been removed in policy 2.2.0.0 already, so this one was
576 - New section 3.8 Keyboard configuration:
577 + details about how the backspace and delete keys should be
580 - New section 3.9 Environment variables:
581 + no program must depend on environment variables to get a
582 reasonable default configuration
584 - New section 4.6 News system configuration:
585 + /etc/news/organization and /etc/news/server should be supported
586 by all news servers and clients
588 - Updated section 4.7 Programs for the X Window System:
589 + programs requiring a non-free Motif library should be provided
590 as foo-smotif and foo-dmotif package
591 + if lesstif works reliably for such program, it should be linked
592 against lesstif and not against a non-free Motif library
594 - Updated section 4.9 Games:
595 + games for X Windows have to be installed in /usr/games, just as
598 2.3.0.1, 2.3.0.0 Sep 1997
600 * new section `4.2 Daemons' including rules for
601 /etc/services, /etc/protocols, /etc/rpc, and /etc/inetd.conf
603 * updated section about `Configuration files':
604 packages may not touch other packages' configuration files
606 * MUAs and MTAs have to use liblockfile
610 * added section 4.1 `Architecture specification strings':
613 where <arch> is one of the following:
614 i386, alpha, arm, m68k, powerpc, sparc.
616 * detailed rules for /usr/local
620 * editor/pager policy
626 * don't install shared libraries as executable
628 * app-defaults files may not be conffiles
630 2.1.3.2, 2.1.3.1, 2.1.3.0 Mar 1997
632 * two programs with different functionality must not have the
637 * "Standard for Console Messages"
639 * Libraries should be compiled with `-D_REENTRANT'
641 * Libraries should be stripped with "strip --strip-unneeded"
643 2.1.2.2, 2.1.2.1, 2.1.2.0 Nov 1996
645 * Some changes WRT shared libraries
649 * No hard links in source packages
651 * Do not use dpkg-divert or update-alternatives without consultation
653 * Shared libraries must be installed stripped
657 * Upstream changelog must be installed too
665 <!-- Keep this comment at the end of the file
669 sgml-live-element-indicator: t