Stuart Prescott <[email protected]> writes:

> Hi
>
>>> The text is silence on how multiple occurances of these lines behave.
>>> The simplest is to just ban that, which could be added.
> [...]
>
> Repeated use of the same field within a stanza of a deb822-style file
> is already forbidden, so there's no further need to worry about any of
> these cases:
>
> copyright-format/1.0 §4 says:
>
>   The syntax of the file is the same as for other Debian control files,
>   as specified in the Debian Policy Manual. See its section 5.1 for
>   details.
> And Policy §5.1 says:
>
>   A stanza must not contain more than one instance of a particular field
>   name.
>
> mk-origtargz uses dpkg's Dpkg::Control to read the data which matches
> this requirement; likewise python-debian's debian.copyright module
> implements this already.

Thank you!  I was hoping for that.  I don't think the section has to
even repeate this piece of information.

>>> Another question is how to deal with paths containing odd characters
>>> like SPC.
>
> The mk-origtargz source uses these as what copyright-format/1.0 §4.2
> calls a "whitespace-separated list".
>
>       split(/\s+/, $data->{ $self->config->excludestanza })
>
> This matches all other places in copyright-format/1.0 where files or
> sets of files are described - i.e. the Files field (see §6.9).
>
> Between §4.2 and §6.9, the details are already exhaustively described
> in the format, along with practical guidance on how to deal with a
> space character.
>
> I would suggest that the current patch for the documentation of these
> fields should have a reference to the format of the field (§4.2) and
> useful additional information about that format (§6.9) added to it.
>
>
> Would be great to get this extensively used field documented -
> apparently 4304 packages currently use it.

Great suggestions!  What do you think of updated patch below?

The rendered text reads like this:

   6.7. Files-Excluded, Files-Excluded-*, Files-Included, Files-Included-*

   Whitespace-separated list: filename patterns (same as the Files
   field, including the wildcards) used to signal repacking of the
   upstream source source to remove unwanted files. Files-Excluded is a
   list of filename patterns matching files (including directories) to
   exclude. Files-Excluded-COMPONENT behave the same, but is applied to
   a particular orig.tar component only (replacing COMPONENT with the
   component name), for multi-orig.tar sources. Files-Included is used
   to include some files (or directories) that were excluded by a
   Files-Excluded expression. Files-Included-COMPONENT is similarily
   used to re-include paths excluded by Files-Excluded-COMPONENT. These
   fields are supported by uscan and mk-origtargz.

I believe this is a self-contained specification, and does not need any
external references in order to understand, based on already widely
implemented properties.  Thus addressing Sean's concern about the syntax
of these fields being experimental.

/Simon
From 179c99e47c957240b61877e919afed70c6acad14 Mon Sep 17 00:00:00 2001
From: Simon Josefsson <[email protected]>
Date: Mon, 16 Mar 2026 11:01:42 +0100
Subject: [PATCH] Mention Files-Excluded/Included in copyright-format

---
 copyright-format-1.0.xml | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/copyright-format-1.0.xml b/copyright-format-1.0.xml
index 954a65b..1054272 100644
--- a/copyright-format-1.0.xml
+++ b/copyright-format-1.0.xml
@@ -246,6 +246,11 @@
             <link linkend="copyright-field">Copyright</link>: optional.
           </para>
         </listitem>
+        <listitem>
+          <para>
+            <link linkend="files-excluded-included-field">Files-Excluded, Files-Excluded-*, Files-Included, Files-Included-*</link>: optional.
+          </para>
+        </listitem>
       </itemizedlist>
       <para>
         The <varname>Copyright</varname> and <varname>License</varname>
@@ -498,6 +503,29 @@ License: MPL-1.1
       </para>
     </section>
 
+    <section id="files-excluded-included-field">
+      <title><varname>Files-Excluded, Files-Excluded-*, Files-Included, Files-Included-*</varname></title>
+      <para>
+        <link linkend="white-space-lists">Whitespace-separated
+        list</link>: filename patterns (same as the <link
+        linkend="files-field">Files</link> field, including the
+        wildcards) used to signal repacking of the upstream source
+        source to remove unwanted files.  Files-Excluded is a list of
+        filename patterns matching files (including directories) to
+        exclude.  Files-Excluded-COMPONENT behave the same, but is
+        applied to a particular orig.tar component only (replacing
+        COMPONENT with the component name), for multi-orig.tar
+        sources.  Files-Included is used to include some files (or
+        directories) that were excluded by a Files-Excluded
+        expression.  Files-Included-COMPONENT is similarily used to
+        re-include paths excluded by Files-Excluded-COMPONENT.  These
+        fields are supported by <ulink
+        url="https://manpages.debian.org/testing/devscripts/uscan.1.en.html#COPYRIGHT_FILE_EXAMPLES";>uscan</ulink>
+        and <ulink
+        url="https://manpages.debian.org/testing/devscripts/mk-origtargz.1.en.html";>mk-origtargz</ulink>.
+      </para>
+    </section>
+
     <section id="license-field">
       <title><varname>License</varname></title>
       <para>
-- 
2.52.0

Attachment: signature.asc
Description: PGP signature

Reply via email to