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

Bug#757671: lintian: allow to check whether known licenses in dep-5 debian/copyright are word-by-word the same



Package: lintian
Version: 2.5.25
Severity: wishlist

Hi,

some known licenses supported by the copyright-format 1.0 [1] are not in
/usr/share/common-licenses and thus have to be copy-pasted verbatim into
debian/copyright. Since their name is well-defined in the spec, lintian
could check whether the content that was pasted into debian/copyright is
indeed word-by-word the same license as the short license name
indicates.

This would supersede the heuristic solution of bug#757545 which decides
whether or not the full license was pasted by its length.

A stricter version of this check could even make sure that indentation
is done correctly and fix bug#700970

There are three blockers for implementing this (quoted from Niels
Thykier):

1) our current data-file setup does not support it, so it would have to
   be extended to handle it (so we can have one license per file)

2) performance/correctness of the comparison (I'd prefer not getting
   more huge regexes that turns out to have obscene runtime on "some
   corner case that we failed to test before releasing it")

3) the problem of reporting it to the user: we have no decent way of
   presenting the diff

Performance concerns could be addressed by checking a checksum of the
normalized forms (collapsed whitespace etc) of the original license and
the version in debian/copyright. Only if the checksum differs, more
analysis would be done.

Since problem 2) and 3) remain unaddressed, filling this bugreport for a
future in which lintian is able to handle both cases.

cheers, josch

[1] https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/#AEN294


-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages lintian depends on:
ii  binutils                       2.24.51.20140617-1
ii  bzip2                          1.0.6-5
ii  diffstat                       1.58-1
ii  file                           1:5.19-1
ii  gettext                        0.18.3.2-3
ii  hardening-includes             2.5
ii  intltool-debian                0.35.0+20060710.1
ii  libapt-pkg-perl                0.1.29+b1
ii  libarchive-zip-perl            1.37-2
ii  libclass-accessor-perl         0.34-1
ii  libclone-perl                  0.37-1
ii  libdpkg-perl                   1.17.10
ii  libemail-valid-perl            1.194-1
ii  libfile-basedir-perl           0.03-1
ii  libipc-run-perl                0.92-1
ii  liblist-moreutils-perl         0.33-2
ii  libparse-debianchangelog-perl  1.2.0-1
ii  libtext-levenshtein-perl       0.09-1
ii  libtimedate-perl               2.3000-2
ii  liburi-perl                    1.62-1
ii  man-db                         2.6.7.1-1
ii  patchutils                     0.3.3-1
ii  perl [libdigest-sha-perl]      5.18.2-6
ii  t1utils                        1.37-2

Versions of packages lintian recommends:
ii  libautodie-perl                 2.25-1
ii  libperlio-gzip-perl             0.18-3
ii  perl-modules [libautodie-perl]  5.18.2-6

Versions of packages lintian suggests:
pn  binutils-multiarch     <none>
ii  dpkg-dev               1.17.10
ii  libhtml-parser-perl    3.71-1+b1
ii  libtext-template-perl  1.46-1
ii  libyaml-perl           0.95-1
ii  xz-utils               5.1.1alpha+20120614-2

-- no debconf information


Reply to: