lintian: r656 - in trunk: checks debian testset testset/filenames/debian
Author: rra
Date: 2006-05-04 05:37:21 +0200 (Thu, 04 May 2006)
New Revision: 656
Modified:
trunk/checks/files
trunk/checks/files.desc
trunk/debian/changelog
trunk/testset/filenames/debian/rules
trunk/testset/tags.filenames
Log:
+ [RA] Allow files installed in /usr/include/X11 and /usr/lib/X11 but
require Pre-Depends on x11-common (>= 1:7.0.0). Remove the
duplicate check for files in /usr/bin/X11 since it no longer adds
additional information.
Modified: trunk/checks/files
===================================================================
--- trunk/checks/files 2006-05-04 02:17:14 UTC (rev 655)
+++ trunk/checks/files 2006-05-04 03:37:21 UTC (rev 656)
@@ -20,6 +20,7 @@
package Lintian::files;
use strict;
+use Dep;
use Tags;
use Util;
@@ -70,6 +71,9 @@
}
close(SCRIPTS);
+# We only want to warn about this once.
+my $warned_x11_predepends = 0;
+
# Read package contents...
open(IN,"index") or fail("cannot open index file index: $!");
while (<IN>) {
@@ -229,11 +233,33 @@
tag "old-app-defaults-directory", "$file";
}
- #----------------- /usr/bin/X11/
- elsif ($file =~ m,^usr/bin/X11/,) {
- tag "package-installs-file-to-usr-bin-x11", "$file";
+ #----------------- /usr/{include,lib}/X11/
+ # Packages installing files here must pre-depend on x11-common
+ # so that the symlinks will be sorted out first.
+ elsif ($file =~ m,^usr/(?:include|lib)/X11/, && !$warned_x11_predepends) {
+ if (open (FH, "fields/package")) {
+ my $name = <FH>;
+ close FH;
+ $name =~ s/\n//g;
+ if ($name ne 'x11-common') {
+ my $pre_depends = '';
+ if (open (FH, "fields/pre-depends")) {
+ $pre_depends = <FH>;
+ close FH;
+ $pre_depends =~ s/\n//g;
+ }
+ $pre_depends = Dep::parse($pre_depends);
+ tag "file-in-usr-something-x11-without-pre-depends", "$file"
+ unless Dep::implies($pre_depends, Dep::parse('x11-common (>= 1:7.0.0)'));
+ }
+ }
+
+ # Always set this so that we don't redo the check, even if we
+ # didn't warn. If the first instance didn't warn, none will.
+ $warned_x11_predepends = 1;
}
+
#----------------- /usr/X11R6/
elsif ($file =~ m,^usr/X11R6/bin,) {
tag "package-installs-file-to-usr-x11r6-bin", "$file";
@@ -391,7 +417,7 @@
# ---------------- compatibility symlinks should not be used
if ($file =~ m,^usr/(spool|tmp)/, or
- $file =~ m,^usr/(doc|bin|lib|include)/X11/, or
+ $file =~ m,^usr/(doc|bin)/X11/, or
$file =~ m,^var/adm/,) {
tag "use-of-compat-symlink", "$file";
}
Modified: trunk/checks/files.desc
===================================================================
--- trunk/checks/files.desc 2006-05-04 02:17:14 UTC (rev 655)
+++ trunk/checks/files.desc 2006-05-04 03:37:21 UTC (rev 656)
@@ -23,11 +23,6 @@
this prevents X from replacing it with a compatability symlink.
Ref: policy 11.8.6
-Tag: package-installs-file-to-usr-bin-x11
-Type: error
-Info: Packages must not provide or install files into the directory
- /usr/bin/X11/. This directory is actually a symlink.
-
Tag: package-installs-font-to-usr-x11r6
Type: error
Info: The standard location for X fonts has moved to /usr/share/fonts/X11.
@@ -57,6 +52,16 @@
1:1.0.2-2) for the correct paths.
Ref: policy 11.8.7
+Tag: file-in-usr-something-x11-without-pre-depends
+Type: error
+Info: Packages that install files into /usr/include/X11 or /usr/lib/X11
+ must pre-depend on at least x11-common (>= 1:7.0.0). These directories
+ used to be symlinks and installing files in them while they are still
+ symlinks will put files in the wrong locations and cause stranded files
+ and other problems. x11-common is responsible for converting the
+ symlinks to regular directories.
+Ref: policy 11.8.7
+
Tag: package-installs-file-to-usr-x11r6
Type: error
Info: Packages using the X Window System should not be configured to install
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2006-05-04 02:17:14 UTC (rev 655)
+++ trunk/debian/changelog 2006-05-04 03:37:21 UTC (rev 656)
@@ -24,11 +24,12 @@
games but are not setgid.
+ [RA] Remove the check for files in /usr/lib/cgi-bin. This policy
change was reverted.
- + [RA] Allow files installed in /usr/include/X11 and /usr/lib/X11.
- Change the tag for files in /usr/bin/X11 to be specific to that
- case.
+ + [RA] Allow files installed in /usr/include/X11 and /usr/lib/X11 but
+ require Pre-Depends on x11-common (>= 1:7.0.0). Remove the
+ duplicate check for files in /usr/bin/X11 since it no longer adds
+ additional information.
- -- Russ Allbery <rra@debian.org> Wed, 3 May 2006 19:15:10 -0700
+ -- Russ Allbery <rra@debian.org> Wed, 3 May 2006 20:37:11 -0700
lintian (1.23.19) unstable; urgency=low
Modified: trunk/testset/filenames/debian/rules
===================================================================
--- trunk/testset/filenames/debian/rules 2006-05-04 02:17:14 UTC (rev 655)
+++ trunk/testset/filenames/debian/rules 2006-05-04 03:37:21 UTC (rev 656)
@@ -88,6 +88,8 @@
touch debian/tmp/usr/bin/X11/testxbin
install -d debian/tmp/usr/X11R6/bin
touch debian/tmp/usr/X11R6/bin/testxbin2
+ install -d debian/tmp/usr/include/X11
+ touch debian/tmp/usr/include/X11/foo.h
touch debian/tmp/usr/share/doc/filenames/Changes
chmod 644 debian/tmp/usr/share/doc/filenames/Changes
Modified: trunk/testset/tags.filenames
===================================================================
--- trunk/testset/tags.filenames 2006-05-04 02:17:14 UTC (rev 655)
+++ trunk/testset/tags.filenames 2006-05-04 03:37:21 UTC (rev 656)
@@ -1,12 +1,11 @@
E: filenames: bad-menu-file-name usr/lib/menu/menu
E: filenames: bad-menu-file-name usr/share/menu/menu
+E: filenames: file-in-usr-something-x11-without-pre-depends usr/include/X11/
E: filenames: lengthy-symlink usr/lib/filenames/symlink4wrong ../filenames/symlink2
E: filenames: lengthy-symlink usr/share/doc/filenames/version.txt.gz ../filenames/doc/version6.txt.gz
E: filenames: no-copyright-file
E: filenames: non-standard-toplevel-dir files/
E: filenames: package-contains-ancient-file usr/lib/perl5/foo/ancient.pm 1975-01-01
-E: filenames: package-installs-file-to-usr-bin-x11 usr/bin/X11/
-E: filenames: package-installs-file-to-usr-bin-x11 usr/bin/X11/testxbin
E: filenames: package-installs-file-to-usr-x11r6 usr/X11R6/
E: filenames: package-installs-file-to-usr-x11r6-bin usr/X11R6/bin/
E: filenames: package-installs-file-to-usr-x11r6-bin usr/X11R6/bin/testxbin2
Reply to: