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

Bug#832096: marked as done (lintian: please check for common typos in debian/rules target names)



Your message dated Sat, 13 Aug 2016 22:08:09 +0000
with message-id <E1bYh69-00073J-VL@franck.debian.org>
and subject line Bug#832096: fixed in lintian 2.5.46
has caused the Debian Bug report #832096,
regarding lintian: please check for common typos in debian/rules target names
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
832096: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=832096
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: lintian
Version: 2.5.45
Severity: wishlist
Tags: patch

Hi,

Attached is the following:

  commit 22f75ee230c6ae93e9192a663225626e73cf14c7
  Author: Chris Lamb <lamby@debian.org>
  Date:   Fri Jul 22 10:36:54 2016 +0100
  
      c/rules: Check for common typos in debian/rules target names.
      
      Misspelling an target (eg. "override_dh_install_debconf") results in that
      rule silently not being called. See #831772 for an example in the wild.
      
      Signed-off-by: Chris Lamb <lamby@debian.org>
  
   checks/rules.desc                         |  7 +++++++
   checks/rules.pm                           |  4 ++++
   data/rules/target-typos                   | 32 +++++++++++++++++++++++++++++++
   t/tests/rules-general/debian/debian/rules |  2 ++
   t/tests/rules-general/desc                |  3 ++-
   t/tests/rules-general/tags                |  1 +
   6 files changed, 48 insertions(+), 1 deletion(-)


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-
From 22f75ee230c6ae93e9192a663225626e73cf14c7 Mon Sep 17 00:00:00 2001
From: Chris Lamb <lamby@debian.org>
Date: Fri, 22 Jul 2016 10:36:54 +0100
Subject: [PATCH] c/rules: Check for common typos in debian/rules target names.

Misspelling an target (eg. "override_dh_install_debconf") results in that
rule silently not being called. See #831772 for an example in the wild.

Signed-off-by: Chris Lamb <lamby@debian.org>
---
 checks/rules.desc                         |  7 +++++++
 checks/rules.pm                           |  4 ++++
 data/rules/target-typos                   | 32 +++++++++++++++++++++++++++++++
 t/tests/rules-general/debian/debian/rules |  2 ++
 t/tests/rules-general/desc                |  3 ++-
 t/tests/rules-general/tags                |  1 +
 6 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100644 data/rules/target-typos

diff --git a/checks/rules.desc b/checks/rules.desc
index 25c565b..70e64fc 100644
--- a/checks/rules.desc
+++ b/checks/rules.desc
@@ -248,3 +248,10 @@ Info: The source package does not have both a build-arch and a build-indep
  .
  Please consider adding both the build-arch and build-indep targets.
 
+Tag: typo-in-debian-rules-target
+Severity: normal
+Certainty: certain
+Info: The listed target in debian/rules command is a misspelling.
+ .
+ This can result in (for example) an <tt>dh_override_</tt>-style target
+ silently not being executed by <tt>make</tt>.
diff --git a/checks/rules.pm b/checks/rules.pm
index bd3a141..1100032 100644
--- a/checks/rules.pm
+++ b/checks/rules.pm
@@ -38,6 +38,7 @@ our $ANYPYTHON_DEPEND
 my $KNOWN_MAKEFILES = Lintian::Data->new('rules/known-makefiles', '\|\|');
 my $DEPRECATED_MAKEFILES = Lintian::Data->new('rules/deprecated-makefiles');
 my $POLICYRULES = Lintian::Data->new('rules/policy-rules', qr/\s++/);
+my $TARGETTYPOS = Lintian::Data->new('rules/target-typos', qr/\s++/);
 
 # forbidden construct in rules
 my $BAD_CONSTRUCT_IN_RULES
@@ -313,6 +314,9 @@ sub run {
                 if (any { $target =~ /$_/ } @arch_rules) {
                     push(@arch_rules, @depends);
                 }
+                tag 'typo-in-debian-rules-target', $target, '->',
+                        $TARGETTYPOS->value($target), "(line $.)"
+                    if ($TARGETTYPOS->known($target));
             }
             undef %debhelper_group;
         } elsif (/^define /) {
diff --git a/data/rules/target-typos b/data/rules/target-typos
new file mode 100644
index 0000000..9dd2e7f
--- /dev/null
+++ b/data/rules/target-typos
@@ -0,0 +1,32 @@
+# a list of common incorrect targets in debian/rules
+# format is
+#   <typo> <suggestion>
+#
+override_dh_autotest			override_dh_auto_test
+override_dh_install_catalogs		override_dh_installcatalogs
+override_dh_install_changelog		override_dh_installcangelogs
+override_dh_install_changelog		override_dh_installchangelogs
+override_dh_install_cron		override_dh_installcron
+override_dh_install_deb			override_dh_installdeb
+override_dh_install_debconf		override_dh_installdebconf
+override_dh_install_dirs		override_dh_installdirs
+override_dh_install_docs		override_dh_installdocs
+override_dh_install_emacsen		override_dh_installemacsen
+override_dh_install_example		override_dh_installexamples
+override_dh_install_examples		override_dh_installexamples
+override_dh_install_info		override_dh_installinfo
+override_dh_install_init		override_dh_installinit
+override_dh_install_logcheck		override_dh_installlogcheck
+override_dh_install_logrotate		override_dh_installlogrotate
+override_dh_install_man			override_dh_installman
+override_dh_install_manpage		override_dh_installmanpage
+override_dh_install_manpages		override_dh_installmanpage
+override_dh_install_mans		override_dh_installman
+override_dh_install_menu		override_dh_installmenu
+override_dh_install_mime		override_dh_installmime
+override_dh_install_modules		override_dh_installmodules
+override_dh_install_pam			override_dh_installpam
+override_dh_install_udev		override_dh_installudev
+override_dh_install_xmlcatalogs		override_dh_installxmlcatalogs
+override_dh_installmanpage		override_dh_installman
+override_dh_usr_local			override_dh_usrlocal
diff --git a/t/tests/rules-general/debian/debian/rules b/t/tests/rules-general/debian/debian/rules
index cddbc03..2febda6 100755
--- a/t/tests/rules-general/debian/debian/rules
+++ b/t/tests/rules-general/debian/debian/rules
@@ -9,3 +9,5 @@ clean:
 	dh_clean
 	echo $(DEB_BUILD_OPTS) $(PWD)
 	@echo $(_)
+
+override_dh_install_examples:
diff --git a/t/tests/rules-general/desc b/t/tests/rules-general/desc
index 1f41c20..5ca2b82 100644
--- a/t/tests/rules-general/desc
+++ b/t/tests/rules-general/desc
@@ -7,4 +7,5 @@ Test-For:
  debian-rules-should-not-automatically-update-control
  debian-rules-should-not-use-DEB_BUILD_OPTS
  debian-rules-should-not-use-pwd
- debian-rules-should-not-use-underscore-variable
\ No newline at end of file
+ debian-rules-should-not-use-underscore-variable
+ typo-in-debian-rules-target
diff --git a/t/tests/rules-general/tags b/t/tests/rules-general/tags
index 3e7351b..4dc0775 100644
--- a/t/tests/rules-general/tags
+++ b/t/tests/rules-general/tags
@@ -3,3 +3,4 @@ E: rules-general source: debian-rules-should-not-automatically-update-control li
 W: rules-general source: debian-rules-should-not-use-DEB_BUILD_OPTS line 10
 W: rules-general source: debian-rules-should-not-use-pwd line 10
 W: rules-general source: debian-rules-should-not-use-underscore-variable line 11
+W: rules-general source: typo-in-debian-rules-target override_dh_install_examples -> override_dh_installexamples (line 13)
-- 
2.8.1


--- End Message ---
--- Begin Message ---
Source: lintian
Source-Version: 2.5.46

We believe that the bug you reported is fixed in the latest version of
lintian, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 832096@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Niels Thykier <niels@thykier.net> (supplier of updated lintian package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 13 Aug 2016 19:53:23 +0000
Source: lintian
Binary: lintian
Architecture: source
Version: 2.5.46
Distribution: unstable
Urgency: medium
Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
Changed-By: Niels Thykier <niels@thykier.net>
Description:
 lintian    - Debian package checker
Closes: 802964 823326 827158 828719 828773 828933 828934 829047 829545 829592 829635 830930 832096 832771 833015 833052
Changes:
 lintian (2.5.46) unstable; urgency=medium
 .
   * Summary of tag changes:
     + Added:
       - systemd-service-file-missing-install-key
       - typo-in-debhelper-override-target
     + Removed:
       - package-depends-on-lower-priority-package
 .
   * checks/cruft.pm:
     + [NT] Ignore mentions of /usr/lib/perl5 in patches as they might
       be a way of fixing said mentions.  Thanks to Robert Luberda
       for reporting the bug.  (Closes: #802964)
   * checks/debhelper.{desc,pm}:
     + [JW] Apply patch from Chris Lamb to check for common typos in
       debian/rules target names.  (Closes: #832096)
     + [JW, NT] Add some more (indirect) "dh" build-systems.
       (Closes: #828773)
   * checks/files.desc:
     + [JW] Fix typos.
   * checks/group-checks.{desc,pm}:
     + [NT] Drop "lower priorities" check as the general consensus seems to
       be that priorities changes are mostly busy work.  Thanks to Dominic
       Hargreaves for the report.  (Closes: #823326)
   * checks/infofiles.desc:
     + [JW] Fix typo.
   * checks/java.pm:
     + [JW] Don't emit javalib-but-no-public-jars for transitional packages.
       Thanks to Jeremy Bicha for the bug report.  (Closes: #829047)
   * checks/manpages.desc:
     + [JW] Fix typos.
   * checks/phppear.desc:
     + [JW] Fix typos.
   * checks/scripts.pm:
     + [JW] Fix false positive unusual-interpreter when the script had
       "#!/usr/bin/env" shebang and the interpreter was shipped in the same
       package.  Thanks to Sergio Durigan Junior for the bug report and the
       initial patch.  (Closes: #828933)
   * checks/shared-libs.desc:
     + [JW] Fix typo.
   * checks/systemd.{desc,pm}:
     + [JW] Fix typos.
     + [JW, NT] Apply from Chris Lamb to check for a possibly missing
       "WantedBy" target in service files.  (Closes: #832771)
     + [JW, NT] Improve wording about the "systemd" sequence of a tag.
   * checks/version-substvars.desc:
     + [JW] Make maybe-not-arch-all-binnmuable a classification tag.
   * checks/watch-file.desc:
     + [JW] Fix typo.
 .
   * collection/*:
     + [JW,NT] Remove "." from Perl's search path.  (Mitigates: #588017)
 .
   * commands/{info.pm,lintian}:
     + [NT] Drop the necessary bits for supporting translated tag
       descriptions.
   * commands/lintian:
     + [NT,JW] Remove "." from Perl's search path.  (Mitigates: #588017)
   * commands/reporting-html-reports.pm:
     + [NT] Fix typo in named parameter that made the raw lintain.log
       unavailable on lintian.debian.org.  Thanks to Guillem Jover
       for reporting the issue.  (Closes: #828719)
     + [NT] Install the lintian log file as a resource so it can be
       handled (e.g. cached) like other resources.
   * commands/reporting-lintian-harness.pm:
     + [NT] Attempt to terminate the run timely if it overruns the time
       limit.
   * commands/reporting-sync-state.pm:
     + [NT] Remove redundant "area" field from all binary packages in
       the harness state cache.
     + [NT] Drop existing instances of the "sha1" field from all packages
       in the harness state cache.
 .
   * data/common/source-fields:
     + [NT] Apply patch from Edward Betts to add Testsuite-Triggers as
       a known source field.  (Closes: #829545)
   * data/debhelper/*:
     + [NT] Refresh against unstable.
   * data/debhelper/dh_{addons,commands}-manual:
     + [JW, NT] Add the systemd sequence and related tools now that
       debhelper is taking over the dh-systemd helpers.  Thanks to
       Christian Hofstaedtler for the report.  (Closes: #830930)
   * data/fields/essential:
     + [JW] Add init-system-helpers; remove sysvinit and mktemp.  Thanks to
       Felipe Sateler for the bug report.  (Closes: #833015)
   * data/fields/obsolete-packages:
     + [NT] Remove "debmake" as the package is now reintroduced with a
       different purpose.  Thanks to Paul Wise for the report.
       (Closes: #827158)
   * data/files/fonts:
     + [NT] Refresh against unstable.
   * data/java/constants:
     + [NT] Bump known java-class versions.  Thanks to Hideki Yamane for
       the report.  (Closes: #829592)
   * data/scripts/interpreters:
     + [JW] Apply patch from Sergio Durigan Junior to add newLISP as a
       known interpreter.  (Closes: #828934)
   * data/spelling/corrections:
     + [JW] Add more corrections.
 .
   * debian/control:
     + [NT] Drop now unnecessary po4a Build-Dependency.
   * debian/rules:
     + [NT] Drop code for handling translations.
 .
   * doc/lintian.xml:
     + [JW] Fix typo.
 .
   * frontend/dplint:
     + [JW,NT] Remove "." from Perl's search path.  (Mitigates: #588017)
 .
   * helpers/coll/*:
     + [JW,NT] Remove "." from Perl's search path.  (Mitigates: #588017)
 .
   * lib/*.pm:
     + [NT] Drop support for translations of tag descriptions.  It never
       got used.
   * lib/Lintian/*.pm:
     + [JW] Fix typos.
   * lib/Lintian/Tags.pm:
     + [JW, NT] Fix mojibake in UTF-8 encoded comments for overrides.
       (Closes: #833052)
   * lib/Lintian/Util.pm:
     + [NT] Shuffle the harness backlog a bit to reduce the risk of a lot
       of very large package groups being scheduled in the same run.
 .
   * man/lintian.pod.in:
     + [JW] Fix typo.
     + [JW] Remove unneeded "file:" in front of a pathname.
 .
   * po4a:
     + [NT] Drop as it was not used.
 .
   * t:
     + [JW,NT] Update tests to work now that dpkg validates
       debian/tests/control.  (Closes: #829635)
     + [NT] Apply patch from Adam Conrad to make some tests work
       when the compiler uses -fPIE by default.
Checksums-Sha1:
 9a1020c2711af60e302a2f921566086683635d2a 2821 lintian_2.5.46.dsc
 1875580f0571234aa2dd1463c4e33e4d458deedd 1222444 lintian_2.5.46.tar.xz
Checksums-Sha256:
 5ebc3461755aafb235192f2779ce46da4cb6d6afd6a59f41330f10b839d3030a 2821 lintian_2.5.46.dsc
 0673fc865e80ed9b8bffd034fe62a2300b7eb1aa1ae68051cd0489ee44939224 1222444 lintian_2.5.46.tar.xz
Files:
 c7ff30bf261d1297b6783054054b2c91 2821 devel optional lintian_2.5.46.dsc
 1dba94e96804073b2f1083634b19fdaf 1222444 devel optional lintian_2.5.46.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCAAGBQJXr3zdAAoJEAVLu599gGRCijcQAIf0xyvjq3ZDP/AD7k3Lv/OT
Csk7U1w7Nwdh/YZ/qzLe1XrmgMgp4Tr8K7hu6GR2Rg4LrP5MNzDfOnBniTXIb9w5
BS0toGHaCvEYJtZcw7+81FtNQtl1KIMUFOYZECON/mIeTTBASgegGrU/zIo9Btj5
hLaeh/PDkJYJcITE2t58lof6EBFDAT+SN6hRofBQIbGri2gvZOteILQS0Xtxb5r0
5nAGLuFsHF+3JTFbXlU6OHe9u8UGVGLSD+zLw/4xEjkl5O5kENjID58mVcCUmNox
MEQg/BbAOi+aRMHmXyOGQUxsfDhD4ciLJq//CxgeDZ7KAL4lEte2pQVv8ukWQAhh
cS/++zOrXa1iyHDUoIKBZTNvXb0JImVX0+3cArWXGLxAGAgr6viXoALAG7+2EqCV
hdtUnHJRc5Ts15miMfml2DMptLdC4/BRhxjANWSl8DvTiIuStpAQPglF0VGO8xRv
a3ewJ3wSVjmjOKKqTebJYdme8fQbydQ0npoRnHjqZJXV+UCGbW77vnR0RHYktObI
2/IewtJ9ptpr3V9ecaSPNVexuEQzd/HW5Sibo2DHe0C2LNTiFfhBaT1GKK2pDCWu
yGujn+kBNqqm8pEn5msCh9dsZ8oWkCywdKp4PeJ2h1/x2JPTlfNAkgEobJ7yWS4i
o3cVwhjKsjWIAcnQ2oc5
=x9O7
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: