This is an automated email from the git hooks/post-receive script. lamby pushed a commit to branch master in repository lintian.
commit 4b1ace9ca0e58fcfb857aaee31b12f72d217633e Author: Chris Lamb <[email protected]> Date: Sat Jan 27 22:53:20 2018 +1100 checks/source-copyright.{desc,pm}: Warn about packages that specify a Files-Excluded header without a valid Format header as the former will be ignored by uscan(1). Thanks to Gunnar Wolf for the initial patch. (Closes: #745743) --- checks/source-copyright.desc | 16 ++++++++++++++++ checks/source-copyright.pm | 7 +++++++ debian/changelog | 4 ++++ .../debian/debian/copyright | 19 +++++++++++++++++++ .../desc | 6 ++++++ .../tags | 1 + t/tests/source-copyright-source-files-excluded/desc | 2 ++ 7 files changed, 55 insertions(+) diff --git a/checks/source-copyright.desc b/checks/source-copyright.desc index 9240999..264e07c 100644 --- a/checks/source-copyright.desc +++ b/checks/source-copyright.desc @@ -358,3 +358,19 @@ Info: The package appears to be licensed under the Apache 2.0 license and Please include the file in your package, for example by adding <tt>path/to/NOTICE</tt> to a <tt>debian/package.docs</tt> file. Ref: /usr/share/common-licenses/Apache-2.0 + +Tag: files-excluded-without-copyright-format-1.0 +Severity: serious +Certainty: certain +Info: The <tt>Files-Excluded</tt> field in <tt>debian/copyright</tt> is + used to exclude files from upstream source packages such as when they + violate the Debian Free Software Guidelines + . + However, this field will be ignored by uscan(1) if the <tt>copyright</tt> + file is not declared as following the <tt>1.0</tt> format. + . + Please ensure your <tt>debian/copyright</tt> file starts with the + following line: + . + Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Ref: uscan(1) diff --git a/checks/source-copyright.pm b/checks/source-copyright.pm index 52ca8a8..6382f7d 100644 --- a/checks/source-copyright.pm +++ b/checks/source-copyright.pm @@ -175,6 +175,12 @@ sub _check_dep5_copyright { my $contents = $copyright_path->file_contents; my (@dep5, @lines); + if ( $contents =~ m/^Files-Excluded:/ + and $contents + !~ m{^Format:.*/doc/packaging-manuals/copyright-format/1.0$}) { + tag 'files-excluded-ignored-without-copyright-format-1.0'; + } + if ( $contents !~ m{ (?:^ | \n) @@ -186,6 +192,7 @@ sub _check_dep5_copyright { | VERSIONED_FORMAT_URL ) }x ){ + tag 'no-dep5-copyright'; return; } diff --git a/debian/changelog b/debian/changelog index e740c04..623446c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,10 @@ lintian (2.5.73) UNRELEASED; urgency=medium XXX: generate tag summary + * checks/source-copyright.{desc,pm}: + + [CL] Warn about packages that specify a Files-Excluded header without + a valid Format header as the former will be ignored by uscan(1). + Thanks to Gunnar Wolf for the initial patch. (Closes: #745743) * checks/cruft.pm: + [CL] When looking for the source of "build/foo/bar.min.js", also check "src/foo/bar.js". (Closes: #832027) diff --git a/t/tests/source-copyright-files-excluded-without-copyright-format-1.0/debian/debian/copyright b/t/tests/source-copyright-files-excluded-without-copyright-format-1.0/debian/debian/copyright new file mode 100644 index 0000000..fa0be7c --- /dev/null +++ b/t/tests/source-copyright-files-excluded-without-copyright-format-1.0/debian/debian/copyright @@ -0,0 +1,19 @@ +Files-Excluded: foo + +Files: * +Copyright: 2011 J. Random Hacker <[email protected]> +License: GPL-2 + 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; version 2 dated June, 1991. + . + 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 full text of the GNU General Public License version 2 + can be found in the file `/usr/share/common-licenses/GPL-2'. diff --git a/t/tests/source-copyright-files-excluded-without-copyright-format-1.0/desc b/t/tests/source-copyright-files-excluded-without-copyright-format-1.0/desc new file mode 100644 index 0000000..b474f82 --- /dev/null +++ b/t/tests/source-copyright-files-excluded-without-copyright-format-1.0/desc @@ -0,0 +1,6 @@ +Testname: source-copyright-files-excluded-without-copyright-format-1.0 +Version: 1.0-1 +Type: non-native +Description: Test for files listed in Files-Excluded +Test-For: + files-excluded-without-copyright-format-1.0 diff --git a/t/tests/source-copyright-files-excluded-without-copyright-format-1.0/tags b/t/tests/source-copyright-files-excluded-without-copyright-format-1.0/tags new file mode 100644 index 0000000..43161fe --- /dev/null +++ b/t/tests/source-copyright-files-excluded-without-copyright-format-1.0/tags @@ -0,0 +1 @@ +E: source-copyright-files-excluded-without-copyright-format-1.0 source: files-excluded-without-copyright-format-1.0 diff --git a/t/tests/source-copyright-source-files-excluded/desc b/t/tests/source-copyright-source-files-excluded/desc index f9940a7..caea6a6 100644 --- a/t/tests/source-copyright-source-files-excluded/desc +++ b/t/tests/source-copyright-source-files-excluded/desc @@ -2,5 +2,7 @@ Testname: source-copyright-source-files-excluded Version: 1.0-1 Type: non-native Description: Test for files listed in Files-Excluded +Test-Against: + files-excluded-without-copyright-format-1.0 Test-For: source-includes-file-in-files-excluded -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git

