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

[SCM] Debian package checker branch, master, updated. 2.5.2-71-gc5d007d



The following commit has been merged in the master branch:
commit 15e653f350311616c38a8ad33fce69eb238adeef
Author: Jakub Wilk <jwilk@debian.org>
Date:   Wed Aug 31 11:28:59 2011 +0200

    Check for CR(LF) ending in copyright files
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/checks/copyright-file b/checks/copyright-file
index 1262748..3dcaf3c 100644
--- a/checks/copyright-file
+++ b/checks/copyright-file
@@ -130,6 +130,10 @@ if ($line) {
 $_ = slurp_entire_file('copyright');
 study $_;
 
+if (m,\r,) {
+    tag 'copyright-has-crs';
+}
+
 my $wrong_directory_detected = 0;
 
 if (m,\<fill in (?:http/)?ftp site\>, or m/\<Must follow here\>/) {
diff --git a/checks/copyright-file.desc b/checks/copyright-file.desc
index 64f774f..be1ea49 100644
--- a/checks/copyright-file.desc
+++ b/checks/copyright-file.desc
@@ -391,3 +391,13 @@ Info: The copyright file refers to
  .
  This file may be removed from a future version of base-files if
  references to it drop sufficiently.
+
+Tag: copyright-has-crs
+Severity: pedantic
+Certainty: certain
+Info: The copyright file has lines ending in CRLF instead of just LF.
+ .
+ Running the following command against the given file removes any
+ <tt>CR</tt> character in the file:
+ .
+ <tt>sed -i 's/\r//g' path/to/file</tt>
diff --git a/debian/changelog b/debian/changelog
index 981ba0a..3fc71d0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ lintian (2.5.3) UNRELEASED; urgency=low
     + Added:
       - boilerplate-copyright-format-uri
       - comma-separated-files-in-dep5-copyright
+      - copyright-has-crs
       - debian-copyright-is-symlink
       - dh_installmanpages-is-obsolete
       - missing-field-in-dep5-copyright
@@ -25,6 +26,9 @@ lintian (2.5.3) UNRELEASED; urgency=low
       LANG.  (Closes: #637595)
   * checks/{conffile,etcfiles}{,.desc}:
     + [JW] Merged etcfiles into conffile.  (Closes: #637590)
+  * checks/copyright-file{,.desc}:
+    + [JW] Check for CRLF line endings in copyright files.
+      (Closes: #634191)
   * checks/debhelper:
     + [NT] Recognise /usr/share/R/debian/r-cran.mk as a cdbs-based
       build.  This prevents false-positive "unneeded cdbs" warning.
diff --git a/t/tests/copyright-file-general/debian/debian/control.in b/t/tests/copyright-file-general/debian/debian/control.in
index 707959e..3cf834a 100644
--- a/t/tests/copyright-file-general/debian/debian/control.in
+++ b/t/tests/copyright-file-general/debian/debian/control.in
@@ -194,3 +194,16 @@ Description: checks not referring to common licenses
  Lintian.  It is part of the Lintian test suite and may do very odd
  things.  It should not be installed like a regular package.  It may
  be an empty package.
+
+Package: copyright-crln
+Architecture: all
+Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
+Description: check for Windows newlines
+ This package should trigger a tag for having Windows newlines in
+ the copyright file.
+ .
+ This is a test package designed to exercise some feature or tag of
+ Lintian.  It is part of the Lintian test suite and may do very odd
+ things.  It should not be installed like a regular package.  It may
+ be an empty package.
+
diff --git a/t/tests/copyright-file-general/debian/debian/copyright-no-errors.copyright b/t/tests/copyright-file-general/debian/debian/copyright-crln.copyright
similarity index 92%
copy from t/tests/copyright-file-general/debian/debian/copyright-no-errors.copyright
copy to t/tests/copyright-file-general/debian/debian/copyright-crln.copyright
index 071e0f3..43b49cf 100644
--- a/t/tests/copyright-file-general/debian/debian/copyright-no-errors.copyright
+++ b/t/tests/copyright-file-general/debian/debian/copyright-crln.copyright
@@ -1,36 +1,36 @@
-This package was debianized by Tobias Toedter <t.toedter@gmx.net> on
-Thu, 20 Mar 2008 23:48:15 +0100
-
-It was downloaded from <http://www.example.org/>
-
-Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?recall=184
-
-Upstream Authors: 
-
-    Tobias Toedter <t.toedter@gmx.net>
-
-Copyright: 
-
-    Copyright (C) 2008 Tobias Toedter
-
-License:
-
-    This package 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 2 of the License, or
-    (at your option) any later version.
- 
-    This package is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
- 
-    You should have received a copy of the GNU General Public License
-    along with this package; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-
-On Debian systems, the complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL'.
-
-The Debian packaging is Copyright 2008, Tobias Toedter <t.toedter@gmx.net>
-and is licensed under the GPL, see above.
+This package was debianized by Tobias Toedter <t.toedter@gmx.net> on
+Thu, 20 Mar 2008 23:48:15 +0100
+
+It was downloaded from <http://www.example.org/>
+
+Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?recall=184
+
+Upstream Authors: 
+
+    Tobias Toedter <t.toedter@gmx.net>
+
+Copyright: 
+
+    Copyright (C) 2008 Tobias Toedter
+
+License:
+
+    This package 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 2 of the License, or
+    (at your option) any later version.
+ 
+    This package is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+ 
+    You should have received a copy of the GNU General Public License
+    along with this package; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL-2'.
+
+The Debian packaging is Copyright 2008, Tobias Toedter <t.toedter@gmx.net>
+and is licensed under the GPL, see above.
diff --git a/t/tests/copyright-file-general/debian/debian/copyright-no-errors.copyright b/t/tests/copyright-file-general/debian/debian/copyright-no-errors.copyright
index 071e0f3..d31a720 100644
--- a/t/tests/copyright-file-general/debian/debian/copyright-no-errors.copyright
+++ b/t/tests/copyright-file-general/debian/debian/copyright-no-errors.copyright
@@ -30,7 +30,7 @@ License:
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
 On Debian systems, the complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL'.
+Public License can be found in `/usr/share/common-licenses/GPL-2'.
 
 The Debian packaging is Copyright 2008, Tobias Toedter <t.toedter@gmx.net>
 and is licensed under the GPL, see above.
diff --git a/t/tests/copyright-file-general/desc b/t/tests/copyright-file-general/desc
index 20af005..284e89e 100644
--- a/t/tests/copyright-file-general/desc
+++ b/t/tests/copyright-file-general/desc
@@ -2,6 +2,8 @@ Testname: copyright-file-general
 Sequence: 6000
 Version: 1.0
 Description: Test checking of copyright files
+Skeleton: pedantic
+Options: -IE --pedantic
 Test-For:
  FSSTND-dir-in-usr
  copyright-contains-dh-make-perl-boilerplate
@@ -12,6 +14,7 @@ Test-For:
  copyright-file-contains-full-gpl-license
  copyright-file-is-symlink
  copyright-file-lacks-pointer-to-perl-license
+ copyright-has-crs
  copyright-has-url-from-dh_make-boilerplate
  copyright-refers-to-bad-php-license
  copyright-refers-to-compressed-license
diff --git a/t/tests/copyright-file-general/tags b/t/tests/copyright-file-general/tags
index 9a588c8..2be0a69 100644
--- a/t/tests/copyright-file-general/tags
+++ b/t/tests/copyright-file-general/tags
@@ -19,6 +19,7 @@ E: copyright-php: copyright-refers-to-bad-php-license
 E: copyright-php: copyright-refers-to-problematic-php-license
 E: copyright-poor-common-licenses: copyright-should-refer-to-common-license-file-for-gpl
 E: copyright-symlink: copyright-file-is-symlink
+P: copyright-crln: copyright-has-crs
 W: copyright-compressed: copyright-without-copyright-notice
 W: copyright-full-apache-2: copyright-without-copyright-notice
 W: copyright-iso-8859-1: debian-copyright-file-uses-obsolete-national-encoding at line 3

-- 
Debian package checker


Reply to: