#737796 copyright-format: support Files: paragraph with both abbreviated names and license paragraph

#737796#5
Date:
2014-02-06 00:55:06 UTC
From:
To:
This is taken from
https://lists.debian.org/debian-policy/2014/02/msg00021.html .  I'm
pasting here based on Russ Albery's suggestion that a change might be
appropriate for copyright-format 1.1 (see
https://lists.debian.org/debian-policy/2014/02/msg00022.html).

I'm happy to submit a proposed patch to copyright-format, or happy to
let someone else take the lead, but I figured I'd start by filing a
report to see if anyone else had alternate views or suggestions.
---

I’m helping a colleague with the packaging of the ‘hidapi’ package
(http://mentors.debian.net/package/hidapi).

In one of our Files: paragraphs, we have the following:

License: GPL-3.0 or BSD-3-clause or HIDAPI
 At the discretion of the user of this library,
 this software may be licensed under the terms of the
 GNU General Public License v3, a BSD-Style license, or the
 original HIDAPI license as outlined in the LICENSE.txt,
 LICENSE-gpl3.txt, LICENSE-bsd.txt, and LICENSE-orig.txt
 files located at the root of the source distribution.
 These files may also be found in the public source
 code repository located at:
http://github.com/signal11/hidapi .

(where each of the abbreviated names is specified in a separate
stand-alone license paragraph).

This triggers the following lintian warnings:

I: hidapi source: unused-license-paragraph-in-dep5-copyright bsd-3-clause (paragraph at line 63)
I: hidapi source: unused-license-paragraph-in-dep5-copyright gpl-3.0 (paragraph at line 88)

because split_licenses in source-copyright.pm ignores the abbreviated
names in any license block that has a long form.

My reading of DEP5 suggests that the License: block above is valid:

First line: an abbreviated name for the license, or _expression_
giving alternatives (see Short names section for a list of standard
abbreviations). […]

Remaining lines: if left blank here, the file must include a
stand-alone License paragraph matching each license short name listed
on the first line. Otherwise, this field should either include the
full text of the license(s) or include a pointer to the license file
under /usr/share/common-licenses. […]

I parse our License: block as having a first line with an
“_expression_ giving alternatives,” and “remaining lines” that
“include the full text of the license(s).”

I don’t want to remove the “remaining lines” of the paragraph as I
think it’s important to keep the full text of the license as written.
I don’t want to remove the abbreviated name, as I think it has
valuable pointers to the standalone license paragraphs.

Is there a good option that I’m missing?  I ask debian-policy because
I believe that either:

a) Lintian should be patched to not issue a warning in the situation I describe
b) DEP5 should be clarified to rule out my interpretation
c) (I have become confused, which is certainly possible)

The following change to source-copyright.pm eliminates the warning
(but this is intended to illuminate the working of the code, not as a
recommended patch to lintian.)
--- source-copyright.pm 2013-08-31 04:47:23.000000000 -0400 +++ /usr/share/lintian/checks/source-copyright.pm 2014-02-05 12:05:24.734173128 -0500 @@ -260,7 +260,8 @@ sub split_licenses { my ($license) = @_; return () unless defined($license); - return () if $license =~ /\n/; + # return () if $license =~ /\n/; + $license =~ s/\n.*//ms; $license =~ s/[(),]//; return map { "\L$_" } (split(m/\s++(?:and|or)\s++/, $license)); }
#737796#18
Date:
2017-09-18 12:15:54 UTC
From:
To:
Hi

Since the licence text shown in the original report mention "At the discretion
of the user of this library,  this software may be licensed under the terms of
..." , I'm wondering if this would better fit in the new License-Grant field
[1].

Thoughts ?

All the best

[1] https://bugs.debian.org/786470

#737796#23
Date:
2017-09-18 20:48:30 UTC
From:
To:
I like this new feature and would be in favour making it real.
#737796#28
Date:
2017-09-19 06:21:11 UTC
From:
To:
err, I'm not sure which new feature you refer to .. :-/

Do you mean the "support Files: paragraph with both abbreviated names and
license paragraph" or the new License-Grant field ?

All the best

#737796#33
Date:
2017-09-20 19:10:56 UTC
From:
To:
Am Dienstag, den 19.09.2017, 08:21 +0200 schrieb Dominique Dumont:

License-Grant.

srry for the confusion.