This is an automated email from the git hooks/post-receive script. lamby pushed a commit to branch master in repository lintian.
commit d49a75f91f6559ce98056469b2f06365e51543db Author: Chris Lamb <la...@debian.org> Date: Sat Dec 23 18:43:32 2017 +0000 checks/source-copyright.{pm,desc}: Also check for NOTICE.txt files (eg. commons-email). --- checks/source-copyright.desc | 4 ++-- checks/source-copyright.pm | 2 +- .../debian/NOTICE.txt | 1 + t/tests/source-copyright-missing-notice-file-for-apache-license/tags | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/checks/source-copyright.desc b/checks/source-copyright.desc index 600e968..21e70ac 100644 --- a/checks/source-copyright.desc +++ b/checks/source-copyright.desc @@ -329,8 +329,8 @@ Tag: missing-notice-file-for-apache-license Severity: serious Certainty: possible Info: The package appears to be licensed under the Apache 2.0 license and - a <tt>NOTICE</tt> file exists in the source tree. However, no files called - <tt>NOTICE</tt> are installed in any of the binary packages. + a <tt>NOTICE</tt> file (or similar) exists in the source tree. However, no + files called <tt>NOTICE</tt> are installed in any of the binary packages. . The Apache 2.0 license requires distributing of such files: . diff --git a/checks/source-copyright.pm b/checks/source-copyright.pm index b7494a9..d0ca819 100644 --- a/checks/source-copyright.pm +++ b/checks/source-copyright.pm @@ -157,7 +157,7 @@ sub _check_apache_notice_files { return if $copyright_path->file_contents !~ m/apache[-\s]+2\./i; my @notice_files = grep { - $_->basename eq 'NOTICE' + $_->basename =~ m/^NOTICE(\.txt)?$/ and $_->is_open_ok and $_->file_contents =~ m/apache/i } $info->sorted_index; diff --git a/t/tests/source-copyright-missing-notice-file-for-apache-license/debian/NOTICE.txt b/t/tests/source-copyright-missing-notice-file-for-apache-license/debian/NOTICE.txt new file mode 100644 index 0000000..6c64526 --- /dev/null +++ b/t/tests/source-copyright-missing-notice-file-for-apache-license/debian/NOTICE.txt @@ -0,0 +1 @@ +This Apache 2.0 license NOTICE is not installed to any binary package. diff --git a/t/tests/source-copyright-missing-notice-file-for-apache-license/tags b/t/tests/source-copyright-missing-notice-file-for-apache-license/tags index 4de1eac..226bf4e 100644 --- a/t/tests/source-copyright-missing-notice-file-for-apache-license/tags +++ b/t/tests/source-copyright-missing-notice-file-for-apache-license/tags @@ -1 +1 @@ -E: source-copyright-missing-notice-file-for-apache-license source: missing-notice-file-for-apache-license NOTICE subdir/NOTICE +E: source-copyright-missing-notice-file-for-apache-license source: missing-notice-file-for-apache-license NOTICE NOTICE.txt subdir/NOTICE -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git