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

[lintian] 01/01: Warn about files installed in /usr/share/mime/ other than in packages/



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

broucaries-guest pushed a commit to branch master
in repository lintian.

commit d291a2b7b268fc3ec913a7357f1ce5ab6fb96403
Author: bastien <roucaries.bastien+debian@gmail.com>
Date:   Mon Jun 15 22:48:52 2015 +0200

    Warn about files installed in /usr/share/mime/ other than in packages/
    
    Signed-off-by: bastien <roucaries.bastien+debian@gmail.com>
---
 checks/files.desc                              | 29 ++++++++++++++++----------
 checks/files.pm                                |  6 ++++++
 debian/changelog                               | 16 ++------------
 t/tests/files-foo-in-bar/debian/debian/install |  2 ++
 t/tests/files-foo-in-bar/tags                  |  1 +
 5 files changed, 29 insertions(+), 25 deletions(-)

diff --git a/checks/files.desc b/checks/files.desc
index 0e0e036..933318e 100644
--- a/checks/files.desc
+++ b/checks/files.desc
@@ -1359,21 +1359,28 @@ Info: This package contains a file named <tt>mimeinfo.cache</tt>,
  included in a package since it needs to be generated dynamically based on
  the installed .desktop files on the system.
 
-Tag: package-contains-cmake-private-file
+
+Tag: package-contains-mimeinfo.cache-file
+Severity: serious
+Certainty: certain
+Info: This package contains a file named <tt>mimeinfo.cache</tt>,
+ possibly compressed, in <tt>/usr/share/applications</tt>.  This file is
+ generated automatically by update-desktop-database when a package
+ containing <tt>.desktop</tt> files associated to MIME types is installed.
+ Some upstream build systems create it automatically, but it must not be
+ included in a package since it needs to be generated dynamically based on
+ the installed .desktop files on the system.
+
+Tag: package-contains-mime-file-outside-package-dir
 Severity: important
 Certainty: certain
-Ref: https://wiki.debian.org/CMake, http://www.cmake.org/cmake/help/v3.2/manual/cmake-packages.7.html#config-file-packages
+Ref: #761649,  /usr/share/doc/shared-mime-info/
 Info: This package contains a file in a path reserved solely for
- <tt>CMake</tt>. This normally means you are shipping a <tt>Find</tt>
- module. Libraries should not ship Find modules at all but Config files
- instead.
- .
- The Config files should be installed in the unversioned path
- usr/(lib/&lt;arch&gt;|lib|share)/cmake/&lt;name&gt;*/
+ mime cache file.
  .
- By using CMake Config files in the unversioned path, the package will
- continue to work as expected when a new version of CMake is uploaded.
-
+ /usr/share/mime/ files are cache generated from
+ /usr/share/mime/packages/. Thus file under /usr/share/mime/
+ should not be installed
 
 Tag: package-modifies-ld.so-search-path
 Severity: important
diff --git a/checks/files.pm b/checks/files.pm
index 96a812d..4832926 100644
--- a/checks/files.pm
+++ b/checks/files.pm
@@ -738,6 +738,12 @@ sub run {
                     tag 'package-contains-cmake-private-file', $file;
                 }
             }
+            # ---------------- /usr/share/mime/
+            elsif ($fname=~ m,^usr/share/mime/.+,) {
+                unless ($fname=~ m,^usr/share/mime/packages(?:$|/),) {
+                    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+,) {
diff --git a/debian/changelog b/debian/changelog
index b621a7b..c480f61 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,9 +15,6 @@ lintian (2.5.32) UNRELEASED; urgency=medium
   * checks/debhelper.{desc,pm}:
     + [NT] Warn about using dh --{until,before,after,remaining} as
       these are deprecated and have been since debhelper/8.9.4.
-    + [NT] Permit the use of dh-exec-install in ".manpages" as well
-      since dh-exec now advertises this as acceptable.  Thanks to
-      Andreas Henriksson for reporting this.  (Closes: #788796)
   * checks/fields.pm:
     + [BR] Detect double comma in  uploaders fields.
       (Closes: #783628).
@@ -44,6 +41,8 @@ lintian (2.5.32) UNRELEASED; urgency=medium
       (Closes: #778328).
     + [BR] Detect package shipping apt_sources(5) file.
       (Closes: #646965).
+    + [BR] Warn about files installed in /usr/share/mime/ other
+      than in packages/.  (Closes: #761649).
   * checks/java.pm:
     + [NT] Fix "off-by-one" in the check for the maximum permitted
       Java major version.
@@ -58,12 +57,6 @@ lintian (2.5.32) UNRELEASED; urgency=medium
       different "public-domain licenses", as they are expected to
       describe why the affected files are in public domain.
       (Closes: #787248)
-  * checks/systemd.{desc,pm}:
-    + [NT] Apply patch from Felipe Sateler to mark service files in
-      /usr/lib as invalid.  (Closes: #788629)
-    + [NT] Apply patch from Felipe Sateler to detect service files
-      that use spaces around the = in the key definition.
-      (Closes: #786421)
 
   * collection/{debfiles,doc-base-files,init.d,menu-files}{,.desc}:
     + [NT] Remove deprecated and unused collections.  These were
@@ -100,14 +93,9 @@ lintian (2.5.32) UNRELEASED; urgency=medium
     + [NT] Refresh against unstable to pick up the rename of
       libaqbanking-dev.  Thanks to Micha Lenk for the reminder.
       (Closes: #787937)
-  * data/debhelper/filename-config-files:
-    + [NT] Add "links" file.
   * data/fields/archive-sections:
     + [NT] Pre-emptively support the "debugsym" section, which is
       expected to be used by debhelper for "ddebs".
-  * data/files/js-libraries:
-    + [NT] Apply patch from Jean-Michael Vourgère to detect
-      embedded versions of libjs-raphael.  (Closes: #788839)
   * data/files/privacy-breaker-websites:
     + [BR] Detect mascot as logos.
   * data/java/constants:
diff --git a/t/tests/files-foo-in-bar/debian/debian/install b/t/tests/files-foo-in-bar/debian/debian/install
index 7734f21..70e0c8f 100644
--- a/t/tests/files-foo-in-bar/debian/debian/install
+++ b/t/tests/files-foo-in-bar/debian/debian/install
@@ -29,6 +29,8 @@ bar usr/share/doc
 bar usr/share/doc/files-foo-in-bar/.xvpics/
 bar usr/share/doc/files-foo-in-bar/.thumbnails/
 bar usr/share/doc/files-foo-in-bar/examples/examples
+bar usr/share/mime/
+bar usr/share/mime/packages/
 bar usr/share/perl/
 bar usr/share/vim/vimcurrent/
 bar usr/share/vim/vim73/
diff --git a/t/tests/files-foo-in-bar/tags b/t/tests/files-foo-in-bar/tags
index 8d3a276..b6b8574 100644
--- a/t/tests/files-foo-in-bar/tags
+++ b/t/tests/files-foo-in-bar/tags
@@ -28,6 +28,7 @@ E: files-foo-in-bar: file-in-usr-local usr/local/foo/bar
 E: files-foo-in-bar: nested-examples-directory usr/share/doc/files-foo-in-bar/examples/examples/
 E: files-foo-in-bar: non-standard-dir-in-var var/foo/
 E: files-foo-in-bar: non-standard-toplevel-dir emul/
+E: files-foo-in-bar: package-contains-mime-file-outside-package-dir usr/share/mime/bar
 E: files-foo-in-bar: package-contains-thumbnails-dir usr/share/doc/files-foo-in-bar/.thumbnails/
 E: files-foo-in-bar: package-contains-xvpics-dir usr/share/doc/files-foo-in-bar/.xvpics/
 E: files-foo-in-bar: package-install-apt-preferences etc/apt/preferences

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


Reply to: