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

[lintian] 02/02: Check for override_dh_fixperms targets that are missing calls to dh_fixperms. (Closes: #885910)



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

lamby pushed a commit to branch master
in repository lintian.

commit 992254cbf94b81de614b5d24016d90ec4551c3b3
Author: Chris Lamb <lamby@debian.org>
Date:   Sun Dec 31 09:10:21 2017 +0000

    Check for override_dh_fixperms targets that are missing calls to dh_fixperms. (Closes: #885910)
---
 checks/rules.desc                                           | 13 +++++++++++++
 checks/rules.pm                                             |  2 +-
 debian/changelog                                            |  2 ++
 .../debian/debian/rules                                     |  4 ++++
 .../rules-override-dh-foo-does-not-call-dh-foo-unrel/desc   |  1 +
 .../debian/debian/rules                                     |  1 +
 t/tests/rules-override-dh-foo-does-not-call-dh-foo/desc     |  1 +
 t/tests/rules-override-dh-foo-does-not-call-dh-foo/tags     |  1 +
 8 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/checks/rules.desc b/checks/rules.desc
index 66571e8..5f59d27 100644
--- a/checks/rules.desc
+++ b/checks/rules.desc
@@ -305,3 +305,16 @@ Info: The <tt>debian/rules</tt> file for this package uses
  .
  Please add a call to <tt>dh_clean</tt>.
 Ref: #884419, #884815
+
+Tag: override_dh_fixperms-does-not-call-dh_fixperms
+Severity: normal
+Certainty: certain
+Info: The <tt>debian/rules</tt> file for this package uses
+ the <tt>override_dh_fixperms</tt> but this target does not reference
+ <tt>dh_fixperms</tt>.
+ .
+ This can result in packages inheriting the <tt>umask(2)</tt> of the build
+ process, rendering the package unreproducible.
+ .
+ Please add a call to <tt>dh_fixperms</tt>.
+Ref: #885909
diff --git a/checks/rules.pm b/checks/rules.pm
index 9c81a20..8c6b7bc 100644
--- a/checks/rules.pm
+++ b/checks/rules.pm
@@ -426,7 +426,7 @@ sub run {
         tag 'binary-arch-rules-but-pkg-is-arch-indep' if $nonempty;
     }
 
-    foreach my $suffix (qw(dh_clean)) {
+    foreach my $suffix (qw(dh_clean dh_fixperms)) {
         my $line = $overridden{$suffix};
         tag "override_$suffix-does-not-call-$suffix", "(line $line)"
           if $line
diff --git a/debian/changelog b/debian/changelog
index 00b9a40..5d2902c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,6 +38,8 @@ lintian (2.5.67) UNRELEASED; urgency=medium
       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-relateed tags.  (Closes: #673734)
diff --git a/t/tests/rules-override-dh-foo-does-not-call-dh-foo-unrel/debian/debian/rules b/t/tests/rules-override-dh-foo-does-not-call-dh-foo-unrel/debian/debian/rules
index 3236e08..cfe2c82 100755
--- a/t/tests/rules-override-dh-foo-does-not-call-dh-foo-unrel/debian/debian/rules
+++ b/t/tests/rules-override-dh-foo-does-not-call-dh-foo-unrel/debian/debian/rules
@@ -6,3 +6,7 @@
 override_dh_clean:
 	true
 	dh_clean # This rule is a false positive
+
+override_dh_fixperms:
+	true
+	dh_fixperms # This rule is a false positive
diff --git a/t/tests/rules-override-dh-foo-does-not-call-dh-foo-unrel/desc b/t/tests/rules-override-dh-foo-does-not-call-dh-foo-unrel/desc
index c25a223..516dfe3 100644
--- a/t/tests/rules-override-dh-foo-does-not-call-dh-foo-unrel/desc
+++ b/t/tests/rules-override-dh-foo-does-not-call-dh-foo-unrel/desc
@@ -3,3 +3,4 @@ Version: 1.0
 Description: Test for missing calls to dh_foo in override_dh_foo (false positives)
 Test-Against:
  override_dh_clean-does-not-call-dh_clean
+ override_dh_fixperms-does-not-call-dh_fixperms
diff --git a/t/tests/rules-override-dh-foo-does-not-call-dh-foo/debian/debian/rules b/t/tests/rules-override-dh-foo-does-not-call-dh-foo/debian/debian/rules
index 2b4af06..ad5753f 100755
--- a/t/tests/rules-override-dh-foo-does-not-call-dh-foo/debian/debian/rules
+++ b/t/tests/rules-override-dh-foo-does-not-call-dh-foo/debian/debian/rules
@@ -5,3 +5,4 @@
 
 # Empty targets
 override_dh_clean:
+override_dh_fixperms:
diff --git a/t/tests/rules-override-dh-foo-does-not-call-dh-foo/desc b/t/tests/rules-override-dh-foo-does-not-call-dh-foo/desc
index 0522ba6..3a598d3 100644
--- a/t/tests/rules-override-dh-foo-does-not-call-dh-foo/desc
+++ b/t/tests/rules-override-dh-foo-does-not-call-dh-foo/desc
@@ -3,3 +3,4 @@ Version: 1.0
 Description: Test for missing calls to dh_foo in override_dh_foo
 Test-For:
  override_dh_clean-does-not-call-dh_clean
+ override_dh_fixperms-does-not-call-dh_fixperms
diff --git a/t/tests/rules-override-dh-foo-does-not-call-dh-foo/tags b/t/tests/rules-override-dh-foo-does-not-call-dh-foo/tags
index 2e5195e..1f2d41a 100644
--- a/t/tests/rules-override-dh-foo-does-not-call-dh-foo/tags
+++ b/t/tests/rules-override-dh-foo-does-not-call-dh-foo/tags
@@ -1 +1,2 @@
 W: rules-override-dh-foo-does-not-call-dh-foo source: override_dh_clean-does-not-call-dh_clean (line 7)
+W: rules-override-dh-foo-does-not-call-dh-foo source: override_dh_fixperms-does-not-call-dh_fixperms (line 8)

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


Reply to: