Package: debian-policy Version: 4.7.0.1 Severity: wishlist Tags: patch X-Debbugs-Cc: j...@joshtriplett.org
Packages already tend to avoid requiring any files from /usr/share/man or /usr/share/info, and don't require files in /usr/share/locale if running in a C or C.UTF-8 locale. The attached patch documents this in Policy, so that it's explicitly supported for sysadmins to use dpkg exclusions or similar mechanisms to delete /usr/share/doc, /usr/share/info, and /usr/share/locale. To the best of my knowledge, this documents existing behavior, and will not introduce any new bugs on any packages.
>From c0069a143c349375201273f3d25b676f501e85e2 Mon Sep 17 00:00:00 2001 Message-ID: <c0069a143c349375201273f3d25b676f501e85e2.1733421983.git.j...@joshtriplett.org> From: Josh Triplett <j...@joshtriplett.org> Date: Thu, 5 Dec 2024 10:01:33 -0800 Subject: [PATCH] Document that packages cannot require man / info / locale files Packages already tend to avoid requiring any files from /usr/share/man or /usr/share/info, and don't require files in /usr/share/locale if running in a C or C.UTF-8 locale. Document this in Policy, so that it's explicitly supported for sysadmins to use dpkg exclusions or similar mechanisms to delete /usr/share/doc, /usr/share/info, and /usr/share/locale. Signed-off-by: Josh Triplett <j...@joshtriplett.org> --- policy/ch-docs.rst | 8 ++++++++ policy/ch-files.rst | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/policy/ch-docs.rst b/policy/ch-docs.rst index f3db835..6167342 100644 --- a/policy/ch-docs.rst +++ b/policy/ch-docs.rst @@ -61,6 +61,11 @@ by a note at the beginning of the manual page or by showing the missing or changed portions in the original language instead of the target language. +Packages (other than manual page readers) must not require the existence +of any files in ``/usr/share/man/`` in order to function. A package that +optionally displays its own manual pages, such as to provide user help, +must fail gracefully if the manual pages aren't installed. + .. _s12.2: Info documents @@ -100,6 +105,9 @@ To determine which section to use, you should look at create a new section if none of the current sections are relevant). [#]_ +Packages (other than info readers) must not require the existence of any +files in ``/usr/share/info/`` in order to function. + .. _s-docs-additional: Additional documentation diff --git a/policy/ch-files.rst b/policy/ch-files.rst index b34c183..90ddee1 100644 --- a/policy/ch-files.rst +++ b/policy/ch-files.rst @@ -574,6 +574,18 @@ is only removed). This should be done by the ``postrm`` script when it is called with the argument ``purge`` (see :ref:`s-removedetails`). +.. _s-locale-files: + +Locale files +------------ + +The directory ``/usr/share/locale/`` contains localization files for +different locales. + +Packages must not require the existence of any files in +``/usr/share/locale/`` in order to function in a ``C`` or ``C.UTF-8`` +locale. + .. _s-permissions-owners: Permissions and owners -- 2.45.2