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

lintian: r717 - in trunk: checks debian testset testset/filenames/debian testset/maintainer-scripts/debian



Author: rra
Date: 2006-08-19 06:40:46 +0200 (Sat, 19 Aug 2006)
New Revision: 717

Modified:
   trunk/checks/files
   trunk/checks/files.desc
   trunk/checks/scripts
   trunk/checks/scripts.desc
   trunk/debian/changelog
   trunk/testset/filenames/debian/rules
   trunk/testset/maintainer-scripts/debian/postinst
   trunk/testset/tags.filenames
   trunk/testset/tags.maintainer-scripts
Log:
  + [RA] Warn about files installed into /etc/gconf/schemas.
  + [RA] Check for proper dependencies if gconf-schemas is called in
    maintainer scripts and diagnose calling gconftool(-2) directly.
    Thanks, Josselin Mouette.  (Closes: #333311)

Modified: trunk/checks/files
===================================================================
--- trunk/checks/files	2006-08-19 03:48:55 UTC (rev 716)
+++ trunk/checks/files	2006-08-19 04:40:46 UTC (rev 717)
@@ -121,6 +121,10 @@
 	       and $operm != 0644) {
 	    tag "bad-permissions-for-etc-emacs-script", sprintf("$file %04o != 0644",$operm);
 	}
+	# ---------------- /etc/gconf/schemas
+	elsif ($file =~ m,^etc/gconf/schemas/\S,) {
+	    tag "package-installs-into-etc-gconf-schemas", "$file";
+	}
 	# ---------------- /etc/init.d
 	elsif ($file =~ m,^etc/init\.d/\S, and $operm != 0755
 	       and $perm =~ m/^-/) {

Modified: trunk/checks/files.desc
===================================================================
--- trunk/checks/files.desc	2006-08-19 03:48:55 UTC (rev 716)
+++ trunk/checks/files.desc	2006-08-19 04:40:46 UTC (rev 717)
@@ -100,6 +100,13 @@
  Instead, the Filesystem Hierarchy Standard (FHS), version 2.3, is
  used. You can find it in /usr/share/doc/debian-policy/fhs/ .
 
+Tag: package-installs-into-etc-gconf-schemas
+Type: warning
+Info: The package installs files into the <tt>/etc/gconf/schemas</tt>
+ directory.  No package should do this; this directory is reserved for
+ local overrides.  Instead, schemas should be installed into
+ <tt>/usr/share/gconf/schemas</tt>.
+
 Tag: package-installs-into-etc-rc.d
 Type: error
 Info: The package installs files into the <tt>/etc/rc.d</tt> or

Modified: trunk/checks/scripts
===================================================================
--- trunk/checks/scripts	2006-08-19 03:48:55 UTC (rev 716)
+++ trunk/checks/scripts	2006-08-19 04:40:46 UTC (rev 717)
@@ -166,9 +166,10 @@
 # reported is maintainer-script-needs-depends-on-%s, so be sure to update
 # scripts.desc when adding a new rule.
 my @depends_needed = (
-        [ adduser => '\badduser\b' ],
-        [ netbase => '\bupdate-inetd\b' ],
-        [ ucf => '\bucf\s' ],
+	[ adduser => '\badduser\b' ],
+	[ 'gconf2 (>= 2.10.1-2)' => '\bgconf-schemas\b' ],
+	[ netbase => '\bupdate-inetd\b' ],
+	[ ucf => '\bucf\s' ],
 );
 
 my %executable = ();
@@ -584,7 +585,9 @@
 		if (/$regex/ && ! $warned{$package}) {
                     my $needed = Dep::parse($package);
                     unless (Dep::implies($deps{depends}, $needed) || Dep::implies($deps{'pre-depends'}, $needed)) {
-			tag "maintainer-script-needs-depends-on-$package", "$file";
+			my $shortpackage = $package;
+			$shortpackage =~ s/[ \(].*//;
+			tag "maintainer-script-needs-depends-on-$shortpackage", "$file";
 			$warned{$package} = 1;
 		    }
 		}
@@ -593,6 +596,9 @@
 	if (/invoke-rc.d.*\|\| exit 0/) {
 	    tag "maintainer-script-hides-init-failure", "$file:$.";
 	}
+	if (/\bgconftool(-2)?(\s|\Z)/) {
+	    tag "gconftool-used-in-maintainer-script", "$file:$.";
+	}
     }
 
     if ($saw_init && ! $saw_invoke) {

Modified: trunk/checks/scripts.desc
===================================================================
--- trunk/checks/scripts.desc	2006-08-19 03:48:55 UTC (rev 716)
+++ trunk/checks/scripts.desc	2006-08-19 04:40:46 UTC (rev 717)
@@ -276,6 +276,15 @@
 Info: This script calls adduser, but the package does not depend or
  pre-depend on the adduser package.
 
+Tag: maintainer-script-needs-depends-on-gconf2
+Type: warning
+Info: This script calls gconf-schemas, which comes from the gconf2 package
+ and was introduced with gconf2 2.10.1-2, but does not depend or
+ pre-depend on the appropriate version of gconf2.  Packages that call
+ gconf-schemas need to depend on gconf2 (>= 2.10.1-2).  If you are using
+ dh_gconf, add a dependency on ${misc:Depends} and dh_gconf will take care
+ of this for you.
+
 Tag: maintainer-script-needs-depends-on-ucf
 Type: warning
 Info: This script calls ucf, but the package does not depend or pre-depend
@@ -321,3 +330,8 @@
  scripts may call the init script directly only if invoke-rc.d is not
  available.
 Ref: policy 9.3.3.2
+
+Tag: gconftool-used-in-maintainer-script
+Type: warning
+Info: This script apparently runs gconftool or gconftool-2.  It should
+ probably be calling gconf-schemas or update-gconf-defaults instead.

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2006-08-19 03:48:55 UTC (rev 716)
+++ trunk/debian/changelog	2006-08-19 04:40:46 UTC (rev 717)
@@ -30,6 +30,7 @@
   * checks/files{.desc,}:
     + [RA] Provide a better explanation of why Debian packages shouldn't
       ship files in /srv.  (Closes: #379176)
+    + [RA] Warn about files installed into /etc/gconf/schemas.
   * checks/manpages{.desc,}:
     + [RA] Warn about manpage short descriptions of the form "manual page
       for program" (usually generated by help2man).
@@ -51,6 +52,9 @@
     + [RA] Use the Dep library to check dependencies.  Add php5 to the
       interpreter list and correctly handle the dependencies for
       version-less PHP scripts.  (Closes: #379558)
+    + [RA] Check for proper dependencies if gconf-schemas is called in
+      maintainer scripts and diagnose calling gconftool(-2) directly.
+      Thanks, Josselin Mouette.  (Closes: #333311)
   * checks/version-substvars{.desc,}:
     + [RA] New check from Adeodato Simó for proper use of substvars for
       versioned dependencies between packages built from the same source

Modified: trunk/testset/filenames/debian/rules
===================================================================
--- trunk/testset/filenames/debian/rules	2006-08-19 03:48:55 UTC (rev 716)
+++ trunk/testset/filenames/debian/rules	2006-08-19 04:40:46 UTC (rev 717)
@@ -98,6 +98,9 @@
 	install -d debian/tmp/srv/foo
 	touch debian/tmp/srv/foo/bar
 
+	install -d debian/tmp/etc/gconf/schemas
+	touch debian/tmp/etc/gconf/schemas/test.schema
+
 	ln -s '../filenames/doc/version6.txt.gz' debian/tmp/usr/share/doc/filenames/version.txt.gz
 	ln -s ../../share/symlink debian/tmp/usr/lib/filenames/symlink1ok
 	ln -s ../../../etc/symlink debian/tmp/usr/lib/filenames/symlink1wrong

Modified: trunk/testset/maintainer-scripts/debian/postinst
===================================================================
--- trunk/testset/maintainer-scripts/debian/postinst	2006-08-19 03:48:55 UTC (rev 716)
+++ trunk/testset/maintainer-scripts/debian/postinst	2006-08-19 04:40:46 UTC (rev 717)
@@ -63,3 +63,9 @@
 
 # Example ucf invocation.
 ucf /usr/share/foo/configuration /etc/foo.conf
+
+# Calling gconftool directly.
+gconftool-2 --makefile-install-rule foo.schema
+
+# Calling gconf-schemas with no dependency.
+gconf-schemas --register foo.schema

Modified: trunk/testset/tags.filenames
===================================================================
--- trunk/testset/tags.filenames	2006-08-19 03:48:55 UTC (rev 716)
+++ trunk/testset/tags.filenames	2006-08-19 04:40:46 UTC (rev 717)
@@ -2,6 +2,7 @@
 E: filenames: bad-menu-file-name usr/share/menu/menu
 E: filenames: dir-or-file-in-srv srv/foo/
 E: filenames: dir-or-file-in-srv srv/foo/bar
+E: filenames: file-in-etc-not-marked-as-conffile /etc/gconf/schemas/test.schema
 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
@@ -66,6 +67,7 @@
 W: filenames: package-contains-bzr-control-dir usr/lib/perl5/.bzr/
 W: filenames: package-contains-readme-for-other-platform-or-distro usr/share/doc/filenames/README.macosx
 W: filenames: package-contains-svn-control-dir usr/lib/perl5/.svn/
+W: filenames: package-installs-into-etc-gconf-schemas etc/gconf/schemas/test.schema
 W: filenames: package-installs-nonbinary-perl-in-usr-lib-perl5 usr/lib/perl5/foo/ancient.pm
 W: filenames: package-installs-nonbinary-perl-in-usr-lib-perl5 usr/lib/perl5/foo/bar.pm
 W: filenames: svn-commit-file-in-package files/svn-commit.tmp

Modified: trunk/testset/tags.maintainer-scripts
===================================================================
--- trunk/testset/tags.maintainer-scripts	2006-08-19 03:48:55 UTC (rev 716)
+++ trunk/testset/tags.maintainer-scripts	2006-08-19 04:40:46 UTC (rev 717)
@@ -24,9 +24,11 @@
 W: maintainer-scripts source: qa-upload-has-incorrect-version-number 7-0.1
 W: maintainer-scripts: config-does-not-load-confmodule
 W: maintainer-scripts: deprecated-chown-usage postinst:33 'chown root.root'
+W: maintainer-scripts: gconftool-used-in-maintainer-script postinst:68
 W: maintainer-scripts: init.d-script-not-marked-as-conffile /etc/init.d/foo
 W: maintainer-scripts: maintainer-script-calls-deprecated-wm-menu-config postinst:31
 W: maintainer-scripts: maintainer-script-hides-init-failure postinst:55
+W: maintainer-scripts: maintainer-script-needs-depends-on-gconf2 postinst
 W: maintainer-scripts: maintainer-script-needs-depends-on-ucf postinst
 W: maintainer-scripts: missing-debconf-dependency
 W: maintainer-scripts: no-debconf-templates



Reply to: