[SCM] Debian package checker branch, master, updated. 2.5.1-165-g00b02ff
The following commit has been merged in the master branch:
commit 00b02ffaeac6a19cd3c501b41554b2872416d6be
Author: Niels Thykier <niels@thykier.net>
Date: Tue Aug 2 19:32:35 2011 +0200
Check for uses of DEB_*FLAGS_{SET,APPEND} in d/rules
diff --git a/checks/rules b/checks/rules
index 19476ff..f1e61bc 100644
--- a/checks/rules
+++ b/checks/rules
@@ -184,8 +184,8 @@ while (<RULES>) {
if (/\$[\(\{]PWD[\)\}]/) {
tag 'debian-rules-uses-pwd', "line $.";
}
- if (/^\t\s*-(?:\$[\(\{]MAKE[\}\)]|make)\s.*(?:dist)?clean/ ||
- /^\t\s*(?:\$[\(\{]MAKE[\}\)]|make)\s(?:.*\s)?-\w*i.*(?:dist)?clean/) {
+ if (m/^\t\s*-(?:\$[\(\{]MAKE[\}\)]|make)\s.*(?:dist)?clean/ ||
+ m/^\t\s*(?:\$[\(\{]MAKE[\}\)]|make)\s(?:.*\s)?-\w*i.*(?:dist)?clean/) {
tag 'debian-rules-ignores-make-clean-error', "line $.";
}
if (/\$[\(\{]DEB_BUILD_OPTS[\)\}]/) {
@@ -194,6 +194,9 @@ while (<RULES>) {
if (/^\s*DEB_AUTO_UPDATE_DEBIAN_CONTROL\s*=\s*yes/) {
tag 'debian-rules-automatically-updates-control', "line $.";
}
+ if (m/\bDEB_[^_ \t]+FLAGS_(?:SET|APPEND)\b/o) {
+ tag 'debian-rules-uses-or-modifies-user-only-variable', "line $.";
+ }
if ($uses_makefile_pl && m/install.*PREFIX/ && !/DESTDIR/) {
tag 'debian-rules-makemaker-prefix-is-deprecated', "line $.";
}
diff --git a/checks/rules.desc b/checks/rules.desc
index f40100e..afc6b81 100644
--- a/checks/rules.desc
+++ b/checks/rules.desc
@@ -199,3 +199,16 @@ Info: The package appears to use an <tt>ExtUtils::MakeMaker</tt>
make install PREFIX=$(TMP)/usr # WRONG
should be replaced with
make install DESTDIR=$(TMP) # RIGHT
+
+Tag: debian-rules-uses-or-modifies-user-only-variable
+Severity: normal
+Certainty: possible
+Ref: http://bugs.debian.org/631786
+Info: The rules files appear to be reading or modifying a variable not
+ intended for use by package maintainers. The special variables
+ .
+ DEB_*FLAGS_{SET,APPEND}
+ .
+ can be used by users, who wants to re-compile debian packages with
+ special (or non-standard) build flags.
+
diff --git a/debian/changelog b/debian/changelog
index e7f6220..8a6f3fe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,11 +2,12 @@ lintian (2.5.2) UNRELEASED; urgency=low
* Summary of tag changes:
+ Added:
+ - debian-rules-uses-deprecated-makefile
+ - debian-rules-uses-or-modifies-user-only-variable
- package-has-long-file-name
- source-package-component-has-long-file-name
- - upstart-job-in-etc-init.d-not-registered-via-update-rc.d
- - debian-rules-uses-deprecated-makefile
- udeb-uses-non-gzip-data-tarball
+ - upstart-job-in-etc-init.d-not-registered-via-update-rc.d
+ Removed:
- calls-suidperl-directly
- suid-perl-script-but-no-perl-suid-dep
@@ -132,6 +133,8 @@ lintian (2.5.2) UNRELEASED; urgency=low
as they are both deprecated by source format 3.0 (quilt).
Thanks to Nelson A. de Oliveira for reporting and Luk Claes
for providing an initial patch. (Closes: #624201)
+ + [NT] Added check for using DEB_*FLAGS_{SET,APPEND} in d/rules.
+ Thanks to Raphaël Hertzog for the report. (Closes: #631786)
* checks/scripts{,.desc}:
+ [NT] Removed perl-suid related tags as the package is no
longer available and we have no known packages triggering
diff --git a/t/tests/rules-special-variables/debian/debian/rules b/t/tests/rules-special-variables/debian/debian/rules
new file mode 100644
index 0000000..fe1e7a6
--- /dev/null
+++ b/t/tests/rules-special-variables/debian/debian/rules
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+
+DEB_CFLAGS_APPEND:= -Wl,--as-needed
+
+%:
+ dh $@
+
diff --git a/t/tests/rules-special-variables/desc b/t/tests/rules-special-variables/desc
new file mode 100644
index 0000000..e8c28a8
--- /dev/null
+++ b/t/tests/rules-special-variables/desc
@@ -0,0 +1,5 @@
+Testname: rules-special-variables
+Sequence: 6000
+Version: 1.0
+Description: Test for debian/rules using special variables
+Test-For: debian-rules-uses-or-modifies-user-only-variable
diff --git a/t/tests/rules-special-variables/tags b/t/tests/rules-special-variables/tags
new file mode 100644
index 0000000..4b3549d
--- /dev/null
+++ b/t/tests/rules-special-variables/tags
@@ -0,0 +1 @@
+W: rules-special-variables source: debian-rules-uses-or-modifies-user-only-variable line 3
--
Debian package checker
Reply to: