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.)

--- 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));
 }

Reply via email to