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

[lintian] 01/01: Warn if a package ships compiled font files. Thank you to Andreas Beckmann for the report. (Closes: #884165)



This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit 7c28bb820cc08306447c6b984e5d23f6b0f5bb31
Author: Chris Lamb <lamby@debian.org>
Date:   Tue Dec 12 16:46:57 2017 +0000

    Warn if a package ships compiled font files. Thank you to Andreas Beckmann for the report. (Closes: #884165)
---
 checks/files.desc                         | 7 +++++++
 checks/files.pm                           | 3 +++
 debian/changelog                          | 2 ++
 t/tests/files-general/debian/debian/dirs  | 1 +
 t/tests/files-general/debian/debian/rules | 5 +++++
 t/tests/files-general/desc                | 1 +
 t/tests/files-general/tags                | 4 ++++
 7 files changed, 23 insertions(+)

diff --git a/checks/files.desc b/checks/files.desc
index 0415278..b35a399 100644
--- a/checks/files.desc
+++ b/checks/files.desc
@@ -1824,3 +1824,10 @@ Info: This package contains a file named <tt>gschemas.compiled</tt>. This
  file is generated automatically by triggers and it must not be shipped in
  any package.
 Refs: #883801
+
+Tag: package-contains-compiled-font-file
+Severity: serious
+Certainty: certain
+Info: This package appears to contain a compiled font file. These files
+ should be generated automatically by triggers and it must not be shipped
+ in any package.
diff --git a/checks/files.pm b/checks/files.pm
index 5aba784..f275f13 100644
--- a/checks/files.pm
+++ b/checks/files.pm
@@ -834,6 +834,9 @@ sub run {
                 } elsif (
                     $dir !~ /^(?:100dpi|75dpi|misc|Type1|encodings|util)$/) {
                     tag 'file-in-unknown-x11-font-directory', $file;
+                } elsif ($file->basename eq 'encodings.dir'
+                    or $file->basename =~ m{fonts\.(dir|scale|alias)}) {
+                    tag 'package-contains-compiled-font-file', $file;
                 }
                 if ($dir =~ /^(?:100dpi|75dpi|misc)$/) {
                     $x11_font_dirs{$dir}++;
diff --git a/debian/changelog b/debian/changelog
index a418267..067ef95 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,8 @@ lintian (2.5.63) UNRELEASED; urgency=medium
       "wild guess" to "possible" on the suggestion of Helmut Grohne.
     + [CL] Test for packages shipping "gschemas.compiled" files. Thanks
       to Andreas Beckmann for the idea.  (Closes: #884142)
+    + [CL] Warn if a package ships compiled font files. Thank you to
+      Andreas Beckmann for the report.  (Closes: #884165)
   * checks/python.pm:
     + [CL] Also check for packages installing modules called "site" or
       "docs" into the global namespace.  (Closes: #769365)
diff --git a/t/tests/files-general/debian/debian/dirs b/t/tests/files-general/debian/debian/dirs
index 2ca6f28..4108011 100644
--- a/t/tests/files-general/debian/debian/dirs
+++ b/t/tests/files-general/debian/debian/dirs
@@ -2,6 +2,7 @@ etc
 usr/bin
 usr/doc
 usr/share/foo
+usr/share/fonts/X11/misc
 usr/share/glib-2.0/schemas
 usr/share/man/man1/random
 var/catman
diff --git a/t/tests/files-general/debian/debian/rules b/t/tests/files-general/debian/debian/rules
index 2cda0ff..cfd8b62 100755
--- a/t/tests/files-general/debian/debian/rules
+++ b/t/tests/files-general/debian/debian/rules
@@ -22,6 +22,11 @@ override_dh_install:
 	touch $(tmp)/usr/doc/FSSTND
 	touch $(tmp)/usr/share/foo/'*'
 	touch $(tmp)/usr/share/foo/'ws '
+	touch $(tmp)/usr/share/fonts/X11/misc/fonts.dir
+	touch $(tmp)/usr/share/fonts/X11/misc/fonts.scale
+	touch $(tmp)/usr/share/fonts/X11/misc/fonts.alias
+	touch $(tmp)/usr/share/fonts/X11/misc/encodings.dir
+	touch $(tmp)/usr/share/fonts/X11/misc/false-positive
 	touch $(tmp)/usr/share/foo/.nfs-fake-tmpfile
 	touch $(tmp)/usr/share/glib-2.0/schemas/gschemas.compiled
 	# If the following line gets messed up, it can be
diff --git a/t/tests/files-general/desc b/t/tests/files-general/desc
index 19fffde..6bfb646 100644
--- a/t/tests/files-general/desc
+++ b/t/tests/files-general/desc
@@ -33,3 +33,4 @@ Test-For:
  star-file
  stray-directory-in-manpage-directory
  windows-devel-file-in-package
+ package-contains-compiled-font-file
diff --git a/t/tests/files-general/tags b/t/tests/files-general/tags
index 304fbf4..87f1e98 100644
--- a/t/tests/files-general/tags
+++ b/t/tests/files-general/tags
@@ -11,6 +11,10 @@ E: files-general: global-data-in-games-directory usr/share/games/icons/hicolor/2
 E: files-general: lengthy-symlink usr/share/doc/bar/star ../bar/foo
 E: files-general: non-conf-file-in-modprobe.d etc/modprobe.d/--lzma
 E: files-general: non-standard-toplevel-dir new-top-level-dir/
+E: files-general: package-contains-compiled-font-file usr/share/fonts/X11/misc/encodings.dir
+E: files-general: package-contains-compiled-font-file usr/share/fonts/X11/misc/fonts.alias
+E: files-general: package-contains-compiled-font-file usr/share/fonts/X11/misc/fonts.dir
+E: files-general: package-contains-compiled-font-file usr/share/fonts/X11/misc/fonts.scale
 E: files-general: package-contains-compiled-glib-schema usr/share/glib-2.0/schemas/gschemas.compiled
 E: files-general: package-contains-info-dir-file usr/share/info/dir.gz
 E: files-general: package-contains-mime-cache-file usr/share/mime/types

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: