Patch attached. Resent with typo fix and locale requirement changed to
"should". Seeking seconds on this version.

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.

My analysis of the Contents file
<https://lists.debian.org/debian-policy/2024/12/msg00031.html> suggests
that this should not result in any new bugs.

Document this in Policy, so that it's explicitly supported for sysadmins
to use dpkg exclusions or similar mechanisms to delete /usr/share/man,
/usr/share/info, and /usr/share/locale.

- Josh Triplett
>From e6461cfaa9e8389ec64cc4cad1a3f5b406d65b69 Mon Sep 17 00:00:00 2001
Message-ID: <e6461cfaa9e8389ec64cc4cad1a3f5b406d65b69.1733822487.git.j...@joshtriplett.org>
From: Josh Triplett <j...@joshtriplett.org>
Date: Thu, 5 Dec 2024 10:01:33 -0800
Subject: [PATCH] Document that packages should not 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.

My analysis of the Contents file
<https://lists.debian.org/debian-policy/2024/12/msg00031.html> suggests
that this should not result in any new bugs.

Document this in Policy, so that it's explicitly supported for sysadmins
to use dpkg exclusions or similar mechanisms to delete /usr/share/man,
/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..28c83dd 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 should 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

Reply via email to