{
    "mode": "info",
    "parameter": "de",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/de/json",
    "generated": "2026-07-30T12:05:51Z",
    "sections": {
        "File: debian-policy.info,  Node: Top,  Next: About this manual,  Up: (dir)": {
            "content": "",
            "subsections": []
        },
        "Debian Policy Manual": {
            "content": "Debian Policy Manual 4.6.0.1, Aug 18, 2021\n\nThe Debian Policy Mailing List\n\nCopyright (C) 2021, 1997, 1998 Ian Jackson, Christian Schwarz,\n1998-2017, The Debian Policy Mailing List\n",
            "subsections": []
        },
        "This manual describes the policy requirements for the Debian": {
            "content": "distribution.  This includes the structure and contents of the Debian\narchive and several design issues of the operating system, as well as\ntechnical requirements that each package must satisfy to be included in\nthe distribution.\n",
            "subsections": []
        },
        "About this manual": {
            "content": "* Scope::\n* New versions of this document::\n* Authors and Maintainers::\n* Related documents::\n* Definitions::\n* Translations::\n",
            "subsections": []
        },
        "Authors and Maintainers": {
            "content": "* Early history::\n* Current process::\n* Improvements::\n",
            "subsections": []
        },
        "The Debian Archive": {
            "content": "* The Debian Free Software Guidelines::\n* Archive areas::\n* Copyright considerations::\n* Sections::\n* Priorities::\n",
            "subsections": []
        },
        "Archive areas": {
            "content": "* The main archive area::\n* The contrib archive area::\n* The non-free archive area::\n",
            "subsections": []
        },
        "Binary packages": {
            "content": "* The package name::\n* The version of a package::\n* The maintainer of a package::\n* The description of a package::\n* Dependencies::\n* Virtual packages::\n* Base system::\n* Essential packages::\n* Maintainer Scripts::\n",
            "subsections": []
        },
        "The package name": {
            "content": "* Packages with potentially offensive content::\n",
            "subsections": []
        },
        "The version of a package": {
            "content": "* Version numbers based on dates::\n* Uniqueness of version numbers::\n",
            "subsections": []
        },
        "The description of a package": {
            "content": "* The single line synopsis::\n* The extended description::\n",
            "subsections": []
        },
        "Maintainer Scripts": {
            "content": "* Prompting in maintainer scripts::\n",
            "subsections": []
        },
        "Source packages": {
            "content": "* Standards conformance::\n* Package relationships::\n* Changes to the upstream sources::\n* Debian changelog; debian/changelog: Debian changelog debian/changelog.\n* Copyright; debian/copyright: Copyright debian/copyright.\n* Error trapping in makefiles::\n* Time Stamps::\n* Restrictions on objects in source packages::\n* Main building script; debian/rules: Main building script debian/rules.\n* Variable substitutions; debian/substvars: Variable substitutions debian/substvars.\n* Upstream source location; debian/watch: Upstream source location debian/watch.\n* Generated files list; debian/files: Generated files list debian/files.\n* Embedded code copies::\n* Source package handling; debian/README.source: Source package handling debian/README source.\n* Reproducibility::\n* Missing sources; debian/missing-sources: Missing sources debian/missing-sources.\n* Vendor-specific patch series::\n",
            "subsections": []
        },
        "Main building script: debian/rules": {
            "content": "* debian/rules and DEBBUILDOPTIONS::\n* debian/rules and Rules-Requires-Root::\n",
            "subsections": []
        },
        "Control files and their fields": {
            "content": "* Syntax of control files::\n* Source package control files - debian/control::\n* Binary package control files - DEBIAN/control::\n* Debian source control files - .dsc: Debian source control files - dsc.\n* Debian changes files - .changes: Debian changes files - changes.\n* List of fields::\n* User-defined fields::\n* Obsolete fields::\n\nList of fields\n\n* Source::\n* Maintainer::\n* Uploaders::\n* Changed-By::\n* Section::\n* Priority::\n* Package::\n* Architecture::\n* Essential::\n* Package interrelationship fields; Depends, Pre-Depends, Recommends, Suggests, Breaks, Conflicts, Provides, Replaces, Enhances: Package interrelationship fields Depends Pre-Depends Recommends Suggests Breaks Conflicts Provides Replaces Enhances.\n* Standards-Version::\n* Version::\n* Description::\n* Distribution::\n* Date::\n* Format::\n* Urgency::\n* Changes::\n* Binary::\n* Installed-Size::\n* Files::\n* Closes::\n* Homepage::\n* Checksums-Sha1 and Checksums-Sha256::\n* DM-Upload-Allowed::\n* Version Control System (VCS) fields: Version Control System VCS fields.\n* Package-List::\n* Package-Type::\n* Dgit::\n* Testsuite::\n* Rules-Requires-Root::\n",
            "subsections": []
        },
        "Version": {
            "content": "* Epochs should be used sparingly::\n",
            "subsections": []
        },
        "Rules-Requires-Root": {
            "content": "* Remarks::\n* Definition of the keywords::\n* Provided keywords::\n",
            "subsections": []
        },
        "Obsolete fields": {
            "content": "* DM-Upload-Allowed: DM-Upload-Allowed<2>.\n",
            "subsections": []
        },
        "Package maintainer scripts and installation procedure": {
            "content": "* Introduction to package maintainer scripts::\n* Maintainer scripts idempotency::\n* Controlling terminal for maintainer scripts::\n* Exit status::\n* Summary of ways maintainer scripts are called::\n* Details of unpack phase of installation or upgrade::\n* Details of configuration::\n* Details of removal and/or configuration purging::\n",
            "subsections": []
        },
        "Declaring relationships between packages": {
            "content": "* Syntax of relationship fields::\n* Binary Dependencies - Depends, Recommends, Suggests, Enhances, Pre-Depends: Binary Dependencies - Depends Recommends Suggests Enhances Pre-Depends.\n* Packages which break other packages - Breaks::\n* Conflicting binary packages - Conflicts::\n* Virtual packages - Provides::\n* Overwriting files and replacing packages - Replaces::\n* Relationships between source and binary packages - Build-Depends, Build-Depends-Indep, Build-Depends-Arch, Build-Conflicts, Build-Conflicts-Indep, Build-Conflicts-Arch: Relationships between source and binary packages - Build-Depends Build-Depends-Indep Build-Depends-Arch Build-Conflicts Build-Conflicts-Indep Build-Conflicts-Arch.\n* Additional source packages used to build the binary - Built-Using::\n",
            "subsections": []
        },
        "Overwriting files and replacing packages - Replaces": {
            "content": "* Overwriting files in other packages::\n* Replacing whole packages, forcing their removal: Replacing whole packages forcing their removal.\n",
            "subsections": []
        },
        "Shared libraries": {
            "content": "* Run-time shared libraries::\n* Shared library support files::\n* Static libraries::\n* Development files::\n* Dependencies between the packages of the same library::\n* Dependencies between the library and other packages::\n",
            "subsections": []
        },
        "Run-time shared libraries": {
            "content": "* ldconfig::\n",
            "subsections": []
        },
        "Dependencies between the library and other packages": {
            "content": "* Generating dependencies on shared libraries::\n* Shared library ABI changes::\n* The symbols system::\n* The shlibs system::\n",
            "subsections": []
        },
        "The symbols system": {
            "content": "* The symbols files present on the system::\n* The symbols File Format::\n* Providing a symbols file::\n",
            "subsections": []
        },
        "The shlibs system": {
            "content": "* The shlibs files present on the system::\n* The shlibs File Format::\n* Providing a shlibs file::\n",
            "subsections": []
        },
        "The Operating System": {
            "content": "* File system hierarchy::\n* Users and groups::\n* Starting system services::\n* Console messages from init.d scripts: Console messages from init d scripts.\n* Cron jobs::\n* Menus::\n* Multimedia handlers::\n* Keyboard configuration::\n* Environment variables::\n* Registering Documents using doc-base::\n* Alternate init systems::\n* Signaling that a reboot is required::\n",
            "subsections": []
        },
        "File system hierarchy": {
            "content": "* File System Structure::\n* Site-specific programs::\n* The system-wide mail directory::\n* /run and /run/lock::\n",
            "subsections": []
        },
        "Users and groups": {
            "content": "* Introduction::\n* UID and GID classes::\n* Non-existent home directories::\n",
            "subsections": []
        },
        "Starting system services": {
            "content": "* Introduction: Introduction<2>.\n* Writing the scripts::\n* Interfacing with init systems::\n* Boot-time initialization::\n* Example::\n",
            "subsections": []
        },
        "Interfacing with init systems": {
            "content": "* Managing the links::\n* Running init scripts::\n\nCron jobs\n\n* Cron job file names::\n",
            "subsections": []
        },
        "Multimedia handlers": {
            "content": "* Registration of media type handlers with desktop entries::\n* Registration of media type handlers with mailcap entries::\n* Providing media types to files::\n",
            "subsections": []
        },
        "Alternate init systems": {
            "content": "* Event-based boot with upstart::\n",
            "subsections": []
        },
        "Files": {
            "content": "* Binaries::\n* Libraries::\n* Shared libraries: Shared libraries<2>.\n* Scripts::\n* Symbolic links::\n* Device files::\n* Configuration files::\n* Log files::\n* Permissions and owners::\n* File names::\n",
            "subsections": []
        },
        "Configuration files": {
            "content": "* Definitions: Definitions<2>.\n* Location::\n* Behavior::\n* Sharing configuration files::\n* User configuration files (\"dotfiles\"): User configuration files \"dotfiles\".\n",
            "subsections": []
        },
        "Permissions and owners": {
            "content": "* The use of dpkg-statoverride::\n",
            "subsections": []
        },
        "Customized programs": {
            "content": "* Architecture specification strings::\n* Daemons::\n* Using pseudo-ttys and modifying wtmp, utmp and lastlog: Using pseudo-ttys and modifying wtmp utmp and lastlog.\n* Editors and pagers::\n* Web servers and applications::\n* Mail transport, delivery and user agents: Mail transport delivery and user agents.\n* News system configuration::\n* Programs for the X Window System::\n* Perl programs and modules::\n* Emacs lisp programs::\n* Games::\n",
            "subsections": []
        },
        "Architecture specification strings": {
            "content": "* Architecture wildcards::\n",
            "subsections": []
        },
        "Programs for the X Window System": {
            "content": "* Providing X support and package priorities::\n* Packages providing an X server::\n* Packages providing a terminal emulator::\n* Packages providing a window manager::\n* Packages providing fonts::\n* Application defaults files::\n* Installation directory issues::\n",
            "subsections": []
        },
        "Documentation": {
            "content": "* Manual pages::\n* Info documents::\n* Additional documentation::\n* Preferred documentation formats::\n* Copyright information::\n* Examples::\n* Changelog files and release notes::\n",
            "subsections": []
        },
        "Copyright information": {
            "content": "* Machine-readable copyright information::\n",
            "subsections": []
        },
        "Binary packages (from old Packaging Manual)": {
            "content": "* Creating package files - dpkg-deb::\n* Package control information files::\n* The main control information file; control: The main control information file control.\n* Time Stamps: Time Stamps<2>.\n",
            "subsections": []
        },
        "Source packages (from old Packaging Manual)": {
            "content": "* Tools for processing source packages::\n* The Debian package source tree::\n* Source packages as archives::\n* Unpacking a Debian source package without dpkg-source::\n",
            "subsections": []
        },
        "Tools for processing source packages": {
            "content": "* dpkg-source - packs and unpacks Debian source packages::\n* dpkg-buildpackage - overall package-building control script::\n* dpkg-gencontrol - generates binary package control files::\n* dpkg-shlibdeps - calculates shared library dependencies::\n* dpkg-distaddfile - adds a file to debian/files::\n* dpkg-genchanges - generates a .changes upload control file: dpkg-genchanges - generates a changes upload control file.\n* dpkg-parsechangelog - produces parsed representation of a changelog::\n* dpkg-architecture - information about the build and host system::\n",
            "subsections": []
        },
        "The Debian package source tree": {
            "content": "* debian/rules - the main building script::\n* debian/substvars and variable substitutions::\n* debian/files::\n* debian/tmp::\n",
            "subsections": []
        },
        "Unpacking a Debian source package without dpkg-source": {
            "content": "* Restrictions on objects in source packages: Restrictions on objects in source packages<2>.\n",
            "subsections": []
        },
        "Control files and their fields (from old Packaging Manual)": {
            "content": "* Syntax of control files: Syntax of control files<2>.\n* List of fields: List of fields<2>.\n\nList of fields\n\n* Filename and MSDOS-Filename::\n* Size and MD5sum::\n* Status::\n* Config-Version::\n* Conffiles::\n* Obsolete fields: Obsolete fields<2>.\n",
            "subsections": []
        },
        "Configuration file handling (from old Packaging Manual)": {
            "content": "* Automatic handling of configuration files by dpkg::\n* Fully-featured maintainer script configuration handling::\n",
            "subsections": []
        },
        "Debian Policy changes process": {
            "content": "* Introduction: Introduction<3>.\n* Change Goals::\n* Current Process::\n* Other Tags::\n",
            "subsections": []
        },
        "Current Process": {
            "content": "* State A; More information required: State A More information required.\n* State B; Discussion: State B Discussion.\n* State C; Proposal: State C Proposal.\n* State D; Wording proposed: State D Wording proposed.\n* State E; Seconded: State E Seconded.\n* State F; Accepted: State F Accepted.\n* State G; Reject: State G Reject.\n",
            "subsections": []
        },
        "Upgrading checklist": {
            "content": "* About the checklist::\n* Version 4.6.0: Version 4 6 0.\n* Version 4.5.1: Version 4 5 1.\n* Version 4.5.0: Version 4 5 0.\n* Version 4.4.1: Version 4 4 1.\n* Version 4.4.0: Version 4 4 0.\n* Version 4.3.0: Version 4 3 0.\n* Version 4.2.1: Version 4 2 1.\n* Version 4.2.0: Version 4 2 0.\n* Version 4.1.5: Version 4 1 5.\n* Version 4.1.4: Version 4 1 4.\n* Version 4.1.3: Version 4 1 3.\n* Version 4.1.2: Version 4 1 2.\n* Version 4.1.1: Version 4 1 1.\n* Version 4.1.0: Version 4 1 0.\n* Version 4.0.1: Version 4 0 1.\n* Version 4.0.0: Version 4 0 0.\n* Version 3.9.8: Version 3 9 8.\n* Version 3.9.7: Version 3 9 7.\n* Version 3.9.6: Version 3 9 6.\n* Version 3.9.5: Version 3 9 5.\n* Version 3.9.4: Version 3 9 4.\n* Version 3.9.3: Version 3 9 3.\n* Version 3.9.2: Version 3 9 2.\n* Version 3.9.1: Version 3 9 1.\n* Version 3.9.0: Version 3 9 0.\n* Version 3.8.4: Version 3 8 4.\n* Version 3.8.3: Version 3 8 3.\n* Version 3.8.2: Version 3 8 2.\n* Version 3.8.1: Version 3 8 1.\n* Version 3.8.0: Version 3 8 0.\n* Version 3.7.3: Version 3 7 3.\n* Version 3.7.2.2: Version 3 7 2 2.\n* Version 3.7.2: Version 3 7 2.\n* Version 3.7.1: Version 3 7 1.\n* Version 3.7.0: Version 3 7 0.\n* Version 3.6.2: Version 3 6 2.\n* Version 3.6.1: Version 3 6 1.\n* Version 3.6.0: Version 3 6 0.\n* Version 3.5.10: Version 3 5 10.\n* Version 3.5.9: Version 3 5 9.\n* Version 3.5.8: Version 3 5 8.\n* Version 3.5.7: Version 3 5 7.\n* Version 3.5.6: Version 3 5 6.\n* Version 3.5.5: Version 3 5 5.\n* Version 3.5.4: Version 3 5 4.\n* Version 3.5.3: Version 3 5 3.\n* Version 3.5.2: Version 3 5 2.\n* Version 3.5.1: Version 3 5 1.\n* Version 3.5.0: Version 3 5 0.\n* Version 3.2.1.1: Version 3 2 1 1.\n* Version 3.2.1: Version 3 2 1.\n* Version 3.2.0: Version 3 2 0.\n* Version 3.1.1: Version 3 1 1.\n* Version 3.1.0: Version 3 1 0.\n* Version 3.0.1: Version 3 0 1.\n* Version 3.0.0: Version 3 0 0.\n* Version 2.5.0: Version 2 5 0.\n* Version 2.4.1: Version 2 4 1.\n* Version 2.4.0: Version 2 4 0.\n* Version 2.3.0: Version 2 3 0.\n* Version 2.2.0: Version 2 2 0.\n* Version 2.1.3: Version 2 1 3.\n* Version 2.1.2: Version 2 1 2.\n* Version 2.1.1: Version 2 1 1.\n* Version 2.1.0: Version 2 1 0.\n\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: About this manual,  Next: The Debian Archive,  Prev: Top,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "1 About this manual": {
            "content": "* Menu:\n\n* Scope::\n* New versions of this document::\n* Authors and Maintainers::\n* Related documents::\n* Definitions::\n* Translations::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Scope,  Next: New versions of this document,  Up: About this manual": {
            "content": "",
            "subsections": [
                {
                    "name": "1.1 Scope",
                    "content": ""
                }
            ]
        },
        "This manual also describes Debian policy as it relates to creating": {
            "content": "",
            "subsections": []
        },
        "Debian packages.  It is not a tutorial on how to build packages, nor is": {
            "content": "it exhaustive where it comes to describing the behavior of the packaging\nsystem.  Instead, this manual attempts to define the interface to the\npackage management system with which the developers must be conversant.\n(1)\n",
            "subsections": []
        },
        "This manual cannot and does not prohibit every possible bug or": {
            "content": "undesirable behaviour.  The fact that something is not prohibited by",
            "subsections": []
        },
        "Debian policy does not mean that it is not a bug, let alone that it is": {
            "content": "desirable.  Questions not covered by policy should be evaluated on their\nmerits.\n",
            "subsections": []
        },
        "The footnotes present in this manual are merely informative, and are not": {
            "content": "part of Debian policy itself.\n\nThe appendices to this manual are not necessarily normative, either.\nPlease see *note Introduction and scope of these appendices: 6. for more\ninformation.\n",
            "subsections": []
        },
        "In the normative part of this manual, the following terms are used to": {
            "content": "describe the importance of each statement: (2)\n\n* The terms `must' and `must not', and the adjectives `required' and\n`prohibited', denote strong requirements.  Packages that do not\nconform to these requirements will generally not be considered\nacceptable for the Debian distribution.  These statements\ncorrespond to the `critical', `grave', and `serious' bug severities\n(normally serious).  They are collectively called `Policy\nrequirements'.\n\n* The terms `should' and `should not', and the adjective\n`recommended', denote best practices.  Non-conformance with these\nguidelines will generally be considered a bug, but will not\nnecessarily render a package unsuitable for distribution.  These\nstatements correspond to bug severities of `important', `normal',\nand `minor'.  They are collectively called `Policy\nrecommendations'.\n\n* The adjectives `encouraged' and `discouraged' denote places where\nPolicy offers advice to maintainers, but maintainers are free to\nfollow or not follow that advice.  Non-conformance with this advice\nis normally not considered a bug; if a bug seems worthwhile,\nnormally it would have a severity of `wishlist'.  These statements\nare collectively called `Policy advice'.\n\n* The term `may' and the adjective `optional' are used to clarify\ncases where it may otherwise appear that Policy is specifying a\nrequirement or recommendation.  In those cases, these words\ndescribe decisions that are truly optional and at the maintainer's\ndiscretion.\n",
            "subsections": []
        },
        "The Release Team can, at their discretion, downgrade a Policy": {
            "content": "requirement to a Policy recommendation for a given release of the Debian\ndistribution.  This may be done for only a specific package or for the\narchive as a whole.  This provision is intended to provide flexibility\nto balance the quality standards of the distribution against the release\nschedule and the importance of making a stable release.\n",
            "subsections": []
        },
        "Much of the information presented in this manual will be useful even": {
            "content": "when building a package which is to be distributed in some other way or\nis intended for local use only.\n\nudebs (stripped-down binary packages used by the Debian Installer) do\nnot comply with all of the requirements discussed here.  See the Debian\nInstaller internals manual(3) for more information about them.\n\n---------- Footnotes ----------\n\n(1) (1) Informally, the criteria used for inclusion is that the\nmaterial meet one of the following requirements:\n",
            "subsections": []
        },
        "Standard interfaces": {
            "content": "The material presented represents an interface to the packaging\nsystem that is mandated for use, and is used by, a significant\nnumber of packages, and therefore should not be changed without\npeer review.  Package maintainers can then rely on this interface\nnot changing, and the package management software authors need to\nensure compatibility with this interface definition.  (Control file\nand changelog file formats are examples.)\n",
            "subsections": []
        },
        "Chosen Convention": {
            "content": "If there are a number of technically viable choices that can be\nmade, but one needs to select one of these options for\ninter-operability.  The version number format is one example.\n",
            "subsections": []
        },
        "Please note that these are not mutually exclusive; selected conventions": {
            "content": "often become parts of standard interfaces.\n\n(2) (2) Compare RFC 2119.  Note, however, that these words are used\nin a different way in this document.\n\n(3) https://d-i.debian.org/doc/internals/ch03.html\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: New versions of this document,  Next: Authors and Maintainers,  Prev: Scope,  Up: About this manual": {
            "content": "",
            "subsections": [
                {
                    "name": "1.2 New versions of this document",
                    "content": "This manual is distributed via the Debian package debian-policy(1).\n"
                }
            ]
        },
        "The current version of this document is also available from the Debian": {
            "content": "web mirrors at 'https://www.debian.org/doc/debian-policy/'.  Also\navailable from the same directory are several other formats:\npolicy.epub(2), policy.txt(3) and policy.pdf(4).  Included in both the\nsame directory and in the debian-policy package is a standalone copy of\n*note Upgrading checklist: 9, which indicates policy changes between\nversions of this document.\n\n---------- Footnotes ----------\n\n(1) https://packages.debian.org/debian-policy\n\n(2) https://www.debian.org/doc/debian-policy/policy.epub\n\n(3) https://www.debian.org/doc/debian-policy/policy.txt\n\n(4) https://www.debian.org/doc/debian-policy/policy.pdf\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Authors and Maintainers,  Next: Related documents,  Prev: New versions of this document,  Up: About this manual": {
            "content": "",
            "subsections": [
                {
                    "name": "1.3 Authors and Maintainers",
                    "content": "* Menu:\n\n* Early history::\n* Current process::\n* Improvements::\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Early history,  Next: Current process,  Up: Authors and Maintainers": {
            "content": "Originally called \"Debian GNU/Linux Policy Manual\", this manual was\ninitially written in 1996 by Ian Jackson.  It was revised on November\n27th, 1996 by David A. Morris.  Christian Schwarz added new sections on\nMarch 15th, 1997, and reworked/restructured it in April-July 1997.\nChristoph Lameter contributed the \"Web Standard\".  Julian Gilbey largely\nrestructured it in 2001.  Since September 1998, changes to the contents\nof this document have been co-ordinated by means of the debian-policy\nmailing list <debian-policy@lists.debian.org>\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Current process,  Next: Improvements,  Prev: Early history,  Up: Authors and Maintainers": {
            "content": "",
            "subsections": []
        },
        "The Policy Editors are DPL delegates with responsibility for the": {
            "content": "contents of this document (see the Debian Constitution for the meaning\nof \"DPL delegate\").  However, the Policy Editors further delegate their\neditorial power to a process of establishing project member consensus on\nthe debian-policy mailing list, as described in *note Debian Policy\nchanges process: e.  The current Policy Editors are:\n\n1. Russ Allbery\n\n2. Sean Whitton\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Improvements,  Prev: Current process,  Up: Authors and Maintainers": {
            "content": "",
            "subsections": []
        },
        "While the authors of this document have tried hard to avoid typos and": {
            "content": "other errors, these do still occur.  If you discover an error in this\nmanual or if you want to give any comments, suggestions, or criticisms\nplease send an email to the Debian Policy Mailing List,\n<debian-policy@lists.debian.org>, or submit a bug report against the\n'debian-policy' package.\n",
            "subsections": []
        },
        "Please do not try to reach the individual authors or maintainers of the": {
            "content": "Policy Manual regarding changes to the Policy.\n",
            "subsections": []
        },
        "New techniques and functionality are generally implemented in the Debian": {
            "content": "archive (long) before they are detailed in this document.  This is not\nconsidered to be a problem: there is a consensus in the Debian Project\nthat the task of keeping this document up-to-date should never block\nmaking improvements to Debian.  Nevertheless, it is better to submit\npatches to this document sooner rather than later.  This reduces the\namount of work that is needed on the part of others to get themselves\nup-to-speed on new best practices.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Related documents,  Next: Definitions,  Prev: Authors and Maintainers,  Up: About this manual": {
            "content": "",
            "subsections": [
                {
                    "name": "1.4 Related documents",
                    "content": ""
                }
            ]
        },
        "There are several other documents other than this Policy Manual that are": {
            "content": "necessary to fully understand some Debian policies and procedures.\n\nThe external \"sub-policy\" documents are referred to in:\n\n- *note File System Structure: 12.\n\n- *note Virtual packages: 13.\n\n- *note Menus: 14.\n\n- *note Perl programs and modules: 15.\n\n- *note Prompting in maintainer scripts: 16.\n\n- *note Emacs lisp programs: 17.\n",
            "subsections": []
        },
        "In addition to those, which carry the weight of policy, there is the": {
            "content": "",
            "subsections": []
        },
        "Debian Developer's Reference.  This document describes procedures and": {
            "content": "resources for Debian developers, but it is `not' normative; rather, it\nincludes things that don't belong in the Policy, such as best practices\nfor developers.\n",
            "subsections": []
        },
        "The Developer's Reference is available in the developers-reference": {
            "content": "package.  It's also available from the Debian web mirrors at\n'https://www.debian.org/doc/developers-reference/'.\n\nFinally, a *note specification for machine-readable copyright files: 18.\nis maintained as part of the debian-policy package using the same\nprocedure as the other policy documents.  Use of this format is\noptional.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Definitions,  Next: Translations,  Prev: Related documents,  Up: About this manual": {
            "content": "",
            "subsections": [
                {
                    "name": "1.5 Definitions",
                    "content": "The following terms are used in this Policy Manual:\n"
                }
            ]
        },
        "ASCII": {
            "content": "The character encoding specified by ANSI X3.4-1986 and its\npredecessor standards, referred to in MIME as US-ASCII, and\ncorresponding to an encoding in eight bits per character of the\nfirst 128 Unicode(1) characters, with the eighth bit always zero.\n",
            "subsections": []
        },
        "UTF-8": {
            "content": "The transformation format (sometimes called encoding) of Unicode(2)\ndefined by RFC 3629(3).  UTF-8 has the useful property of having\nASCII as a subset, so any text encoded in ASCII is trivially also\nvalid UTF-8.\n\n---------- Footnotes ----------\n\n(1) http://www.unicode.org/\n\n(2) http://www.unicode.org/\n\n(3) https://www.rfc-editor.org/rfc/rfc3629.txt\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Translations,  Prev: Definitions,  Up: About this manual": {
            "content": "",
            "subsections": [
                {
                    "name": "1.6 Translations",
                    "content": ""
                }
            ]
        },
        "When translations of this document into languages other than English": {
            "content": "disagree with the English text, the English text takes precedence.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: The Debian Archive,  Next: Binary packages,  Prev: About this manual,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "2 The Debian Archive": {
            "content": "",
            "subsections": []
        },
        "The Debian system is maintained and distributed as a collection of": {
            "content": "`packages'.  Since there are so many of them (currently well over\n15000), they are split into `sections' and given `priorities' to\nsimplify the handling of them.\n",
            "subsections": []
        },
        "The effort of the Debian project is to build a free operating system,": {
            "content": "but not every package we want to make accessible is `free' in our sense\n(see the Debian Free Software Guidelines, below), or may be\nimported/exported without restrictions.  Thus, the archive is split into\nareas (1) based on their licenses and other restrictions.\n\nThe aims of this are:\n\n- to allow us to make as much software available as we can\n\n- to allow us to encourage everyone to write free software, and\n\n- to allow us to make it easy for people to produce CD-ROMs of our\nsystem without violating any licenses, import/export restrictions,\nor any other laws.\n\nThe `main' archive area forms the `Debian distribution'.\n",
            "subsections": []
        },
        "Packages in the other archive areas ('contrib', 'non-free') are not": {
            "content": "considered to be part of the Debian distribution, although we support\ntheir use and provide infrastructure for them (such as our bug-tracking\nsystem and mailing lists).  This Debian Policy Manual applies to these\npackages as well.\n\n* Menu:\n\n* The Debian Free Software Guidelines::\n* Archive areas::\n* Copyright considerations::\n* Sections::\n* Priorities::\n\n---------- Footnotes ----------\n\n(1) (1) The Debian archive software uses the term \"component\"\ninternally and in the Release file format to refer to the division of an\narchive.  The Debian Social Contract simply refers to \"areas.\" This\ndocument uses terminology similar to the Social Contract.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: The Debian Free Software Guidelines,  Next: Archive areas,  Up: The Debian Archive": {
            "content": "",
            "subsections": [
                {
                    "name": "2.1 The Debian Free Software Guidelines",
                    "content": "The Debian Free Software Guidelines (DFSG) form our definition of \"free\nsoftware\".  These are:\n\n1.\nFree Redistribution\n\nThe license of a Debian component may not restrict any party\nfrom selling or giving away the software as a component of an\naggregate software distribution containing programs from\nseveral different sources.  The license may not require a\nroyalty or other fee for such sale.\n\n2.\nSource Code\n\nThe program must include source code, and must allow\ndistribution in source code as well as compiled form.\n\n3.\nDerived Works\n\nThe license must allow modifications and derived works, and\nmust allow them to be distributed under the same terms as the\nlicense of the original software.\n\n4.\nIntegrity of The Author's Source Code\n\nThe license may restrict source-code from being distributed in\nmodified form `only' if the license allows the distribution of\n\"patch files\" with the source code for the purpose of\nmodifying the program at build time.  The license must\nexplicitly permit distribution of software built from modified\nsource code.  The license may require derived works to carry a\ndifferent name or version number from the original software.\n(This is a compromise.  The Debian Project encourages all\nauthors to not restrict any files, source or binary, from\nbeing modified.)\n\n5.\nNo Discrimination Against Persons or Groups\n\nThe license must not discriminate against any person or group\nof persons.\n\n6.\nNo Discrimination Against Fields of Endeavor\n\nThe license must not restrict anyone from making use of the\nprogram in a specific field of endeavor.  For example, it may\nnot restrict the program from being used in a business, or\nfrom being used for genetic research.\n\n7.\nDistribution of License\n\nThe rights attached to the program must apply to all to whom\nthe program is redistributed without the need for execution of\nan additional license by those parties.\n\n8.\nLicense Must Not Be Specific to Debian\n\nThe rights attached to the program must not depend on the\nprogram's being part of a Debian system.  If the program is\nextracted from Debian and used or distributed without Debian\nbut otherwise within the terms of the program's license, all\nparties to whom the program is redistributed must have the\nsame rights as those that are granted in conjunction with the\nDebian system.\n\n9.\nLicense Must Not Contaminate Other Software\n\nThe license must not place restrictions on other software that\nis distributed along with the licensed software.  For example,\nthe license must not insist that all other programs\ndistributed on the same medium must be free software.\n\n10.\nExample Licenses\n\nThe \"GPL,\" \"BSD,\" and \"Artistic\" licenses are examples of\nlicenses that we consider `free'.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Archive areas,  Next: Copyright considerations,  Prev: The Debian Free Software Guidelines,  Up: The Debian Archive": {
            "content": "",
            "subsections": [
                {
                    "name": "2.2 Archive areas",
                    "content": "* Menu:\n\n* The main archive area::\n* The contrib archive area::\n* The non-free archive area::\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: The main archive area,  Next: The contrib archive area,  Up: Archive areas": {
            "content": "The `main' archive area comprises the Debian distribution.  Only the\npackages in this area are considered part of the distribution.  None of\nthe packages in the `main' archive area require software outside of that\narea to function.  Anyone may use, share, modify and redistribute the\npackages in this archive area freely (1).\n\nEvery package in `main' must comply with the DFSG (Debian Free Software",
            "subsections": []
        },
        "Guidelines).  (2)": {
            "content": "In addition, the packages in `main'\n\n- must not require or recommend a package outside of `main' for\ncompilation or execution (thus, the package must not declare a\n'Pre-Depends', 'Depends', 'Recommends', 'Build-Depends',\n'Build-Depends-Indep', or 'Build-Depends-Arch' relationship on a\nnon-`main' package unless that package is only listed as a\nnon-default alternative for a package in `main'),\n\n- must not be so buggy that we refuse to support them, and\n\n- must meet all policy requirements presented in this manual.\n\n---------- Footnotes ----------\n\n(1) (2) See What Does Free Mean?  (https://www.debian.org/intro/free)\nfor more about what we mean by free software.\n\n(2) (3) Debian's FTP Masters publish a REJECT-FAQ\n(https://ftp-master.debian.org/REJECT-FAQ.html) which details the\nproject's current working interpretation of the DFSG.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: The contrib archive area,  Next: The non-free archive area,  Prev: The main archive area,  Up: Archive areas": {
            "content": "The `contrib' archive area contains supplemental packages intended to\nwork with the Debian distribution, but which require software outside of\nthe distribution to either build or function.\n\nEvery package in `contrib' must comply with the DFSG.\n\nIn addition, the packages in `contrib'\n\n- must not be so buggy that we refuse to support them, and\n\n- must meet all policy requirements presented in this manual.\n\nExamples of packages which would be included in `contrib' are:\n\n- free packages which require `contrib', `non-free' packages or\npackages which are not in our archive at all for compilation or\nexecution, and\n\n- wrapper packages or other sorts of free accessories for non-free\nprograms.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: The non-free archive area,  Prev: The contrib archive area,  Up: Archive areas": {
            "content": "The `non-free' archive area contains supplemental packages intended to\nwork with the Debian distribution that do not comply with the DFSG or\nhave other problems that make their distribution problematic.  They may\nnot comply with all of the policy requirements in this manual due to\nrestrictions on modifications or other limitations.\n\nPackages must be placed in `non-free' if they are not compliant with the\nDFSG or are encumbered by patents or other legal issues that make their\ndistribution problematic.\n\nIn addition, the packages in `non-free'\n\n- must not be so buggy that we refuse to support them, and\n\n- must meet all policy requirements presented in this manual that it\nis possible for them to meet.  (1)\n\n---------- Footnotes ----------\n\n(1) (4) It is possible that there are policy requirements which the\npackage is unable to meet, for example, if the source is unavailable.\nThese situations will need to be handled on a case-by-case basis.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Copyright considerations,  Next: Sections,  Prev: Archive areas,  Up: The Debian Archive": {
            "content": "",
            "subsections": [
                {
                    "name": "2.3 Copyright considerations",
                    "content": ""
                }
            ]
        },
        "Every package must be accompanied by a verbatim copy of its distribution": {
            "content": "license(s) in the file '/usr/share/doc/PACKAGE/copyright'.  This file\nmust neither be compressed nor be a symbolic link.\n\nA verbatim copy of the package's copyright information is often required\nto be present in '/usr/share/doc/PACKAGE/copyright', too; see *note\nCopyright considerations: 29.\n",
            "subsections": []
        },
        "The copyright information for files in a package must be copied verbatim": {
            "content": "into '/usr/share/doc/PACKAGE/copyright', when all of the following hold:\n\n1. the distribution license for those files requires that copyright\ninformation be included in all copies and/or binary distributions;\n\n2. the files are shipped in the binary package, either in source or\ncompiled form; and\n\n3. the form in which the files are present in the binary package does\nnot include a plain text version of their copyright notices.\n",
            "subsections": []
        },
        "Thus, the copyright information for files in the source package which": {
            "content": "are only part of its build process, such as autotools files, need not be\nincluded in '/usr/share/doc/PACKAGE/copyright', because those files do\nnot get installed into the binary package.  Similarly, plain text files\nwhich include their own copyright information and are installed into the\nbinary package unmodified need not have that copyright information\ncopied into '/usr/share/doc/PACKAGE/copyright'\n",
            "subsections": []
        },
        "However, the copyright notices for any files which are compiled into the": {
            "content": "object code shipped in the binary package must all be included in\n'/usr/share/doc/PACKAGE/copyright' when the license requires that\ncopyright information be included in all copies and/or binary\ndistributions, as most do.  (1)\n\nSee *note Copyright information: 2a. for further details.\n",
            "subsections": []
        },
        "We reserve the right to restrict files from being included anywhere in": {
            "content": "our archives if\n\n- their use or distribution would break a law,\n\n- there is an ethical conflict in their distribution or use,\n\n- we would have to sign a license for them, or\n\n- their distribution would conflict with other project policies.\n",
            "subsections": []
        },
        "Programs whose authors encourage the user to make donations are fine for": {
            "content": "the main distribution, provided that the authors do not claim that not\ndonating is immoral, unethical, illegal or something similar; in such a\ncase they must go in `non-free'.\n",
            "subsections": []
        },
        "Packages whose copyright permission notices (or patent problems) do not": {
            "content": "even allow redistribution of binaries only, and where no special\npermission has been obtained, must not be placed on the Debian FTP site\nand its mirrors at all.\n",
            "subsections": []
        },
        "Note that under international copyright law (this applies in the United": {
            "content": "States, too), `no' distribution or modification of a work is allowed\nwithout an explicit notice saying so.  Therefore a program without a\ncopyright notice `is' copyrighted and you may not do anything to it\nwithout risking being sued!  Likewise if a program has a copyright\nnotice but no statement saying what is permitted then nothing is\npermitted.\n",
            "subsections": []
        },
        "Many authors are unaware of the problems that restrictive copyrights (or": {
            "content": "lack of copyright notices) can cause for the users of their\nsupposedly-free software.  It is often worthwhile contacting such\nauthors diplomatically to ask them to modify their license terms.",
            "subsections": []
        },
        "However, this can be a politically difficult thing to do and you should": {
            "content": "ask for advice on the 'debian-legal' mailing list first, as explained\nbelow.\n",
            "subsections": []
        },
        "When in doubt about a copyright, send mail to": {
            "content": "<debian-legal@lists.debian.org>.  Be prepared to provide us with the\ncopyright statement.  Software covered by the GPL, public domain\nsoftware and BSD-like copyrights are safe; be wary of the phrases\n\"commercial use prohibited\" and \"distribution restricted\".\n\n---------- Footnotes ----------\n\n(1) (5) Licenses that are not thought to require the copying of all\ncopyright notices into Debian's copyright file include Apache-2.0 and\nthe Boost Software License, version 1.0.  Final determination as to\nwhether a package's copyright file is sufficient lies with the FTP team.\n",
            "subsections": []
        },
        "To help find copyright notices you need to copy, you might try 'grep": {
            "content": "--color=always -Eir '(copyright|(C))' * | less -R'\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Sections,  Next: Priorities,  Prev: Copyright considerations,  Up: The Debian Archive": {
            "content": "",
            "subsections": [
                {
                    "name": "2.4 Sections",
                    "content": "The packages in the archive areas `main', `contrib' and `non-free' are\ngrouped further into `sections' to simplify handling.\n"
                }
            ]
        },
        "The archive area and section for each package should be specified in the": {
            "content": "package's 'Section' control record (see *note Section: 2d.).  However,\nthe maintainer of the Debian archive may override this selection to\nensure the consistency of the Debian distribution.  The 'Section' field\nshould be of the form:\n\n- `section' if the package is in the `main' archive area,\n\n- `area/section' if the package is in the `contrib' or `non-free'\narchive areas.\n",
            "subsections": []
        },
        "The Debian archive maintainers provide the authoritative list of": {
            "content": "sections.  At present, they are: admin, cli-mono, comm, database, debug,\ndevel, doc, editors, education, electronics, embedded, fonts, games,\ngnome, gnu-r, gnustep, graphics, hamradio, haskell, httpd, interpreters,\nintrospection, java, javascript, kde, kernel, libdevel, libs, lisp,\nlocalization, mail, math, metapackages, misc, net, news, ocaml, oldlibs,\notherosfs, perl, php, python, ruby, rust, science, shells, sound, tasks,\ntex, text, utils, vcs, video, web, x11, xfce, zope.  The additional\nsection `debian-installer' contains special packages used by the\ninstaller and is not used for normal Debian packages.\n",
            "subsections": []
        },
        "For more information about the sections and their definitions, see the": {
            "content": "list of sections in unstable(1).\n\n---------- Footnotes ----------\n\n(1) https://packages.debian.org/unstable/\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Priorities,  Prev: Sections,  Up: The Debian Archive": {
            "content": "",
            "subsections": [
                {
                    "name": "2.5 Priorities",
                    "content": "Each package must have a `priority' value, which is set in the metadata\nfor the Debian archive and is also included in the package's control\nfiles (see *note Priority: 30.).  This information is used to control\nwhich packages are included in standard or minimal Debian installations.\n"
                }
            ]
        },
        "Most Debian packages will have a priority of 'optional'.  Priority": {
            "content": "levels other than 'optional' are only used for packages that should be\nincluded by default in a standard installation of Debian.\n",
            "subsections": []
        },
        "The priority of a package is determined solely by the functionality it": {
            "content": "provides directly to the user.  The priority of a package should not be\nincreased merely because another higher-priority package depends on it;\ninstead, the tools used to construct Debian installations will correctly\nhandle package dependencies.  In particular, this means that C-like\nlibraries will almost never have a priority above 'optional', since they\ndo not provide functionality directly to users.  However, as an\nexception, the maintainers of Debian installers may request an increase\nof the priority of a package to resolve installation issues and ensure\nthat the correct set of packages is included in a standard or minimal\ninstall.\n\nThe following `priority levels' are recognized by the Debian package\nmanagement tools.\n\n'required'\n\nPackages which are necessary for the proper functioning of the\nsystem (usually, this means that dpkg functionality depends on\nthese packages).  Removing a 'required' package may cause your\nsystem to become totally broken and you may not even be able to use\n'dpkg' to put things back, so only do so if you know what you are\ndoing.\n\nSystems with only the 'required' packages installed have at least\nenough functionality for the sysadmin to boot the system and\ninstall more software.\n\n'important'\n\nImportant programs, including those which one would expect to find\non any Unix-like system.  If the expectation is that an experienced\nUnix person who found it missing would say \"What on earth is going\non, where is 'foo'?\", it must be an 'important' package.  (1) Other\npackages without which the system will not run well or be usable\nmust also have priority 'important'.  This does `not' include\nEmacs, the X Window System, TeX or any other large applications.\nThe 'important' packages are just a bare minimum of\ncommonly-expected and necessary tools.\n\n'standard'\n\nThese packages provide a reasonably small but not too limited\ncharacter-mode system.  This is what will be installed by default\nif the user doesn't select anything else.  It doesn't include many\nlarge applications.\n\nTwo packages that both have a priority of 'standard' or higher must\nnot conflict with each other.\n\n'optional'\n\nThis is the default priority for the majority of the archive.\nUnless a package should be installed by default on standard Debian\nsystems, it should have a priority of 'optional'.  Packages with a\npriority of 'optional' may conflict with each other.\n\n'extra'\n\n`This priority is deprecated.'  Use the 'optional' priority\ninstead.  This priority should be treated as equivalent to\n'optional'.\n\nThe 'extra' priority was previously used for packages that\nconflicted with other packages and packages that were only likely\nto be useful to people with specialized requirements.  However,\nthis distinction was somewhat arbitrary, not consistently followed,\nand not useful enough to warrant the maintenance effort.\n\n---------- Footnotes ----------\n\n(1) (6) This is an important criterion because we are trying to\nproduce, amongst other things, a free Unix.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Binary packages,  Next: Source packages,  Prev: The Debian Archive,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "3 Binary packages": {
            "content": "",
            "subsections": []
        },
        "The Debian distribution is based on the Debian package management": {
            "content": "system, called 'dpkg'.  Thus, all packages in the Debian distribution\nmust be provided in the '.deb' file format.\n\nA '.deb' package contains two sets of files: a set of files to install\non the system when the package is installed, and a set of files that\nprovide additional metadata about the package or which are executed when\nthe package is installed or removed.  This second set of files is called\n`control information files'.  Among those files are the package\nmaintainer scripts and 'control', the *note binary package control file:\n33. that contains the control fields for the package.  Other control\ninformation files include *note symbols: 34. or *note shlibs: 35. used\nto store shared library dependency information and the 'conffiles' file\nthat lists the package's configuration files (described in *note\nConfiguration files: 36.).\n",
            "subsections": []
        },
        "There is unfortunately a collision of terminology here between control": {
            "content": "information files and files in the Debian control file format.\nThroughout this document, a `control file' refers to a file in the\nDebian control file format.  These files are documented in *note Control\nfiles and their fields: 37.  Only files referred to specifically as\n`control information files' are the files included in the control\ninformation file member of the '.deb' file format used by binary\npackages.  Most control information files are not in the Debian control\nfile format.\n\n* Menu:\n\n* The package name::\n* The version of a package::\n* The maintainer of a package::\n* The description of a package::\n* Dependencies::\n* Virtual packages::\n* Base system::\n* Essential packages::\n* Maintainer Scripts::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: The package name,  Next: The version of a package,  Up: Binary packages": {
            "content": "",
            "subsections": [
                {
                    "name": "3.1 The package name",
                    "content": "Every package must have a name that's unique within the Debian archive.\n"
                }
            ]
        },
        "The package name is included in the control field 'Package', the format": {
            "content": "of which is described in *note Package: 3a.  The package name is also\nincluded as a part of the file name of the '.deb' file.\n\n* Menu:\n\n* Packages with potentially offensive content::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Packages with potentially offensive content,  Up: The package name": {
            "content": "",
            "subsections": []
        },
        "As a maintainer you should make a judgement about whether the contents": {
            "content": "of a package is appropriate to include, whether it needs any kind of\ncontent warning, and whether some parts should be split out into a\nseparate package (so that users who want to avoid certain parts can do\nso).  In making these decisions you should take into account the\nproject's views as expressed in our Diversity Statement.\n",
            "subsections": []
        },
        "If you split out (potentially) offensive or disturbing material into a": {
            "content": "separate package, you should usually mark this in the package name by\nadding '-offensive'.  For example, 'cowsay' vs 'cowsay-offensive'.  In\nthis situation the '-offensive' package can be Suggested by the core\npackage(s), but should not be Recommended or Depended on.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: The version of a package,  Next: The maintainer of a package,  Prev: The package name,  Up: Binary packages": {
            "content": "",
            "subsections": [
                {
                    "name": "3.2 The version of a package",
                    "content": ""
                }
            ]
        },
        "Every package has a version number recorded in its 'Version' control": {
            "content": "file field, described in *note Version: 3f.\n",
            "subsections": []
        },
        "The package management system imposes an ordering on version numbers, so": {
            "content": "that it can tell whether packages are being up- or downgraded and so\nthat package system front end applications can tell whether a package it\nfinds available is newer than the one installed on the system.  The\nversion number format has the most significant parts (as far as\ncomparison is concerned) at the beginning.\n",
            "subsections": []
        },
        "If an upstream package has problematic version numbers they should be": {
            "content": "converted to a sane form for use in the 'Version' field.\n\n* Menu:\n\n* Version numbers based on dates::\n* Uniqueness of version numbers::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Version numbers based on dates,  Next: Uniqueness of version numbers,  Up: The version of a package": {
            "content": "",
            "subsections": []
        },
        "In general, Debian packages should use the same version numbers as the": {
            "content": "upstream sources.  However, upstream version numbers based on some date\nformats (sometimes used for development or \"snapshot\" releases) will not\nbe ordered correctly by the package management software.  For example,\n'dpkg' will consider \"96May01\" to be greater than \"96Dec24\".\n",
            "subsections": []
        },
        "To prevent having to use epochs for every new upstream version, the": {
            "content": "date-based portion of any upstream version number should be given in a\nway that sorts correctly: four-digit year first, followed by a two-digit\nnumeric month, followed by a two-digit numeric date, possibly with\npunctuation between the components.\n",
            "subsections": []
        },
        "Native Debian packages (i.e., packages which have been written": {
            "content": "especially for Debian) whose version numbers include dates should also\nfollow these rules.  If punctuation is desired between the date\ncomponents, remember that hyphen ('-') cannot be used in native version\nnumbers.  Period ('.') is normally a good choice.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Uniqueness of version numbers,  Prev: Version numbers based on dates,  Up: The version of a package": {
            "content": "",
            "subsections": []
        },
        "The part of the version number after the epoch must not be reused for a": {
            "content": "version of the package with different contents once the package has been\naccepted into the archive, even if the version of the package previously\nusing that part of the version number is no longer present in any\narchive suites.\n",
            "subsections": []
        },
        "This uniqueness requirement applies to the version numbers of source": {
            "content": "packages and of binary packages, even if the source package producing a\ngiven binary package changes.  Thus the version numbers which a binary\npackage must not reuse includes the version numbers of any versions of\nthe binary package ever accepted into the archive, under any source\npackage.\n",
            "subsections": []
        },
        "Additionally, for non-native packages, the upstream version must not be": {
            "content": "reused for different upstream source code, so that for each source\npackage name and upstream version number there exists exactly one\noriginal source archive contents (see *note Files: 44.).\n",
            "subsections": []
        },
        "The reason for these restrictions is as follows.  Epochs are not": {
            "content": "included in the names of the files that compose source packages, or in\nthe filenames of binary packages, so reusing a version number, even if\nthe epoch differs, results in identically named files with different\ncontents.  This can cause various problems.\n",
            "subsections": []
        },
        "If you find yourself wanting to reuse the part of a version number after": {
            "content": "the epoch, you can just increment the Debian revision, which doesn't\nneed to start at 1 or be consecutive.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: The maintainer of a package,  Next: The description of a package,  Prev: The version of a package,  Up: Binary packages": {
            "content": "",
            "subsections": [
                {
                    "name": "3.3 The maintainer of a package",
                    "content": ""
                }
            ]
        },
        "Every package must have a maintainer, except for orphaned packages as": {
            "content": "described below.  The maintainer may be one person or a group of people\nreachable from a common email address, such as a mailing list.  The\nmaintainer is responsible for maintaining the Debian packaging files,\nevaluating and responding appropriately to reported bugs, uploading new\nversions of the package (either directly or through a sponsor), ensuring\nthat the package is placed in the appropriate archive area and included\nin Debian releases as appropriate for the stability and utility of the\npackage, and requesting removal of the package from the Debian\ndistribution if it is no longer useful or maintainable.\n",
            "subsections": []
        },
        "The maintainer must be specified in the 'Maintainer' control field with": {
            "content": "their correct name and a working email address.  The email address given\nin the 'Maintainer' control field must accept mail from those role\naccounts in Debian used to send automated mails regarding the package.",
            "subsections": []
        },
        "This includes non-spam mail from the bug-tracking system, all mail from": {
            "content": "the Debian archive maintenance software, and other role accounts or\nautomated processes that are commonly agreed on by the project.  (1) If\none person or team maintains several packages, they should use the same\nform of their name and email address in the 'Maintainer' fields of those\npackages.\n\nThe format of the 'Maintainer' control field is described in *note\nMaintainer: 47.\n",
            "subsections": []
        },
        "If the maintainer of the package is a team of people with a shared email": {
            "content": "address, the 'Uploaders' control field must be present and must contain\nat least one human with their personal email address.  See *note\nUploaders: 48. for the syntax of that field.\n",
            "subsections": []
        },
        "An orphaned package is one with no current maintainer.  Orphaned": {
            "content": "packages should have their 'Maintainer' control field set to 'Debian QA\nGroup <packages@qa.debian.org>'.  These packages are considered\nmaintained by the Debian project as a whole until someone else\nvolunteers to take over maintenance.  (2)\n\n---------- Footnotes ----------\n\n(1) (1) A sample implementation of such a whitelist written for the",
            "subsections": []
        },
        "Mailman mailing list management software is used for mailing lists": {
            "content": "hosted by 'https://alioth-lists.debian.net/'.\n\n(2) (2) The detailed procedure for gracefully orphaning a package can\nbe found in the Debian Developer's Reference (see *note Related\ndocuments: 11.).\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: The description of a package,  Next: Dependencies,  Prev: The maintainer of a package,  Up: Binary packages": {
            "content": "",
            "subsections": [
                {
                    "name": "3.4 The description of a package",
                    "content": ""
                }
            ]
        },
        "Every Debian package must have a 'Description' control field which": {
            "content": "contains a synopsis and extended description of the package.  Technical\ninformation about the format of the 'Description' field is in *note\nDescription: 4b.\n",
            "subsections": []
        },
        "The description should describe the package (the program) to a user": {
            "content": "(system administrator) who has never met it before so that they have\nenough information to decide whether they want to install it.  This\ndescription should not just be copied verbatim from the program's\ndocumentation.\n",
            "subsections": []
        },
        "Put important information first, both in the synopsis and extended": {
            "content": "description.  Sometimes only the first part of the synopsis or of the\ndescription will be displayed.  You can assume that there will usually\nbe a way to see the whole extended description.\n",
            "subsections": []
        },
        "The description should also give information about the significant": {
            "content": "dependencies and conflicts between this package and others, so that the\nuser knows why these dependencies and conflicts have been declared.\n",
            "subsections": []
        },
        "Instructions for configuring or using the package should not be included": {
            "content": "(that is what installation scripts, manual pages, info files, etc., are\nfor).  Copyright statements and other administrivia should not be\nincluded either (that is what the copyright file is for).\n\n* Menu:\n\n* The single line synopsis::\n* The extended description::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: The single line synopsis,  Next: The extended description,  Up: The description of a package": {
            "content": "",
            "subsections": []
        },
        "The single line synopsis should be kept brief--certainly under 80": {
            "content": "characters.\n",
            "subsections": []
        },
        "Do not include the package name in the synopsis line.  The display": {
            "content": "software knows how to display this already, and you do not need to state\nit.  Remember that in many situations the user may only see the synopsis\nline - make it as informative as you can.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: The extended description,  Prev: The single line synopsis,  Up: The description of a package": {
            "content": "",
            "subsections": []
        },
        "Do not try to continue the single line synopsis into the extended": {
            "content": "description.  This will not work correctly when the full description is\ndisplayed, and makes no sense where only the summary (the single line\nsynopsis) is available.\n",
            "subsections": []
        },
        "The extended description should describe what the package does and how": {
            "content": "it relates to the rest of the system (in terms of, for example, which\nsubsystem it is which part of).\n",
            "subsections": []
        },
        "The description field needs to make sense to anyone, even people who": {
            "content": "have no idea about any of the things the package deals with.  (1)\n\n---------- Footnotes ----------\n\n(1) (3) The blurb that comes with a program in its announcements\nand/or 'README' files is rarely suitable for use in a description.  It\nis usually aimed at people who are already in the community where the\npackage is used.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Dependencies,  Next: Virtual packages,  Prev: The description of a package,  Up: Binary packages": {
            "content": "",
            "subsections": [
                {
                    "name": "3.5 Dependencies",
                    "content": ""
                }
            ]
        },
        "Every package must specify the dependency information about other": {
            "content": "packages that are required for the first to work correctly.\n",
            "subsections": []
        },
        "For example, a dependency entry must be provided for any shared": {
            "content": "libraries required by a dynamically-linked executable binary in a\npackage.\n",
            "subsections": []
        },
        "Packages are not required to declare any dependencies they have on other": {
            "content": "packages which are marked 'Essential' (see below), and should not do so\nunless they depend on a particular version of that package.  (1)\n",
            "subsections": []
        },
        "Sometimes, unpacking one package requires that another package be first": {
            "content": "unpacked `and' configured.  In this case, the depending package must\nspecify this dependency in the 'Pre-Depends' control field.\n",
            "subsections": []
        },
        "You should not specify a 'Pre-Depends' entry for a package before this": {
            "content": "has been discussed on the 'debian-devel' mailing list and a consensus\nabout doing that has been reached.\n",
            "subsections": []
        },
        "The format of the package interrelationship control fields is described": {
            "content": "in *note Declaring relationships between packages: 52.\n\n---------- Footnotes ----------\n\n(1) (4) Essential is needed in part to avoid unresolvable dependency\nloops on upgrade.  If packages add unnecessary dependencies on packages\nin this set, the chances that there `will' be an unresolvable dependency\nloop caused by forcing these Essential packages to be configured first\nbefore they need to be is greatly increased.  It also increases the\nchances that frontends will be unable to `calculate' an upgrade path,\neven if one exists.\n",
            "subsections": []
        },
        "Also, functionality is rarely ever removed from the Essential set, but": {
            "content": "`packages' have been removed from the Essential set when the\nfunctionality moved to a different package.  So depending on these\npackages `just in case' they stop being essential does way more harm\nthan good.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Virtual packages,  Next: Base system,  Prev: Dependencies,  Up: Binary packages": {
            "content": "",
            "subsections": [
                {
                    "name": "3.6 Virtual packages",
                    "content": ""
                }
            ]
        },
        "Sometimes, there are several packages which offer more-or-less the same": {
            "content": "functionality.  In this case, it's useful to define a `virtual package'\nwhose name describes that common functionality.  (The virtual packages\nonly exist logically, not physically; that's why they are called\n`virtual'.)  The packages with this particular function will then\n`provide' the virtual package.  Thus, any other package requiring that\nfunction can simply depend on the virtual package without having to\nspecify all possible packages individually.\n",
            "subsections": []
        },
        "All packages should use virtual package names where appropriate, and": {
            "content": "arrange to create new ones if necessary.  They should not use virtual\npackage names (except privately, amongst a cooperating group of\npackages) unless they have been agreed upon and appear in the list of\nvirtual package names.  (See also *note Virtual packages - Provides:\n54.)\n",
            "subsections": []
        },
        "The latest version of the authoritative list of virtual package names": {
            "content": "can be found in the 'debian-policy' package.  It is also available from\nthe Debian web mirrors at\n'https://www.debian.org/doc/packaging-manuals/virtual-package-names-list.yaml'.\n",
            "subsections": []
        },
        "The procedure for updating the list is described in the preface to the": {
            "content": "list.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Base system,  Next: Essential packages,  Prev: Virtual packages,  Up: Binary packages": {
            "content": "",
            "subsections": [
                {
                    "name": "3.7 Base system",
                    "content": ""
                }
            ]
        },
        "The 'base system' is a minimum subset of the Debian system that is": {
            "content": "installed before everything else on a new system.  Only very few\npackages are allowed to form part of the base system, in order to keep\nthe required disk usage very small.\n",
            "subsections": []
        },
        "The base system consists of all those packages with priority 'required'": {
            "content": "or 'important'.  Many of them will be tagged 'essential' (see below).\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Essential packages,  Next: Maintainer Scripts,  Prev: Base system,  Up: Binary packages": {
            "content": "",
            "subsections": [
                {
                    "name": "3.8 Essential packages",
                    "content": ""
                }
            ]
        },
        "Essential is defined as the minimal set of functionality that must be": {
            "content": "available and usable on the system at all times, even when packages are\nin the \"Unpacked\" state.  Packages are tagged 'essential' for a system\nusing the 'Essential' control field.  The format of the 'Essential'\ncontrol field is described in *note Essential: 59.\n",
            "subsections": []
        },
        "Since these packages cannot be easily removed (one has to specify an": {
            "content": "extra `force option' to 'dpkg' to do so), this flag must not be used\nunless absolutely necessary.  A shared library package must not be\ntagged 'essential'; dependencies will prevent its premature removal, and\nwe need to be able to remove it when it has been superseded.\n",
            "subsections": []
        },
        "Since dpkg will not prevent upgrading of other packages while an": {
            "content": "'essential' package is in an unconfigured state, all 'essential'\npackages must supply all of their core functionality even when\nunconfigured.  If the package cannot satisfy this requirement it must\nnot be tagged as essential, and any packages depending on this package\nmust instead have explicit dependency fields as appropriate.\n",
            "subsections": []
        },
        "Maintainers should take great care in adding any programs, interfaces,": {
            "content": "or functionality to 'essential' packages.  Packages may assume that\nfunctionality provided by 'essential' packages is always available\nwithout declaring explicit dependencies, which means that removing\nfunctionality from the Essential set is very difficult and is almost\nnever done.  Any capability added to an 'essential' package therefore\ncreates an obligation to support that capability as part of the\nEssential set in perpetuity.\n",
            "subsections": []
        },
        "You must not tag any packages 'essential' before this has been discussed": {
            "content": "on the 'debian-devel' mailing list and a consensus about doing that has\nbeen reached.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Maintainer Scripts,  Prev: Essential packages,  Up: Binary packages": {
            "content": "",
            "subsections": [
                {
                    "name": "3.9 Maintainer Scripts",
                    "content": ""
                }
            ]
        },
        "The package installation scripts should avoid producing output which is": {
            "content": "unnecessary for the user to see and should rely on 'dpkg' to stave off\nboredom on the part of a user installing many packages.  This means,\namongst other things, not passing the '--verbose' option to\n'update-alternatives'.\n",
            "subsections": []
        },
        "Errors which occur during the execution of an installation script must": {
            "content": "be checked and the installation must not continue after an error.\n\nNote that in general *note Scripts: 5c. applies to package maintainer\nscripts, too.\n",
            "subsections": []
        },
        "You should not use 'dpkg-divert' on a file belonging to another package": {
            "content": "without consulting the maintainer of that package first.  When adding or\nremoving diversions, package maintainer scripts must provide the\n'--package' flag to 'dpkg-divert' and must not use '--local'.\n",
            "subsections": []
        },
        "All packages which supply an instance of a common command name (or, in": {
            "content": "general, filename) should generally use 'update-alternatives' so that\nthey can be installed together.  If 'update-alternatives' is not used,\nthen each package must use 'Conflicts' to ensure that other packages are\nremoved.  (In this case, it may be appropriate to specify a conflict\nagainst earlier versions of something that previously did not use\n'update-alternatives'; this is an exception to the usual rule that\nversioned conflicts should be avoided.)\n\n* Menu:\n\n* Prompting in maintainer scripts::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Prompting in maintainer scripts,  Up: Maintainer Scripts": {
            "content": "",
            "subsections": []
        },
        "Package maintainer scripts may prompt the user if necessary.  Prompting": {
            "content": "must be done by communicating through a program, such as 'debconf',\nwhich conforms to the Debian Configuration Management Specification,\nversion 2 or higher.\n",
            "subsections": []
        },
        "Packages which are essential, or which are dependencies of essential": {
            "content": "packages, may fall back on another prompting method if no such interface\nis available when they are executed.\n",
            "subsections": []
        },
        "The Debian Configuration Management Specification is included in the": {
            "content": "'debconfspecification' files in the debian-policy package.  It is also\navailable from the Debian web mirrors at\n'https://www.debian.org/doc/packaging-manuals/debconfspecification.html'.\n",
            "subsections": []
        },
        "Packages which use the Debian Configuration Management Specification may": {
            "content": "contain the additional control information files 'config' and\n'templates'.  'config' is an additional maintainer script used for\npackage configuration, and 'templates' contains templates used for user\nprompting.  The 'config' script might be run before the 'preinst' script\nand before the package is unpacked or any of its dependencies or\npre-dependencies are satisfied.  Therefore it must work using only the\ntools present in `essential' packages.  (1)\n",
            "subsections": []
        },
        "Packages which use the Debian Configuration Management Specification": {
            "content": "must allow for translation of their user-visible messages by using a\ngettext-based system such as the one provided by the po-debconf package.\n",
            "subsections": []
        },
        "Packages should try to minimize the amount of prompting they need to do,": {
            "content": "and they should ensure that the user will only ever be asked each\nquestion once.  This means that packages should try to use appropriate\nshared configuration files (such as '/etc/papersize' and\n'/etc/news/server'), and shared debconf variables rather than each\nprompting for their own list of required pieces of information.\n",
            "subsections": []
        },
        "It also means that an upgrade should not ask the same questions again,": {
            "content": "unless the user has used 'dpkg --purge' to remove the package's\nconfiguration.  The answers to configuration questions should be stored\nin an appropriate place in '/etc' so that the user can modify them, and\nhow this has been done should be documented.\n",
            "subsections": []
        },
        "If a package has a vitally important piece of information to pass to the": {
            "content": "user (such as \"don't run me as I am, you must edit the following\nconfiguration files first or you risk your system emitting\nbadly-formatted messages\"), it should display this in the 'config' or\n'postinst' script and prompt the user to hit return to acknowledge the\nmessage.  Copyright messages do not count as vitally important (they\nbelong in '/usr/share/doc/PACKAGE/copyright'); neither do instructions\non how to use a program (these should be in on-line documentation, where\nall the users can see them).\n",
            "subsections": []
        },
        "Any necessary prompting should almost always be confined to the 'config'": {
            "content": "or 'postinst' script.  If it is done in the 'postinst', it should be\nprotected with a conditional so that unnecessary prompting doesn't\nhappen if a package's installation fails and the 'postinst' is called\nwith 'abort-upgrade', 'abort-remove' or 'abort-deconfigure'.\n\n---------- Footnotes ----------\n\n(1) (5) Debconf or another tool that implements the Debian",
            "subsections": []
        },
        "Configuration Management Specification will also be installed, and any": {
            "content": "versioned dependencies on it will be satisfied before preconfiguration\nbegins.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Source packages,  Next: Control files and their fields,  Prev: Binary packages,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "4 Source packages": {
            "content": "* Menu:\n\n* Standards conformance::\n* Package relationships::\n* Changes to the upstream sources::\n* Debian changelog; debian/changelog: Debian changelog debian/changelog.\n* Copyright; debian/copyright: Copyright debian/copyright.\n* Error trapping in makefiles::\n* Time Stamps::\n* Restrictions on objects in source packages::\n* Main building script; debian/rules: Main building script debian/rules.\n* Variable substitutions; debian/substvars: Variable substitutions debian/substvars.\n* Upstream source location; debian/watch: Upstream source location debian/watch.\n* Generated files list; debian/files: Generated files list debian/files.\n* Embedded code copies::\n* Source package handling; debian/README.source: Source package handling debian/README source.\n* Reproducibility::\n* Missing sources; debian/missing-sources: Missing sources debian/missing-sources.\n* Vendor-specific patch series::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Standards conformance,  Next: Package relationships,  Up: Source packages": {
            "content": "",
            "subsections": [
                {
                    "name": "4.1 Standards conformance",
                    "content": ""
                }
            ]
        },
        "Source packages should specify the most recent version number of this": {
            "content": "policy document with which your package complied when it was last\nupdated.\n",
            "subsections": []
        },
        "The version is specified in the 'Standards-Version' control field.  The": {
            "content": "format of the 'Standards-Version' field is described in *note\nStandards-Version: 62.\n\nFor a package to have an old Standards-Version value is not `itself' a\nbug, however.  It just means that no-one has yet reviewed the package\nwith changes to the standards in mind.\n",
            "subsections": []
        },
        "When updating existing packaging, the Standards-Version must not be": {
            "content": "updated except after reviewing the changes between the old and the new\nversions of the standards and updating your package if necessary (the\n*note Upgrading checklist: 9. can help with this task).\n\nA very old Standards-Version can mean that infelicities in the package\nare likely.  It is recommended that each package be reviewed at least\nonce per Debian release, so a Standards-Version older than the previous",
            "subsections": []
        },
        "Debian release is indicative of work (if only review work) that needs": {
            "content": "doing.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Package relationships,  Next: Changes to the upstream sources,  Prev: Standards conformance,  Up: Source packages": {
            "content": "",
            "subsections": [
                {
                    "name": "4.2 Package relationships",
                    "content": ""
                }
            ]
        },
        "Source packages should specify which binary packages they require to be": {
            "content": "installed or not to be installed in order to build correctly.  For\nexample, if building a package requires a certain compiler, then the\ncompiler should be specified as a build-time dependency.\n",
            "subsections": []
        },
        "It is not necessary to explicitly specify build-time relationships on a": {
            "content": "minimal set of packages that are always needed to compile, link and put\nin a Debian package a standard \"Hello World!\" program written in C or\nC++.  The required packages are called `build-essential', and an\ninformational list can be found in '/usr/share/doc/build-essential/list'\n(which is contained in the 'build-essential' package).  (1)\n",
            "subsections": []
        },
        "When specifying the set of build-time dependencies, one should list only": {
            "content": "those packages explicitly required by the build.  It is not necessary to\nlist packages which are required merely because some other package in\nthe list of build-time dependencies depends on them.  (2)\n",
            "subsections": []
        },
        "If build-time dependencies are specified, it must be possible to build": {
            "content": "the package and produce working binaries on a system with only essential\nand build-essential packages installed and also those required to\nsatisfy the build-time relationships (including any implied\nrelationships).  In particular, this means that version clauses should\nbe used rigorously in build-time relationships so that one cannot\nproduce bad or inconsistently configured packages when the relationships\nare properly satisfied.\n\n*note Declaring relationships between packages: 52. explains the\ntechnical details.\n\n---------- Footnotes ----------\n\n(1) (1) Rationale:\n\n- This allows maintaining the list separately from the policy\ndocuments (the list does not need the kind of control that the\npolicy documents do).\n\n- Having a separate package allows one to install the build-essential\npackages on a machine, as well as allowing other packages such as\ntasks to require installation of the build-essential packages using\nthe depends relation.\n\n- The separate package allows bug reports against the list to be\ncategorized separately from the policy management process in the\nBTS.\n\n(2) (2) The reason for this is that dependencies change, and you\nshould list all those packages, and `only' those packages that `you'\nneed directly.  What others need is their business.  For example, if you\nonly link against 'libimlib', you will need to build-depend on\nlibimlib2-dev but not against any 'libjpeg*' packages, even though\n'libimlib2-dev' currently depends on them: installation of libimlib2-dev\nwill automatically ensure that all of its run-time dependencies are\nsatisfied.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Changes to the upstream sources,  Next: Debian changelog debian/changelog,  Prev: Package relationships,  Up: Source packages": {
            "content": "",
            "subsections": [
                {
                    "name": "4.3 Changes to the upstream sources",
                    "content": ""
                }
            ]
        },
        "If changes to the source code are made that are not specific to the": {
            "content": "needs of the Debian system, they should be sent to the upstream authors\nin whatever form they prefer so as to be included in the upstream\nversion of the package.\n",
            "subsections": []
        },
        "If you need to configure the package differently for Debian or for": {
            "content": "",
            "subsections": []
        },
        "Linux, and the upstream source doesn't provide a way to do so, you": {
            "content": "should add such configuration facilities (for example, a new 'autoconf'\ntest or '#define') and send the patch to the upstream authors, with the\ndefault set to the way they originally had it.  You can then easily\noverride the default in your 'debian/rules' or wherever is appropriate.\n",
            "subsections": []
        },
        "You should make sure that the 'configure' utility detects the correct": {
            "content": "architecture specification string (refer to *note Architecture\nspecification strings: 67. for details).\n",
            "subsections": []
        },
        "If your package includes the scripts 'config.sub' and 'config.guess',": {
            "content": "you should arrange for the versions provided by the package\nautotools-dev be used instead (see autotools-dev documentation for\ndetails how to achieve that).  This ensures that these files can be\nupdated distribution-wide at build time when introducing new\narchitectures.\n",
            "subsections": []
        },
        "If you need to edit a 'Makefile' where GNU-style 'configure' scripts are": {
            "content": "used, you should edit the '.in' files rather than editing the 'Makefile'\ndirectly.  This allows the user to reconfigure the package if necessary.\nYou should `not' configure the package and edit the generated\n'Makefile'!  This makes it impossible for someone else to later\nreconfigure the package without losing the changes you made.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Debian changelog debian/changelog,  Next: Copyright debian/copyright,  Prev: Changes to the upstream sources,  Up: Source packages": {
            "content": "",
            "subsections": [
                {
                    "name": "4.4 Debian changelog: 'debian/changelog'",
                    "content": ""
                }
            ]
        },
        "Every source package must include the Debian changelog file,": {
            "content": "'debian/changelog'.  Changes in the Debian version of the package should\nbe briefly explained in this file.  (1) This includes modifications made\nin the Debian package compared to the upstream one as well as other\nchanges and updates to the package.  (2)\n",
            "subsections": []
        },
        "The format of the 'debian/changelog' allows the package building tools": {
            "content": "to discover which version of the package is being built and find out\nother release-specific information.\n\nThat format is a series of entries like this:\n\npackage (version) distribution(s); urgency=urgency\n[optional blank line(s), stripped]\n* change details\nmore change details\n[blank line(s), included in output of dpkg-parsechangelog]\n* even more change details\n[optional blank line(s), stripped]\n-- maintainer name <email address>[two spaces]  date\n\n'package' and 'version' are the source package name and version number.\n\n'distribution(s)' lists the distributions where this version should be\ninstalled when it is uploaded - it is copied to the 'Distribution' field\nin the '.changes' file.  See *note Distribution: 6a.\n\n'urgency' is the value for the 'Urgency' field in the '.changes' file\nfor the upload (see *note Urgency: 6b.).  It is not possible to specify\nan urgency containing commas; commas are used to separate\n'keyword=value' settings in the 'dpkg' changelog format (though there is\ncurrently only one useful keyword, 'urgency').\n",
            "subsections": []
        },
        "The change details may in fact be any series of lines starting with at": {
            "content": "least two spaces, but conventionally each change starts with an asterisk\nand a separating space and continuation lines are indented so as to\nbring them in line with the start of the text above.  Blank lines may be\nused here to separate groups of changes, if desired.\n",
            "subsections": []
        },
        "If this upload resolves bugs recorded in the Bug Tracking System (BTS),": {
            "content": "they may be automatically closed on the inclusion of this package into\nthe Debian archive by including the string: 'closes: Bug#nnnnn' in the\nchange details.  (3) This information is conveyed via the 'Closes' field\nin the '.changes' file (see *note Closes: 6c.).\n",
            "subsections": []
        },
        "The maintainer name and email address used in the changelog should be": {
            "content": "the details of the person who prepared this release of the package.\nThey are `not' necessarily those of the uploader or usual package\nmaintainer.  (4) The information here will be copied to the 'Changed-By'\nfield in the '.changes' file (see *note Changed-By: 6d.), and then later\nused to send an acknowledgement when the upload has been installed.\n",
            "subsections": []
        },
        "The date has the following format (5) (compatible and with the same": {
            "content": "semantics of RFC 2822 and RFC 5322):\n\nday-of-week, dd month yyyy hh:mm:ss +zzzz\n\nwhere:\n\n- 'day-of-week' is one of: Mon, Tue, Wed, Thu, Fri, Sat, Sun\n\n- 'dd' is a one- or two-digit day of the month (01-31)\n\n- 'month' is one of: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep,\nOct, Nov, Dec\n\n- 'yyyy' is the four-digit year (e.g.  2010)\n\n- 'hh' is the two-digit hour (00-23)\n\n- 'mm' is the two-digit minutes (00-59)\n\n- 'ss' is the two-digit seconds (00-60)\n\n-\n'+zzzz' or '-zzzz' is the time zone offset from Coordinated\n\nUniversal Time (UTC). \"+\" indicates that the time is ahead of\n(i.e., east of) UTC and \"-\" indicates that the time is behind\n(i.e., west of) UTC. The first two digits indicate the hour\ndifference from UTC and the last two digits indicate the\nnumber of additional minutes difference from UTC. The last two\ndigits must be in the range 00-59.\n\nThe first \"title\" line with the package name must start at the left hand\nmargin.  The \"trailer\" line with the maintainer and date details must be\npreceded by exactly one space.  The maintainer details and the date must\nbe separated by exactly two spaces.\n\nThe entire changelog must be encoded in UTF-8.\n",
            "subsections": []
        },
        "For more information on placement of the changelog files within binary": {
            "content": "packages, please see *note Changelog files and release notes: 6e.\n\n---------- Footnotes ----------\n\n(1) (3) Mistakes in changelogs are usually best rectified by making a\nnew changelog entry rather than \"rewriting history\" by editing old\nchangelog entries.\n\n(2) (4) Although there is nothing stopping an author who is also the",
            "subsections": []
        },
        "Debian maintainer from using this changelog for all their changes, it": {
            "content": "will have to be renamed if the Debian and upstream maintainers become\ndifferent people.  In such a case, however, it might be better to\nmaintain the package as a non-native package.\n\n(3) (5) To be precise, the string should match the following Perl\nregular expression:\n\n/closes:\\s*(?:bug)?\\#?\\s?\\d+(?:,\\s*(?:bug)?\\#?\\s?\\d+)*/i\n",
            "subsections": []
        },
        "Then all of the bug numbers listed will be closed by the archive": {
            "content": "maintenance software ('dak') using the version of the changelog entry.\n\n(4) (6) In the case of a sponsored upload, the uploader signs the\nfiles, but the changelog maintainer name and address are those of the\nperson who prepared this release.  If the preparer of the release is not\none of the usual maintainers of the package (as listed in the *note\nMaintainer: 47. or *note Uploaders: 48. control fields of the package),\nthe first line of the changelog is conventionally used to explain why a\nnon-maintainer is uploading the package.  The Debian Developer's\nReference (see *note Related documents: 11.) documents the conventions\nused.\n\n(5) (7) This is the same as the format generated by 'date -R'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Copyright debian/copyright,  Next: Error trapping in makefiles,  Prev: Debian changelog debian/changelog,  Up: Source packages": {
            "content": "",
            "subsections": [
                {
                    "name": "4.5 Copyright: 'debian/copyright'",
                    "content": ""
                }
            ]
        },
        "This file is often required to contain a verbatim copy of the package's": {
            "content": "copyright information, too; see *note Copyright information: 2a. and\n*note Copyright considerations: 29. for details, and for further\nconsiderations related to copyrights for packages.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Error trapping in makefiles,  Next: Time Stamps,  Prev: Copyright debian/copyright,  Up: Source packages": {
            "content": "",
            "subsections": [
                {
                    "name": "4.6 Error trapping in makefiles",
                    "content": ""
                }
            ]
        },
        "When 'make' invokes a command in a makefile (including your package's": {
            "content": "upstream makefiles and 'debian/rules'), it does so using 'sh'.  This\nmeans that 'sh''s usual bad error handling properties apply: if you\ninclude a miniature script as one of the commands in your makefile\nyou'll find that if you don't do anything about it then errors are not\ndetected and 'make' will blithely continue after problems.\n",
            "subsections": []
        },
        "Every time you put more than one shell command (this includes using a": {
            "content": "loop) in a makefile command you must make sure that errors are trapped.",
            "subsections": []
        },
        "For simple compound commands, such as changing directory and then": {
            "content": "running a program, using '&&' rather than semicolon as a command\nseparator is sufficient.  For more complex commands including most loops\nand conditionals you should include a separate 'set -e' command at the\nstart of every makefile command that's actually one of these miniature\nshell scripts.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Time Stamps,  Next: Restrictions on objects in source packages,  Prev: Error trapping in makefiles,  Up: Source packages": {
            "content": "",
            "subsections": [
                {
                    "name": "4.7 Time Stamps",
                    "content": ""
                }
            ]
        },
        "Maintainers should preserve the modification times of the upstream": {
            "content": "source files in a package, as far as is reasonably possible.  (1)\n\n---------- Footnotes ----------\n\n(1) (8) The rationale is that there is some information conveyed by\nknowing the age of the file, for example, you could recognize that some\ndocumentation is very old by looking at the modification time, so it\nwould be nice if the modification time of the upstream source would be\npreserved.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Restrictions on objects in source packages,  Next: Main building script debian/rules,  Prev: Time Stamps,  Up: Source packages": {
            "content": "",
            "subsections": [
                {
                    "name": "4.8 Restrictions on objects in source packages",
                    "content": ""
                }
            ]
        },
        "The source package must not contain any hard links, (1) device special": {
            "content": "files, sockets or setuid or setgid files..  (2)\n\n---------- Footnotes ----------\n\n(1) (9) This is not currently detected when building source packages,\nbut only when extracting them.\n",
            "subsections": []
        },
        "Hard links may be permitted at some point in the future, but would": {
            "content": "require a fair amount of work.\n\n(2) (10) Setgid directories are allowed.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Main building script debian/rules,  Next: Variable substitutions debian/substvars,  Prev: Restrictions on objects in source packages,  Up: Source packages": {
            "content": "",
            "subsections": [
                {
                    "name": "4.9 Main building script: 'debian/rules'",
                    "content": ""
                }
            ]
        },
        "This file must be an executable makefile.  It contains the": {
            "content": "package-specific recipes for compiling the source (if required) and\nconstructing one or more binary packages.\n\n'debian/rules' must start with the line '#!/usr/bin/make -f', so that it\ncan be invoked by saying its name rather than invoking 'make'\nexplicitly.  That is, invoking either of 'make -f debian/rules args...'\nor './debian/rules args...' must result in identical behavior.\n",
            "subsections": []
        },
        "The recommended way to implement the build process of a Debian package,": {
            "content": "in the absence of a good reason to use a different approach, is the 'dh'\ntool.  This includes the contents of the 'debian/rules' building script.\n'dh' is the most common packaging helper tool in Debian.  Using it will\nusually save effort in complying with the rules in this document,\nbecause 'dh' will automatically implement many of them without requiring\nexplicit instructions.\n",
            "subsections": []
        },
        "There are sometimes good reasons to use a different approach.  For": {
            "content": "example, the standard tools for packaging software written in some\nlanguages may use another tool; some rarer packaging patterns, such as\nmultiple builds of the same software with different options, are easier\nto express with other tools; and a packager working on a different\npackaging helper might want to use their tool.  The recommendation to\nuse 'dh' does not always apply, and use of 'dh' is not required.\n",
            "subsections": []
        },
        "For more information about how to use 'dh', see the documentation in the": {
            "content": "debhelper package, most notably the 'dh(1)' manual page.\n",
            "subsections": []
        },
        "The following targets are required and must be implemented by": {
            "content": "'debian/rules': 'clean', 'binary', 'binary-arch', 'binary-indep',\n'build', 'build-arch' and 'build-indep'.  These are the targets called\nby 'dpkg-buildpackage'.\n",
            "subsections": []
        },
        "Since an interactive 'debian/rules' script makes it impossible to": {
            "content": "auto-compile that package and also makes it hard for other people to\nreproduce the same binary package, all required targets must be\nnon-interactive.  It also follows that any target that these targets\ndepend on must also be non-interactive.\n",
            "subsections": []
        },
        "The package build should be as verbose as reasonably possible, except": {
            "content": "where the 'terse' tag is included in 'DEBBUILDOPTIONS' (see *note\ndebian/rules and DEBBUILDOPTIONS: 79.).  This makes life easier for\nporters and bug squashers more generally, who can look at build logs for\npossible problems.  To accomplish this, 'debian/rules' should pass to\nthe commands it invokes options that cause them to produce verbose\noutput.  For example, the build target should pass\n'--disable-silent-rules' to any configure scripts.  See also *note\nBinaries: 7a.\n",
            "subsections": []
        },
        "For packages in the main archive, required targets must not attempt": {
            "content": "network access, except, via the loopback interface, to services on the\nbuild host that have been started by the build.\n",
            "subsections": []
        },
        "Required targets must not attempt to write outside of the unpacked": {
            "content": "source package tree.  There are two exceptions.  Firstly, the binary\ntargets may write the binary packages to the parent directory of the\nunpacked source package tree.  Secondly, required targets may write to\n'/tmp', '/var/tmp' and to the directory specified by the 'TMPDIR'\nenvironment variable, but must not depend on the contents of any of\nthese.\n",
            "subsections": []
        },
        "This restriction is intended to prevent source package builds creating": {
            "content": "and depending on state outside of themselves, thus affecting multiple\nindependent rebuilds.  In particular, the required targets must not\nattempt to write into 'HOME'.\n\nThe targets are as follows:\n\n'build' (required)\n\nThe 'build' target should perform all the configuration and\ncompilation of the package.  If a package has an interactive\npre-build configuration routine, the Debian source package must\neither be built after this has taken place (so that the binary\npackage can be built without rerunning the configuration) or the\nconfiguration routine modified to become non-interactive.  (The\nlatter is preferable if there are architecture-specific features\ndetected by the configuration routine.)\n\nFor some packages, notably ones where the same source tree is\ncompiled in different ways to produce two binary packages, the\n'build' target does not make much sense.  For these packages it is\ngood enough to provide two (or more) targets ('build-a' and\n'build-b' or whatever) for each of the ways of building the\npackage, and a 'build' target that does nothing.  The 'binary'\ntarget will have to build the package in each of the possible ways\nand make the binary package out of each.\n\nThe 'build' target must not do anything that might require root\nprivilege.\n\nThe 'build' target may need to run the 'clean' target first - see\nbelow.\n\nWhen a package has a configuration and build routine which takes a\nlong time, or when the makefiles are poorly designed, or when\n'build' needs to run 'clean' first, it is a good idea to 'touch\nbuild' when the build process is complete.  This will ensure that\nif 'debian/rules build' is run again it will not rebuild the whole\nprogram.  (1)\n\n'build-arch' (required), 'build-indep' (required)\n\nThe 'build-arch' target must perform all the configuration and\ncompilation required for producing all architecture-dependent\nbinary packages (those packages for which the body of the\n'Architecture' field in 'debian/control' is not 'all').  Similarly,\nthe 'build-indep' target must perform all the configuration and\ncompilation required for producing all architecture-independent\nbinary packages (those packages for which the body of the\n'Architecture' field in 'debian/control' is 'all').  The 'build'\ntarget should either depend on those targets or take the same\nactions as invoking those targets would perform.  (2)\n\nThe 'build-arch' and 'build-indep' targets must not do anything\nthat might require root privilege.\n\n'binary' (required), 'binary-arch' (required), 'binary-indep' (required)\n\nThe 'binary' target must be all that is necessary for the user to\nbuild the binary package(s) produced from this source package.  It\nis split into two parts: 'binary-arch' builds the binary packages\nwhich are specific to a particular architecture, and 'binary-indep'\nbuilds those which are not.\n\n'binary' may be (and commonly is) a target with no commands which\nsimply depends on 'binary-arch' and 'binary-indep'.\n\nBoth 'binary-*' targets should depend on the 'build' target, or on\nthe appropriate 'build-arch' or 'build-indep' target, so that the\npackage is built if it has not been already.  It should then create\nthe relevant binary package(s), using 'dpkg-gencontrol' to make\ntheir control files and 'dpkg-deb' to build them and place them in\nthe parent of the top level directory.\n\nBoth the 'binary-arch' and 'binary-indep' targets `must' exist.  If\none of them has nothing to do (which will always be the case if the\nsource generates only a single binary package, whether\narchitecture-dependent or not), it must still exist and must always\nsucceed.\n\nThe 'binary' targets may need to be invoked as root depending on\nthe value of the *note Rules-Requires-Root: 7b. field.  (3)\n\n'clean' (required)\n\nThis must undo any effects that the 'build' and 'binary' targets\nmay have had, except that it should leave alone any output files\ncreated in the parent directory by a run of a 'binary' target.\n\nIf a 'build' file is touched at the end of the 'build' target, as\nsuggested above, it should be removed as the first action that\n'clean' performs, so that running 'build' again after an\ninterrupted 'clean' doesn't think that everything is already done.\n\nThe 'clean' target may need to be invoked as root if 'binary' has\nbeen invoked since the last 'clean', or if 'build' has been invoked\nas root (since 'build' may create directories, for example).\n\nThe 'clean' target cannot be used to remove files in the source\ntree that are not compatible with the DFSG. This is because the\nfiles would remain in the upstream tarball, and thus in the source\npackage, so the source package would continue to violate DFSG.\nInstead, the upstream source should be repacked to remove those\nfiles.\n\n'patch' (optional)\n\nThis target performs whatever additional actions are required to\nmake the source ready for editing (unpacking additional upstream\narchives, applying patches, etc.).  It is recommended to be\nimplemented for any package where 'dpkg-source -x' does not result\nin source ready for additional modification.  See *note Source\npackage handling; debian/README.source: 7c.\n",
            "subsections": []
        },
        "The 'build', 'binary' and 'clean' targets must be invoked with the": {
            "content": "current directory being the package's top-level directory.\n",
            "subsections": []
        },
        "Additional targets may exist in 'debian/rules', either as published or": {
            "content": "undocumented interfaces or for the package's internal use.\n",
            "subsections": []
        },
        "The architectures we build on and build for are determined by 'make'": {
            "content": "variables using the utility 'dpkg-architecture'.  You can determine the",
            "subsections": []
        },
        "Debian architecture and the GNU style architecture specification string": {
            "content": "for the build architecture as well as for the host architecture.  The\nbuild architecture is the architecture on which 'debian/rules' is run\nand the package build is performed.  The host architecture is the\narchitecture on which the resulting package will be installed and run.",
            "subsections": []
        },
        "The target architecture is the architecture of the packages that the": {
            "content": "compiler currently being built will generate.  These are normally the\nsame, but may be different in the case of cross-compilation (building\npackages for one architecture on machines of a different architecture),\nbuilding a cross-compiler (a compiler package that will generate objects\nfor one architecture, built on a machine of a different architecture) or\na Canadian cross-compiler (a compiler that will generate objects for one\narchitecture, built on a machine of a different architecture, that will\nrun on yet a different architecture).\n\nHere is a list of supported 'make' variables:\n\n- 'DEB*ARCH' (the Debian architecture)\n\n- 'DEB*ARCHCPU' (the Debian CPU name)\n\n- 'DEB*ARCHBITS' (the Debian CPU pointer size in bits)\n\n- 'DEB*ARCHENDIAN' (the Debian CPU endianness)\n\n- 'DEB*ARCHOS' (the Debian System name)\n\n- 'DEB*GNUTYPE' (the GNU style architecture specification string)\n\n- 'DEB*GNUCPU' (the CPU part of 'DEB*GNUTYPE')\n\n- 'DEB*GNUSYSTEM' (the System part of 'DEB*GNUTYPE')\n\nwhere '*' is either 'BUILD' for specification of the build architecture,\n'HOST' for specification of the host architecture or 'TARGET' for\nspecification of the target architecture.\n",
            "subsections": []
        },
        "Backward compatibility can be provided in the rules file by setting the": {
            "content": "needed variables to suitable default values; please refer to the\ndocumentation of 'dpkg-architecture' for details.\n\nIt is important to understand that the 'DEB*ARCH' string only\ndetermines which Debian architecture we are building on or for.  It\nshould not be used to get the CPU or system information; the\n'DEB*ARCHCPU' and 'DEB*ARCHOS' variables should be used for that.\nGNU style variables should generally only be used with upstream build\nsystems.\n",
            "subsections": []
        },
        "The builder may set 'DEBRULESREQUIRESROOT' environment variable when": {
            "content": "calling any of the mandatory targets as defined in *note",
            "subsections": []
        },
        "Rules-Requires-Root: 7b.  If the variable is not set, the package must": {
            "content": "behave as if it was set to 'binary-targets'.\n\n* Menu:\n\n* debian/rules and DEBBUILDOPTIONS::\n* debian/rules and Rules-Requires-Root::\n\n---------- Footnotes ----------\n\n(1) (11) Another common way to do this is for 'build' to depend on\n'build-stamp' and to do nothing else, and for the 'build-stamp' target\nto do the building and to 'touch build-stamp' on completion.  This is\nespecially useful if the build routine creates a file or directory\ncalled 'build'; in such a case, 'build' will need to be listed as a\nphony target (i.e., as a dependency of the '.PHONY' target).  See the\ndocumentation of 'make' for more information on phony targets.\n\n(2) (12) This split allows binary-only builds to not install the\ndependencies required for the 'build-indep' target and skip any\nresource-intensive build tasks that are only required when building\narchitecture-independent binary packages.\n\n(3) (13) The 'fakeroot' package often allows one to build a package\ncorrectly even without being root.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: debian/rules and DEBBUILDOPTIONS,  Next: debian/rules and Rules-Requires-Root,  Up: Main building script debian/rules": {
            "content": "",
            "subsections": []
        },
        "Supporting the standardized environment variable 'DEBBUILDOPTIONS' is": {
            "content": "recommended.  This variable can contain several flags to change how a\npackage is compiled and built.  Each flag must be in the form flag or\nflag=options.  If multiple flags are given, they must be separated by\nwhitespace.  (1) flag must start with a lowercase letter ('a-z') and\nconsist only of lowercase letters, numbers ('0-9'), and the characters\n'-' and '' (hyphen and underscore).  options must not contain\nwhitespace.  The same tag should not be given multiple times with\nconflicting values.  Package maintainers may assume that\n'DEBBUILDOPTIONS' will not contain conflicting tags.\n\nThe meaning of the following tags has been standardized:\n\n'nocheck'\n\nThis tag says to not run any build-time test suite provided by the\npackage.\n\n'nodoc'\n\nThis tag says to skip any build steps that only generate package\ndocumentation.  Files required by other sections of Debian Policy,\nsuch as copyright and changelog files, must still be generated and\nput in the package, but other generated documentation such as\nhelp2man-generated pages, Doxygen-generated API documentation, or\ninfo pages generated from Texinfo sources should be skipped if\npossible.  This option does not change the set of binary packages\ngenerated by the source package, but documentation-only binary\npackages may be nearly empty when built with this option.\n\n'noopt'\n\nThe presence of this tag means that the package should be compiled\nwith a minimum of optimization.  For C programs, it is best to add\n'-O0' to 'CFLAGS' (although this is usually the default).  Some\nprograms might fail to build or run at this level of optimization;\nit may be necessary to use '-O1', for example.\n\n'nostrip'\n\nThis tag means that the debugging symbols should not be stripped\nfrom the binary during installation, so that debugging information\nmay be included in the package.\n\n'parallel=n'\n\nThis tag means that the package should be built using up to 'n'\nparallel processes if the package build system supports this.  (2)\nIf the package build system does not support parallel builds, this\nstring must be ignored.  If the package build system only supports\na lower level of concurrency than n, the package should be built\nusing as many parallel processes as the package build system\nsupports.  It is up to the package maintainer to decide whether the\npackage build times are long enough and the package build system is\nrobust enough to make supporting parallel builds worthwhile.\n\n'terse'\n\nThis tag means that the package build will be less verbose than\ndefault.  For example, 'debian/rules' might pass options to the\npackage's configure script that cause the compiler to produce less\noutput.\n\nUnknown flags must be ignored by 'debian/rules'.\n",
            "subsections": []
        },
        "The following makefile snippet is an example of how one may implement": {
            "content": "the build options; you will probably have to massage this example in\norder to make it work for your package.\n\nCFLAGS = -Wall -g\nINSTALL = install\nINSTALLFILE    = $(INSTALL) -p    -o root -g root  -m  644\nINSTALLPROGRAM = $(INSTALL) -p    -o root -g root  -m  755\nINSTALLSCRIPT  = $(INSTALL) -p    -o root -g root  -m  755\nINSTALLDIR     = $(INSTALL) -p -d -o root -g root  -m  755\n\nifneq (,$(filter noopt,$(DEBBUILDOPTIONS)))\nCFLAGS += -O0\nelse\nCFLAGS += -O2\nendif\nifeq (,$(filter nostrip,$(DEBBUILDOPTIONS)))\nINSTALLPROGRAM += -s\nendif\nifneq (,$(filter parallel=%,$(DEBBUILDOPTIONS)))\nNUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEBBUILDOPTIONS)))\nMAKEFLAGS += -j$(NUMJOBS)\nendif\n\nbuild:\n# ...\nifeq (,$(filter nocheck,$(DEBBUILDOPTIONS)))\n# Code to run the package test suite.\nendif\n\n---------- Footnotes ----------\n\n(1) (14) Some packages support any delimiter, but whitespace is the\neasiest to parse inside a makefile and avoids ambiguity with flag values\nthat contain commas.\n\n(2) (15) Packages built with 'make' can often implement this by\npassing the '-j'n option to 'make'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: debian/rules and Rules-Requires-Root,  Prev: debian/rules and DEBBUILDOPTIONS,  Up: Main building script debian/rules": {
            "content": "Depending on the value of the *note Rules-Requires-Root: 7b. field, the\npackage builder (e.g.  dpkg-buildpackage) may run the 'debian/rules'\ntarget as an unprivileged user and provide a 'gain root command'.  This\ncommand allows the 'debian/rules' target to run particular subcommands\nunder (fake)root.\n",
            "subsections": []
        },
        "The 'gain root command' is passed to the build script via the": {
            "content": "'DEBGAINROOTCMD' environment variable.  The contents of this variable\nis a space separated list, the first entry of which is the command, and\nthe proceeding entries of which are arguments to the command.  The 'gain\nroot command' must be available via PATH. The 'gain root command' must\nnot rely on shell features because it will not necessarily be invoked\nvia a shell.\n",
            "subsections": []
        },
        "The 'gain root command' must not run interactively, including prompting": {
            "content": "for any user input.  It must be possible to prepend the 'gain root\ncommand' to an existing command and its arguments, without needing to\nalter or quote the existing command and its arguments.  Furthermore, the\n'gain root command' must preserve all environment variables without the\ncaller having to explicitly request any preservation.\n",
            "subsections": []
        },
        "The following are examples of valid gain root commands (in syntax of": {
            "content": "sh), assuming the tools used are available and properly configured:\n\n# Command \"sudo\", with arguments \"-nE\" and \"--\"\nexport DEBGAINROOTCMD='sudo -nE --'\n# Command \"fakeroot\" with the single argument \"--\"\nexport DEBGAINROOTCMD='fakeroot --'\n\nExamples of valid use of the 'gain root command':\n\n# sh-syntax (assumes set -e semantics for error handling)\n$DEBGAINROOTCMD some-cmd --which-requires-root\n\n# perl\nmy @cmd = ('some-cmd', '--which-requires-root');\nunshift(@cmd, split(' ', $ENV{DEBGAINROOTCMD})) if $ENV{DEBGAINROOTCMD};\nsystem(@cmd) == 0 or die(\"@cmd failed\");\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Variable substitutions debian/substvars,  Next: Upstream source location debian/watch,  Prev: Main building script debian/rules,  Up: Source packages": {
            "content": "",
            "subsections": [
                {
                    "name": "4.10 Variable substitutions: 'debian/substvars'",
                    "content": "When 'dpkg-gencontrol' generates *note binary package control files: 33.\n('DEBIAN/control'), it performs variable substitutions on its output\njust before writing it.  Variable substitutions have the form\n'${variable}'.  The optional file 'debian/substvars' contains variable\nsubstitutions to be used; variables can also be set directly from\n'debian/rules' using the '-V' option to the source packaging commands,\nand certain predefined variables are also available.\n"
                }
            ]
        },
        "The 'debian/substvars' file is usually generated and modified": {
            "content": "dynamically by 'debian/rules' targets, in which case it must be removed\nby the 'clean' target.\n",
            "subsections": []
        },
        "See 'deb-substvars(5)' for full details about source variable": {
            "content": "substitutions, including the format of 'debian/substvars'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Upstream source location debian/watch,  Next: Generated files list debian/files,  Prev: Variable substitutions debian/substvars,  Up: Source packages": {
            "content": "",
            "subsections": [
                {
                    "name": "4.11 Upstream source location: 'debian/watch'",
                    "content": ""
                }
            ]
        },
        "This is a configuration file for the 'uscan' utility which defines how": {
            "content": "to automatically scan ftp or http sites for newly available updates of\nthe package.  This is also used by some Debian QA tools to help with\nquality control and maintenance of the distribution as a whole.  If the\nupstream source of the package is available via a mechaism that 'uscan'\nunderstands, including this configuration file is recommended.\n",
            "subsections": []
        },
        "If the upstream maintainer of the software provides OpenPGP signatures": {
            "content": "for new releases, including the information required for 'uscan' to\nverify signatures for new upstream releases is also recommended.  To do\nthis, use the 'pgpsigurlmangle' option in 'debian/watch' to specify the\nlocation of the upstream signature, and include the key or keys used to\nsign upstream releases in the Debian source package as\n'debian/upstream/signing-key.asc'.\n",
            "subsections": []
        },
        "For more information about 'uscan' and these options, including how to": {
            "content": "generate the file containing upstream signing keys, see 'uscan(1)'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Generated files list debian/files,  Next: Embedded code copies,  Prev: Upstream source location debian/watch,  Up: Source packages": {
            "content": "",
            "subsections": [
                {
                    "name": "4.12 Generated files list: 'debian/files'",
                    "content": ""
                }
            ]
        },
        "This file is not a permanent part of the source tree; it is used while": {
            "content": "building packages to record which files are being generated.\n'dpkg-genchanges' uses it when it generates a '.changes' file.\n",
            "subsections": []
        },
        "It should not exist in a shipped source package, and so it (and any": {
            "content": "backup files or temporary files such as 'files.new') (1) should be\nremoved by the 'clean' target.  It may also be wise to ensure a fresh\nstart by emptying or removing it at the start of the 'binary' target.\n",
            "subsections": []
        },
        "When 'dpkg-gencontrol' is run for a binary package, it adds an entry to": {
            "content": "'debian/files' for the '.deb' file that will be created when 'dpkg-deb\n--build' is run for that binary package.  So for most packages all that\nneeds to be done with this file is to delete it in the 'clean' target.\n",
            "subsections": []
        },
        "If a package upload includes files besides the source package and any": {
            "content": "binary packages whose control files were made with 'dpkg-gencontrol'\nthen they should be placed in the parent of the package's top-level\ndirectory and 'dpkg-distaddfile' should be called to add the file to the\nlist in 'debian/files'.\n\n---------- Footnotes ----------\n\n(1) (16) 'files.new' is used as a temporary file by 'dpkg-gencontrol'\nand 'dpkg-distaddfile' - they write a new version of 'files' here before\nrenaming it, to avoid leaving a corrupted copy if an error occurs.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Embedded code copies,  Next: Source package handling debian/README source,  Prev: Generated files list debian/files,  Up: Source packages": {
            "content": "",
            "subsections": [
                {
                    "name": "4.13 Embedded code copies",
                    "content": ""
                }
            ]
        },
        "Some software packages include in their distribution convenience copies": {
            "content": "of code from other software packages, generally so that users compiling\nfrom source don't have to download multiple packages.  Debian packages\nshould not make use of these convenience copies unless the included\npackage is explicitly intended to be used in this way.  (1) If the\nincluded code is already in the Debian archive in the form of a library,\nthe Debian packaging should ensure that binary packages reference the\nlibraries already in Debian and the convenience copy is not used.  If\nthe included code is not already in Debian, it should be packaged\nseparately as a prerequisite if possible.  (2)\n\n---------- Footnotes ----------\n\n(1) (17) For example, parts of the GNU build system work like this.\n\n(2) (18) Having multiple copies of the same code in Debian is\ninefficient, often creates either static linking or shared library\nconflicts, and, most importantly, increases the difficulty of handling\nsecurity vulnerabilities in the duplicated code.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Source package handling debian/README source,  Next: Reproducibility,  Prev: Embedded code copies,  Up: Source packages": {
            "content": "",
            "subsections": [
                {
                    "name": "4.14 Source package handling: 'debian/README.source'",
                    "content": ""
                }
            ]
        },
        "If running 'dpkg-source -x' on a source package doesn't produce the": {
            "content": "source of the package, ready for editing, and allow one to make changes\nand run 'dpkg-buildpackage' to produce a modified package without taking\nany additional steps, creating a 'debian/README.source' documentation\nfile is recommended.  This file should explain how to do all of the\nfollowing:\n\n1. Generate the fully patched source, in a form ready for editing,\nthat would be built to create Debian packages.  Doing this with a\n'patch' target in 'debian/rules' is recommended; see *note Main\nbuilding script; debian/rules: 78.\n\n2. Modify the source and save those modifications so that they will be\napplied when building the package.\n\n3. Remove source modifications that are currently being applied when\nbuilding the package.\n\n4. Optionally, document what steps are necessary to upgrade the Debian\nsource package to a new upstream version, if applicable.\n",
            "subsections": []
        },
        "This explanation should include specific commands and mention any": {
            "content": "additional required Debian packages.  It should not assume familiarity\nwith any specific Debian packaging system or patch management tools.\n",
            "subsections": []
        },
        "This explanation may refer to a documentation file installed by one of": {
            "content": "the package's build dependencies provided that the referenced\ndocumentation clearly explains these tasks and is not a general\nreference manual.\n\n'debian/README.source' may also include any other information that would\nbe helpful to someone modifying the source package.  Even if the package\ndoesn't fit the above description, maintainers are encouraged to\ndocument in a 'debian/README.source' file any source package with a\nparticularly complex or unintuitive source layout or build system (for\nexample, a package that builds the same source multiple times to\ngenerate different binary packages).\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Reproducibility,  Next: Missing sources debian/missing-sources,  Prev: Source package handling debian/README source,  Up: Source packages": {
            "content": "",
            "subsections": [
                {
                    "name": "4.15 Reproducibility",
                    "content": ""
                }
            ]
        },
        "Packages should build reproducibly, which for the purposes of this": {
            "content": "document (1) means that given\n\n- a version of a source package unpacked at a given path;\n\n- a set of versions of installed build dependencies;\n\n- a set of environment variable values;\n\n- a build architecture; and\n\n- a host architecture,\n\nrepeatedly building the source package for the build architecture on any\nmachine of the host architecture with those versions of the build\ndependencies installed and exactly those environment variable values set\nwill produce bit-for-bit identical binary packages.\n",
            "subsections": []
        },
        "It is recommended that packages produce bit-for-bit identical binaries": {
            "content": "even if most environment variables and build paths are varied.  It is\nintended for this stricter standard to replace the above when it is\neasier for packages to meet it.\n\n---------- Footnotes ----------\n\n(1) (19) This is Debian's precisification of the\nreproducible-builds.org definition\n(https://reproducible-builds.org/docs/definition/).\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Missing sources debian/missing-sources,  Next: Vendor-specific patch series,  Prev: Reproducibility,  Up: Source packages": {
            "content": "",
            "subsections": [
                {
                    "name": "4.16 Missing sources: 'debian/missing-sources'",
                    "content": ""
                }
            ]
        },
        "Sometimes upstream does not include the source code for some files in": {
            "content": "the upstream tarball.  In order to satisfy the DFSG for packages in\n'main' or 'contrib', you should either:\n\n1. repack the upstream tarball to include those sources; or\n\n2. include a copy of the sources in the 'debian/missing-sources'\ndirectory.\n",
            "subsections": []
        },
        "Package maintainers may optionally use the following convention to": {
            "content": "organize the contents of 'debian/missing-sources': for a sourceless file\n'foo' in the subdirectory 'bar' of the upstream tarball, where the\nsource of 'foo' has extension 'baz', place the source at\n'debian/missing-sources/bar/foo.baz'.  For example, according to this\nconvention, the C source code of an executable 'checksum/util' would be\nlocated at 'debian/missing-sources/checksum/util.c'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Vendor-specific patch series,  Prev: Missing sources debian/missing-sources,  Up: Source packages": {
            "content": "",
            "subsections": [
                {
                    "name": "4.17 Vendor-specific patch series",
                    "content": ""
                }
            ]
        },
        "Packages in the Debian archive using the 3.0 (quilt) source package": {
            "content": "format must not contain a non-default series file.  That is, there must\nnot exist a file 'debian/patches/foo.series' for any 'foo'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Control files and their fields,  Next: Package maintainer scripts and installation procedure,  Prev: Source packages,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "5 Control files and their fields": {
            "content": "",
            "subsections": []
        },
        "The package management system manipulates data represented in a common": {
            "content": "format, known as `control data', stored in `control files'.  Control\nfiles are used for source packages, binary packages and the '.changes'\nfiles which control the installation of uploaded files.  (1)\n\n* Menu:\n\n* Syntax of control files::\n* Source package control files - debian/control::\n* Binary package control files - DEBIAN/control::\n* Debian source control files - .dsc: Debian source control files - dsc.\n* Debian changes files - .changes: Debian changes files - changes.\n* List of fields::\n* User-defined fields::\n* Obsolete fields::\n\n---------- Footnotes ----------\n\n(1) (1) 'dpkg''s internal databases are in a similar format.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Syntax of control files,  Next: Source package control files - debian/control,  Up: Control files and their fields": {
            "content": "",
            "subsections": [
                {
                    "name": "5.1 Syntax of control files",
                    "content": "A control file consists of one or more paragraphs of fields.  (1) The\nparagraphs are separated by empty lines.  Parsers may accept lines\nconsisting solely of spaces and tabs as paragraph separators, but\ncontrol files should use empty lines.  Some control files allow only one\nparagraph; others allow several, in which case each paragraph usually\nrefers to a different package.  (For example, in source packages, the\nfirst paragraph refers to the source package, and later paragraphs refer\nto binary packages generated from the source.)  The ordering of the\nparagraphs in control files is significant.\n"
                }
            ]
        },
        "Each paragraph consists of a series of data fields.  Each field consists": {
            "content": "of the field name followed by a colon and then the data/value associated\nwith that field.  The field name is composed of US-ASCII characters\nexcluding control characters, space, and colon (i.e., characters in the\nranges U+0021 ('!') through U+0039 ('9'), and U+003B (';') through\nU+007E ('~'), inclusive).  Field names must not begin with the comment\ncharacter (U+0023 '#'), nor with the hyphen character (U+002D '-').\n",
            "subsections": []
        },
        "The field ends at the end of the line or at the end of the last": {
            "content": "continuation line (see below).  Horizontal whitespace (spaces and tabs)\nmay occur immediately before or after the value and is ignored there; it\nis conventional to put a single space after the colon.  For example, a\nfield might be:\n\nPackage: libc6\n\nthe field name is 'Package' and the field value 'libc6'.\n",
            "subsections": []
        },
        "Empty field values are only permitted in source package control files": {
            "content": "('debian/control').  Such fields are ignored.\n\nA paragraph must not contain more than one instance of a particular\nfield name.\n\nThere are three types of fields:\n\nsimple\n\nThe field, including its value, must be a single line.  Folding of\nthe field is not permitted.  This is the default field type if the\ndefinition of the field does not specify a different type.\n\nfolded\n\nThe value of a folded field is a logical line that may span several\nlines.  The lines after the first are called continuation lines and\nmust start with a space or a tab.  Whitespace, including any\nnewlines, is not significant in the field values of folded fields.\n(2)\n\nmultiline\n\nThe value of a multiline field may comprise multiple continuation\nlines.  The first line of the value, the part on the same line as\nthe field name, often has special significance or may have to be\nempty.  Other lines are added following the same syntax as the\ncontinuation lines of the folded fields.  Whitespace, including\nnewlines, is significant in the values of multiline fields.\n",
            "subsections": []
        },
        "Whitespace must not appear inside names (of packages, architectures,": {
            "content": "files or anything else) or version numbers, or between the characters of\nmulti-character version relationships.\n",
            "subsections": []
        },
        "The presence and purpose of a field, and the syntax of its value, may": {
            "content": "differ between types of control files.\n",
            "subsections": []
        },
        "Field names are not case-sensitive, but it is usual to capitalize the": {
            "content": "field names using mixed case as shown below.  Field values are\ncase-sensitive unless the description of the field says otherwise.\n\nParagraph separators (empty lines), and lines consisting only of U+0020\nSPACE and U+0009 TAB, are not allowed within field values or between\nfields.  Empty lines in field values are usually escaped by representing\nthem by a U+0020 SPACE followed by a U+002E ('.').\n\nLines starting with U+0023 ('#'), without any preceding whitespace, are\ncomment lines that are only permitted in source package control files\n('debian/control').  These comment lines are ignored, even between two\ncontinuation lines.  They do not end logical lines.\n\nAll control files must be encoded in UTF-8.\n\n---------- Footnotes ----------\n\n(1) (2) The paragraphs are also sometimes referred to as stanzas.\n\n(2) (3) This folding method is similar to RFC 5322, allowing control\nfiles that contain only one paragraph and no multiline fields to be read\nby parsers written for RFC 5322.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Source package control files - debian/control,  Next: Binary package control files - DEBIAN/control,  Prev: Syntax of control files,  Up: Control files and their fields": {
            "content": "",
            "subsections": [
                {
                    "name": "5.2 Source package control files - 'debian/control'",
                    "content": ""
                }
            ]
        },
        "The 'debian/control' file contains the most vital (and": {
            "content": "version-independent) information about the source package and about the\nbinary packages it creates.\n",
            "subsections": []
        },
        "The first paragraph of the control file contains information about the": {
            "content": "source package in general.  The subsequent paragraphs each describe a\nbinary package that the source tree builds.  Each binary package built\nfrom this source package has a corresponding paragraph, except for any\nautomatically-generated debug packages that do not require one.\n",
            "subsections": []
        },
        "The fields in the general paragraph (the first one, for the source": {
            "content": "package) are:\n\n- *note Source: 91. (mandatory)\n\n- *note Maintainer: 47. (mandatory)\n\n- *note Uploaders: 48.\n\n- *note Section: 2d. (recommended)\n\n- *note Priority: 30. (recommended)\n\n- *note Build-Depends et al: 92.\n\n- *note Standards-Version: 62. (mandatory)\n\n- *note Homepage: 93.\n\n- *note Version Control System (VCS) fields: 94.\n\n- *note Testsuite: 95.\n\n- *note Rules-Requires-Root: 7b.\n\nThe fields in the binary package paragraphs are:\n\n- *note Package: 3a. (mandatory)\n\n- *note Architecture: 96. (mandatory)\n\n- *note Section: 2d. (recommended)\n\n- *note Priority: 30. (recommended)\n\n- *note Essential: 59.\n\n- *note Depends et al: 97.\n\n- *note Description: 4b. (mandatory)\n\n- *note Homepage: 93.\n\n- *note Built-Using: 98.\n\n- *note Package-Type: 99.\n\nThe syntax and semantics of the fields are described below.\n",
            "subsections": []
        },
        "These fields are used by 'dpkg-gencontrol' to generate control files for": {
            "content": "binary packages (see below), by 'dpkg-genchanges' to generate the\n'.changes' file to accompany the upload, and by 'dpkg-source' when it\ncreates the '.dsc' source control file as part of a source archive.",
            "subsections": []
        },
        "Some fields are folded in 'debian/control', but not in any other control": {
            "content": "file.  These tools are responsible for removing the line breaks from\nsuch fields when using fields from 'debian/control' to generate other\ncontrol files.  They are also responsible for discarding empty fields.\n",
            "subsections": []
        },
        "The fields here may contain variable references - their values will be": {
            "content": "substituted by 'dpkg-gencontrol', 'dpkg-genchanges' or 'dpkg-source'\nwhen they generate output control files.  See *note Variable\nsubstitutions; debian/substvars: 80. for details.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Binary package control files - DEBIAN/control,  Next: Debian source control files - dsc,  Prev: Source package control files - debian/control,  Up: Control files and their fields": {
            "content": "",
            "subsections": [
                {
                    "name": "5.3 Binary package control files - 'DEBIAN/control'",
                    "content": ""
                }
            ]
        },
        "The 'DEBIAN/control' file contains the most vital (and": {
            "content": "version-dependent) information about a binary package.  It consists of a\nsingle paragraph.\n\nThe fields in this file are:\n\n- *note Package: 3a. (mandatory)\n\n- *note Source: 91.\n\n- *note Version: 3f. (mandatory)\n\n- *note Section: 2d. (recommended)\n\n- *note Priority: 30. (recommended)\n\n- *note Architecture: 96. (mandatory)\n\n- *note Essential: 59.\n\n- *note Depends et al: 97.\n\n- *note Installed-Size: 9b.\n\n- *note Maintainer: 47. (mandatory)\n\n- *note Description: 4b. (mandatory)\n\n- *note Homepage: 93.\n\n- *note Built-Using: 98.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Debian source control files - dsc,  Next: Debian changes files - changes,  Prev: Binary package control files - DEBIAN/control,  Up: Control files and their fields": {
            "content": "",
            "subsections": [
                {
                    "name": "5.4 Debian source control files - '.dsc'",
                    "content": ""
                }
            ]
        },
        "This file consists of a single paragraph, possibly surrounded by a PGP": {
            "content": "signature.  The fields of that paragraph are listed below.  Their syntax\nis described above, in *note Syntax of control files: 8d.\n\n- *note Format: 9e. (mandatory)\n\n- *note Source: 91. (mandatory)\n\n- *note Binary: 9f.\n\n- *note Architecture: 96.\n\n- *note Version: 3f. (mandatory)\n\n- *note Maintainer: 47. (mandatory)\n\n- *note Uploaders: 48.\n\n- *note Homepage: 93.\n\n- *note Version Control System (VCS) fields: 94.\n\n- *note Testsuite: 95.\n\n- *note Dgit: a0.\n\n- *note Standards-Version: 62. (mandatory)\n\n- *note Build-Depends et al: 92.\n\n- *note Package-List: a1. (recommended)\n\n- *note Checksums-Sha1 and Checksums-Sha256: a2. (mandatory)\n\n- *note Files: 44. (mandatory)\n",
            "subsections": []
        },
        "The Debian source control file is generated by 'dpkg-source' when it": {
            "content": "builds the source archive, from other files in the source package,\ndescribed above.  When unpacking, it is checked against the files and\ndirectories in the other parts of the source package.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Debian changes files - changes,  Next: List of fields,  Prev: Debian source control files - dsc,  Up: Control files and their fields": {
            "content": "",
            "subsections": [
                {
                    "name": "5.5 Debian changes files - '.changes'",
                    "content": ""
                }
            ]
        },
        "The '.changes' files are used by the Debian archive maintenance software": {
            "content": "to process updates to packages.  They consist of a single paragraph,\npossibly surrounded by a PGP signature.  That paragraph contains\ninformation from the 'debian/control' file and other data about the\nsource package gathered via 'debian/changelog' and 'debian/rules'.\n\n'.changes' files have a format version that is incremented whenever the\ndocumented fields or their meaning change.  This document describes\nformat 1.8.\n\nThe fields in this file are:\n\n- *note Format: 9e. (mandatory)\n\n- *note Date: a5. (mandatory)\n\n- *note Source: 91. (mandatory)\n\n- *note Binary: 9f. (mandatory)\n\n- *note Architecture: 96. (mandatory)\n\n- *note Version: 3f. (mandatory)\n\n- *note Distribution: 6a. (mandatory)\n\n- *note Urgency: 6b. (recommended)\n\n- *note Maintainer: 47. (mandatory)\n\n- *note Changed-By: 6d.\n\n- *note Description: 4b. (mandatory)\n\n- *note Closes: 6c.\n\n- *note Changes: a6. (mandatory)\n\n- *note Checksums-Sha1 and Checksums-Sha256: a2. (mandatory)\n\n- *note Files: 44. (mandatory)\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: List of fields,  Next: User-defined fields,  Prev: Debian changes files - changes,  Up: Control files and their fields": {
            "content": "",
            "subsections": [
                {
                    "name": "5.6 List of fields",
                    "content": "* Menu:\n\n* Source::\n* Maintainer::\n* Uploaders::\n* Changed-By::\n* Section::\n* Priority::\n* Package::\n* Architecture::\n* Essential::\n* Package interrelationship fields; Depends, Pre-Depends, Recommends, Suggests, Breaks, Conflicts, Provides, Replaces, Enhances: Package interrelationship fields Depends Pre-Depends Recommends Suggests Breaks Conflicts Provides Replaces Enhances.\n* Standards-Version::\n* Version::\n* Description::\n* Distribution::\n* Date::\n* Format::\n* Urgency::\n* Changes::\n* Binary::\n* Installed-Size::\n* Files::\n* Closes::\n* Homepage::\n* Checksums-Sha1 and Checksums-Sha256::\n* DM-Upload-Allowed::\n* Version Control System (VCS) fields: Version Control System VCS fields.\n* Package-List::\n* Package-Type::\n* Dgit::\n* Testsuite::\n* Rules-Requires-Root::\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Source,  Next: Maintainer,  Up: List of fields": {
            "content": "This field identifies the source package name.\n",
            "subsections": []
        },
        "In 'debian/control' or a '.dsc' file, this field must contain only the": {
            "content": "name of the source package.\n",
            "subsections": []
        },
        "In a binary package control file or a '.changes' file, the source": {
            "content": "package name may be followed by a version number in parentheses.  (1)",
            "subsections": []
        },
        "This version number may be omitted (and is, by 'dpkg-gencontrol') if it": {
            "content": "has the same value as the 'Version' field of the binary package in\nquestion.  The field itself may be omitted from a binary package control\nfile when the source package has the same name and version as the binary\npackage.\n\nPackage names (both source and binary, see *note Package: 3a.) must\nconsist only of lower case letters ('a-z'), digits ('0-9'), plus ('+')\nand minus ('-') signs, and periods ('.').  They must be at least two\ncharacters long and must start with an alphanumeric character.\n\n---------- Footnotes ----------\n\n(1) (4) It is customary to leave a space after the package name if a\nversion number is specified.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Maintainer,  Next: Uploaders,  Prev: Source,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "The package maintainer's name and email address.  The name must come": {
            "content": "first, then the email address inside angle brackets '<>' (in RFC822\nformat).\n",
            "subsections": []
        },
        "If the maintainer's name contains a full stop then the whole field will": {
            "content": "not work directly as an email address due to a misfeature in the syntax\nspecified in RFC822; a program using this field as an address must check\nfor this and correct the problem if necessary (for example by putting\nthe name in round brackets and moving it to the end, and bringing the\nemail address forward).\n\nSee *note The maintainer of a package: 45. for additional requirements\nand information about package maintainers.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Uploaders,  Next: Changed-By,  Prev: Maintainer,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "List of the names and email addresses of co-maintainers of the package,": {
            "content": "if any.  If the package has other maintainers besides the one named in\nthe *note Maintainer field: 47, their names and email addresses should\nbe listed here.  The format of each entry is the same as that of the\nMaintainer field, and multiple entries must be comma separated.\n",
            "subsections": []
        },
        "This is normally an optional field, but if the 'Maintainer' control": {
            "content": "field names a group of people and a shared email address, the\n'Uploaders' field must be present and must contain at least one human\nwith their personal email address.\n\nThe Uploaders field in 'debian/control' can be folded.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Changed-By,  Next: Section,  Prev: Uploaders,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "The name and email address of the person who prepared this version of": {
            "content": "the package, usually a maintainer.  The syntax is the same as for the\n*note Maintainer field: 47.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Section,  Next: Priority,  Prev: Changed-By,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "This field specifies an application area into which the package has been": {
            "content": "classified.  See *note Sections: 2b.\n",
            "subsections": []
        },
        "When it appears in the 'debian/control' file, it gives the value for the": {
            "content": "subfield of the same name in the 'Files' field of the '.changes' file.\nIt also gives the default for the same field in the binary packages.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Priority,  Next: Package,  Prev: Section,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "This field represents how important it is that the user have the package": {
            "content": "installed.  See *note Priorities: 2f.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Package,  Next: Architecture,  Prev: Priority,  Up: List of fields": {
            "content": "The name of the binary package.\n",
            "subsections": []
        },
        "Binary package names must follow the same syntax and restrictions as": {
            "content": "source package names.  See *note Source: 91. for the details.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Architecture,  Next: Essential,  Prev: Package,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "Depending on context and the control file used, the 'Architecture' field": {
            "content": "can include the following sets of values:\n\n- A unique single word identifying a Debian machine architecture as\ndescribed in *note Architecture specification strings: 67.\n\n- An architecture wildcard identifying a set of Debian machine\narchitectures, see *note Architecture wildcards: b1.  'any' matches\nall Debian machine architectures and is the most frequently used.\n\n- 'all', which indicates an architecture-independent package.\n\n- 'source', which indicates a source package.\n",
            "subsections": []
        },
        "In the main 'debian/control' file in the source package, this field may": {
            "content": "contain the special value 'all', the special architecture wildcard\n'any', or a list of specific and wildcard architectures separated by\nspaces.  If 'all' or 'any' appears, that value must be the entire\ncontents of the field.  Most packages will use either 'all' or 'any'.\n",
            "subsections": []
        },
        "Specifying a specific list of architectures indicates that the source": {
            "content": "will build an architecture-dependent package only on architectures\nincluded in the list.  Specifying a list of architecture wildcards\nindicates that the source will build an architecture-dependent package\non only those architectures that match any of the specified architecture\nwildcards.  Specifying a list of architectures or architecture wildcards\nother than 'any' is for the minority of cases where a program is not\nportable or is not useful on some architectures.  Where possible, the\nprogram should be made portable instead.\n",
            "subsections": []
        },
        "In the Debian source control file '.dsc', this field contains a list of": {
            "content": "architectures and architecture wildcards separated by spaces.  When the\nlist contains the architecture wildcard 'any', the only other value\nallowed in the list is 'all'.\n",
            "subsections": []
        },
        "The list may include (or consist solely of) the special value 'all'.  In": {
            "content": "other words, in '.dsc' files unlike the 'debian/control', 'all' may\noccur in combination with specific architectures.  The 'Architecture'\nfield in the Debian source control file '.dsc' is generally constructed\nfrom the 'Architecture' fields in the 'debian/control' in the source\npackage.\n",
            "subsections": []
        },
        "Specifying only 'any' indicates that the source package isn't dependent": {
            "content": "on any particular architecture and should compile fine on any one.  The\nproduced binary package(s) will be specific to whatever the current\nbuild architecture is.\n",
            "subsections": []
        },
        "Specifying only 'all' indicates that the source package will only build": {
            "content": "architecture-independent packages.\n",
            "subsections": []
        },
        "Specifying 'any all' indicates that the source package isn't dependent": {
            "content": "on any particular architecture.  The set of produced binary packages\nwill include at least one architecture-dependent package and one\narchitecture-independent package.\n",
            "subsections": []
        },
        "Specifying a list of architectures or architecture wildcards indicates": {
            "content": "that the source will build an architecture-dependent package, and will\nonly work correctly on the listed or matching architectures.  If the\nsource package also builds at least one architecture-independent\npackage, 'all' will also be included in the list.\n",
            "subsections": []
        },
        "In a '.changes' file, the 'Architecture' field lists the architecture(s)": {
            "content": "of the package(s) currently being uploaded.  This will be a list; if the\nsource for the package is also being uploaded, the special entry\n'source' is also present.  'all' will be present if any\narchitecture-independent packages are being uploaded.  Architecture\nwildcards such as 'any' must never occur in the 'Architecture' field in\nthe '.changes' file.\n\nSee *note Main building script; debian/rules: 78. for information on how\nto get the architecture for the build process.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Essential,  Next: Package interrelationship fields Depends Pre-Depends Recommends Suggests Breaks Conflicts Provides Replaces Enhances,  Prev: Architecture,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "This is a boolean field which may occur only in the control file of a": {
            "content": "binary package or in a per-package fields paragraph of a source package\ncontrol file.\n",
            "subsections": []
        },
        "If set to 'yes' then the package management system will refuse to remove": {
            "content": "the package (upgrading and replacing it is still possible).  The other\npossible value is 'no', which is the same as not having the field at\nall.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Package interrelationship fields Depends Pre-Depends Recommends Suggests Breaks Conflicts Provides Replaces Enhances,  Next: Standards-Version,  Prev: Essential,  Up: List of fields": {
            "content": "These fields describe the package's relationships with other packages.\nTheir syntax and semantics are described in *note Declaring\nrelationships between packages: 52.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Standards-Version,  Next: Version,  Prev: Package interrelationship fields Depends Pre-Depends Recommends Suggests Breaks Conflicts Provides Replaces Enhances,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "The most recent version of the standards (the policy manual and": {
            "content": "associated texts) with which the package complies.  See *note Standards\nconformance: 60.\n",
            "subsections": []
        },
        "The version number has four components: major and minor version number": {
            "content": "and major and minor patch level.  When the standards change in a way\nthat requires every package to change the major number will be changed.",
            "subsections": []
        },
        "Significant changes that will require work in many packages will be": {
            "content": "signaled by a change to the minor number.  The major patch level will be\nchanged for any change to the meaning of the standards, however small;\nthe minor patch level will be changed when only cosmetic, typographical\nor other edits are made which neither change the meaning of the document\nnor affect the contents of packages.\n",
            "subsections": []
        },
        "Thus only the first three components of the policy version are": {
            "content": "significant in the `Standards-Version' control field, and so either\nthese three components or all four components may be specified.  (1)\n\n---------- Footnotes ----------\n\n(1) (5) In the past, people specified the full version number in the\nStandards-Version field, for example \"2.3.0.0\".  Since minor patch-level\nchanges don't introduce new policy, it was thought it would be better to\nrelax policy and only require the first 3 components to be specified, in\nthis example \"2.3.0\".  All four components may still be used if someone\nwishes to do so.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Version,  Next: Description,  Prev: Standards-Version,  Up: List of fields": {
            "content": "The version number of a package.  The format is:\n'[epoch:]upstreamversion[-debianrevision]'.\n\nThe three components here are:\n\n'epoch'\n\nThis is a single (generally small) unsigned integer.  It may be\nomitted, in which case zero is assumed.\n\nEpochs can help when the upstream version numbering scheme changes,\nbut they must be used with care.  You should not change the epoch,\neven in experimental, without getting consensus on debian-devel\nfirst.\n\n'upstreamversion'\n\nThis is the main part of the version number.  It is usually the\nversion number of the original (\"upstream\") package from which the\n'.deb' file has been made, if this is applicable.  Usually this\nwill be in the same format as that specified by the upstream\nauthor(s); however, it may need to be reformatted to fit into the\npackage management system's format and comparison scheme.\n\nThe comparison behavior of the package management system with\nrespect to the 'upstreamversion' is described below.  The\n'upstreamversion' portion of the version number is mandatory.\n\nThe 'upstreamversion' must contain only alphanumerics (1) and the\ncharacters '.'  '+' '-' '~' (full stop, plus, hyphen, tilde) and\nshould start with a digit.  If there is no 'debianrevision' then\nhyphens are not allowed.\n\n'debianrevision'\n\nThis part of the version number specifies the version of the Debian\npackage based on the upstream version.  It must contain only\nalphanumerics and the characters '+' '.'  '~' (plus, full stop,\ntilde) and is compared in the same way as the 'upstreamversion'\nis.\n\nIt is optional; if it isn't present then the 'upstreamversion'\nmust not contain a hyphen.  This format represents the case where a\npiece of software was written specifically to be a Debian package,\nwhere the Debian package source must always be identical to the\npristine source and therefore no revision indication is required.\n\nIt is conventional to restart the 'debianrevision' at '1' each\ntime the 'upstreamversion' is increased.\n\nThe package management system will break the version number apart\nat the last hyphen in the string (if there is one) to determine the\n'upstreamversion' and 'debianrevision'.  The absence of a\n'debianrevision' is equivalent to a 'debianrevision' of '0'.\n",
            "subsections": []
        },
        "When comparing two version numbers, first the epoch of each are": {
            "content": "compared, then the 'upstreamversion' if epoch is equal, and then\n'debianrevision' if 'upstreamversion' is also equal.  epoch is\ncompared numerically.  The 'upstreamversion' and 'debianrevision'\nparts are compared by the package management system using the following\nalgorithm:\n\nThe strings are compared from left to right.\n",
            "subsections": []
        },
        "First the initial part of each string consisting entirely of non-digit": {
            "content": "characters is determined.  These two parts (one of which may be empty)\nare compared lexically.  If a difference is found it is returned.  The\nlexical comparison is a comparison of ASCII values modified so that all\nthe letters sort earlier than all the non-letters and so that a tilde\nsorts before anything, even the end of a part.  For example, the\nfollowing parts are in sorted order from earliest to latest: '~~',\n'~~a', '~', the empty part, 'a'.  (2)\n",
            "subsections": []
        },
        "Then the initial part of the remainder of each string which consists": {
            "content": "entirely of digit characters is determined.  The numerical values of\nthese two parts are compared, and any difference found is returned as\nthe result of the comparison.  For these purposes an empty string (which\ncan only occur at the end of one or both version strings being compared)\ncounts as zero.\n",
            "subsections": []
        },
        "These two steps (comparing and removing initial non-digit strings and": {
            "content": "initial digit strings) are repeated until a difference is found or both\nstrings are exhausted.\n\n* Menu:\n\n* Epochs should be used sparingly::\n\n---------- Footnotes ----------\n\n(1) (6) Alphanumerics are 'A-Za-z0-9' only.\n\n(2) (7) One common use of '~' is for upstream pre-releases.  For\nexample, '1.0~beta1~svn1245' sorts earlier than '1.0~beta1', which sorts\nearlier than '1.0'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Epochs should be used sparingly,  Up: Version": {
            "content": "5.6.12.1 Epochs should be used sparingly\n........................................\n",
            "subsections": []
        },
        "Note that the purpose of epochs is to cope with situations where the": {
            "content": "upstream version numbering scheme changes and to allow us to leave\nbehind serious mistakes.  If you think that increasing the epoch is the\nright solution, you should consult debian-devel and get consensus before\ndoing so (even in experimental).\n",
            "subsections": []
        },
        "Epochs should not be used when a package needs to be rolled back.  In": {
            "content": "that case, use the '+really' convention: for example, if you uploaded\n'2.3-3' and now you need to go backwards to upstream 2.2, call your\nreverting upload something like '2.3+really2.2-1'.  Eventually, when we\nupload upstream 2.4, the +really part can go away.\n",
            "subsections": []
        },
        "Epochs are also not intended to cope with version numbers containing": {
            "content": "strings of letters which the package management system cannot interpret\n(such as 'ALPHA' or 'pre-'), or with silly orderings.  (1)\n\n---------- Footnotes ----------\n\n(1) (8) The author of this manual has heard of a package whose\nversions went '1.1', '1.2', '1.3', '1', '2.1', '2.2', '2' and so forth.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Description,  Next: Distribution,  Prev: Version,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "In a source or binary control file, the 'Description' field contains a": {
            "content": "description of the binary package, consisting of two parts, the synopsis\nor the short description, and the long description.  It is a multiline\nfield with the following format:\n\nDescription: single line synopsis\nextended description over several lines\n\nThe lines in the extended description can have these formats:\n\n- Those starting with a single space are part of a paragraph.\nSuccessive lines of this form will be word-wrapped when displayed.\nThe leading space will usually be stripped off.  The line must\ncontain at least one non-whitespace character.\n\n- Those starting with two or more spaces.  These will be displayed\nverbatim.  If the display cannot be panned horizontally, the\ndisplaying program will line wrap them \"hard\" (i.e., without taking\naccount of word breaks).  If it can they will be allowed to trail\noff to the right.  None, one or two initial spaces may be deleted,\nbut the number of spaces deleted from each line will be the same\n(so that you can have indenting work correctly, for example).  The\nline must contain at least one non-whitespace character.\n\n- Those containing a single space followed by a single full stop\ncharacter.  These are rendered as blank lines.  This is the `only'\nway to get a blank line.  (1)\n\n- Those containing a space, a full stop and some more characters.\nThese are for future expansion.  Do not use them.\n\nDo not use tab characters.  Their effect is not predictable.\n\nSee *note The description of a package: 49. for further information on\nthis.\n",
            "subsections": []
        },
        "In a '.changes' file, the 'Description' field contains a summary of the": {
            "content": "descriptions for the packages being uploaded.  For this case, the first\nline of the field value (the part on the same line as 'Description:') is\nalways empty.  It is a multiline field, with one line per package.  Each\nline is indented by one space and contains the name of a binary package,\na space, a hyphen ('-'), a space, and the short description line from\nthat package.\n\n---------- Footnotes ----------\n\n(1) (9) Completely empty lines will not be rendered as blank lines.",
            "subsections": []
        },
        "Instead, they will cause the parser to think you're starting a whole new": {
            "content": "record in the control file, and will therefore likely abort with an\nerror.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Distribution,  Next: Date,  Prev: Description,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "In a '.changes' file or parsed changelog output this contains the": {
            "content": "(space-separated) name(s) of the distribution(s) where this version of\nthe package should be installed.  Valid distributions are determined by\nthe archive maintainers.  (1) The Debian archive software only supports\nlisting a single distribution.  Migration of packages to other\ndistributions is handled outside of the upload process.\n\n---------- Footnotes ----------\n\n(1) (10) Example distribution names in the Debian archive used in\n'.changes' files are:\n\n`unstable'\n\nThis distribution value refers to the `developmental' part of the\nDebian distribution tree.  Most new packages, new upstream versions\nof packages and bug fixes go into the `unstable' directory tree.\n\n`experimental'\n\nThe packages with this distribution value are deemed by their\nmaintainers to be high risk.  Oftentimes they represent early beta\nor developmental packages from various sources that the maintainers\nwant people to try, but are not ready to be a part of the other\nparts of the Debian distribution tree.\n\nOthers are used for updating stable releases or for security uploads.",
            "subsections": []
        },
        "More information is available in the Debian Developer's Reference,": {
            "content": "section \"The Debian archive\".\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Date,  Next: Format,  Prev: Distribution,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "This field includes the date the package was built or last edited.  It": {
            "content": "must be in the same format as the date in a 'debian/changelog' entry.\n",
            "subsections": []
        },
        "The value of this field is usually extracted from the 'debian/changelog'": {
            "content": "file - see *note Debian changelog; debian/changelog: 69.\n\nEach version's change information should be preceded by a \"title\" line\ngiving at least the version, distribution(s) and urgency, in a\nhuman-readable way.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Format,  Next: Urgency,  Prev: Date,  Up: List of fields": {
            "content": "In *note .changes: a4. files, this field declares the format version of\nthat file.  The syntax of the field value is the same as that of a *note\npackage version number: 3f. except that no epoch or Debian revision is\nallowed.  The format described in this document is 1.8.\n\nIn *note .dsc Debian source control: 9d. files, this field declares the\nformat of the source package.  The field value is used by programs\nacting on a source package to interpret the list of files in the source\npackage and determine how to unpack it.  The syntax of the field value\nis a numeric major revision, a period, a numeric minor revision, and\nthen an optional subtype after whitespace, which if specified is an\nalphanumeric word in parentheses.  The subtype is optional in the syntax\nbut may be mandatory for particular source format revisions.  (1)\n\n---------- Footnotes ----------\n\n(1) (11) The source formats currently supported by the Debian archive\nsoftware are '1.0', '3.0 (native)', and '3.0 (quilt)'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Urgency,  Next: Changes,  Prev: Format,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "This is a description of how important it is to upgrade to this version": {
            "content": "from previous ones.  It consists of a single keyword taking one of the\nvalues 'low', 'medium', 'high', 'emergency', or 'critical' (1) (not\ncase-sensitive) followed by an optional commentary (separated by a\nspace) which is usually in parentheses.  For example:\n\nUrgency: low (HIGH for users of diversions)\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Changes,  Next: Binary,  Prev: Urgency,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "This multiline field contains the human-readable changes data,": {
            "content": "describing the differences between the last version and the current one.\n",
            "subsections": []
        },
        "The first line of the field value (the part on the same line as": {
            "content": "'Changes:') is always empty.  The content of the field is expressed as\ncontinuation lines, with each line indented by at least one space.",
            "subsections": []
        },
        "Blank lines must be represented by a line consisting only of a space and": {
            "content": "a full stop ('.').\n",
            "subsections": []
        },
        "If data from several versions is being returned the entry for the most": {
            "content": "recent version should be returned first, and entries should be separated\nby the representation of a blank line (the \"title\" line may also be\nfollowed by the representation of a blank line).\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Binary,  Next: Installed-Size,  Prev: Changes,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "This folded field is a list of binary packages.  Its syntax and meaning": {
            "content": "varies depending on the control file in which it appears.\n",
            "subsections": []
        },
        "When it appears in the '.dsc' file, it lists binary packages which a": {
            "content": "source package can produce, separated by commas (1).  The source package\ndoes not necessarily produce all of these binary packages for every\narchitecture.  The source control file doesn't contain details of which\narchitectures are appropriate for which of the binary packages.\n",
            "subsections": []
        },
        "When it appears in a '.changes' file, it lists the names of the binary": {
            "content": "packages being uploaded, separated by whitespace (not commas).\n\n---------- Footnotes ----------\n\n(1) (13) A space after each comma is conventional.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Installed-Size,  Next: Files,  Prev: Binary,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "This field appears in the control files of binary packages, and in the": {
            "content": "'Packages' files.  It gives an estimate of the total amount of disk\nspace required to install the named package.  Actual installed size may\nvary based on block size, file system properties, or actions taken by\npackage maintainer scripts.\n",
            "subsections": []
        },
        "The disk space is given as the integer value of the estimated installed": {
            "content": "size in bytes, divided by 1024 and rounded up.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Files,  Next: Closes,  Prev: Installed-Size,  Up: List of fields": {
            "content": "This field contains a list of files with information about each one.\nThe exact information and syntax varies with the context.\n",
            "subsections": []
        },
        "In all cases, Files is a multiline field.  The first line of the field": {
            "content": "value (the part on the same line as 'Files:') is always empty.  The\ncontent of the field is expressed as continuation lines, one line per\nfile.  Each line must be indented by one space and contain a number of\nsub-fields, separated by spaces, as described below.\n",
            "subsections": []
        },
        "In the '.dsc' file, each line contains the MD5 checksum, size and": {
            "content": "filename of the tar file and (if applicable) diff file which make up the\nremainder of the source package.  (1) For example:\n\nFiles:\nc6f698f19f2a2aa07dbb9bbda90a2754 571925 example1.2.orig.tar.gz\n938512f08422f3509ff36f125f5873ba 6220 example1.2-1.diff.gz\n\nThe exact forms of the filenames are described in *note Source packages\nas archives: c1.\n\nIn the '.changes' file this contains one line per file being uploaded.",
            "subsections": []
        },
        "Each line contains the MD5 checksum, size, section and priority and the": {
            "content": "filename.  For example:\n\nFiles:\n4c31ab7bfc40d3cf49d7811987390357 1428 text extra example1.2-1.dsc\nc6f698f19f2a2aa07dbb9bbda90a2754 571925 text extra example1.2.orig.tar.gz\n938512f08422f3509ff36f125f5873ba 6220 text extra example1.2-1.diff.gz\n7c98fe853b3bbb47a00e5cd129b6cb56 703542 text extra example1.2-1i386.deb\n\nThe *note section: 2d. and *note priority: 30. are the values of the\ncorresponding fields in the main source control file.  If no section or\npriority is specified then '-' should be used, though section and\npriority values must be specified for new packages to be installed\nproperly.\n",
            "subsections": []
        },
        "The special value 'byhand' for the section in a '.changes' file": {
            "content": "indicates that the file in question is not an ordinary package file and\nmust be installed by hand by the distribution maintainers.  If the\nsection is 'byhand' the priority should be '-'.\n",
            "subsections": []
        },
        "If a new Debian revision of a package is being shipped and no new": {
            "content": "original source archive is being distributed the '.dsc' must still\ncontain the 'Files' field entry for the original source archive\n'packageupstream-version.orig.tar.gz', but the '.changes' file should\nleave it out.  In this case the original source archive on the\ndistribution site must match exactly, byte-for-byte, the original source\narchive which was used to generate the '.dsc' file and diff which are\nbeing uploaded.\n\n---------- Footnotes ----------\n\n(1) (14) That is, the parts which are not the '.dsc'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Closes,  Next: Homepage,  Prev: Files,  Up: List of fields": {
            "content": "A space-separated list of bug report numbers that the upload governed by\nthe .changes file closes.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Homepage,  Next: Checksums-Sha1 and Checksums-Sha256,  Prev: Closes,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "The URL of the web site for this package, preferably (when applicable)": {
            "content": "the site from which the original source can be obtained and any\nadditional upstream documentation or information may be found.  The\ncontent of this field is a simple URL without any surrounding characters\nsuch as '<>'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Checksums-Sha1 and Checksums-Sha256,  Next: DM-Upload-Allowed,  Prev: Homepage,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "These multiline fields contain a list of files with a checksum and size": {
            "content": "for each one.  Both 'Checksums-Sha1' and 'Checksums-Sha256' have the\nsame syntax and differ only in the checksum algorithm used: SHA-1 for\n'Checksums-Sha1' and SHA-256 for 'Checksums-Sha256'.\n\n'Checksums-Sha1' and 'Checksums-Sha256' are multiline fields.  The first\nline of the field value (the part on the same line as 'Checksums-Sha1:'\nor 'Checksums-Sha256:') is always empty.  The content of the field is\nexpressed as continuation lines, one line per file.  Each line consists\nof the checksum, a space, the file size, a space, and the file name.\nFor example (from a '.changes' file):\n\nChecksums-Sha1:\n1f418afaa01464e63cc1ee8a66a05f0848bd155c 1276 example1.0-1.dsc\na0ed1456fad61116f868b1855530dbe948e20f06 171602 example1.0.orig.tar.gz\n5e86ecf0671e113b63388dac81dd8d00e00ef298 6137 example1.0-1.debian.tar.gz\n71a0ff7da0faaf608481195f9cf30974b142c183 548402 example1.0-1i386.deb\nChecksums-Sha256:\nac9d57254f7e835bed299926fd51bf6f534597cc3fcc52db01c4bffedae81272 1276 example1.0-1.dsc\n0d123be7f51e61c4bf15e5c492b484054be7e90f3081608a5517007bfb1fd128 171602 example1.0.orig.tar.gz\nf54ae966a5f580571ae7d9ef5e1df0bd42d63e27cb505b27957351a495bc6288 6137 example1.0-1.debian.tar.gz\n3bec05c03974fdecd11d020fc2e8250de8404867a8a2ce865160c250eb723664 548402 example1.0-1i386.deb\n",
            "subsections": []
        },
        "In the '.dsc' file, these fields list all files that make up the source": {
            "content": "package.  In the '.changes' file, these fields list all files being\nuploaded.  The list of files in these fields must match the list of\nfiles in the 'Files' field.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: DM-Upload-Allowed,  Next: Version Control System VCS fields,  Prev: Checksums-Sha1 and Checksums-Sha256,  Up: List of fields": {
            "content": "Obsolete, see *note below: c7.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Version Control System VCS fields,  Next: Package-List,  Prev: DM-Upload-Allowed,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "Debian source packages are increasingly developed using VCSs.  The": {
            "content": "purpose of the following fields is to indicate a publicly accessible\nrepository where the Debian source package is developed.\n\n'Vcs-Browser'\n\nURL of a web interface for browsing the repository.\n\n'Vcs-<type>'\n\nThe field name identifies the VCS. The field's value uses the\nversion control system's conventional syntax for describing\nrepository locations and should be sufficient to locate the\nrepository used for packaging.  Ideally, it also locates the branch\nused for development of new versions of the Debian package.\n\nThe following values for <type> are supported, with the\ncorresponding VCS indicated in parentheses if it isn't obvious:\n\n- Arch\n\n- Bzr (Bazaar)\n\n- Cvs (CVS)\n\n- Darcs\n\n- Git\n\n- Hg (Mercurial)\n\n- Mtn (Monotone)\n\n- Svn (Subversion)\n\nIn the case of Git, the value must have the following syntax:\n\n<url> [ \" -b \" <branch> ] [ \" [\" <path> \"]\" ]\n\nwhere the portions enclosed in brackets are optional and the\nportions enclosed in double quotes are literal strings.  '<url>'\nindicates the repository.  If the '<branch>' stanza is present, it\nnames a branch in the indicated repository.  If no branch is\nspecified, the packaging should be on the default branch.  If the\n'<path>' stanza is present, it specifies the relative path to the\ntop of the packaging tree (the parent directory of the 'debian'\ndirectory).  If no path is specified, it defaults to '.' (the top\nlevel of the indicated repository and branch).\n\nFor example:\n\nVcs-Git: https://example.org/repo -b debian [p/package]\n\nindicates a subdirectory named 'p/package' in the 'debian' branch\nof the repository at 'https://example.org/repo'.\n\nIn the case of Mercurial, the value must have the following syntax:\n\n<url> [ \" -b \" <branch> ]\n\nThis is interpreted the same way as the Git syntax except a path\nwithin the repository is not supported.\n\nA package control file must not have more than one 'Vcs-<type>'\nfield.  If the package is maintained in multiple version control\nsystems, the maintainer should specify the one that they would\nprefer other people to use as the basis for proposing changes to\nthe package.\n",
            "subsections": []
        },
        "For both fields, any URLs given should use a scheme that provides": {
            "content": "confidentiality ('https', for example, rather than 'http' or 'git') if\nthe VCS repository supports it.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Package-List,  Next: Package-Type,  Prev: Version Control System VCS fields,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "Multiline field listing all the packages that can be built from the": {
            "content": "source package, considering every architecture.  The first line of the\nfield value is empty.  Each one of the next lines describes one binary\npackage, by listing its name, type, section and priority separated by\nspaces.  Fifth and subsequent space-separated items may be present and\nparsers must allow them.  See the *note Package-Type: 99. field for a\nlist of package types.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Package-Type,  Next: Dgit,  Prev: Package-List,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "Simple field containing a word indicating the type of package: 'deb' for": {
            "content": "binary packages and 'udeb' for micro binary packages.  Other types not\ndefined here may be indicated.  In source package control files, the\n'Package-Type' field should be omitted instead of giving it a value of\n'deb', as this value is assumed for paragraphs lacking this field.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Dgit,  Next: Testsuite,  Prev: Package-Type,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "Folded field containing a single git commit hash, presented in full,": {
            "content": "followed optionally by whitespace and other data to be defined in future\nextensions.\n",
            "subsections": []
        },
        "Declares that the source package corresponds exactly to a referenced": {
            "content": "commit in a Git repository available at the canonical location called\n`dgit-repos', used by 'dgit', a bidirectional gateway between the Debian\narchive and Git.  The commit is reachable from at least one reference\nwhose name matches 'refs/dgit/*'.  See the manual page of 'dgit' for\nfurther details.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Testsuite,  Next: Rules-Requires-Root,  Prev: Dgit,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "Simple field containing a comma-separated list of values allowing test": {
            "content": "execution environments to discover packages which provide tests.\n",
            "subsections": []
        },
        "This field is automatically added to Debian source control files": {
            "content": "('.dsc') by 'dpkg', with the value 'autopkgtest', when a\n'debian/tests/control' file is present in the source package.  This\nfield may also be used in source package control files\n('debian/control') if needed in other situations.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Rules-Requires-Root,  Prev: Testsuite,  Up: List of fields": {
            "content": "",
            "subsections": []
        },
        "Simple field that defines if the source package requires access to root": {
            "content": "(or fakeroot) during selected targets in the *note Main building script;\ndebian/rules: 78.\n\nThe field can consist of exactly one of the following three items:\n\n- 'no': Declares that neither root nor fakeroot is required.\nPackage builders (e.g.  dpkg-buildpackage) may choose to\ninvoke any target in 'debian/rules' with an unprivileged user.\n\n- 'binary-targets' (default): Declares that the package will\nneed the root (or fakeroot) when either of the 'binary',\n'binary-arch' or 'binary-indep' targets are called.  This is\nhow every tool behaved before this field was defined.\n\n- A space separated list of keywords described below.  These\nkeywords must always contain a forward slash, which sets them\napart from the other possible values of 'Rules-Requires-Root'.\nWhen this list is provided, the builder must provide a \"gain\nroot command\" (as defined in *note debian/rules and\nRules-Requires-Root: 7f.) `or' pretend that the value was set\nto 'binary-targets', and both the builder and the package's\n'debian/rules' script must downgrade accordingly (see below).\n",
            "subsections": []
        },
        "If the package builder supports the 'Rules-Requires-Root' field and": {
            "content": "wants to enable the feature, then it must set the environment variable\n'DEBRULESREQUIRESROOT' when invoking the package building script\n'debian/rules'.  The value of 'DEBRULESREQUIRESROOT' should be one\nof:\n\n* The value of 'Rules-Requires-Root' if the builder can support\nthat value.  The builder may trim unnecessary whitespace used\nto format the field for readability.\n\n* The value 'binary-targets' if it cannot support the value of\n'Rules-Requires-Root'.\n\nA compliant builder may also leave 'DEBRULESREQUIRESROOT' unset or\nset it to 'binary-targets' if it has been requested to test whether the\npackage it builds correctly implements the fall-back for legacy\nbuilders.\n\n* Menu:\n\n* Remarks::\n* Definition of the keywords::\n* Provided keywords::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Remarks,  Next: Definition of the keywords,  Up: Rules-Requires-Root": {
            "content": "5.6.31.1 Remarks\n................\n",
            "subsections": []
        },
        "All packages and builders must support 'binary-targets' as this was the": {
            "content": "historical behaviour prior to the introduction of this field.\n",
            "subsections": []
        },
        "Any tool (particularly older versions of them) may be unaware of this": {
            "content": "field and behave like the field was set to 'binary-targets'.  The\npackage build must gracefully cope with this and produce a semantically\nequivalent result.\n",
            "subsections": []
        },
        "This field intentionally does not enable a package to request a true": {
            "content": "root over fakeroot.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Definition of the keywords,  Next: Provided keywords,  Prev: Remarks,  Up: Rules-Requires-Root": {
            "content": "5.6.31.2 Definition of the keywords\n...................................\n\nThe keywords have the format '<namespace>/<case>', where:\n\n* '<namespace>' must consist entirely of printable ASCII\ncharacters except for any whitespace and the forward slash\n('/').  It must consist of at least 2 characters.\n\n* '/' (between '<namespace>' and '<case>') is a single ASCII\nforward slash.\n\n* '<case>' must consist entirely of printable ASCII characters\nexcept for any whitespace.  It must consist of at least 2\ncharacters.\n",
            "subsections": []
        },
        "These keywords define where the package build script 'debian/rules', or": {
            "content": "the tools called by that script, will need access to root or fakeroot.\n",
            "subsections": []
        },
        "In addition to the keywords defined in the next section, each tool or": {
            "content": "package may define keywords within a namespace named after that tool or\npackage.  The package or tool is considered to own that namespace.\n\nA tool is permitted to use the \"gain root command\" to do something under\n(fake)root if and only if the tool defines an appropriate keyword in its\nnamespace, and the package lists that keyword in 'Rules-Requires-Root'.\n\nAll tools must ignore keywords under namespaces they do not know or own.\nA tool may emit a warning, or abort with an error, if it finds unknown\nkeywords in namespaces it owns, but it is not required to do this for\nall keywords in the namespace.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Provided keywords,  Prev: Definition of the keywords,  Up: Rules-Requires-Root": {
            "content": "5.6.31.3 Provided keywords\n..........................\n\nThe following keywords are defined:\n\n* 'dpkg/target-subcommand': declares that there exists a command\nthat the 'debian/rules' file must run under (fake)root\n\n* 'dpkg/target/foo': declares that the additional,\npackage-specific target 'foo' (that is, not one of the targets\nspecified in *note Main building script; debian/rules: 78.)\nmust be run under (fake)root\n",
            "subsections": []
        },
        "This list is intentionally incomplete.  You should consult the": {
            "content": "documentation of the tool or package in question for which keywords it\ndefines and when they are needed.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: User-defined fields,  Next: Obsolete fields,  Prev: List of fields,  Up: Control files and their fields": {
            "content": "",
            "subsections": [
                {
                    "name": "5.7 User-defined fields",
                    "content": ""
                }
            ]
        },
        "Additional user-defined fields may be added to the source package": {
            "content": "control file.  Such fields will be ignored, and not copied to (for\nexample) binary or Debian source control files or upload control files.\n",
            "subsections": []
        },
        "If you wish to add additional unsupported fields to these output files": {
            "content": "you should use the mechanism described here.\n",
            "subsections": []
        },
        "Fields in the main source control information file with names starting": {
            "content": "'X', followed by one or more of the letters 'BCS' and a hyphen '-', will\nbe copied to the output files.  Only the part of the field name after\nthe hyphen will be used in the output file.  Where the letter 'B' is\nused the field will appear in binary package control files, where the\nletter 'S' is used in Debian source control files and where 'C' is used\nin upload control ('.changes') files.\n",
            "subsections": []
        },
        "For example, if the main source information control file contains the": {
            "content": "field\n\nXBS-Comment: I stand between the candle and the star.\n\nthen the binary and Debian source control files will contain the field\n\nComment: I stand between the candle and the star.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Obsolete fields,  Prev: User-defined fields,  Up: Control files and their fields": {
            "content": "",
            "subsections": [
                {
                    "name": "5.8 Obsolete fields",
                    "content": ""
                }
            ]
        },
        "The following fields have been obsoleted and may be found in packages": {
            "content": "conforming with previous versions of the Policy.\n\n* Menu:\n\n* DM-Upload-Allowed: DM-Upload-Allowed<2>.\n\nFile: debian-policy.info,  Node: DM-Upload-Allowed<2>,  Up: Obsolete fields\n\n",
            "subsections": []
        },
        "Indicates that Debian Maintainers may upload this package to the Debian": {
            "content": "archive.  The only valid value is 'yes'.  This field was used to\nregulate uploads by Debian Maintainers, See the General Resolution\nEndorse the concept of Debian Maintainers(1) for more details.\n\n---------- Footnotes ----------\n\n(1) https://www.debian.org/vote/2007/vote003\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Package maintainer scripts and installation procedure,  Next: Declaring relationships between packages,  Prev: Control files and their fields,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "6 Package maintainer scripts and installation procedure": {
            "content": "* Menu:\n\n* Introduction to package maintainer scripts::\n* Maintainer scripts idempotency::\n* Controlling terminal for maintainer scripts::\n* Exit status::\n* Summary of ways maintainer scripts are called::\n* Details of unpack phase of installation or upgrade::\n* Details of configuration::\n* Details of removal and/or configuration purging::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Introduction to package maintainer scripts,  Next: Maintainer scripts idempotency,  Up: Package maintainer scripts and installation procedure": {
            "content": "",
            "subsections": [
                {
                    "name": "6.1 Introduction to package maintainer scripts",
                    "content": ""
                }
            ]
        },
        "It is possible to supply scripts as part of a package which the package": {
            "content": "management system will run for you when your package is installed,\nupgraded or removed.\n",
            "subsections": []
        },
        "These scripts are the control information files 'preinst', 'postinst',": {
            "content": "'prerm' and 'postrm'.  They must be proper executable files; if they are\nscripts (which is recommended), they must start with the usual '#!'\nconvention.  They should be readable and executable by anyone, and must\nnot be world-writable.\n",
            "subsections": []
        },
        "The package management system looks at the exit status from these": {
            "content": "scripts.  It is important that they exit with a non-zero status if there\nis an error, so that the package management system can stop its\nprocessing.  For shell scripts this means that you `almost always' need\nto use 'set -e' (this is usually true when writing shell scripts, in\nfact).  It is also important, of course, that they exit with a zero\nstatus if everything went well.\n",
            "subsections": []
        },
        "Additionally, packages interacting with users using 'debconf' in the": {
            "content": "'postinst' script should install a 'config' script as a control\ninformation file.  See *note Prompting in maintainer scripts: 16. for\ndetails.\n",
            "subsections": []
        },
        "When a package is upgraded a combination of the scripts from the old and": {
            "content": "new packages is called during the upgrade procedure.  If your scripts\nare going to be at all complicated you need to be aware of this, and may\nneed to check the arguments to your scripts.\n",
            "subsections": []
        },
        "Broadly speaking the 'preinst' is called before (a particular version": {
            "content": "of) a package is unpacked, and the 'postinst' afterwards; the 'prerm'\nbefore (a version of) a package is removed and the 'postrm' afterwards.\n",
            "subsections": []
        },
        "Programs called from maintainer scripts should not normally have a path": {
            "content": "prepended to them.  Before installation is started, the package\nmanagement system checks to see if the programs 'ldconfig',\n'start-stop-daemon', and 'update-rc.d' can be found via the 'PATH'\nenvironment variable.  Those programs, and any other program that one\nwould expect to be in the 'PATH', should thus be invoked without an\nabsolute pathname.  Maintainer scripts should also not reset the 'PATH',\nthough they might choose to modify it by prepending or appending\npackage-specific directories.  These considerations really apply to all\nshell scripts.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Maintainer scripts idempotency,  Next: Controlling terminal for maintainer scripts,  Prev: Introduction to package maintainer scripts,  Up: Package maintainer scripts and installation procedure": {
            "content": "",
            "subsections": [
                {
                    "name": "6.2 Maintainer scripts idempotency",
                    "content": ""
                }
            ]
        },
        "It is necessary for the error recovery procedures that the scripts be": {
            "content": "idempotent.  This means that if it is run successfully, and then it is\ncalled again, it doesn't bomb out or cause any harm, but just ensures\nthat everything is the way it ought to be.  If the first call failed, or\naborted half way through for some reason, the second call should merely\ndo the things that were left undone the first time, if any, and exit\nwith a success status if everything is OK. (1)\n\n---------- Footnotes ----------\n\n(1) (1) This is so that if an error occurs, the user interrupts\n'dpkg' or some other unforeseen circumstance happens you don't leave the\nuser with a badly-broken package when 'dpkg' attempts to repeat the\naction.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Controlling terminal for maintainer scripts,  Next: Exit status,  Prev: Maintainer scripts idempotency,  Up: Package maintainer scripts and installation procedure": {
            "content": "",
            "subsections": [
                {
                    "name": "6.3 Controlling terminal for maintainer scripts",
                    "content": ""
                }
            ]
        },
        "Maintainer scripts are not guaranteed to run with a controlling terminal": {
            "content": "and may not be able to interact with the user.  They must be able to\nfall back to noninteractive behavior if no controlling terminal is\navailable.  Maintainer scripts that prompt via a program conforming to\nthe Debian Configuration Management Specification (see *note Prompting\nin maintainer scripts: 16.) may assume that program will handle falling\nback to noninteractive behavior.\n",
            "subsections": []
        },
        "For high-priority prompts without a reasonable default answer,": {
            "content": "maintainer scripts may abort if there is no controlling terminal.",
            "subsections": []
        },
        "However, this situation should be avoided if at all possible, since it": {
            "content": "prevents automated or unattended installs.  In most cases, users will\nconsider this to be a bug in the package.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Exit status,  Next: Summary of ways maintainer scripts are called,  Prev: Controlling terminal for maintainer scripts,  Up: Package maintainer scripts and installation procedure": {
            "content": "",
            "subsections": [
                {
                    "name": "6.4 Exit status",
                    "content": ""
                }
            ]
        },
        "Each script must return a zero exit status for success, or a nonzero one": {
            "content": "for failure, since the package management system looks for the exit\nstatus of these scripts and determines what action to take next based on\nthat datum.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Summary of ways maintainer scripts are called,  Next: Details of unpack phase of installation or upgrade,  Prev: Exit status,  Up: Package maintainer scripts and installation procedure": {
            "content": "",
            "subsections": [
                {
                    "name": "6.5 Summary of ways maintainer scripts are called",
                    "content": ""
                }
            ]
        },
        "What follows is a summary of all the ways in which maintainer scripts": {
            "content": "may be called along with what facilities those scripts may rely on being\navailable at that time.  Script names preceded by new- are the scripts\nfrom the new version of a package being installed, upgraded to, or\ndowngraded to.  Script names preceded by old- are the scripts from the\nold version of a package that is being upgraded from or downgraded from.\n\nThe 'preinst' script may be called in the following ways:\n\n'new-preinst' install\n'new-preinst' install `old-version'\n'new-preinst' upgrade `old-version'\n\nThe package will not yet be unpacked, so the 'preinst' script\ncannot rely on any files included in its package.  Only essential\npackages and pre-dependencies ('Pre-Depends') may be assumed to be\navailable.  Pre-dependencies will have been configured at least\nonce, but at the time the 'preinst' is called they may only be in\nan \"Unpacked\" or \"Half-Configured\" state if a previous version of\nthe pre-dependency was completely configured and has not been\nremoved since then.\n\n'old-preinst' abort-upgrade `new-version'\n\nCalled during error handling of an upgrade that failed after\nunpacking the new package because the 'postrm upgrade' action\nfailed.  The unpacked files may be partly from the new version or\npartly missing, so the script cannot rely on files included in the\npackage.  Package dependencies may not be available.\nPre-dependencies will be at least \"Unpacked\" following the same\nrules as above, except they may be only \"Half-Installed\" if an\nupgrade of the pre-dependency failed.  (1)\n\nThe 'postinst' script may be called in the following ways:\n\n'postinst' configure `most-recently-configured-version'\n\nThe files contained in the package will be unpacked.  All package\ndependencies will at least be \"Unpacked\".  If there are no circular\ndependencies involved, all package dependencies will be configured.\nFor behavior in the case of circular dependencies, see the\ndiscussion in *note Binary Dependencies - Depends, Recommends,\nSuggests, Enhances, Pre-Depends: 97.\n\n'old-postinst' abort-upgrade `new-version'\n'conflictor's-postinst' abort-remove in-favour `package' `new-version'\n'postinst' abort-remove\n'deconfigured's-postinst' abort-deconfigure in-favour `failed-install-package' `version' [ removing conflicting-package version ]\n\nThe files contained in the package will be unpacked.  All package\ndependencies will at least be \"Half-Installed\" and will have\npreviously been configured and not removed.  However, dependencies\nmay not be configured or even fully unpacked in some error\nsituations.  (2) The 'postinst' should still attempt any actions\nfor which its dependencies are required, since they will normally\nbe available, but consider the correct error handling approach if\nthose actions fail.  Aborting the 'postinst' action if commands or\nfacilities from the package dependencies are not available is often\nthe best approach.\n\nThe 'prerm' script may be called in the following ways:\n\n'prerm' remove\n'old-prerm' upgrade `new-version'\n'conflictor's-prerm' remove in-favour package `new-version'\n'deconfigured's-prerm' deconfigure in-favour `package-being-installed' `version' [removing conflicting-package version]\n\nThe package whose 'prerm' is being called will be at least\n\"Half-Installed\".  All package dependencies will at least be\n\"Half-Installed\" and will have previously been configured and not\nremoved.  If there was no error, all dependencies will at least be\n\"Unpacked\", but these actions may be called in various error states\nwhere dependencies are only \"Half-Installed\" due to a partial\nupgrade.\n\n'new-prerm' failed-upgrade `old-version'\n\nCalled during error handling when 'prerm upgrade' fails.  The new\npackage will not yet be unpacked, and all the same constraints as\nfor 'preinst upgrade' apply.\n\nThe 'postrm' script may be called in the following ways:\n\n'postrm' remove\n'postrm' purge\n'old-postrm' upgrade `new-version'\n'disappearer's-postrm' disappear overwriter `overwriter-version'\n\nThe 'postrm' script is called after the package's files have been\nremoved or replaced.  The package whose 'postrm' is being called\nmay have previously been deconfigured and only be \"Unpacked\", at\nwhich point subsequent package changes do not consider its\ndependencies.  Therefore, all 'postrm' actions must only rely on\nessential packages and must gracefully skip any actions that\nrequire the package's dependencies if those dependencies are\nunavailable.  (3)\n\n'new-postrm' failed-upgrade `old-version'\n\nCalled when the old 'postrm upgrade' action fails.  The new package\nwill be unpacked, but only essential packages and pre-dependencies\ncan be relied on.  Pre-dependencies will either be configured or\nwill be \"Unpacked\" or \"Half-Configured\" but previously had been\nconfigured and was never removed.\n\n'new-postrm' abort-install\n'new-postrm' abort-install `old-version'\n'new-postrm' abort-upgrade `old-version'\n\nCalled before unpacking the new package as part of the error\nhandling of 'preinst' failures.  May assume the same state as\n'preinst' can assume.\n\n---------- Footnotes ----------\n\n(1) (2) This can happen if the new version of the package no longer\npre-depends on a package that had been partially upgraded.\n\n(2) (3) For example, suppose packages foo and bar are \"Installed\"\nwith foo depending on bar.  If an upgrade of bar were started and then\naborted, and then an attempt to remove foo failed because its 'prerm'\nscript failed, foo's 'postinst abort-remove' would be called with bar\nonly \"Half-Installed\".\n\n(3) (4) This is often done by checking whether the command or\nfacility the 'postrm' intends to call is available before calling it.\nFor example:\n\nif [ \"$1\" = purge ] && [ -e /usr/share/debconf/confmodule ]; then\n. /usr/share/debconf/confmodule dbpurge\nfi\n\nin 'postrm' purges the 'debconf' configuration for the package if\ndebconf is installed.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Details of unpack phase of installation or upgrade,  Next: Details of configuration,  Prev: Summary of ways maintainer scripts are called,  Up: Package maintainer scripts and installation procedure": {
            "content": "",
            "subsections": [
                {
                    "name": "6.6 Details of unpack phase of installation or upgrade",
                    "content": ""
                }
            ]
        },
        "The procedure on installation/upgrade/overwrite/disappear (i.e., when": {
            "content": "running 'dpkg --unpack', or the unpack stage of 'dpkg --install') is as\nfollows.  (1) In each case, if a major error occurs (unless listed\nbelow) the actions are, in general, run backwards - this means that the\nmaintainer scripts are run with different arguments in reverse order.\nThese are the \"error unwind\" calls listed below.\n\n1. Notify the currently installed package:\n\na. If a version of the package is already \"Installed\", call\n\nold-prerm upgrade `new-version'\n\nb. If the script runs but exits with a non-zero exit status,\n'dpkg' will attempt:\n\nnew-prerm failed-upgrade `old-version'\n\nIf this works, the upgrade continues.  If this does not work,\nthe error unwind:\n\n`old-postinst' abort-upgrade `new-version'\n\nIf this works, then the `old-version' is \"Installed\", if not,\nthe old version is in a \"Half-Configured\" state.\n\n2. If a \"conflicting\" package is being removed at the same time, or if\nany package will be broken (due to 'Breaks'):\n\na. If '--auto-deconfigure' is specified, call, for each package\nto be deconfigured due to 'Breaks':\n\n`deconfigured's-prerm' deconfigure \\\nin-favour `package-being-installed' `version'\n\nError unwind:\n\n`deconfigured's-postinst' abort-deconfigure \\\nin-favour `package-being-installed-but-failed' `version'\n\nThe deconfigured packages are marked as requiring\nconfiguration, so that if '--install' is used they will be\nconfigured again if possible.\n\nb. If any packages depended on a conflicting package being\nremoved and '--auto-deconfigure' is specified, call, for each\nsuch package:\n\n`deconfigured's-prerm' deconfigure \\\nin-favour `package-being-installed' `version' \\\nremoving `conflicting-package' `version'\n\nError unwind:\n\n`deconfigured's-postinst' abort-deconfigure \\\nin-favour `package-being-installed-but-failed' `version' \\\nremoving `conflicting-package' `version'\n\nThe deconfigured packages are marked as requiring\nconfiguration, so that if '--install' is used they will be\nconfigured again if possible.\n\nc. To prepare for removal of each conflicting package, call:\n\n`conflictor's-prerm' remove \\\nin-favour `package' `new-version'\n\nError unwind:\n\n`conflictor's-postinst' abort-remove \\\nin-favour `package' `new-version'\n\n3. Run the 'preinst' of the new package:\n\na. If the package is being upgraded, call:\n\n`new-preinst' upgrade `old-version'\n\nIf this fails, we call:\n\n`new-postrm' abort-upgrade `old-version'\n\n1. If that works, then\n\n`old-postinst' abort-upgrade `new-version'\n\nis called.  If this works, then the old version is in an\n\"Installed\" state, or else it is left in an \"Unpacked\"\nstate.\n\n2. If it fails, then the old version is left in an\n\"Half-Installed\" state.\n\nb. Otherwise, if the package had some configuration files from a\nprevious version installed (i.e., it is in the \"Config-Files\"\nstate):\n\n`new-preinst' install `old-version'\n\nError unwind:\n\n`new-postrm' abort-install `old-version'\n\nIf this fails, the package is left in a \"Half-Installed\"\nstate, which requires a reinstall.  If it works, the packages\nis left in a \"Config-Files\" state.\n\nc. Otherwise (i.e., the package was completely purged):\n\n`new-preinst' install\n\nError unwind:\n\n`new-postrm' abort-install\n\nIf the error-unwind fails, the package is in a\n\"Half-Installed\" phase, and requires a reinstall.  If the\nerror unwind works, the package is in the \"Not-Installed\"\nstate.\n\n4. The new package's files are unpacked, overwriting any that may be\non the system already, for example any from the old version of the\nsame package or from another package.  Backups of the old files are\nkept temporarily, and if anything goes wrong the package management\nsystem will attempt to put them back as part of the error unwind.\n\nIt is an error for a package to contain files which are on the\nsystem in another package, unless 'Replaces' is used (see *note\nOverwriting files and replacing packages - Replaces: e5.).\n\nIt is a more serious error for a package to contain a plain file or\nother kind of non-directory where another package has a directory\n(again, unless 'Replaces' is used).  This error can be overridden\nif desired using '--force-overwrite-dir', but this is not\nadvisable.\n\nPackages which overwrite each other's files produce behavior which,\nthough deterministic, is hard for the system administrator to\nunderstand.  It can easily lead to \"missing\" programs if, for\nexample, a package is unpacked which overwrites a file from another\npackage, and is then removed again.  (2)\n\nA directory will never be replaced by a symbolic link to a\ndirectory or vice versa; instead, the existing state (symlink or\nnot) will be left alone and 'dpkg' will follow the symlink if there\nis one.\n\n5. If the package is being upgraded:\n\na. Call:\n\n`old-postrm' upgrade `new-version'\n\nb. If this fails, 'dpkg' will attempt:\n\n`new-postrm' failed-upgrade `old-version'\n\nIf this works, installation continues.  If not, Error unwind:\n\n`old-preinst' abort-upgrade `new-version'\n\nIf this fails, the old version is left in a \"Half-Installed\"\nstate.  If it works, dpkg now calls:\n\n`new-postrm' abort-upgrade `old-version'\n\nIf this fails, the old version is left in a \"Half-Installed\"\nstate.  If it works, dpkg now calls:\n\n`old-postinst' abort-upgrade `new-version'\n\nIf this fails, the old version is in an \"Unpacked\" state.\n\nThis is the point of no return.  If 'dpkg' gets this far, it won't\nback off past this point if an error occurs.  This will leave the\npackage in a fairly bad state, which will require a successful\nre-installation to clear up, but it's when 'dpkg' starts doing\nthings that are irreversible.\n\n6. Any files which were in the old version of the package but not in\nthe new are removed.\n\n7. The new file list replaces the old.\n\n8. The new maintainer scripts replace the old.\n\n9. Any packages all of whose files have been overwritten during the\ninstallation, and which aren't required for dependencies, are\nconsidered to have been removed.  For each such package\n\na. 'dpkg' calls:\n\n`disappearer's-postrm' disappear \\\n`overwriter' `overwriter-version'\n\nb. The package's maintainer scripts are removed.\n\nc. It is noted in the status database as being in a sane state,\nnamely \"Not-Installed\" (any conffiles it may have are ignored,\nrather than being removed by 'dpkg').  Note that disappearing\npackages do not have their prerm called, because 'dpkg'\ndoesn't know in advance that the package is going to vanish.\n\n10. Any files in the package we're unpacking that are also listed in\nthe file lists of other packages are removed from those lists.\n(This will lobotomize the file list of the \"conflicting\" package if\nthere is one.)\n\n11. The backup files made during installation, above, are deleted.\n\n12. The new package's status is now sane, and recorded as \"Unpacked\".\n\nHere is another point of no return: if the conflicting package's\nremoval fails we do not unwind the rest of the installation.  The\nconflicting package is left in a half-removed limbo.\n\n13. If there was a conflicting package we go and do the removal\nactions (described below), starting with the removal of the\nconflicting package's files (any that are also in the package being\nunpacked have already been removed from the conflicting package's\nfile list, and so do not get removed now).\n\n---------- Footnotes ----------\n\n(1) (5) See *note Maintainer script flowcharts: e4. for flowcharts\nillustrating the processes described here.\n\n(2) (6) Part of the problem is due to what is arguably a bug in\n'dpkg'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Details of configuration,  Next: Details of removal and/or configuration purging,  Prev: Details of unpack phase of installation or upgrade,  Up: Package maintainer scripts and installation procedure": {
            "content": "",
            "subsections": [
                {
                    "name": "6.7 Details of configuration",
                    "content": ""
                }
            ]
        },
        "When we configure a package (this happens with 'dpkg --install' and": {
            "content": "'dpkg --configure'), we first update any 'conffile's and then call:\n\n`postinst' configure `most-recently-configured-version'\n",
            "subsections": []
        },
        "No attempt is made to unwind after errors during configuration.  If the": {
            "content": "configuration fails, the package is in a \"Half-Configured\" state, and an\nerror message is generated.\n",
            "subsections": []
        },
        "If there is no most recently configured version 'dpkg' will pass a null": {
            "content": "argument.  (1)\n\n---------- Footnotes ----------\n\n(1) (7) Historical note: Truly ancient (pre-1997) versions of 'dpkg'\npassed '<unknown>' (including the angle brackets) in this case.  Even\nolder ones did not pass a second argument at all, under any\ncircumstance.  Note that upgrades using such an old dpkg version are\nunlikely to work for other reasons, even if this old argument behavior\nis handled by your postinst script.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Details of removal and/or configuration purging,  Prev: Details of configuration,  Up: Package maintainer scripts and installation procedure": {
            "content": "",
            "subsections": [
                {
                    "name": "6.8 Details of removal and/or configuration purging",
                    "content": "1.      `prerm' remove\n\nIf prerm fails during replacement due to conflict\n\n`conflictor's-postinst' abort-remove \\\nin-favour `package' `new-version'\n\nOr else we call:\n\n`postinst' abort-remove\n\nIf this fails, the package is in a \"Half-Configured\" state, or else\nit remains \"Installed\".\n\n2. The package's files are removed (except 'conffile's).\n\n3.      `postrm' remove\n\nIf it fails, there's no error unwind, and the package is in an\n\"Half-Installed\" state.\n\n4. All the maintainer scripts except the 'postrm' are removed.\n\nIf we aren't purging the package we stop here.  Note that packages\nwhich have no 'postrm' and no 'conffile's are automatically purged\nwhen removed, as there is no difference except for the 'dpkg'\nstatus.\n\n5. The 'conffile's and any backup files ('~'-files, '#*#' files,\n'%'-files, '.dpkg-{old,new,tmp}', etc.)  are removed.\n\n6.      `postrm' purge\n\nIf this fails, the package remains in a \"Config-Files\" state.\n\n7. The package's file list is removed.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Declaring relationships between packages,  Next: Shared libraries,  Prev: Package maintainer scripts and installation procedure,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "7 Declaring relationships between packages": {
            "content": "* Menu:\n\n* Syntax of relationship fields::\n* Binary Dependencies - Depends, Recommends, Suggests, Enhances, Pre-Depends: Binary Dependencies - Depends Recommends Suggests Enhances Pre-Depends.\n* Packages which break other packages - Breaks::\n* Conflicting binary packages - Conflicts::\n* Virtual packages - Provides::\n* Overwriting files and replacing packages - Replaces::\n* Relationships between source and binary packages - Build-Depends, Build-Depends-Indep, Build-Depends-Arch, Build-Conflicts, Build-Conflicts-Indep, Build-Conflicts-Arch: Relationships between source and binary packages - Build-Depends Build-Depends-Indep Build-Depends-Arch Build-Conflicts Build-Conflicts-Indep Build-Conflicts-Arch.\n* Additional source packages used to build the binary - Built-Using::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Syntax of relationship fields,  Next: Binary Dependencies - Depends Recommends Suggests Enhances Pre-Depends,  Up: Declaring relationships between packages": {
            "content": "",
            "subsections": [
                {
                    "name": "7.1 Syntax of relationship fields",
                    "content": ""
                }
            ]
        },
        "These fields all have a uniform syntax.  They are a list of package": {
            "content": "names separated by commas.\n",
            "subsections": []
        },
        "In the 'Depends', 'Recommends', 'Suggests', 'Pre-Depends',": {
            "content": "'Build-Depends', 'Build-Depends-Indep' and 'Build-Depends-Arch' control\nfields of the package, which declare dependencies on other packages, the\npackage names listed may also include lists of alternative package\nnames, separated by vertical bar (pipe) symbols '|'.  In such a case,\nthat part of the dependency can be satisfied by any one of the\nalternative packages.  (1)\n",
            "subsections": []
        },
        "All of the fields may restrict their applicability to particular": {
            "content": "versions of each named package.  This is done in parentheses after each\nindividual package name; the parentheses should contain a relation from\nthe list below followed by a version number, in the format described in\n*note Version: 3f.\n\nThe relations allowed are '<<', '<=', '=', '>=' and '>>' for strictly\nearlier, earlier or equal, exactly equal, later or equal and strictly\nlater, respectively.  The exception is the Provides field, for which\nonly '=' is allowed.  (2)\n",
            "subsections": []
        },
        "Whitespace may appear at any point in the version specification subject": {
            "content": "to the rules in *note Syntax of control files: 8d, and must appear where\nit's necessary to disambiguate; it is not otherwise significant.  All of\nthe relationship fields can only be folded in source package control\nfiles.  For consistency and in case of future changes to 'dpkg' it is\nrecommended that a single space be used after a version relationship and\nbefore a version number; it is also conventional to put a single space\nafter each comma, on either side of each vertical bar, and before each\nopen parenthesis.  When opening a continuation line in a relationship\nfield, it is conventional to do so after a comma and before the space\nfollowing that comma.\n\nFor example, a list of dependencies might appear as:\n\nPackage: mutt\nVersion: 1.3.17-1\nDepends: libc6 (>= 2.2.1), default-mta | mail-transport-agent\n",
            "subsections": []
        },
        "Relationships may be restricted to a certain set of architectures.  This": {
            "content": "is indicated in brackets after each individual package name and the\noptional version specification.  The brackets enclose a non-empty list\nof Debian architecture names in the format described in *note\nArchitecture specification strings: 67, separated by whitespace.",
            "subsections": []
        },
        "Exclamation marks may be prepended to each of the names.  (It is not": {
            "content": "permitted for some names to be prepended with exclamation marks while\nothers aren't.)\n",
            "subsections": []
        },
        "For build relationship fields ('Build-Depends', 'Build-Depends-Indep',": {
            "content": "'Build-Depends-Arch', 'Build-Conflicts', 'Build-Conflicts-Indep' and\n'Build-Conflicts-Arch'), if the current Debian host architecture is not\nin this list and there are no exclamation marks in the list, or it is in\nthe list with a prepended exclamation mark, the package name and the\nassociated version specification are ignored completely for the purposes\nof defining the relationships.\n\nFor example:\n\nSource: glibc\nBuild-Depends-Indep: texinfo\nBuild-Depends: kernel-headers-2.2.10 [!hurd-i386],\nhurd-dev [hurd-i386], gnumach-dev [hurd-i386]\n\nrequires 'kernel-headers-2.2.10' on all architectures other than\nhurd-i386 and requires 'hurd-dev' and 'gnumach-dev' only on hurd-i386.",
            "subsections": []
        },
        "Here is another example showing multiple architectures separated by": {
            "content": "spaces:\n\nBuild-Depends:\nlibluajit5.1-dev [i386 amd64 kfreebsd-i386 armel armhf powerpc mips],\nliblua5.1-dev [hurd-i386 ia64 kfreebsd-amd64 s390x sparc],\n",
            "subsections": []
        },
        "For binary relationship fields and the 'Built-Using' field, the": {
            "content": "architecture restriction syntax is only supported in the source package\ncontrol file 'debian/control'.  When the corresponding binary package\ncontrol file is generated, the relationship will either be omitted or\nincluded without the architecture restriction based on the architecture\nof the binary package.  This means that architecture restrictions must\nnot be used in binary relationship fields for architecture-independent\npackages ('Architecture: all').\n\nFor example:\n\nDepends: foo [i386], bar [amd64]\n\nbecomes 'Depends: foo' when the package is built on the 'i386'\narchitecture, 'Depends: bar' when the package is built on the 'amd64'\narchitecture, and omitted entirely in binary packages built on all other\narchitectures.\n",
            "subsections": []
        },
        "If the architecture-restricted dependency is part of a set of": {
            "content": "alternatives using '|', that alternative is ignored completely on\narchitectures that do not match the restriction.  For example:\n\nBuild-Depends: foo [!i386] | bar [!amd64]\n\nis equivalent to 'bar' on the 'i386' architecture, to 'foo' on the\n'amd64' architecture, and to 'foo | bar' on all other architectures.\n",
            "subsections": []
        },
        "Relationships may also be restricted to a certain set of architectures": {
            "content": "using architecture wildcards in the format described in *note",
            "subsections": []
        },
        "Architecture wildcards: b1.  The syntax for declaring such restrictions": {
            "content": "is the same as declaring restrictions using a certain set of\narchitectures without architecture wildcards.  For example:\n\nBuild-Depends: foo [linux-any], bar [any-i386], baz [!linux-any]\n\nis equivalent to 'foo' on architectures using the Linux kernel and any\ncpu, 'bar' on architectures using any kernel and an i386 cpu, and 'baz'\non any architecture using a kernel other than Linux.\n",
            "subsections": []
        },
        "Note that the binary package relationship fields such as 'Depends'": {
            "content": "appear in one of the binary package sections of the control file,\nwhereas the build-time relationships such as 'Build-Depends' appear in\nthe source package section of the control file (which is the first\nsection).\n\n---------- Footnotes ----------\n\n(1) (1) While 'Build-Depends', 'Build-Depends-Indep' and\n'Build-Depends-Arch' permit the use of alternative dependencies, these\nare not normally used by the Debian autobuilders.  To avoid\ninconsistency between repeated builds of a package, the autobuilders\nwill default to selecting the first alternative, after reducing any\narchitecture-specific restrictions for the build architecture in\nquestion.  While this may limit the usefulness of alternatives in a\nsingle release, they can still be used to provide flexibility in\nbuilding the same package across multiple distributions or releases,\nwhere a particular dependency is met by differently named packages.\n\n(2) (2) The relations '<' and '>' were previously allowed, but they\nwere confusingly defined to mean earlier/later or equal rather than\nstrictly earlier/later.  'dpkg' still supports them with a warning, but\nthey are no longer allowed by Debian Policy.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Binary Dependencies - Depends Recommends Suggests Enhances Pre-Depends,  Next: Packages which break other packages - Breaks,  Prev: Syntax of relationship fields,  Up: Declaring relationships between packages": {
            "content": "",
            "subsections": [
                {
                    "name": "7.2 Binary Dependencies - 'Depends', 'Recommends', 'Suggests', 'Enhances', 'Pre-Depends'",
                    "content": ""
                }
            ]
        },
        "Packages can declare in their control file that they have certain": {
            "content": "relationships to other packages - for example, that they cannot be\ninstalled at the same time as certain other packages, and/or that they\ndepend on the presence of others.\n",
            "subsections": []
        },
        "This is done using the 'Depends', 'Pre-Depends', 'Recommends',": {
            "content": "'Suggests', 'Enhances', 'Breaks' and 'Conflicts' control fields.\n'Breaks' is described in *note Packages which break other packages -\nBreaks: ee, and 'Conflicts' is described in *note Conflicting binary\npackages - Conflicts: ef.  The rest are described below.\n",
            "subsections": []
        },
        "These seven fields are used to declare a dependency relationship by one": {
            "content": "package on another.  Except for 'Enhances' and 'Breaks', they appear in\nthe depending (binary) package's control file.  ('Enhances' appears in\nthe recommending package's control file, and 'Breaks' appears in the\nversion of depended-on package which causes the named package to break).\n\nA 'Depends' field takes effect `only' when a package is to be\nconfigured.  It does not prevent a package being on the system in an\nunconfigured state while its dependencies are unsatisfied, and it is\npossible to replace a package whose dependencies are satisfied and which\nis properly installed with a different version whose dependencies are\nnot and cannot be satisfied; when this is done the depending package\nwill be left unconfigured (since attempts to configure it will give\nerrors) and will not function properly.  If it is necessary, a\n'Pre-Depends' field can be used, which has a partial effect even when a\npackage is being unpacked, as explained in detail below.  (The other\nthree dependency fields, 'Recommends', 'Suggests' and 'Enhances', are\nonly used by the various front-ends to 'dpkg' such as 'apt-get',\n'aptitude', and 'dselect'.)\n",
            "subsections": []
        },
        "Since 'Depends' only places requirements on the order in which packages": {
            "content": "are configured, packages in an installation run are usually all unpacked\nfirst and all configured later.  (1)\n",
            "subsections": []
        },
        "If there is a circular dependency among packages being installed or": {
            "content": "removed, installation or removal order honoring the dependency order is\nimpossible, requiring the dependency loop be broken at some point and\nthe dependency requirements violated for at least one package.  Packages\ninvolved in circular dependencies may not be able to rely on their\ndependencies being configured before they themselves are configured,\ndepending on which side of the break of the circular dependency loop\nthey happen to be on.  If one of the packages in the loop has no\n'postinst' script, then the cycle will be broken at that package; this\nensures that all 'postinst' scripts are run with their dependencies\nproperly configured if this is possible.  Otherwise the breaking point\nis arbitrary.  Packages should therefore avoid circular dependencies\nwhere possible, particularly if they have 'postinst' scripts.\n\nThe meaning of the five dependency fields is as follows:\n\n'Depends'\n\nThis declares an absolute dependency.  A package will not be\nconfigured unless all of the packages listed in its 'Depends' field\nhave been correctly configured (unless there is a circular\ndependency as described above).\n\nThe 'Depends' field should be used if the depended-on package is\nrequired for the depending package to provide a significant amount\nof functionality.\n\nThe 'Depends' field should also be used if the 'postinst' or\n'prerm' scripts require the depended-on package to be unpacked or\nconfigured in order to run.  In the case of 'postinst configure',\nthe depended-on packages will be unpacked and configured first.\n(If both packages are involved in a dependency loop, this might not\nwork as expected; see the explanation a few paragraphs back.)  In\nthe case of 'prerm' or other 'postinst' actions, the package\ndependencies will normally be at least unpacked, but they may be\nonly \"Half-Installed\" if a previous upgrade of the dependency\nfailed.\n\nFinally, the 'Depends' field should be used if the depended-on\npackage is needed by the 'postrm' script to fully clean up after\nthe package removal.  There is no guarantee that package\ndependencies will be available when 'postrm' is run, but the\ndepended-on package is more likely to be available if the package\ndeclares a dependency (particularly in the case of 'postrm\nremove').  The 'postrm' script must gracefully skip actions that\nrequire a dependency if that dependency isn't available.\n\n'Recommends'\n\nThis declares a strong, but not absolute, dependency.\n\nThe 'Recommends' field should list packages that would be found\ntogether with this one in all but unusual installations.\n\n'Suggests'\n\nThis is used to declare that one package may be more useful with\none or more others.  Using this field tells the packaging system\nand the user that the listed packages are related to this one and\ncan perhaps enhance its usefulness, but that installing this one\nwithout them is perfectly reasonable.\n\n'Enhances'\n\nThis field is similar to Suggests but works in the opposite\ndirection.  It is used to declare that a package can enhance the\nfunctionality of another package.\n\n'Pre-Depends'\n\nThis field is like 'Depends', except that it also forces 'dpkg' to\ncomplete installation of the packages named before even starting\nthe installation of the package which declares the pre-dependency,\nas follows:\n\nWhen a package declaring a pre-dependency is about to be `unpacked'\nthe pre-dependency can be satisfied if the depended-on package is\neither fully configured, `or even if' the depended-on package(s)\nare only in the \"Unpacked\" or the \"Half-Configured\" state, provided\nthat they have been configured correctly at some point in the past\n(and not removed or partially removed since).  In this case, both\nthe previously-configured and currently \"Unpacked\" or\n\"Half-Configured\" versions must satisfy any version clause in the\n'Pre-Depends' field.\n\nWhen the package declaring a pre-dependency is about to be\n`configured', the pre-dependency will be treated as a normal\n'Depends'.  It will be considered satisfied only if the depended-on\npackage has been correctly configured.  However, unlike with\n'Depends', 'Pre-Depends' does not permit circular dependencies to\nbe broken.  If a circular dependency is encountered while\nattempting to honor 'Pre-Depends', the installation will be\naborted.\n\n'Pre-Depends' are also required if the 'preinst' script depends on\nthe named package.  It is best to avoid this situation if possible.\n\n'Pre-Depends' should be used sparingly, preferably only by packages\nwhose premature upgrade or installation would hamper the ability of\nthe system to continue with any upgrade that might be in progress.\n\nYou should not specify a 'Pre-Depends' entry for a package before\nthis has been discussed on the 'debian-devel' mailing list and a\nconsensus about doing that has been reached.  See *note\nDependencies: 51.\n",
            "subsections": []
        },
        "When selecting which level of dependency to use you should consider how": {
            "content": "important the depended-on package is to the functionality of the one\ndeclaring the dependency.  Some packages are composed of components of\nvarying degrees of importance.  Such a package should list using\n'Depends' the package(s) which are required by the more important\ncomponents.  The other components' requirements may be mentioned as",
            "subsections": []
        },
        "Suggestions or Recommendations, as appropriate to the components'": {
            "content": "relative importance.\n\n---------- Footnotes ----------\n\n(1) (3) This approach makes dependency resolution easier.  If two\npackages A and B are being upgraded, the installed package A depends on\nexactly the installed package B, and the new package A depends on\nexactly the new package B (a common situation when upgrading shared\nlibraries and their corresponding development packages), satisfying the\ndependencies at every stage of the upgrade would be impossible.  This\nrelaxed restriction means that both new packages can be unpacked\ntogether and then configured in their dependency order.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Packages which break other packages - Breaks,  Next: Conflicting binary packages - Conflicts,  Prev: Binary Dependencies - Depends Recommends Suggests Enhances Pre-Depends,  Up: Declaring relationships between packages": {
            "content": "",
            "subsections": [
                {
                    "name": "7.3 Packages which break other packages - 'Breaks'",
                    "content": ""
                }
            ]
        },
        "When one binary package declares that it breaks another, 'dpkg' will": {
            "content": "refuse to allow the package which declares 'Breaks' to be unpacked\nunless the broken package is deconfigured first, and it will refuse to\nallow the broken package to be reconfigured.\n\nA package will not be regarded as causing breakage merely because its\nconfiguration files are still installed; it must be at least\n\"Half-Installed\".\n\nA special exception is made for packages which declare that they break\ntheir own package name or a virtual package which they provide (see\nbelow): this does not count as a real breakage.\n\nNormally a 'Breaks' entry will have an \"earlier than\" version clause;\nsuch a 'Breaks' is introduced in the version of an (implicit or\nexplicit) dependency which violates an assumption or reveals a bug in\nearlier versions of the broken package, or which takes over a file from\nearlier versions of the package named in 'Breaks'.  This use of 'Breaks'\nwill inform higher-level package management tools that the broken\npackage must be upgraded before the new one.\n",
            "subsections": []
        },
        "If the breaking package also overwrites some files from the older": {
            "content": "package, it should use 'Replaces' to ensure this goes smoothly.  See\n*note Overwriting files and replacing packages - Replaces: e5. for a\nfull discussion of taking over files from other packages, including how\nto use 'Breaks' in those cases.\n",
            "subsections": []
        },
        "Many of the cases where 'Breaks' should be used were previously handled": {
            "content": "with 'Conflicts' because 'Breaks' did not yet exist.  Many 'Conflicts'\nfields should now be 'Breaks'.  See *note Conflicting binary packages -\nConflicts: ef. for more information about the differences.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Conflicting binary packages - Conflicts,  Next: Virtual packages - Provides,  Prev: Packages which break other packages - Breaks,  Up: Declaring relationships between packages": {
            "content": "",
            "subsections": [
                {
                    "name": "7.4 Conflicting binary packages - 'Conflicts'",
                    "content": ""
                }
            ]
        },
        "When one binary package declares a conflict with another using a": {
            "content": "'Conflicts' field, 'dpkg' will refuse to allow them to be unpacked on\nthe system at the same time.  This is a stronger restriction than\n'Breaks', which prevents the broken package from being configured while\nthe breaking package is in the \"Unpacked\" state but allows both packages\nto be unpacked at the same time.\n",
            "subsections": []
        },
        "If one package is to be unpacked, the other must be removed first.  If": {
            "content": "the package being unpacked is marked as replacing (see *note Overwriting\nfiles and replacing packages - Replaces: e5, but note that 'Breaks'\nshould normally be used in this case) the one on the system, or the one\non the system is marked as deselected, or both packages are marked\n'Essential', then 'dpkg' will automatically remove the package which is\ncausing the conflict.  Otherwise, it will halt the installation of the\nnew package with an error.  This mechanism is specifically designed to\nproduce an error when the installed package is 'Essential', but the new\npackage is not.\n\nA package will not cause a conflict merely because its configuration\nfiles are still installed; it must be at least \"Half-Installed\".\n\nA special exception is made for packages which declare a conflict with\ntheir own package name, or with a virtual package which they provide\n(see below): this does not prevent their installation, and allows a\npackage to conflict with others providing a replacement for it.  You use\nthis feature when you want the package in question to be the only\npackage providing some feature.\n",
            "subsections": []
        },
        "Normally, 'Breaks' should be used instead of 'Conflicts' since": {
            "content": "'Conflicts' imposes a stronger restriction on the ordering of package\ninstallation or upgrade and can make it more difficult for the package\nmanager to find a correct solution to an upgrade or installation\nproblem.  'Breaks' should be used\n\n- when moving a file from one package to another (see *note\nOverwriting files and replacing packages - Replaces: e5.),\n\n- when splitting a package (a special case of the previous one), or\n\n- when the breaking package exposes a bug in or interacts badly with\nparticular versions of the broken package.\n\n'Conflicts' should be used\n\n- when two packages provide the same file and will continue to do so,\n\n- in conjunction with 'Provides' when only one package providing a\ngiven virtual facility can be unpacked at a time (see *note Virtual\npackages - Provides: 54.),\n\n- in other cases where one must prevent simultaneous installation of\ntwo packages for reasons that are ongoing (not fixed in a later\nversion of one of the packages) or that must prevent both packages\nfrom being unpacked at the same time, not just configured.\n",
            "subsections": []
        },
        "Be aware that adding 'Conflicts' is normally not the best solution when": {
            "content": "two packages provide the same files.  Depending on the reason for that\nconflict, using alternatives or renaming the files is often a better\napproach.  See, for example, *note Binaries: 7a.\n",
            "subsections": []
        },
        "Neither 'Breaks' nor 'Conflicts' should be used unless two packages": {
            "content": "cannot be installed at the same time or installing them both causes one\nof them to be broken or unusable.  Having similar functionality or\nperforming the same tasks as another package is not sufficient reason to\ndeclare 'Breaks' or 'Conflicts' with that package.\n\nA 'Conflicts' entry may have an \"earlier than\" version clause if the\nreason for the conflict is corrected in a later version of one of the\npackages.  However, normally the presence of an \"earlier than\" version\nclause is a sign that 'Breaks' should have been used instead.  An\n\"earlier than\" version clause in 'Conflicts' prevents 'dpkg' from\nupgrading or installing the package which declares such a conflict until\nthe upgrade or removal of the conflicted-with package has been\ncompleted, which is a strong restriction.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Virtual packages - Provides,  Next: Overwriting files and replacing packages - Replaces,  Prev: Conflicting binary packages - Conflicts,  Up: Declaring relationships between packages": {
            "content": "",
            "subsections": [
                {
                    "name": "7.5 Virtual packages - 'Provides'",
                    "content": "As well as the names of actual (\"concrete\") packages, the package\nrelationship fields 'Depends', 'Recommends', 'Suggests', 'Enhances',\n'Pre-Depends', 'Breaks', 'Conflicts', 'Build-Depends',\n'Build-Depends-Indep', 'Build-Depends-Arch', 'Build-Conflicts',\n'Build-Conflicts-Indep' and 'Build-Conflicts-Arch' may mention \"virtual\npackages\".\n\nA `virtual package' is one which appears in the 'Provides' control field\nof another package.  The effect is as if the package(s) which provide a\nparticular virtual package name had been listed by name everywhere the\nvirtual package name appears.  (See also *note Virtual packages: 13.)\n"
                }
            ]
        },
        "If there are both concrete and virtual packages of the same name, then": {
            "content": "the dependency may be satisfied (or the conflict caused) by either the\nconcrete package with the name in question or any other concrete package\nwhich provides the virtual package with the name in question.  This is\nso that, for example, supposing we have\n\nPackage: foo\nDepends: bar\n\nand someone else releases an enhanced version of the 'bar' package they\ncan say:\n\nPackage: bar-plus\nProvides: bar\n\nand the 'bar-plus' package will now also satisfy the dependency for the\n'foo' package.\n\nA 'Provides' field may contain version numbers, and such a version\nnumber will be considered when considering a dependency on or conflict\nwith the virtual package name.  For example, given the following\npackages:\n\nPackage: foo\nDepends: bar (>= 1.0)\n\nPackage: bar\nVersion: 0.9\n\nPackage: bar-plus\nProvides: bar (= 1.0)\n\nthe 'bar-plus' package will satisfy the dependency for the 'foo' package\nwith the virtual package name, as above.  If the 'Provides' field does\nnot specify a version number, it will not satisfy versioned dependencies\nor violate versioned 'Conflicts' or 'Breaks'.  For example, given the\nfollowing packages:\n\nPackage: foo\nDepends: bar (>= 1.0)\n\nPackage: bar\nVersion: 0.9\n\nPackage: bar-plus\nProvides: bar (= 1.0)\n\nPackage: bar-clone\nProvides: bar\n\nthe 'bar-plus' package will satisfy the dependency for the 'foo'\npackage, but the 'bar-clone' package will not.\n",
            "subsections": []
        },
        "To specify which of a set of real packages should be the default to": {
            "content": "satisfy a particular dependency on a virtual package, list the real\npackage as an alternative before the virtual one.\n",
            "subsections": []
        },
        "If the virtual package represents a facility that can only be provided": {
            "content": "by one real package at a time, such as the mail-transport-agent virtual\npackage that requires installation of a binary that would conflict with\nall other providers of that virtual package (see *note Mail transport,\ndelivery and user agents: f3.), all packages providing that virtual\npackage should also declare a conflict with it using 'Conflicts'.  This\nwill ensure that at most one provider of that virtual package is\nunpacked or installed at a time.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Overwriting files and replacing packages - Replaces,  Next: Relationships between source and binary packages - Build-Depends Build-Depends-Indep Build-Depends-Arch Build-Conflicts Build-Conflicts-Indep Build-Conflicts-Arch,  Prev: Virtual packages - Provides,  Up: Declaring relationships between packages": {
            "content": "",
            "subsections": [
                {
                    "name": "7.6 Overwriting files and replacing packages - 'Replaces'",
                    "content": ""
                }
            ]
        },
        "Packages can declare in their control file that they should overwrite": {
            "content": "files in certain other packages, or completely replace other packages.\nThe 'Replaces' control field has these two distinct purposes.\n\n* Menu:\n\n* Overwriting files in other packages::\n* Replacing whole packages, forcing their removal: Replacing whole packages forcing their removal.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Overwriting files in other packages,  Next: Replacing whole packages forcing their removal,  Up: Overwriting files and replacing packages - Replaces": {
            "content": "",
            "subsections": []
        },
        "It is usually an error for a package to contain files which are on the": {
            "content": "system in another package.  However, if the overwriting package declares\nthat it 'Replaces' the one containing the file being overwritten, then\n'dpkg' will replace the file from the old package with that from the\nnew.  The file will no longer be listed as \"owned\" by the old package\nand will be taken over by the new package.  Normally, 'Breaks' should be\nused in conjunction with 'Replaces'.  (1)\n",
            "subsections": []
        },
        "For example, if a package foo is split into foo and foo-data starting at": {
            "content": "version 1.2-3, foo-data would have the fields\n\nReplaces: foo (<< 1.2-3)\nBreaks: foo (<< 1.2-3)\n\nin its control file.  The new version of the package foo would normally\nhave the field\n\nDepends: foo-data (>= 1.2-3)\n\n(or possibly 'Recommends' or even 'Suggests' if the files moved into\nfoo-data are not required for normal operation).\n",
            "subsections": []
        },
        "If a package is completely replaced in this way, so that 'dpkg' does not": {
            "content": "know of any files it still contains, it is considered to have\n\"disappeared\".  It will be marked as not wanted on the system (selected\nfor removal) and \"Not-Installed\".  Any 'conffile's details noted for the\npackage will be ignored, as they will have been taken over by the\noverwriting package.  The package's 'postrm' script will be run with a\nspecial argument to allow the package to do any final cleanup required.\nSee *note Summary of ways maintainer scripts are called: e0.  (2)\n\nFor this usage of 'Replaces', virtual packages (see *note Virtual\npackages - Provides: 54.) are not considered when looking at a\n'Replaces' field.  The packages declared as being replaced must be\nmentioned by their real names.\n",
            "subsections": []
        },
        "This usage of 'Replaces' only takes effect when both packages are at": {
            "content": "least partially on the system at once.  It is not relevant if the\npackages conflict unless the conflict has been overridden.\n\n---------- Footnotes ----------\n\n(1) (4) To see why 'Breaks' is normally needed in addition to\n'Replaces', consider the case of a file in the package foo being taken\nover by the package foo-data.  'Replaces' will allow foo-data to be\ninstalled and take over that file.  However, without 'Breaks', nothing\nrequires foo to be upgraded to a newer version that knows it does not\ninclude that file and instead depends on foo-data.  Nothing would\nprevent the new foo-data package from being installed and then removed,\nremoving the file that it took over from foo.  After that operation, the\npackage manager would think the system was in a consistent state, but\nthe foo package would be missing one of its files.\n\n(2) (5) Replaces is a one way relationship.  You have to install the\nreplacing package after the replaced package.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Replacing whole packages forcing their removal,  Prev: Overwriting files in other packages,  Up: Overwriting files and replacing packages - Replaces": {
            "content": "",
            "subsections": []
        },
        "Second, 'Replaces' allows the packaging system to resolve which package": {
            "content": "should be removed when there is a conflict (see *note Conflicting binary\npackages - Conflicts: ef.).  This usage only takes effect when the two\npackages `do' conflict, so that the two usages of this field do not\ninterfere with each other.\n",
            "subsections": []
        },
        "In this situation, the package declared as being replaced can be a": {
            "content": "virtual package, so for example, all mail transport agents (MTAs) would\nhave the following fields in their control files:\n\nProvides: mail-transport-agent\nConflicts: mail-transport-agent\nReplaces: mail-transport-agent\n\nensuring that only one MTA can be unpacked at any one time.  See *note",
            "subsections": []
        },
        "Virtual packages - Provides: 54. for more information about this": {
            "content": "example.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Relationships between source and binary packages - Build-Depends Build-Depends-Indep Build-Depends-Arch Build-Conflicts Build-Conflicts-Indep Build-Conflicts-Arch,  Next: Additional source packages used to build the binary - Built-Using,  Prev: Overwriting files and replacing packages - Replaces,  Up: Declaring relationships between packages": {
            "content": "",
            "subsections": [
                {
                    "name": "7.7 Relationships between source and binary packages - 'Build-Depends', 'Build-Depends-Indep', 'Build-Depends-Arch', 'Build-Conflicts', 'Build-Conflicts-Indep', 'Build-Conflicts-Arch'",
                    "content": ""
                }
            ]
        },
        "Source packages that require certain binary packages to be installed or": {
            "content": "absent at the time of building the package may declare relationships to\nthose binary packages.\n",
            "subsections": []
        },
        "This is done using the 'Build-Depends', 'Build-Depends-Indep',": {
            "content": "'Build-Depends-Arch', 'Build-Conflicts', 'Build-Conflicts-Indep' and\n'Build-Conflicts-Arch' control fields.\n\nBuild-dependencies on \"build-essential\" binary packages can be omitted.\nPlease see *note Package relationships: 64. for more information.\n",
            "subsections": []
        },
        "The dependencies and conflicts they define must be satisfied (as defined": {
            "content": "earlier for binary packages) in order to invoke the targets in\n'debian/rules', as follows:\n\n'clean'\n\nOnly the 'Build-Depends' and 'Build-Conflicts' fields must be\nsatisfied when this target is invoked.\n\n'build-arch', and 'binary-arch'\n\nThe 'Build-Depends', 'Build-Conflicts', 'Build-Depends-Arch', and\n'Build-Conflicts-Arch' fields must be satisfied when these targets\nare invoked.\n\n'build-indep', and 'binary-indep'\n\nThe 'Build-Depends', 'Build-Conflicts', 'Build-Depends-Indep', and\n'Build-Conflicts-Indep' fields must be satisfied when these targets\nare invoked.\n\n'build' and 'binary'\n\nThe 'Build-Depends', 'Build-Conflicts', 'Build-Depends-Indep',\n'Build-Conflicts-Indep', 'Build-Depends-Arch', and\n'Build-Conflicts-Arch' fields must be satisfied when these targets\nare invoked.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Additional source packages used to build the binary - Built-Using,  Prev: Relationships between source and binary packages - Build-Depends Build-Depends-Indep Build-Depends-Arch Build-Conflicts Build-Conflicts-Indep Build-Conflicts-Arch,  Up: Declaring relationships between packages": {
            "content": "",
            "subsections": [
                {
                    "name": "7.8 Additional source packages used to build the binary - 'Built-Using'",
                    "content": ""
                }
            ]
        },
        "Some binary packages incorporate parts of other packages when built but": {
            "content": "do not have to depend on those packages.  Examples include linking with\nstatic libraries or incorporating source code from another package\nduring the build.  In this case, the source packages of those other\npackages are part of the complete source (the binary package is not\nreproducible without them).\n",
            "subsections": []
        },
        "When the license of either the incorporated parts or the incorporating": {
            "content": "binary package requires that the full source code of the incorporating\nbinary package be made available, the 'Built-Using' field must list the\ncorresponding source package for any affected binary package\nincorporated during the build, (1) including an \"exactly equal\" (\"=\")\nversion relation on the version that was used to build that version of\nthe incorporating binary package.  (2)\n",
            "subsections": []
        },
        "This causes the Debian archive to retain the versions of the source": {
            "content": "packages that were actually incorporated.  In particular, if the\nversions of the incorporated parts are updated but the incorporating\nbinary package is not rebuilt, the older versions of the incorporated\nparts will remain in the archive in order to satisfy the license.\n\nA package using the source code from the gcc-4.6-source binary package\nbuilt from the gcc-4.6 source package would have this field in its\ncontrol file:\n\nBuilt-Using: gcc-4.6 (= 4.6.0-11)\n\nA package including binaries from grub2 and loadlin would have this\nfield in its control file:\n\nBuilt-Using: grub2 (= 1.99-9), loadlin (= 1.6e-1)\n",
            "subsections": []
        },
        "This field should be used only when there are license or DFSG": {
            "content": "requirements to retain the referenced source packages.  It should not be\nadded solely as a way to locate packages that need to be rebuilt against\nnewer versions of their build dependencies.\n\n---------- Footnotes ----------\n\n(1) (6) 'Build-Depends' in the source package is not adequate since\nit (rightfully) does not document the exact version used in the build.\n\n(2) (7) The archive software might reject packages that refer to\nnon-existent sources.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Shared libraries,  Next: The Operating System,  Prev: Declaring relationships between packages,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "8 Shared libraries": {
            "content": "",
            "subsections": []
        },
        "Packages containing shared libraries must be constructed with a little": {
            "content": "care to make sure that the shared library is always available.  This is\nespecially important for packages whose shared libraries are vitally\nimportant, such as the C library (currently 'libc6').\n",
            "subsections": []
        },
        "This section deals only with public shared libraries: shared libraries": {
            "content": "that are placed in directories searched by the dynamic linker by default\nor which are intended to be linked against normally and possibly used by\nother, independent packages.  Shared libraries that are internal to a\nparticular package or that are only loaded as dynamic modules are not\ncovered by this section and are not subject to its requirements.\n\nA shared library is identified by the 'SONAME' attribute stored in its\ndynamic section.  When a binary is linked against a shared library, the\n'SONAME' of the shared library is recorded in the binary's 'NEEDED'\nsection so that the dynamic linker knows that library must be loaded at\nruntime.  The shared library file's full name (which usually contains\nadditional version information not needed in the 'SONAME') is therefore\nnormally not referenced directly.  Instead, the shared library is loaded\nby its 'SONAME', which exists on the file system as a symlink pointing\nto the full name of the shared library.  This symlink must be provided\nby the package.  *note Run-time shared libraries: fd. describes how to\ndo this.  (1)\n",
            "subsections": []
        },
        "When linking a binary or another shared library against a shared": {
            "content": "library, the 'SONAME' for that shared library is not yet known.",
            "subsections": []
        },
        "Instead, the shared library is found by looking for a file matching the": {
            "content": "library name with '.so' appended.  This file exists on the file system\nas a symlink pointing to the shared library.\n",
            "subsections": []
        },
        "Shared libraries are normally split into several binary packages.  The": {
            "content": "'SONAME' symlink is installed by the runtime shared library package, and\nthe bare '.so' symlink is installed in the development package since\nit's only used when linking binaries or shared libraries.  However,\nthere are some exceptions for unusual shared libraries or for shared\nlibraries that are also loaded as dynamic modules by other programs.\n",
            "subsections": []
        },
        "This section is primarily concerned with how the separation of shared": {
            "content": "libraries into multiple packages should be done and how dependencies on\nand between shared library binary packages are managed in Debian.  *note",
            "subsections": []
        },
        "Libraries: fe. should be read in conjunction with this section and": {
            "content": "contains additional rules for the files contained in the shared library\npackages.\n\n* Menu:\n\n* Run-time shared libraries::\n* Shared library support files::\n* Static libraries::\n* Development files::\n* Dependencies between the packages of the same library::\n* Dependencies between the library and other packages::\n\n---------- Footnotes ----------\n\n(1) (1) This is a convention of shared library versioning, but not a\nrequirement.  Some libraries use the 'SONAME' as the full library file\nname instead and therefore do not need a symlink.  Most, however, encode\nadditional information about backwards-compatible revisions as a minor\nversion number in the file name.  The 'SONAME' itself only changes when\nbinaries linked with the earlier version of the shared library may no\nlonger work, but the filename may change with each release of the\nlibrary.  See *note Run-time shared libraries: fd. for more information.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Run-time shared libraries,  Next: Shared library support files,  Up: Shared libraries": {
            "content": "",
            "subsections": [
                {
                    "name": "8.1 Run-time shared libraries",
                    "content": ""
                }
            ]
        },
        "The run-time shared library must be placed in a package whose name": {
            "content": "changes whenever the 'SONAME' of the shared library changes.  This\nallows several versions of the shared library to be installed at the\nsame time, allowing installation of the new version of the shared\nlibrary without immediately breaking binaries that depend on the old\nversion.  (1)\n",
            "subsections": []
        },
        "Normally, the run-time shared library and its 'SONAME' symlink should be": {
            "content": "placed in a package named libraryname`soversion', where `soversion' is\nthe version number in the 'SONAME' of the shared library.\nAlternatively, if it would be confusing to directly append `soversion'\nto libraryname (if, for example, libraryname itself ends in a number),\nyou should use libraryname-`soversion' instead.  (2)\n\nTo determine the `soversion', look at the 'SONAME' of the library,\nstored in the ELF 'SONAME' attribute.  It is usually of the form\n'name.so.major-version' (for example, 'libz.so.1').  The version part is\nthe part which comes after '.so.', so in that example it is '1'.  The\nsoname may instead be of the form 'name-major-version.so', such as\n'libdb-5.1.so', in which case the name would be 'libdb' and the version\nwould be '5.1'.\n",
            "subsections": []
        },
        "If you have several shared libraries built from the same source tree,": {
            "content": "you may lump them all together into a single shared library package\nprovided that all of their 'SONAME's will always change together.  Be\naware that this is not normally the case, and if the 'SONAME's do not\nchange together, upgrading such a merged shared library package will be\nunnecessarily difficult because of file conflicts with the old version\nof the package.  When in doubt, always split shared library packages so\nthat each binary package installs a single shared library.\n",
            "subsections": []
        },
        "Every time the shared library ABI changes in a way that could break": {
            "content": "binaries linked against older versions of the shared library, the\n'SONAME' of the library and the corresponding name for the binary\npackage containing the runtime shared library should change.  Normally,\nthis means the 'SONAME' should change any time an interface is removed\nfrom the shared library or the signature of an interface (the number of\nparameters or the types of parameters that it takes, for example) is\nchanged.  This practice is vital to allowing clean upgrades from older\nversions of the package and clean transitions between the old ABI and\nnew ABI without having to upgrade every affected package simultaneously.\n",
            "subsections": []
        },
        "The 'SONAME' and binary package name need not, and indeed normally": {
            "content": "should not, change if new interfaces are added but none are removed or\nchanged, since this will not break binaries linked against the old\nshared library.  Correct versioning of dependencies on the newer shared\nlibrary by binaries that use the new interfaces is handled via the\n'symbols' or 'shlibs' system (see *note Dependencies between the library\nand other packages: 100.).\n",
            "subsections": []
        },
        "The package should install the shared libraries under their normal": {
            "content": "names.  For example, the libgdbm3 package should install\n'libgdbm.so.3.0.0' as '/usr/lib/libgdbm.so.3.0.0'.  The files should not\nbe renamed or re-linked by any 'prerm' or 'postrm' scripts; 'dpkg' will\ntake care of renaming things safely without affecting running programs,\nand attempts to interfere with this are likely to lead to problems.\n",
            "subsections": []
        },
        "Shared libraries should not be installed executable, since the dynamic": {
            "content": "linker does not require this and trying to execute a shared library\nusually results in a core dump.\n",
            "subsections": []
        },
        "The run-time library package should include the symbolic link for the": {
            "content": "'SONAME' that 'ldconfig' would create for the shared libraries.  For\nexample, the libgdbm3 package should include a symbolic link from\n'/usr/lib/libgdbm.so.3' to 'libgdbm.so.3.0.0'.  This is needed so that\nthe dynamic linker (for example 'ld.so' or 'ld-linux.so.*') can find the\nlibrary between the time that 'dpkg' installs it and the time that\n'ldconfig' is run in the 'postinst' script.  (3)\n\n* Menu:\n\n* ldconfig::\n\n---------- Footnotes ----------\n\n(1) (2) There are some exceptional situations in which\nco-installation of two versions of a shared library is not safe, and the\nnew shared library package has to conflict with the previous shared\nlibrary package.  This is never desirable, since it causes significant\ndisruption during upgrades and potentially breaks unpackaged third-party\nbinaries, but is sometimes unavoidable.  These situations are\nsufficiently rare that they usually warrant project-wide discussion, and\nare complex enough that the rules for them cannot be codified in Debian\nPolicy.\n\n(2) (3) The following command, when run on a shared library, will\noutput the name to be used for the Debian package containing that shared\nlibrary:\n\nobjdump -p /path/to/libfoo-bar.so.1.2.3 \\\n| sed -n -e's/^[[:space:]]*SONAME[[:space:]]*//p' \\\n| LCALL=C sed -r -e's/([0-9])\\.so\\./\\1-/; s/\\.so(\\.|$)//; y//-/; s/(.*)/\\L&/'\n\n(3) (4) The package management system requires the library to be\nplaced before the symbolic link pointing to it in the '.deb' file.  This\nis so that when 'dpkg' comes to install the symlink (overwriting the\nprevious symlink pointing at an older version of the library), the new\nshared library is already in place.  In the past, this was achieved by\ncreating the library in the temporary packaging directory before\ncreating the symlink.  Unfortunately, this was not always effective,\nsince the building of the tar file in the '.deb' depended on the\nbehavior of the underlying file system.  Some file systems (such as\nreiserfs) reorder the files so that the order of creation is forgotten.",
            "subsections": []
        },
        "Since version 1.7.0, 'dpkg' reorders the files itself as necessary when": {
            "content": "building a package.  Thus it is no longer important to concern oneself\nwith the order of file creation.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: ldconfig,  Up: Run-time shared libraries": {
            "content": "",
            "subsections": []
        },
        "Any package installing shared libraries in one of the default library": {
            "content": "directories of the dynamic linker (which are currently '/usr/lib' and\n'/lib') or a directory that is listed in '/etc/ld.so.conf' (1) must use\n'ldconfig' to update the shared library system.\n",
            "subsections": []
        },
        "Any such package must have the line 'activate-noawait ldconfig' in its": {
            "content": "'triggers' control file (i.e.  'DEBIAN/triggers').\n\n---------- Footnotes ----------\n\n(1) (5) These are currently '/usr/local/lib' plus directories under\n'/lib' and '/usr/lib' matching the multiarch triplet for the system\narchitecture.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Shared library support files,  Next: Static libraries,  Prev: Run-time shared libraries,  Up: Shared libraries": {
            "content": "",
            "subsections": [
                {
                    "name": "8.2 Shared library support files",
                    "content": ""
                }
            ]
        },
        "If your package contains files whose names do not change with each": {
            "content": "change in the library shared object version, you must not put them in\nthe shared library package.  Otherwise, several versions of the shared\nlibrary cannot be installed at the same time without filename clashes,\nmaking upgrades and transitions unnecessarily difficult.\n",
            "subsections": []
        },
        "It is recommended that supporting files and run-time support programs": {
            "content": "that do not need to be invoked manually by users, but are nevertheless\nrequired for the package to function, be placed (if they are binary) in\na subdirectory of '/usr/lib', preferably under '/usr/lib/'package-name.",
            "subsections": []
        },
        "If the program or file is architecture independent, the recommendation": {
            "content": "is for it to be placed in a subdirectory of '/usr/share' instead,\npreferably under '/usr/share/'package-name.  Following the package-name\nnaming convention ensures that the file names change when the shared\nobject version changes.\n",
            "subsections": []
        },
        "Run-time support programs that use the shared library but are not": {
            "content": "required for the library to function or files used by the shared library\nthat can be used by any version of the shared library package should\ninstead be put in a separate package.  This package might typically be\nnamed libraryname-tools; note the absence of the soversion in the\npackage name.\n",
            "subsections": []
        },
        "Files and support programs only useful when compiling software against": {
            "content": "the library should be included in the development package for the\nlibrary.  (1)\n\n---------- Footnotes ----------\n\n(1) (6) For example, a 'package-name-config' script or pkg-config\nconfiguration files.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Static libraries,  Next: Development files,  Prev: Shared library support files,  Up: Shared libraries": {
            "content": "",
            "subsections": [
                {
                    "name": "8.3 Static libraries",
                    "content": ""
                }
            ]
        },
        "The static library ('libraryname.a') is usually provided in addition to": {
            "content": "the shared version.  It is placed into the development package (see\nbelow).\n",
            "subsections": []
        },
        "In some cases, it is acceptable for a library to be available in static": {
            "content": "form only; these cases include:\n\n- libraries for languages whose shared library support is immature or\nunstable\n\n- libraries whose interfaces are in flux or under development\n(commonly the case when the library's major version number is zero,\nor where the ABI breaks across patchlevels)\n\n- libraries which are explicitly intended to be available only in\nstatic form by their upstream author(s)\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Development files,  Next: Dependencies between the packages of the same library,  Prev: Static libraries,  Up: Shared libraries": {
            "content": "",
            "subsections": [
                {
                    "name": "8.4 Development files",
                    "content": ""
                }
            ]
        },
        "If there are development files associated with a shared library, the": {
            "content": "source package needs to generate a binary development package named\nlibraryname-dev, or if you need to support multiple development versions\nat a time, librarynameapiversion-dev.  Installing the development\npackage must result in installation of all the development files\nnecessary for compiling programs against that shared library.  (1)\n",
            "subsections": []
        },
        "In case several development versions of a library exist, you may need to": {
            "content": "use 'dpkg''s Conflicts mechanism (see *note Conflicting binary packages\n- Conflicts: ef.) to ensure that the user only installs one development\nversion at a time (as different development versions are likely to have\nthe same header files in them, which would cause a filename clash if\nboth were unpacked).\n",
            "subsections": []
        },
        "The development package should contain a symlink for the associated": {
            "content": "shared library without a version number.  For example, the libgdbm-dev\npackage should include a symlink from '/usr/lib/libgdbm.so' to\n'libgdbm.so.3.0.0'.  This symlink is needed by the linker ('ld') when\ncompiling packages, as it will only look for 'libgdbm.so' when compiling\ndynamically.\n\nIf the package provides Ada Library Information ('*.ali') files for use\nwith GNAT, these files must be installed read-only (mode 0444) so that\nGNAT will not attempt to recompile them.  This overrides the normal file\nmode requirements given in *note Permissions and owners: 109.\n\n---------- Footnotes ----------\n\n(1) (7) This wording allows the development files to be split into\nseveral packages, such as a separate architecture-independent\nlibraryname-headers, provided that the development package depends on\nall the required additional packages.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Dependencies between the packages of the same library,  Next: Dependencies between the library and other packages,  Prev: Development files,  Up: Shared libraries": {
            "content": "",
            "subsections": [
                {
                    "name": "8.5 Dependencies between the packages of the same library",
                    "content": ""
                }
            ]
        },
        "Typically the development version should have an exact version": {
            "content": "dependency on the runtime library, to make sure that compilation and\nlinking happens correctly.  The '${binary:Version}' substitution\nvariable can be useful for this purpose.  (1)\n\n---------- Footnotes ----------\n\n(1) (8) Previously, '${Source-Version}' was used, but its name was\nconfusing and it has been deprecated since dpkg 1.13.19.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Dependencies between the library and other packages,  Prev: Dependencies between the packages of the same library,  Up: Shared libraries": {
            "content": "",
            "subsections": [
                {
                    "name": "8.6 Dependencies between the library and other packages",
                    "content": ""
                }
            ]
        },
        "If a package contains a binary or library which links to a shared": {
            "content": "library, we must ensure that, when the package is installed on the\nsystem, all of the libraries needed are also installed.  These\ndependencies must be added to the binary package when it is built, since\nthey may change based on which version of a shared library the binary or\nlibrary was linked with even if there are no changes to the source of\nthe binary (for example, symbol versions change, macros become functions\nor vice versa, or the binary package may determine at compile-time\nwhether new library interfaces are available and can be called).  To\nallow these dependencies to be constructed, shared libraries must\nprovide either a 'symbols' file or a 'shlibs' file.  These provide\ninformation on the package dependencies required to ensure the presence\nof interfaces provided by this library.  Any package with binaries or\nlibraries linking to a shared library must use these files to determine\nthe required dependencies when it is built.  Other packages which use a\nshared library (for example using 'dlopen()') should compute appropriate\ndependencies using these files at build time as well.\n",
            "subsections": []
        },
        "The two mechanisms differ in the degree of detail that they provide.  A": {
            "content": "'symbols' file documents, for each symbol exported by a library, the\nminimal version of the package any binary using this symbol will need.",
            "subsections": []
        },
        "This is typically the version of the package in which the symbol was": {
            "content": "introduced.  This information permits detailed analysis of the symbols\nused by a particular package and construction of an accurate dependency,\nbut it requires the package maintainer to track more information about\nthe shared library.\n\nA 'shlibs' file, in contrast, only documents the last time the library\nABI changed in any way.  It only provides information about the library\nas a whole, not individual symbols.  When a package is built using a\nshared library with only a 'shlibs' file, the generated dependency will\nrequire a version of the shared library equal to or newer than the\nversion of the last ABI change.  This generates unnecessarily\nrestrictive dependencies compared to 'symbols' files if none of the\nsymbols used by the package have changed.  This, in turn, could make\nupgrades needlessly complex and unnecessarily restrict use of the\npackage on systems with older versions of the shared libraries.\n\n'shlibs' files also only support a limited range of library SONAMEs,\nmaking it difficult to use 'shlibs' files in some unusual corner cases.\n(1)\n\n'symbols' files are therefore recommended for most shared library\npackages since they provide more accurate dependencies.  For most C\nlibraries, the additional detail required by 'symbols' files is not too\ndifficult to maintain.  However, maintaining exhaustive symbols\ninformation for a C++ library can be quite onerous, so 'shlibs' files\nmay be more appropriate for most C++ libraries.  Libraries with a\ncorresponding udeb must also provide a 'shlibs' file, since the udeb\ninfrastructure does not use 'symbols' files.\n\n* Menu:\n\n* Generating dependencies on shared libraries::\n* Shared library ABI changes::\n* The symbols system::\n* The shlibs system::\n\n---------- Footnotes ----------\n\n(1) (9) A 'shlibs' file represents an SONAME as a library name and\nversion number, such as 'libfoo VERSION', instead of recording the\nactual SONAME. If the SONAME doesn't match one of the two expected\nformats ('libfoo-VERSION.so' or 'libfoo.so.VERSION'), it cannot be\nrepresented.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Generating dependencies on shared libraries,  Next: Shared library ABI changes,  Up: Dependencies between the library and other packages": {
            "content": "",
            "subsections": []
        },
        "When a package that contains any shared libraries or compiled binaries": {
            "content": "is built, it must run 'dpkg-shlibdeps' on each shared library and\ncompiled binary to determine the libraries used and hence the\ndependencies needed by the package.  (1) To do this, put a call to\n'dpkg-shlibdeps' into your 'debian/rules' file in the source package.",
            "subsections": []
        },
        "List all of the compiled binaries, libraries, or loadable modules in": {
            "content": "your package.  (2) 'dpkg-shlibdeps' will use the 'symbols' or 'shlibs'\nfiles installed by the shared libraries to generate dependency\ninformation.  The package must then provide a substitution variable into\nwhich the discovered dependency information can be placed.\n",
            "subsections": []
        },
        "If you are creating a udeb for use in the Debian Installer, you will": {
            "content": "need to specify that 'dpkg-shlibdeps' should use the dependency line of\ntype 'udeb' by adding the '-tudeb' option.  (3) If there is no\ndependency line of type 'udeb' in the 'shlibs' file, 'dpkg-shlibdeps'\nwill fall back to the regular dependency line.\n\n'dpkg-shlibdeps' puts the dependency information into the\n'debian/substvars' file by default, which is then used by\n'dpkg-gencontrol'.  You will need to place a '${shlibs:Depends}'\nvariable in the 'Depends' field in the control file of every binary\npackage built by this source package that contains compiled binaries,\nlibraries, or loadable modules.  If you have multiple binary packages,\nyou will need to call 'dpkg-shlibdeps' on each one which contains\ncompiled libraries or binaries.  For example, you could use the '-T'\noption to the 'dpkg' utilities to specify a different 'substvars' file\nfor each binary package.  (4)\n\nFor more details on 'dpkg-shlibdeps', see its manual page.\n\nWe say that a binary 'foo' `directly' uses a library 'libbar' if it is\nexplicitly linked with that library (that is, the library is listed in\nthe ELF 'NEEDED' attribute, caused by adding '-lbar' to the link line\nwhen the binary is created).  Other libraries that are needed by\n'libbar' are linked `indirectly' to 'foo', and the dynamic linker will\nload them automatically when it loads 'libbar'.  A package should depend\non the libraries it directly uses, but not the libraries it only uses\nindirectly.  The dependencies for the libraries used directly will\nautomatically pull in the indirectly-used libraries.  'dpkg-shlibdeps'\nwill handle this logic automatically, but package maintainers need to be\naware of this distinction between directly and indirectly using a\nlibrary if they have to override its results for some reason.  (5)\n\n---------- Footnotes ----------\n\n(1) (10) 'dpkg-shlibdeps' will use a program like 'objdump' or\n'readelf' to find the libraries and the symbols in those libraries\ndirectly needed by the binaries or shared libraries in the package.\n\n(2) (11) The easiest way to call 'dpkg-shlibdeps' correctly is to use\na package helper framework such as debhelper.  If you are using\ndebhelper, the 'dhshlibdeps' program will do this work for you.  It\nwill also correctly handle multi-binary packages.\n\n(3) (12) 'dhshlibdeps' from the 'debhelper' suite will automatically\nadd this option if it knows it is processing a udeb.\n\n(4) (13) Again, 'dhshlibdeps' and 'dhgencontrol' will handle\neverything except the addition of the variable to the control file for\nyou if you're using debhelper, including generating separate 'substvars'\nfiles for each binary package and calling 'dpkg-gencontrol' with the\nappropriate flags.\n\n(5) (14) A good example of where this helps is the following: We\ncould update 'libimlib' with a new version that supports a new revision\nof a graphics format called dgf (but retaining the same major version\nnumber) and depends on a new library package libdgf4 instead of the\nolder libdgf3.  If we used 'ldd' to add dependencies for every library\ndirectly or indirectly linked with a binary, every package that uses\n'libimlib' would need to be recompiled so it would also depend on\nlibdgf4 in order to retire the older libdgf3 package.  Since\ndependencies are only added based on ELF 'NEEDED' attribute, packages\nusing 'libimlib' can rely on 'libimlib' itself having the dependency on\nan appropriate version of 'libdgf' and do not need rebuilding.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Shared library ABI changes,  Next: The symbols system,  Prev: Generating dependencies on shared libraries,  Up: Dependencies between the library and other packages": {
            "content": "",
            "subsections": []
        },
        "Maintaining a shared library package using either 'symbols' or 'shlibs'": {
            "content": "files requires being aware of the exposed ABI of the shared library and\nany changes to it.  Both 'symbols' and 'shlibs' files record every\nchange to the ABI of the shared library; 'symbols' files do so per\npublic symbol, whereas 'shlibs' files record only the last change for\nthe entire library.\n",
            "subsections": []
        },
        "There are two types of ABI changes: ones that are backward-compatible": {
            "content": "and ones that are not.  An ABI change is backward-compatible if any\nreasonable program or library that was linked with the previous version\nof the shared library will still work correctly with the new version of\nthe shared library.  (1) Adding new symbols to the shared library is a\nbackward-compatible change.  Removing symbols from the shared library is\nnot.  Changing the behavior of a symbol may or may not be\nbackward-compatible depending on the change; for example, changing a\nfunction to accept a new enum constant not previously used by the\nlibrary is generally backward-compatible, but changing the members of a\nstruct that is passed into library functions is generally not unless the\nlibrary takes special precautions to accept old versions of the data\nstructure.\n\nABI changes that are not backward-compatible normally require changing\nthe 'SONAME' of the library and therefore the shared library package\nname, which forces rebuilding all packages using that shared library to\nupdate their dependencies and allow them to use the new version of the\nshared library.  For more information, see *note Run-time shared\nlibraries: fd.  The remainder of this section will deal with\nbackward-compatible changes.\n",
            "subsections": []
        },
        "Backward-compatible changes require either updating or recording the": {
            "content": "minimal-version for that symbol in 'symbols' files or updating the\nversion in the dependencies in 'shlibs' files.  For more information on\nhow to do this in the two formats, see *note The symbols File Format:\n111. and *note The shlibs File Format: 112.  Below are general rules\nthat apply to both files.\n",
            "subsections": []
        },
        "The easy case is when a public symbol is added.  Simply add the version": {
            "content": "at which the symbol was introduced (for 'symbols' files) or update the\ndependency version (for 'shlibs') files.  But special care should be\ntaken to update dependency versions when the behavior of a public symbol\nchanges.  This is easy to neglect, since there is no automated method of\ndetermining such changes, but failing to update versions in this case\ncould result in binary packages with too-weak dependencies that will\nfail at runtime, possibly in ways that can cause security\nvulnerabilities.  If the package maintainer believes that a symbol\nbehavior change could have occurred but isn't sure, it's safer to update\nthe version rather than leave it unmodified.  This may result in\nunnecessarily strict dependencies, but it ensures that packages whose\ndependencies are satisfied will work properly.\n\nA common example of when a change to the dependency version is required\nis a function that takes an enum or struct argument that controls what\nthe function does.  For example:\n\nenum libraryop { OPFOO, OPBAR };\nint librarydooperation(enum libraryop);\n",
            "subsections": []
        },
        "If a new operation, 'OPBAZ', is added, the minimal-version of": {
            "content": "'librarydooperation' (for 'symbols' files) or the version in the\ndependency for the shared library (for 'shlibs' files) must be increased\nto the version at which 'OPBAZ' was introduced.  Otherwise, a binary\nbuilt against the new version of the library (having detected at\ncompile-time that the library supports 'OPBAZ') may be installed with a\nshared library that doesn't support 'OPBAZ' and will fail at runtime\nwhen it tries to pass 'OPBAZ' into this function.\n",
            "subsections": []
        },
        "Dependency versions in either 'symbols' or 'shlibs' files normally": {
            "content": "should not contain the Debian revision of the package, since the library\nbehavior is normally fixed for a particular upstream version and any\nDebian packaging of that upstream version will have the same behavior.",
            "subsections": []
        },
        "In the rare case that the library behavior was changed in a particular": {
            "content": "Debian revision, appending '~' to the end of the version that includes\nthe Debian revision is recommended, since this allows backports of the\nshared library package using the normal backport versioning convention\nto satisfy the dependency.\n\n---------- Footnotes ----------\n\n(1) (15) An example of an \"unreasonable\" program is one that uses\nlibrary interfaces that are documented as internal and unsupported.  If\nthe only programs or libraries affected by a change are \"unreasonable\"\nones, other techniques, such as declaring 'Breaks' relationships with\naffected packages or treating their usage of the library as bugs in\nthose packages, may be appropriate instead of changing the SONAME.",
            "subsections": []
        },
        "However, the default approach is to change the SONAME for any change to": {
            "content": "the ABI that could break a program.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: The symbols system,  Next: The shlibs system,  Prev: Shared library ABI changes,  Up: Dependencies between the library and other packages": {
            "content": "",
            "subsections": []
        },
        "In the following sections, we will first describe where the various": {
            "content": "'shlibs' files are to be found, then how to use 'dpkg-shlibdeps', and\nfinally the 'shlibs' file format and how to create them.\n\n* Menu:\n\n* The shlibs files present on the system::\n* The shlibs File Format::\n* Providing a shlibs file::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: The symbols files present on the system,  Next: The symbols File Format,  Up: The symbols system": {
            "content": "8.6.3.1 The 'symbols' files present on the system\n.................................................\n\n'symbols' files for a shared library are normally provided by the shared\nlibrary package as a control file, but there are several override paths\nthat are checked first in case that information is wrong or missing.",
            "subsections": []
        },
        "The following list gives them in the order in which they are read by": {
            "content": "'dpkg-shlibdeps'.  The first one that contains the required information\nis used.\n\n'debian/*/DEBIAN/symbols'\n\nDuring the package build, if the package itself contains shared\nlibraries with 'symbols' files, they will be generated in these\nstaging directories by 'dpkg-gensymbols' (see *note Providing a\nsymbols file: 116.).  'symbols' files found in the build tree take\nprecedence over 'symbols' files from other binary packages.\n\nThese files must exist before 'dpkg-shlibdeps' is run or the\ndependencies of binaries and libraries from a source package on\nother libraries from that same source package will not be correct.\nIn practice, this means that 'dpkg-gensymbols' must be run before\n'dpkg-shlibdeps' during the package build.  (1)\n\n'/etc/dpkg/symbols/package.symbols.arch' and '/etc/dpkg/symbols/package.symbols'\n\nPer-system overrides of shared library dependencies.  These files\nnormally do not exist.  They are maintained by the local system\nadministrator and must not be created by any Debian package.\n\n'symbols' control files for packages installed on the system\n\nThe 'symbols' control files for all the packages currently\ninstalled on the system are searched last.  This will be the most\ncommon source of shared library dependency information.  These\nfiles can be read with 'dpkg-query --control-show package symbols'.\n",
            "subsections": []
        },
        "Be aware that if a 'debian/shlibs.local' exists in the source package,": {
            "content": "it will override any 'symbols' files.  This is the only case where a\n'shlibs' is used despite 'symbols' files being present.  See *note The\nshlibs files present on the system: 117. and *note The shlibs system:\n35. for more information.\n\n---------- Footnotes ----------\n\n(1) (16) An example may clarify.  Suppose the source package 'foo'\ngenerates two binary packages, 'libfoo2' and 'foo-runtime'.  When\nbuilding the binary packages, the contents of the packages are staged in\nthe directories 'debian/libfoo2' and 'debian/foo-runtime' respectively.\n('debian/tmp' could be used instead of one of these.)  Since 'libfoo2'\nprovides the 'libfoo' shared library, it will contain a 'symbols' file,\nwhich will be installed in 'debian/libfoo2/DEBIAN/symbols', eventually\nto be included as a control file in that package.  When 'dpkg-shlibdeps'\nis run on the executable 'debian/foo-runtime/usr/bin/foo-prog', it will\nexamine the 'debian/libfoo2/DEBIAN/symbols' file to determine whether\n'foo-prog''s library dependencies are satisfied by any of the libraries\nprovided by 'libfoo2'.  Since those binaries were linked against the\njust-built shared library as part of the build process, the 'symbols'\nfile for the newly-built 'libfoo2' must take precedence over a 'symbols'\nfile for any other 'libfoo2' package already installed on the system.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: The symbols File Format,  Next: Providing a symbols file,  Prev: The symbols files present on the system,  Up: The symbols system": {
            "content": "8.6.3.2 The 'symbols' File Format\n.................................\n",
            "subsections": []
        },
        "The following documents the format of the 'symbols' control file as": {
            "content": "included in binary packages.  These files are built from template\n'symbols' files in the source package by 'dpkg-gensymbols'.  The\ntemplate files support a richer syntax that allows 'dpkg-gensymbols' to\ndo some of the tedious work involved in maintaining 'symbols' files,\nsuch as handling C++ symbols or optional symbols that may not exist on\nparticular architectures.  When writing 'symbols' files for a shared\nlibrary package, refer to 'dpkg-gensymbols(1)' for the richer syntax.\n\nA 'symbols' may contain one or more entries, one for each shared library\ncontained in the package corresponding to that 'symbols'.  Each entry\nhas the following format:\n\nlibrary-soname main-dependency-template\n[| alternative-dependency-template]\n[...]\n[* field-name: field-value]\n[...]\nsymbol minimal-version[ id-of-dependency-template]\n",
            "subsections": []
        },
        "To explain this format, we'll use the 'zlib1g' package as an example,": {
            "content": "which (at the time of writing) installs the shared library\n'/usr/lib/libz.so.1.2.3.4'.  Mandatory lines will be described first,\nfollowed by optional lines.\n\n'library-soname' must contain exactly the value of the ELF 'SONAME'\nattribute of the shared library.  In our example, this is 'libz.so.1'.\n(1)\n\n'main-dependency-template' has the same syntax as a dependency field in\na binary package control file, except that the string '#MINVER#' is\nreplaced by a version restriction like '(>= version)' or by nothing if\nan unversioned dependency is deemed sufficient.  The version restriction\nwill be based on which symbols from the shared library are referenced\nand the version at which they were introduced (see below).  In nearly\nall cases, 'main-dependency-template' will be 'package #MINVER#', where\npackage is the name of the binary package containing the shared library.",
            "subsections": []
        },
        "This adds a simple, possibly-versioned dependency on the shared library": {
            "content": "package.  In some rare cases, such as when multiple packages provide the\nsame shared library ABI, the dependency template may need to be more\ncomplex.\n\nIn our example, the first line of the 'zlib1g' 'symbols' file would be:\n\nlibz.so.1 zlib1g #MINVER#\n",
            "subsections": []
        },
        "Each public symbol exported by the shared library must have a": {
            "content": "corresponding symbol line, indented by one space.  symbol is the\nexported symbol (which, for C++, means the mangled symbol) followed by\n'@' and the symbol version, or the string 'Base' if there is no symbol\nversion.  'minimal-version' is the most recent version of the shared\nlibrary that changed the behavior of that symbol, whether by adding it,\nchanging its function signature (the parameters, their types, or the\nreturn type), or changing its behavior in a way that is visible to a\ncaller.  'id-of-dependency-template' is an optional field that\nreferences an 'alternative-dependency-template'; see below for a full\ndescription.\n",
            "subsections": []
        },
        "For example, 'libz.so.1' contains the symbols 'compress' and": {
            "content": "'compressBound'.  'compress' has no symbol version and last changed its\nbehavior in upstream version '1:1.1.4'.  'compressBound' has the symbol\nversion 'ZLIB1.2.0', was introduced in upstream version '1:1.2.0', and\nhas not changed its behavior.  Its 'symbols' file therefore contains the\nlines:\n\ncompress@Base 1:1.1.4\ncompressBound@ZLIB1.2.0 1:1.2.0\n",
            "subsections": []
        },
        "Packages using only 'compress' would then get a dependency on 'zlib1g": {
            "content": "(>= 1:1.1.4)', but packages using 'compressBound' would get a dependency\non 'zlib1g (>= 1:1.2.0)'.\n\nOne or more 'alternative-dependency-template' lines may be provided.",
            "subsections": []
        },
        "These are used in cases where some symbols in the shared library should": {
            "content": "use one dependency template while others should use a different\ntemplate.  The alternative dependency templates are used only if a\nsymbol line contains the 'id-of-dependency-template' field.  The first\nalternative dependency template is numbered 1, the second 2, and so\nforth.  (2)\n",
            "subsections": []
        },
        "Finally, the entry for the library may contain one or more metadata": {
            "content": "fields.  Currently, the only supported field-name is\n'Build-Depends-Package', whose value lists the *note library development\npackage: 108. on which packages using this shared library declare a\nbuild dependency.  If this field is present, 'dpkg-shlibdeps' uses it to\nensure that the resulting binary package dependency on the shared\nlibrary is at least as strict as the source package dependency on the\nshared library development package.  (3) For our example, the 'zlib1g'\n'symbols' file would contain:\n\n* Build-Depends-Package: zlib1g-dev\n\nAlso see 'deb-symbols(5)'.\n\n---------- Footnotes ----------\n\n(1) (17) This can be determined by using the command\n\nreadelf -d /usr/lib/libz.so.1.2.3.4 | grep SONAME\n\n(2) (18) An example of where this may be needed is with a library\nthat implements the libGL interface.  All GL implementations provide the\nsame set of base interfaces, and then may provide some additional\ninterfaces only used by programs that require that specific GL\nimplementation.  So, for example, libgl1-mesa-glx may use the following\n'symbols' file:\n\nlibGL.so.1 libgl1\n| libgl1-mesa-glx #MINVER#\npublicGlSymbol@Base 6.3-1 [...]\nimplementationSpecificSymbol@Base 6.5.2-7 1\n[...]\n",
            "subsections": []
        },
        "Binaries or shared libraries using only 'publicGlSymbol' would depend": {
            "content": "only on 'libgl1' (which may be provided by multiple packages), but ones\nusing 'implementationSpecificSymbol' would get a dependency on\n'libgl1-mesa-glx (>= 6.5.2-7)'.\n\n(3) (19) This field should normally not be necessary, since if the\nbehavior of any symbol has changed, the corresponding symbol\nminimal-version should have been increased.  But including it makes the\n'symbols' system more robust by tightening the dependency in cases where\nthe package using the shared library specifically requires at least a\nparticular version of the shared library development package for some\nreason.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Providing a symbols file,  Prev: The symbols File Format,  Up: The symbols system": {
            "content": "8.6.3.3 Providing a 'symbols' file\n..................................\n",
            "subsections": []
        },
        "If your package provides a shared library, you should arrange to include": {
            "content": "a 'symbols' control file following the format described above in that\npackage.  You must include either a 'symbols' control file or a 'shlibs'\ncontrol file.\n",
            "subsections": []
        },
        "Normally, this is done by creating a 'symbols' in the source package": {
            "content": "named 'debian/package.symbols' or 'debian/symbols', possibly with\n'.arch' appended if the symbols information varies by architecture.",
            "subsections": []
        },
        "This file may use the extended syntax documented in": {
            "content": "'dpkg-gensymbols(1)'.  Then, call 'dpkg-gensymbols' as part of the\npackage build process.  It will create 'symbols' files in the package\nstaging area based on the binaries and libraries in the package staging\narea and the 'symbols' files in the source package.  (1)\n",
            "subsections": []
        },
        "Packages that provide 'symbols' files must keep them up-to-date to": {
            "content": "ensure correct dependencies in packages that use the shared libraries.",
            "subsections": []
        },
        "This means updating the 'symbols' file whenever a new public symbol is": {
            "content": "added, changing the minimal-version field whenever a symbol changes\nbehavior or signature in a backward-compatible way (see *note Shared\nlibrary ABI changes: 10f.), and changing the library-soname and\nmain-dependency-template, and probably all of the minimal-version\nfields, when the library changes 'SONAME'.  Removing a public symbol\nfrom the 'symbols' file because it's no longer provided by the library\nnormally requires changing the 'SONAME' of the library.  See *note\nRun-time shared libraries: fd. for more information on 'SONAME's.\n\n---------- Footnotes ----------\n\n(1) (20) If you are using 'debhelper', 'dhmakeshlibs' will take care\nof calling either 'dpkg-gensymbols' or generating a 'shlibs' file as\nappropriate.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: The shlibs system,  Prev: The symbols system,  Up: Dependencies between the library and other packages": {
            "content": "",
            "subsections": []
        },
        "The 'shlibs' system is a simpler alternative to the 'symbols' system for": {
            "content": "declaring dependencies for shared libraries.  It may be more appropriate\nfor C++ libraries and other cases where tracking individual symbols is\ntoo difficult.  It predated the 'symbols' system and is therefore\nfrequently seen in older packages.  It is also required for udebs, which\ndo not support 'symbols'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: The shlibs files present on the system,  Next: The shlibs File Format,  Up: The shlibs system": {
            "content": "8.6.4.1 The 'shlibs' files present on the system\n................................................\n",
            "subsections": []
        },
        "There are several places where 'shlibs' files are found.  The following": {
            "content": "list gives them in the order in which they are read by 'dpkg-shlibdeps'.\n(The first one which gives the required information is used.)\n\n'debian/shlibs.local'\n\nThis lists overrides for this package.  This file should normally\nnot be used, but may be needed temporarily in unusual situations to\nwork around bugs in other packages, or in unusual cases where the\nnormally declared dependency information in the installed 'shlibs'\nfile for a library cannot be used.  This file overrides information\nobtained from any other source.\n\n'/etc/dpkg/shlibs.override'\n\nThis lists global overrides.  This list is normally empty.  It is\nmaintained by the local system administrator.\n\n'DEBIAN/shlibs' files in the \"build directory\"\n\nThese files are generated as part of the package build process and\nstaged for inclusion as control files in the binary packages being\nbuilt.  They provide details of any shared libraries included in\nthe same package.\n\n'shlibs' control files for packages installed on the system\n\nThe 'shlibs' control files for all the packages currently installed\non the system.  These files can be read using 'dpkg-query\n--control-show package shlibs'.\n\n'/etc/dpkg/shlibs.default'\n\nThis file lists any shared libraries whose packages have failed to\nprovide correct 'shlibs' files.  It was used when the 'shlibs'\nsetup was first introduced, but it is now normally empty.  It is\nmaintained by the 'dpkg' maintainer.\n",
            "subsections": []
        },
        "If a 'symbols' file for a shared library package is available,": {
            "content": "'dpkg-shlibdeps' will always use it in preference to a 'shlibs', with\nthe exception of 'debian/shlibs.local'.  The latter overrides any other\n'shlibs' or 'symbols' files.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: The shlibs File Format,  Next: Providing a shlibs file,  Prev: The shlibs files present on the system,  Up: The shlibs system": {
            "content": "8.6.4.2 The 'shlibs' File Format\n................................\n\nEach 'shlibs' file has the same format.  Lines beginning with '#' are\nconsidered to be comments and are ignored.  Each line is of the form:\n\n[type: ]library-name soname-version dependencies ...\n",
            "subsections": []
        },
        "We will explain this by reference to the example of the 'zlib1g'": {
            "content": "package, which (at the time of writing) installs the shared library\n'/usr/lib/libz.so.1.2.3.4'.\n\n'type' is an optional element that indicates the type of package for\nwhich the line is valid.  The only type currently in use is 'udeb'.  The\ncolon and space after the type are required.\n\n'library-name' is the name of the shared library, in this case 'libz'.\n(This must match the name part of the soname, see below.)\n\n'soname-version' is the version part of the ELF 'SONAME' attribute of\nthe library, determined the same way that the soversion component of the\nrecommended shared library package name is determined.  See *note\nRun-time shared libraries: fd. for the details.\n\n'dependencies' has the same syntax as a dependency field in a binary\npackage control file.  It should give details of which packages are\nrequired to satisfy a binary built against the version of the library\ncontained in the package.  See *note Syntax of relationship fields: eb.\nfor details on the syntax, and *note Shared library ABI changes: 10f.\nfor details on how to maintain the dependency version constraint.\n",
            "subsections": []
        },
        "In our example, if the last change to the 'zlib1g' package that could": {
            "content": "change behavior for a client of that library was in version\n'1:1.2.3.3.dfsg-1', then the 'shlibs' entry for this library could say:\n\nlibz 1 zlib1g (>= 1:1.2.3.3.dfsg)\n",
            "subsections": []
        },
        "This version restriction must be new enough that any binary built": {
            "content": "against the current version of the library will work with any version of\nthe shared library that satisfies that dependency.\n",
            "subsections": []
        },
        "As zlib1g also provides a udeb containing the shared library, there": {
            "content": "would also be a second line:\n\nudeb: libz 1 zlib1g-udeb (>= 1:1.2.3.3.dfsg)\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Providing a shlibs file,  Prev: The shlibs File Format,  Up: The shlibs system": {
            "content": "8.6.4.3 Providing a 'shlibs' file\n.................................\n",
            "subsections": []
        },
        "To provide a 'shlibs' file for a shared library binary package, create a": {
            "content": "'shlibs' file following the format described above and place it in the\n'DEBIAN' directory for that package during the build.  It will then be\nincluded as a control file for that package.  (1)\n",
            "subsections": []
        },
        "Since 'dpkg-shlibdeps' reads the 'DEBIAN/shlibs' files in all of the": {
            "content": "binary packages being built from this source package, all of the\n'DEBIAN/shlibs' files should be installed before 'dpkg-shlibdeps' is\ncalled on any of the binary packages.\n\n---------- Footnotes ----------\n\n(1) (21) This is what 'dhmakeshlibs' in the debhelper suite does.",
            "subsections": []
        },
        "If your package also has a udeb that provides a shared library,": {
            "content": "'dhmakeshlibs' can automatically generate the 'udeb:' lines if you\nspecify the name of the udeb with the '--add-udeb' option.\n\nFile: debian-policy.info,  Node: The Operating System,  Next: Files<2>,  Prev: Shared libraries,  Up: Top\n",
            "subsections": []
        },
        "9 The Operating System": {
            "content": "* Menu:\n\n* File system hierarchy::\n* Users and groups::\n* Starting system services::\n* Console messages from init.d scripts: Console messages from init d scripts.\n* Cron jobs::\n* Menus::\n* Multimedia handlers::\n* Keyboard configuration::\n* Environment variables::\n* Registering Documents using doc-base::\n* Alternate init systems::\n* Signaling that a reboot is required::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: File system hierarchy,  Next: Users and groups,  Up: The Operating System": {
            "content": "",
            "subsections": [
                {
                    "name": "9.1 File system hierarchy",
                    "content": "* Menu:\n\n* File System Structure::\n* Site-specific programs::\n* The system-wide mail directory::\n* /run and /run/lock::\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: File System Structure,  Next: Site-specific programs,  Up: File system hierarchy": {
            "content": "",
            "subsections": []
        },
        "The location of all files and directories must comply with the": {
            "content": "",
            "subsections": []
        },
        "Filesystem Hierarchy Standard (FHS), version 3.0, with the exceptions": {
            "content": "noted below, and except where doing so would violate other terms of\nDebian Policy.  The following exceptions to the FHS apply:\n\n1. The FHS requirement that architecture-independent\napplication-specific static files be located in '/usr/share' is\nrelaxed to a suggestion.  In particular, a subdirectory of\n'/usr/lib' may be used by a package (or a collection of packages)\nto hold a mixture of architecture-independent and\narchitecture-dependent files.  However, when a directory is\nentirely composed of architecture-independent files, it should be\nlocated in '/usr/share'.\n\n2. The optional rules related to user specific configuration files for\napplications are stored in the user's home directory are relaxed.\nIt is recommended that such files start with the ''.'' character (a\n\"dot file\"), and if an application needs to create more than one\ndot file then the preferred placement is in a subdirectory with a\nname starting with a '.' character, (a \"dot directory\").  In this\ncase it is recommended the configuration files not start with the\n'.' character.\n\n3. Only the dynamic linker and libc are allowed to install files in\n'/lib64'.\n\n4. The requirement for object files, internal binaries, and libraries,\nincluding 'libc.so.*', to be located directly under '/lib{,32}' and\n'/usr/lib{,32}' is amended, permitting files to instead be\ninstalled to '/lib/triplet' and '/usr/lib/triplet', where 'triplet'\nis the value returned by 'dpkg-architecture -qDEBHOSTMULTIARCH'\nfor the architecture of the package.  Packages must not install\nfiles to any triplet path other than the one matching the\narchitecture of that package; for instance, an 'Architecture:\namd64' package containing 32-bit x86 libraries must not install\nthese libraries to '/usr/lib/i386-linux-gnu'.  (1)\n\nPackages must not install files in '/usr/lib64' or in a\nsubdirectory of it.\n\nThe requirement for C and C++ headers files to be accessible\nthrough the search path '/usr/include/' is amended, permitting\nfiles to be accessible through the search path\n'/usr/include/triplet' where 'triplet' is as above.  (2)\n\nApplications may also use a single subdirectory under\n'/usr/lib/triplet'.\n\nThe execution time linker/loader, ld*, must still be made available\nin the existing location under /lib or /lib64 since this is part of\nthe ELF ABI for the architecture.\n\n5. The requirement that '/usr/local/share/man' be \"synonymous\" with\n'/usr/local/man' is relaxed to a recommendation\n\n6. The requirement that window managers with a single configuration\nfile call it 'system.*wmrc' is removed, as is the restriction that\nthe window manager subdirectory be named identically to the window\nmanager name itself.\n\n7. The requirement that boot manager configuration files live in\n'/etc', or at least are symlinked there, is relaxed to a\nrecommendation.\n\n8. '/var/run' is required to be a symbolic link to '/run', and\n'/var/lock' is required to be a symbolic link to '/run/lock'.\n\n9. The '/var/www' directory is additionally allowed.\n\n10. The requirement for '/usr/local/share/color' to exist if\n'/usr/share/color' exists is relaxed to a recommendation.\n\n11. The requirement for '/usr/local/libqual' to exist if '/libqual' or\n'/usr/libqual' exists (where 'libqual' is a variant of 'lib' such\nas 'lib32' or 'lib64') is removed.\n\n12. On GNU/Hurd systems, the following additional directories are\nallowed in the root filesystem: '/hurd' and '/servers'.  (3)\n\n13. As an exception to the requirement for there to be no\nsubdirectories in '/usr/bin', the 'mh' mail-handling suite may\ncreate '/usr/bin/mh/', as was allowed in FHS version 2.3.  Other\nsubdirectories are not allowed.\n",
            "subsections": []
        },
        "The version of this document referred here can be found in the": {
            "content": "'debian-policy' package or on FHS (Debian copy)(4) alongside this manual\n(or, if you have the debian-policy installed, you can try FHS (local\ncopy)(5)).  The latest version, which may be a more recent version, may\nbe found on FHS (upstream)(6).  Specific questions about following the\nstandard may be asked on the 'debian-devel' mailing list, or referred to\nthe FHS mailing list (see the FHS web site(7) for more information).\n\n---------- Footnotes ----------\n\n(1) (1) This is necessary in order to reserve the directories for use\nin cross-installation of library packages from other architectures, as\npart of 'multiarch'.\n\n(2) (2) This is necessary for architecture-dependent headers file to\ncoexist in a 'multiarch' setup.\n\n(3) (3) These directories are used to store translators and as a set\nof standard names for mount points, respectively.\n\n(4) https://www.debian.org/doc/packaging-manuals/fhs/\n\n(5) file:///usr/share/doc/debian-policy/fhs/\n\n(6) http://refspecs.linuxfoundation.org/fhs.shtml\n\n(7) http://refspecs.linuxfoundation.org/fhs.shtml\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Site-specific programs,  Next: The system-wide mail directory,  Prev: File System Structure,  Up: File system hierarchy": {
            "content": "",
            "subsections": []
        },
        "As mandated by the FHS, packages must not place any files in": {
            "content": "'/usr/local', either by putting them in the file system archive to be\nunpacked by 'dpkg' or by manipulating them in their maintainer scripts.\n",
            "subsections": []
        },
        "However, the package may create empty directories below '/usr/local' so": {
            "content": "that the system administrator knows where to place site-specific files.\nThese are not directories `in' '/usr/local', but are children of\ndirectories in '/usr/local'.  These directories ('/usr/local/*/dir/')\nshould be removed on package removal if they are empty.\n\nNote that this applies only to directories `below' '/usr/local', not\n`in' '/usr/local'.  Packages must not create sub-directories in the\ndirectory '/usr/local' itself, except those listed in FHS, section 4.9.",
            "subsections": []
        },
        "However, you may create directories below them as you wish.  You must": {
            "content": "not remove any of the directories listed in 4.9, even if you created\nthem.\n",
            "subsections": []
        },
        "If '/etc/staff-group-for-usr-local' does not exist, '/usr/local' and all": {
            "content": "subdirectories created by packages should have permissions 0755 and be\nowned by 'root:root'.  If '/etc/staff-group-for-usr-local' exists,\n'/usr/local' and subdirectories should have permissions 2775\n(group-writable and set-group-id) and be owned by 'root:staff'.\n",
            "subsections": []
        },
        "Since '/usr/local' can be mounted read-only from a remote server,": {
            "content": "'/usr/local/*/dir/' directories must be created and removed by the\n'postinst' and 'prerm' maintainer scripts and not be included in the\n'.deb' archive.  These scripts must not fail if either of these\noperations fail.\n",
            "subsections": []
        },
        "For example, the 'emacsen-common' package could contain something like": {
            "content": "if [ ! -e /usr/local/share/emacs ]; then\nif mkdir /usr/local/share/emacs 2>/dev/null; then\nif test -e /etc/staff-group-for-usr-local ; then\nif chown root:staff /usr/local/share/emacs; then\nchmod 2775 /usr/local/share/emacs || true\nfi\nelif chown root:root /usr/local/share/emacs; then\nchmod 0755 /usr/local/share/emacs || true\nfi\nfi\nfi\n\nin its 'postinst' script, and\n\nrmdir /usr/local/share/emacs/site-lisp 2>/dev/null || true\nrmdir /usr/local/share/emacs 2>/dev/null || true\n\nin the 'prerm' script.  (Note that this form is used to ensure that if\nthe script is interrupted, the directory '/usr/local/share/emacs' will\nstill be removed.)\n",
            "subsections": []
        },
        "If you do create a directory in '/usr/local' for local additions to a": {
            "content": "package, you should ensure that settings in '/usr/local' take precedence\nover the equivalents in '/usr'.\n",
            "subsections": []
        },
        "However, because '/usr/local' and its contents are for exclusive use of": {
            "content": "the local administrator, a package must not rely on the presence or\nabsence of files or directories in '/usr/local' for normal operation.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: The system-wide mail directory,  Next: /run and /run/lock,  Prev: Site-specific programs,  Up: File system hierarchy": {
            "content": "",
            "subsections": []
        },
        "The system-wide mail directory is '/var/mail'.  This directory is part": {
            "content": "of the base system and should not be owned by any particular mail\nagents.  The use of the old location '/var/spool/mail' is deprecated,\neven though the spool may still be physically located there.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: /run and /run/lock,  Prev: The system-wide mail directory,  Up: File system hierarchy": {
            "content": "",
            "subsections": []
        },
        "The directory '/run' is cleared at boot, normally by being a mount point": {
            "content": "for a temporary file system.  Packages therefore must not assume that\nany files or directories under '/run' other than '/run/lock' exist\nunless the package has arranged to create those files or directories\nsince the last reboot.  Normally, this is done by the package via an\ninit script.  See *note Writing the scripts: 12a. for more information.\n",
            "subsections": []
        },
        "Packages must not include files or directories under '/run', or under": {
            "content": "the older '/var/run' and '/var/lock' paths.  The latter paths will\nnormally be symlinks or other redirections to '/run' for backwards\ncompatibility.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Users and groups,  Next: Starting system services,  Prev: File system hierarchy,  Up: The Operating System": {
            "content": "",
            "subsections": [
                {
                    "name": "9.2 Users and groups",
                    "content": "* Menu:\n\n* Introduction::\n* UID and GID classes::\n* Non-existent home directories::\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Introduction,  Next: UID and GID classes,  Up: Users and groups": {
            "content": "",
            "subsections": []
        },
        "The Debian system can be configured to use either plain or shadow": {
            "content": "passwords.\n",
            "subsections": []
        },
        "Some user ids (UIDs) and group ids (GIDs) are reserved globally for use": {
            "content": "by certain packages.  Because some packages need to include files which\nare owned by these users or groups, or need the ids compiled into\nbinaries, these ids must be used on any Debian system only for the\npurpose for which they are allocated.  This is a serious restriction,\nand we should avoid getting in the way of local administration policies.",
            "subsections": []
        },
        "In particular, many sites allocate users and/or local system groups": {
            "content": "starting at 100.\n",
            "subsections": []
        },
        "Apart from this we should have dynamically allocated ids, which should": {
            "content": "by default be arranged in some sensible order, but the behavior should\nbe configurable.  When maintainers choose a new hardcoded or dynamically\ngenerated username for packages to use, they should start this username\nwith an underscore.  This minimizes collisions with locally created user\naccounts.\n",
            "subsections": []
        },
        "Packages other than 'base-passwd' must not modify '/etc/passwd',": {
            "content": "'/etc/shadow', '/etc/group' or '/etc/gshadow'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: UID and GID classes,  Next: Non-existent home directories,  Prev: Introduction,  Up: Users and groups": {
            "content": "The UID and GID numbers are divided into classes as follows:\n\n0-99:\n\nGlobally allocated by the Debian project, the same on every Debian\nsystem.  These ids will appear in the 'passwd' and 'group' files of\nall Debian systems, new ids in this range being added automatically\nas the 'base-passwd' package is updated.\n\nPackages which need a single statically allocated uid or gid should\nuse one of these; their maintainers should ask the 'base-passwd'\nmaintainer for ids.\n\n100-999:\n\nDynamically allocated system users and groups.  Packages which need\na user or group, but can have this user or group allocated\ndynamically and differently on each system, should use 'adduser\n--system' to create the group and/or user.  'adduser' will check\nfor the existence of the user or group, and if necessary choose an\nunused id based on the ranges specified in 'adduser.conf'.\n\n1000-59999:\n\nDynamically allocated user accounts.  By default 'adduser' will\nchoose UIDs and GIDs for user accounts in this range, though\n'adduser.conf' may be used to modify this behavior.\n\n60000-64999:\n\nGlobally allocated by the Debian project, but only created on\ndemand.  The ids are allocated centrally and statically, but the\nactual accounts are only created on users' systems on demand.\n\nThese ids are for packages which are obscure or which require many\nstatically-allocated ids.  These packages should check for and\ncreate the accounts in '/etc/passwd' or '/etc/group' (using\n'adduser' if it has this facility) if necessary.  Packages which\nare likely to require further allocations should have a \"hole\" left\nafter them in the allocation, to give them room to grow.\n\n65000-65533:\n\nReserved.\n\n65534:\n\nUser 'nobody'.  The corresponding gid refers to the group\n'nogroup'.\n\n65535:\n\nThis value `must not' be used, because it was the error return\nsentinel value when 'uidt' was 16 bits.\n\n65536-4294967293:\n\nDynamically allocated user accounts.  By default 'adduser' will not\nallocate UIDs and GIDs in this range, to ease compatibility with\nlegacy systems where 'uidt' is still 16 bits.\n\n4294967294:\n\n'(uidt)(-2) == (gidt)(-2)' `must not' be used, because it is used\nas the anonymous, unauthenticated user by some NFS implementations.\n\n4294967295:\n\n'(uidt)(-1) == (gidt)(-1)' `must not' be used, because it is the\nerror return sentinel value.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Non-existent home directories,  Prev: UID and GID classes,  Up: Users and groups": {
            "content": "",
            "subsections": []
        },
        "The canonical non-existent home directory is '/nonexistent'.  Users who": {
            "content": "should not have a home directory should have their home directory set to\nthis value.\n",
            "subsections": []
        },
        "The Debian autobuilders set HOME to '/nonexistent' so that packages": {
            "content": "which try to write to a home directory will fail to build.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Starting system services,  Next: Console messages from init d scripts,  Prev: Users and groups,  Up: The Operating System": {
            "content": "",
            "subsections": [
                {
                    "name": "9.3 Starting system services",
                    "content": "* Menu:\n\n* Introduction: Introduction<2>.\n* Writing the scripts::\n* Interfacing with init systems::\n* Boot-time initialization::\n* Example::\n\nFile: debian-policy.info,  Node: Introduction<2>,  Next: Writing the scripts,  Up: Starting system services\n\n"
                }
            ]
        },
        "Packages that include system services should include 'systemd' service": {
            "content": "units to start or stop those services.  See 'systemd.service(5)' for\ndetails on the syntax of a service unit file.  In the common case that a\npackage includes a single system service, the service unit should have\nthe same name as the package plus the '.service' extension.\n",
            "subsections": []
        },
        "If the package does not include a service unit (if, for example, no one": {
            "content": "has yet written one), including an init script, as described below, to\nstart the service is encouraged.\n",
            "subsections": []
        },
        "Packages including a service unit may optionally include an init script": {
            "content": "to support other init systems.  In this case, the init script should\nhave the same name as the 'systemd' service unit so that 'systemd' will\nignore it and use the service unit instead.  Packages may also support\nother init systems by including configuration in the native format of\nthose init systems.\n",
            "subsections": []
        },
        "If a service unit is not present, 'systemd' uses dependency information": {
            "content": "contained within the init scripts and symlinks in '/etc/rcn.d' to decide\nwhich scripts to run and in which order.  The 'sysv-rc' runlevel system\nfor 'sysvinit' uses the same symlinks in '/etc/rcn.d' to decide which\nscripts to run and in which order at boot time and when the init state\n(or \"runlevel\") is changed.  See the 'README.runlevels' file shipped\nwith 'sysv-rc' for implementation details.  Other alternatives might\nexist.\n",
            "subsections": []
        },
        "The sections below describe how to write those scripts and configure": {
            "content": "those symlinks.\n\nFile: debian-policy.info,  Node: Writing the scripts,  Next: Interfacing with init systems,  Prev: Introduction<2>,  Up: Starting system services\n\n",
            "subsections": []
        },
        "Init scripts are placed in '/etc/init.d'.  In the common case that a": {
            "content": "package starts a single service, they should be named\n'/etc/init.d/package'.  They should accept one argument, saying what to\ndo:\n\n'start'\n\nstart the service,\n\n'stop'\n\nstop the service,\n\n'restart'\n\nstop and restart the service if it's already running, otherwise\nstart the service\n\n'try-restart'\n\nrestart the service if it's already running, otherwise just report\nsuccess.\n\n'reload'\n\ncause the configuration of the service to be reloaded without\nactually stopping and restarting the service,\n\n'force-reload'\n\ncause the configuration to be reloaded if the service supports\nthis, otherwise restart the service.\n\n'status'\n\nreport the current status of the service\n",
            "subsections": []
        },
        "The 'start', 'stop', 'restart', and 'force-reload' options should be": {
            "content": "supported by all init scripts.  Supporting 'status' is encouraged.  The\n'reload' and 'try-restart' options are optional.\n",
            "subsections": []
        },
        "The 'init.d' scripts must ensure that they will behave sensibly (i.e.,": {
            "content": "returning success and not starting multiple copies of a service) if\ninvoked with 'start' when the service is already running, or with 'stop'\nwhen it isn't, and that they don't kill unfortunately-named user\nprocesses.  The best way to achieve this is usually to use\n'start-stop-daemon' with the '--oknodo' option.\n",
            "subsections": []
        },
        "Be careful of using 'set -e' in 'init.d' scripts.  Writing correct": {
            "content": "'init.d' scripts requires accepting various error exit statuses when\ndaemons are already running or already stopped without aborting the\n'init.d' script, and common 'init.d' function libraries are not safe to\ncall with 'set -e' in effect.  (1) For 'init.d' scripts, it's often\neasier to not use 'set -e' and instead check the result of each command\nseparately.\n",
            "subsections": []
        },
        "If a service reloads its configuration automatically (as in the case of": {
            "content": "'cron', for example), the 'reload' option of the 'init.d' script should\nbehave as if the configuration has been reloaded successfully.\n",
            "subsections": []
        },
        "The '/etc/init.d' scripts must be treated as configuration files, either": {
            "content": "(if they are present in the package, that is, in the .deb file) by\nmarking them as 'conffile's, or, (if they do not exist in the .deb) by\nmanaging them correctly in the maintainer scripts (see *note",
            "subsections": []
        },
        "Configuration files: 36.).  This is important since we want to give the": {
            "content": "local system administrator the chance to adapt the scripts to the local\nsystem, e.g., to disable a service without de-installing the package, or\nto specify some special command line options when starting a service,\nwhile making sure their changes aren't lost during the next package\nupgrade.\n",
            "subsections": []
        },
        "These scripts should not fail obscurely when the configuration files": {
            "content": "remain but the package has been removed, as configuration files remain\non the system after the package has been removed.  Only when 'dpkg' is\nexecuted with the '--purge' option will configuration files be removed.",
            "subsections": []
        },
        "In particular, as the '/etc/init.d/package' script itself is usually a": {
            "content": "'conffile', it will remain on the system if the package is removed but\nnot purged.  Therefore, you should include a 'test' statement at the top\nof the script, like this:\n\ntest -f program-executed-later-in-script || exit 0\n",
            "subsections": []
        },
        "Often there are some variables in the 'init.d' scripts whose values": {
            "content": "control the behavior of the scripts, and which a system administrator is\nlikely to want to change.  As the scripts themselves are frequently\n'conffile's, modifying them requires that the administrator merge in\ntheir changes each time the package is upgraded and the 'conffile'\nchanges.  To ease the burden on the system administrator, such\nconfigurable values should not be placed directly in the script.",
            "subsections": []
        },
        "Instead, they should be placed in a file in '/etc/default', which": {
            "content": "typically will have the same base name as the 'init.d' script.  This\nextra file should be sourced by the script when the script runs.  It\nmust contain only variable settings and comments in POSIX.1-2017 'sh'\nformat.  It must either be a 'conffile' or a configuration file\nmaintained by the package maintainer scripts.  See *note Configuration\nfiles: 36. for more details.\n",
            "subsections": []
        },
        "To ensure that vital configurable values are always available, the": {
            "content": "'init.d' script should set default values for each of the shell\nvariables it uses, either before sourcing the '/etc/default/' file or\nafterwards using something like the ': ${VAR:=default}' syntax.  Also,\nthe 'init.d' script must behave sensibly and not fail if the\n'/etc/default' file is deleted.\n",
            "subsections": []
        },
        "Files and directories under '/run', including ones referred to via the": {
            "content": "compatibility paths '/var/run' and '/var/lock', are normally stored on a\ntemporary filesystem and are normally not persistent across a reboot.",
            "subsections": []
        },
        "The 'init.d' scripts must handle this correctly.  This will typically": {
            "content": "mean creating any required subdirectories dynamically when the 'init.d'\nscript is run.  See *note /run and /run/lock: 129. for more information.\n\n---------- Footnotes ----------\n\n(1) (4) '/lib/lsb/init-functions', which assists in writing\nLSB-compliant init scripts, may fail if 'set -e' is in effect and\nechoing status messages to the console fails, for example.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Interfacing with init systems,  Next: Boot-time initialization,  Prev: Writing the scripts,  Up: Starting system services": {
            "content": "",
            "subsections": []
        },
        "Maintainer scripts for packages including init scripts must use": {
            "content": "'update-rc.d' as described below to interact with the service manager\nfor requests such as enabling or disabling services.  They should use\n'invoke-rc.d' as described below to invoke init scripts for requests\nsuch as starting and stopping service.\n\nDirectly managing the '/etc/rc?.d' links and directly invoking the\n'/etc/init.d/' init scripts should be done only by packages providing\nthe init script subsystem (such as 'init-system-helpers').\n\n* Menu:\n\n* Managing the links::\n* Running init scripts::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Managing the links,  Next: Running init scripts,  Up: Interfacing with init systems": {
            "content": "9.3.3.1 Managing the links\n..........................\n",
            "subsections": []
        },
        "The program 'update-rc.d' is provided for package maintainers to arrange": {
            "content": "for the proper creation and removal of '/etc/rcn.d' symbolic links, or\ntheir functional equivalent if another method is being used.  It is\nintended for use in package maintainer scripts.\n",
            "subsections": []
        },
        "You must not include any '/etc/rcn.d' symbolic links in the actual": {
            "content": "archive or manually create or remove the symbolic links in maintainer\nscripts; you must use the 'update-rc.d' program instead.  (The former\nwill fail if an alternative method of maintaining runlevel information\nis being used.)  You must not include the '/etc/rcn.d' directories\nthemselves in the archive either.  (Only the 'init-system-helpers'\npackage is permitted to do so.)\n",
            "subsections": []
        },
        "To get the default behavior for your package, put in your 'postinst'": {
            "content": "script:\n\nupdate-rc.d package defaults\n\nand in your 'postrm':\n\nif [ \"$1\" = purge ]; then\nupdate-rc.d package remove\nfi\n\nThe default behaviour is to enable autostarting your package's daemon.",
            "subsections": []
        },
        "The local administrator can override this using the command 'update-rc.d": {
            "content": "package disable'.  If, however, the daemon should not be autostarted\nunless the local administrator has explicitly requested this, instead\nadd to your 'postinst' script:\n\nupdate-rc.d package defaults-disabled\n\nand add a dependency on 'init-system-helpers (>= 1.50)', which\nintroduced the 'defaults-disabled' option.  Then the local administrator\ncan enable autostarting the daemon using the command 'update-rc.d\npackage enable'.\n",
            "subsections": []
        },
        "An older practice, which should not be used, was to include a line like": {
            "content": "'DISABLED=yes' in the package's '/etc/default' file.  The package's init\nscript would not start the service until the local system administrator\nchanged this to 'DISABLED=no', or similar.  The problem with this\napproach was that it hides from the init system whether or not the\ndaemon should actually be started, which leads to inconsistent and\nconfusing behavior: 'service <package> start' could return success but\nnot start the service; services with a dependency on this service will\nbe started even though the service isn't running; and init system status\ncommands could incorrectly claim that the service was started.\n",
            "subsections": []
        },
        "Note that if your package changes runlevels or priority, you may have to": {
            "content": "remove and recreate the links, since otherwise the old links may\npersist.  Refer to the documentation of 'update-rc.d'.\n",
            "subsections": []
        },
        "For more information about using 'update-rc.d', please consult its man": {
            "content": "page, 'update-rc.d(8)'.\n",
            "subsections": []
        },
        "It is easiest for packages not to call 'update-rc.d' directly, but": {
            "content": "instead use debhelper programs that add the required 'update-rc.d' calls\nautomatically.  See 'dhinstallinit', 'dhinstallsystemd', etc.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Running init scripts,  Prev: Managing the links,  Up: Interfacing with init systems": {
            "content": "9.3.3.2 Running init scripts\n............................\n",
            "subsections": []
        },
        "The program 'invoke-rc.d' is provided to make it easier for package": {
            "content": "maintainers to properly invoke an init script, obeying runlevel and\nother locally-defined constraints that might limit a package's right to\nstart, stop and otherwise manage services.  This program may be used by\nmaintainers in their packages' scripts.\n",
            "subsections": []
        },
        "The package maintainer scripts must use 'invoke-rc.d' to invoke the": {
            "content": "'/etc/init.d/*' init scripts or equivalent instead of calling them\ndirectly.\n",
            "subsections": []
        },
        "By default, 'invoke-rc.d' will pass any action requests (start, stop,": {
            "content": "reload, restart...) to the '/etc/init.d' script, filtering out requests to\nstart or restart a service out of its intended runlevels.\n\nMost packages will simply use:\n\ninvoke-rc.d package action\n\nin their 'postinst' and 'prerm' scripts.\n\nA package should register its init script services using 'update-rc.d'\nbefore it tries to invoke them using 'invoke-rc.d'.  Invocation of\nunregistered services may fail.\n",
            "subsections": []
        },
        "For more information about using 'invoke-rc.d', please consult its man": {
            "content": "page, 'invoke-rc.d(8)'.\n",
            "subsections": []
        },
        "It is easiest for packages not to call 'invoke-rc.d' directly, but": {
            "content": "instead use debhelper programs that add the required 'invoke-rc.d' calls\nautomatically.  See 'dhinstallinit', 'dhinstallsystemd', etc.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Boot-time initialization,  Next: Example,  Prev: Interfacing with init systems,  Up: Starting system services": {
            "content": "This section has been deleted.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Example,  Prev: Boot-time initialization,  Up: Starting system services": {
            "content": "",
            "subsections": []
        },
        "Examples on which you can base your 'systemd' service units are": {
            "content": "available in the man page 'systemd.unit(5)'.  An example on which you\ncan base your init scripts is available in the man page\n'init-d-script(5)'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Console messages from init d scripts,  Next: Cron jobs,  Prev: Starting system services,  Up: The Operating System": {
            "content": "",
            "subsections": [
                {
                    "name": "9.4 Console messages from 'init.d' scripts",
                    "content": "This section has been deleted.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Cron jobs,  Next: Menus,  Prev: Console messages from init d scripts,  Up: The Operating System": {
            "content": "",
            "subsections": [
                {
                    "name": "9.5 Cron jobs",
                    "content": ""
                }
            ]
        },
        "Packages must not modify the configuration file '/etc/crontab', and they": {
            "content": "must not modify the files in '/var/spool/cron/crontabs'.\n",
            "subsections": []
        },
        "If a package wants to install a job that has to be executed via cron, it": {
            "content": "should place a file named as specified in *note Cron job file names:\n146. into one or more of the following directories:\n\n- '/etc/cron.hourly'\n\n- '/etc/cron.daily'\n\n- '/etc/cron.weekly'\n\n- '/etc/cron.monthly'\n",
            "subsections": []
        },
        "As these directory names imply, the files within them are executed on an": {
            "content": "hourly, daily, weekly, or monthly basis, respectively.  The exact times\nare listed in '/etc/crontab'.\n",
            "subsections": []
        },
        "All files installed in any of these directories must be scripts (e.g.,": {
            "content": "shell scripts or Perl scripts) so that they can easily be modified by\nthe local system administrator.  In addition, they must be treated as\nconfiguration files.\n",
            "subsections": []
        },
        "If a certain job has to be executed at some other frequency or at a": {
            "content": "specific time, the package should install a file in '/etc/cron.d' with a\nname as specified in *note Cron job file names: 146.  This file uses the\nsame syntax as '/etc/crontab' and is processed by 'cron' automatically.",
            "subsections": []
        },
        "The file must also be treated as a configuration file.  (Note that": {
            "content": "entries in the '/etc/cron.d' directory are not handled by 'anacron'.",
            "subsections": []
        },
        "Thus, you should only use this directory for jobs which may be skipped": {
            "content": "if the system is not running.)\n",
            "subsections": []
        },
        "Unlike 'crontab' files described in the IEEE Std 1003.1-2008 (POSIX.1)": {
            "content": "available from The Open Group(1), the files in '/etc/cron.d' and the\nfile '/etc/crontab' have seven fields; namely:\n\n1. Minute [0,59]\n\n2. Hour [0,23]\n\n3. Day of the month [1,31]\n\n4. Month of the year [1,12]\n\n5. Day of the week ([0,6] with 0=Sunday)\n\n6. Username\n\n7. Command to be run\n",
            "subsections": []
        },
        "Ranges of numbers are allowed.  Ranges are two numbers separated with a": {
            "content": "hyphen.  The specified range is inclusive.  Lists are allowed.  A list\nis a set of numbers (or ranges) separated by commas.  Step values can be\nused in conjunction with ranges.\n",
            "subsections": []
        },
        "The scripts or 'crontab' entries in these directories should check if": {
            "content": "all necessary programs are installed before they try to execute them.",
            "subsections": []
        },
        "Otherwise, problems will arise when a package was removed but not purged": {
            "content": "since configuration files are kept on the system in this situation.\n",
            "subsections": []
        },
        "Any 'cron' daemon must provide '/usr/bin/crontab' and support normal": {
            "content": "'crontab' entries as specified in POSIX. The daemon must also support\nnames for days and months, ranges, and step values.  It has to support\n'/etc/crontab', and correctly execute the scripts in '/etc/cron.d'.  The\ndaemon must also correctly execute scripts in\n'/etc/cron.{hourly,daily,weekly,monthly}'.\n\n* Menu:\n\n* Cron job file names::\n\n---------- Footnotes ----------\n\n(1) https://www.opengroup.org/onlinepubs/9699919799/\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Cron job file names,  Up: Cron jobs": {
            "content": "",
            "subsections": []
        },
        "The file name of a cron job file should normally match the name of the": {
            "content": "package from which it comes.\n",
            "subsections": []
        },
        "If a package supplies multiple cron job files files in the same": {
            "content": "directory, the file names should all start with the name of the package\n(possibly modified as described below) followed by a hyphen ('-') and a\nsuitable suffix.\n\nA cron job file name must not include any period or plus characters ('.'\nor '+') characters as this will cause cron to ignore the file.\nUnderscores ('') should be used instead of '.' and '+' characters.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Menus,  Next: Multimedia handlers,  Prev: Cron jobs,  Up: The Operating System": {
            "content": "",
            "subsections": [
                {
                    "name": "9.6 Menus",
                    "content": ""
                }
            ]
        },
        "Packages shipping applications that comply with minimal requirements": {
            "content": "described below for integration with desktop environments should\nregister these applications in the desktop menu, following the\n`FreeDesktop' standard, using text files called `desktop entries'.\nTheir format is described in the `Desktop Entry Specification' at\n'https://standards.freedesktop.org/desktop-entry-spec/latest/' and\ncomplementary information can be found in the `Desktop Menu\nSpecification' at 'https://standards.freedesktop.org/menu-spec/latest/'.\n",
            "subsections": []
        },
        "The desktop entry files are installed by the packages in the directory": {
            "content": "'/usr/share/applications' and the FreeDesktop menus are refreshed using\n`dpkg triggers'.  It is therefore not necessary to depend on packages\nproviding FreeDesktop menu systems.\n",
            "subsections": []
        },
        "Entries displayed in the FreeDesktop menu should conform to the": {
            "content": "following minima for relevance and visual integration.\n\n- Unless hidden by default, the desktop entry must point to a PNG or\nSVG icon with a transparent background, providing at least the\n22??22 size, and preferably up to 64??64.  The icon should be neutral\nenough to integrate well with the default icon themes.  It is\nencouraged to ship the icon in the default `hicolor' icon theme\ndirectories, or to use an existing icon from the `hicolor' theme.\n\n- If the menu entry is not useful in the general case as a standalone\napplication, the desktop entry should set the 'NoDisplay' key to\ntrue, so that it can be configured to be displayed only by those\nwho need it.\n\n- In doubt, the package maintainer should coordinate with the\nmaintainers of menu implementations through the `debian-desktop'\nmailing list in order to avoid problems with categories or bad\ninteractions with other icons.  Especially for packages which are\npart of installation tasks, the contents of the\n'NotShowIn'/'OnlyShowIn' keys should be validated by the\nmaintainers of the relevant environments.\n",
            "subsections": []
        },
        "Since the FreeDesktop menu is a cross-distribution standard, the desktop": {
            "content": "entries written for Debian should be forwarded upstream, where they will\nbenefit to other users and are more likely to receive extra\ncontributions such as translations.\n",
            "subsections": []
        },
        "If a package installs a FreeDesktop desktop entry, it must not also": {
            "content": "install a Debian menu entry.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Multimedia handlers,  Next: Keyboard configuration,  Prev: Menus,  Up: The Operating System": {
            "content": "",
            "subsections": [
                {
                    "name": "9.7 Multimedia handlers",
                    "content": ""
                }
            ]
        },
        "Media types (formerly known as MIME types, Multipurpose Internet Mail": {
            "content": "",
            "subsections": []
        },
        "Extensions, RFCs 2045-2049) is a mechanism for encoding files and data": {
            "content": "streams and providing meta-information about them, in particular their\ntype and format (e.g.  'image/png', 'text/html', 'audio/ogg').\n",
            "subsections": []
        },
        "Registration of media type handlers allows programs like mail user": {
            "content": "agents and web browsers to invoke these handlers to view, edit or\ndisplay media types they don't support directly.\n",
            "subsections": []
        },
        "There are two overlapping systems to associate media types to programs": {
            "content": "which can handle them.  The `mailcap' system is found on a large number\nof Unix systems.  The `FreeDesktop' system is aimed at Desktop\nenvironments.  In Debian, FreeDesktop entries are automatically\ntranslated in mailcap entries, therefore packages already using desktop\nentries should not use the mailcap system directly.\n\n* Menu:\n\n* Registration of media type handlers with desktop entries::\n* Registration of media type handlers with mailcap entries::\n* Providing media types to files::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Registration of media type handlers with desktop entries,  Next: Registration of media type handlers with mailcap entries,  Up: Multimedia handlers": {
            "content": "",
            "subsections": []
        },
        "Packages shipping an application able to view, edit or point to files of": {
            "content": "a given media type, or open links with a given URI scheme, should list\nit in the 'MimeType' key of the application's *note desktop entry: 14.\nFor URI schemes, the relevant MIME types are 'x-scheme-handler/*' (e.g.\n'x-scheme-handler/https').\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Registration of media type handlers with mailcap entries,  Next: Providing media types to files,  Prev: Registration of media type handlers with desktop entries,  Up: Multimedia handlers": {
            "content": "",
            "subsections": []
        },
        "Packages that are not using desktop entries for registration should": {
            "content": "install a file in 'mailcap(5)' format (RFC 1524) in the directory\n'/usr/lib/mime/packages/'.  The file name should be the binary package's\nname.\n",
            "subsections": []
        },
        "The mime-support package provides the 'update-mime' program, which": {
            "content": "integrates these registrations in the '/etc/mailcap' file, using dpkg\ntriggers.  (1)\n",
            "subsections": []
        },
        "Packages installing desktop entries should not install mailcap entries": {
            "content": "for the same program, because the mime-support package already reads\ndesktop entries.\n\nPackages using these facilities `should not' depend on, recommend, or\nsuggest 'mime-support'.\n\n---------- Footnotes ----------\n\n(1) (5) Creating, modifying or removing a file in\n'/usr/lib/mime/packages/' using maintainer scripts will not activate the\ntrigger.  In that case, it can be done by calling 'dpkg-trigger\n--no-await /usr/lib/mime/packages' from the maintainer script after\ncreating, modifying, or removing the file.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Providing media types to files,  Prev: Registration of media type handlers with mailcap entries,  Up: Multimedia handlers": {
            "content": "",
            "subsections": []
        },
        "The media type of a file is discovered by inspecting the file's": {
            "content": "extension or its 'magic(5)' pattern, and interrogating a database\nassociating them with media types.\n",
            "subsections": []
        },
        "To support new associations between media types and files, their": {
            "content": "characteristic file extensions and magic patterns should be registered\nto the IANA (Internet Assigned Numbers Authority).  See\n'https://www.iana.org/assignments/media-types' and RFC 6838 for details.",
            "subsections": []
        },
        "This information will then propagate to the systems discovering file": {
            "content": "media types in Debian, provided by the shared-mime-info, mime-support\nand file packages.  If registration and propagation can not be waited\nfor, support can be asked to the maintainers of the packages mentioned\nabove.\n",
            "subsections": []
        },
        "For files that are produced and read by a single application, it is also": {
            "content": "possible to declare this association to the `Shared MIME Info' system by\ninstalling in the directory '/usr/share/mime/packages' a file in the XML\nformat specified at\n'https://standards.freedesktop.org/shared-mime-info-spec/latest/'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Keyboard configuration,  Next: Environment variables,  Prev: Multimedia handlers,  Up: The Operating System": {
            "content": "",
            "subsections": [
                {
                    "name": "9.8 Keyboard configuration",
                    "content": ""
                }
            ]
        },
        "To achieve a consistent keyboard configuration so that all applications": {
            "content": "interpret a keyboard event the same way, all programs in the Debian\ndistribution must be configured to comply with the following guidelines.\n\nThe following keys must have the specified interpretations:\n\n'<--'\n\ndelete the character to the left of the cursor\n\n'Delete'\n\ndelete the character to the right of the cursor\n\n'Control+H'\n\nemacs: the help prefix\n",
            "subsections": []
        },
        "The interpretation of any keyboard events should be independent of the": {
            "content": "terminal that is used, be it a virtual console, an X terminal emulator,\nan rlogin/telnet session, etc.\n",
            "subsections": []
        },
        "The following list explains how the different programs should be set up": {
            "content": "to achieve this:\n\n- '<--' generates 'KBBackSpace' in X.\n\n- 'Delete' generates 'KBDelete' in X.\n\n- X translations are set up to make 'KBBackspace' generate ASCII\nDEL, and to make 'KBDelete' generate 'ESC [ 3 ~' (this is the\nvt220 escape code for the \"delete character\" key).  This must be\ndone by loading the X resources using 'xrdb' on all local X\ndisplays, not using the application defaults, so that the\ntranslation resources used correspond to the 'xmodmap' settings.\n\n- The Linux console is configured to make '<--' generate DEL, and\n'Delete' generate 'ESC [ 3 ~'.\n\n- X applications are configured so that '<' deletes left, and\n'Delete' deletes right.  Motif applications already work like this.\n\n- Terminals should have 'stty erase ^?' .\n\n- The 'xterm' terminfo entry should have 'ESC [ 3 ~' for 'kdch1',\njust as for 'TERM=linux' and 'TERM=vt220'.\n\n- Emacs is programmed to map 'KBBackspace' or the 'stty erase'\ncharacter to 'delete-backward-char', and 'KBDelete' or 'kdch1' to\n'delete-forward-char', and '^H' to 'help' as always.\n\n- Other applications use the 'stty erase' character and 'kdch1' for\nthe two delete keys, with ASCII DEL being \"delete previous\ncharacter\" and 'kdch1' being \"delete character under cursor\".\n\nThis will solve the problem except for the following cases:\n\n- Some terminals have a '<--' key that cannot be made to produce\nanything except '^H'.  On these terminals Emacs help will be\nunavailable on '^H' (assuming that the 'stty erase' character takes\nprecedence in Emacs, and has been set correctly).  'M-x help' or\n'F1' (if available) can be used instead.\n\n- Some operating systems use '^H' for 'stty erase'.  However, modern\ntelnet versions and all rlogin versions propagate 'stty' settings,\nand almost all UNIX versions honour 'stty erase'.  Where the 'stty'\nsettings are not propagated correctly, things can be made to work\nby using 'stty' manually.\n\n- Some systems (including previous Debian versions) use 'xmodmap' to\narrange for both '<--' and 'Delete' to generate 'KBDelete'.  We\ncan change the behavior of their X clients using the same X\nresources that we use to do it for our own clients, or configure\nour clients using their resources when things are the other way\naround.  On displays configured like this 'Delete' will not work,\nbut '<--' will.\n\n- Some operating systems have different 'kdch1' settings in their\n'terminfo' database for 'xterm' and others.  On these systems the\n'Delete' key will not work correctly when you log in from a system\nconforming to our policy, but '<--' will.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Environment variables,  Next: Registering Documents using doc-base,  Prev: Keyboard configuration,  Up: The Operating System": {
            "content": "",
            "subsections": [
                {
                    "name": "9.9 Environment variables",
                    "content": ""
                }
            ]
        },
        "Programs installed on the system PATH ('/bin', '/usr/bin', '/sbin',": {
            "content": "'/usr/sbin', or similar directories) must not depend on custom\nenvironment variable settings to get reasonable defaults.  This is\nbecause such environment variables would have to be set in a system-wide\nconfiguration file such as a file in '/etc/profile.d', which is not\nsupported by all shells.\n",
            "subsections": []
        },
        "If a program usually depends on environment variables for its": {
            "content": "configuration, the program should be changed to fall back to a\nreasonable default configuration if these environment variables are not\npresent.  If this cannot be done easily (e.g., if the source code of a\nnon-free program is not available), the program must be replaced by a\nsmall \"wrapper\" shell script that sets the environment variables if they\nare not already defined, and calls the original program.\n\nHere is an example of a wrapper script for this purpose:\n\n#!/bin/sh\nBAR=${BAR:-/var/lib/fubar}\nexport BAR\nexec /usr/lib/foo/foo \"$@\"\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Registering Documents using doc-base,  Next: Alternate init systems,  Prev: Environment variables,  Up: The Operating System": {
            "content": "",
            "subsections": [
                {
                    "name": "9.10 Registering Documents using doc-base",
                    "content": ""
                }
            ]
        },
        "The doc-base package implements a mechanism for handling and presenting": {
            "content": "documentation.  Debian packages that provides online documentation\n(other than just manual pages) may register these documents with\ndoc-base by installing a doc-base control file in\n'/usr/share/doc-base/'.\n",
            "subsections": []
        },
        "Please refer to the documentation that comes with the doc-base package": {
            "content": "for information and details.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Alternate init systems,  Next: Signaling that a reboot is required,  Prev: Registering Documents using doc-base,  Up: The Operating System": {
            "content": "",
            "subsections": [
                {
                    "name": "9.11 Alternate init systems",
                    "content": "This section has been deleted.\n\n* Menu:\n\n* Event-based boot with upstart::\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Event-based boot with upstart,  Up: Alternate init systems": {
            "content": "",
            "subsections": []
        },
        "The 'upstart' event-based boot system is no longer maintained in Debian,": {
            "content": "so this section has been removed.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Signaling that a reboot is required,  Prev: Alternate init systems,  Up: The Operating System": {
            "content": "",
            "subsections": [
                {
                    "name": "9.12 Signaling that a reboot is required",
                    "content": ""
                }
            ]
        },
        "Programs can signal that a reboot is required by 'touch'ing": {
            "content": "'/run/reboot-required'.  It is conventional to add the name of the\npackage(s) requiring the reboot to '/run/reboot-required.pkgs'.",
            "subsections": []
        },
        "Programs should not add a package name to '/run/reboot-required.pkgs' if": {
            "content": "it is already present there.\n",
            "subsections": []
        },
        "The '/run/reboot-required' mechanism is used when a reboot is needed to": {
            "content": "fully apply the changes introduced by package installation or upgrade.",
            "subsections": []
        },
        "Typically it is the 'postinst' maintainer script that touches": {
            "content": "'/run/reboot-required', at the end of a successful configuration of the\npackage.\n",
            "subsections": []
        },
        "There are no guarantees provided by the '/run/reboot-required'": {
            "content": "convention as to when or whether the requested reboot will occur.\n\nFile: debian-policy.info,  Node: Files<2>,  Next: Customized programs,  Prev: The Operating System,  Up: Top\n",
            "subsections": []
        },
        "10 Files": {
            "content": "* Menu:\n\n* Binaries::\n* Libraries::\n* Shared libraries: Shared libraries<2>.\n* Scripts::\n* Symbolic links::\n* Device files::\n* Configuration files::\n* Log files::\n* Permissions and owners::\n* File names::\n\nFile: debian-policy.info,  Node: Binaries,  Next: Libraries,  Up: Files<2>\n",
            "subsections": [
                {
                    "name": "10.1 Binaries",
                    "content": ""
                }
            ]
        },
        "Two different packages must not install programs with different": {
            "content": "functionality but with the same filenames.  (The case of two programs\nhaving the same functionality but different implementations is handled\nvia \"alternatives\" or the \"Conflicts\" mechanism.  See *note Maintainer\nScripts: 5b. and *note Conflicting binary packages - Conflicts: ef.\nrespectively.)  If this case happens, one of the programs must be\nrenamed.  The maintainers should report this to the 'debian-devel'\nmailing list and try to find a consensus about which program will have\nto be renamed.  If a consensus cannot be reached, `both' programs must\nbe renamed.\n",
            "subsections": []
        },
        "To support merged-'/usr' systems, packages must not install files in": {
            "content": "both '/path' and '/usr/path'.  For example, a package must not install\nboth '/bin/example' and '/usr/bin/example'.\n",
            "subsections": []
        },
        "If a file is moved between '/path' and '/usr/path' in revisions of a": {
            "content": "",
            "subsections": []
        },
        "Debian package, and a compatibility symlink at the old path is needed,": {
            "content": "the symlink must be managed in a way that will not break when '/path'\nand '/usr/path' are the same underlying directory due to symlinks or\nother mechanisms.\n",
            "subsections": []
        },
        "Binary executables must not be statically linked with the GNU C library,": {
            "content": "since this prevents the binary from benefiting from fixes and\nimprovements to the C library without being rebuilt and complicates\nsecurity updates.  This requirement may be relaxed for binary\nexecutables whose intended purpose is to diagnose and fix the system in\nsituations where the GNU C library may not be usable (such as system\nrecovery shells or utilities like ldconfig) or for binary executables\nwhere the security benefits of static linking outweigh the drawbacks.\n",
            "subsections": []
        },
        "By default, when a package is being built, any binaries created should": {
            "content": "include debugging information, as well as being compiled with\noptimization.  You should also turn on as many reasonable compilation\nwarnings as possible (see *note Main building script; debian/rules:\n78.).  For the C programming language, this means the following\ncompilation parameters should be used:\n\nCC = gcc\nCFLAGS = -O2 -g -Wall # sane warning options vary between programs\nLDFLAGS = # none\n",
            "subsections": []
        },
        "By default all installed binaries should be stripped by calling": {
            "content": "strip --strip-unneeded --remove-section=.comment --remove-section=.note binaries\n\non the binaries after they have been copied into 'debian/tmp' but before\nthe tree is made into a package.\n",
            "subsections": []
        },
        "It is not recommended to strip binaries by passing the '-s' flag to": {
            "content": "'install', because this fails to remove .comment and .note sections, and\nalso prevents the automatic creation of dbgsym binary packages by tools\nlike 'dhstrip'.\n",
            "subsections": []
        },
        "Although binaries in the build tree should be compiled with debugging": {
            "content": "information by default, it can often be difficult to debug programs if\nthey are also subjected to compiler optimization.  For this reason, it\nis recommended to support the standardized environment variable\n'DEBBUILDOPTIONS' (see *note debian/rules and DEBBUILDOPTIONS: 79.).",
            "subsections": []
        },
        "This variable can contain several flags to change how a package is": {
            "content": "compiled and built.\n",
            "subsections": []
        },
        "It is up to the package maintainer to decide what compilation options": {
            "content": "are best for the package.  Certain binaries (such as\ncomputationally-intensive programs) will function better with certain\nflags ('-O3', for example); feel free to use them.  Please use good\njudgment here.  Don't use flags for the sake of it; only use them if\nthere is good reason to do so.  Feel free to override the upstream\nauthor's ideas about which compilation options are best: they are often\ninappropriate for our environment.\n\nFile: debian-policy.info,  Node: Libraries,  Next: Shared libraries<2>,  Prev: Binaries,  Up: Files<2>\n",
            "subsections": [
                {
                    "name": "10.2 Libraries",
                    "content": "If the package is `architecture: any', then the shared library\ncompilation and linking flags must have '-fPIC', or the package shall\nnot build on some of the supported architectures.  (1) Any exception to\nthis rule must be discussed on the mailing list\n`debian-devel@lists.debian.org', and a rough consensus obtained.  The\nreasons for not compiling with '-fPIC' flag must be recorded in the file\n'README.Debian', and care must be taken to either restrict the\narchitecture or arrange for '-fPIC' to be used on architectures where it\nis required.  (2)\n"
                }
            ]
        },
        "As to the static libraries, the common case is not to have relocatable": {
            "content": "code, since there is no benefit, unless in specific cases; therefore the\nstatic version must not be compiled with the '-fPIC' flag.  Any\nexception to this rule should be discussed on the mailing list\n`debian-devel@lists.debian.org', and the reasons for compiling with the\n'-fPIC' flag must be recorded in the file 'README.Debian'.  (3)\n",
            "subsections": []
        },
        "In other words, if both a shared and a static library is being built,": {
            "content": "each source unit ('*.c', for example, for C files) will need to be\ncompiled twice, for the normal case.\n",
            "subsections": []
        },
        "Libraries should be built with threading support and to be thread-safe": {
            "content": "if the library supports this.\n",
            "subsections": []
        },
        "Although not enforced by the build tools, shared libraries must be": {
            "content": "linked against all libraries that they use symbols from in the same way\nthat binaries are.  This ensures the correct functioning of the *note\nsymbols: 34. and *note shlibs: 35. systems and guarantees that all\nlibraries can be safely opened with 'dlopen()'.  Packagers may wish to\nuse the gcc option '-Wl,-z,defs' when building a shared library.  Since\nthis option enforces symbol resolution at build time, a missing library\nreference will be caught early as a fatal build error.\n",
            "subsections": []
        },
        "All installed shared libraries should be stripped with": {
            "content": "strip --strip-unneeded --remove-section=.comment --remove-section=.note your-lib\n\n(The option '--strip-unneeded' makes 'strip' remove only the symbols\nwhich aren't needed for relocation processing.)  Shared libraries can\nfunction perfectly well when stripped, since the symbols for dynamic\nlinking are in a separate part of the ELF object file.  (4)\n",
            "subsections": []
        },
        "Note that under some circumstances it may be useful to install a shared": {
            "content": "library unstripped, for example when building a separate package to\nsupport debugging.  The debhelper 'dhstrip'' tool can create such\npackages automatically.\n",
            "subsections": []
        },
        "Shared object files (often '.so' files) that are not public libraries,": {
            "content": "that is, they are not meant to be linked to by third party executables\n(binaries of other packages), should be installed in subdirectories of\nthe '/usr/lib' or '/usr/lib/triplet' directories (see the FHS for a\ndefinition).  Such files are exempt from the rules that govern ordinary\nshared libraries, except that they must not be installed executable and\nshould be stripped.  (5)\n",
            "subsections": []
        },
        "Packages that use 'libtool' to create and install their shared libraries": {
            "content": "install a file containing additional metadata (ending in '.la')\nalongside the library.  For public libraries intended for use by other\npackages, these files normally should not be included in the Debian\npackage, since the information they include is not necessary to link\nwith the shared library on Debian and can add unnecessary additional\ndependencies to other programs or libraries.  (6) If the '.la' file is\nrequired for that library (if, for instance, it's loaded via 'libltdl'\nin a way that requires that meta-information), the 'dependencylibs'\nsetting in the '.la' file should normally be set to the empty string.",
            "subsections": []
        },
        "If the shared library development package has historically included the": {
            "content": "'.la', it must be retained in the development package (with\n'dependencylibs' emptied) until all libraries that depend on it have\nremoved or emptied 'dependencylibs' in their '.la' files to prevent\nlinking with those other libraries using 'libtool' from failing.\n",
            "subsections": []
        },
        "If the '.la' must be included, it should be included in the development": {
            "content": "('-dev') package, unless the library will be loaded by 'libtool''s\n'libltdl' library.  If it is intended for use with 'libltdl', the '.la'\nfiles must go in the run-time library package.\n",
            "subsections": []
        },
        "These requirements for handling of '.la' files do not apply to loadable": {
            "content": "modules or libraries not installed in directories searched by default by\nthe dynamic linker.  Packages installing loadable modules will\nfrequently need to install the '.la' files alongside the modules so that\nthey can be loaded by 'libltdl'.  'dependencylibs' does not need to be\nmodified for libraries or modules that are not installed in directories\nsearched by the dynamic linker by default and not intended for use by\nother packages.\n",
            "subsections": []
        },
        "You must make sure that you use only released versions of shared": {
            "content": "libraries to build your packages; otherwise other users will not be able\nto run your binaries properly.  Producing source packages that depend on\nunreleased compilers is also usually a bad idea.\n\n---------- Footnotes ----------\n\n(1) (1) If you are using GCC, '-fPIC' produces code with relocatable\nposition independent code, which is required for most architectures to\ncreate a shared library, with i386 and perhaps some others where non\nposition independent code is permitted in a shared library.\n",
            "subsections": []
        },
        "Position independent code may have a performance penalty, especially on": {
            "content": "'i386'.  However, in most cases the speed penalty must be measured\nagainst the memory wasted on the few architectures where non position\nindependent code is even possible.\n\n(2) (2) Some of the reasons why this might be required is if the\nlibrary contains hand crafted assembly code that is not relocatable, the\nspeed penalty is excessive for compute intensive libs, and similar\nreasons.\n\n(3) (3) Some of the reasons for linking static libraries with the\n'-fPIC' flag are if, for example, one needs a Perl API for a library\nthat is under rapid development, and has an unstable API, so shared\nlibraries are pointless at this phase of the library's development.  In\nthat case, since Perl needs a library with relocatable code, it may make\nsense to create a static library with relocatable code.  Another reason\ncited is if you are distilling various libraries into a common shared\nlibrary, like 'mklibs' does in the Debian installer project.\n\n(4) (4) You might want to replace '--strip-unneeded' with\n'--strip-debug' for static libraries, as dhstrip does.  When stripping\nstatic libraries, you should also pass '--enable-deterministic-archives'\nto ensure that your package build is reproducible.\n\n(5) (5) A common example are the so-called \"plug-ins\", internal\nshared objects that are dynamically loaded by programs using\n'dlopen(3)'.\n\n(6) (6) These files store, among other things, all libraries on which\nthat shared library depends.  Unfortunately, if the '.la' file is\npresent and contains that dependency information, using 'libtool' when\nlinking against that library will cause the resulting program or library\nto be linked against those dependencies as well, even if this is\nunnecessary.  This can create unneeded dependencies on shared library\npackages that would otherwise be hidden behind the library ABI, and can\nmake library transitions to new SONAMEs unnecessarily complicated and\ndifficult to manage.\n\nFile: debian-policy.info,  Node: Shared libraries<2>,  Next: Scripts,  Prev: Libraries,  Up: Files<2>\n",
            "subsections": [
                {
                    "name": "10.3 Shared libraries",
                    "content": "This section has moved to *note Shared libraries: fb.\n\nFile: debian-policy.info,  Node: Scripts,  Next: Symbolic links,  Prev: Shared libraries<2>,  Up: Files<2>\n"
                },
                {
                    "name": "10.4 Scripts",
                    "content": ""
                }
            ]
        },
        "All command scripts, including the package maintainer scripts inside the": {
            "content": "package and used by 'dpkg', should have a '#!' line naming the shell to\nbe used to interpret them.\n\nIn the case of Perl scripts this should be '#!/usr/bin/perl'.\n",
            "subsections": []
        },
        "When scripts are installed into a directory in the system PATH, the": {
            "content": "script name should not include an extension such as '.sh' or '.pl' that\ndenotes the scripting language currently used to implement it.\n",
            "subsections": []
        },
        "Shell scripts ('sh' and 'bash') other than 'init.d' scripts should": {
            "content": "almost certainly start with 'set -e' so that errors are detected.\n'init.d' scripts are something of a special case, due to how frequently\nthey need to call commands that are allowed to fail, and it may instead\nbe easier to check the exit status of commands directly.  See *note",
            "subsections": []
        },
        "Writing the scripts: 12a. for more information about writing 'init.d'": {
            "content": "scripts.\n\nEvery script should use 'set -e' or check the exit status of `every'\ncommand.\n",
            "subsections": []
        },
        "Scripts may assume that '/bin/sh' implements the POSIX.1-2017 Shell": {
            "content": "",
            "subsections": []
        },
        "Command Language (1) plus the following additional features not mandated": {
            "content": "by POSIX.1-2017..  (2)\n\n- 'echo -n', if implemented as a shell built-in, must not generate a\nnewline.\n\n- 'test', if implemented as a shell built-in, must support '-a' and\n'-o' as binary logical operators.\n\n- 'local' to create a scoped variable must be supported, including\nlisting multiple variables in a single local command and assigning\na value to a variable at the same time as localizing it.  'local'\nmay or may not preserve the variable value from an outer scope if\nno assignment is present.  Uses such as:\n\nfname () {\nlocal a b c=delta d\n# ... use a, b, c, d ...\n}\n\nmust be supported and must set the value of 'c' to 'delta'.\n\n- The XSI extension to 'kill' allowing 'kill -signal', where signal\nis either the name of a signal or one of the numeric signals listed\nin the XSI extension (0, 1, 2, 3, 6, 9, 14, and 15), must be\nsupported if 'kill' is implemented as a shell built-in.\n\n- The XSI extension to 'trap' allowing numeric signals must be\nsupported.  In addition to the signal numbers listed in the\nextension, which are the same as for 'kill' above, 13 (SIGPIPE)\nmust be allowed.\n",
            "subsections": []
        },
        "If a shell script requires non-POSIX.1-2017 features from the shell": {
            "content": "interpreter other than those listed above, the appropriate shell must be\nspecified in the first line of the script (e.g., '#!/bin/bash') and the\npackage must depend on the package providing the shell (unless the shell\npackage is marked \"Essential\", as in the case of 'bash').\n",
            "subsections": []
        },
        "You may wish to restrict your script to POSIX.1-2017 features plus the": {
            "content": "above set when possible so that it may use '/bin/sh' as its interpreter.",
            "subsections": []
        },
        "Checking your script with 'checkbashisms' from the devscripts package or": {
            "content": "running your script with an alternate shell such as 'posh' may help\nuncover violations of the above requirements.  If in doubt whether a\nscript complies with these requirements, use '/bin/bash'.\n",
            "subsections": []
        },
        "Perl scripts should check for errors when making any system calls,": {
            "content": "including 'open', 'print', 'close', 'rename' and 'system'.\n\n'csh' and 'tcsh' should be avoided as scripting languages.  See `Csh\nProgramming Considered Harmful', one of the 'comp.unix.*' FAQs, which\ncan be found at 'http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/'.",
            "subsections": []
        },
        "If an upstream package comes with 'csh' scripts then you must make sure": {
            "content": "that they start with '#!/bin/csh' and make your package depend on the\n'c-shell' virtual package.\n",
            "subsections": []
        },
        "Any scripts which create files in world-writeable directories (e.g., in": {
            "content": "'/tmp') must use a mechanism which will fail atomically if a file with\nthe same name already exists.\n",
            "subsections": []
        },
        "The Debian base system provides the 'tempfile' and 'mktemp' utilities": {
            "content": "for use by scripts for this purpose.\n\n---------- Footnotes ----------\n\n(1) (7) The Open Group Base Specifications Issue 7, 2018 Edition,\nwhich is also known as POSIX.1-2017 and as IEEE Std 1003.1-2017 and is\navailable on the World Wide Web from The Open Group\n(http://pubs.opengroup.org/onlinepubs/9699919799/download/).\n\n(2) (8) These features are in widespread use in the Linux community\nand are implemented in all of bash, dash, and ksh, the most common\nshells users may wish to use as '/bin/sh'.\n\nFile: debian-policy.info,  Node: Symbolic links,  Next: Device files,  Prev: Scripts,  Up: Files<2>\n",
            "subsections": [
                {
                    "name": "10.5 Symbolic links",
                    "content": ""
                }
            ]
        },
        "In general, symbolic links within a top-level directory should be": {
            "content": "relative, and symbolic links pointing from one top-level directory to or\ninto another should be absolute.  (A top-level directory is a\nsub-directory of the root directory '/'.)  For example, a symbolic link\nfrom '/usr/lib/foo' to '/usr/share/bar' should be relative\n('../share/bar'), but a symbolic link from '/var/run' to '/run' should\nbe absolute.  (1) Symbolic links must not traverse above the root\ndirectory.\n",
            "subsections": []
        },
        "In addition, symbolic links should be specified as short as possible,": {
            "content": "i.e., link targets like 'foo/../bar' are deprecated.\n",
            "subsections": []
        },
        "Note that when creating a relative link using 'ln' it is not necessary": {
            "content": "for the target of the link to exist relative to the working directory\nyou're running 'ln' from, nor is it necessary to change directory to the\ndirectory where the link is to be made.  Simply include the string that\nshould appear as the target of the link (this will be a pathname\nrelative to the directory in which the link resides) as the first\nargument to 'ln'.\n",
            "subsections": []
        },
        "For example, in your 'Makefile' or 'debian/rules', you can do things": {
            "content": "like:\n\nln -fs gcc $(prefix)/bin/cc\nln -fs gcc debian/tmp/usr/bin/cc\nln -fs ../sbin/sendmail $(prefix)/bin/runq\nln -fs ../sbin/sendmail debian/tmp/usr/bin/runq\n\nA symbolic link pointing to a compressed file (in the sense that it is\nmeant to be uncompressed with 'unzip' or 'zless' etc.)  should always\nhave the same file extension as the referenced file.  (For example, if a\nfile 'foo.gz' is referenced by a symbolic link, the filename of the link\nhas to end with \"'.gz'\" too, as in 'bar.gz'.)\n\n---------- Footnotes ----------\n\n(1) (9) This is necessary to allow top-level directories to be\nsymlinks.  If linking '/var/run' to '/run' were done with the relative\nsymbolic link '../run', but '/var' were a symbolic link to '/srv/disk1',\nthe symbolic link would point to '/srv/run' rather than the intended\ntarget.\n\nFile: debian-policy.info,  Node: Device files,  Next: Configuration files,  Prev: Symbolic links,  Up: Files<2>\n",
            "subsections": [
                {
                    "name": "10.6 Device files",
                    "content": ""
                }
            ]
        },
        "Packages must not include device files or named pipes in the package": {
            "content": "file tree.\n",
            "subsections": []
        },
        "Debian packages should assume that device files in '/dev' are": {
            "content": "dynamically managed by the kernel or some other system facility and do\nnot have to be explicitly created or managed by the package.  Debian\npackages other than those whose purpose is to manage the '/dev' device\nfile tree must not attempt to create or remove device files in '/dev'\nwhen a dynamic device management facility is in use.\n",
            "subsections": []
        },
        "If named pipes or device files outside of '/dev' are required by a": {
            "content": "package, they should normally be created when necessary by the programs\nin the package, by init scripts or systemd unit files, or by similar\non-demand mechanisms.  If such files need to be created during package\ninstallation, they must be created in the 'postinst' maintainer script\n(1) and removed in either the 'prerm' or the 'postrm' maintainer script.\n\n---------- Footnotes ----------\n\n(1) (10) It's better to use 'mkfifo' rather than 'mknod' to create\nnamed pipes to avoid false positives from automated checks for packages\nincorrectly creating device files.\n\nFile: debian-policy.info,  Node: Configuration files,  Next: Log files,  Prev: Device files,  Up: Files<2>\n",
            "subsections": [
                {
                    "name": "10.7 Configuration files",
                    "content": "* Menu:\n\n* Definitions: Definitions<2>.\n* Location::\n* Behavior::\n* Sharing configuration files::\n* User configuration files (\"dotfiles\"): User configuration files \"dotfiles\".\n\nFile: debian-policy.info,  Node: Definitions<2>,  Next: Location,  Up: Configuration files\n\n\nconfiguration file\n\nA file that affects the operation of a program, or provides site-\nor host-specific information, or otherwise customizes the behavior\nof a program.  Typically, configuration files are intended to be\nmodified by the system administrator (if needed or desired) to\nconform to local policy or to provide more useful site-specific\nbehavior.\n\n'conffile'\n\nA file listed in a package's 'conffiles' file, and is treated\nspecially by 'dpkg' (see *note Details of configuration: e7.).\n"
                }
            ]
        },
        "The distinction between these two is important; they are not": {
            "content": "interchangeable concepts.  Almost all 'conffile's are configuration\nfiles, but many configuration files are not 'conffiles'.\n",
            "subsections": []
        },
        "As noted elsewhere, '/etc/init.d' scripts, '/etc/default' files, scripts": {
            "content": "installed in '/etc/cron.{hourly,daily,weekly,monthly}', and cron\nconfiguration installed in '/etc/cron.d' must be treated as\nconfiguration files.  In general, any script that embeds configuration\ninformation is de-facto a configuration file and should be treated as\nsuch.\n\nFile: debian-policy.info,  Node: Location,  Next: Behavior,  Prev: Definitions<2>,  Up: Configuration files\n\n",
            "subsections": []
        },
        "Any configuration files created or used by your package must reside in": {
            "content": "'/etc'.  If there are several, consider creating a subdirectory of\n'/etc' named after your package.\n",
            "subsections": []
        },
        "If your package creates or uses configuration files outside of '/etc',": {
            "content": "and it is not feasible to modify the package to use '/etc' directly, put\nthe files in '/etc' and create symbolic links to those files from the\nlocation that the package requires.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Behavior,  Next: Sharing configuration files,  Prev: Location,  Up: Configuration files": {
            "content": "Configuration file handling must conform to the following behavior:\n\n- local changes must be preserved during a package upgrade, and\n\n- configuration files must be preserved when the package is removed,\nand only deleted when the package is purged.\n",
            "subsections": []
        },
        "Obsolete configuration files without local changes should be removed by": {
            "content": "the package during upgrade.  (1)\n",
            "subsections": []
        },
        "The easy way to achieve this behavior is to make the configuration file": {
            "content": "a 'conffile'.  This is appropriate only if it is possible to distribute\na default version that will work for most installations, although some\nsystem administrators may choose to modify it.  This implies that the\ndefault version will be part of the package distribution, and must not\nbe modified by the maintainer scripts during installation (or at any\nother time).\n",
            "subsections": []
        },
        "In order to ensure that local changes are preserved correctly, packages": {
            "content": "must not contain or make hard links to conffiles.  (2)\n",
            "subsections": []
        },
        "The other way to do it is via the maintainer scripts.  In this case, the": {
            "content": "configuration file must not be listed as a 'conffile' and must not be\npart of the package distribution.  If the existence of a file is\nrequired for the package to be sensibly configured it is the\nresponsibility of the package maintainer to provide maintainer scripts\nwhich correctly create, update and maintain the file and remove it on\npurge.  (See *note Package maintainer scripts and installation\nprocedure: d6. for more information.)  These scripts must be idempotent\n(i.e., must work correctly if 'dpkg' needs to re-run them due to errors\nduring installation or removal), must cope with all the variety of ways\n'dpkg' can call maintainer scripts, must not overwrite or otherwise\nmangle the user's configuration without asking, must not ask unnecessary\nquestions (particularly during upgrades), and must otherwise be good\ncitizens.\n",
            "subsections": []
        },
        "The scripts are not required to configure every possible option for the": {
            "content": "package, but only those necessary to get the package running on a given\nsystem.  Ideally the sysadmin should not have to do any configuration\nother than that done (semi-)automatically by the 'postinst' script.\n\nA common practice is to create a script called 'package-configure' and\nhave the package's 'postinst' call it if and only if the configuration\nfile does not already exist.  In certain cases it is useful for there to\nbe an example or template file which the maintainer scripts use.  Such\nfiles should be in '/usr/share/package' or '/usr/lib/package' (depending\non whether they are architecture-independent or not).  There should be\nsymbolic links to them from '/usr/share/doc/package/examples' if they\nare examples, and should be perfectly ordinary 'dpkg'-handled files\n(`not' configuration files).\n",
            "subsections": []
        },
        "These two styles of configuration file handling must not be mixed, for": {
            "content": "that way lies madness: 'dpkg' will ask about overwriting the file every\ntime the package is upgraded.\n\n---------- Footnotes ----------\n\n(1) (11) The 'dpkg-maintscript-helper' tool, available from the dpkg\npackage, can help for this task.\n\n(2) (12) Rationale: There are two problems with hard links.  The\nfirst is that some editors break the link while editing one of the\nfiles, so that the two files may unwittingly become unlinked and\ndifferent.  The second is that 'dpkg' might break the hard link while\nupgrading 'conffile's.\n\nFile: debian-policy.info,  Node: Sharing configuration files,  Next: User configuration files \"dotfiles\",  Prev: Behavior,  Up: Configuration files\n\n",
            "subsections": []
        },
        "If two or more packages use the same configuration file and it is": {
            "content": "reasonable for both to be installed at the same time, one of these\npackages must be defined as `owner' of the configuration file, i.e., it\nwill be the package which handles that file as a configuration file.",
            "subsections": []
        },
        "Other packages that use the configuration file must depend on the owning": {
            "content": "package if they require the configuration file to operate.  If the other\npackage will use the configuration file if present, but is capable of\noperating without it, no dependency need be declared.\n",
            "subsections": []
        },
        "If it is desirable for two or more related packages to share a": {
            "content": "configuration file `and' for all of the related packages to be able to\nmodify that configuration file, then the following should be done:\n\n1. One of the related packages (the \"owning\" package) will manage the\nconfiguration file with maintainer scripts as described in the\nprevious section.\n\n2. The owning package should also provide a program that the other\npackages may use to modify the configuration file.\n\n3. The related packages must use the provided program to make any\ndesired modifications to the configuration file.  They should\neither depend on the core package to guarantee that the\nconfiguration modifier program is available or accept gracefully\nthat they cannot modify the configuration file if it is not.  (This\nis in addition to the fact that the configuration file may not even\nbe present in the latter scenario.)\n",
            "subsections": []
        },
        "Sometimes it's appropriate to create a new package which provides the": {
            "content": "basic infrastructure for the other packages and which manages the shared\nconfiguration files.  (The 'sgml-base' package is a good example.)\n",
            "subsections": []
        },
        "If the configuration file cannot be shared as described above, the": {
            "content": "packages must be marked as conflicting with each other.  Two packages\nthat specify the same file as a 'conffile' must conflict.  This is an\ninstance of the general rule about not sharing files.  Neither\nalternatives nor diversions are likely to be appropriate in this case;\nin particular, 'dpkg' does not handle diverted 'conffile's well.\n",
            "subsections": []
        },
        "When two packages both declare the same 'conffile', they may see": {
            "content": "left-over configuration files from each other even though they conflict\nwith each other.  If a user removes (without purging) one of the\npackages and installs the other, the new package will take over the\n'conffile' from the old package.  If the file was modified by the user,\nit will be treated the same as any other locally modified 'conffile'\nduring an upgrade.\n\nThe maintainer scripts must not alter a 'conffile' of `any' package,\nincluding the one the scripts belong to.\n\nFile: debian-policy.info,  Node: User configuration files \"dotfiles\",  Prev: Sharing configuration files,  Up: Configuration files\n\n",
            "subsections": []
        },
        "The files in '/etc/skel' will automatically be copied into new user": {
            "content": "accounts by 'adduser'.  No other program should reference the files in\n'/etc/skel'.\n\nTherefore, if a program needs a dotfile to exist in advance in '$HOME'\nto work sensibly, that dotfile should be installed in '/etc/skel' and\ntreated as a configuration file.\n",
            "subsections": []
        },
        "However, programs that require dotfiles in order to operate sensibly are": {
            "content": "a bad thing, unless they do create the dotfiles themselves\nautomatically.\n",
            "subsections": []
        },
        "Furthermore, programs should be configured by the Debian default": {
            "content": "installation to behave as closely to the upstream default behavior as\npossible.\n",
            "subsections": []
        },
        "Therefore, if a program in a Debian package needs to be configured in": {
            "content": "some way in order to operate sensibly, that should be done using a\nsite-wide configuration file placed in '/etc'.  Only if the program\ndoesn't support a site-wide default configuration and the package\nmaintainer doesn't have time to add it may a default per-user file be\nplaced in '/etc/skel'.\n\n'/etc/skel' should be as empty as we can make it.  This is particularly\ntrue because there is no easy (or necessarily desirable) mechanism for\nensuring that the appropriate dotfiles are copied into the accounts of\nexisting users when a package is installed.\n\nFile: debian-policy.info,  Node: Log files,  Next: Permissions and owners,  Prev: Configuration files,  Up: Files<2>\n",
            "subsections": [
                {
                    "name": "10.8 Log files",
                    "content": ""
                }
            ]
        },
        "Log files should usually be named '/var/log/package.log'.  If you have": {
            "content": "many log files, or need a separate directory for permission reasons\n('/var/log' is writable only by 'root'), you should usually create a\ndirectory named '/var/log/package' and place your log files there.\n",
            "subsections": []
        },
        "Log files must be rotated occasionally so that they don't grow": {
            "content": "indefinitely.  The best way to do this is to install a log rotation\nconfiguration file in the directory '/etc/logrotate.d', normally named\n'/etc/logrotate.d/package', and use the facilities provided by\n'logrotate'.  (1) Here is a good example for a logrotate config file\n(for more information see 'logrotate(8)'):\n\n/var/log/foo/*.log {\nrotate 12\nweekly\ncompress\nmissingok\npostrotate\nstart-stop-daemon -K -p /var/run/foo.pid -s HUP -x /usr/sbin/foo -q\nendscript\n}\n",
            "subsections": []
        },
        "This rotates all files under '/var/log/foo', saves 12 compressed": {
            "content": "generations, and tells the daemon to reopen its log files after the log\nrotation.  It skips this log rotation (via 'missingok') if no such log\nfile is present, which avoids errors if the package is removed but not\npurged.\n",
            "subsections": []
        },
        "Log files should be removed when the package is purged (but not when it": {
            "content": "is only removed).  This should be done by the 'postrm' script when it is\ncalled with the argument 'purge' (see *note Details of removal and/or\nconfiguration purging: e9.).\n\n---------- Footnotes ----------\n\n(1) (13) The traditional approach to log files has been to set up `ad\nhoc' log rotation schemes using simple shell scripts and cron.  While\nthis approach is highly customizable, it requires quite a lot of\nsysadmin work.  Even though the original Debian system helped a little\nby automatically installing a system which can be used as a template,\nthis was deemed not enough.\n",
            "subsections": []
        },
        "The use of 'logrotate', a program developed by Red Hat, is better, as it": {
            "content": "centralizes log management.  It has both a configuration file\n('/etc/logrotate.conf') and a directory where packages can drop their\nindividual log rotation configurations ('/etc/logrotate.d').\n\nFile: debian-policy.info,  Node: Permissions and owners,  Next: File names,  Prev: Log files,  Up: Files<2>\n",
            "subsections": [
                {
                    "name": "10.9 Permissions and owners",
                    "content": ""
                }
            ]
        },
        "The rules in this section are guidelines for general use.  If necessary": {
            "content": "you may deviate from the details below.  However, if you do so you must\nmake sure that what is done is secure and you should try to be as\nconsistent as possible with the rest of the system.  You are also\nencouraged to discuss it on 'debian-devel' first.\n",
            "subsections": []
        },
        "Files should be owned by 'root:root', and made writable only by the": {
            "content": "owner and universally readable (and executable, if appropriate), that is\nmode 644 or 755.\n\nDirectories should be mode 755 or (for group-writability) mode 2775.",
            "subsections": []
        },
        "The ownership of the directory should be consistent with its mode: if a": {
            "content": "directory is mode 2775, it should be owned by the group that needs write\naccess to it.  (1)\n",
            "subsections": []
        },
        "Control information files should be owned by 'root:root' and either mode": {
            "content": "644 (for most files) or mode 755 (for executables such as *note\nmaintainer scripts: 5b.).\n",
            "subsections": []
        },
        "Setuid and setgid executables should be mode 4755 or 2755 respectively,": {
            "content": "and owned by the appropriate user or group.  They should not be made\nunreadable (modes like 4711 or 2711 or even 4111); doing so achieves no\nextra security, because anyone can find the binary in the freely\navailable Debian package; it is merely inconvenient.  For the same\nreason you should not restrict read or execute permissions on non-set-id\nexecutables.\n",
            "subsections": []
        },
        "Some setuid programs need to be restricted to particular sets of users,": {
            "content": "using file permissions.  In this case they should be owned by the uid to\nwhich they are set-id, and by the group which should be allowed to\nexecute them.  They should have mode 4754; again there is no point in\nmaking them unreadable to those users who must not be allowed to execute\nthem.\n",
            "subsections": []
        },
        "It is possible to arrange that the system administrator can reconfigure": {
            "content": "the package to correspond to their local security policy by changing the\npermissions on a binary: they can do this by using 'dpkg-statoverride',\nas described below.  (2) Another method you should consider is to create\na group for people allowed to use the program(s) and make any setuid\nexecutables executable only by that group.\n",
            "subsections": []
        },
        "If you need to create a new user or group for your package there are two": {
            "content": "possibilities.  Firstly, you may need to make some files in the binary\npackage be owned by this user or group, or you may need to compile the\nuser or group id (rather than just the name) into the binary (though\nthis latter should be avoided if possible, as in this case you need a\nstatically allocated id).\n",
            "subsections": []
        },
        "If you need a statically allocated id, you must ask for a user or group": {
            "content": "id from the 'base-passwd' maintainer, and must not release the package\nuntil you have been allocated one.  Once you have been allocated one you\nmust either make the package depend on a version of the 'base-passwd'\npackage with the id present in '/etc/passwd' or '/etc/group', or arrange\nfor your package to create the user or group itself with the correct id\n(using 'adduser') in its 'preinst' or 'postinst'.  (Doing it in the\n'postinst' is to be preferred if it is possible, otherwise a\npre-dependency will be needed on the 'adduser' package.)\n",
            "subsections": []
        },
        "On the other hand, the program might be able to determine the uid or gid": {
            "content": "from the user or group name at runtime, so that a dynamically allocated\nid can be used.  In this case you should choose an appropriate user or\ngroup name, discussing this on 'debian-devel' and checking that it is\nunique.  When this has been checked you must arrange for your package to\ncreate the user or group if necessary using 'adduser' in the 'preinst'\nor 'postinst' script (again, the latter is to be preferred if it is\npossible).\n",
            "subsections": []
        },
        "Note that changing the numeric value of an id associated with a name is": {
            "content": "very difficult, and involves searching the file system for all\nappropriate files.  You need to think carefully whether a static or\ndynamic id is required, since changing your mind later will cause\nproblems.\n\n* Menu:\n\n* The use of dpkg-statoverride::\n\n---------- Footnotes ----------\n\n(1) (14) When a package is upgraded, and the owner or permissions of\na file included in the package has changed, dpkg arranges for the\nownership and permissions to be correctly set upon installation.",
            "subsections": []
        },
        "However, this does not extend to directories; the permissions and": {
            "content": "ownership of directories already on the system does not change on\ninstall or upgrade of packages.  This makes sense, since otherwise\ncommon directories like '/usr' would always be in flux.  To correctly\nchange permissions of a directory the package owns, explicit action is\nrequired, usually in the 'postinst' script.  Care must be taken to\nhandle downgrades as well, in that case.\n\n(2) (15) Ordinary files installed by 'dpkg' (as opposed to\n'conffile's and other similar objects) normally have their permissions\nreset to the distributed permissions when the package is reinstalled.\nHowever, the use of 'dpkg-statoverride' overrides this default behavior.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: The use of dpkg-statoverride,  Up: Permissions and owners": {
            "content": "",
            "subsections": []
        },
        "This section is not intended as policy, but as a description of the use": {
            "content": "of 'dpkg-statoverride'.\n",
            "subsections": []
        },
        "If a system administrator wishes to have a file (or directory or other": {
            "content": "such thing) installed with owner and permissions different from those in\nthe distributed Debian package, they can use the 'dpkg-statoverride'\nprogram to instruct 'dpkg' to use the different settings every time the\nfile is installed.  Thus the package maintainer should distribute the\nfiles with their normal permissions, and leave it for the system\nadministrator to make any desired changes.  For example, a daemon which\nis normally required to be setuid root, but in certain situations could\nbe used without being setuid, should be installed setuid in the '.deb'.",
            "subsections": []
        },
        "Then the local system administrator can change this if they wish.  If": {
            "content": "there are two standard ways of doing it, the package maintainer can use\n'debconf' to find out the preference, and call 'dpkg-statoverride' in\nthe maintainer script if necessary to accommodate the system\nadministrator's choice.  Care must be taken during upgrades to not\noverride an existing setting.\n",
            "subsections": []
        },
        "Given the above, 'dpkg-statoverride' is essentially a tool for system": {
            "content": "administrators and would not normally be needed in the maintainer\nscripts.  There is one type of situation, though, where calls to\n'dpkg-statoverride' would be needed in the maintainer scripts, and that\ninvolves packages which use dynamically allocated user or group ids.  In\nsuch a situation, something like the following idiom can be very helpful\nin the package's 'postinst', where 'sysuser' is a dynamically allocated\nid:\n\nfor i in /usr/bin/foo /usr/sbin/bar; do\n# only do something when no setting exists\nif ! dpkg-statoverride --list $i >/dev/null 2>&1; then\n#include: debconf processing, question about foo and bar\nif [ \"$RET\" = \"true\" ] ; then\ndpkg-statoverride --update --add sysuser root 4755 $i\nfi\nfi\ndone\n",
            "subsections": []
        },
        "The corresponding code to remove the override when the package is purged": {
            "content": "would be:\n\nfor i in /usr/bin/foo /usr/sbin/bar; do\nif dpkg-statoverride --list $i >/dev/null 2>&1; then\ndpkg-statoverride --remove $i\nfi\ndone\n\nFile: debian-policy.info,  Node: File names,  Prev: Permissions and owners,  Up: Files<2>\n",
            "subsections": [
                {
                    "name": "10.10 File names",
                    "content": ""
                }
            ]
        },
        "The name of the files installed by binary packages in the system PATH": {
            "content": "(namely '/bin', '/sbin', '/usr/bin', '/usr/sbin' and '/usr/games') must\nbe encoded in ASCII.\n",
            "subsections": []
        },
        "The name of the files and directories installed by binary packages": {
            "content": "outside the system PATH must be encoded in UTF-8 and should be\nrestricted to ASCII when it is possible to do so.\n\nFile: debian-policy.info,  Node: Customized programs,  Next: Documentation,  Prev: Files<2>,  Up: Top\n",
            "subsections": []
        },
        "11 Customized programs": {
            "content": "* Menu:\n\n* Architecture specification strings::\n* Daemons::\n* Using pseudo-ttys and modifying wtmp, utmp and lastlog: Using pseudo-ttys and modifying wtmp utmp and lastlog.\n* Editors and pagers::\n* Web servers and applications::\n* Mail transport, delivery and user agents: Mail transport delivery and user agents.\n* News system configuration::\n* Programs for the X Window System::\n* Perl programs and modules::\n* Emacs lisp programs::\n* Games::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Architecture specification strings,  Next: Daemons,  Up: Customized programs": {
            "content": "",
            "subsections": [
                {
                    "name": "11.1 Architecture specification strings",
                    "content": "If a program needs to specify an `architecture specification string' in\nsome place, it should select one of the strings provided by\n'dpkg-architecture -L'.  The strings are in the format 'os-arch', though\nthe OS part is sometimes elided, as when the OS is Linux.\n"
                }
            ]
        },
        "Note that we don't want to use 'arch-debian-linux' to apply to the rule": {
            "content": "'architecture-vendor-os' since this would make our programs incompatible\nwith other Linux distributions.  We also don't use something like\n'arch-unknown-linux', since the 'unknown' does not look very good.\n\n* Menu:\n\n* Architecture wildcards::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Architecture wildcards,  Up: Architecture specification strings": {
            "content": "A package may specify an architecture wildcard.  Architecture wildcards\nare in the format 'any' (which matches every architecture), 'os'-any, or\nany-'cpu'.  (1)\n\n---------- Footnotes ----------\n\n(1) (1) Internally, the package system normalizes the GNU triplets\nand the Debian arches into Debian arch triplets (which are kind of\ninverted GNU triplets), with the first component of the triplet\nrepresenting the libc and ABI in use, and then does matching against\nthose triplets.  However, such triplets are an internal implementation\ndetail that should not be used by packages directly.  The libc and ABI\nportion is handled internally by the package system based on the os and\ncpu.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Daemons,  Next: Using pseudo-ttys and modifying wtmp utmp and lastlog,  Prev: Architecture specification strings,  Up: Customized programs": {
            "content": "",
            "subsections": [
                {
                    "name": "11.2 Daemons",
                    "content": ""
                }
            ]
        },
        "The configuration files '/etc/services', '/etc/protocols', and": {
            "content": "'/etc/rpc' are managed by the 'netbase' package and must not be modified\nby other packages.\n",
            "subsections": []
        },
        "If a package requires a new entry in one of these files, the maintainer": {
            "content": "should get in contact with the 'netbase' maintainer, who will add the\nentries and release a new version of the 'netbase' package.\n",
            "subsections": []
        },
        "The configuration file '/etc/inetd.conf' must not be modified by the": {
            "content": "package's scripts except via the 'update-inetd' script or the\n'DebianNet.pm' Perl module.  See their documentation for details on how\nto add entries.\n",
            "subsections": []
        },
        "If a package wants to install an example entry into '/etc/inetd.conf',": {
            "content": "the entry must be preceded with exactly one hash character ('#').  Such\nlines are treated as \"commented out by user\" by the 'update-inetd'\nscript and are not changed or activated during package updates.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Using pseudo-ttys and modifying wtmp utmp and lastlog,  Next: Editors and pagers,  Prev: Daemons,  Up: Customized programs": {
            "content": "",
            "subsections": [
                {
                    "name": "11.3 Using pseudo-ttys and modifying wtmp, utmp and lastlog",
                    "content": ""
                }
            ]
        },
        "Some programs need to create pseudo-ttys.  This should be done using": {
            "content": "",
            "subsections": []
        },
        "Unix98 ptys if the C library supports it.  The resulting program must": {
            "content": "not be installed setuid root, unless that is required for other\nfunctionality.\n",
            "subsections": []
        },
        "The files '/var/run/utmp', '/var/log/wtmp' and '/var/log/lastlog' must": {
            "content": "be installed writable by group 'utmp'.  Programs which need to modify\nthose files must be installed setgid 'utmp'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Editors and pagers,  Next: Web servers and applications,  Prev: Using pseudo-ttys and modifying wtmp utmp and lastlog,  Up: Customized programs": {
            "content": "",
            "subsections": [
                {
                    "name": "11.4 Editors and pagers",
                    "content": ""
                }
            ]
        },
        "Some programs have the ability to launch an editor or pager program to": {
            "content": "edit or display a text document.  Since there are lots of different\neditors and pagers available in the Debian distribution, the system\nadministrator and each user should have the possibility to choose their\npreferred editor and pager.\n",
            "subsections": []
        },
        "In addition, every program should choose a good default editor/pager if": {
            "content": "none is selected by the user or system administrator.\n",
            "subsections": []
        },
        "Thus, every program that launches an editor or pager must use the EDITOR": {
            "content": "or PAGER environment variable to determine the editor or pager the user\nwishes to use.  If these variables are not set, the programs\n'/usr/bin/editor' and '/usr/bin/pager' should be used, respectively.",
            "subsections": []
        },
        "These commands may be invoked explicitly (e.g., as '/usr/bin/editor') or": {
            "content": "via a PATH search (e.g., as 'editor').\n\nThese two files are managed through the 'dpkg' \"alternatives\" mechanism.",
            "subsections": []
        },
        "Every package providing an editor or pager must call the": {
            "content": "'update-alternatives' script to register as an alternative for\n'/usr/bin/editor' or '/usr/bin/pager' as appropriate.  The alternative\nshould have a slave alternative for '/usr/share/man/man1/editor.1.gz' or\n'/usr/share/man/man1/pager.1.gz' pointing to the corresponding manual\npage.\n",
            "subsections": []
        },
        "If it is very hard to adapt a program to make use of the EDITOR or PAGER": {
            "content": "variables, that program may be configured to use\n'/usr/bin/sensible-editor' and '/usr/bin/sensible-pager' as the editor\nor pager program respectively.  These are two scripts provided in the\nsensible-utils package that check the EDITOR and PAGER variables and\nlaunch the appropriate program, and fall back to '/usr/bin/editor' and\n'/usr/bin/pager' if the variable is not set.\n\nA program may also use the VISUAL environment variable to determine the\nuser's choice of editor.  If it exists, it should take precedence over\nEDITOR. This is in fact what '/usr/bin/sensible-editor' does.\n",
            "subsections": []
        },
        "It is not required for a package to depend on 'editor' and 'pager', nor": {
            "content": "is it required for a package to provide such virtual packages.  (1)\n\n---------- Footnotes ----------\n\n(1) (2) The Debian base system already provides an editor and a pager\nprogram.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Web servers and applications,  Next: Mail transport delivery and user agents,  Prev: Editors and pagers,  Up: Customized programs": {
            "content": "",
            "subsections": [
                {
                    "name": "11.5 Web servers and applications",
                    "content": ""
                }
            ]
        },
        "This section describes the locations and URLs that should be used by all": {
            "content": "web servers and web applications in the Debian system.\n\n1. Cgi-bin executable files are installed in the directory\n\n/usr/lib/cgi-bin\n\nor a subdirectory of that directory, and the script\n\n/usr/lib/cgi-bin/.../cgi-bin-name\n\nshould be referred to as\n\nhttp://localhost/cgi-bin/.../cgi-bin-name\n\n2. (Deleted)\n\n3. Access to images\n\nImages for a package should be stored in\n'/usr/share/images/package' and referred to through an alias\n'/images/' as:\n\nhttp://localhost/images/package/filename\n\n4. Web Document Root\n\nWeb Applications should try to avoid storing files in the Web\nDocument Root.  Instead they should use the /usr/share/doc/package\ndirectory for documents.  If access to the web document root is\nunavoidable then use\n\n/var/www/html\n\nas the Document Root.  This might be just a symbolic link to the\nlocation where the system administrator has put the real document\nroot.\n\n5. Providing httpd and/or httpd-cgi\n\nAll web servers should provide the virtual package 'httpd'.  If a\nweb server has CGI support it should provide 'httpd-cgi'\nadditionally.\n\nAll web applications which do not contain CGI scripts should depend\non 'httpd', all those web applications which 'do' contain CGI\nscripts, should depend on 'httpd-cgi'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Mail transport delivery and user agents,  Next: News system configuration,  Prev: Web servers and applications,  Up: Customized programs": {
            "content": "",
            "subsections": [
                {
                    "name": "11.6 Mail transport, delivery and user agents",
                    "content": ""
                }
            ]
        },
        "Debian packages which process electronic mail, whether mail user agents": {
            "content": "(MUAs) or mail transport agents (MTAs), must ensure that they are\ncompatible with the configuration decisions below.  Failure to do this\nmay result in lost mail, broken 'From:' lines, and other serious brain\ndamage!\n",
            "subsections": []
        },
        "The mail spool is '/var/mail' and the interface to send a mail message": {
            "content": "is '/usr/sbin/sendmail' (as per the FHS). On older systems, the mail\nspool may be physically located in '/var/spool/mail', but all access to\nthe mail spool should be via the '/var/mail' symlink.  The mail spool is\npart of the base system and not part of the MTA package.\n",
            "subsections": []
        },
        "All Debian MUAs, MTAs, MDAs and other mailbox accessing programs (such": {
            "content": "as IMAP daemons) must lock the mailbox in an NFS-safe way.  This means\nthat 'fcntl()' locking must be combined with dot locking.  To avoid\ndeadlocks, a program should use 'fcntl()' first and dot locking after\nthis, or alternatively implement the two locking methods in a non\nblocking way.  (1) Using the functions 'maillock' and 'mailunlock'\nprovided by the 'liblockfile*' packages is the recommended way to\naccomplish this.\n",
            "subsections": []
        },
        "Mailboxes are generally either mode 600 and owned by user or mode 660": {
            "content": "and owned by 'user:mail'.  (2) The local system administrator may choose\na different permission scheme; packages should not make assumptions\nabout the permission and ownership of mailboxes unless required (such as\nwhen creating a new mailbox).  A MUA may remove a mailbox (unless it has\nnonstandard permissions) in which case the MTA or another MUA must\nrecreate it if needed.\n",
            "subsections": []
        },
        "The mail spool is 2775 'root:mail', and MUAs should be setgid mail to do": {
            "content": "the locking mentioned above (and must obviously avoid accessing other\nusers' mailboxes using this privilege).\n\n'/etc/aliases' is the source file for the system mail aliases (e.g.,\npostmaster, usenet, etc.), it is the one which the sysadmin and\n'postinst' scripts may edit.  After '/etc/aliases' is edited the program\nor human editing it must call 'newaliases'.  All MTA packages must come\nwith a 'newaliases' program, even if it does nothing, but older MTA\npackages did not do this so programs should not fail if 'newaliases'\ncannot be found.  Note that because of this, all MTA packages must have\n'Provides', 'Conflicts' and 'Replaces: mail-transport-agent' control\nfields.\n",
            "subsections": []
        },
        "The convention of writing 'forward to address' in the mailbox itself is": {
            "content": "not supported.  Use a '.forward' file instead.\n",
            "subsections": []
        },
        "The 'rmail' program used by UUCP for incoming mail should be": {
            "content": "'/usr/sbin/rmail'.  Likewise, 'rsmtp', for receiving\nbatch-SMTP-over-UUCP, should be '/usr/sbin/rsmtp' if it is supported.\n",
            "subsections": []
        },
        "If your package needs to know what hostname to use on (for example)": {
            "content": "outgoing news and mail messages which are generated locally, you should\nuse the file '/etc/mailname'.  It will contain the portion after the\nusername and '@' (at) sign for email addresses of users on the machine\n(followed by a newline).\n",
            "subsections": []
        },
        "Such a package should check for the existence of this file when it is": {
            "content": "being configured.  If it exists, it should be used without comment,\nalthough an MTA's configuration script may wish to prompt the user even\nif it finds that this file exists.  If the file does not exist, the\npackage should prompt the user for the value (preferably using\n'debconf') and store it in '/etc/mailname' as well as using it in the\npackage's configuration.  The prompt should make it clear that the name\nwill not just be used by that package.  For example, in this situation\nthe 'inn' package could say something like:\n\nPlease enter the \"mail name\" of your system.  This is the hostname portion\nof the address to be shown on outgoing news and mail messages.  The\ndefault is syshostname, your system's host name.\n\nMail name [\"syshostname\"]:\n\nwhere syshostname is the output of 'hostname --fqdn'.\n\n---------- Footnotes ----------\n\n(1) (3) If it is not possible to establish both locks, the system\nshouldn't wait for the second lock to be established, but remove the\nfirst lock, wait a (random) time, and start over locking again.\n\n(2) (4) There are two traditional permission schemes for mail spools:\nmode 600 with all mail delivery done by processes running as the\ndestination user, or mode 660 and owned by group mail with mail delivery\ndone by a process running as a system user in group mail.  Historically,",
            "subsections": []
        },
        "Debian required mode 660 mail spools to enable the latter model, but": {
            "content": "that model has become increasingly uncommon and the principle of least\nprivilege indicates that mail systems that use the first model should\nuse permissions of 600.  If delivery to programs is permitted, it's\neasier to keep the mail system secure if the delivery agent runs as the\ndestination user.  Debian Policy therefore permits either scheme.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: News system configuration,  Next: Programs for the X Window System,  Prev: Mail transport delivery and user agents,  Up: Customized programs": {
            "content": "",
            "subsections": [
                {
                    "name": "11.7 News system configuration",
                    "content": ""
                }
            ]
        },
        "All the configuration files related to the NNTP (news) servers and": {
            "content": "clients should be located under '/etc/news'.\n",
            "subsections": []
        },
        "There are some configuration issues that apply to a number of news": {
            "content": "clients and server packages on the machine.  These are:\n\n'/etc/news/organization'\n\nA string which should appear as the organization header for all\nmessages posted by NNTP clients on the machine\n\n'/etc/news/server'\n\nContains the FQDN of the upstream NNTP server, or localhost if the\nlocal machine is an NNTP server.\n",
            "subsections": []
        },
        "Other global files may be added as required for cross-package news": {
            "content": "configuration.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Programs for the X Window System,  Next: Perl programs and modules,  Prev: News system configuration,  Up: Customized programs": {
            "content": "",
            "subsections": [
                {
                    "name": "11.8 Programs for the X Window System",
                    "content": "* Menu:\n\n* Providing X support and package priorities::\n* Packages providing an X server::\n* Packages providing a terminal emulator::\n* Packages providing a window manager::\n* Packages providing fonts::\n* Application defaults files::\n* Installation directory issues::\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Providing X support and package priorities,  Next: Packages providing an X server,  Up: Programs for the X Window System": {
            "content": "",
            "subsections": []
        },
        "Programs that can be configured with support for the X Window System": {
            "content": "must be configured to do so and must declare any package dependencies\nnecessary to satisfy their runtime requirements when using the X Window",
            "subsections": []
        },
        "System.  If such a package is of higher priority than the X packages on": {
            "content": "which it depends, it is required that either the X-specific components\nbe split into a separate package, or that an alternative version of the\npackage, which includes X support, be provided, or that the package's\npriority be lowered.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Packages providing an X server,  Next: Packages providing a terminal emulator,  Prev: Providing X support and package priorities,  Up: Programs for the X Window System": {
            "content": "",
            "subsections": []
        },
        "Packages that provide an X server that, directly or indirectly,": {
            "content": "communicates with real input and display hardware should declare in\ntheir 'Provides' control field that they provide the virtual package\n'xserver'.  (1)\n\n---------- Footnotes ----------\n\n(1) (5) This implements current practice, and provides an actual\npolicy for usage of the 'xserver' virtual package which appears in the\nvirtual packages list.  In a nutshell, X servers that interface directly\nwith the display and input hardware or via another subsystem (e.g., GGI)\nshould provide 'xserver'.  Things like 'Xvfb', 'Xnest', and 'Xprt'\nshould not.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Packages providing a terminal emulator,  Next: Packages providing a window manager,  Prev: Packages providing an X server,  Up: Programs for the X Window System": {
            "content": "",
            "subsections": []
        },
        "Packages that provide a terminal emulator for the X Window System which": {
            "content": "meet the criteria listed below should declare in their 'Provides'\ncontrol field that they provide the virtual package\n'x-terminal-emulator'.  They should also register themselves as an\nalternative for '/usr/bin/x-terminal-emulator', with a priority of 20.",
            "subsections": []
        },
        "That alternative should have a slave alternative for": {
            "content": "'/usr/share/man/man1/x-window-manager.1.gz' pointing to the\ncorresponding manual page.\n\n---------- Footnotes ----------\n\n(1) https://www.freedesktop.org/wiki/Specifications/wm-spec\n\n(2) https://www.freedesktop.org/wiki/\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Packages providing a window manager,  Next: Packages providing fonts,  Prev: Packages providing a terminal emulator,  Up: Programs for the X Window System": {
            "content": "",
            "subsections": []
        },
        "Packages that provide a window manager should declare in their": {
            "content": "'Provides' control field that they provide the virtual package\n'x-window-manager'.  They should also register themselves as an\nalternative for '/usr/bin/x-window-manager', with a priority calculated\nas follows:\n\n- Start with a priority of 20.\n\n- If the window manager supports the Debian menu system, add 20\npoints if this support is available in the package's default\nconfiguration (i.e., no configuration files belonging to the system\nor user have to be edited to activate the feature); if\nconfiguration files must be modified, add only 10 points.\n\n- If the window manager complies with The Window Manager\nSpecification Project(1), written by the Free Desktop Group(2), add\n40 points.\n\n- If the window manager permits the X session to be restarted using a\n`different' window manager (without killing the X server) in its\ndefault configuration, add 10 points; otherwise add none.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Packages providing fonts,  Next: Application defaults files,  Prev: Packages providing a window manager,  Up: Programs for the X Window System": {
            "content": "",
            "subsections": []
        },
        "Packages that provide fonts for the X Window System (1) must do a number": {
            "content": "of things to ensure that they are both available without modification of\nthe X or font server configuration, and that they do not corrupt files\nused by other font packages to register information about themselves.\n\n1. Fonts of any type supported by the X Window System must be in a\nseparate binary package from any executables, libraries, or\ndocumentation (except that specific to the fonts shipped, such as\ntheir license information).  If one or more of the fonts so\npackaged are necessary for proper operation of the package with\nwhich they are associated the font package may be Recommended; if\nthe fonts merely provide an enhancement, a Suggests relationship\nmay be used.  Packages must not Depend on font packages.  (2)\n\n2. BDF fonts must be converted to PCF fonts with the 'bdftopcf'\nutility (available in the 'xfonts-utils' package, 'gzip'ped, and\nplaced in a directory that corresponds to their resolution:\n\n- 100 dpi fonts must be placed in\n'/usr/share/fonts/X11/100dpi/'.\n\n- 75 dpi fonts must be placed in '/usr/share/fonts/X11/75dpi/'.\n\n- Character-cell fonts, cursor fonts, and other low-resolution\nfonts must be placed in '/usr/share/fonts/X11/misc/'.\n\n3. Type 1 fonts must be placed in '/usr/share/fonts/X11/Type1/'.  If\nfont metric files are available, they must be placed here as well.\n\n4. Subdirectories of '/usr/share/fonts/X11/' other than those listed\nabove must be neither created nor used.  (The 'PEX', 'CID',\n'Speedo', and 'cyrillic' directories are excepted for historical\nreasons, but installation of files into these directories remains\ndiscouraged.)\n\n5. Font packages may, instead of placing files directly in the X font\ndirectories listed above, provide symbolic links in that font\ndirectory pointing to the files' actual location in the filesystem.\nSuch a location must comply with the FHS.\n\n6. Font packages should not contain both 75dpi and 100dpi versions of\na font.  If both are available, they should be provided in separate\nbinary packages with '-75dpi' or '-100dpi' appended to the names of\nthe packages containing the corresponding fonts.\n\n7. Fonts destined for the 'misc' subdirectory should not be included\nin the same package as 75dpi or 100dpi fonts; instead, they should\nbe provided in a separate package with '-misc' appended to its\nname.\n\n8. Font packages must not provide the files 'fonts.dir',\n'fonts.alias', or 'fonts.scale' in a font directory:\n\n- 'fonts.dir' files must not be provided at all.\n\n- 'fonts.alias' and 'fonts.scale' files, if needed, should be\nprovided in the directory\n'/etc/X11/fonts/fontdir/package.extension', where fontdir is\nthe name of the subdirectory of '/usr/share/fonts/X11/' where\nthe package's corresponding fonts are stored (e.g., '75dpi' or\n'misc'), package is the name of the package that provides\nthese fonts, and extension is either 'scale' or 'alias',\nwhichever corresponds to the file contents.\n\n9. Font packages must declare a dependency on 'xfonts-utils' in their\n'Depends' or 'Pre-Depends' control field.\n\n10. Font packages that provide one or more 'fonts.scale' files as\ndescribed above must invoke 'update-fonts-scale' on each directory\ninto which they installed fonts `before' invoking\n'update-fonts-dir' on that directory.  This invocation must occur\nin both the 'postinst' (for all arguments) and 'postrm' (for all\narguments except 'upgrade') scripts.\n\n11. Font packages that provide one or more 'fonts.alias' files as\ndescribed above must invoke 'update-fonts-alias' on each directory\ninto which they installed fonts.  This invocation must occur in\nboth the 'postinst' (for all arguments) and 'postrm' (for all\narguments except 'upgrade') scripts.\n\n12. Font packages must invoke 'update-fonts-dir' on each directory\ninto which they installed fonts.  This invocation must occur in\nboth the 'postinst' (for all arguments) and 'postrm' (for all\narguments except 'upgrade') scripts.\n\n13. Font packages must not provide alias names for the fonts they\ninclude which collide with alias names already in use by fonts\nalready packaged.\n\n14. Font packages must not provide fonts with the same XLFD registry\nname as another font already packaged.\n\n---------- Footnotes ----------\n\n(1) (7) For the purposes of Debian Policy, a \"font for the X Window\nSystem\" is one which is accessed via X protocol requests.  Fonts for the",
            "subsections": []
        },
        "Linux console, for PostScript renderer, or any other purpose, do not fit": {
            "content": "this definition.  Any tool which makes such fonts available to the X\nWindow System, however, must abide by this font policy.\n\n(2) (8) This is because an X client may be displayed by a remote X\nserver, in which case X fonts are provided by the remote X server, not\nretrieved locally; the Debian package system is empowered to deal only\nwith the local file system.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Application defaults files,  Next: Installation directory issues,  Prev: Packages providing fonts,  Up: Programs for the X Window System": {
            "content": "",
            "subsections": []
        },
        "Application defaults files must be installed in the directory": {
            "content": "'/etc/X11/app-defaults/' (use of a localized subdirectory of '/etc/X11/'\nas described in the `X Toolkit Intrinsics - C Language Interface' manual\nis also permitted).  They must be registered as 'conffile's or handled\nas configuration files.\n",
            "subsections": []
        },
        "Customization of programs' X resources may also be supported with the": {
            "content": "provision of a file with the same name as that of the package placed in\nthe '/etc/X11/Xresources/' directory, which must be registered as a\n'conffile' or handled as a configuration file.  (1)\n\n---------- Footnotes ----------\n\n(1) (9) Note that this mechanism is not the same as using\napp-defaults; app-defaults are tied to the client binary on the local\nfile system, whereas X resources are stored in the X server and affect\nall connecting clients.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Installation directory issues,  Prev: Application defaults files,  Up: Programs for the X Window System": {
            "content": "",
            "subsections": []
        },
        "Historically, packages using the X Window System used a separate set of": {
            "content": "installation directories from other packages.  This practice has been\ndiscontinued and packages using the X Window System should now generally\nbe installed in the same directories as any other package.",
            "subsections": []
        },
        "Specifically, packages must not install files under the '/usr/X11R6/'": {
            "content": "directory and the '/usr/X11R6/' directory hierarchy should be regarded\nas obsolete.\n",
            "subsections": []
        },
        "Include files previously installed under '/usr/X11R6/include/X11/'": {
            "content": "should be installed into '/usr/include/X11/'.  For files previously\ninstalled into subdirectories of '/usr/X11R6/lib/X11/', package\nmaintainers should determine if subdirectories of '/usr/lib/' and\n'/usr/share/' can be used.  If not, a subdirectory of '/usr/lib/X11/'\nshould be used.\n",
            "subsections": []
        },
        "Configuration files for window, display, or session managers or other": {
            "content": "applications that are tightly integrated with the X Window System may be\nplaced in a subdirectory of '/etc/X11/' corresponding to the package\nname.  Other X Window System applications should use the '/etc/'\ndirectory unless otherwise mandated by policy (such as for *note\nApplication defaults files: 196.).\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Perl programs and modules,  Next: Emacs lisp programs,  Prev: Programs for the X Window System,  Up: Customized programs": {
            "content": "",
            "subsections": [
                {
                    "name": "11.9 Perl programs and modules",
                    "content": "Perl programs and modules should follow the current Perl policy.\n"
                }
            ]
        },
        "The Perl policy can be found in the 'perl-policy' files in the": {
            "content": "'debian-policy' package.  It is also available from the Debian web\nmirrors at 'https://www.debian.org/doc/packaging-manuals/perl-policy/'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Emacs lisp programs,  Next: Games,  Prev: Perl programs and modules,  Up: Customized programs": {
            "content": "",
            "subsections": [
                {
                    "name": "11.10 Emacs lisp programs",
                    "content": "Please refer to the \"Debian Emacs Policy\" for details of how to package\nemacs lisp programs.\n"
                }
            ]
        },
        "The Emacs policy is available in 'debian-emacs-policy.gz' of the": {
            "content": "emacsen-common package.  It is also available from the Debian web\nmirrors at\n'https://www.debian.org/doc/packaging-manuals/debian-emacs-policy'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Games,  Prev: Emacs lisp programs,  Up: Customized programs": {
            "content": "",
            "subsections": [
                {
                    "name": "11.11 Games",
                    "content": ""
                }
            ]
        },
        "The permissions on '/var/games' are mode 755, owner 'root' and group": {
            "content": "'root'.\n\nEach game decides on its own security policy.\n",
            "subsections": []
        },
        "Games which require protected, privileged access to high-score files,": {
            "content": "saved games, etc., may be made set-`group'-id (mode 2755) and owned by\n'root:games', and use files and directories with appropriate permissions\n(770 'root:games', for example).  They must not be made set-`user'-id,\nas this causes security problems.  (If an attacker can subvert any\nset-user-id game they can overwrite the executable of any other, causing\nother players of these games to run a Trojan horse program.  With a\nset-group-id game the attacker only gets access to less important game\ndata, and if they can get at the other players' accounts at all it will\ntake considerably more effort.)\n",
            "subsections": []
        },
        "Some packages, for example some fortune cookie programs, are configured": {
            "content": "by the upstream authors to install with their data files or other static\ninformation made unreadable so that they can only be accessed through\nset-id programs provided.  You should not do this in a Debian package:\nanyone can download the '.deb' file and read the data from it, so there\nis no point making the files unreadable.  Not making the files\nunreadable also means that you don't have to make so many programs\nset-id, which reduces the risk of a security hole.\n",
            "subsections": []
        },
        "As described in the FHS, binaries of games should be installed in the": {
            "content": "directory '/usr/games'.  This also applies to games that use the X",
            "subsections": []
        },
        "Window System.  Manual pages for games (X and non-X games) should be": {
            "content": "installed in '/usr/share/man/man6'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Documentation,  Next: Introduction and scope of these appendices,  Prev: Customized programs,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "12 Documentation": {
            "content": "* Menu:\n\n* Manual pages::\n* Info documents::\n* Additional documentation::\n* Preferred documentation formats::\n* Copyright information::\n* Examples::\n* Changelog files and release notes::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Manual pages,  Next: Info documents,  Up: Documentation": {
            "content": "",
            "subsections": [
                {
                    "name": "12.1 Manual pages",
                    "content": ""
                }
            ]
        },
        "You should install manual pages in 'nroff' source form, in appropriate": {
            "content": "places under '/usr/share/man'.  You should only use sections 1 to 9 (see\nthe FHS for more details).  You must not install a pre-formatted \"cat\npage\".\n",
            "subsections": []
        },
        "Each program, utility, and function should have an associated manual": {
            "content": "page included in the same package or a dependency.  It is suggested that\nall configuration files also have a manual page included as well.\nManual pages for protocols and other auxiliary things are optional.\n",
            "subsections": []
        },
        "If no manual page is available, this is considered as a bug and should": {
            "content": "be reported to the Debian Bug Tracking System (the maintainer of the\npackage is allowed to write this bug report themselves, if they so\ndesire).  Do not close the bug report until a proper man page is\navailable.  (1)\n",
            "subsections": []
        },
        "You may forward a complaint about a missing man page to the upstream": {
            "content": "authors, and mark the bug as forwarded in the Debian bug tracking\nsystem.  Even though the GNU Project do not in general consider the lack\nof a man page to be a bug, we do; if they tell you that they don't\nconsider it a bug you should leave the bug in our bug tracking system\nopen anyway.\n\nManual pages should be installed compressed using 'gzip -9'.\n",
            "subsections": []
        },
        "If one man page needs to be accessible via several names it is better to": {
            "content": "use a symbolic link than the '.so' feature, but there is no need to\nfiddle with the relevant parts of the upstream source to change from\n'.so' to symlinks: don't do it unless it's easy.  You should not create\nhard links in the manual page directories, nor put absolute filenames in\n'.so' directives.  The filename in a '.so' in a man page should be\nrelative to the base of the man page tree (usually '/usr/share/man').",
            "subsections": []
        },
        "If you do not create any links (whether symlinks, hard links, or '.so'": {
            "content": "directives) in the file system to the alternate names of the man page,\nthen you should not rely on 'man' finding your man page under those\nnames based solely on the information in the man page's header.  (2)\n",
            "subsections": []
        },
        "Manual pages in locale-specific subdirectories of '/usr/share/man'": {
            "content": "should use either UTF-8 or the usual legacy encoding for that language\n(normally the one corresponding to the shortest relevant locale name in\n'/usr/share/i18n/SUPPORTED').  For example, pages under\n'/usr/share/man/fr' should use either UTF-8 or ISO-8859-1.  (3)\n\nA country name (the 'DE' in 'deDE') should not be included in the\nsubdirectory name unless it indicates a significant difference in the\nlanguage, as this excludes speakers of the language in other countries.\n(4)\n",
            "subsections": []
        },
        "If a localized version of a manual page is provided, it should either be": {
            "content": "up-to-date or it should be obvious to the reader that it is outdated and\nthe original manual page should be used instead.  This can be done\neither by a note at the beginning of the manual page or by showing the\nmissing or changed portions in the original language instead of the\ntarget language.\n\n---------- Footnotes ----------\n\n(1) (1) It is not very hard to write a man page.  See the",
            "subsections": []
        },
        "Man-Page-HOWTO (http://www.schweikhardt.net/manpagehowto.html),": {
            "content": "'man(7)', the examples created by 'dhmake', the helper program\n'help2man', or the directory '/usr/share/doc/man-db/examples'.\n\n(2) (2) Supporting this in 'man' often requires unreasonable\nprocessing time to find a manual page or to report that none exists, and\nmoves knowledge into man's database that would be better left in the\nfile system.  This support is therefore deprecated and will cease to be\npresent in the future.\n\n(3) (3) 'man' will automatically detect whether UTF-8 is in use.  In\nfuture, all manual pages will be required to use UTF-8.\n\n(4) (4) At the time of writing, Chinese and Portuguese are the main\nlanguages with such differences, so 'ptBR', 'zhCN', and 'zhTW' are\nall allowed.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Info documents,  Next: Additional documentation,  Prev: Manual pages,  Up: Documentation": {
            "content": "",
            "subsections": [
                {
                    "name": "12.2 Info documents",
                    "content": ""
                }
            ]
        },
        "Info documents should be installed in '/usr/share/info'.  They should be": {
            "content": "compressed with 'gzip -9'.\n",
            "subsections": []
        },
        "The 'install-info' program maintains a directory of installed info": {
            "content": "documents in '/usr/share/info/dir' for the use of info readers.  This\nfile must not be included in packages other than install-info.\n\n'install-info' is automatically invoked when appropriate using dpkg\ntriggers.  Packages other than install-info `should not' invoke\n'install-info' directly and `should not' depend on, recommend, or\nsuggest install-info for this purpose.\n",
            "subsections": []
        },
        "Info readers requiring the '/usr/share/info/dir' file should depend on": {
            "content": "install-info.\n",
            "subsections": []
        },
        "Info documents should contain section and directory entry information in": {
            "content": "the document for the use of 'install-info'.  The section should be\nspecified via a line starting with 'INFO-DIR-SECTION' followed by a\nspace and the section of this info page.  The directory entry or entries\nshould be included between a 'START-INFO-DIR-ENTRY' line and an\n'END-INFO-DIR-ENTRY' line.  For example:\n\nINFO-DIR-SECTION Individual utilities\nSTART-INFO-DIR-ENTRY\n* example: (example).               An example info directory entry.\nEND-INFO-DIR-ENTRY\n",
            "subsections": []
        },
        "To determine which section to use, you should look at": {
            "content": "'/usr/share/info/dir' on your system and choose the most relevant (or\ncreate a new section if none of the current sections are relevant).  (1)\n\n---------- Footnotes ----------\n\n(1) (5) Normally, info documents are generated from Texinfo source.",
            "subsections": []
        },
        "To include this information in the generated info document, if it is": {
            "content": "absent, add commands like:\n\n@dircategory Individual utilities\n@direntry\n* example: (example).  An example info directory entry.\n@end direntry\n\nto the Texinfo source of the document and ensure that the info documents\nare rebuilt from source during the package build.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Additional documentation,  Next: Preferred documentation formats,  Prev: Info documents,  Up: Documentation": {
            "content": "",
            "subsections": [
                {
                    "name": "12.3 Additional documentation",
                    "content": ""
                }
            ]
        },
        "Any additional documentation that comes with the package may be": {
            "content": "installed at the discretion of the package maintainer.  It is often a\ngood idea to include text information files ('README's, FAQs, and so\nforth) that come with the source package in the binary package.",
            "subsections": []
        },
        "However, you don't need to install the instructions for building and": {
            "content": "installing the package, of course!\n",
            "subsections": []
        },
        "Plain text documentation should be compressed with 'gzip -9' unless it": {
            "content": "is small.\n",
            "subsections": []
        },
        "If a package comes with large amounts of documentation that many users": {
            "content": "of the package will not require, you should create a separate binary\npackage to contain it so that it does not take up disk space on the\nmachines of users who do not need or want it installed.  As a special\ncase of this rule, shared library documentation of any appreciable size\nshould always be packaged with the library development package (*note",
            "subsections": []
        },
        "Development files: 108.) or in a separate documentation package, since": {
            "content": "shared libraries are frequently installed as dependencies of other\npackages by users who have little interest in documentation of the\nlibrary itself.  The documentation package for the package package is\nconventionally named package-doc (or package-doc-language-code if there\nare separate documentation packages for multiple languages).\n",
            "subsections": []
        },
        "If package is a build tool, development tool, command-line tool, or": {
            "content": "library development package, package (or package-dev in the case of a\nlibrary development package) already provides documentation in man,\ninfo, or plain text format, and package-doc provides HTML or other\nformats, package should declare at most a 'Suggests' on package-doc.\nOtherwise, package should declare at most a 'Recommends' on package-doc.\n",
            "subsections": []
        },
        "Additional documentation included in the package should be installed": {
            "content": "under '/usr/share/doc/package'.  If the documentation is packaged\nseparately, as package-doc for example, it may be installed under either\nthat path or into the documentation directory for the separate\ndocumentation package ('/usr/share/doc/package-doc' in this example).",
            "subsections": []
        },
        "However, installing the documentation into the documentation directory": {
            "content": "of the main package is encouraged since it is independent of the\npackaging method and will be easier for users to find.\n",
            "subsections": []
        },
        "Any separate package providing documentation must still install standard": {
            "content": "documentation files in its own '/usr/share/doc' directory as specified\nin the rest of this policy.  See, for example, *note Copyright\ninformation: 2a. and *note Changelog files and release notes: 6e.\n",
            "subsections": []
        },
        "Packages must not require the existence of any files in": {
            "content": "'/usr/share/doc/' in order to function.  (1) Any files that are used or\nread by programs but are also useful as stand alone documentation should\nbe installed elsewhere, such as under '/usr/share/package/', and then\nincluded via symbolic links in '/usr/share/doc/package'.\n\n'/usr/share/doc/package' is permitted to be a symbolic link to another\ndirectory in '/usr/share/doc' only if the two packages both come from\nthe same source and the first package Depends on the second.  Otherwise,\n'/usr/share/doc/package' must not be a symbolic link.  (2)\n\n---------- Footnotes ----------\n\n(1) (6) The system administrator should be able to delete files in\n'/usr/share/doc/' without causing any programs to break.\n\n(2) (7) Please note that this does not override the section on\nchangelog files below, so the file\n'/usr/share/doc/package/changelog.Debian.gz' must refer to the changelog\nfor the current version of package in question.  In practice, this means\nthat the sources of the target and the destination of the symlink must\nbe the same (same source package and version).\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Preferred documentation formats,  Next: Copyright information,  Prev: Additional documentation,  Up: Documentation": {
            "content": "",
            "subsections": [
                {
                    "name": "12.4 Preferred documentation formats",
                    "content": "The unification of Debian documentation is being carried out via HTML.\n"
                }
            ]
        },
        "If the package comes with extensive documentation in a markup format": {
            "content": "that can be converted to various other formats you should if possible\nship HTML versions in a binary package.  (1) The documentation must be\ninstalled as specified in *note Additional documentation: 1a4.\n",
            "subsections": []
        },
        "Other formats such as PostScript may be provided at the package": {
            "content": "maintainer's discretion.\n\n---------- Footnotes ----------\n\n(1) (8) Rationale: The important thing here is that HTML\ndocumentation should be available from `some' binary package.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Copyright information,  Next: Examples,  Prev: Preferred documentation formats,  Up: Documentation": {
            "content": "",
            "subsections": [
                {
                    "name": "12.5 Copyright information",
                    "content": ""
                }
            ]
        },
        "In addition, the copyright file must say where the upstream sources (if": {
            "content": "any) were obtained, and should include a name or contact address for the\nupstream authors.  This can be the name of an individual or an\norganization, an email address, a web forum or bugtracker, or any other\nmeans to unambiguously identify who to contact to participate in the\ndevelopment of the upstream source code.\n\nPackages in the `contrib' or `non-free' archive areas should state in\nthe copyright file that the package is not part of the Debian\ndistribution and briefly explain why.\n\nA copy of the file which will be installed in\n'/usr/share/doc/PACKAGE/copyright' should be in 'debian/copyright' in\nthe source package.\n\n'/usr/share/doc/package' is permitted be a symbolic link to another\ndirectory in '/usr/share/doc' only if the two packages both come from\nthe same source and the first package Depends on the second.  Otherwise,\n'/usr/share/doc/package' must not be a symbolic link.  These rules are\nimportant because 'copyright' files must be extractable by mechanical\nmeans.\n",
            "subsections": []
        },
        "Packages distributed under the Apache license (version 2.0), the": {
            "content": "",
            "subsections": []
        },
        "Artistic license, the Creative Commons CC0-1.0 license, the GNU GPL": {
            "content": "(versions 1, 2, or 3), the GNU LGPL (versions 2, 2.1, or 3), the GNU FDL\n(versions 1.2 or 1.3), and the Mozilla Public License (version 1.1 or\n2.0) should refer to the corresponding files under\n'/usr/share/common-licenses', (1) rather than quoting them in the\ncopyright file.\n",
            "subsections": []
        },
        "You should not use the copyright file as a general 'README' file.  If": {
            "content": "your package has such a file it should be installed in\n'/usr/share/doc/package/README' or 'README.Debian' or some other\nappropriate place.\n\nAll copyright files must be encoded in UTF-8.\n\n* Menu:\n\n* Machine-readable copyright information::\n\n---------- Footnotes ----------\n\n(1) (9) In particular, '/usr/share/common-licenses/Apache-2.0',\n'/usr/share/common-licenses/Artistic',\n'/usr/share/common-licenses/CC0-1.0',\n'/usr/share/common-licenses/GPL-1', '/usr/share/common-licenses/GPL-2',\n'/usr/share/common-licenses/GPL-3', '/usr/share/common-licenses/LGPL-2',\n'/usr/share/common-licenses/LGPL-2.1',\n'/usr/share/common-licenses/LGPL-3',\n'/usr/share/common-licenses/GFDL-1.2',\n'/usr/share/common-licenses/GFDL-1.3',\n'/usr/share/common-licenses/MPL-1.1', and\n'/usr/share/common-licenses/MPL-2.0' respectively.  The University of",
            "subsections": []
        },
        "California BSD license is also included in base-files as": {
            "content": "'/usr/share/common-licenses/BSD', but given the brevity of this license,\nits specificity to code whose copyright is held by the Regents of the",
            "subsections": []
        },
        "University of California, and the frequency of minor wording changes,": {
            "content": "its text should be included in the copyright file rather than\nreferencing this file.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Machine-readable copyright information,  Up: Copyright information": {
            "content": "A specification for a standard, machine-readable format for\n'debian/copyright' files is maintained as part of the debian-policy\npackage.  This document is in the 'copyright-format' files in the\ndebian-policy package.  It is also available from the Debian web mirrors\nat 'https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/'.\n\nUse of this format is optional.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Examples,  Next: Changelog files and release notes,  Prev: Copyright information,  Up: Documentation": {
            "content": "",
            "subsections": [
                {
                    "name": "12.6 Examples",
                    "content": ""
                }
            ]
        },
        "Any examples (configurations, source files, whatever), should be": {
            "content": "installed in a directory '/usr/share/doc/package/examples'.  These files\nshould not be referenced by any program: they're there for the benefit\nof the system administrator and users as documentation only.",
            "subsections": []
        },
        "Architecture-specific example files should be installed in a directory": {
            "content": "'/usr/lib/package/examples' with symbolic links to them from\n'/usr/share/doc/package/examples', or the latter directory itself may be\na symbolic link to the former.\n",
            "subsections": []
        },
        "If the purpose of a package is to provide examples, then the example": {
            "content": "files may be installed into '/usr/share/doc/package'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Changelog files and release notes,  Prev: Examples,  Up: Documentation": {
            "content": "",
            "subsections": [
                {
                    "name": "12.7 Changelog files and release notes",
                    "content": ""
                }
            ]
        },
        "Packages that are not Debian-native must contain a compressed copy of": {
            "content": "the 'debian/changelog' file from the Debian source tree in\n'/usr/share/doc/package' with the name 'changelog.Debian.gz'.\n",
            "subsections": []
        },
        "If an upstream release notes file is available, containing a summary of": {
            "content": "changes between upstream releases intended for end users of the package\nand often called 'NEWS', it should be accessible as\n'/usr/share/doc/package/NEWS.gz'.  An older practice of installing the\nupstream release notes as '/usr/share/doc/package/changelog.gz' is\npermitted but deprecated.\n",
            "subsections": []
        },
        "If there is an upstream changelog available, it may be made available as": {
            "content": "'/usr/share/doc/package/changelog.gz'.\n",
            "subsections": []
        },
        "If either of these files are distributed in HTML, they should be made": {
            "content": "available at '/usr/share/doc/package/NEWS.html.gz' and\n'/usr/share/doc/package/changelog.html.gz' respectively, and plain text\nversions 'NEWS.gz' and 'changelog.gz' should be generated from them,\nusing, for example, 'lynx -dump -nolist'.\n",
            "subsections": []
        },
        "If the upstream release notes or changelog do not already conform to": {
            "content": "this naming convention, then this may be achieved either by renaming the\nfiles, or by adding a symbolic link, at the maintainer's discretion.\n(1)\n",
            "subsections": []
        },
        "All of these files should be installed compressed using 'gzip -9', as": {
            "content": "they will become large with time even if they start out small.\n",
            "subsections": []
        },
        "If the package has only one file which is used both as the Debian": {
            "content": "changelog and the upstream release notes or changelog, because there is\nno separate upstream maintainer, then that file should usually be\ninstalled as '/usr/share/doc/package/NEWS.gz' or\n'/usr/share/doc/package/changelog.gz' (depending on whether the file is\nrelease notes or a changelog); if there is a separate upstream\nmaintainer, but no upstream release notes or changelog, then the Debian\nchangelog should still be called 'changelog.Debian.gz'.\n",
            "subsections": []
        },
        "For details about the format and contents of the Debian changelog file,": {
            "content": "please see *note Debian changelog; debian/changelog: 69.\n\n---------- Footnotes ----------\n\n(1) (10) Rationale: People should not have to look in places for\nupstream changelogs merely because they are given different names or are\ndistributed in HTML format.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Introduction and scope of these appendices,  Next: Binary packages from old Packaging Manual,  Prev: Documentation,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "13 Introduction and scope of these appendices": {
            "content": "",
            "subsections": []
        },
        "These appendices, except the final three, are taken essentially verbatim": {
            "content": "from the now-deprecated Packaging Manual, version 3.2.1.0.  They are the\nchapters which are likely to be of use to package maintainers and which\nhave not already been included in the policy document itself.  Most of\nthese sections are very likely not relevant to policy; they should be\ntreated as documentation for the packaging system.  Please note that\nthese appendices are included for convenience, and for historical\nreasons: they used to be part of policy package, and they have not yet\nbeen incorporated into dpkg documentation.  However, they still have\nvalue, and hence they are presented here.\n",
            "subsections": []
        },
        "They have not yet been checked to ensure that they are compatible with": {
            "content": "the contents of policy, and if there are any contradictions, the version\nin the main policy document takes precedence.  The remaining chapters of\nthe old Packaging Manual have also not been read in detail to ensure\nthat there are not parts which have been left out.  Both of these will\nbe done in due course.\n",
            "subsections": []
        },
        "Certain parts of the Packaging manual were integrated into the Policy": {
            "content": "",
            "subsections": []
        },
        "Manual proper, and removed from the appendices.  Links have been placed": {
            "content": "from the old locations to the new ones.\n\n'dpkg' is a suite of programs for creating binary package files and\ninstalling and removing them on Unix systems.  (1)\n",
            "subsections": []
        },
        "The binary packages are designed for the management of installed": {
            "content": "executable programs (usually compiled binaries) and their associated\ndata, though source code examples and documentation are provided as part\nof some packages.\n",
            "subsections": []
        },
        "This manual describes the technical aspects of creating Debian binary": {
            "content": "packages ('.deb' files).  It documents the behavior of the package\nmanagement programs 'dpkg', 'dselect' et al.  and the way they interact\nwith packages.\n",
            "subsections": []
        },
        "This manual does not go into detail about the options and usage of the": {
            "content": "package building and installation tools.  It should therefore be read in\nconjunction with those programs' man pages.\n",
            "subsections": []
        },
        "The utility programs which are provided with 'dpkg' not described in": {
            "content": "detail here, are documented in their man pages.\n",
            "subsections": []
        },
        "It is assumed that the reader is reasonably familiar with the 'dpkg'": {
            "content": "",
            "subsections": []
        },
        "System Administrators' manual.  Unfortunately this manual does not yet": {
            "content": "exist.\n",
            "subsections": []
        },
        "The Debian version of the FSF's GNU hello program is provided as an": {
            "content": "example for people wishing to create Debian packages.  However, while\nthe examples are helpful, they do not replace the need to read and\nfollow the Policy and Programmer's Manual.\n\n---------- Footnotes ----------\n\n(1) (1) 'dpkg' is targeted primarily at Debian, but may work on or be\nported to other systems.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Binary packages from old Packaging Manual,  Next: Source packages from old Packaging Manual,  Prev: Introduction and scope of these appendices,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "14 Binary packages (from old Packaging Manual)": {
            "content": "See 'deb(5)' and *note Package control information files: 1af.\n\n* Menu:\n\n* Creating package files - dpkg-deb::\n* Package control information files::\n* The main control information file; control: The main control information file control.\n* Time Stamps: Time Stamps<2>.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Creating package files - dpkg-deb,  Next: Package control information files,  Up: Binary packages from old Packaging Manual": {
            "content": "",
            "subsections": [
                {
                    "name": "14.1 Creating package files - 'dpkg-deb'",
                    "content": ""
                }
            ]
        },
        "All manipulation of binary package files is done by 'dpkg-deb'; it's the": {
            "content": "only program that has knowledge of the format.  ('dpkg-deb' may be\ninvoked by calling 'dpkg', as 'dpkg' will spot that the options\nrequested are appropriate to 'dpkg-deb' and invoke that instead with the\nsame arguments.)\n",
            "subsections": []
        },
        "In order to create a binary package, you must make a directory tree": {
            "content": "which contains all the files and directories you want to have in the\nfile system data part of the package.  In Debian-format source packages,\nthis directory is usually either 'debian/tmp' or 'debian/pkg', relative\nto the top of the package's source tree.\n",
            "subsections": []
        },
        "They should have the locations (relative to the root of the directory": {
            "content": "tree you're constructing) ownerships and permissions which you want them\nto have on the system when they are installed.\n",
            "subsections": []
        },
        "With current versions of 'dpkg' the uid/username and gid/groupname": {
            "content": "mappings for the users and groups being used should be the same on the\nsystem where the package is built and the one where it is installed.\n",
            "subsections": []
        },
        "You need to add one special directory to the root of the miniature file": {
            "content": "system tree you're creating: 'DEBIAN'.  It should contain the control\ninformation files, notably the binary package control file (see *note\nThe main control information file; control: 1b2.).\n",
            "subsections": []
        },
        "The 'DEBIAN' directory will not appear in the file system archive of the": {
            "content": "package, and so won't be installed by 'dpkg' when the package is\nunpacked.\n\nWhen you've prepared the package, you should invoke:\n\ndpkg --build directory\n",
            "subsections": []
        },
        "This will build the package in 'directory.deb'.  ('dpkg' knows that": {
            "content": "'--build' is a 'dpkg-deb' option, so it invokes 'dpkg-deb' with the same\narguments to build the package.)\n",
            "subsections": []
        },
        "See the 'dpkg-deb(8)' man page for details of how to examine the": {
            "content": "contents of this newly-created file.  You may find the output of\nfollowing commands enlightening:\n\ndpkg-deb --info filename.deb\ndpkg-deb --contents filename.deb\ndpkg --contents filename.deb\n\nTo view the copyright file for a package you could use this command:\n\ndpkg --fsys-tarfile filename.deb | tar xOf - --wildcards \\*/copyright | pager\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Package control information files,  Next: The main control information file control,  Prev: Creating package files - dpkg-deb,  Up: Binary packages from old Packaging Manual": {
            "content": "",
            "subsections": [
                {
                    "name": "14.2 Package control information files",
                    "content": ""
                }
            ]
        },
        "The control information portion of a binary package is a collection of": {
            "content": "files with names known to 'dpkg'.  It will treat the contents of these\nfiles specially - some of them contain information used by 'dpkg' when\ninstalling or removing the package; others are scripts which the package\nmaintainer wants 'dpkg' to run.\n",
            "subsections": []
        },
        "It is possible to put other files in the package control information": {
            "content": "file area, but this is not generally a good idea (though they will\nlargely be ignored).\n",
            "subsections": []
        },
        "Here is a brief list of the control information files supported by": {
            "content": "'dpkg' and a summary of what they're used for.\n\n'control'\n\nThis is the key description file used by 'dpkg'.  It specifies the\npackage's name and version, gives its description for the user,\nstates its relationships with other packages, and so forth.  See\n*note Source package control files - debian/control: 8f. and *note\nBinary package control files - DEBIAN/control: 33.\n\nIt is usually generated automatically from information in the\nsource package by the 'dpkg-gencontrol' program, and with\nassistance from 'dpkg-shlibdeps'.  See *note Source packages (from\nold Packaging Manual): 1b4.\n\n'postinst', 'preinst', 'postrm', 'prerm'\n\nThese are executable files (usually scripts) which 'dpkg' runs\nduring installation, upgrade and removal of packages.  They allow\nthe package to deal with matters which are particular to that\npackage or require more complicated processing than that provided\nby 'dpkg'.  Details of when and how they are called are in *note\nPackage maintainer scripts and installation procedure: d6.\n\nIt is very important to make these scripts idempotent.  See *note\nMaintainer scripts idempotency: db.\n\nThe maintainer scripts are not guaranteed to run with a controlling\nterminal and may not be able to interact with the user.  See *note\nControlling terminal for maintainer scripts: dd.\n\n'conffiles' This file contains a list of configuration files which\n\nare to be handled automatically by 'dpkg' (see *note Configuration\nfile handling (from old Packaging Manual): 1b5.).  Note that not\nnecessarily every configuration file should be listed here.\n\n'shlibs'\n\nThis file contains a list of the shared libraries supplied by the\npackage, with dependency details for each.  This is used by\n'dpkg-shlibdeps' when it determines what dependencies are required\nin a package control file.  The 'shlibs' file format is described\non *note The shlibs File Format: 112.\n\nFile: debian-policy.info,  Node: The main control information file control,  Next: Time Stamps<2>,  Prev: Package control information files,  Up: Binary packages from old Packaging Manual\n",
            "subsections": [
                {
                    "name": "14.3 The main control information file: 'control'",
                    "content": ""
                }
            ]
        },
        "The most important control information file used by 'dpkg' when it": {
            "content": "installs a package is 'control'.  It contains all the package's \"vital\nstatistics\".\n",
            "subsections": []
        },
        "The binary package control files of packages built from Debian sources": {
            "content": "are made by a special tool, 'dpkg-gencontrol', which reads\n'debian/control' and 'debian/changelog' to find the information it\nneeds.  See *note Source packages (from old Packaging Manual): 1b4. for\nmore details.\n\nThe fields in binary package control files are listed in *note Binary\npackage control files - DEBIAN/control: 33.\n\nA description of the syntax of control files and the purpose of the\nfields is available in *note Control files and their fields: 37.\n\nFile: debian-policy.info,  Node: Time Stamps<2>,  Prev: The main control information file control,  Up: Binary packages from old Packaging Manual\n",
            "subsections": [
                {
                    "name": "14.4 Time Stamps",
                    "content": "See *note Time Stamps: 73.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Source packages from old Packaging Manual,  Next: Control files and their fields from old Packaging Manual,  Prev: Binary packages from old Packaging Manual,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "15 Source packages (from old Packaging Manual)": {
            "content": "",
            "subsections": []
        },
        "The Debian binary packages in the distribution are generated from Debian": {
            "content": "sources, which are in a special format to assist the easy and automatic\nbuilding of binaries.\n\n* Menu:\n\n* Tools for processing source packages::\n* The Debian package source tree::\n* Source packages as archives::\n* Unpacking a Debian source package without dpkg-source::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Tools for processing source packages,  Next: The Debian package source tree,  Up: Source packages from old Packaging Manual": {
            "content": "",
            "subsections": [
                {
                    "name": "15.1 Tools for processing source packages",
                    "content": ""
                }
            ]
        },
        "Various tools are provided for manipulating source packages; they pack": {
            "content": "and unpack sources and help build of binary packages and help manage the\ndistribution of new versions.\n",
            "subsections": []
        },
        "They are introduced and typical uses described here; see": {
            "content": "'dpkg-source(1)' for full documentation about their arguments and\noperation.\n",
            "subsections": []
        },
        "For examples of how to construct a Debian source package, and how to use": {
            "content": "those utilities that are used by Debian source packages, please see the\n'hello' example package.\n\n* Menu:\n\n* dpkg-source - packs and unpacks Debian source packages::\n* dpkg-buildpackage - overall package-building control script::\n* dpkg-gencontrol - generates binary package control files::\n* dpkg-shlibdeps - calculates shared library dependencies::\n* dpkg-distaddfile - adds a file to debian/files::\n* dpkg-genchanges - generates a .changes upload control file: dpkg-genchanges - generates a changes upload control file.\n* dpkg-parsechangelog - produces parsed representation of a changelog::\n* dpkg-architecture - information about the build and host system::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: dpkg-source - packs and unpacks Debian source packages,  Next: dpkg-buildpackage - overall package-building control script,  Up: Tools for processing source packages": {
            "content": "",
            "subsections": []
        },
        "This program is frequently used by hand, and is also called from": {
            "content": "package-independent automated building scripts such as\n'dpkg-buildpackage'.\n",
            "subsections": []
        },
        "To unpack a package it is typically invoked with": {
            "content": "dpkg-source -x .../path/to/filename.dsc\n\nwith the 'filename.tar.gz' and 'filename.diff.gz' (if applicable) in the\nsame directory.  It unpacks into 'package-version', and if applicable\n'package-version.orig', in the current directory.\n\nTo create a packed source archive it is typically invoked:\n\ndpkg-source -b package-version\n",
            "subsections": []
        },
        "This will create the '.dsc', '.tar.gz' and '.diff.gz' (if appropriate)": {
            "content": "in the current directory.  'dpkg-source' does not clean the source tree\nfirst - this must be done separately if it is required.\n\nSee also *note Source packages as archives: c1.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: dpkg-buildpackage - overall package-building control script,  Next: dpkg-gencontrol - generates binary package control files,  Prev: dpkg-source - packs and unpacks Debian source packages,  Up: Tools for processing source packages": {
            "content": "See 'dpkg-buildpackage(1)'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: dpkg-gencontrol - generates binary package control files,  Next: dpkg-shlibdeps - calculates shared library dependencies,  Prev: dpkg-buildpackage - overall package-building control script,  Up: Tools for processing source packages": {
            "content": "This program is usually called from 'debian/rules' (see *note\nsectiontitle: 1c2.) in the top level of the source tree.\n",
            "subsections": []
        },
        "This is usually done just before the files and directories in the": {
            "content": "temporary directory tree where the package is being built have their\npermissions and ownerships set and the package is constructed using\n'dpkg-deb/'.  (1)\n\n'dpkg-gencontrol' must be called after all the files which are to go\ninto the package have been placed in the temporary build directory, so\nthat its calculation of the installed size of a package is correct.\n",
            "subsections": []
        },
        "It is also necessary for 'dpkg-gencontrol' to be run after": {
            "content": "'dpkg-shlibdeps' so that the variable substitutions created by\n'dpkg-shlibdeps' in 'debian/substvars' are available.\n",
            "subsections": []
        },
        "For a package which generates only one binary package, and which builds": {
            "content": "it in 'debian/tmp' relative to the top of the source package, it is\nusually sufficient to call 'dpkg-gencontrol'.\n\nSources which build several binaries will typically need something like:\n\ndpkg-gencontrol -Pdebian/pkg -ppackage\n",
            "subsections": []
        },
        "The '-P' tells 'dpkg-gencontrol' that the package is being built in a": {
            "content": "non-default directory, and the '-p' tells it which package's control\nfile should be generated.\n\n'dpkg-gencontrol' also adds information to the list of files in\n'debian/files', for the benefit of (for example) a future invocation of\n'dpkg-genchanges'.\n\n---------- Footnotes ----------\n\n(1) (1) This is so that the control file which is produced has the\nright permissions\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: dpkg-shlibdeps - calculates shared library dependencies,  Next: dpkg-distaddfile - adds a file to debian/files,  Prev: dpkg-gencontrol - generates binary package control files,  Up: Tools for processing source packages": {
            "content": "See 'dpkg-shlibdeps(1)'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: dpkg-distaddfile - adds a file to debian/files,  Next: dpkg-genchanges - generates a changes upload control file,  Prev: dpkg-shlibdeps - calculates shared library dependencies,  Up: Tools for processing source packages": {
            "content": "",
            "subsections": []
        },
        "Some packages' uploads need to include files other than the source and": {
            "content": "binary package files.\n\n'dpkg-distaddfile' adds a file to the 'debian/files' file so that it\nwill be included in the '.changes' file when 'dpkg-genchanges' is run.\n\nIt is usually invoked from the 'binary' target of 'debian/rules':\n\ndpkg-distaddfile filename section priority\n",
            "subsections": []
        },
        "The filename is relative to the directory where 'dpkg-genchanges' will": {
            "content": "expect to find it - this is usually the directory above the top level of\nthe source tree.  The 'debian/rules' target should put the file there\njust before or just after calling 'dpkg-distaddfile'.\n",
            "subsections": []
        },
        "The section and priority are passed unchanged into the resulting": {
            "content": "'.changes' file.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: dpkg-genchanges - generates a changes upload control file,  Next: dpkg-parsechangelog - produces parsed representation of a changelog,  Prev: dpkg-distaddfile - adds a file to debian/files,  Up: Tools for processing source packages": {
            "content": "See 'dpkg-genchanges(1)'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: dpkg-parsechangelog - produces parsed representation of a changelog,  Next: dpkg-architecture - information about the build and host system,  Prev: dpkg-genchanges - generates a changes upload control file,  Up: Tools for processing source packages": {
            "content": "See 'dpkg-parsechangelog(1)'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: dpkg-architecture - information about the build and host system,  Prev: dpkg-parsechangelog - produces parsed representation of a changelog,  Up: Tools for processing source packages": {
            "content": "See 'dpkg-architecture(1)'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: The Debian package source tree,  Next: Source packages as archives,  Prev: Tools for processing source packages,  Up: Source packages from old Packaging Manual": {
            "content": "",
            "subsections": [
                {
                    "name": "15.2 The Debian package source tree",
                    "content": ""
                }
            ]
        },
        "The source archive scheme described later is intended to allow a Debian": {
            "content": "package source tree with some associated control information to be\nreproduced and transported easily.  The Debian package source tree is a\nversion of the original program with certain files added for the benefit\nof the packaging process, and with any other changes required made to\nthe rest of the source code and installation scripts.\n",
            "subsections": []
        },
        "The extra files created for Debian are in the subdirectory 'debian' of": {
            "content": "the top level of the Debian package source tree.  They are described\nbelow.\n\n* Menu:\n\n* debian/rules - the main building script::\n* debian/substvars and variable substitutions::\n* debian/files::\n* debian/tmp::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: debian/rules - the main building script,  Next: debian/substvars and variable substitutions,  Up: The Debian package source tree": {
            "content": "See *note Main building script; debian/rules: 78.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: debian/substvars and variable substitutions,  Next: debian/files,  Prev: debian/rules - the main building script,  Up: The Debian package source tree": {
            "content": "See *note Variable substitutions; debian/substvars: 80.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: debian/files,  Next: debian/tmp,  Prev: debian/substvars and variable substitutions,  Up: The Debian package source tree": {
            "content": "See *note Generated files list; debian/files: 85.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: debian/tmp,  Prev: debian/files,  Up: The Debian package source tree": {
            "content": "",
            "subsections": []
        },
        "This is the default temporary location for the construction of binary": {
            "content": "packages by the 'binary' target.  The directory 'tmp' serves as the root\nof the file system tree as it is being constructed (for example, by\nusing the package's upstream makefiles install targets and redirecting\nthe output there), and it also contains the 'DEBIAN' subdirectory.  See\n*note Creating package files - dpkg-deb: 1b1.\n",
            "subsections": []
        },
        "This is only a default and can be easily overridden.  Most packaging": {
            "content": "tools no longer use 'debian/tmp', instead preferring 'debian/pkg' for\nthe common case of a source package building only one binary package.",
            "subsections": []
        },
        "Such tools usually only use 'debian/tmp' as a temporary staging area for": {
            "content": "built files and do not construct packages from it.\n",
            "subsections": []
        },
        "If several binary packages are generated from the same source tree, it": {
            "content": "is usual to use a separate 'debian/pkg' directory for each binary\npackage as the temporary construction locations.\n",
            "subsections": []
        },
        "Whatever temporary directories are created and used by the 'binary'": {
            "content": "target must of course be removed by the 'clean' target.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Source packages as archives,  Next: Unpacking a Debian source package without dpkg-source,  Prev: The Debian package source tree,  Up: Source packages from old Packaging Manual": {
            "content": "",
            "subsections": [
                {
                    "name": "15.3 Source packages as archives",
                    "content": ""
                }
            ]
        },
        "As it exists on the FTP site, a Debian source package consists of three": {
            "content": "related files.  You must have the right versions of all three to be able\nto use them.\n",
            "subsections": []
        },
        "Debian source control file - '.dsc'": {
            "content": "This file is a control file used by 'dpkg-source' to extract a\nsource package.  See *note Debian source control files - .dsc: 9d.\n",
            "subsections": []
        },
        "Original source archive - 'packageupstream-version.orig.tar.gz'": {
            "content": "This is a compressed (with 'gzip -9') 'tar' file containing the\nsource code from the upstream authors of the program.\n",
            "subsections": []
        },
        "Debian package diff - 'packageupstreamversion-revision.diff.gz'": {
            "content": "This is a unified context diff ('diff -u') giving the changes which\nare required to turn the original source into the Debian source.\nThese changes may only include editing and creating plain files.\nThe permissions of files, the targets of symbolic links and the\ncharacteristics of special files or pipes may not be changed and no\nfiles may be removed or renamed.\n\nAll the directories in the diff must exist, except the 'debian'\nsubdirectory of the top of the source tree, which will be created\nby 'dpkg-source' if necessary when unpacking.\n\nThe 'dpkg-source' program will automatically make the\n'debian/rules' file executable (see below).\n",
            "subsections": []
        },
        "If there is no original source code - for example, if the package is": {
            "content": "specially prepared for Debian or the Debian maintainer is the same as\nthe upstream maintainer - the format is slightly different: then there\nis no diff, and the tarfile is named 'packageversion.tar.gz', and\npreferably contains a directory named 'package-version'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Unpacking a Debian source package without dpkg-source,  Prev: Source packages as archives,  Up: Source packages from old Packaging Manual": {
            "content": "",
            "subsections": [
                {
                    "name": "15.4 Unpacking a Debian source package without 'dpkg-source'",
                    "content": "'dpkg-source -x' is the recommended way to unpack a Debian source\npackage.  However, if it is not available it is possible to unpack a\nDebian source archive as follows:\n\n1. Untar the tarfile, which will create a '.orig' directory.\n\n2. Rename the '.orig' directory to 'package-version'.\n\n3. Create the subdirectory 'debian' at the top of the source tree.\n\n4. Apply the diff using 'patch -p0'.\n\n5. Untar the tarfile again if you want a copy of the original source\ncode alongside the Debian version.\n"
                }
            ]
        },
        "It is not possible to generate a valid Debian source archive without": {
            "content": "using 'dpkg-source'.  In particular, attempting to use 'diff' directly\nto generate the '.diff.gz' file will not work.\n\n* Menu:\n\n* Restrictions on objects in source packages: Restrictions on objects in source packages<2>.\n\nFile: debian-policy.info,  Node: Restrictions on objects in source packages<2>,  Up: Unpacking a Debian source package without dpkg-source\n\n",
            "subsections": []
        },
        "The source package may not contain any hard links, (1) (2) device": {
            "content": "special files, sockets or setuid or setgid files.  (3)\n",
            "subsections": []
        },
        "The source packaging tools manage the changes between the original and": {
            "content": "",
            "subsections": []
        },
        "Debian source using 'diff' and 'patch'.  Turning the original source": {
            "content": "tree as included in the '.orig.tar.gz' into the Debian package source\nmust not involve any changes which cannot be handled by these tools.",
            "subsections": []
        },
        "Problematic changes which cause 'dpkg-source' to halt with an error when": {
            "content": "building the source package are:\n\n- Adding or removing symbolic links, sockets or pipes.\n\n- Changing the targets of symbolic links.\n\n- Creating directories, other than 'debian'.\n\n- Changes to the contents of binary files.\n",
            "subsections": []
        },
        "Changes which cause 'dpkg-source' to print a warning but continue anyway": {
            "content": "are:\n\n- Removing files, directories or symlinks.  (4)\n\n- Changed text files which are missing the usual final newline\n(either in the original or the modified source tree).\n",
            "subsections": []
        },
        "Changes which are not represented, but which are not detected by": {
            "content": "'dpkg-source', are:\n\n- Changing the permissions of files (other than 'debian/rules') and\ndirectories.\n",
            "subsections": []
        },
        "The 'debian' directory and 'debian/rules' are handled specially by": {
            "content": "'dpkg-source' - before applying the changes it will create the 'debian'\ndirectory, and afterwards it will make 'debian/rules' world-executable.\n\n---------- Footnotes ----------\n\n(1) (2) This is not currently detected when building source packages,\nbut only when extracting them.\n\n(2) (3) Hard links may be permitted at some point in the future, but\nwould require a fair amount of work.\n\n(3) (4) Setgid directories are allowed.\n\n(4) (5) Renaming a file is not treated specially - it is seen as the\nremoval of the old file (which generates a warning, but is otherwise\nignored), and the creation of the new one.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Control files and their fields from old Packaging Manual,  Next: Configuration file handling from old Packaging Manual,  Prev: Source packages from old Packaging Manual,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "16 Control files and their fields (from old Packaging Manual)": {
            "content": "",
            "subsections": []
        },
        "Many of the tools in the 'dpkg' suite manipulate data in a common": {
            "content": "format, known as control files.  Binary and source packages have control\ndata as do the '.changes' files which control the installation of\nuploaded files, and 'dpkg''s internal databases are in a similar format.\n\n* Menu:\n\n* Syntax of control files: Syntax of control files<2>.\n* List of fields: List of fields<2>.\n\nFile: debian-policy.info,  Node: Syntax of control files<2>,  Next: List of fields<2>,  Up: Control files and their fields from old Packaging Manual\n",
            "subsections": [
                {
                    "name": "16.1 Syntax of control files",
                    "content": "See *note Syntax of control files: 8d.\n"
                }
            ]
        },
        "It is important to note that there are several fields which are optional": {
            "content": "as far as 'dpkg' and the related tools are concerned, but which must\nappear in every Debian package, or whose omission may cause problems.\n\nFile: debian-policy.info,  Node: List of fields<2>,  Prev: Syntax of control files<2>,  Up: Control files and their fields from old Packaging Manual\n",
            "subsections": [
                {
                    "name": "16.2 List of fields",
                    "content": "See *note List of fields: a8.\n"
                }
            ]
        },
        "This section now contains only the fields that didn't belong to the": {
            "content": "Policy manual.\n\n* Menu:\n\n* Filename and MSDOS-Filename::\n* Size and MD5sum::\n* Status::\n* Config-Version::\n* Conffiles::\n* Obsolete fields: Obsolete fields<2>.\n\nFile: debian-policy.info,  Node: Filename and MSDOS-Filename,  Next: Size and MD5sum,  Up: List of fields<2>\n\n",
            "subsections": []
        },
        "These fields in 'Packages' files give the filename(s) of (the parts of)": {
            "content": "a package in the distribution directories, relative to the root of the",
            "subsections": []
        },
        "Debian hierarchy.  If the package has been split into several parts the": {
            "content": "parts are all listed in order, separated by spaces.\n\nFile: debian-policy.info,  Node: Size and MD5sum,  Next: Status,  Prev: Filename and MSDOS-Filename,  Up: List of fields<2>\n\n",
            "subsections": []
        },
        "These fields in 'Packages' files give the size (in bytes, expressed in": {
            "content": "decimal) and MD5 checksum of the file(s) which make(s) up a binary\npackage in the distribution.  If the package is split into several parts\nthe values for the parts are listed in order, separated by spaces.\n\nFile: debian-policy.info,  Node: Status,  Next: Config-Version,  Prev: Size and MD5sum,  Up: List of fields<2>\n\n",
            "subsections": []
        },
        "This field in 'dpkg''s status file records whether the user wants a": {
            "content": "package installed, removed or left alone, whether it is broken\n(requiring re-installation) or not and what its current state on the\nsystem is.  Each of these pieces of information is a single word.\n\nFile: debian-policy.info,  Node: Config-Version,  Next: Conffiles,  Prev: Status,  Up: List of fields<2>\n\n",
            "subsections": []
        },
        "If a package is not installed or not configured, this field in 'dpkg''s": {
            "content": "status file records the last version of the package which was\nsuccessfully configured.\n\nFile: debian-policy.info,  Node: Conffiles,  Next: Obsolete fields<2>,  Prev: Config-Version,  Up: List of fields<2>\n\n",
            "subsections": []
        },
        "This field in 'dpkg''s status file contains information about the": {
            "content": "automatically-managed configuration files held by a package.  This field\nshould `not' appear anywhere in a package!\n\nFile: debian-policy.info,  Node: Obsolete fields<2>,  Prev: Conffiles,  Up: List of fields<2>\n\n",
            "subsections": []
        },
        "These are still recognized by 'dpkg' but should not appear anywhere any": {
            "content": "more.\n\n'Revision'; 'Package-Revision'; 'PackageRevision'\n\nThe Debian revision part of the package version was at one point in\na separate control field.  This field went through several names.\n\n'Recommended'\n\nOld name for 'Recommends'.\n\n'Optional'\n\nOld name for 'Suggests'.\n\n'Class'\n\nOld name for 'Priority'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Configuration file handling from old Packaging Manual,  Next: Alternative versions of an interface - update-alternatives from old Packaging Manual,  Prev: Control files and their fields from old Packaging Manual,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "17 Configuration file handling (from old Packaging Manual)": {
            "content": "'dpkg' can do a certain amount of automatic handling of package\nconfiguration files.\n",
            "subsections": []
        },
        "Whether this mechanism is appropriate depends on a number of factors,": {
            "content": "but basically there are two approaches to any particular configuration\nfile.\n",
            "subsections": []
        },
        "The easy method is to ship a best-effort configuration in the package,": {
            "content": "and use 'dpkg''s conffile mechanism to handle updates.  If the user is\nunlikely to want to edit the file, but you need them to be able to\nwithout losing their changes, and a new package with a changed version\nof the file is only released infrequently, this is a good approach.\n",
            "subsections": []
        },
        "The hard method is to build the configuration file from scratch in the": {
            "content": "'postinst' script, and to take the responsibility for fixing any\nmistakes made in earlier versions of the package automatically.  This\nwill be appropriate if the file is likely to need to be different on\neach system.\n\n* Menu:\n\n* Automatic handling of configuration files by dpkg::\n* Fully-featured maintainer script configuration handling::\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Automatic handling of configuration files by dpkg,  Next: Fully-featured maintainer script configuration handling,  Up: Configuration file handling from old Packaging Manual": {
            "content": "",
            "subsections": [
                {
                    "name": "17.1 Automatic handling of configuration files by 'dpkg'",
                    "content": "A package may contain a control information file called 'conffiles'."
                }
            ]
        },
        "This file should be a list of filenames of configuration files needing": {
            "content": "automatic handling, separated by newlines.  The filenames should be\nabsolute pathnames, and the files referred to should actually exist in\nthe package.\n",
            "subsections": []
        },
        "When a package is upgraded 'dpkg' will process the configuration files": {
            "content": "during the configuration stage, shortly before it runs the package's\n'postinst' script,\n",
            "subsections": []
        },
        "For each file it checks to see whether the version of the file included": {
            "content": "in the package is the same as the one that was included in the last\nversion of the package (the one that is being upgraded from); it also\ncompares the version currently installed on the system with the one\nshipped with the last version.\n",
            "subsections": []
        },
        "If neither the user nor the package maintainer has changed the file, it": {
            "content": "is left alone.  If one or the other has changed their version, then the\nchanged version is preferred - i.e., if the user edits their file, but\nthe package maintainer doesn't ship a different version, the user's\nchanges will stay, silently, but if the maintainer ships a new version\nand the user hasn't edited it the new version will be installed (with an\ninformative message).  If both have changed their version the user is\nprompted about the problem and must resolve the differences themselves.\n",
            "subsections": []
        },
        "The comparisons are done by calculating the MD5 message digests of the": {
            "content": "files, and storing the MD5 of the file as it was included in the most\nrecent version of the package.\n",
            "subsections": []
        },
        "When a package is installed for the first time 'dpkg' will install the": {
            "content": "file that comes with it, unless that would mean overwriting a file\nalready on the file system.\n\nHowever, note that 'dpkg' will `not' replace a conffile that was removed\nby the user (or by a script).  This is necessary because with some\nprograms a missing file produces an effect hard or impossible to achieve\nin another way, so that a missing file needs to be kept that way if the\nuser did it.\n\nNote that a package should `not' modify a 'dpkg'-handled conffile in its\nmaintainer scripts.  Doing this will lead to 'dpkg' giving the user\nconfusing and possibly dangerous options for conffile update when the\npackage is upgraded.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Fully-featured maintainer script configuration handling,  Prev: Automatic handling of configuration files by dpkg,  Up: Configuration file handling from old Packaging Manual": {
            "content": "",
            "subsections": [
                {
                    "name": "17.2 Fully-featured maintainer script configuration handling",
                    "content": ""
                }
            ]
        },
        "For files which contain site-specific information such as the hostname": {
            "content": "and networking details and so forth, it is better to create the file in\nthe package's 'postinst' script.\n",
            "subsections": []
        },
        "This will typically involve examining the state of the rest of the": {
            "content": "system to determine values and other information, and may involve\nprompting the user for some information which can't be obtained some\nother way.\n",
            "subsections": []
        },
        "When using this method there are a couple of important issues which": {
            "content": "should be considered:\n",
            "subsections": []
        },
        "If you discover a bug in the program which generates the configuration": {
            "content": "file, or if the format of the file changes from one version to the next,\nyou will have to arrange for the postinst script to do something\nsensible - usually this will mean editing the installed configuration\nfile to remove the problem or change the syntax.  You will have to do\nthis very carefully, since the user may have changed the file, perhaps\nto fix the very problem that your script is trying to deal with - you\nwill have to detect these situations and deal with them correctly.\n",
            "subsections": []
        },
        "If you do go down this route it's probably a good idea to make the": {
            "content": "program that generates the configuration file(s) a separate program in\n'/usr/sbin', by convention called 'packageconfig' and then run that if\nappropriate from the post-installation script.  The 'packageconfig'\nprogram should not unquestioningly overwrite an existing configuration -\nif its mode of operation is geared towards setting up a package for the\nfirst time (rather than any arbitrary reconfiguration later) you should\nhave it check whether the configuration already exists, and require a\n'--force' flag to overwrite it.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Alternative versions of an interface - update-alternatives from old Packaging Manual,  Next: Diversions - overriding a package's version of a file from old Packaging Manual,  Prev: Configuration file handling from old Packaging Manual,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "18 Alternative versions of an interface - 'update-alternatives' (from old Packaging Manual)": {
            "content": "",
            "subsections": []
        },
        "When several packages all provide different versions of the same program": {
            "content": "or file it is useful to have the system select a default, but to allow\nthe system administrator to change it and have their decisions\nrespected.\n",
            "subsections": []
        },
        "For example, there are several versions of the 'vi' editor, and there is": {
            "content": "no reason to prevent all of them from being installed at once, each\nunder their own name ('nvi', 'vim' or whatever).  Nevertheless it is\ndesirable to have the name 'vi' refer to something, at least by default.\n",
            "subsections": []
        },
        "If all the packages involved cooperate, this can be done with": {
            "content": "'update-alternatives'.\n",
            "subsections": []
        },
        "Each package provides its own version under its own name, and calls": {
            "content": "'update-alternatives' in its postinst to register its version (and again\nin its prerm to deregister it).\n\nSee the 'update-alternatives(8)' man page for details.\n",
            "subsections": []
        },
        "If 'update-alternatives' does not seem appropriate you may wish to": {
            "content": "consider using diversions instead.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Diversions - overriding a package's version of a file from old Packaging Manual,  Next: Debian Policy changes process,  Prev: Alternative versions of an interface - update-alternatives from old Packaging Manual,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "19 Diversions - overriding a package's version of a file (from old Packaging Manual)": {
            "content": "",
            "subsections": []
        },
        "It is possible to have 'dpkg' not overwrite a file when it reinstalls": {
            "content": "the package it belongs to, and to have it put the file from the package\nsomewhere else instead.\n",
            "subsections": []
        },
        "This can be used locally to override a package's version of a file, or": {
            "content": "by one package to override another's version (or provide a wrapper for\nit).\n\nBefore deciding to use a diversion, read *note Alternative versions of\nan interface - update-alternatives (from old Packaging Manual): 1f2. to\nsee if you really want a diversion rather than several alternative\nversions of a program.\n",
            "subsections": []
        },
        "There is a diversion list, which is read by 'dpkg', and updated by a": {
            "content": "special program 'dpkg-divert'.  Please see 'dpkg-divert(8)' for full\ndetails of its operation.\n",
            "subsections": []
        },
        "When a package wishes to divert a file from another, it should call": {
            "content": "'dpkg-divert' in its preinst to add the diversion and rename the\nexisting file.  For example, supposing that a 'smailwrapper' package\nwishes to install a wrapper around '/usr/sbin/smail':\n\ndpkg-divert --package smailwrapper --add --rename \\\n--divert /usr/sbin/smail.real /usr/sbin/smail\n",
            "subsections": []
        },
        "The '--package smailwrapper' ensures that 'smailwrapper''s copy of": {
            "content": "'/usr/sbin/smail' can bypass the diversion and get installed as the true\nversion.  It's safe to add the diversion unconditionally on upgrades\nsince it will be left unchanged if it already exists, but 'dpkg-divert'\nwill display a message.  To suppress that message, make the command\nconditional on the version from which the package is being upgraded:\n\nif [ upgrade != \"$1 ] || dpkg --compare-versions \"$2\" lt 1.0-2; then\ndpkg-divert --package smailwrapper --add --rename \\\n--divert /usr/sbin/smail.real /usr/sbin/smail\nfi\n\nwhere '1.0-2' is the version at which the diversion was first added to\nthe package.  Running the command during abort-upgrade is pointless but\nharmless.\n\nThe postrm has to do the reverse:\n\nif [ remove = \"$1\" -o abort-install = \"$1\" -o disappear = \"$1 ]; then\ndpkg-divert --package smailwrapper --remove --rename \\\n--divert /usr/sbin/smail.real /usr/sbin/smail\nfi\n",
            "subsections": []
        },
        "If the diversion was added at a particular version, the postrm should": {
            "content": "also handle the failure case of upgrading from an older version (unless\nthe older version is so old that direct upgrades are no longer\nsupported):\n\nif [ abort-upgrade = \"$1 ] && dpkg --compare-versions \"$2\" lt 1.0-2; then\ndpkg-divert --package smailwrapper --remove --rename \\\n--divert /usr/sbin/smail.real /usr/sbin/smail\nfi\n\nwhere '1.0-2' is the version at which the diversion was first added to\nthe package.  The postrm should not remove the diversion on upgrades\nboth because there's no reason to remove the diversion only to\nimmediately re-add it and since the postrm of the old package is run\nafter unpacking so the removal of the diversion will fail.\n",
            "subsections": []
        },
        "Do not attempt to divert a file which is vitally important for the": {
            "content": "system's operation - when using 'dpkg-divert' there is a time, after it\nhas been diverted but before 'dpkg' has installed the new version, when\nthe file does not exist.\n\nDo not attempt to divert a conffile, as 'dpkg' does not handle it well.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Debian Policy changes process,  Next: Maintainer script flowcharts,  Prev: Diversions - overriding a package's version of a file from old Packaging Manual,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "20 Debian Policy changes process": {
            "content": "* Menu:\n\n* Introduction: Introduction<3>.\n* Change Goals::\n* Current Process::\n* Other Tags::\n\nFile: debian-policy.info,  Node: Introduction<3>,  Next: Change Goals,  Up: Debian Policy changes process\n",
            "subsections": [
                {
                    "name": "20.1 Introduction",
                    "content": ""
                }
            ]
        },
        "To introduce a change in the current Debian Policy, the change proposal": {
            "content": "has to go through a certain process.  (1)\n\n---------- Footnotes ----------\n\n(1) (1) This process was originally developed by Margarita Manterola,",
            "subsections": []
        },
        "Clint Adams, Russ Allbery and Manoj Srivastava.  In 2017, Sean Whitton": {
            "content": "deprecated the 'issue' usertag and added use of the 'moreinfo' tag,\nafter discussions at DebConf17.\n\nFile: debian-policy.info,  Node: Change Goals,  Next: Current Process,  Prev: Introduction<3>,  Up: Debian Policy changes process\n",
            "subsections": [
                {
                    "name": "20.2 Change Goals",
                    "content": "- The change should be technically correct, and consistent with the\nrest of the policy document.  This means no legislating the value\nof ??.  This also means that the proposed solution be known to work;\niterative design processes do not belong in policy.\n\n- The change should not be too disruptive; if very many packages\nbecome instantly buggy, then instead there should be a transition\nplan.  Exceptions should be rare (only if the current state is\nreally untenable), and probably blessed by the TC.\n\n- The change has to be reviewed in depth, in the open, where any one\nmay contribute; a publicly accessible, archived, open mailing list.\n\n- Proposal should be addressed in a timely fashion.\n\n- Any domain experts should be consulted, since not every policy\nmailing list subscriber is an expert on everything, including\npolicy maintainers.\n\n- The goal is rough consensus on the change, which should not be hard\nif the matter is technical.  Technical issues where there is no\nagreement should be referred to the TC; non-technical issues should\nbe referred to the whole developer body, and perhaps general\nresolutions lie down that path.\n\n- Package maintainers whose packages may be impacted should have\naccess to policy change proposals, even if they do not subscribe to\npolicy mailing lists (policy gazette?).\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Current Process,  Next: Other Tags,  Prev: Change Goals,  Up: Debian Policy changes process": {
            "content": "",
            "subsections": [
                {
                    "name": "20.3 Current Process",
                    "content": ""
                }
            ]
        },
        "Each suggested change goes through different states.  These states are": {
            "content": "denoted through either usertags of the\n<debian-policy@packages.debian.org> user or, for 'moreinfo', 'patch',\n'pending', and 'wontfix', regular tags.\n",
            "subsections": []
        },
        "Current list of bugs(1)": {
            "content": "",
            "subsections": []
        },
        "The Policy delegates are responsible for managing the tags on bugs and": {
            "content": "will update tags as new bugs are submitted or as activity happens on\nbugs.  All Debian Developers should feel free to add the seconded tag as\ndescribed below.  Other tags should be changed with the coordination of\nthe Policy Team.\n\n* Menu:\n\n* State A; More information required: State A More information required.\n* State B; Discussion: State B Discussion.\n* State C; Proposal: State C Proposal.\n* State D; Wording proposed: State D Wording proposed.\n* State E; Seconded: State E Seconded.\n* State F; Accepted: State F Accepted.\n* State G; Reject: State G Reject.\n\n---------- Footnotes ----------\n\n(1)\nhttps://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: State A More information required,  Next: State B Discussion,  Up: Current Process": {
            "content": "",
            "subsections": []
        },
        "The Policy delegates are unable to determine whether the bug is really a": {
            "content": "",
            "subsections": []
        },
        "Policy matter, or judge that there are missing details that would": {
            "content": "prevent a fruitful discussion (and may result in a confused and\nunhelpful discussion).\n",
            "subsections": []
        },
        "Policy delegates ask the original submitter to provide the missing": {
            "content": "details.  Others are asked to refrain from discussing whatever they take\nthe issue to be, limiting their postings to attempts to supply the\nmissing details.\n\nTAG: moreinfo(1)\n",
            "subsections": []
        },
        "What needs to happen next: Submitter (or someone else) provides the": {
            "content": "requested information within 30 days, or the bug is closed.\n\nThe majority of bugs will skip this stage.\n\n---------- Footnotes ----------\n\n(1)\nhttps://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=moreinfo\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: State B Discussion,  Next: State C Proposal,  Prev: State A More information required,  Up: Current Process": {
            "content": "Discuss remedy.  Alternate proposals.  Discussion guided by delegates.",
            "subsections": []
        },
        "There should be a clear time limit to this stage, but as yet we have not": {
            "content": "set one.\n\nTAG: discussion(1)\n",
            "subsections": []
        },
        "What needs to happen next: Reach a conclusion and consensus in the": {
            "content": "discussion and make a final proposal for what should be changed (if\nanything), moving to the proposal tag.\n\n---------- Footnotes ----------\n\n(1)\nhttps://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=discussion\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: State C Proposal,  Next: State D Wording proposed,  Prev: State B Discussion,  Up: Current Process": {
            "content": "A final proposal has emerged from the discussion, and there is a rough\nconsensus on how to proceed to resolve the issue.\n\nTAG: proposal(1)\n",
            "subsections": []
        },
        "What needs to happen next: Provided that the rough consensus persists,": {
            "content": "develop a patch against the current Policy document with specific\nwording of the change.  Often this is done in conjunction with the\nproposal, in which case one may skip this step and move directly to\npatch tag.\n\n---------- Footnotes ----------\n\n(1)\nhttps://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=proposal\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: State D Wording proposed,  Next: State E Seconded,  Prev: State C Proposal,  Up: Current Process": {
            "content": "A patch against the Policy document reflecting the consensus has been\ncreated and is waiting for formal seconds.  The standard patch tag is\nused for this state, since it's essentially equivalent to the standard\nmeaning of that tag.\n\nTAG: patch(1)\n",
            "subsections": []
        },
        "What needs to happen next: The proposal needs to be reviewed and": {
            "content": "seconded.  Any Debian developer who agrees with the change and the\nconclusion of rough consensus from the discussion should say so in the\nbug log by seconding the proposal.\n\n---------- Footnotes ----------\n\n(1)\nhttps://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=patch\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: State E Seconded,  Next: State F Accepted,  Prev: State D Wording proposed,  Up: Current Process": {
            "content": "",
            "subsections": []
        },
        "The proposal is signed off on by N Debian Developers.  To start with,": {
            "content": "we're going with N=3, meaning that if three Debian Developers agree, not\njust with the proposal but with the conclusion that it reflects\nconsensus and addresses the original issue - it is considered eligible\nfor inclusion in the next version of Policy.  Since Policy is partly a\ntechnical project governance method, one must be a Debian Developer to\nformally second, although review and discussion is welcome from anyone.",
            "subsections": []
        },
        "Once this tag has been applied, the bug is waiting for a Policy team": {
            "content": "member to apply the patch to the package repository.\n\nTAG: seconded(1)\n",
            "subsections": []
        },
        "What needs to happen next: A Policy maintainer does the final review and": {
            "content": "confirmation, and then applies the patch for the next Policy release.\n",
            "subsections": []
        },
        "This tag is not used very much because normally a Policy maintainer": {
            "content": "applies the patch and moves the proposal to the next state once enough\nseconds are reached.\n\n---------- Footnotes ----------\n\n(1)\nhttps://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=seconded\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: State F Accepted,  Next: State G Reject,  Prev: State E Seconded,  Up: Current Process": {
            "content": "",
            "subsections": []
        },
        "Change accepted, will be in next upload.  The standard pending tag is": {
            "content": "used for this state since it matches the regular meaning of pending.\n\nTAG: pending(1)\n",
            "subsections": []
        },
        "What needs to happen next: The bug is now in the waiting queue for the": {
            "content": "next Policy release, and there's nothing left to do except for upload a\nnew version of Policy.\n\n---------- Footnotes ----------\n\n(1)\nhttps://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=pending\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: State G Reject,  Prev: State F Accepted,  Up: Current Process": {
            "content": "Rejected proposals.  The standard wontfix is used for this state.\nNormally, bugs in this state will not remain open (excepting `stalled');\ninstead, a Policy team member will close them with an explanation.  The\nsubmitter may then appeal to the tech-ctte if they so desire.",
            "subsections": []
        },
        "Alternately, issues appealed to the tech-ctte may remain open with this": {
            "content": "tag while that appeal proceeds.\n\nTAG: wontfix(1)\n",
            "subsections": []
        },
        "We may use one of the following tags here.  It's not clear whether we": {
            "content": "need more tags for this stage.\n\n`dubious'\n\nNot a policy matter\n\n`ctte'\n\nReferred to the Technical Committee (tech-ctte)\n\n`devel'\n\nReferred to the developer body\n\n`delegate'\n\nRejected by a Policy delegate\n\n`obsolete'\n\nConsensus on a proposal was not forthcoming, and the bug is to be\nclosed.  Those wishing to restart discussion should open a new bug,\nbut only if they have a concrete new change proposal.\n\n`stalled'\n\nConsensus on a proposal was not forthcoming.  However, the bug\nshould be kept open, as a form of documentation, and to minimise\nthe number of duplicate filings.\n",
            "subsections": []
        },
        "What may need to happen next: The bug should be closed once a final": {
            "content": "resolution is reached (excepting `stalled'), or retagged to an\nappropriate state if that final resolution reverses the decision to\nreject the proposal.\n\n---------- Footnotes ----------\n\n(1)\nhttps://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=rejected\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Other Tags,  Prev: Current Process,  Up: Debian Policy changes process": {
            "content": "",
            "subsections": [
                {
                    "name": "20.4 Other Tags",
                    "content": "All Policy bugs are additionally categorized by class of bug.\n"
                }
            ]
        },
        "The normative tag is used for bugs that make normative changes to": {
            "content": "",
            "subsections": []
        },
        "Policy, meaning that the dictates of Policy will change in some fashion": {
            "content": "as part of the resolution of the bug if the proposal is accepted.  The\nfull process is followed for such bugs.\n\nTAG: normative(1)\n",
            "subsections": []
        },
        "The informative tag is used for bugs about wording issues, typos,": {
            "content": "informative footnotes, or other changes that do not affect the formal\ndictates of Policy, just the presentation.  The same tags are used for\nthese bugs for convenience, but the Policy maintainers may make\ninformative changes without following the full process.  Informative\nbugs fall under their discretion.\n\nTAG: informative(2)\n",
            "subsections": []
        },
        "The packaging tag is used for bugs about the packaging and build process": {
            "content": "of the debian-policy Debian package.  These bugs do not follow the\nnormal process and will not have the other tags except for pending and\nwontfix (used with their normal meanings).\n\nTAG: packaging(3)\n\n---------- Footnotes ----------\n\n(1)\nhttps://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=normative\n\n(2)\nhttps://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=informative\n\n(3)\nhttps://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=packaging\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Maintainer script flowcharts,  Next: Upgrading checklist,  Prev: Debian Policy changes process,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "21 Maintainer script flowcharts": {
            "content": "",
            "subsections": []
        },
        "The flowcharts (1) included in this appendix use the following": {
            "content": "conventions:\n\n- maintainer scripts and their arguments are within boxes;\n\n- actions carried out external to the scripts are in italics; and\n\n- the 'dpkg' status of the package at the end of the run are in bold\ntype.\n",
            "subsections": []
        },
        "Installing a package that was not previously installed": {
            "content": "",
            "subsections": []
        },
        "Figure: Installing a package that was not previously installed": {
            "content": "",
            "subsections": []
        },
        "Installing a package that was previously removed, but not purged": {
            "content": "",
            "subsections": []
        },
        "Figure: Installing a package that was previously removed, but not purged": {
            "content": "",
            "subsections": []
        },
        "Upgrading a package": {
            "content": "",
            "subsections": []
        },
        "Figure: Upgrading a package": {
            "content": "",
            "subsections": []
        },
        "Removing a package": {
            "content": "",
            "subsections": []
        },
        "Figure: Removing a package": {
            "content": "",
            "subsections": []
        },
        "Purging a package previously removed": {
            "content": "",
            "subsections": []
        },
        "Figure: Purging a package previously removed": {
            "content": "",
            "subsections": []
        },
        "Removing and purging a package": {
            "content": "",
            "subsections": []
        },
        "Figure: Removing and purging a package": {
            "content": "---------- Footnotes ----------\n\n(1) (1) These flowcharts were originally created by Margarita\nManterola for the Debian Women project wiki.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Upgrading checklist,  Next: License,  Prev: Maintainer script flowcharts,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "22 Upgrading checklist": {
            "content": "* Menu:\n\n* About the checklist::\n* Version 4.6.0: Version 4 6 0.\n* Version 4.5.1: Version 4 5 1.\n* Version 4.5.0: Version 4 5 0.\n* Version 4.4.1: Version 4 4 1.\n* Version 4.4.0: Version 4 4 0.\n* Version 4.3.0: Version 4 3 0.\n* Version 4.2.1: Version 4 2 1.\n* Version 4.2.0: Version 4 2 0.\n* Version 4.1.5: Version 4 1 5.\n* Version 4.1.4: Version 4 1 4.\n* Version 4.1.3: Version 4 1 3.\n* Version 4.1.2: Version 4 1 2.\n* Version 4.1.1: Version 4 1 1.\n* Version 4.1.0: Version 4 1 0.\n* Version 4.0.1: Version 4 0 1.\n* Version 4.0.0: Version 4 0 0.\n* Version 3.9.8: Version 3 9 8.\n* Version 3.9.7: Version 3 9 7.\n* Version 3.9.6: Version 3 9 6.\n* Version 3.9.5: Version 3 9 5.\n* Version 3.9.4: Version 3 9 4.\n* Version 3.9.3: Version 3 9 3.\n* Version 3.9.2: Version 3 9 2.\n* Version 3.9.1: Version 3 9 1.\n* Version 3.9.0: Version 3 9 0.\n* Version 3.8.4: Version 3 8 4.\n* Version 3.8.3: Version 3 8 3.\n* Version 3.8.2: Version 3 8 2.\n* Version 3.8.1: Version 3 8 1.\n* Version 3.8.0: Version 3 8 0.\n* Version 3.7.3: Version 3 7 3.\n* Version 3.7.2.2: Version 3 7 2 2.\n* Version 3.7.2: Version 3 7 2.\n* Version 3.7.1: Version 3 7 1.\n* Version 3.7.0: Version 3 7 0.\n* Version 3.6.2: Version 3 6 2.\n* Version 3.6.1: Version 3 6 1.\n* Version 3.6.0: Version 3 6 0.\n* Version 3.5.10: Version 3 5 10.\n* Version 3.5.9: Version 3 5 9.\n* Version 3.5.8: Version 3 5 8.\n* Version 3.5.7: Version 3 5 7.\n* Version 3.5.6: Version 3 5 6.\n* Version 3.5.5: Version 3 5 5.\n* Version 3.5.4: Version 3 5 4.\n* Version 3.5.3: Version 3 5 3.\n* Version 3.5.2: Version 3 5 2.\n* Version 3.5.1: Version 3 5 1.\n* Version 3.5.0: Version 3 5 0.\n* Version 3.2.1.1: Version 3 2 1 1.\n* Version 3.2.1: Version 3 2 1.\n* Version 3.2.0: Version 3 2 0.\n* Version 3.1.1: Version 3 1 1.\n* Version 3.1.0: Version 3 1 0.\n* Version 3.0.1: Version 3 0 1.\n* Version 3.0.0: Version 3 0 0.\n* Version 2.5.0: Version 2 5 0.\n* Version 2.4.1: Version 2 4 1.\n* Version 2.4.0: Version 2 4 0.\n* Version 2.3.0: Version 2 3 0.\n* Version 2.2.0: Version 2 2 0.\n* Version 2.1.3: Version 2 1 3.\n* Version 2.1.2: Version 2 1 2.\n* Version 2.1.1: Version 2 1 1.\n* Version 2.1.0: Version 2 1 0.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: About the checklist,  Next: Version 4 6 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.1 About the checklist",
                    "content": ""
                }
            ]
        },
        "The checklist below has been created to simplify the upgrading process": {
            "content": "of old packages.  This list is not official or normative.  It only\nprovides an indication of what has changed and whether you are likely to\nneed to make changes to your package in light of this.  If you have\ndoubts about a certain topic, if you need more details, or if you think\nsome other package does not comply with policy, please refer to the\nPolicy Manual itself.\n",
            "subsections": []
        },
        "All of the changes from version 3.0.0 onwards indicate which section of": {
            "content": "the Policy Manual discusses the issue.  The section numbering should\nstill be accurate for changes back to the 2.5.0 release.  Before that\npoint, the sections listed here probably no longer correspond to\nsections in the modern Policy Manual.\n",
            "subsections": []
        },
        "Here is how the check list works: Check which policy version your": {
            "content": "package was checked against last (indicated in the 'Standards-Version'\nfield of the source package).  Then move upwards until the top and check\nwhich of the items on the list might concern your package.  Note which\nsections of policy discuss this, and then check out the Policy Manual\nfor details.  Once you've made all necessary changes to match the\ncurrent rules, update the value of 'Standards-Version' to the current\nPolicy Manual version.\n",
            "subsections": []
        },
        "If an item in the list is followed by the name of a Lintian tag in": {
            "content": "square brackets, it indicates that the policy requirement is covered by\nthat Lintian tag.  The lack of such an annotation does not mean that no",
            "subsections": []
        },
        "Lintian tag exists to cover the requirement.  Our coverage of these": {
            "content": "annotations is quite incomplete, and patches to this checklist are very\nwelcome.\n",
            "subsections": []
        },
        "The sections in this checklist match the values for the": {
            "content": "'Standards-Version' control field in omitting the minor patch version,\nexcept in the two anomalous historical cases where normative\nrequirements were changed in a minor patch release.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Version 4 6 0,  Next: Version 4 5 1,  Prev: About the checklist,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.2 Version 4.6.0",
                    "content": "Released August, 2021.\n\n9.1.1\n\nNo package is allowed to install files in '/usr/lib64/'.\nPreviously, this prohibition only applied to packages for 64-bit\narchitectures.\n\n12.1\n\nManual pages may be included in dependencies, not only in the\npackages containing the things they document.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 4 5 1,  Next: Version 4 5 0,  Prev: Version 4 6 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.3 Version 4.5.1",
                    "content": "Released November, 2020.\n\n2.3, 4.5 & 12.5\n\nThe copyright information for files in a package must be copied\nverbatim into '/usr/share/doc/PACKAGE/copyright' when\n\n1. the distribution license for those files requires that\ncopyright information be included in all copies and/or binary\ndistributions;\n\n2. the files are shipped in the binary package, either in source\nor compiled form; and\n\n3. the form in which the files are present in the binary package\ndoes not include a plain text version of their copyright\nnotices.\n\nNote that there is no change to the requirement to copy all\nlicensing information into '/usr/share/doc/PACKAGE/copyright'.\n\n(Previously, it was always required for all copyright information\nto be copied into '/usr/share/doc/PACKAGE/copyright'.)\n\n4.17\n\nPackages must not contain a non-default series file.  That is,\ndpkg's vendor-specific patch series feature must not be used for\npackages in the Debian archive.\n\n(previously a \"should not\")\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 4 5 0,  Next: Version 4 4 1,  Prev: Version 4 5 1,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.4 Version 4.5.0",
                    "content": "Released January, 2020.\n\n9.2.1\n\nWhen maintainers choose a new hardcoded or dynamically generated\nusername for packages to use, they should start this username with\nan underscore.\n\n9.3.1\n\nPackages that include system services should include 'systemd'\nservice units to start or stop those services.\n\nIncluding an init script is encouraged if there is no systemd unit,\nand optional if there is (previously, it was recommended).\n\nIn the common case that a package includes a single system service,\nthe service unit should have the same name as the package plus the\n\".service\" extension.  If an init script is included, it should\nhave the same name as the systemd unit.\n\n9.3.2\n\nIt is encouraged for init scripts to support the 'status' argument\n(previously, it was recommended).\n\n9.3.3\n\nUse of update-rc.d is required if the package includes an init\nscript (previously, Policy said in one place that it was required,\nand in another said that it was recommended).\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 4 4 1,  Next: Version 4 4 0,  Prev: Version 4 5 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.5 Version 4.4.1",
                    "content": "Released September, 2019.\n\n5.6.26\n\nA package control file must not have more than one 'Vcs-<type>'\nfield.\n\nIf the package is maintained in multiple version control systems,\nthe maintainer should specify the one that they would prefer other\npeople to use as the basis for proposing changes to the package.\n\n9.10 & 11.5\n\ndoc-base registration is now optional, from being recommended.\n\n9.12\n\nDocument '/run/reboot-required' mechanism.\n\ncopyright-format\n\nState some syntactical restrictions on the 'Files:' field.\nWildcards are required to match the contents of directories, and\nthe space character separates patterns and cannot be escaped.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 4 4 0,  Next: Version 4 3 0,  Prev: Version 4 4 1,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.6 Version 4.4.0",
                    "content": "Released July, 2019.\n\n4.9\n\nThe recommended way to implement the build process of a Debian\npackage, in the absence of a good reason to use a different\napproach, is the 'dh' tool.  This recommendation includes the\ncontents of the 'debian/rules' building script.\n\nSome examples of good reasons to use a different approach are\ngiven.  The recommendation to use 'dh' does not always apply, and\nuse of 'dh' is not required.\n\n5.6.26\n\nPermit '-b' in Vcs-Hg as well as Vcs-Git.\n\n7.5\n\nDocument versioned Provides.\n\nvirtual\n\nNew 'logind' and 'default-logind' virtual packages for a package\nproviding logind API (via D-Bus and 'sd-login(3)'), and for\nDebian's preferred implementation, respectively.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 4 3 0,  Next: Version 4 2 1,  Prev: Version 4 4 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.7 Version 4.3.0",
                    "content": "Released December, 2018.\n\n2.3 & 4.5\n\nIn cases where a package's distribution license explicitly permits\nits copyright information to be excluded from distributions of\nbinaries built from the source, a verbatim copy of the package's\ncopyright information should normally still be included in the\ncopyright file, but it need not be if creating and maintaining a\ncopy of that information involves significant time and effort.\n\n4.9\n\nRequired targets must not write outside of the unpacked source\npackage tree, except for TMPDIR, /tmp and /var/tmp.\n\n4.17\n\nPackages should not contain a non-default series file.  That is,\ndpkg's vendor-specific patch series feature should not be used for\npackages in the Debian archive.\n\n10.1\n\nBinaries should be stripped using 'strip --strip-unneeded\n--remove-section=.comment --remove-section=.note' (as dhstrip\nalready does).\n\n10.1\n\nIt is no longer suggested nor recommended to use 'install -s' to\nstrip binaries, because it gets several things wrong.\n\n10.2\n\nWhen stripping shared libraries with 'strip(1)', you should\nadditionally pass '--remove-section=.comment\n--remove-section=.note' (as dhstrip already does).\n\nvirtual\n\nNew 'dbus-session-bus' and 'default-dbus-session-bus' virtual\npackages for a package providing the D-Bus session bus, and for\nDebian's preferred D-Bus implementation, respectively.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 4 2 1,  Next: Version 4 2 0,  Prev: Version 4 3 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.8 Version 4.2.1",
                    "content": "Released August, 2018.\n\n10.4 & perl\n\nThe requirement that the shebang at the top of Perl command scripts\nbe '#!/usr/bin/perl' is relaxed from a 'must' to a 'should'.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 4 2 0,  Next: Version 4 1 5,  Prev: Version 4 2 1,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.9 Version 4.2.0",
                    "content": "Released August, 2018.\n\n4.9\n\nThe package build should be as verbose as reasonably possible.\nThis means that 'debian/rules' should pass to the commands it\ninvokes options that cause them to produce verbose output.\n\n4.9\n\nRequired targets may attempt network access, via the loopback\ninterface, to services on the build host that have been started by\nthe build.\n\n4.9.1\n\nNew 'terse' tag that can appear in 'DEBBUILDOPTIONS' to make a\npackage build less verbose.\n\n5.2 & 5.4\n\nThe Standards-Version field is now mandatory, not just recommended.\n\n12.7\n\nUpstream release notes, when available, should be installed as\n'/usr/share/doc/package/NEWS.gz'.  Upstream changelogs may be made\navailable as '/usr/share/doc/package/changelog.gz'.\n\nThis is a relaxation of older Policy which said that the upstream\nchangelog should be made accessible at this path.  Now it is up to\nmaintainer discretion whether it is useful to install it.\n\nThe practice of installing the upstream release notes as\n'/usr/share/doc/package/changelog.gz' is permitted but deprecated.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 4 1 5,  Next: Version 4 1 4,  Prev: Version 4 2 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.10 Version 4.1.5",
                    "content": "Released July, 2018.\n\n4.9.2\n\nDocument how 'debian/rules' and the 'Rules-Requires-Root' field\ninteract.\n\n5.6.12\n\nYou should not change a package's epoch, even in experimental,\nwithout getting consensus on debian-devel first.\n\n5.6.12.1\n\nEpochs should not be used for the purpose of rolling back the\nversion of a package.  Use the +really convention.\n\n5.6.31\n\nDocument the 'Rules-Requires-Root' field.\n\n9.1.1\n\nUpdate Debian's version of the Filesystem Hierarchy Standard from\n2.3 to 3.0, and update the list of exceptions.  Only a tiny\nminority of packages, if any, should be made buggy by this change.\n\n9.3.2 & 10.4\n\nUpdate version of POSIX standard for shell scripts from SUSv3 to\nPOSIX.1-2017 (also known as SUSv4 in some contexts).\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 4 1 4,  Next: Version 4 1 3,  Prev: Version 4 1 5,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.11 Version 4.1.4",
                    "content": "Released April, 2018.\n\n3.2.2\n\nThe part of the version number after the epoch must not be reused\nfor a version of the package with different contents, even after\nthe version of the package previously using that part of the\nversion number is no longer present in any archive suites.\n\n3.2.2\n\nFor non-native packages, the upstream version must not be reused\nfor different upstream source code, so that for each source package\nname and upstream version number there exists exactly one original\nsource archive contents.\n\n4.9\n\nThe 'get-orig-source' rules target has been removed.  Packages\nshould transition to 'debian/watch' and use uscan where possible.\n\n9.1.2\n\nIf '/etc/staff-group-for-usr-local' does not exist, '/usr/local'\nand all subdirectories created by packages should have permissions\n0755 and be owned by 'root:root'.  If the file exists, the old\npermissions of 2775 and ownership of root:staff should remain.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 4 1 3,  Next: Version 4 1 2,  Prev: Version 4 1 4,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.12 Version 4.1.3",
                    "content": "Released December, 2017.\n\n5.6.26\n\nURLs given in 'VCS-*' headers should use a scheme that provides\nconfidentiality ('https', for example) if the VCS repository\nsupports it.  '[vcs-field-uses-insecure-uri]'\n\n7.8\n\n'Built-Using' should be used exactly when there are license or DFSG\nrequirements to retain full source code in the archive.\nPreviously, the description of the field implied it was needed in\nother cases too.\n\n9.1.1\n\n'libc' may also install files in '/lib64'.\n\n9.3.3.1\n\nIf a package's daemon should not be autostarted unless the local\nadministrator has explicitly requested it, the package's 'postinst'\nshould use the new 'defaults-disabled' option of 'update-rc.d'.\n\nThe old method of including 'DISABLED=yes' in the package's\n'/etc/default' file should not be used.\n\n11.4\n\nClarify that programs may invoke either '/usr/bin/editor' and\n'/usr/bin/pager' directly, or use 'editor' and 'pager' and rely on\nPATH.\n\n12.5\n\nThe Creative Commons CC0 1.0 Universal license (CC0-1.0) is now\nincluded in '/usr/share/common-licenses' and does not need to be\ncopied verbatim in the package 'copyright' file.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 4 1 2,  Next: Version 4 1 1,  Prev: Version 4 1 3,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.13 Version 4.1.2",
                    "content": "Released November, 2017.\n\n3.1.1\n\nBinary packages that have potentially offensive content should have\nthe suffix '-offensive'.  This replaces an older convention to use\n'-off'.  As before, whether the contents of a package needs this\ncontent warning is a matter of maintainer discretion.\n\n10.2\n\nPrivate shared object files should be installed in subdirectories\nof '/usr/lib' or '/usr/lib/triplet'.  This change permits private\nshared object files to take advantage of multiarch, and also\nremoves the implication that it is permissible to install private\nshared object files directly into '/usr/lib/triplet'.\n\n10.4\n\nThe shebang at the top of Perl command scripts must be\n'#!/usr/bin/perl'.  (Previously, this was a 'should' rather than a\n'must'.)\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 4 1 1,  Next: Version 4 1 0,  Prev: Version 4 1 2,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.14 Version 4.1.1",
                    "content": "Released September, 2017.\n\n4.4\n\ndebian/changelog must exist in source packages.\n\n9.2.3\n\nThe canonical non-existent home directory is '/nonexistent'.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 4 1 0,  Next: Version 4 0 1,  Prev: Version 4 1 1,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.15 Version 4.1.0",
                    "content": "Released August, 2017.\n\n2.2.1\n\nNon-default alternative dependencies on non-free packages are\npermitted for packages in main.\n\n4.11\n\nIf upstream provides OpenPGP signatures, including the upstream\nsigning key as 'debian/upstream/signing-key.asc' in the source\npackage and using the 'pgpsigurlmangle' option in 'debian/watch'\nconfiguration to indicate how to find the upstream signature for\nnew releases is recommended.\n\n4.15\n\nPackages should build reproducibly when certain factors are held\nconstant; see 4.15 for the list.\n\n4.15\n\nPackages are recommended to build reproducibly even when build\npaths and most environment variables are allowed to vary.\n\n9.1.1\n\nOnly the dynamic linker may install files to '/lib64/'.\n\nNo package for a 64 bit architecture may install files to\n'/usr/lib64/' or any subdirectory.\n\n11.8.3\n\nThe required behaviour of 'x-terminal-emulator -e' has been\nclarified, and updated to replace a false claim about the behaviour\nof 'xterm'.\n\nPrograms must support '-e command' where 'command' may include\nmultiple arguments, which must be executed as if the arguments were\npassed to 'execvp' directly, bypassing the shell.\n\nIf this execution fails and '-e' has a single argument, 'xterm''s\nfallback behaviour of passing 'command' to the shell is permitted\nbut not required.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 4 0 1,  Next: Version 4 0 0,  Prev: Version 4 1 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.16 Version 4.0.1",
                    "content": "Released August, 2017.\n\n2.5\n\nPriorities are now used only for controlling which packages are\npart of a minimal or standard Debian installation and should be\nselected based on functionality provided directly to users (so\nnearly all shared libraries should have a priority of 'optional').\nPackages may now depend on packages with a lower priority.\n\nThe 'extra' priority has been deprecated and should be treated as\nequivalent to 'optional'.  All 'extra' priorities should be changed\nto 'optional'.  Packages with a priority of 'optional' may conflict\nwith each other (but packages that both have a priority of\n'standard' or higher still may not conflict).\n\n5.6.30\n\nNew section documenting the 'Testsuite' field in Debian source\ncontrol files.\n\n8.1.1\n\nShared libraries must now invoke 'ldconfig' by means of triggers,\ninstead of maintscripts.\n\n9.3.3\n\nPackages are recommended to use debhelper tools instead of invoking\n'update-rc.d' and 'invoke-rc.d' directly.\n\n9.3.3\n\nPolicy's description of how the local system administrator may\nmodify the runlevels at which a daemon is started and stopped, and\nhow init scripts may depend on other init scripts, have been\nremoved.  These are now handled by LSB headers.\n\n9.4\n\nPolicy's specification of the console messages that should be\nemitted by 'init.d' scripts has been removed.  This is now defined\nby LSB, for sysvinit, and is not expected to be followed by other\ninit systems.\n\n9.6\n\nPackages installing a Free Desktop entry must not also install a\nDebian menu system entry.\n\n9.9\n\nThe prohibition against depending on environment variables for\nreasonable defaults is only for programs on the system PATH and\nonly for custom environment variable settings (not, say, a sane\nPATH).\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 4 0 0,  Next: Version 3 9 8,  Prev: Version 4 0 1,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.17 Version 4.0.0",
                    "content": "Released May, 2017.\n\n4.3\n\n'config.sub' and 'config.guess' should be updated at build time or\nreplaced with the versions from autotools-dev.\n\n4.9\n\nNew 'TARGET' set of 'dpkg-architecture' variables and new\n'DEB*ARCHBITS' and 'DEB*ARCHENDIAN' variables.\n\n4.9.1\n\nNew 'DEBBUILDOPTIONS' tag, 'nodoc', which says to suppress\ndocumentation generation (but continue to build all binary\npackages, even documentation packages, just let them be mostly\nempty).\n\n5.2\n\nAutomatically-generated debug packages do not need to have a\ncorresponding paragraph in 'debian/control'.  (This is existing\npractice; this Policy update is just clearer about it.)\n\n5.6.12\n\nColons are not permitted in upstream version numbers.\n\n7.7\n\nNew 'Build-Depends-Arch' and 'Build-Conflicts-Arch' fields are now\nsupported.\n\n8.4\n\nThe recommended package name for shared library development files\nis now libraryname-dev or librarynameapiversion-dev, not\nlibrarynamesoversion-dev.\n\n9.1.1\n\nThe stable release of Debian supports '/run', so packages may now\nassume that it exists and do not need any special dependency on a\nversion of initscripts.\n\n9.3.2\n\nNew optional 'try-restart' standard init script argument, which (if\nsupported) should restart the service if it is already running and\notherwise just report success.\n\n9.3.2\n\nSupport for the 'status' init script argument is recommended.\n\n9.3.3.2\n\nPackages must not call '/etc/init.d' scripts directly even as a\nfallback, and instead must always use 'invoke-rc.d' (which is\nessential and shouldn't require any conditional).\n\n9.11.1\n\nInstructions for 'upstart' integration removed since 'upstart' is\nno longer maintained in Debian.\n\n10.1\n\nPackages may not install files in both '/path' and '/usr/path', and\nmust manage any backward-compatibility symlinks so that they don't\nbreak if '/path' and '/usr/path' are the same directory.\n\n10.6\n\nPackages should assume device files in '/dev' are dynamically\nmanaged and don't have to be created by the package.  Packages\nother than those whose purpose is to manage '/dev' must not create\nor remove files there when a dynamic management facility is in use.\nNamed pipes and device files outside of '/dev' should normally be\ncreated on demand via init scripts, systemd units, or similar\nmechanisms, but may be created and removed in maintainer scripts if\nthey must be created during package installation.\n\n10.9\n\nChecking with the base-passwd maintainer is no longer required (or\ndesirable) when creating a new dynamic user or group in a package.\n\n12.3\n\nDependencies on *-doc packages should be at most Recommends\n(Suggests if they only include documentation in supplemental\nformats).\n\n12.5\n\nThe Mozilla Public License 1.1 and 2.0 (MPL-1.1 and MPL-2.0) are\nnow included in '/usr/share/common-licenses' and do not need to be\ncopied verbatim in the package 'copyright' file.\n\ncopyright-format\n\nThe 'https' form of the copyright-format URL is now allowed and\npreferred in the 'Format' field.\n\nperl\n\nThe Perl search path now includes multiarch directories.  The\nvendor directory for architecture-specific modules is now versioned\nto support multiarch.\n\nvirtual\n\nNew 'adventure' virtual package for implementations of the classic\nColossal Cave Adventure game.\n\nvirtual\n\nNew 'httpd-wsgi3' virtual package for Python 3 WSGI-capable HTTP\nservers.  The existing 'httpd-wsgi' virtual package is for Python 2\nWSGI-capable HTTP servers.\n\nvirtual\n\nNew 'virtual-mysql-client', 'virtual-mysql-client-core',\n'virtual-mysql-server', 'virtual-mysql-server-core', and\n'virtual-mysql-testsuite' virtual packages for MySQL-compatible\nsoftware.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 9 8,  Next: Version 3 9 7,  Prev: Version 4 0 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.18 Version 3.9.8",
                    "content": "Released April, 2016.\n\n9.6\n\nThe menu system is deprecated in favor of the FreeDesktop menu\nstandard.  New requirements set for FreeDesktop menu entries.\n\n9.7\n\nNew instructions for registering media type handlers with the\nFreeDesktop system, which automatically synchronizes with mailcap\nand therefore replaces mailcap registration for packages using\ndesktop entries.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 9 7,  Next: Version 3 9 6,  Prev: Version 3 9 8,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.19 Version 3.9.7",
                    "content": "Released February, 2016.\n\n10.5\n\nSymbolic links must not traverse above the root directory.\n\n9.2.2\n\n32bit UIDs in the range 65536-4294967293 are reserved for\ndynamically allocated user accounts.\n\n5.1\n\nEmpty field values in control files are only permitted in the\n'debian/control' file of a source package.\n\n4.9\n\n'debian/rules': required targets must not attempt network access.\n\n12.3\n\nrecommend to ship additional documentation for package 'pkg' in a\nseparate package 'pkg-doc' and install it into\n'/usr/share/doc/pkg'.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 9 6,  Next: Version 3 9 5,  Prev: Version 3 9 7,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.20 Version 3.9.6",
                    "content": "Released September, 2014.\n\n9.1\n\nThe FHS is relaxed to allow a subdirectory of '/usr/lib' to hold a\nmixture of architecture-independent and architecture-dependent\nfiles, though directories entirely composed of\narchitecture-independent files should be located in '/usr/share'.\n\n9.1\n\nThe FHS requirement for '/usr/local/lib64' to exist if '/lib64' or\n'/usr/lib64' exists is removed.\n\n9.1\n\nAn FHS exception has been granted for multiarch include files,\npermitting header files to instead be installed to\n'/usr/include/triplet'.\n\n10.1\n\nBinaries must not be statically linked with the GNU C library, see\npolicy for exceptions.\n\n4.4\n\nIt is clarified that signature appearing in debian/changelog should\nbe the details of the person who prepared this release of the\npackage.\n\n11.5\n\nThe default web document root is now '/var/www/html'\n\nvirtual\n\n'java1-runtime' and 'java2-runtime' are removed, 'javaN-runtime'\nand 'javaN-runtime-headless' are added for all N between 5 and 9.\n\nvirtual\n\nAdded 'httpd-wsgi' for WSGI capable HTTP servers.\n\nperl\n\nPerl packages should use the '%Config' hash to locate module paths\ninstead of hardcoding paths in '@INC'.\n\nperl\n\nPerl binary modules and any modules installed into\n'$Config{vendorarch}' must depend on the relevant perlapi-*\npackage.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 9 5,  Next: Version 3 9 4,  Prev: Version 3 9 6,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.21 Version 3.9.5",
                    "content": "Released October, 2013.\n\n5.1\n\nControl data fields must not start with the hyphen character ('-'),\nto avoid potential confusions when parsing clearsigned control data\nfiles that were not properly unescaped.\n\n5.4, 5.6.24\n\n'Checksums-Sha1' and 'Checksums-Sha256' are now mandatory in '.dsc'\nfiles.\n\n5.6.25, 5.8.1\n\nThe 'DM-Upload-Allowed' field is obsolete.  Permissions are now\ngranted via `dak-commands' files.\n\n5.6.27\n\nNew section documenting the 'Package-List' field in Debian source\ncontrol files.\n\n5.6.28\n\nNew section documenting the 'Package-Type' field in source package\ncontrol files.\n\n5.6.29\n\nNew section documenting the 'Dgit' field in Debian source control\nfiles.\n\n9.1.1.8\n\nThe exception to the FHS for the '/selinux' was removed.\n\n10.7.3\n\nPackages should remove all obsolete configuration files without\nlocal changes during upgrades.  The 'dpkg-maintscript-helper' tool,\navailable from the dpkg package since `Wheezy', can help with this.\n\n10.10\n\nThe name of the files and directories installed by binary packages\nmust be encoded in UTF-8 and should be restricted to ASCII when\npossible.  In the system PATH, they must be restricted to ASCII.\n\n11.5.2\n\nStop recommending to serve HTML documents from\n'/usr/share/doc/package'.\n\n12.2\n\nPackages distributing Info documents should use install-info's\ntrigger, and do not need anymore to depend on 'dpkg (>= 1.15.4) |\ninstall-info'.\n\ndebconf\n\nThe 'escape' capability is now documented.\n\nvirtual\n\n'mp3-decoder' and 'mp3-encoder' are removed.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 9 4,  Next: Version 3 9 3,  Prev: Version 3 9 5,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.22 Version 3.9.4",
                    "content": "Released August, 2012.\n\n2.4\n\nNew `tasks' archive section.\n\n4.9\n\n'build-arch' and 'build-indep' are now mandatory targets in\n'debian/rules'.\n\n5.6.26\n\nNew section documenting the 'Vcs-*' fields, which are already in\nwidespread use.  Note the mechanism for specifying the Git branch\nused for packaging in the Vcs-Git field.\n\n7.1\n\nThe deprecated relations < and > now must not be used.\n\n7.8\n\nNew 'Built-Using' field, which must be used to document the source\npackages for any binaries that are incorporated into this package\nat build time.  This is used to ensure that the archive meets\nlicense requirements for providing source for all binaries.\n\n8.6\n\nPolicy for dependencies between shared libraries and other packages\nhas been largely rewritten to document the 'symbols' system and\nmore clearly document handling of shared library ABI changes.\n'symbols' files are now recommended over 'shlibs' files in most\nsituations.  All maintainers of shared library packages should\nreview the entirety of this section.\n\n9.1.1\n\nPackages must not assume the '/run' directory exists or is usable\nwithout a dependency on 'initscripts (>= 2.88dsf-13.3)' until the\nstable release of Debian supports '/run'.\n\n9.7\n\nPackages including MIME configuration can now rely on triggers and\ndo not need to call update-mime.\n\n9.11\n\nNew section documenting general requirements for alternate init\nsystems and specific requirements for integrating with upstart.\n\n12.5\n\nAll copyright files must be encoded in UTF-8.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 9 3,  Next: Version 3 9 2,  Prev: Version 3 9 4,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.23 Version 3.9.3",
                    "content": "Released February, 2012.\n\n2.4\n\nNew archive sections `education', `introspection', and\n`metapackages' added.\n\n5.6.8\n\nThe 'Architecture' field in '*.dsc' files may now contain the value\n'any all' for source packages building both\narchitecture-independent and architecture-dependent packages.\n\n7.1\n\nIf a dependency is restricted to particular architectures, the list\nof architectures must be non-empty.\n\n9.1.1\n\n'/run' is allowed as an exception to the FHS and replaces\n'/var/run'.  '/run/lock' replaces '/var/lock'.  The FHS\nrequirements for the older directories apply to these directories\nas well.  Backward compatibility links will be maintained and\npackages need not switch to referencing '/run' directly yet.  Files\nin '/run' should be stored in a temporary file system.\n\n9.1.4\n\nNew section spelling out the requirements for packages that use\nfiles in '/run', '/var/run', or '/var/lock'.  This generalizes\ninformation previously only in 9.3.2.\n\n9.5\n\nCron job file names must not contain '.' or '+' or they will be\nignored by cron.  They should replace those characters with ''.\nIf a package provides multiple cron job files in the same\ndirectory, they should each start with the package name (possibly\nmodified as above), '-', and then some suitable suffix.\n\n9.10\n\nPackages using doc-base do not need to call install-docs anymore.\n\n10.7.4\n\nPackages that declare the same 'conffile' may see left-over\nconfiguration files from each other even if they conflict.\n\n11.8\n\nThe Policy rules around Motif libraries were just a special case of\nnormal rules for non-free dependencies and were largely obsolete,\nso they have been removed.\n\n12.5\n\n'debian/copyright' is no longer required to list the Debian\nmaintainers involved in the creation of the package (although note\nthat the requirement to list copyright information is unchanged).\n\ncopyright-format\n\nVersion 1.0 of the \"Machine-readable 'debian/copyright' file\"\nspecification is included.\n\nmime\n\nThis separate document has been retired and and its (short)\ncontents merged into Policy section 9.7.  There are no changes to\nthe requirements.\n\nperl\n\nPackages may declare an interest in the perl-major-upgrade trigger\nto be notified of major upgrades of perl.\n\nvirtual\n\n'ttf-japanese-{mincho, gothic}' is renamed to\n'fonts-japanese-{mincho, gothic}'.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 9 2,  Next: Version 3 9 1,  Prev: Version 3 9 3,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.24 Version 3.9.2",
                    "content": "Released April, 2011.\n\n*\n\nMultiple clarifications throughout Policy where \"installed\" was\nused and the more precise terms \"unpacked\" or \"configured\" were\nintended.\n\n3.3\n\nThe maintainer address must accept mail from Debian role accounts\nand the BTS. At least one human must be listed with their personal\nemail address in 'Uploaders' if the maintainer is a shared email\naddress.  The duties of a maintainer are also clearer.\n\n5\n\nAll control fields are now classified as simple, folded, or\nmultiline, which governs whether their values must be a single line\nor may be continued across multiple lines and whether line breaks\nare significant.\n\n5.1\n\nParsers are allowed to accept paragraph separation lines containing\nwhitespace, but control files should use completely empty lines.\nOrdering of paragraphs is significant.  Field names must be\ncomposed of printable ASCII characters except colon and must not\nbegin with #.\n\n5.6.25\n\nThe 'DM-Upload-Allowed' field is now documented.\n\n6.5\n\nThe system state maintainer scripts can rely upon during each\npossible invocation is now documented.  In several less-common\ncases, this is stricter than Policy had previously documented.\nPackages with complex maintainer scripts should be reviewed in\nlight of this new documentation.\n\n7.2\n\nThe impact on system state when maintainer scripts that are part of\na circular dependency are run is now documented.  Circular\ndependencies are now a should not.\n\n7.2\n\nThe system state when 'postinst' and 'prerm' scripts are run is now\ndocumented, and the documentation of the special case of dependency\nstate for 'postrm' scripts has been improved.  'postrm' scripts are\nrequired to gracefully skip actions if their dependencies are not\navailable.\n\n9.1.1\n\nGNU/Hurd systems are allowed '/hurd' and '/servers' directories in\nthe root filesystem.\n\n9.1.1\n\nPackages installing to architecture-specific subdirectories of\n'/usr/lib' must use the value returned by 'dpkg-architecture\n-qDEBHOSTMULTIARCH', not by 'dpkg-architecture\n-qDEBHOSTGNUTYPE'; this is a path change on i386 architectures\nand a no-op for other architectures.\n\nvirtual\n\n'mailx' is now a virtual package provided by packages that install\n'/usr/bin/mailx' and implement at least the POSIX-required\ninterface.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 9 1,  Next: Version 3 9 0,  Prev: Version 3 9 2,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.25 Version 3.9.1",
                    "content": "Released July, 2010.\n\n3.2.1\n\nDate-based version components should be given as the four-digit\nyear, two-digit month, and then two-digit day, but may have\nembedded punctuation.\n\n3.9\n\nMaintainer scripts must pass '--package' to 'dpkg-divert' when\ncreating or removing diversions and must not use '--local'.\n\n4.10\n\nOnly 'dpkg-gencontrol' supports variable substitution.\n'dpkg-genchanges' (for '*.changes') and 'dpkg-source' (for '*.dsc')\ndo not.\n\n7.1\n\nArchitecture restrictions and wildcards are also allowed in binary\npackage relationships provided that the binary package is not\narchitecture-independent.\n\n7.4\n\n'Conflicts' and 'Breaks' should only be used when there are file\nconflicts or one package breaks the other, not just because two\npackages provide similar functionality but don't interfere.\n\n8.1\n\nThe SONAME of a library should change whenever the ABI of the\nlibrary changes in a way that isn't backward-compatible.  It should\nnot change if the library ABI changes are backward-compatible.\nDiscourage bundling shared libraries together in one package.\n\n8.4\n\nAda Library Information ('*.ali') files must be installed\nread-only.\n\n8.6.1, 8.6.2, 8.6.5\n\nPackages should normally not include a 'shlibs.local' file since we\nnow have complete 'shlibs' coverage.\n\n8.6.3\n\nThe SONAME of a library may instead be of the form\n'name-major-version.so'.\n\n10.2\n\nLibtool '.la' files should not be installed for public libraries.\nIf they're required (for 'libltdl', for instance), the\n'dependencylibs' setting should be emptied.  Library packages\nhistorically including '.la' files must continue to include them\n(with 'dependencylibs' emptied) until all libraries that depend on\nthat library have removed or emptied their '.la' files.\n\n10.2\n\nLibraries no longer need to be built with '-DREENTRANT', which was\nan obsolete LinuxThreads requirement.  Instead, say explicitly that\nlibraries should be built with threading support and to be\nthread-safe if the library supports this.\n\n10.4\n\n'/bin/sh' scripts may assume that 'kill' supports an argument of\n'-signal', that 'kill' and 'trap' support the numeric signals\nlisted in the XSI extension, and that signal 13 (SIGPIPE) can be\ntrapped with 'trap'.\n\n10.8\n\nUse of '/etc/logrotate.d/package' for logrotate rules is now\nrecommended.\n\n10.9\n\nControl information files should be owned by 'root:root' and either\nmode 644 or mode 755.\n\n11.4, 11.8.3, 11.8.4\n\nPackages providing alternatives for 'editor', 'pager',\n'x-terminal-emulator', or 'x-window-manager' should also provide a\nslave alternative for the corresponding manual page.\n\n11.5\n\nCgi-bin executable files may be installed in subdirectories of\n'/usr/lib/cgi-bin' and web servers should serve out executables in\nthose subdirectories.\n\n12.5\n\nThe GPL version 1 is now included in common-licenses and should be\nreferenced from there instead of included in the 'copyright' file.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 9 0,  Next: Version 3 8 4,  Prev: Version 3 9 1,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.26 Version 3.9.0",
                    "content": "Released June, 2010.\n\n4.4, 5.6.15\n\nThe required format for the date in a changelog entry and in the\nDate control field is now precisely specified.\n\n5.1\n\nA control paragraph must not contain more than one instance of a\nparticular field name.\n\n5.4, 5.5, 5.6.24\n\nThe 'Checksums-Sha1' and 'Checksums-Sha256' fields in '*.dsc' and\n'*.changes' files are now documented and recommended.\n\n5.5, 5.6.16\n\nThe 'Format' field of '.changes' files is now 1.8.  The 'Format'\nfield syntax for source package '.dsc' files allows a subtype in\nparentheses, and it is used for a different purpose than the\n'Format' field for '.changes' files.\n\n5.6.2\n\nThe syntax of the 'Maintainer' field is now must rather than\nshould.\n\n5.6.3\n\nThe comma separating entries in 'Uploaders' is now must rather than\nshould.\n\n5.6.8, 7.1, 11.1.1\n\nArchitecture wildcards may be used in addition to specific\narchitectures in 'debian/control' and '*.dsc' Architecture fields,\nand in architecture restrictions in build relationships.\n\n6.3\n\nMaintainer scripts are no longer guaranteed to run with a\ncontrolling terminal and must be able to fall back to\nnoninteractive behavior (debconf handles this).  Maintainer scripts\nmay abort if there is no controlling terminal and no reasonable\ndefault for a high-priority question, but should avoid this if\npossible.\n\n7.3, 7.6.1\n\n'Breaks' should be used with 'Replaces' for moving files between\npackages.\n\n7.4\n\n'Breaks' should normally be used instead of 'Conflicts' for\ntransient issues and moving files between packages.  New\ndocumentation of when each should be used.\n\n7.5\n\nUse 'Conflicts' with 'Provides' if only one provider of a virtual\nfacility can be installed at a time.\n\n8.4\n\nAll shared library development files are no longer required to be\nin the '-dev' package, only be available when the '-dev' package is\ninstalled.  This allows the '-dev' package to be split as long as\nit depends on the additional packages.\n\n9.2.2\n\nThe UID range of user accounts is extended to 1000-59999.\n\n9.3.2, 10.4\n\n'init.d' scripts are a possible exception from the normal\nrequirement to use 'set -e' in each shell script.\n\n12.5\n\nThe UCB BSD license was removed from the list of licenses that\nshould be referenced from '/usr/share/common-licenses/BSD'.  It\nshould instead be included directly in 'debian/copyright', although\nit will still be in common-licenses for the time being.\n\ndebconf\n\n'SETTITLE' is now documented (it has been supported for some time).\n'SETTITLE' is like 'TITLE' but takes a template instead of a string\nto allow translation.\n\nperl\n\nperl-base now provides perlapi-abiname instead of a package based\nsolely on the Perl version.  Perl packages must now depend on\nperlapi-$Config{debianabi}, falling back on '$Config{version}' if\n'$Config{debianabi}' is not set.\n\nperl\n\nPackages using 'Makefile.PL' should use 'DESTDIR' rather than\n'PREFIX' to install into the package staging area.  'PREFIX' only\nworked due to a Debian-local patch.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 8 4,  Next: Version 3 8 3,  Prev: Version 3 9 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.27 Version 3.8.4",
                    "content": "Released January, 2010.\n\n9.1.1\n\nAn FHS exception has been granted for multiarch libraries.\nPermitting files to instead be installed to '/lib/triplet' and\n'/usr/lib/triplet' directories.\n\n10.6\n\nPackages may not contain named pipes and should instead create them\nin postinst and remove them in prerm or postrm.\n\n9.1.1\n\n'/sys' and '/selinux' directories are explicitly allowed as an\nexception to the FHS.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 8 3,  Next: Version 3 8 2,  Prev: Version 3 8 4,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.28 Version 3.8.3",
                    "content": "Released August, 2009.\n\n4.9\n\nDEB*ARCHCPU and DEB*ARCHOS variables are now documented and\nrecommended over GNU-style variables for that information.\n\n5.6.8\n\nSource package Architecture fields may contain `all' in combination\nwith other architectures.  Clarify when `all' and `any' may be used\nin different versions of the field.\n\n5.6.14\n\nThe Debian archive software does not support uploading to multiple\ndistributions with one '*.changes' file.\n\n5.6.19\n\nThe Binary field may span multiple lines.\n\n10.2\n\nShared library packages are no longer allowed to install libraries\nin a non-standard location and modify 'ld.so.conf'.  Packages\nshould either be installed in a standard library directory or\npackages using them should be built with RPATH.\n\n11.8.7\n\nInstallation directories for X programs have been clarified.\nPackages are no longer required to pre-depend on x11-common before\ninstalling into '/usr/include/X11' and '/usr/lib/X11'.\n\n12.1\n\nManual pages are no longer required to contain only characters\nrepresentable in the legacy encoding for that language.\n\n12.1\n\nLocalized man pages should either be kept up-to-date with the\noriginal version or warn that they're not up-to-date, either with\nwarning text or by showing missing or changed portions in the\noriginal language.\n\n12.2\n\ninstall-info is now handled via triggers so packages no longer need\nto invoke it in maintainer scripts.  Info documents should now have\ndirectory sections and entries in the document.  Packages\ncontaining info documents should add a dependency to support\npartial upgrades.\n\nperl\n\nThe requirement for Perl modules to have a versioned Depend and\nBuild-Depend on 'perl >= 5.6.0-16' has been removed.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 8 2,  Next: Version 3 8 1,  Prev: Version 3 8 3,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.29 Version 3.8.2",
                    "content": "Released June, 2009.\n\n2.4\n\nThe list of archive sections has been significantly expanded.  See\nthis debian-devel-announce message(1) for the list of new sections\nand rules for how to categorize packages.\n\n3.9.1\n\nAll packages must use debconf or equivalent for user prompting,\nthough essential packages or their dependencies may also fall back\non other methods.\n\n5.6.1\n\nThe requirements for source package names are now explicitly\nspelled out.\n\n9.1\n\nLegacy XFree86 servers no longer get a special exception from the\nFHS permitting '/etc/X11/XF86Config-4'.\n\n9.1.3\n\nRemoved obsolete dependency requirements for packages that use\n'/var/mail'.\n\n11.8.5\n\nSpeedo fonts are now deprecated.  The X backend was disabled\nstarting in lenny.\n\n12.5\n\nThe GNU Free Documentation License version 1.3 is included in\ncommon-licenses and should be referenced from there.\n\n---------- Footnotes ----------\n\n(1)\nhttp://lists.debian.org/debian-devel-announce/2009/03/msg00010.html\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 8 1,  Next: Version 3 8 0,  Prev: Version 3 8 2,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.30 Version 3.8.1",
                    "content": "Released March, 2009.\n\n3.8\n\nCare should be taken when adding functionality to essential and\nsuch additions create an obligation to support that functionality\nin essential forever unless significant work is done.\n\n4.4\n\nChangelog files must be encoded in UTF-8.\n\n4.4\n\nSome format requirements for changelog files are now \"must\" instead\nof \"should.\"\n\n4.4.1\n\nAlternative changelog formats have been removed.  Debian only\nsupports one changelog format for the Debian Archive.\n\n4.9.1\n\nNew nocheck option for DEBBUILDOPTIONS indicating any build-time\ntest suite provided by the package should not be run.\n\n5.1\n\nAll control files must be encoded in UTF-8.\n\n5.2\n\n'debian/control' allows comment lines starting with # with no\npreceding whitespace.\n\n9.3\n\nInit scripts ending in .sh are not handled specially.  They are not\nsourced and are not guaranteed to be run by '/bin/sh' regardless of\nthe #!  line.  This brings Policy in line with the long-standing\nbehavior of the init system in Debian.\n\n9.3.2\n\nThe start action of an init script must exit successfully and not\nstart the daemon again if it's already running.\n\n9.3.2\n\n'/var/run' and '/var/lock' may be mounted as temporary filesystems,\nand init scripts must therefore create any necessary subdirectories\ndynamically.\n\n10.4\n\n'/bin/sh' scripts may assume that local can take multiple variable\narguments and supports assignment.\n\n11.6\n\nUser mailboxes may be mode 600 and owned by the user rather than\nmode 660, owned by user, and group mail.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 8 0,  Next: Version 3 7 3,  Prev: Version 3 8 1,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.31 Version 3.8.0",
                    "content": "Released June, 2008.\n\n2.4, 3.7\n\nThe base section has been removed.  contrib and non-free have been\nremoved from the section list; they are only categories.  The base\nsystem is now defined by priority.\n\n4.9\n\nIf 'dpkg-source -x' doesn't provide the source that will be\ncompiled, a debian/rules patch target is recommended and should do\nwhatever else is necessary.\n\n4.9.1, 10.1\n\nStandardized the format of DEBBUILDOPTIONS. Specified permitted\ncharacters for tags, required that tags be whitespace-separated,\nallowed packages to assume non-conflicting tags, and required\nunknown flags be ignored.\n\n4.9.1\n\nAdded parallel=n to the standardized DEBBUILDOPTIONS tags,\nindicating that a package should be built using up to n parallel\nprocesses if the package supports it\n\n4.13\n\nDebian packages should not use convenience copies of code from\nother packages unless the included package is explicitly intended\nto be used that way.\n\n4.14\n\nIf dpkg-source -x doesn't produce source ready for editing and\nbuilding with dpkg-buildpackage, packages should include a\n'debian/README.source' file explaining how to generate the patched\nsource, add a new modification, and remove an existing\nmodification.  This file may also be used to document packaging a\nnew upstream release and any other complexity of the Debian build\nprocess.\n\n5.6.3\n\nThe Uploaders field in debian/control may be wrapped.\n\n5.6.12\n\nAn empty Debian revision is equivalent to a Debian revision of 0 in\na version number.\n\n5.6.23\n\nNew Homepage field for upstream web sites.\n\n6.5, 6.6, 7\n\nThe Breaks field declares that this package breaks another and\nprevents installation of the breaking package unless the package\nnamed in Breaks is deconfigured first.  This field should not be\nused until the dpkg in Debian stable supports it.\n\n8.1, 8.2\n\nClarify which files should go into a shared library package, into a\nseparate package, or into the -dev package.  Suggest -tools instead\nof -runtime for runtime support programs, since that naming is more\ncommon in Debian.\n\n9.5\n\nFiles in '/etc/cron.{hourly,daily,weekly,monthly}' must be\nconfiguration files (upgraded from should).  Mention the hourly\ndirectory.\n\n11.8.6\n\nPackages providing '/etc/X11/Xresources' files need not conflict\nwith 'xbase (<< 3.3.2.3a-2)', which is long-obsolete.\n\n12.1\n\nManual pages in locale-specific directories should use either the\nlegacy encoding for that directory or UTF-8.  Country names should\nnot be included in locale-specific manual page directories unless\nindicating a significant difference in the language.  All\ncharacters in the manual page source should be representable in the\nlegacy encoding for a locale even if the man page is encoded in\nUTF-8.\n\n12.5\n\nThe Apache 2.0 license is now in common-licenses and should be\nreferenced rather than quoted in 'debian/copyright'.\n\n12.5\n\nPackages in contrib and non-free should state in the copyright file\nthat the package is not part of Debian GNU/Linux and briefly\nexplain why.\n\ndebconf\n\nUnderscore ('') is allowed in debconf template names.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 7 3,  Next: Version 3 7 2 2,  Prev: Version 3 8 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.32 Version 3.7.3",
                    "content": "Released December, 2007.\n\n5.6.12\n\nPackage version numbers may contain tildes, which sort before\nanything, even the end of a part.\n\n10.4\n\nScripts may assume that '/bin/sh' supports local (at a basic level)\nand that its test builtin (if any) supports -a and -o binary\nlogical operators.\n\n8.5\n\nThe substitution variable ${binary:Version} should be used in place\nof ${Source-Version} for dependencies between packages of the same\nlibrary.\n\nmenu policy\n\nSubstantial reorganization and renaming of sections in the Debian\nmenu structure.  Packages with menu entries should be reviewed to\nsee if the menu section has been renamed or if one of the new\nsections would be more appropriate.\n\n5.6.1\n\nThe Source field in a .changes file may contain a version number in\nparentheses.\n\n5.6.17\n\nThe acceptable values for the Urgency field are low, medium, high,\ncritical, or emergency.\n\n8.6\n\nThe shlibs file now allows an optional type field, indicating the\ntype of package for which the line is valid.  The only currently\nsupported type is udeb, used with packages for the Debian\nInstaller.\n\n3.9.1\n\nPackages following the Debian Configuration management\nspecification must allow for translation of their messages by using\na gettext-based system such as po-debconf.\n\n12.5\n\nGFDL 1.2, GPL 3, and LGPL 3 are now in common-licenses and should\nbe referenced rather than quoted in debian/copyright.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 7 2 2,  Next: Version 3 7 2,  Prev: Version 3 7 3,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.33 Version 3.7.2.2",
                    "content": "Released October, 2006.\n"
                }
            ]
        },
        "This release broke the normal rule against introducing normative changes": {
            "content": "without changing the major patch level.\n\n9.3.2\n\nDaemon startup scripts in '/etc/init.d/' should not contain\nmodifiable parameters; these should be moved to a file in\n'/etc/default/'\n\n12.3\n\nFiles in '/usr/share/doc' must not be referenced by any program.\nIf such files are needed, they must be placed in\n'/usr/share/<package>/', and symbolic links created as required in\n'/usr/share/doc/<package>/'\n\nMuch of the packaging manual has now been imported into the policy\ndocument\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Version 3 7 2,  Next: Version 3 7 1,  Prev: Version 3 7 2 2,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.34 Version 3.7.2",
                    "content": "Released April, 2006.\n\n11.5\n\nRevert the cgi-lib change.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 7 1,  Next: Version 3 7 0,  Prev: Version 3 7 2,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.35 Version 3.7.1",
                    "content": "Released April, 2006.\n\n10.2\n\nIt is now possible to create shared libraries without relocatable\ncode (using -fPIC) in certain exceptional cases, provided some\nprocedures are followed, and for creating static libraries with\nrelocatable code (again, using -fPIC). Discussion on\n<debian-devel@lists.debian.org>, getting a rough consensus, and\ndocumenting it in README.Debian constitute most of the process.\n\n11.8.7\n\nPackages should install any relevant files into the directories\n'/usr/include/X11/' and '/usr/lib/X11/', but if they do so, they\nmust pre-depend on 'x11-common (>= 1:7.0.0)'\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 7 0,  Next: Version 3 6 2,  Prev: Version 3 7 1,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.36 Version 3.7.0",
                    "content": "Released April, 2006.\n\n11.5\n\nPackages shipping web server CGI files are expected to install them\nin '/usr/lib/cgi-lib/' directories.  This location change perhaps\nshould be documented in NEWS\n\n11.5\n\nWeb server packages should include a standard scriptAlias of\ncgi-lib to '/usr/lib/cgi-lib'.\n\n9.1.1\n\nThe version of FHS mandated by policy has been upped to 2.3.  There\nshould be no changes required for most packages, though new top\nlevel directories '/media', '/srv', etc.  may be of interest.\n\n5.1, 5.6.3\n\nAll fields, apart from the Uploaders field, in the control file are\nsupposed to be a single logical line, which may be spread over\nmultiple physical lines (newline followed by space is elided).\nHowever, any parser for the control file must allow the Uploaders\nfield to be spread over multiple physical lines as well, to prepare\nfor future changes.\n\n10.4\n\nWhen scripts are installed into a directory in the system PATH, the\nscript name should not include an extension that denotes the\nscripting language currently used to implement it.\n\n9.3.3.2\n\npackages that invoke initscripts now must use invoke-rc.d to do so\nsince it also pays attention to run levels and other local\nconstraints.\n\n11.8.5.2, 11.8.7, etc\n\nWe no longer use '/usr/X11R6', since we have migrated away to using\nXorg paths.  This means, for one thing, fonts live in\n'/usr/share/fonts/X11/' now, and '/usr/X11R6' is gone.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 6 2,  Next: Version 3 6 1,  Prev: Version 3 7 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.37 Version 3.6.2",
                    "content": "Released June, 2005.\n\nRecommend doc-base, and not menu, for registering package\ndocumentation.\n\n8.1\n\nRun time support programs should live in subdirectories of\n'/usr/lib/' or '/usr/share', and preferably the shared lib is named\nthe same as the package name (to avoid name collisions).\n\n11.5\n\nIt is recommended that HTTP servers provide an alias /images to\nallow packages to share image files with the web server\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 6 1,  Next: Version 3 6 0,  Prev: Version 3 6 2,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.38 Version 3.6.1",
                    "content": "Released August, 2003.\n\n3.10.1\n\nPrompting the user should be done using debconf.  Non debconf user\nprompts are now deprecated.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 6 0,  Next: Version 3 5 10,  Prev: Version 3 6 1,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.39 Version 3.6.0",
                    "content": "Released July, 2003.\n"
                }
            ]
        },
        "Restructuring caused shifts in section numbers and bumping of the minor": {
            "content": "version number.\n",
            "subsections": []
        },
        "Many packaging manual appendices that were integrated into policy": {
            "content": "sections are now empty, and replaced with links to the Policy.  In\nparticular, the appendices that included the list of control fields were\nupdated (new fields like Closes, Changed-By were added) and the list of\nfields for each of control, .changes and .dsc files is now in Policy,\nand they're marked mandatory, recommended or optional based on the\ncurrent practice and the behavior of the deb-building tool-chain.\n",
            "subsections": []
        },
        "Elimination of needlessly deep section levels, primarily in the chapter": {
            "content": "",
            "subsections": []
        },
        "Debian Archive, from which two new chapters were split out, Binary": {
            "content": "packages and Source packages.  What remained was reordered properly,\nthat is, some sects became sects etc.\n",
            "subsections": []
        },
        "Several sections that were redundant, crufty or simply not designed with": {
            "content": "any sort of vision, were rearranged according to the formula that\neverything should be either in the same place or properly interlinked.",
            "subsections": []
        },
        "Some things remained split up between different chapters when they": {
            "content": "talked about different aspects of files: their content, their syntax,\nand their placement in the file system.  In particular, see the new\nsections about changelog files.\n\nmenu policy\n\nAdded Games/Simulation and Apps/Education to menu sub-policy\n\nC.2.2\n\nDebian changelogs should be UTF-8 encoded.\n\n10.2\n\nshared libraries must be linked against all libraries that they use\nsymbols from in the same way that binaries are.\n\n7.6\n\nbuild-depends-indep need not be satisfied during clean target.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Version 3 5 10,  Next: Version 3 5 9,  Prev: Version 3 6 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.40 Version 3.5.10",
                    "content": "Released May, 2003.\n\n11.8.3\n\npackages providing the x-terminal-emulator virtual package ought to\nensure that they interpret the command line exactly like xterm\ndoes.\n\n11.8.4\n\nWindow managers compliant with the Window Manager Specification\nProject may add 40 points for ranking in the alternatives\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 5 9,  Next: Version 3 5 8,  Prev: Version 3 5 10,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.41 Version 3.5.9",
                    "content": "Released March, 2003.\n\n3.4.2\n\nThe section describing the Description: package field once again\nhas full details of the long description format.\n\n4.2\n\nClarified that if a package has non-build-essential\nbuild-dependencies, it should have them listed in the Build-Depends\nand related fields (i.e.  it's not merely optional).\n\n9.3.2\n\nWhen asked to restart a service that isn't already running, the\ninit script should start the service.\n\n12.6\n\nIf the purpose of a package is to provide examples, then the\nexample files can be installed into '/usr/share/doc/package'\n(rather than '/usr/share/doc/package/examples').\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 5 8,  Next: Version 3 5 7,  Prev: Version 3 5 9,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.42 Version 3.5.8",
                    "content": "Released November, 2002.\n\n12.7\n\nIt is no longer necessary to keep a log of changes to the upstream\nsources in the copyright file.  Instead, all such changes should be\ndocumented in the changelog file.\n\n7.6\n\nBuild-Depends, Build-Conflicts, Build-Depends-Indep, and\nBuild-Conflicts-Indep must also be satisfied when the clean target\nis called.\n\nmenu policy\n\nA new Apps/Science menu section is available\n\ndebconf policy\n\ndebconf specification cleared up, various changes.\n\n12.1\n\nIt is no longer recommended to create symlinks from nonexistent\nmanual pages to 'undocumented(7)'.  Missing manual pages for\nprograms are still a bug.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 5 7,  Next: Version 3 5 6,  Prev: Version 3 5 8,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.43 Version 3.5.7",
                    "content": "Released August, 2002.\n\nPackages no longer have to ask permission to call MAKEDEV in\npostinst, merely notifying the user ought to be enough.\n\n2.2.4\n\ncryptographic software may now be included in the main archive.\n\n3.9\n\ntask packages are no longer permitted; tasks are now created by a\nspecial Tasks: field in the control file.\n\n11.8.4\n\nwindow managers that support netwm can now add 20 points when they\nadd themselves as an alternative for '/usr/bin/x-window-manager'\n\n10.1\n\nThe default compilation options have now changed, one should\nprovide debugging symbols in all cases, and optionally step back\noptimization to -O0, depending on the DEBBUILDOPTIONS environment\nvariable.\n\n7.6, 4.8\n\nAdded mention of build-arch, build-indep, etc, in describing the\nrelationships with Build-Depends, Build-Conflicts,\nBuild-Depends-Indep, and Build-Conflicts-Indep.  May need to review\nthe new rules.\n\n8\n\nChanged rules on how, and when, to invoke ldconfig in maintainer\nscripts.  Long rationale.\n\n`Added the last note in 3.5.6 upgrading checklist item regarding build\nrules, please see below'\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 5 6,  Next: Version 3 5 5,  Prev: Version 3 5 7,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.44 Version 3.5.6",
                    "content": "Released July, 2001.\n\n2.5\n\nEmacs and TeX are no longer mandated by policy to be priority\nstandard packages\n\n11.5\n\nPrograms that access docs need to do so via '/usr/share/doc', and\nnot via '/usr/doc/' as was the policy previously\n\n12.3\n\nPutting documentation in '/usr/doc' versus '/usr/share/doc' is now\na \"serious\" policy violation.\n\n11.5\n\nFor web servers, one should not provide non-local access to the\n'/usr/share/doc' hierarchy.  If one can't provide access controls\nfor the 'http://localhost/doc/' directory, then it is preferred\nthat one ask permission to expose that information during the\ninstall.\n\n7\n\nThere are new rules for build-indep/build-arch targets and there is\na new Build-Depend-Indep semantic.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 5 5,  Next: Version 3 5 4,  Prev: Version 3 5 6,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.45 Version 3.5.5",
                    "content": "Released May, 2001.\n\n12.1\n\nManpages should not rely on header information to have alternative\nmanpage names available; it should only use symlinks or .so pages\nto do this\n\n`Clarified note in 3.5.3.0 upgrading checklist regarding examples\nand templates: this refers only to those examples used by scripts;\nsee section 10.7.3 for the whole story'\n\nIncluded a new section 10.9.1 describing the use of\ndpkg-statoverride; this does not have the weight of policy\n\nClarify Standards-Version: you don't need to rebuild your packages\njust to change the Standards-Version!\n\n10.2\n\nPlugins are no longer bound by all the rules of shared libraries\n\nX Windows related things:\n\n11.8.1\n\nClarification of priority levels of X Window System related\npackages\n\n11.8.3\n\nRules for defining x-terminal-emulator improved\n\n11.8.5\n\nX Font policy rewritten: you must read this if you provide\nfonts for the X Window System\n\n11.8.6\n\nPackages must not ship '/usr/X11R6/lib/X11/app-defaults/'\n\n11.8.7\n\nX-related packages should usually use the regular FHS\nlocations; imake-using packages are exempted from this\n\n11.8.8\n\nOpenMotif linked binaries have the same rules as\nOSF/Motif-linked ones\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 5 4,  Next: Version 3 5 3,  Prev: Version 3 5 5,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.46 Version 3.5.4",
                    "content": "Released April, 2001.\n\n11.6\n\nThe system-wide mail directory is now /var/mail, no longer\n/var/spool/mail.  Any packages accessing the mail spool should\naccess it via /var/mail and include a suitable Depends field;\n\n11.9; perl-policy\n\nThe perl policy is now part of Debian policy proper.  Perl programs\nand modules should follow the current Perl policy\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 5 3,  Next: Version 3 5 2,  Prev: Version 3 5 4,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.47 Version 3.5.3",
                    "content": "Released April, 2001.\n\n7.1\n\nBuild-Depends arch syntax has been changed to be less ambiguous.\nThis should not affect any current packages\n\n10.7.3\n\nExamples and templates files for use by scripts should now live in\n'/usr/share/<package>' or '/usr/lib/<package>', with symbolic links\nfrom '/usr/share/doc/<package>/examples' as needed\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 5 2,  Next: Version 3 5 1,  Prev: Version 3 5 3,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.48 Version 3.5.2",
                    "content": "Released February, 2001.\n\n11.8.6\n\nX app-defaults directory has moved from\n'/usr/X11R6/lib/X11/app-defaults' to '/etc/X11/app-defaults'\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 5 1,  Next: Version 3 5 0,  Prev: Version 3 5 2,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.49 Version 3.5.1",
                    "content": "Released February, 2001.\n\n8.1\n\ndpkg-shlibdeps now uses objdump, so shared libraries have to be run\nthrough dpkg-shlibdeps as well as executables\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 5 0,  Next: Version 3 2 1 1,  Prev: Version 3 5 1,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.50 Version 3.5.0",
                    "content": "Released January, 2001.\n\n11.8.5\n\nFont packages for the X Window System must now declare a dependency\non 'xutils (>= 4.0.2)'\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 2 1 1,  Next: Version 3 2 1,  Prev: Version 3 5 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.51 Version 3.2.1.1",
                    "content": "Released January, 2001.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 2 1,  Next: Version 3 2 0,  Prev: Version 3 2 1 1,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.52 Version 3.2.1",
                    "content": "Released August, 2000.\n\n11.8.1\n\nA package of priority standard or higher may provide two binaries,\none compiled with support for the X Window System, and the other\nwithout\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 2 0,  Next: Version 3 1 1,  Prev: Version 3 2 1,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.53 Version 3.2.0",
                    "content": "Released August, 2000.\n\n10.1\n\nBy default executables should not be built with the debugging\noption -g.  Instead, it is recommended to support building the\npackage with debugging information optionally.\n\n12.8\n\nPolicy for packages where the upstream uses HTML changelog files\nhas been expanded.  In short, a plain text changelog file should\nalways be generated for the upstream changes\n\nPlease note that the new release of the X window system (3.2) shall\nprobably need sweeping changes in policy\n\nPolicy for packages providing the following X-based features has\nbeen codified:\n\n11.8.2\n\nX server (virtual package xserver)\n\n11.8.3\n\nX terminal emulator (virtual package x-terminal-emulator)\n\n11.8.4\n\nX window manager (virtual package x-window-manager, and\n'/usr/bin/x-window-manager' alternative, with priority\ncalculation guidelines)\n\n12.8.5\n\nX fonts (this section has been written from scratch)\n\n11.8.6\n\nX application defaults\n\n11.8.7\n\nPolicy for packages using the X Window System and FHS issues has\nbeen clarified;\n\n11.7.3\n\nNo package may contain or make hard links to conffiles\n\n8\n\nNoted that newer dpkg versions do not require extreme care in\nalways creating the shared lib before the symlink, so the unpack\norder be correct\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 1 1,  Next: Version 3 1 0,  Prev: Version 3 2 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.54 Version 3.1.1",
                    "content": "Released November, 1999.\n\n7.1\n\nCorrection to semantics of architecture lists in Build-Depends etc.\nShould not affect many packages\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 1 0,  Next: Version 3 0 1,  Prev: Version 3 1 1,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.55 Version 3.1.0",
                    "content": "Released October, 1999.\n\ndefunct\n\n'/usr/doc/<package>' has to be a symlink pointing to\n'/usr/share/doc/<package>', to be maintained by postinst and prerm\nscripts.\n\n7.1, 7.6\n\nIntroduced source dependencies (Build-Depends, etc.)\n\n9.3.4\n\n'/etc/rc.boot' has been deprecated in favour of '/etc/rcS.d'.\n(Packages should not be touching this directory, but should use\nupdate-rc.d instead)\n\n9.3.3\n\nupdate-rc.d is now the `only' allowable way of accessing the\n'/etc/rc?.d/[SK]??*' links.  Any scripts which manipulate them\ndirectly must be changed to use update-rc.d instead.  (This is\nbecause the file-rc package handles this information in an\nincompatible way.)\n\n12.7\n\nArchitecture-specific examples go in '/usr/lib/<package>/examples'\nwith symlinks from '/usr/share/doc/<package>/examples/*' or from\n'/usr/share/doc/<package>/examples' itself\n\n9.1.1\n\nUpdated FHS to a 2.1 draft; this reverts '/var/state' to '/var/lib'\n\n9.7; mime-policy\n\nAdded MIME sub-policy document\n\n12.4\n\nVISUAL is allowed as a (higher priority) alternative to EDITOR\n\n11.6\n\nModified liblockfile description, which affects mailbox-accessing\nprograms.  Please see the policy document for details\n\n12.7\n\nIf a package provides a changelog in HTML format, a text-only\nversion should also be included.  (Such a version may be prepared\nusing 'lynx -dump -nolist'.)\n\n3.2.1\n\nDescription of how to handle version numbers based on dates added\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 0 1,  Next: Version 3 0 0,  Prev: Version 3 1 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.56 Version 3.0.1",
                    "content": "Released July, 1999.\n\n10.2\n\nAdded the clarification that the .la files are essential for the\npackages using libtool's libltdl library, in which case the .la\nfiles must go in the run-time library package\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 3 0 0,  Next: Version 2 5 0,  Prev: Version 3 0 1,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.57 Version 3.0.0",
                    "content": "Released June, 1999.\n\n9.1\n\nDebian formally moves from the FSSTND to the FHS. This is a major\nchange, and the implications of this move are probably not all\nknown.\n\n4.1\n\nOnly 3 digits of the Standards version need be included in control\nfiles, though all four digits are still permitted.\n\n12.6\n\nThe location of the GPL has changed to\n'/usr/share/common-licenses'.  This may require changing the\ncopyright files to point to the correct location of the GPL and\nother major licenses\n\n10.2\n\nPackages that use libtool to create shared libraries must include\nthe .la files in the -dev packages\n\n10.8\n\nUse logrotate to rotate log files\n\nnow 11.8\n\nsection 5.8 has been rewritten (Programs for the X Window System)\n\n9.6; menu-policy\n\nThere is now an associated menu policy, in a separate document,\nthat carries the full weight of Debian policy\n\n11.3\n\nPrograms which need to modify the files '/var/run/utmp',\n'/var/log/wtmp' and '/var/log/lastlog' must be installed setgid\nutmp\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 2 5 0,  Next: Version 2 4 1,  Prev: Version 3 0 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.58 Version 2.5.0",
                    "content": "Released October, 1998.\n\n`Please note that section numbers below this point may not match the\ncurrent Policy Manual.'\n\n- Rearranged the manual to create a new Section 4, Files\n\n- Section 3.3 (\"Files\") was moved to Section 4.  The Sections\nthat were Section 4 and Section 5 were moved down to become\nSection 5 and Section 6.\n\n- What was Section 5.5 (\"Log files\") is now a subsection of the\nnew Section 4 (\"Files\"), becoming section 4.8, placed after\n\"Configuration files\", moving the Section 4.8 (\"Permissions\nand owners\") to Section 4.9.  All subsections of the old\nSection 5 after 5.5 were moved down to fill in the number gap.\n\n- Modified the section about changelog files to accommodate upstream\nchangelogs which were formatted as HTML. These upstream changelog\nfiles should now be accessible as\n'/usr/doc/package/changelog.html.gz'\n\n- Symlinks are permissible to link the real, or upstream, changelog\nname to the Debian mandated name.\n\n- Clarified that HTML documentation should be present in some\npackage, though not necessarily the main binary package.\n\n- Corrected all references to the location of the copyright files.\nThe correct location is '/usr/doc/package/copyright'\n\n- Ratified the architecture specification strings to cater to the\nHURD.\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 2 4 1,  Next: Version 2 4 0,  Prev: Version 2 5 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.59 Version 2.4.1",
                    "content": "Released April, 1998.\n"
                }
            ]
        },
        "Updated section 3.3.5 Symbolic links": {
            "content": "symbolic links within a toplevel directory should be relative,\nsymbolic links between toplevel directories should be absolute\n(cf., Policy Weekly Issue#6, topic 2)\n",
            "subsections": []
        },
        "Updated section 4.9 Games": {
            "content": "games for X Windows have to be installed in '/usr/games', just as\nnon-X games\n",
            "subsections": []
        },
        "Updated Chapter 12 Shared Libraries": {
            "content": "ldconfig must be called in the postinst script if the package\ninstalls shared libraries (cf., Policy Weekly Issue #6,\nfixes:bug#20515)\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Version 2 4 0,  Next: Version 2 3 0,  Prev: Version 2 4 1,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.60 Version 2.4.0",
                    "content": ""
                }
            ]
        },
        "Released January, 1998": {
            "content": "",
            "subsections": []
        },
        "Updated section 3.3.4 Scripts": {
            "content": "- /bin/sh may be any POSIX compatible shell\n\n- scripts including bashisms have to specify '/bin/bash' as\ninterpreter\n\n- scripts which create files in world-writable directories\n(e.g., in '/tmp') should use tempfile or mktemp for creating\nthe directory\n",
            "subsections": []
        },
        "Updated section 3.3.5 Symbolic Links": {
            "content": "symbolic links referencing compressed files must have the same file\nextension as the referenced file\n",
            "subsections": []
        },
        "Updated section 3.3.6 Device files": {
            "content": "'/dev/tty*' serial devices should be used instead of '/dev/cu*'\n",
            "subsections": []
        },
        "Updated section 3.4.2 Writing the scripts in '/etc/init.d'": {
            "content": "- all '/etc/init.d' scripts have to provide the following\noptions: start, stop, restart, force-reload\n\n- the reload option is optional and must never stop and restart\nthe service\n",
            "subsections": []
        },
        "Updated section 3.5 Cron jobs": {
            "content": "cron jobs that need to be executed more often than daily should be\ninstalled into '/etc/cron.d'\n",
            "subsections": []
        },
        "Updated section 3.7 Menus": {
            "content": "removed section about how to register HTML docs to 'menu' (the\ncorresponding section in 4.4, Web servers and applications, has\nbeen removed in policy 2.2.0.0 already, so this one was obsolete)\n",
            "subsections": []
        },
        "New section 3.8 Keyboard configuration": {
            "content": "details about how the backspace and delete keys should be handled\n",
            "subsections": []
        },
        "New section 3.9 Environment variables": {
            "content": "no program must depend on environment variables to get a reasonable\ndefault configuration\n",
            "subsections": []
        },
        "New section 4.6 News system configuration": {
            "content": "'/etc/news/organization' and '/etc/news/server' should be supported\nby all news servers and clients\n",
            "subsections": []
        },
        "Updated section 4.7 Programs for the X Window System": {
            "content": "- programs requiring a non-free Motif library should be provided\nas foo-smotif and foo-dmotif package\n\n- if lesstif works reliably for such program, it should be\nlinked against lesstif and not against a non-free Motif\nlibrary\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Version 2 3 0,  Next: Version 2 2 0,  Prev: Version 2 4 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.61 Version 2.3.0",
                    "content": "Released September, 1997.\n\n- new section '4.2 Daemons' including rules for '/etc/services',\n'/etc/protocols', '/etc/rpc', and '/etc/inetd.conf'\n\n- updated section about 'Configuration files': packages may not touch\nother packages' configuration files\n\n- MUAs and MTAs have to use liblockfile\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 2 2 0,  Next: Version 2 1 3,  Prev: Version 2 3 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.62 Version 2.2.0",
                    "content": "Released July, 1997.\n\n- added section 4.1 'Architecture specification strings': use\n<arch>-linux where <arch> is one of the following: i386, alpha,\narm, m68k, powerpc, sparc.\n\n- detailed rules for '/usr/local'\n\n- user ID's\n\n- editor/pager policy\n\n- cron jobs\n\n- device files\n\n- don't install shared libraries as executable\n\n- app-defaults files may not be conffiles\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 2 1 3,  Next: Version 2 1 2,  Prev: Version 2 2 0,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.63 Version 2.1.3",
                    "content": "Released March, 1997.\n\n- two programs with different functionality must not have the same\nname\n\n- \"Webstandard 3.0\"\n\n- \"Standard for Console Messages\"\n\n- Libraries should be compiled with '-DREENTRANT'\n\n- Libraries should be stripped with 'strip --strip-unneeded'\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 2 1 2,  Next: Version 2 1 1,  Prev: Version 2 1 3,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.64 Version 2.1.2",
                    "content": "Released November, 1996.\n\n- Some changes WRT shared libraries\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 2 1 1,  Next: Version 2 1 0,  Prev: Version 2 1 2,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.65 Version 2.1.1",
                    "content": "Released September, 1996.\n\n- No hard links in source packages\n\n- Do not use 'dpkg-divert' or 'update-alternatives' without\nconsultation\n\n- Shared libraries must be installed stripped\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: Version 2 1 0,  Prev: Version 2 1 1,  Up: Upgrading checklist": {
            "content": "",
            "subsections": [
                {
                    "name": "22.66 Version 2.1.0",
                    "content": "Released August, 1996.\n\n- Upstream changelog must be installed too\n"
                }
            ]
        },
        "File: debian-policy.info,  Node: License,  Next: Index,  Prev: Upgrading checklist,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "23 License": {
            "content": "",
            "subsections": []
        },
        "Copyright (C) 1996, 1997, 1998 Ian Jackson and Christian Schwarz": {
            "content": "",
            "subsections": []
        },
        "These are the copyright dates of the original Policy manual.  Since": {
            "content": "then, this manual has been updated by many others.  No comprehensive\ncollection of copyright notices for subsequent work exists.\n",
            "subsections": []
        },
        "This manual is free software; you may redistribute it and/or modify it": {
            "content": "under the terms of the GNU General Public License as published by the",
            "subsections": []
        },
        "Free Software Foundation; either version 2 of the License, or (at your": {
            "content": "option) any later version.\n",
            "subsections": []
        },
        "This is distributed in the hope that it will be useful, but WITHOUT ANY": {
            "content": "WARRANTY; without even the implied warranty of MERCHANTABILITY or\nFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\nmore details.\n\nA copy of the GNU General Public License is available as\n'/usr/share/common-licenses/GPL' in the Debian distribution or on the\nWorld Wide Web at 'https://www.gnu.org/licenses/'.\n",
            "subsections": []
        },
        "File: debian-policy.info,  Node: Index,  Prev: License,  Up: Top": {
            "content": "",
            "subsections": []
        },
        "Index": {
            "content": "* Menu:\n\n* reboot-required:                       Signaling that a reboot is required.\n(line 6)\n* reboot-required.pkgs:                  Signaling that a reboot is required.\n(line 6)\n* signaling; reboot:                     Event-based boot with upstart.\n(line 8)\n\n",
            "subsections": []
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}