Bug#687452: devscripts: fails to recognize licenses in (fixed-form) Fortran code
Francesco Poli (wintermute)
invernomuto at paranoici.org
Wed Sep 12 20:43:43 UTC 2012
Package: devscripts
Version: 2.12.2
Severity: normal
Hello Devscripts Devel Team,
thanks for maintaining and developing this collection of useful tools!
I noticed that licensecheck seems to be unable to recognize licenses in
(fixed-form) Fortran code.
Here's a minimal test case to reproduce the bug:
$ ls
simple.c simple.f
$ cat simple.c
/* simple - A simple C program
*
*
* Copyright (c) 2012, Francesco Poli All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <stdio.h>
int
main()
{
printf(" Hi there!\n");
return 0;
}
$ cat simple.f
c simple - A simple Fortran program
c
c
c Copyright (c) 2012, Francesco Poli All rights reserved.
c
c Redistribution and use in source and binary forms, with or without
c modification, are permitted provided that the following conditions are
c met:
c
c - Redistributions of source code must retain the above copyright
c notice, this list of conditions and the following disclaimer.
c
c - Redistributions in binary form must reproduce the above copyright
c notice, this list of conditions and the following disclaimer in the
c documentation and/or other materials provided with the
c distribution.
c
c THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
c IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
c TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
c PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
c HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
c SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
c LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
c DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
c THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
c (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
c OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
c
c
program main
write(*,*) "Hi there!"
stop
end
$ licensecheck --copyright .
./simple.f: UNKNOWN
[Copyright: HOLDERS AND CONTRIBUTORS "AS / 2012, Francesco Poli All rights reserved]
./simple.c: BSD (2 clause)
[Copyright: HOLDERS AND CONTRIBUTORS "AS / 2012, Francesco Poli All rights reserved]
As it can be seen, licensecheck correctly detects the 2-clause BSD license
in C code comments, while it fails to recognize the same exact license in
Fortran code comments.
I hope that fixing this issue is not too hard and may be done soon
(through an upload to experimental, since I don't expect behavioral changes
in unstable or testing during a freeze...).
Thanks for your time!
-- Package-specific info:
--- /etc/devscripts.conf ---
--- ~/.devscripts ---
Not present
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (800, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages devscripts depends on:
ii dpkg-dev 1.16.8
ii libc6 2.13-35
ii perl 5.14.2-12
ii python 2.7.3~rc2-1
Versions of packages devscripts recommends:
ii at 3.1.13-2
ii curl 7.26.0-1
ii dctrl-tools 2.22.2
ii debian-keyring 2012.06.01
ii dput 0.9.6.3
ii equivs 2.0.9
ii fakeroot 1.18.4-2
ii gnupg 1.4.12-4+b1
ii libcrypt-ssleay-perl 0.58-1
pn libdistro-info-perl <none>
pn libjson-perl <none>
ii libparse-debcontrol-perl 2.005-3
ii libsoap-lite-perl 0.714-1
ii liburi-perl 1.60-1
ii libwww-perl 6.04-1
ii lintian 2.5.10.1
ii man-db 2.6.2-1
ii patch 2.6.1-3
ii patchutils 0.3.2-1.1
ii python-debian 0.1.21
pn python-magic <none>
ii sensible-utils 0.0.7
ii strace 4.5.20-2.3
ii unzip 6.0-7
ii wdiff 1.1.2-1
ii wget 1.13.4-3
ii xz-utils 5.1.1alpha+20120614-1
Versions of packages devscripts suggests:
ii bsd-mailx [mailx] 8.1.2-0.20111106cvs-1
ii build-essential 11.5
pn cvs-buildpackage <none>
pn devscripts-el <none>
pn gnuplot <none>
ii libauthen-sasl-perl 2.1500-1
pn libfile-desktopentry-perl <none>
ii libnet-smtp-ssl-perl 1.01-3
pn libterm-size-perl <none>
ii libtimedate-perl 1.2000-1
pn libyaml-syck-perl <none>
ii mutt 1.5.21-6.2
ii openssh-client [ssh-client] 1:6.0p1-3
pn svn-buildpackage <none>
ii w3m 0.5.3-8
-- no debconf information
More information about the devscripts-devel
mailing list