[SCM] Debian package checker branch, master, updated. 2.5.1-31-g301227a
The following commit has been merged in the master branch:
commit 301227a8531aaee688f752505e20eb0222cca613
Author: Niels Thykier <niels@thykier.net>
Date: Sun Jul 3 22:00:38 2011 +0200
Added check for usage of deprecated makefiles
Based loosely on a patch from Luk Claes.
diff --git a/checks/rules b/checks/rules
index 2ac1d3f..afbd0ac 100644
--- a/checks/rules
+++ b/checks/rules
@@ -28,6 +28,7 @@ our $PYTHON3X_DEPEND = join (' | ', map { "python$_ | python$_-dev" } qw(3.2));
our $ANYPYTHON_DEPEND = "$PYTHON_DEPEND | $PYTHON2X_DEPEND | $PYTHON3_DEPEND | $PYTHON3X_DEPEND";
my $KNOWN_MAKEFILES = Lintian::Data->new('rules/known-makefiles', '\|\|');
+my $DEPRECATED_MAKEFILES = Lintian::Data->new('rules/deprecated-makefiles');
# Certain build tools must be listed in Build-Depends even if there are no
# arch-specific packages because they're required in order to run the clean
@@ -169,6 +170,9 @@ while (<RULES>) {
} else {
$includes = 1;
}
+ if ($DEPRECATED_MAKEFILES->known($makefile)){
+ tag 'debian-rules-uses-deprecated-makefile', "line $.", $makefile;
+ }
}
$uses_makefile_pl = 1 if m/Makefile\.PL/o;
diff --git a/checks/rules.desc b/checks/rules.desc
index af5b25e..f40100e 100644
--- a/checks/rules.desc
+++ b/checks/rules.desc
@@ -60,6 +60,13 @@ Info: The <tt>debian/rules</tt> file for this package does not provide
These targets will be required by policy in the future, so should be
added to prevent future breakage.
+Tag: debian-rules-uses-deprecated-makefile
+Severity: normal
+Certainty: certain
+Info: The <tt>debian/rules</tt> file for this package appears to
+ include a Makefile, which has been deprecated. Please refer to the
+ documentation of the providing package for a replacement (if any).
+
Tag: debian-rules-uses-pwd
Severity: normal
Certainty: certain
diff --git a/data/rules/deprecated-makefiles b/data/rules/deprecated-makefiles
new file mode 100644
index 0000000..00d760d
--- /dev/null
+++ b/data/rules/deprecated-makefiles
@@ -0,0 +1,7 @@
+# Manual maintained list of Makefiles that can be included from
+# d/rules, but is also known to be deprecated.
+#
+# Please keep it sorted by file name.
+
+/usr/share/cdbs/1/rules/dpatch.mk
+/usr/share/cdbs/1/rules/simple-patchsys.mk
diff --git a/debian/changelog b/debian/changelog
index 588276d..6807aaa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ lintian (2.5.2) UNRELEASED; urgency=low
- 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
* checks/binaries:
+ [NT] Added lib/${MULTIARCH_DIR} to the list of paths to
@@ -55,11 +56,15 @@ lintian (2.5.2) UNRELEASED; urgency=low
false negatives of missing targets. Thanks to
Jakub Wilk for the suggestion and the initial makefile
list. (Closes: #631711)
+ + [NT] Warn about including the CDBS simple-patchsys and dpatch
+ 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)
* checks/symlinks:
+ [NT] Symlink checking extended to relative paths as well.
(Closes: #217023)
- * data/rules/known-makefiles:
+ * data/rules/{deprecated,known}-makefiles:
+ [NT] Added file.
* data/spelling/corrections:
+ [RA] Remove discontiguous correction. The OED lists this as valid.
diff --git a/t/tests/fields-redundant/debian/debian/control.in b/t/tests/rules-including-deprecated-makefiles/debian/debian/control.in
similarity index 84%
copy from t/tests/fields-redundant/debian/debian/control.in
copy to t/tests/rules-including-deprecated-makefiles/debian/debian/control.in
index f70f923..2ac6fdd 100644
--- a/t/tests/fields-redundant/debian/debian/control.in
+++ b/t/tests/rules-including-deprecated-makefiles/debian/debian/control.in
@@ -3,9 +3,7 @@ Priority: extra
Section: devel
Maintainer: {$author}
Standards-Version: {$standards_version}
-Build-Depends: debhelper (>= 7)
-Bugs: debbugs://bugs.debian.org/
-Origin: debian
+Build-Depends: debhelper (>= 7.0.50~), cdbs
Package: {$srcpkg}
Architecture: all
@@ -15,3 +13,4 @@ Description: {$description}
Lintian. It is part of the Lintian test suite and may do very odd
things. It should not be installed like a regular package. It may
be an empty package.
+
diff --git a/t/tests/rules-including-deprecated-makefiles/debian/debian/rules b/t/tests/rules-including-deprecated-makefiles/debian/debian/rules
new file mode 100755
index 0000000..3f98954
--- /dev/null
+++ b/t/tests/rules-including-deprecated-makefiles/debian/debian/rules
@@ -0,0 +1,5 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
+
diff --git a/t/tests/rules-including-deprecated-makefiles/desc b/t/tests/rules-including-deprecated-makefiles/desc
new file mode 100644
index 0000000..006299f
--- /dev/null
+++ b/t/tests/rules-including-deprecated-makefiles/desc
@@ -0,0 +1,6 @@
+Testname: rules-including-deprecated-makefiles
+Sequence: 6000
+Version: 1.0
+Description: Test for debian/rules with deprecated included file
+Test-For:
+ debian-rules-uses-deprecated-makefile
diff --git a/t/tests/rules-including-deprecated-makefiles/tags b/t/tests/rules-including-deprecated-makefiles/tags
new file mode 100644
index 0000000..3dc6edd
--- /dev/null
+++ b/t/tests/rules-including-deprecated-makefiles/tags
@@ -0,0 +1 @@
+W: rules-including-deprecated-makefiles source: debian-rules-uses-deprecated-makefile line 4 /usr/share/cdbs/1/rules/simple-patchsys.mk
--
Debian package checker
Reply to: