--- Begin Message ---
- To: submit@bugs.debian.org
- Subject: lintian: Check for PACKAGE.maintscript files that include "maint-script-parameters".
- From: Chris Lamb <lamby@debian.org>
- Date: Sun, 18 Sep 2016 11:20:06 +0100
- Message-id: <1474194006.3033735.729171001.34C1C771@webmail.messagingengine.com>
Package: lintian
Severity: wishlist
Tags: patch
Hi,
Attached is the following:
commit 767c26eb22eb0b7ee5ed04ef06be9daed12446e3
Author: Chris Lamb <lamby@debian.org>
Date: Sun Sep 18 11:19:14 2016 +0100
Check for PACKAGE.maintscript files that include "maint-script-parameters".
checks/debhelper.desc | 8 ++++++++
checks/debhelper.pm | 10 ++++++++++
.../debian/debian/maintscript | 2 ++
t/tests/maintscript-includes-maint-script-parameters/desc | 6 ++++++
t/tests/maintscript-includes-maint-script-parameters/tags | 1 +
5 files changed, 27 insertions(+)
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby@debian.org / chris-lamb.co.uk
`-
>From 767c26eb22eb0b7ee5ed04ef06be9daed12446e3 Mon Sep 17 00:00:00 2001
From: Chris Lamb <lamby@debian.org>
Date: Sun, 18 Sep 2016 11:19:14 +0100
Subject: [PATCH] Check for PACKAGE.maintscript files that include
"maint-script-parameters".
---
checks/debhelper.desc | 8 ++++++++
checks/debhelper.pm | 10 ++++++++++
.../debian/debian/maintscript | 2 ++
t/tests/maintscript-includes-maint-script-parameters/desc | 6 ++++++
t/tests/maintscript-includes-maint-script-parameters/tags | 1 +
5 files changed, 27 insertions(+)
create mode 100644 t/tests/maintscript-includes-maint-script-parameters/debian/debian/maintscript
create mode 100644 t/tests/maintscript-includes-maint-script-parameters/desc
create mode 100644 t/tests/maintscript-includes-maint-script-parameters/tags
diff --git a/checks/debhelper.desc b/checks/debhelper.desc
index 9b9d046..3317d56 100644
--- a/checks/debhelper.desc
+++ b/checks/debhelper.desc
@@ -361,3 +361,11 @@ Info: The listed target in debian/rules command is a likely misspelling.
Implementation detail: The typo is detected by using "Levenshtein
edit distance". Therefore, if the typo involve several characters,
Lintian may not detect it.
+
+Tag: maintscript-includes-maint-script-parameters
+Severity: normal
+Certainty: possible
+Info: Lines in a <tt>debian/*.maintscript</tt> correspond to
+ <tt>dpkg-maintscript-helper(1)</tt> commands and parameters. However, the
+ "maint-script-parameters" should not be included as debhelper will add those
+ automatically. See <tt>dh_installdeb(1)</tt> for more information.
diff --git a/checks/debhelper.pm b/checks/debhelper.pm
index ad80fc8..be8fd25 100644
--- a/checks/debhelper.pm
+++ b/checks/debhelper.pm
@@ -354,6 +354,16 @@ sub run {
_tag_if_executable($file);
} elsif ($basename =~ m/^ex\.|\.ex$/i) {
tag 'dh-make-template-in-source', $file;
+ } elsif ($basename =~ m/^(?:(.*)\.)?maintscript$/) {
+ next unless $file->is_open_ok;
+ my $fd = $file->open;
+ while (<$fd>) {
+ if (m/-- "\$@"\s*$/) {
+ tag 'maintscript-includes-maint-script-parameters',
+ $basename, "(line $.)";
+ }
+ }
+ close($fd);
} elsif ($basename =~ m/^(?:.+\.)?debhelper(?:\.log)?$/){
# The regex matches "debhelper", but debhelper/Dh_Lib does not
# make those, so skip it.
diff --git a/t/tests/maintscript-includes-maint-script-parameters/debian/debian/maintscript b/t/tests/maintscript-includes-maint-script-parameters/debian/debian/maintscript
new file mode 100644
index 0000000..9d5ecd5
--- /dev/null
+++ b/t/tests/maintscript-includes-maint-script-parameters/debian/debian/maintscript
@@ -0,0 +1,2 @@
+rm_conffile /etc/correct.conf 0.2~ foo
+rm_conffile /etc/incorrect.conf 0.2~ foo -- "$@"
diff --git a/t/tests/maintscript-includes-maint-script-parameters/desc b/t/tests/maintscript-includes-maint-script-parameters/desc
new file mode 100644
index 0000000..0313ac0
--- /dev/null
+++ b/t/tests/maintscript-includes-maint-script-parameters/desc
@@ -0,0 +1,6 @@
+Testname: maintscript-includes-maint-script-parameters
+Sequence: 6000
+Version: 1.0
+Description: Check for dh_installdeb .maintscript files
+Test-For:
+ maintscript-includes-maint-script-parameters
diff --git a/t/tests/maintscript-includes-maint-script-parameters/tags b/t/tests/maintscript-includes-maint-script-parameters/tags
new file mode 100644
index 0000000..ca38ca0
--- /dev/null
+++ b/t/tests/maintscript-includes-maint-script-parameters/tags
@@ -0,0 +1 @@
+W: maintscript-includes-maint-script-parameters source: maintscript-includes-maint-script-parameters maintscript (line 2)
--
2.9.3
--- End Message ---
--- Begin Message ---
Source: lintian
Source-Version: 2.5.48
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 838195@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: Tue, 04 Oct 2016 19:37:17 +0000
Source: lintian
Binary: lintian
Architecture: source
Version: 2.5.48
Distribution: unstable
Urgency: low
Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
Changed-By: Niels Thykier <niels@thykier.net>
Description:
lintian - Debian package checker
Closes: 814326 823627 831633 836756 837502 837801 838195 838246 838603 838997 839086 839228 839263 839553
Changes:
lintian (2.5.48) unstable; urgency=low
.
* Summary of tag changes:
+ Added:
- file-name-contains-wildcard-character
- homepage-for-cran-package-not-canonical
- init.d-script-needs-depends-on-lsb-base
- maintscript-includes-maint-script-parameters
+ Removed:
- hardening-no-stackprotector
.
* checks/binaries.{desc,pm}:
+ [NT] Rewrite/embed the necessary bits from hardening-check to
implement the default hardening-no-* checks directly in lintian.
This is because hardening-check appears to be losing its
"home" with the coming removal of hardening-wrapper and
hardening-includes. (Closes: #836756)
+ [JW] Remove the hardening-no-stackprotector tag.
+ [NT] Allow "golang-any" as an alternative to "golang-go" in
Build-Depends for detecting golang binaries. Thanks to
Martín Ferrari for the report and the initial patch.
(Closes: #839228)
* checks/changelog-file.{desc,pm}:
+ [JW] Bump threshold for improbable bug number to 2000.
* checks/control-file.{desc,pm}:
+ [JW] Add references to tags related to build profiles.
+ [JW] Relax Build-Profiles syntax check to allow (almost) any
characters in profile names. Thanks to Ximin Luo for the bug report.
(Closes: #839086)
+ [JW] Add support for pkg.<srcpkg>.<anything> build profiles.
* checks/debhelper.pm:
+ [JW] Ignore comments in debian/rules.
+ [JW] Fix parsing rule targets in lines containing multiple colons.
Thanks to Andreas Beckmann for the bug report. (Closes: #838246)
+ [CL] Check for .maintscript files that include
"maint-script-parameters". (Closes: #838195)
+ [NT] Fix typo that prevented lintian from detecting uses of the
dhmk build-system.
* checks/fields.{desc,pm}:
+ [JW] Fix typo.
+ [JW] Add references to tags related to build profiles.
+ [JW] Add support for pkg.<srcpkg>.<anything> build profiles.
+ [JW] Demote tags for build-depends related to build profiles to
pedantic, as the required packages are available in stable.
Thanks to Helmut Grohne for the bug report. (Closes: #831633)
+ [NT] Apply patch from Dylan Aïssi to tag r-bioc packages not in
section "gnu-r". (Closes: #839263)
+ [NT] Apply patch from Dylan Aïssi to tag non-canonical uses of
the cran homepage in the Homepage field. (Closes: #839553)
* checks/files.{desc,pm}:
+ [CL, NT] Tag usages of shell wildcard characters in file names.
(Closes: #814326)
* checks/init.d.{desc,pm}:
+ [CL, NT]: Emit a tag for initscripts that source the
/lib/lsb/init-functions utility functions without declaring the
corresponding dependency on lsb-base (>= 3.0-6).
(Closes: #838997)
* checks/shared-libs.desc:
+ [JW] Fix typos.
* checks/testsuite.pm:
+ [JW] Apply patch from Sean Whitton to recognise autopkgtest-pkg-elpa
as a valid value for the Testsuite field. (Closes: #837801)
.
* collection/hardening-info:
+ [NT] Removed.
.
* data/fields/build-profiles:
+ [JW] Add new profiles: nogolang, nojava, noperl, nopython, noudeb.
* data/fields/obsolete-packages:
+ [NT] Apply patch from Otto Kekäläinen to assist with the transition
to the "default-mysql-*" packages. (Closes: #838603)
* data/fields/perl-provides:
+ [NT] Refresh perl provides.
* data/files/js-libraries:
+ [BR] Apply patch from Jean-Michel Vourgère to add detection of
libjs-jquery-migrate-1. (Closes: #823627)
* data/files/php-libraries:
+ [JW] Apply patch from Marcelo Jorge Vieira to update package name
for php-gettext. (Closes: #837502)
* data/spelling/corrections:
+ [JW, PW] Add more corrections.
.
* debian/control:
+ [NT] Drop dependencies on hardening-includes as we no longer need
hardening-check.
* debian/copyright:
+ [JW] Add Paul Wise.
+ [JW] Remove now-unneeded separate entry for spellintian.t.
+ [JW] Update copyright years.
+ [CL] Add Chris Lamb.
.
* helpers/coll/hardening-info-helper:
+ [NT] Removed.
* helpers/coll/objdump-info-helper:
+ [NT] Expose a few more bits from readelf needed to implement some
of the hardening checks.
.
* lib/Lintian/Collect/Binary.pm:
+ [NT] Expose a few more bits from readelf needed to implement some
of the hardening checks.
.
* profiles/debian/extra-hardening.profile:
+ [NT] Removed - we no longer support the stackprotector tag.
* profiles/debian/ftp-master-auto-reject.profile:
+ [JW] Refresh against current rule set.
* profiles/debian/main.profile:
+ [JW] Stop disabling the hardening-no-stackprotector tag.
.
* t/scripts/spellintian.t:
+ [JW] Relicense as GPLv2+, like the rest of Lintian.
Checksums-Sha1:
a97a30a7e59db4b688995dc693eaf65712201c3b 2781 lintian_2.5.48.dsc
fc0c4868b547ed9321b8be5177f3857992bb93be 1231432 lintian_2.5.48.tar.xz
Checksums-Sha256:
96d52c761cb3d6fa1884a83d0fd62d8992dcebf3899f13ee9959197775301c73 2781 lintian_2.5.48.dsc
c76a94b8a7f4eb90e21f9c51f2cf6909246a4fbd33d824cdedf33d17e696ee1c 1231432 lintian_2.5.48.tar.xz
Files:
9918b0f9c69bf35d90d60bacde4a688b 2781 devel optional lintian_2.5.48.dsc
3c8ce94e94fce55e0e0590d0e4029419 1231432 devel optional lintian_2.5.48.tar.xz
-----BEGIN PGP SIGNATURE-----
iQIcBAEBCAAGBQJX9AtrAAoJEAVLu599gGRCl0kP/A3rbba6jnBJK9DGaujw0OiF
Xa+NtV9tMT3epRwMxm2X24G3UD3yOs3WAY813YqdCB1d5J01QZoymoFWoIeMH0eW
5PokzHCYikzu/zP9uck9U1+FOJAmJ3DGrekBmxa2jN5A2ar7CWoJNy87WLfXzMAM
pO6YCau+xqaU/KV0jGClgIQdwwgc+Z7HHcJds3iivdfCfSR+9xNoS9ik9Er8k4lB
YikBBQ4HAVE5mTxCxo02q/L960ijaaaPXsClOD7B0v8bRjfVDcjVf9G5Q679WfAF
0IuzaSdiTURm+NBPUwqmP8BwcEfIeFVEbd6rYGbGe5fTQiKcZPMp7F3SJPHFXQSB
74f6Ods5X5SdnSZmlutzR+vgVbMSXcrnDEx9MCFW4Njsrso2y0IRG7citHy7Vbbn
ndgIzfOSAKIiU76fFLfq/eBDap4SOd6FC4BPIVP4AB2hWvFRieIYTLU6wPZLK4+z
M5bR0kfFnzieKAyZvHk2h6fHynhPDUy68zc7RldyN0M3xvmGl4hR1pLmUOJhjZFo
NhMtXxznsuTY8Sg0vaYOiBNHqBpjn+/zlbRKhxlxN1U9/DlWOWzbuj4gb+hRcoCp
vsq/yf3zkHNvr+o8sosTFrHfaQHlZ8w4kh3bAaKeD5Y/nIIN6x6CWqVXmYfQnmJ/
nIA2kEuOU78klcsgts8E
=QE3b
-----END PGP SIGNATURE-----
--- End Message ---