From 3f047d84744ea74a90b3928981c29804d027c9a1 Mon Sep 17 00:00:00 2001
From: Guillem Jover <guillem@debian.org>
Date: Sun, 18 Sep 2022 18:10:59 +0200
Subject: [PATCH 2/6] copyright-format: Wrap and sort -sat copyright entry
 lines

Do not place entries on the first line with the field name, and place
one item per line, so that adding or removing entries generates as
minimal a diff as possible, and avoids modifying unrelated lines. Use
a single space so that the indentation is always uniform among all
fields.
---
 copyright-format-1.0.xml | 99 ++++++++++++++++++++++++++--------------
 debian/copyright         | 54 ++++++++++++++--------
 2 files changed, 98 insertions(+), 55 deletions(-)

diff --git a/copyright-format-1.0.xml b/copyright-format-1.0.xml
index 3d5c672..cc9aa41 100644
--- a/copyright-format-1.0.xml
+++ b/copyright-format-1.0.xml
@@ -316,20 +316,28 @@ Upstream-Contact: John Doe &lt;john.doe@example.com&gt;</programlisting>
 
       <section id="example-files-paragraph">
         <title>Example files paragraphs</title>
-<programlisting>Files: *
-Copyright: 1975-2010 Ulla Upstream
+<programlisting>Files:
+ *
+Copyright:
+ 1975-2010 Ulla Upstream
 License: GPL-2+
 
-Files: debian/*
-Copyright: 2010 Daniela Debianizer
+Files:
+ debian/*
+Copyright:
+ 2010 Daniela Debianizer
 License: GPL-2+
 
-Files: debian/patches/fancy-feature
-Copyright: 2010 Daniela Debianizer
+Files:
+ debian/patches/fancy-feature
+Copyright:
+ 2010 Daniela Debianizer
 License: GPL-3+
 
-Files: */*.1
-Copyright: 2010 Manuela Manpager
+Files:
+ */*.1
+Copyright:
+ 2010 Manuela Manpager
 License: GPL-2+</programlisting>
         <para>
           In this example, copyright in all files is held by the upstream,
@@ -385,8 +393,9 @@ License: GPL-2+</programlisting>
       <example>
         <title>tri-licensed files</title>
 <programlisting>Files: src/js/editline/*
-Copyright: 1993, John Doe
-           1993, Joe Average
+Copyright:
+ 1993 John Doe
+ 1993 Joe Average
 License: MPL-1.1 or GPL-2 or LGPL-2.1
 
 License: MPL-1.1
@@ -401,13 +410,17 @@ License: LGPL-2.1
 
       <example>
         <title>recurrent license</title>
-<programlisting>Files: src/js/editline/*
-Copyright: 1993, John Doe
-           1993, Joe Average
+<programlisting>Files:
+ src/js/editline/*
+Copyright:
+ 1993 John Doe
+ 1993 Joe Average
 License: MPL-1.1
 
-Files: src/js/fdlibm/*
-Copyright: 1993, J-Random Corporation
+Files:
+ src/js/fdlibm/*
+Copyright:
+ 1993 J-Random Corporation
 License: MPL-1.1
 
 License: MPL-1.1
@@ -1268,9 +1281,11 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Source: ftp://ftp.example.com/pub/games
 Upstream-Name: X Solitaire
 
-Files: *
-Copyright: 1998 John Doe <jdoe@example.com>
-   1998 Jane Smith <jsmith@example.net>
+Files:
+ *
+Copyright:
+ 1998 John Doe <jdoe@example.com>
+ 1998 Jane Smith <jsmith@example.net>
 License: GPL-2+
  This program is free software; you can redistribute it
  and/or modify it under the terms of the GNU General Public
@@ -1310,41 +1325,55 @@ Source: https://www.example.com/code/venus
 Upstream-Name: Planet Venus
 Upstream-Contact: John Doe <jdoe@example.com>
 
-Files: *
-Copyright: 2008, John Doe <jdoe@example.com>
-           2007, Jane Smith <jsmith@example.org>
-           2007, Joe Average <joe@example.org>
-           2007, J. Random User <jr@users.example.com>
+Files:
+ *
+Copyright:
+ 2008 John Doe <jdoe@example.com>
+ 2007 Jane Smith <jsmith@example.org>
+ 2007 Joe Average <joe@example.org>
+ 2007 J. Random User <jr@users.example.com>
 License: PSF-2
 
-Files: debian/*
-Copyright: 2008, Dan Developer <dan@debian.example.com>
+Files:
+ debian/*
+Copyright:
+ 2008 Dan Developer <dan@debian.example.com>
 License: permissive
  Copying and distribution of this package, with or without
  modification, are permitted in any medium without royalty
  provided the copyright notice and this notice are
  preserved.
 
-Files: debian/patches/theme-diveintomark.patch
-Copyright: 2008, Joe Hacker <hack@example.org>
+Files:
+ debian/patches/theme-diveintomark.patch
+Copyright:
+ 2008 Joe Hacker <hack@example.org>
 License: GPL-2+
 
-Files: planet/vendor/compat_logging/*
-Copyright: 2002, Mark Smith <msmith@example.org>
+Files:
+ planet/vendor/compat_logging/*
+Copyright:
+ 2002 Mark Smith <msmith@example.org>
 License: MIT
  [LICENSE TEXT]
 
-Files: planet/vendor/httplib2/*
-Copyright: 2006, John Brown <brown@example.org>
+Files:
+ planet/vendor/httplib2/*
+Copyright:
+ 2006 John Brown <brown@example.org>
 License: MIT2
  Unspecified MIT style license.
 
-Files: planet/vendor/feedparser.py
-Copyright: 2007, Mike Smith <mike@example.org>
+Files:
+ planet/vendor/feedparser.py
+Copyright:
+ 2007 Mike Smith <mike@example.org>
 License: PSF-2
 
-Files: planet/vendor/htmltmpl.py
-Copyright: 2004, Thomas Brown <coder@example.org>
+Files:
+ planet/vendor/htmltmpl.py
+Copyright:
+ 2004 Thomas Brown <coder@example.org>
 License: GPL-2+
 
 License: PSF-2
diff --git a/debian/copyright b/debian/copyright
index 402d3bd..6306e34 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -7,11 +7,13 @@ Comment: Complete copyright notices for all contributors to the various
  For a more thorough (but still incomplete) list of contributors who may
  have a copyright interest in these documents, see debian/changelog.
 
-Files: *
-Copyright: 1996, 1997, 1998, Ian Jackson and Christian Schwarz
-  1999, Chris Waters, Joey Hess, and Joost Witteveen
-  1999, 2001, Raphaël Hertzog and Brendan O'Dea
-  1999-2018, many other Debian contributors
+Files:
+ *
+Copyright:
+ 1996, 1997, 1998 Ian Jackson and Christian Schwarz
+ 1999 Chris Waters, Joey Hess, and Joost Witteveen
+ 1999, 2001 Raphaël Hertzog and Brendan O'Dea
+ 1999-2018 many other Debian contributors
 License: GPL-2+
 Comment: Be aware that the GNU General Public License as applied to
  standards documents requires distribution or availability of the rST
@@ -19,16 +21,21 @@ Comment: Be aware that the GNU General Public License as applied to
  distributed.  This is the same as with the source code of software but is
  sometimes surprising for text documents.
 
-Files: copyright-format*.xml
-Copyright: 2007-2017, many Debian contributors
+Files:
+ copyright-format*.xml
+Copyright:
+ 2007-2017 Many Debian contributors
 License: preserve-notice
  Copying and distribution of this file, with or without modification, are
  permitted in any medium without royalty provided this notice is
  preserved.
 
-Files: debconf_specification.xml debconf/*
-Copyright: 1998, 1998, 2000, Wichert Akkerman and Joey Hess
-  2000-2017, many other Debian contributors
+Files:
+ debconf_specification.xml
+ debconf/*
+Copyright:
+ 1998, 1999, 2000 Wichert Akkerman and Joey Hess
+ 2000-2017 Many other Debian contributors
 License: BSD-3-clause
  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are
@@ -55,11 +62,13 @@ License: BSD-3-clause
  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-Files: fhs-3.0*
-Copyright: 1994-2004, Daniel Quinlan
-  2001-2004 Paul 'Rusty' Russell
-  2003-2004 Christopher Yeoh
-  2015 The Linux Foundation
+Files:
+ fhs-3.0*
+Copyright:
+ 1994-2004 Daniel Quinlan
+ 2001-2004 Paul 'Rusty' Russell
+ 2003-2004 Christopher Yeoh
+ 2015 The Linux Foundation
 License: FHS
  Permission is granted to make and distribute verbatim copies of this
  standard provided the copyright and this permission notice are preserved
@@ -78,15 +87,20 @@ License: FHS
  versions, except that this permission notice may be stated in a
  translation approved by the copyright holder.
 
-Files: policy/images/policy-install.dia policy/images/policy-purge.dia
-Copyright: (C) 2005 Margarita Manterola
+Files:
+ policy/images/policy-install.dia
+ policy/images/policy-purge.dia
+Copyright:
+ 2005 Margarita Manterola
 License: GPL-2+
 
-Files: policy/images/debian-policy-install-conffiles.dia
- policy/images/debian-policy-remove.dia
+Files:
+ policy/images/debian-policy-install-conffiles.dia
  policy/images/debian-policy-remove-purge.dia
+ policy/images/debian-policy-remove.dia
  policy/images/debian-policy-upgrade.dia*
-Copyright: (C) 2005, 2006 Margarita Manterola
+Copyright:
+ 2005, 2006 Margarita Manterola
 License: GPL-2+
 
 License: GPL-2+
-- 
2.37.2

