[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.2.11-3-g832675a



The following commit has been merged in the master branch:
commit 832675a6b23463ddcd6d1ceb30771f754a6b92fb
Author: Russ Allbery <rra@debian.org>
Date:   Wed Jun 17 15:58:28 2009 -0700

    Diagnose files installed into bad X11 font directories
    
    * checks/files{,.desc}:
      + [RA] Diagnose files installed into discouraged or unknown
        subdirectories of /usr/share/fonts/X11 per Policy 11.8.5.

diff --git a/checks/files b/checks/files
index 96a0b5f..4cdd6ee 100644
--- a/checks/files
+++ b/checks/files
@@ -420,6 +420,15 @@ foreach my $file (sort keys %{$info->index}) {
 		tag "executable-manpage", "$file";
 	    }
 	}
+	# ---------------- /usr/share/fonts/X11
+	elsif ($file =~ m,^usr/share/fonts/X11/([^/]+)/\S+,) {
+	    my ($dir, $filename) = ($1, $2);
+	    if ($dir =~ /^(?:PEX|CID|Speedo|cyrillic)$/) {
+		tag 'file-in-discouraged-x11-font-directory', $file;
+	    } elsif ($dir !~ /^(?:100dpi|75dpi|misc|Type1|encodings|util)$/) {
+		tag 'file-in-unknown-x11-font-directory', $file;
+	    }
+	}
 	# ---------------- /usr/share/info
 	elsif ($file =~ m,^usr/share/info\S+,) {
 	    if ($type eq 'udeb') {
diff --git a/checks/files.desc b/checks/files.desc
index e1c36d6..4bc62a7 100644
--- a/checks/files.desc
+++ b/checks/files.desc
@@ -990,3 +990,24 @@ Info: Files in <tt>/etc/modprobe.d</tt> should use filenames ending in
  If the file is an example containing only comments, consider installing
  it in another location as files in <tt>/etc/modprobe.d</tt> are
  read each time modprobe is run (which is often at boot time).
+
+Tag: file-in-discouraged-x11-font-directory
+Severity: minor
+Certainty: certain
+Ref: policy 11.8.5
+Info: For historical reasons, use of <tt>PEX</tt>, <tt>CID</tt>,
+ <tt>Speedo</tt>, and <tt>cyrillic</tt> subdirectories of
+ <tt>/usr/share/fonts/X11</tt> are permitted, but installation of files
+ into these directories is discouraged.  Support for the first three font
+ types is deprecated or no longer available, and Cyrillic fonts should use
+ the normal font directories where possible.
+
+Tag: file-in-unknown-x11-font-directory
+Severity: serious
+Certainty: certain
+Ref: policy 11.8.5
+Info: Subdirectories of <tt>/usr/share/fonts/X11</tt> other than
+ <tt>100dpi</tt>, <tt>75dpi</tt>, <tt>misc</tt>, <tt>Type1</tt>, ad some
+ historic exceptions must be neither created nor used.  (The directories
+ <tt>encodings</tt> and <tt>util</tt>, used by some X Window System
+ packages, are also permitted by Lintian.)
diff --git a/debian/changelog b/debian/changelog
index cf7458a..4b551b9 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ lintian (2.2.12) UNRELEASED; urgency=low
 
   * Summary of tag changes:
     + Added:
+      - file-in-discouraged-x11-font-directory
+      - file-in-unknown-x11-font-directory
       - missing-separator-between-items
     + Removed:
       - missing-comma-between-items
@@ -12,6 +14,9 @@ lintian (2.2.12) UNRELEASED; urgency=low
       rename the missing-comma-between-items tag to the more descriptive
       missing-separator-between-items.  Based on a patch by Rafael
       Laboissiere.  (Closes: #533202)
+  * checks/files{,.desc}:
+    + [RA] Diagnose files installed into discouraged or unknown
+      subdirectories of /usr/share/fonts/X11 per Policy 11.8.5.
   * checks/scripts.desc:
     + [RA] Per Policy 3.8.2, read-in-maintainer-script is now of serious
       severity.
diff --git a/t/tests/files-general/debian/debian/install b/t/tests/files-general/debian/debian/install
index 37f6343..216bfa1 100644
--- a/t/tests/files-general/debian/debian/install
+++ b/t/tests/files-general/debian/debian/install
@@ -2,3 +2,14 @@ lintian-16x16.png usr/share/apps/lintian/icons/hicolor/22x22
 lintian-22x22.png usr/share/apps/lintian/icons/hicolor/22x22
 --lzma etc/modprobe.d
 lintian.conf etc/modprobe.d
+foo.pcf usr/share/fonts/X11/100dpi
+foo.pcf usr/share/fonts/X11/75dpi
+foo.pcf usr/share/fonts/X11/misc
+foo.pcf usr/share/fonts/X11/Type1
+foo.pcf usr/share/fonts/X11/encodings
+foo.pcf usr/share/fonts/X11/util
+foo.pcf usr/share/fonts/X11/PEX
+foo.pcf usr/share/fonts/X11/CID
+foo.pcf usr/share/fonts/X11/Speedo
+foo.pcf usr/share/fonts/X11/cyrillic
+foo.pcf usr/share/fonts/X11/other
diff --git a/t/tests/files-general/debian/foo.pcf b/t/tests/files-general/debian/foo.pcf
new file mode 100644
index 0000000..8a7d9df
--- /dev/null
+++ b/t/tests/files-general/debian/foo.pcf
@@ -0,0 +1 @@
+I'm not really a font, but I play one on TV.
diff --git a/t/tests/files-general/desc b/t/tests/files-general/desc
index 4539d78..a649e99 100644
--- a/t/tests/files-general/desc
+++ b/t/tests/files-general/desc
@@ -5,5 +5,7 @@ Description: Test tags about file paths and names
 Test-For:
  dir-or-file-in-var-lock
  dir-or-file-in-var-run
+ file-in-discouraged-x11-font-directory
+ file-in-unknown-x11-font-directory
  icon-size-and-directory-name-mismatch
  non-conf-file-in-modprobe.d
diff --git a/t/tests/files-general/tags b/t/tests/files-general/tags
index d72c75b..d4449b3 100644
--- a/t/tests/files-general/tags
+++ b/t/tests/files-general/tags
@@ -1,4 +1,9 @@
 E: files-general: dir-or-file-in-var-lock var/lock/lintian/
 E: files-general: dir-or-file-in-var-run var/run/lintian/
+E: files-general: file-in-unknown-x11-font-directory usr/share/fonts/X11/other/foo.pcf.gz
 E: files-general: non-conf-file-in-modprobe.d etc/modprobe.d/--lzma
+W: files-general: file-in-discouraged-x11-font-directory usr/share/fonts/X11/CID/foo.pcf.gz
+W: files-general: file-in-discouraged-x11-font-directory usr/share/fonts/X11/PEX/foo.pcf.gz
+W: files-general: file-in-discouraged-x11-font-directory usr/share/fonts/X11/Speedo/foo.pcf.gz
+W: files-general: file-in-discouraged-x11-font-directory usr/share/fonts/X11/cyrillic/foo.pcf.gz
 W: files-general: icon-size-and-directory-name-mismatch usr/share/apps/lintian/icons/hicolor/22x22/lintian-16x16.png 16x16

-- 
Debian package checker


Reply to: