[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1020241: debian-policy: copyright-format: Formatting improvements/changes



Hi!

On Sun, 2022-09-18 at 22:56:16 +0200, Guillem Jover wrote:
> On Sun, 2022-09-18 at 10:58:20 -0700, Russ Allbery wrote:
> > Russ Allbery <rra@debian.org> writes:
> > > I would happily apply a version of 0002 that only changes Files and
> > > leaves Copyright alone.
> 
> I can split that up, for an incremental update yes. Will send later.

Attached.

> > Or, perhaps even better, one that changes Copyright the way that you did,
> > but just adds an extra space.  I think that's the simplest compromise
> > between what you're trying to accomplish and the field definition.
> 
> If we end up switching the field semantics, that seems it might cause
> unnecessary modification churn, given that I (not sure whether
> other people have done this before than me as well) at least have
> "instigated" unintentionally this type of change in several places
> (packages I maintain, golang/prometheus team), including tooling
> (AFAIR dh-make and dh-make-golang), and other people might have also
> picked this up too. :/

BTW, just to make this clear, if this feels like it might not be
decided quickly on the Debian policy side, then I'll prepare/commit
changes to revert this behavior from tooling that I've previously
introduced, until and if this changes again. Otherwise if the feeling
is that this might get decided quickly, then I'd prefer to avoid the
flip-flopping behavior change (but not to be taken as "current-practice"
pressure to swindle the decision! And I'm happy to do it in this case
anyway if that makes people feel better about it).

Thanks,
Guillem
From 6c74ff53624595267215405edaf09ab3146d5b93 Mon Sep 17 00:00:00 2001
From: Guillem Jover <guillem@debian.org>
Date: Sun, 18 Sep 2022 18:10:59 +0200
Subject: [PATCH] copyright-format: Wrap and sort -sat Files field

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 | 42 ++++++++++++++++++++++++++--------------
 debian/copyright         | 18 +++++++++++------
 2 files changed, 40 insertions(+), 20 deletions(-)

diff --git a/copyright-format-1.0.xml b/copyright-format-1.0.xml
index 0f86a76..d5d2bbe 100644
--- a/copyright-format-1.0.xml
+++ b/copyright-format-1.0.xml
@@ -316,19 +316,23 @@ Upstream-Contact: John Doe &lt;john.doe@example.com&gt;</programlisting>
 
       <section id="example-files-paragraph">
         <title>Example files paragraphs</title>
-<programlisting>Files: *
+<programlisting>Files:
+ *
 Copyright: 1975-2010 Ulla Upstream
 License: GPL-2+
 
-Files: debian/*
+Files:
+ debian/*
 Copyright: 2010 Daniela Debianizer
 License: GPL-2+
 
-Files: debian/patches/fancy-feature
+Files:
+ debian/patches/fancy-feature
 Copyright: 2010 Daniela Debianizer
 License: GPL-3+
 
-Files: */*.1
+Files:
+ */*.1
 Copyright: 2010 Manuela Manpager
 License: GPL-2+</programlisting>
         <para>
@@ -401,12 +405,14 @@ License: LGPL-2.1
 
       <example>
         <title>recurrent license</title>
-<programlisting>Files: src/js/editline/*
+<programlisting>Files:
+ src/js/editline/*
 Copyright: 1993, John Doe
            1993, Joe Average
 License: MPL-1.1
 
-Files: src/js/fdlibm/*
+Files:
+ src/js/fdlibm/*
 Copyright: 1993, J-Random Corporation
 License: MPL-1.1
 
@@ -1261,7 +1267,8 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Source: ftp://ftp.example.com/pub/games
 Upstream-Name: X Solitaire
 
-Files: *
+Files:
+ *
 Copyright: 1998 John Doe <jdoe@example.com>
    1998 Jane Smith <jsmith@example.net>
 License: GPL-2+
@@ -1298,39 +1305,46 @@ Source: https://www.example.com/code/venus
 Upstream-Name: Planet Venus
 Upstream-Contact: John Doe <jdoe@example.com>
 
-Files: *
+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/*
+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
+Files:
+ debian/patches/theme-diveintomark.patch
 Copyright: 2008, Joe Hacker <hack@example.org>
 License: GPL-2+
 
-Files: planet/vendor/compat_logging/*
+Files:
+ planet/vendor/compat_logging/*
 Copyright: 2002, Mark Smith <msmith@example.org>
 License: MIT
  [LICENSE TEXT]
 
-Files: planet/vendor/httplib2/*
+Files:
+ planet/vendor/httplib2/*
 Copyright: 2006, John Brown <brown@example.org>
 License: MIT2
  Unspecified MIT style license.
 
-Files: planet/vendor/feedparser.py
+Files:
+ planet/vendor/feedparser.py
 Copyright: 2007, Mike Smith <mike@example.org>
 License: PSF-2
 
-Files: planet/vendor/htmltmpl.py
+Files:
+ planet/vendor/htmltmpl.py
 Copyright: 2004, Thomas Brown <coder@example.org>
 License: GPL-2+
 
diff --git a/debian/copyright b/debian/copyright
index 357ae48..21a514b 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -7,7 +7,8 @@ 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: *
+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
@@ -19,14 +20,17 @@ 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
+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/*
+Files:
+ debconf_specification.xml
+ debconf/*
 Copyright: 1998, 1998, 2000, Wichert Akkerman and Joey Hess
   2000-2017, many other Debian contributors
 License: BSD-3-clause
@@ -55,7 +59,8 @@ 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*
+Files:
+ fhs-3.0*
 Copyright: 1994-2004, Daniel Quinlan
   2001-2004 Paul 'Rusty' Russell
   2003-2004 Christopher Yeoh
@@ -78,9 +83,10 @@ License: FHS
  versions, except that this permission notice may be stated in a
  translation approved by the copyright holder.
 
-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*
  policy/images/policy-install.dia
  policy/images/policy-purge.dia
-- 
2.37.2


Reply to: