lintian: r148 - in trunk: checks debian testset testset/filenames/debian
Author: he
Date: 2004-04-11 17:49:33 +0200 (Sun, 11 Apr 2004)
New Revision: 148
Modified:
trunk/checks/files
trunk/checks/files.desc
trunk/debian/changelog
trunk/testset/filenames/debian/changelog
trunk/testset/filenames/debian/rules
trunk/testset/info_tags.filenames
trunk/testset/tags.filenames
Log:
checks/files:
+ [HE] New checks for deprecated X11 dirs (/usr/{bin,lib,include}/X11 and
usr/X11R6/*). (Closes: #81004)
Modified: trunk/checks/files
===================================================================
--- trunk/checks/files 2004-04-11 14:52:05 UTC (rev 147)
+++ trunk/checks/files 2004-04-11 15:49:33 UTC (rev 148)
@@ -26,6 +26,7 @@
my $type = shift;
my $file;
+my $source_pkg;
my $is_python;
my $is_perl;
my $has_binary_perl_file;
@@ -52,6 +53,11 @@
}
close(IN);
+#Get source package name, if possible
+if (open (SOURCE, "fields/source")) {
+ chomp ($source_pkg = (<SOURCE> || ""));
+}
+
# find out which files are scripts
open(SCRIPTS, "scripts") or fail("cannot open lintian scripts file: $!");
while (<SCRIPTS>) {
@@ -202,6 +208,20 @@
elsif ($file =~ m,usr/X11R6/lib/X11/app-defaults,) {
print "E: $pkg $type: old-app-defaults-directory $file\n";
}
+
+ #----------------- /usr/{lib,bin,include}/X11/
+ elsif ($file =~ m,^usr/(?:lib|bin|include)/X11/,) {
+ print "E: $pkg $type: package-installs-file-to-usr-something-x11 $file\n";
+ }
+
+ #----------------- /usr/X11R6/
+ elsif ($file =~ m,^usr/X11R6/, and
+ $file !~ m,^usr/X11R6/lib/X11/fonts, and #font packages are allowed
+ $perm !~ m,^l, and #links to FHS locations are encouraged
+ $source_pkg ne "xfree86") { #The X Window System is allowed to do anything
+ print "W: $pkg $type: packages-installs-file-to-usr-x11r6 $file\n";
+ }
+
# ---------------- /usr/lib/sgml
elsif ($file =~ m,^usr/lib/sgml/\S,) {
if ($perm =~ m/^-.*[xs]/) {
Modified: trunk/checks/files.desc
===================================================================
--- trunk/checks/files.desc 2004-04-11 14:52:05 UTC (rev 147)
+++ trunk/checks/files.desc 2004-04-11 15:49:33 UTC (rev 148)
@@ -4,7 +4,7 @@
Standards-Version: 3.5.0
Type: binary, udeb
Unpack-Level: 1
-Needs-Info: objdump-info
+Needs-Info: objdump-info, scripts
Info: This script checks if a binary package conforms to policy
WRT to files and directories.
@@ -23,6 +23,24 @@
this prevents X from replacing it with a compatability symlink.
Ref: policy 11.8.6
+Tag: package-installs-file-to-usr-something-x11
+Type: error
+Info: Packages must not provide or install files into the directories
+ /usr/bin/X11/, /usr/include/X11/ or /usr/lib/X11/.
+Ref: policy 11.8.7
+
+Tag: packages-installs-file-to-usr-x11r6
+Type: warning
+Info: Packages using the X Window System should not be configured to install
+ files under the /usr/X11R6/ directory unless they use imake. The /usr/X11R6/
+ directory hierarchy should be regarded as deprecated for all packages except
+ the X Window System itself.
+ .
+ Programs that use GNU autoconf and automake are usually easily configured at
+ compile time to use /usr/ instead of /usr/X11R6/, and this should be done
+ whenever possible.
+Ref: policy 11.8.7
+
Tag: config-file-reserved $file
Type: error
Info: This file is reserved by a specific package. Please email the
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2004-04-11 14:52:05 UTC (rev 147)
+++ trunk/debian/changelog 2004-04-11 15:49:33 UTC (rev 148)
@@ -55,6 +55,8 @@
(Closes: #204801, #218304)
+ [HE] Check for *.ali files introduced, warn if their permissions are !=
0444. (Closes: #226879)
+ + [HE] New checks for deprecated X11 dirs (/usr/{bin,lib,include}/X11 and
+ usr/X11R6/*). (Closes: #81004)
* checks/manpages:
+ [FL] New checks:
- Section number of directory and file differ
Modified: trunk/testset/filenames/debian/changelog
===================================================================
--- trunk/testset/filenames/debian/changelog 2004-04-11 14:52:05 UTC (rev 147)
+++ trunk/testset/filenames/debian/changelog 2004-04-11 15:49:33 UTC (rev 148)
@@ -1,3 +1,10 @@
+filenames (10) unstable; urgency=low
+
+ * Some new files to check the checks for the use of /usr/*/X11 and
+ /usr/X11R6/*.
+
+ -- Marc 'HE' Brockschmidt <he@debian.org> Sun, 11 Apr 2004 17:35:20 +0200
+
filenames (9) unstable; urgency=low
* Add a two *.ali files, one with the right permission, one with
Modified: trunk/testset/filenames/debian/rules
===================================================================
--- trunk/testset/filenames/debian/rules 2004-04-11 14:52:05 UTC (rev 147)
+++ trunk/testset/filenames/debian/rules 2004-04-11 15:49:33 UTC (rev 148)
@@ -52,6 +52,10 @@
touch debian/tmp/usr/lib/ada/adalib/test.ali debian/tmp/usr/lib/ada/adalib/test2.ali
chmod 0644 debian/tmp/usr/lib/ada/adalib/test.ali
chmod 0444 debian/tmp/usr/lib/ada/adalib/test2.ali
+ install -d debian/tmp/usr/bin/X11/
+ touch debian/tmp/usr/bin/X11/testxbin
+ install -d debian/tmp/usr/X11R6/bin
+ touch debian/tmp/usr/X11R6/bin/testxbin2
touch debian/tmp/usr/share/doc/filenames/Changes
chmod 644 debian/tmp/usr/share/doc/filenames/Changes
gzip -9 debian/tmp/usr/share/doc/filenames/Changes
Modified: trunk/testset/info_tags.filenames
===================================================================
--- trunk/testset/info_tags.filenames 2004-04-11 14:52:05 UTC (rev 147)
+++ trunk/testset/info_tags.filenames 2004-04-11 15:49:33 UTC (rev 148)
@@ -32,6 +32,20 @@
N: accident, since transient CVS data usually doesn't belong in packages.
N: Export from CVS rather than use a checkout.
N:
+E: filenames: binary-without-manpage testxbin
+N:
+N: Each binary in /usr/bin, /usr/sbin, /bin, /sbin, or /usr/games, must
+N: have a manual page.
+N:
+N: Note, that though the `man' program has the capability to check for
+N: several program names in the NAMES section, each of these programs
+N: must have its own manual page (a symbolic link to the appropriate
+N: manual page is sufficient) because other manual page viewers such as
+N: xman or tkman don't support this.
+N:
+N: Refer to Policy Manual, section 12.1 for details.
+N:
+E: filenames: binary-without-manpage testxbin2
E: filenames: non-standard-toplevel-dir files/
N:
N: The Filesystem Hierarchy Standard forbids the installation of new
@@ -112,6 +126,37 @@
N:
W: filenames: zero-byte-file-in-doc-directory usr/share/doc/filenames/examples/very_interesting_example2.gz
W: filenames: zero-byte-file-in-doc-directory usr/share/doc/filenames/Changes.gz
+E: filenames: package-installs-file-to-usr-something-x11 usr/bin/X11/
+N:
+N: Packages must not provide or install files into the directories
+N: /usr/bin/X11/, /usr/include/X11/ or /usr/lib/X11/.
+N:
+N: Refer to Policy Manual, section 11.8.7 for details.
+N:
+E: filenames: use-of-compat-symlink usr/bin/X11/
+N:
+N: This package uses a directory that, according to the Filesystem
+N: Hierarchy Standard, should exist only as a compatibility symlink.
+N: Packages should not traverse such symlinks when installing files, they
+N: should use the standard directories instead.
+N:
+E: filenames: package-installs-file-to-usr-something-x11 usr/bin/X11/testxbin
+E: filenames: use-of-compat-symlink usr/bin/X11/testxbin
+W: filenames: packages-installs-file-to-usr-x11r6 usr/X11R6/
+N:
+N: Packages using the X Window System should not be configured to install
+N: files under the /usr/X11R6/ directory unless they use imake. The
+N: /usr/X11R6/ directory hierarchy should be regarded as deprecated for
+N: all packages except the X Window System itself.
+N:
+N: Programs that use GNU autoconf and automake are usually easily
+N: configured at compile time to use /usr/ instead of /usr/X11R6/, and
+N: this should be done whenever possible.
+N:
+N: Refer to Policy Manual, section 11.8.7 for details.
+N:
+W: filenames: packages-installs-file-to-usr-x11r6 usr/X11R6/bin/
+W: filenames: packages-installs-file-to-usr-x11r6 usr/X11R6/bin/testxbin2
E: filenames: symlink-should-be-absolute usr/lib/filenames/symlink1wrong ../../../etc/symlink
N:
N: Symbolic links between different top-level directories should be
Modified: trunk/testset/tags.filenames
===================================================================
--- trunk/testset/tags.filenames 2004-04-11 14:52:05 UTC (rev 147)
+++ trunk/testset/tags.filenames 2004-04-11 15:49:33 UTC (rev 148)
@@ -3,6 +3,8 @@
W: filenames source: cvsignore-file-in-source files/.cvsignore
W: filenames source: svn-commit-file-in-source files/svn-commit.tmp
W: filenames source: source-contains-CVS-dir CVS
+E: filenames: binary-without-manpage testxbin
+E: filenames: binary-without-manpage testxbin2
E: filenames: non-standard-toplevel-dir files/
W: filenames: file-in-unusual-dir files/.cvsignore
W: filenames: cvsignore-file-in-package files/.cvsignore
@@ -20,6 +22,13 @@
W: filenames: zero-byte-file-in-doc-directory usr/share/doc/filenames/examples/very_interesting_example
W: filenames: zero-byte-file-in-doc-directory usr/share/doc/filenames/examples/very_interesting_example2.gz
W: filenames: zero-byte-file-in-doc-directory usr/share/doc/filenames/Changes.gz
+E: filenames: package-installs-file-to-usr-something-x11 usr/bin/X11/
+E: filenames: use-of-compat-symlink usr/bin/X11/
+E: filenames: package-installs-file-to-usr-something-x11 usr/bin/X11/testxbin
+E: filenames: use-of-compat-symlink usr/bin/X11/testxbin
+W: filenames: packages-installs-file-to-usr-x11r6 usr/X11R6/
+W: filenames: packages-installs-file-to-usr-x11r6 usr/X11R6/bin/
+W: filenames: packages-installs-file-to-usr-x11r6 usr/X11R6/bin/testxbin2
E: filenames: symlink-should-be-absolute usr/lib/filenames/symlink1wrong ../../../etc/symlink
E: filenames: symlink-has-too-many-up-segments usr/lib/filenames/symlink2wrong ../../../../etc/symlink
E: filenames: symlink-should-be-relative usr/lib/filenames/symlink3wrong /usr/lib/filenames/symlink2
Reply to: