[lintian] 01/01: Check for overly-generic manpages such as README.3pm.gz. (Closes: #792846)
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository lintian.
commit b51f243f9df88849750b566e4fff9d28e5c9afb9
Author: Chris Lamb <lamby@debian.org>
Date: Tue Jul 18 22:57:44 2017 +0100
Check for overly-generic manpages such as README.3pm.gz. (Closes: #792846)
---
checks/manpages.desc | 8 ++++++++
checks/manpages.pm | 4 ++++
debian/changelog | 3 +++
t/tests/manpages-general/debian/README.1 | 3 +++
t/tests/manpages-general/debian/debian/rules | 1 +
t/tests/manpages-general/desc | 1 +
t/tests/manpages-general/tags | 1 +
7 files changed, 21 insertions(+)
diff --git a/checks/manpages.desc b/checks/manpages.desc
index 4a31119..1fd0b6a 100644
--- a/checks/manpages.desc
+++ b/checks/manpages.desc
@@ -252,3 +252,11 @@ Info: The manual page appears to be named after its build path and
not after its content.
.
Please check your debian/rules or upstream Makefile.
+
+Tag: manpage-has-overly-generic-name
+Severity: important
+Certainty: certain
+Info: The manual page appears to have an overly generic name that is likely to
+ clash with other packages.
+ .
+ Please check your debian/rules or upstream Makefile.
diff --git a/checks/manpages.pm b/checks/manpages.pm
index 6bcb897..f770920 100644
--- a/checks/manpages.pm
+++ b/checks/manpages.pm
@@ -85,6 +85,10 @@ sub run {
tag 'manpage-named-after-build-path', $file;
}
+ if ($file =~ m,/README\.,) {
+ tag 'manpage-has-overly-generic-name', $file;
+ }
+
if (not $t =~ m,^.*man(\d)/$,o) {
tag 'manpage-in-wrong-directory', $file;
next;
diff --git a/debian/changelog b/debian/changelog
index 0e5cd59..c61f0db 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -55,6 +55,9 @@ lintian (2.5.52) UNRELEASED; urgency=medium
* checks/init.d.desc:
+ [CL] Add an example snippet to explain how to prevent emission
of init.d-script-sourcing-without-test.
+ * checks/manpages.{desc,pm}:
+ + [CL] Check for overly-generic filenames such as README.3pm.gz.
+ (Closes: #792846)
* checks/menu-format.desc:
+ [ADB] Fix formatting of desktop-entry-lacks-icon-entry
* checks/scripts.desc:
diff --git a/t/tests/manpages-general/debian/README.1 b/t/tests/manpages-general/debian/README.1
new file mode 100644
index 0000000..d884f62
--- /dev/null
+++ b/t/tests/manpages-general/debian/README.1
@@ -0,0 +1,3 @@
+.TH PROGRAM 1 "2013-07-22"
+.SH NAME
+README \- dummy manual page
diff --git a/t/tests/manpages-general/debian/debian/rules b/t/tests/manpages-general/debian/debian/rules
index 1b2d42a..486c5fd 100755
--- a/t/tests/manpages-general/debian/debian/rules
+++ b/t/tests/manpages-general/debian/debian/rules
@@ -23,6 +23,7 @@ override_dh_auto_install:
gzip -n -c9 < test.1p > $(tmp)/usr/share/man/man1/test.1p.gz
gzip -n -c9 < test.3p > $(tmp)/usr/share/man/man3/test.3p.gz
gzip -n -c9 < true.1 > $(tmp)/usr/share/man/man1/true.1.gz
+ gzip -n -c9 < README.1 > $(tmp)/usr/share/man/man1/README.1.gz
gzip -n -c9 < program.1 > $(tmp)/usr/share/man/man1/program.1.gz
ln -s ../X11R6/bin/rstartd $(tmp)/usr/bin/rstartd
diff --git a/t/tests/manpages-general/desc b/t/tests/manpages-general/desc
index f7abb79..44562bd 100644
--- a/t/tests/manpages-general/desc
+++ b/t/tests/manpages-general/desc
@@ -11,6 +11,7 @@ Test-For:
manpage-has-bad-whatis-entry
manpage-has-errors-from-man
manpage-has-errors-from-pod2man
+ manpage-has-overly-generic-name
manpage-has-useless-whatis-entry
manpage-has-wrong-extension
manpage-is-dh_make-template
diff --git a/t/tests/manpages-general/tags b/t/tests/manpages-general/tags
index 18ebbe0..c7e1c13 100644
--- a/t/tests/manpages-general/tags
+++ b/t/tests/manpages-general/tags
@@ -4,6 +4,7 @@ E: manpages-general: empty-manual-page usr/share/man/de/man1/binary-without-engl
E: manpages-general: empty-manual-page usr/share/man/man1/usr-bin-binary-alt.1.gz
E: manpages-general: empty-manual-page usr/share/man/man1/usr-sbin-binary.1.gz
E: manpages-general: empty-manual-page usr/share/man/man6/usr-games-binary.6.gz
+E: manpages-general: manpage-has-overly-generic-name usr/share/man/man1/README.1.gz
E: manpages-general: manpage-has-wrong-extension usr/share/man/man6/simple.pod.gz
E: manpages-general: manpage-is-dh_make-template usr/X11R6/man/man1/rstartd.1x.gz
E: manpages-general: manpage-is-dh_make-template usr/share/man/man1/program.1.gz
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: