[lintian] 01/01: Stop treating usr/man and usr/X11R6/man as man directories
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 335dba5530600a0391ff5f8807491f8dea6342a5
Author: Niels Thykier <niels@thykier.net>
Date: Sun Oct 1 15:14:05 2017 +0000
Stop treating usr/man and usr/X11R6/man as man directories
Signed-off-by: Niels Thykier <niels@thykier.net>
---
checks/files.desc | 5 ++--
checks/files.pm | 5 ++--
checks/manpages.desc | 4 +--
checks/manpages.pm | 58 ++++++++++++++-----------------------------
debian/changelog | 5 ++++
t/tests/files-foo-in-bar/tags | 1 +
t/tests/manpages-general/tags | 4 +--
7 files changed, 31 insertions(+), 51 deletions(-)
diff --git a/checks/files.desc b/checks/files.desc
index f53d385..8177d17 100644
--- a/checks/files.desc
+++ b/checks/files.desc
@@ -135,9 +135,8 @@ Ref: policy 9.1.2
Tag: stray-directory-in-manpage-directory
Severity: important
Certainty: certain
-Info: This package installs a directory under <tt>/usr/share/man</tt> or
- <tt>/usr/X11R6/man</tt> that isn't a manual section directory or locale
- directory.
+Info: This package installs a directory under <tt>/usr/share/man</tt>
+ that is not a manual section directory or locale directory.
Ref: fhs usrsharemanmanualpages
Tag: executable-manpage
diff --git a/checks/files.pm b/checks/files.pm
index 84cac35..97b8dc2 100644
--- a/checks/files.pm
+++ b/checks/files.pm
@@ -807,9 +807,8 @@ sub run {
tag 'package-contains-mime-file-outside-package-dir',$file;
}
}
- # ---------------- /usr/share/man and /usr/X11R6/man
- elsif ($fname =~ m,^usr/X11R6/man/\S+,
- or $fname =~ m,^usr/share/man/\S+,) {
+ # ---------------- /usr/share/man
+ elsif ($fname =~ m,^usr/share/man/\S+,) {
if ($type eq 'udeb') {
tag 'udeb-contains-documentation-file', $file;
}
diff --git a/checks/manpages.desc b/checks/manpages.desc
index 1fd0b6a..df47026 100644
--- a/checks/manpages.desc
+++ b/checks/manpages.desc
@@ -10,9 +10,7 @@ Severity: important
Certainty: certain
Info: The symbolic link should reference
"<tt>../man[237]/undocumented.[237].gz</tt>" for manual pages in
- <tt>/usr/share/man</tt> or
- "<tt>../../../share/man/man[237]/undocumented.[237].gz</tt>" for manual
- pages in <tt>/usr/X11R6/man</tt>.
+ <tt>/usr/share/man</tt>.
Tag: link-to-undocumented-manpage
Severity: normal
diff --git a/checks/manpages.pm b/checks/manpages.pm
index f770920..1b8c087 100644
--- a/checks/manpages.pm
+++ b/checks/manpages.pm
@@ -76,9 +76,7 @@ sub run {
# manual page?
next
unless ($file->is_symlink or $file->is_file)
- and (($path =~ m,^usr/man(/\S+),o)
- or ($path =~ m,^usr/X11R6/man(/\S+),o)
- or ($path =~ m,^usr/share/man(/\S+),o));
+ and $path =~ m,^usr/share/man(/\S+),o;
my $t = $1;
if ($file =~ m{/_build_} or $file =~ m{_tmp_buildd}) {
@@ -134,41 +132,25 @@ sub run {
# check symbolic links to other manual pages
if ($file->is_symlink) {
if ($link =~ m,(^|/)undocumented,o) {
- if ($path =~ m,^usr/share/man,o) {
- # undocumented link in /usr/share/man -- possibilities
- # undocumented... (if in the appropriate section)
- # ../man?/undocumented...
- # ../../man/man?/undocumented...
- # ../../../share/man/man?/undocumented...
- # ../../../../usr/share/man/man?/undocumented...
- if ((
- #<<< no perl tidy for now
- $link =~ m,^undocumented\.([237])\.gz,o
- and $path =~ m,^usr/share/man/man$1,)
- or $link =~ m,^\.\./man[237]/undocumented\.[237]\.gz$,o
- or $link =~ m,^\.\./\.\./man/man[237]/undocumented\.[237]\.gz$,o
- or $link =~ m,^\.\./\.\./\.\./share/man/man[237]/undocumented\.[237]\.gz$,o
- or $link =~ m,^\.\./\.\./\.\./\.\./usr/share/man/man[237]/undocumented\.[237]\.gz$,o
- #>>>
- ) {
- tag 'link-to-undocumented-manpage', $file;
- } else {
- tag 'bad-link-to-undocumented-manpage', $file;
- }
- } else {
- # undocumented link in /usr/X11R6/man -- possibilities:
- # ../../../share/man/man?/undocumented...
- # ../../../../usr/share/man/man?/undocumented...
- if (
+ # undocumented link in /usr/share/man -- possibilities
+ # undocumented... (if in the appropriate section)
+ # ../man?/undocumented...
+ # ../../man/man?/undocumented...
+ # ../../../share/man/man?/undocumented...
+ # ../../../../usr/share/man/man?/undocumented...
+ if ((
#<<< no perl tidy for now
- $link =~ m,^\.\./\.\./\.\./share/man/man[237]/undocumented\.[237]\.gz$,o
- or $link =~ m,^\.\./\.\./\.\./\.\./usr/share/man/man[237]/undocumented\.[237]\.gz$,o
+ $link =~ m,^undocumented\.([237])\.gz,o
+ and $path =~ m,^usr/share/man/man$1,)
+ or $link =~ m,^\.\./man[237]/undocumented\.[237]\.gz$,o
+ or $link =~ m,^\.\./\.\./man/man[237]/undocumented\.[237]\.gz$,o
+ or $link =~ m,^\.\./\.\./\.\./share/man/man[237]/undocumented\.[237]\.gz$,o
+ or $link =~ m,^\.\./\.\./\.\./\.\./usr/share/man/man[237]/undocumented\.[237]\.gz$,o
#>>>
- ) {
- tag 'link-to-undocumented-manpage', $file;
- } else {
- tag 'bad-link-to-undocumented-manpage', $file;
- }
+ ) {
+ tag 'link-to-undocumented-manpage', $file;
+ } else {
+ tag 'bad-link-to-undocumented-manpage', $file;
}
}
} else { # not a symlink
@@ -326,9 +308,7 @@ sub run {
my $lang = '';
next
unless ($file->is_file or $file->is_symlink)
- and (($path =~ m,^usr/man/\S+,o)
- or ($path =~ m,^usr/X11R6/man/\S+,o)
- or ($path =~ m,^usr/share/man/\S+,o));
+ and $path =~ m,^usr/share/man/\S+,o;
next unless ($path =~ m,man\d/$,o);
$manpage{$fname} = [] unless exists $manpage{$fname};
$lang = $1 if $path =~ m,/([^/]+)/man\d/$,o;
diff --git a/debian/changelog b/debian/changelog
index 34d4198..c91e846 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,11 @@ lintian (2.5.55) UNRELEASED; urgency=medium
"XXX: generate tag summary"
+ * checks/{files,manpages}.{desc,pm}:
+ + [NT] Stop treating usr/man and usr/X11R6/man as manpage directories
+ to simplify some code paths. Nothing ships manpages in these
+ directories and lintian emits tags to strongly discourage people
+ from doing so.
* checks/python.pm:
+ [CL] Move to "Type: source, binary" check type.
+ [CL] Also match packages named "python2-*" as relating to Python 2.x.
diff --git a/t/tests/files-foo-in-bar/tags b/t/tests/files-foo-in-bar/tags
index 1166856..190c308 100644
--- a/t/tests/files-foo-in-bar/tags
+++ b/t/tests/files-foo-in-bar/tags
@@ -74,6 +74,7 @@ E: files-foo-in-bar: subdir-in-bin bin/foo/
E: files-foo-in-bar: subdir-in-usr-bin usr/bin/foo/
E: files-foo-in-bar: udev-rule-in-etc etc/udev/rules.d/bar
P: files-foo-in-bar: image-file-in-usr-lib usr/lib/files-foo-in-bar/bar.png
+W: files-foo-in-bar: binary-without-manpage usr/X11R6/bin/bar
W: files-foo-in-bar: debug-package-should-be-named-dbg usr/lib/debug/bar
W: files-foo-in-bar: executable-not-elf-or-script bin/foo/bar
W: files-foo-in-bar: executable-not-elf-or-script usr/bin/foo/bar
diff --git a/t/tests/manpages-general/tags b/t/tests/manpages-general/tags
index c7e1c13..f0e160f 100644
--- a/t/tests/manpages-general/tags
+++ b/t/tests/manpages-general/tags
@@ -6,7 +6,6 @@ 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
E: manpages-general: manpage-named-after-build-path usr/share/man/man6/_build_buildd-openchangex_1.0-3-i386-mbKpOA_openchange-1.0_simple.6.gz
E: manpages-general: manpage-not-compressed usr/share/man/de/man1/binary-without-english-manpage.1
@@ -21,9 +20,9 @@ E: manpages-general: package-installs-file-to-usr-x11r6 usr/X11R6/man/
E: manpages-general: package-installs-file-to-usr-x11r6 usr/X11R6/man/man1/
E: manpages-general: package-installs-file-to-usr-x11r6 usr/X11R6/man/man1/rstartd.1x.gz
I: manpages-general: FSSTND-dir-in-manual-page usr/share/man/man1/test.1p.gz:13 /var/catman/
-I: manpages-general: spelling-error-in-manpage usr/X11R6/man/man1/rstartd.1x.gz speling spelling
I: manpages-general: spelling-error-in-manpage usr/share/man/man1/program.1.gz speling spelling
W: manpages-general: binary-without-english-manpage usr/bin/binary-without-english-manpage
+W: manpages-general: binary-without-manpage usr/bin/rstartd
W: manpages-general: gz-file-not-gzip usr/share/man/man1/usr-bin-binary-alt.1.gz
W: manpages-general: gz-file-not-gzip usr/share/man/man1/usr-sbin-binary.1.gz
W: manpages-general: link-to-undocumented-manpage usr/share/man/man1/bin-binary.1.gz
@@ -34,5 +33,4 @@ W: manpages-general: manpage-has-errors-from-man usr/share/man/man3/included.3.g
W: manpages-general: manpage-has-errors-from-pod2man usr/share/man/man1/test.1p.gz:19
W: manpages-general: manpage-has-useless-whatis-entry usr/share/man/man1/true.1.gz
W: manpages-general: manpage-locale-dir-country-specific usr/share/man/de_DE/man1/test-utf8-chars.1p.gz
-W: manpages-general: manpage-section-mismatch usr/X11R6/man/man1/rstartd.1x.gz:5 1x != 1
W: manpages-general: manpage-section-mismatch usr/share/man/man6/simple.pod.gz:LINE pod != 6
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: