This is an automated email from the git hooks/post-receive script. lamby pushed a commit to branch master in repository lintian.
commit 9c090548252e7791b7c66a9ab06b26f688e245fb Author: Chris Lamb <[email protected]> Date: Sat May 20 07:49:49 2017 +0200 c/cruft: Check that README.source is not the dh_make template. (Closes: #633850) --- checks/cruft.desc | 9 +++++++++ checks/cruft.pm | 9 +++++++++ debian/changelog | 2 ++ t/tests/cruft-readme-source/debian/debian/README.source | 5 +++++ t/tests/cruft-readme-source/desc | 6 ++++++ t/tests/cruft-readme-source/tags | 1 + 6 files changed, 32 insertions(+) diff --git a/checks/cruft.desc b/checks/cruft.desc index 3b41c62..e0da7c7 100644 --- a/checks/cruft.desc +++ b/checks/cruft.desc @@ -859,3 +859,12 @@ Info: As of Perl 5.20, the vendorarch directory is /usr/lib/<triplet>/perl Please replace that with the value of $Config{vendorarch} configuration parameter, e.g. $(shell perl -MConfig -wE'say substring($$Config{vendorarch},1)') + +Tag: readme-source-is-dh_make-template +Severity: important +Certainty: certain +Info: The debian/README.source file appears to be an unmodified or insufficiently + modified copy of the dh_make template. + . + Please double-check the README.source page and replace it with information + about this source package or simply remove the file completely. diff --git a/checks/cruft.pm b/checks/cruft.pm index c3b9bce..3b6ac11 100644 --- a/checks/cruft.pm +++ b/checks/cruft.pm @@ -681,6 +681,15 @@ sub find_cruft { tag 'debian-upstream-obsolete-path', $name; } + if ( $name eq 'debian/README.source' + && $entry->is_file + && $entry->is_open_ok) { + my $contents = $entry->file_contents; + if (index($contents, 'You WILL either need to modify or delete this file') >= 0) { + tag 'readme-source-is-dh_make-template'; + } + } + # Find mentioning of usr/lib/perl5 inside the packaging if ($name =~ m{^debian/}) { my $short = $entry->basename; diff --git a/debian/changelog b/debian/changelog index db7130e..981b099 100644 --- a/debian/changelog +++ b/debian/changelog @@ -28,6 +28,8 @@ lintian (2.5.51) UNRELEASED; urgency=medium config.sub files. These days debhelper automatically updates them when people use the dh-sequencer and the check is not geared for more thorough analysis. (Closes: #848878) + + [CL] Check that README.source is not the dh_make template. + (Closes: #633850) * checks/debian-readme.{desc,pm}: + [NT] Locate the README.Debian using the index rather than relying on a collection. diff --git a/t/tests/cruft-readme-source/debian/debian/README.source b/t/tests/cruft-readme-source/debian/debian/README.source new file mode 100644 index 0000000..5fdbe79 --- /dev/null +++ b/t/tests/cruft-readme-source/debian/debian/README.source @@ -0,0 +1,5 @@ +cruft-readme-source for Debian +------------------------------ + +<this file describes information about the source package, see Debian policy +manual section 4.14. You WILL either need to modify or delete this file> diff --git a/t/tests/cruft-readme-source/desc b/t/tests/cruft-readme-source/desc new file mode 100644 index 0000000..3f12848 --- /dev/null +++ b/t/tests/cruft-readme-source/desc @@ -0,0 +1,6 @@ +Testname: cruft-readme-source +Sequence: 6000 +Version: 1.0 +Description: Check for cruft in README.source +Test-For: + readme-source-is-dh_make-template diff --git a/t/tests/cruft-readme-source/tags b/t/tests/cruft-readme-source/tags new file mode 100644 index 0000000..99beb25 --- /dev/null +++ b/t/tests/cruft-readme-source/tags @@ -0,0 +1 @@ +E: cruft-readme-source source: readme-source-is-dh_make-template -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git

