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

Bug#513831: checks/copyright-file: some glitches



Package: lintian
Version: 2.2.1
Severity: minor
Tags: patch

When I run the new lintian against libnetaddr-ip-perl
(debian/copyright attached) I get:

$ lintian --info --pedantic --color=auto /home/gregoa/src/svn-pkg-perl/trunk/build-area/libnetaddr-ip-perl_4.024+dfsg-1_i386.changes 
P: libnetaddr-ip-perl: copyright-refers-to-symlink-license usr/share/common-licenses/GPL
N: 
N:    The copyright file refers to the versionless symlink in
N:    /usr/share/common-licenses for the full text of the GPL, LGPL, or GFDL
N:    license. This symlink is updated to point to the latest version of the
N:    license when a new one is released. The package appears to allow
N:    relicensing under later versions of its license, so this is legally
N:    consistent, but it implies that Debian will relicense the package under
N:    later versions of those licenses as they're released. It is normally
N:    better to point to the version of the license the package references in
N:    its license statement.
N:    
N:    For example, if the package says something like "you may redistribute it
N:    and/or modify it under the terms of the GNU General Public License as
N:    published by the Free Software Foundation; either version 2, or (at your
N:    option) any later version", the debian/copyright file should refer to
N:    /usr/share/common-licenses/GPL-2, not /GPL.
N:    
N:    Severity: pedantic, Certainty: possible
N: 
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 165.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 170.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 175.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 182.
Use of uninitialized value $_ in length at /usr/share/lintian/checks/copyright-file line 189.
Use of uninitialized value $_ in length at /usr/share/lintian/checks/copyright-file line 197.
Use of uninitialized value $_ in length at /usr/share/lintian/checks/copyright-file line 202.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 209.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 218.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 242.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 249.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 253.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 257.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 261.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 264.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 268.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 273.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 276.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 282.
W: libnetaddr-ip-perl: copyright-without-copyright-notice
N: 
N:    The copyright file for this package does not appear to contain a
N:    copyright notice. You should copy the copyright notice from the upstream
N:    source (or add one of your own for a native package). A copyright notice
N:    must consist of Copyright, Copr., or the Unicode symbol of C in a circle
N:    followed by the years and the copyright holder. A copyright notice is
N:    not required for a work to be copyrighted, but Debian requires the
N:    copyright file include the authors and years of copyright, and including
N:    a valid copyright notice is the best way to do that.
N:    
N:    If the package is in the public domain rather than copyrighted, be sure
N:    to mention "public domain" in the copyright file. Please be aware that
N:    this is very rare and not the same as a DFSG-free license. True public
N:    domain software is generally limited to such special cases as a work
N:    product of a United States government agency.
N:    
N:    Refer to http://ftp-master.debian.org/REJECT-FAQ.html for details.
N:    
N:    Severity: normal, Certainty: certain
N: 
Use of uninitialized value $_ in pattern match (m//) at /usr/share/lintian/checks/copyright-file line 292.


Without --info it looks better:

$ lintian --pedantic --color=auto /home/gregoa/src/svn-pkg-perl/trunk/build-area/libnetaddr-ip-perl_4.024+dfsg-1_i386.changes 
P: libnetaddr-ip-perl: copyright-refers-to-symlink-license usr/share/common-licenses/GPL


Looking at the code it seems that $_ gets "eaten" in
checks/copyright-file, line 159, if --info is used. The attached
patch saves $_ (but I guess the problem is more in lib/Tags.pm?).


The second glitch is the check for the Perl license in the same
section of the code. Looking for "as Perl itself" is a good start but
does not work for debian/copyright files with the new format that
just have

License-Alias: Perl
License: GPL-1+ | Artistic

and then have standalone stanzas for "License: GPL-1+" and "License:
Artistic".

The attached patch also checks for "License-Alias: Perl".


Cheers,
gregor

-- System Information:
Debian Release: 5.0
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'oldstable'), (500, 'experimental'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.28.200901282224
Locale: LANG=C, LC_CTYPE=de_AT@euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash

Versions of packages lintian depends on:
ii  binutils            2.18.1~cvs20080103-7 The GNU assembler, linker and bina
ii  diffstat            1.46-1               produces graph of changes introduc
ii  dpkg-dev            1.14.24              Debian package development tools
ii  file                4.26-2               Determines file type using "magic"
ii  gettext             0.17-6               GNU Internationalization utilities
ii  intltool-debian     0.35.0+20060710.1    Help i18n of RFC822 compliant conf
ii  libipc-run-perl     0.82-1               Perl module for running processes
ii  libparse-debianchan 1.1.1-2              parse Debian changelogs and output
ii  libtimedate-perl    1.1600-9             Time and date functions for Perl
ii  liburi-perl         1.37+dfsg-1          Manipulates and accesses URI strin
ii  man-db              2.5.2-4              on-line manual pager
ii  perl [libdigest-sha 5.10.0-19            Larry Wall's Practical Extraction 

lintian recommends no packages.

Versions of packages lintian suggests:
pn  binutils-multiarch            <none>     (no description available)
ii  libtext-template-perl         1.44-1.2   Text::Template perl module
ii  man-db                        2.5.2-4    on-line manual pager

-- no debconf information

-- 
 .''`.   Home: http://info.comodo.priv.at/{,blog/} / GPG Key ID: 0x00F3CFE4
 : :' :  Debian GNU/Linux user, admin, & developer - http://www.debian.org/
 `. `'   Member of VIBE!AT, SPI Inc., fellow of FSFE | http://got.to/quote/
   `-    NP: Donovan: Hampstead Incident
--- checks/copyright-file	2009-02-01 16:01:27.000000000 +0100
+++ checks/copyright-file.improved	2009-02-01 16:28:56.000000000 +0100
@@ -153,13 +153,15 @@
 # Allow generic GPL references for packages licensed under the same terms as
 # Perl for now.  Perl references GPL version 1, which isn't in
 # common-licenses.
-if (m,(usr/share/common-licenses/(L?GPL|GFDL))[^-],i && !m,as Perl itself,i) {
+if (m,(usr/share/common-licenses/(L?GPL|GFDL))[^-],i && !m,as Perl itself,i && !m,License-Alias:\s+Perl,) {
     my $ref = $1;
+    my $save_dollar_underline = $_;
     if (m,\b(any|or)\s+later(\s+version)?\b,i) {
 	tag "copyright-refers-to-symlink-license", $ref;
     } else {
 	tag "copyright-refers-to-versionless-license-file", $ref;
     }
+    $_ = $save_dollar_underline;
 }
 
 if (m,usr/share/common-licences,) {
Format-Specification:
    http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
Upstream-Maintainer: Luis E. Muñoz <luismunoz@cpan.org>,
    Michael Robinton <michael@bizsystems.com>
Upstream-Source: http://search.cpan.org/dist/NetAddr-IP/
Upstream-Name: NetAddr-IP
X-Comment: The +dfsg version is created by removing the non-free RFC from
 the docs/ directory. debian/repack.sh automates this process.

Files: *
Copyright:
 1999-2007, Luis E. Muñoz <luismunoz@cpan.org>
 2006-2008, Michael Robinton <michael@bizsystems.com>
License: Artistic

Files: debian/*
Copyright: 
 2001-2003, Elie Rosenblum <fnord@debian.org>
 2007-2009, various members of the Debian Perl Group, cf. debian/changelog
License: GPL-1+ | Artistic

License: GPL-1+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 1, or (at your option)
    any later version.
    On Debian GNU/Linux systems, the complete text of the GNU General
    Public License can be found in `/usr/share/common-licenses/GPL'

License: Artistic
    This program is free software; you can redistribute it and/or modify
    it under the terms of the Artistic License, which comes with Perl.
    On Debian GNU/Linux systems, the complete text of the Artistic License
    can be found in `/usr/share/common-licenses/Artistic'

Attachment: signature.asc
Description: Digital signature


Reply to: