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

Bug#885790: marked as done (Add DH_EXTRA_ADDON check)



Your message dated Mon, 01 Jan 2018 15:49:09 +0000
with message-id <E1eW2Kr-0007qf-0p@fasolo.debian.org>
and subject line Bug#885790: fixed in lintian 2.5.67
has caused the Debian Bug report #885790,
regarding Add DH_EXTRA_ADDON check
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.)


-- 
885790: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=885790
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: lintian
Severity: wishlist
Tags: patch
thanks

I wrote a small patch to check for any use of DH_EXTRA_ADDON in a
rules file. This may not be needed, but I figured i'd write to to
ensure I help try and address some of the feedback regarding usage of
this flag in Debian itself.

If this isn't going to trigger enough to be useful, feel free to close wontfix!

  Paul




-- 
:wq
From 8f5da088eb9e5e3f83af6bab32eaf3bef5807813 Mon Sep 17 00:00:00 2001
From: Paul Tagliamonte <tag@pault.ag>
Date: Fri, 29 Dec 2017 16:32:13 -0500
Subject: [PATCH] Add a check for DH_EXTRA_ADDON usage in rules files

The DH_EXTRA_ADDON environment variable was added to debhelper
for local and/or downstream use. Use in a rules file is almost
universally wrong, and a massive anti-pattern. The --with argument
should be used in it's place.
---
 checks/rules.desc                         | 7 +++++++
 data/rules/rules-should-not-use           | 2 +-
 t/tests/rules-general/debian/debian/rules | 1 +
 t/tests/rules-general/desc                | 3 ++-
 t/tests/rules-general/tags                | 7 ++++---
 5 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/checks/rules.desc b/checks/rules.desc
index 48a5b65b9..d4b134574 100644
--- a/checks/rules.desc
+++ b/checks/rules.desc
@@ -117,6 +117,13 @@ Info: The standard environment variable for build options is
  DEB_BUILD_OPTIONS.  Usually, referring to DEB_BUILD_OPTS is a mistake and
  DEB_BUILD_OPTIONS was intended instead.
 
+Tag: debian-rules-should-not-use-DH_EXTRA_ADDONS
+Severity: normal
+Certainty: certain
+Info: DH_EXTRA_ADDONS is designed for local or downstream build use, not for
+ use in debian/rules.  This is almost always a mistake, and the --with
+ argument needs to be used instead.
+
 Tag: debian-rules-should-not-automatically-update-control
 Severity: serious
 Certainty: possible
diff --git a/data/rules/rules-should-not-use b/data/rules/rules-should-not-use
index 1d880577a..c4842b202 100644
--- a/data/rules/rules-should-not-use
+++ b/data/rules/rules-should-not-use
@@ -5,7 +5,7 @@
 #
 debian-rules-should-not-automatically-update-control     ~~ ^\s*DEB_AUTO_UPDATE_DEBIAN_CONTROL\s*=\s*yes
 debian-rules-should-not-use-DEB_BUILD_OPTS               ~~ \$[\(\{]DEB_BUILD_OPTS[\)\}]
+debian-rules-should-not-use-DH_EXTRA_ADDONS              ~~ ^\s*DH_EXTRA_ADDONS\s*=
 debian-rules-should-not-use-or-modify-user-only-variable ~~ \bDEB_[^_ \t]+FLAGS_(?:SET|APPEND)\b
 debian-rules-should-not-use-pwd                          ~~ \$[\(\{]PWD[\)\}]
 debian-rules-should-not-use-underscore-variable          ~~ \$[\(\{]_[\)\}]
-
diff --git a/t/tests/rules-general/debian/debian/rules b/t/tests/rules-general/debian/debian/rules
index cddbc0356..a9623caf1 100755
--- a/t/tests/rules-general/debian/debian/rules
+++ b/t/tests/rules-general/debian/debian/rules
@@ -1,6 +1,7 @@
 #!/usr/bin/make -f
 
 DEB_AUTO_UPDATE_DEBIAN_CONTROL = yes
+DH_EXTRA_ADDONS = systemd
 
 %:
 	dh $@
diff --git a/t/tests/rules-general/desc b/t/tests/rules-general/desc
index 8df153534..31dc87b89 100644
--- a/t/tests/rules-general/desc
+++ b/t/tests/rules-general/desc
@@ -5,5 +5,6 @@ Test-For:
  clean-should-be-satisfied-by-build-depends
  debian-rules-should-not-automatically-update-control
  debian-rules-should-not-use-DEB_BUILD_OPTS
+ debian-rules-should-not-use-DH_EXTRA_ADDONS
  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
diff --git a/t/tests/rules-general/tags b/t/tests/rules-general/tags
index 3e7351beb..660bfec1d 100644
--- a/t/tests/rules-general/tags
+++ b/t/tests/rules-general/tags
@@ -1,5 +1,6 @@
 E: rules-general source: clean-should-be-satisfied-by-build-depends debhelper
 E: rules-general source: debian-rules-should-not-automatically-update-control line 3
-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: debian-rules-should-not-use-DEB_BUILD_OPTS line 11
+W: rules-general source: debian-rules-should-not-use-DH_EXTRA_ADDONS line 4
+W: rules-general source: debian-rules-should-not-use-pwd line 11
+W: rules-general source: debian-rules-should-not-use-underscore-variable line 12
-- 
2.15.1


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

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 885790@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Chris Lamb <lamby@debian.org> (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: Mon, 01 Jan 2018 14:58:24 +0000
Source: lintian
Binary: lintian
Architecture: source all
Version: 2.5.67
Distribution: unstable
Urgency: medium
Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
Changed-By: Chris Lamb <lamby@debian.org>
Description:
 lintian    - Debian package checker
Closes: 673734 710656 750537 788991 793406 885621 885693 885790 885899 885910 885968
Changes:
 lintian (2.5.67) unstable; urgency=medium
 .
   * Summary of tag changes:
     + Added:
       - debian-rules-should-not-use-DH_EXTRA_ADDONS
       - debian-watch-could-verify-download
       - invalid-date-in-debian-changelog
       - override_dh_fixperms-does-not-call-dh_fixperms
 .
   * checks/apache2.{desc,pm}:
     + [CL] Include the offending filename and line number in the output of
       apache2-deprecated-auth-config and apache2-unparsable-dependency.
     + [CL] Avoid false positives in apache2-deprecated-auth-config where
       the offending lines are wrapped in suitable "IfModule" or "IfVersion"
       directives.  (Closes: #788991, #710656)
   * checks/changelog-file.{desc,pm}:
     + [CL] Warn about changelog entries that have incorrectly formatted
       dates.  (Closes: #793406)
   * checks/files.pm:
     + [CL] Split out python-module-has-overly-generic-name regular
       expression into a data file.
     + [CL] Don't warn about extra license files installed via Sphinx.
       Thanks, Stuart Prescott!  (Closes: #885968)
   * checks/python.pm:
     + [CL] Prevent false positives when checking for Python {2,3} packages
       that depend on Python {3,2} packages when the package being depended
       on ends with -doc. We were previously only catching the case for
       dependencies *from* packages with such names.  (Closes: #885693)
     + [CL] Also ignore -doc, -docs, -dev, -common and -tools packages for
       intra-Python variant dependency checking, python-but-no-python3, etc.
     + [CL] Drop parens in depends-on-package-from-other-python-variant
       output.
     + [CL] Refactor django-package-does-not-depend-on-django check to
       correctly check Django packages called python2-django-foo.
   * checks/rules.{desc.pm}:
     + [CL] Suggest using /usr/share/dpkg/architecture.mk as a solution to
       debian-rules-sets-dpkg-architecture-variable rather than simply
       replacing assignments with ?=. Thanks to Helmut Grohne for the
       suggestion.
     + [CL] Include the line number when warning about instances of
       override_dh_clean targets that are missing calls to dh_clean.
     + [CL] Apply patch from Paul Tagliamonte to check for files
       that use DH_EXTRA_ADDONS. Thanks!  (Closes: #885790)
     + [CL] Update $PYTHON3X_DEPEND to prevent false positives in
       missing-python-build-dependency.  (Closes: #750537)
     + [CL] Refactor check for override_dh_clean-does-not-call-dh_clean
       tag into a loop.
     + [CL] Check for override_dh_fixperms targets that are missing calls
       to dh_fixperms.  (Closes: #885910)
   * checks/scripts.pm:
     + [CL] Include the offending/unknown shebang in the output of various
       interpreter-related tags.  (Closes: #673734)
   * checks/source-copyright.desc:
     + [CL] Also mention that we check for NOTICE.gz files when looking for
       Apache 2.0 packages that do not distribute their accompanying NOTICE
       file.
   * checks/watch-file.{desc,pm}:
     + [CL] Apply patch from Felix Lechner <felix.lechner@lease-up.com> to
       check for packages where an upstream signature exists but is not
       being used.  (Closes: #885621)
 .
   * data/fields/name_section_mappings:
     + [CL] Ensure that PAM modules are placed in the "admin" section,
       additionally preventing a false positive for libpam-krb5 which was
       being caught by a "libfoo1" => "libs" entry.  (Closes: #885899)
   * data/files/python-generic-modules:
     + [CL] Add "examples".
   * data/spelling/corrections:
     + [PW] Add a number of corrections.
   * data/standards-version/release-dates:
     + [CL] Correct date(1) invocation example in comment.
     + [CL] Add 4.1.3 as a known standards version.
 .
   * debian/control:
     + [CL] Declare compliance with Debian Policy 4.1.3.
     + [CL] Mention Debian Policy 4.1.3 in long package description.
Checksums-Sha1:
 dedce2f3059854278607a3894b6015e84171edb7 3516 lintian_2.5.67.dsc
 af2ccb4c91ddb873f5179607b8819786e2490483 2615600 lintian_2.5.67.tar.xz
 429166cb13d87b2368e9d5d5d716281f281cd93e 1082188 lintian_2.5.67_all.deb
 89332e1e9e7a22c064f570eaa105915f1f817612 15846 lintian_2.5.67_amd64.buildinfo
Checksums-Sha256:
 1a355b81bb5d96720b40b2be060026dd7bfe3e0a13cbb910009d917ff98c120b 3516 lintian_2.5.67.dsc
 4bc66a14351ac07bd36645f89fca2bc46fbbf9aa9ba0c907c04c07d558ec6e0d 2615600 lintian_2.5.67.tar.xz
 d445682180e954cdd3d428cda673bf74c857bb2c39ef00be01effbbdec0afa52 1082188 lintian_2.5.67_all.deb
 bb1bfb641c1439dd17ab9776ef13739ce64db5c04621a39e223ff0986bfe5d98 15846 lintian_2.5.67_amd64.buildinfo
Files:
 a449ee5b1c4bdc9ef688d9c4d6ee898f 3516 devel optional lintian_2.5.67.dsc
 b2432863798bf6da5e0edc39b4af698d 2615600 devel optional lintian_2.5.67.tar.xz
 1701909bb9a5fb16a4fed4cbcd1c1c4a 1082188 devel optional lintian_2.5.67_all.deb
 2939e8fb6346ad447f5fc1eb97eec446 15846 devel optional lintian_2.5.67_amd64.buildinfo

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

iQIzBAEBCAAdFiEEwv5L0nHBObhsUz5GHpU+J9QxHlgFAlpKVmoACgkQHpU+J9Qx
HliwdA//Ucq0M4jrG22id5DVpVQ8zYelImTVNA5pLHxYTn8QAzokuMc0pHcqUTYn
D3gq2QaghR8yHiBcMq4M496U5IWUY6KwULXk61z0zCyM5TryMOsziX3RPBPSnnJW
fhlzKFgRT7hZj8bIvCsBBljnQPXr9XGMbjYYcF1xstVQoeHCtvPw4HTBqHXzil55
E5xDyVXh9lVbnOXOlQCi5v8KriJKDLreTPxZJEIapITusrHdSQ9IIaAY6A2aJ2a8
VYGfmWrYflNM5TPAti1Q/5nkwWgAjU5Vq8eGXSlsG+JUu+mlz2kkNWFa9cy/85q9
i/9I21h/y+DRnsxvtzQ9KrD+D+LgXbXIUhkvM1+q4x2IFz89qY9I+hWgUxLWu+o0
tOdTjplLhVFWsSYcn5NdPmxdCXf5TCktCw0Vh8ouSt9RnQ1kyEcbO4Rl8cpt0cSo
yg+ne/MZomA+ibnjYKIxbAnACjkcxeP7FqYAt3SGaG0tCbn3zj3l/L6Tms9CPzgd
kk05ceM8Cd9fOvWbKyvUfQGwxBH4rwn6Eb4Qj9RYAtcPFhte/ABvsUoSxbQ2WsSr
EAKc5kW9dIBNwUfK5KtmZHGuQ9Zj4W5mOE68zAF+k2iRTdNemtFpvqm9KzAAtcBF
4rvy+XrPqFRV/qB46ROAIUkUxgOHgOB/2y8eDWFRouImJPFNwt8=
=stUQ
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: