Author: rra
Date: 2008-02-08 05:06:00 +0100 (Fri, 08 Feb 2008)
New Revision: 1187

Modified:
   trunk/checks/copyright-file
   trunk/checks/copyright-file.desc
   trunk/debian/changelog
   trunk/testset/cdbs-test/debian/copyright
   trunk/testset/debug/debian/copyright
   trunk/testset/foo++/debian/copyright
   trunk/testset/non-us/debian/rules
   trunk/testset/scripts/debian/copyright
   trunk/testset/tags.dh-test
Log:
* checks/copyright-file{.desc,}:
  + [RA] Check the copyright file to ensure it contains at least one
    copyright statement with a date or the term "public domain".  It's
    hard to be thorough without false positives, but this should catch
    the most obvious omissions.  Thanks, Justin Pryzby and Jari Aalto.
    (Closes: #286842, #409131)

Modified: trunk/checks/copyright-file
===================================================================
--- trunk/checks/copyright-file 2008-02-08 03:32:50 UTC (rev 1186)
+++ trunk/checks/copyright-file 2008-02-08 04:06:00 UTC (rev 1187)
@@ -33,6 +33,7 @@
 my $ppkg = quotemeta($pkg);
 
 my $found = 0;
+my $linked = 0;
 
 use lib "$ENV{'LINTIAN_ROOT'}/checks/";
 use common_data;
@@ -72,6 +73,7 @@
        my ($link) = ($1);
 
        $found = 1;
+       $linked = 1;
 
        # check if this symlink references a directory elsewhere
        if ($link =~ m,^(\.\.)?/,) {
@@ -236,6 +238,10 @@
     tag "copyright-contains-dh_make-todo-boilerplate", "";
 }
 
+if ($found && !$linked && 
!/(Copyright|Copr\.|\302\251)(.*|[:\s]+)\b\d{4}\b|\bpublic\s+domain\b/) {
+    tag 'copyright-without-copyright-notice';
+}
+
 spelling_check('spelling-error-in-copyright', $_);
 
 # Now, check for linking against libssl if the package is covered by the GPL.

Modified: trunk/checks/copyright-file.desc
===================================================================
--- trunk/checks/copyright-file.desc    2008-02-08 03:32:50 UTC (rev 1186)
+++ trunk/checks/copyright-file.desc    2008-02-08 04:06:00 UTC (rev 1187)
@@ -190,6 +190,21 @@
  to find additional copyright/license, or that you didn't remove that
  paragraph after having done so.
 
+Tag: copyright-without-copyright-notice
+Type: warning
+Ref: http://ftp-master.debian.org/REJECT-FAQ.html
+Info: The copyright file for this package does not appear to contain a
+ copyright notice.  You should copy the copyright notice from the upstream
+ source (or add one of your own for a native package).  A copyright notice
+ must consist of Copyright, Copr., or the Unicode symbol of C in a circle
+ followed by the years and the copyright holder.
+ .
+ If the package is in the public domain rather than copyrighted, be sure
+ to mention "public domain" in the copyright file.  Please be aware that
+ this is very rare and not the same as a DFSG-free license.  True public
+ domain software is generally limited to such special cases as a work
+ product of a United States government agency.
+
 Tag: spelling-error-in-copyright
 Type: warning
 Info: Lintian found a spelling error in the copyright file.  Lintian has a

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-02-08 03:32:50 UTC (rev 1186)
+++ trunk/debian/changelog      2008-02-08 04:06:00 UTC (rev 1187)
@@ -3,6 +3,12 @@
   * checks/binaries:
     + [RA] Make an architecture specification after perlapi optional.
       Thanks, gregor herrmann.  (Closes: #464626)
+  * checks/copyright-file{.desc,}:
+    + [RA] Check the copyright file to ensure it contains at least one
+      copyright statement with a date or the term "public domain".  It's
+      hard to be thorough without false positives, but this should catch
+      the most obvious omissions.  Thanks, Justin Pryzby and Jari Aalto.
+      (Closes: #286842, #409131)
   * checks/fields:
     + [RA] Warn of build-dependencies on a Debian revision of -1.  They
       make backporting unnecessarily difficult.  Thanks, Erich Schubert.
@@ -17,7 +23,7 @@
       even if accurate without capitalization.  Thanks, Nelson A. de
       Oliveira.  (Closes: #464461)
 
- -- Russ Allbery <[EMAIL PROTECTED]>  Wed, 06 Feb 2008 18:34:36 -0800
+ -- Russ Allbery <[EMAIL PROTECTED]>  Thu, 07 Feb 2008 20:03:20 -0800
 
 lintian (1.23.43) unstable; urgency=low
 

Modified: trunk/testset/cdbs-test/debian/copyright
===================================================================
--- trunk/testset/cdbs-test/debian/copyright    2008-02-08 03:32:50 UTC (rev 
1186)
+++ trunk/testset/cdbs-test/debian/copyright    2008-02-08 04:06:00 UTC (rev 
1187)
@@ -1,2 +1,5 @@
 This package was debianized by Frank Lichtenheld <[EMAIL PROTECTED]> on
 Thu,  4 Aug 2005 23:09:00 +0200.
+
+Test copyright date handling:
+Copyright 2005 Frank Lichtenheld

Modified: trunk/testset/debug/debian/copyright
===================================================================
--- trunk/testset/debug/debian/copyright        2008-02-08 03:32:50 UTC (rev 
1186)
+++ trunk/testset/debug/debian/copyright        2008-02-08 04:06:00 UTC (rev 
1187)
@@ -1 +1,2 @@
 Written Sat, 04 Mar 2006 21:30:01 -0800 by Russ Allbery <[EMAIL PROTECTED]>.
+Copyright Russ Allbery 2006

Modified: trunk/testset/foo++/debian/copyright
===================================================================
--- trunk/testset/foo++/debian/copyright        2008-02-08 03:32:50 UTC (rev 
1186)
+++ trunk/testset/foo++/debian/copyright        2008-02-08 04:06:00 UTC (rev 
1187)
@@ -3,3 +3,5 @@
 
 However, there is also a reference to /usr/share/common-licenses/LGPL, so
 who knows what bits actually depend on libssl.
+
+Copr. 2007 Somebody.

Modified: trunk/testset/non-us/debian/rules
===================================================================
--- trunk/testset/non-us/debian/rules   2008-02-08 03:32:50 UTC (rev 1186)
+++ trunk/testset/non-us/debian/rules   2008-02-08 04:06:00 UTC (rev 1187)
@@ -20,7 +20,7 @@
        # crypto-app
        install -d debian/$(CRYPTO)-tmp/DEBIAN
        install -d debian/$(CRYPTO)-tmp/usr/share/doc/$(CRYPTO)
-       echo copyright >  debian/$(CRYPTO)-tmp/usr/share/doc/$(CRYPTO)/copyright
+       echo '© 2000' > debian/$(CRYPTO)-tmp/usr/share/doc/$(CRYPTO)/copyright
        dpkg-gencontrol -isp -p$(CRYPTO) -Pdebian/$(CRYPTO)-tmp
        dpkg --build debian/$(CRYPTO)-tmp ..
 

Modified: trunk/testset/scripts/debian/copyright
===================================================================
--- trunk/testset/scripts/debian/copyright      2008-02-08 03:32:50 UTC (rev 
1186)
+++ trunk/testset/scripts/debian/copyright      2008-02-08 04:06:00 UTC (rev 
1187)
@@ -1,2 +1,5 @@
 This file contains the phrase "under the same terms as Perl itself" to
 trigger warnings about not having common-licenses references.
+
+This file contains the phrase "public domain" which should suppress
+warnings about no copyright date.

Modified: trunk/testset/tags.dh-test
===================================================================
--- trunk/testset/tags.dh-test  2008-02-08 03:32:50 UTC (rev 1186)
+++ trunk/testset/tags.dh-test  2008-02-08 04:06:00 UTC (rev 1187)
@@ -8,6 +8,7 @@
 W: dh-test source: native-package-with-dash-version
 W: dh-test source: out-of-date-standards-version 3.6.2 (current is 3.7.3)
 W: dh-test source: package-uses-deprecated-debhelper-compat-version 3
+W: dh-test: copyright-without-copyright-notice
 W: dh-test: new-package-should-close-itp-bug
 W: dh-test: readme-debian-contains-debmake-template
 W: dh-test: wrong-bug-number-in-closes l3:#nnnn


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to