Bug#862827: licensecheck: MPL check too simple, causes false positives

2017-07-05 Thread Jonas Smedegaard
Hi Axel,

Quoting Axel Beckert (2017-05-17 15:19:48)
> the attached file is reported by licensecheck as follows:
> 
>   /tmp/dns.h: MPL GPL (v2 or later) (with incorrect FSF address)
> 
> But the only line in which the string "MPL" appears is this line:
> 
>   #define DNS_SE_CHK_NOTIMPL  0x0008
> 
> (The original example with which I ran into that issue is
> https://github.com/gamelinux/passivedns/blob/master/src/dns.h)
> 
> Please check at least that MPL is matched as word and not as simple
> substring, i.e. "\bMPL\b" or similar. But preferable the check should be
> still a little bit more sophisticated than that.

I finally took some time for this issue, and believe to have nailed it: 
Patterns now no longer consist only of abbreviation, but will need at 
least another word in front (either "the", or where applicable "gnu", or 
both), and those abbreviation patterns not part of a larger version 
pattern (like "LGPL" part of "LGPLv2") also now has a \b as stop-gap.  
Ideally the version stuff would be integral to the pattern, but that is 
for a later refactoring - these minor changes should catch most 
annoyances like the one reported, I believe.

3.0.30 was released to CPAN few hours ago, and when reports from 
cpantesters arrive (assuming their are not bad) I'll release to Debian.

Thanks for reporting!

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Bug#862827: licensecheck: MPL check too simple, causes false positives

2017-05-17 Thread Axel Beckert
Package: licensecheck
Version: 3.0.29-1

Dear Maintainer,

the attached file is reported by licensecheck as follows:

  /tmp/dns.h: MPL GPL (v2 or later) (with incorrect FSF address)

But the only line in which the string "MPL" appears is this line:

  #define DNS_SE_CHK_NOTIMPL  0x0008

(The original example with which I ran into that issue is
https://github.com/gamelinux/passivedns/blob/master/src/dns.h)

Please check at least that MPL is matched as word and not as simple
substring, i.e. "\bMPL\b" or similar. But preferable the check should be
still a little bit more sophisticated than that.

-- System Information:
Debian Release: 9.0
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages licensecheck depends on:
ii  libgetopt-long-descriptive-perl   0.100-1
ii  libmoo-perl   2.002005-1
ii  libnamespace-clean-perl   0.27-1
ii  libpath-iterator-rule-perl1.009-1
ii  libpath-tiny-perl 0.100-1
ii  libpod-constants-perl 0.19-1
ii  libscalar-list-utils-perl 1:1.47-1
ii  libsort-key-perl  1.33-1+b3
ii  libstrictures-perl2.03-1
ii  libstring-copyright-perl  0.003005-1
ii  libstring-escape-perl 2010.002-1
ii  libtry-tiny-perl  0.28-1
ii  perl  5.24.1-2
ii  perl-base [libscalar-list-utils-perl] 5.24.1-2
ii  perl-modules-5.24 [libexperimental-perl]  5.24.1-2

Versions of packages licensecheck recommends:
ii  bash-completion  1:2.1-4.3

licensecheck suggests no packages.

-- no debconf information