[lintian] 03/04: checks/debhelper: Relax Build-Profiles syntax check
This is an automated email from the git hooks/post-receive script.
jwilk pushed a commit to branch master
in repository lintian.
commit e8586d7a291aebfc887d0bcff540ab8240d8b632
Author: Jakub Wilk <jwilk@debian.org>
Date: Fri Sep 30 12:48:24 2016 +0200
checks/debhelper: Relax Build-Profiles syntax check
Allow almost any characters in profile names.
We can afford being lax here, because we check the names against the
list of known profile names elsewhere.
---
checks/control-file.pm | 8 ++++----
debian/changelog | 5 ++++-
t/tests/fields-build-profiles-general/debian/debian/control.in | 2 +-
t/tests/fields-build-profiles-general/tags | 2 +-
4 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/checks/control-file.pm b/checks/control-file.pm
index 8ad39f9..da8fec5 100644
--- a/checks/control-file.pm
+++ b/checks/control-file.pm
@@ -318,19 +318,19 @@ sub run {
if (
$raw!~ m{^\s* # skip leading whitespace
< # first list start
- !?[a-z0-9]+ # (possibly negated) term
+ !?[^\s<>]+ # (possibly negated) term
(?: # any additional terms
\s+ # start with a space
- !?[a-z0-9]+ # (possibly negated) term
+ !?[^\s<>]+ # (possibly negated) term
)* # zero or more additional terms
> # first list end
(?: # any additional restriction lists
\s+ # start with a space
< # additional list start
- !?[a-z0-9]+ # (possibly negated) term
+ !?[^\s<>]+ # (possibly negated) term
(?: # any additional terms
\s+ # start with a space
- !?[a-z0-9]+ # (possibly negated) term
+ !?[^\s<>]+ # (possibly negated) term
)* # zero or more additional terms
> # additional list end
)* # zero or more additional lists
diff --git a/debian/changelog b/debian/changelog
index c4677dc..d43c877 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,8 +9,11 @@ lintian (2.5.48) UNRELEASED; urgency=low
"home" with the coming removal of hardening-wrapper and
hardening-includes.
+ [JW] Remove the hardening-no-stackprotector tag.
- * checks/control-file.desc:
+ * 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)
* checks/debhelper.pm:
+ [JW] Ignore comments in debian/rules.
+ [JW] Fix parsing rule targets in lines containing multiple colons.
diff --git a/t/tests/fields-build-profiles-general/debian/debian/control.in b/t/tests/fields-build-profiles-general/debian/debian/control.in
index 8a8ae54..fe186fc 100644
--- a/t/tests/fields-build-profiles-general/debian/debian/control.in
+++ b/t/tests/fields-build-profiles-general/debian/debian/control.in
@@ -9,7 +9,7 @@ Build-Depends: {$build_depends},
Package: {$source}-wrong-syntax
Architecture: {$architecture}
Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
-Build-Profiles: <in.valid>
+Build-Profiles: <in<valid>
Description: {$description} (wrong syntax)
Check the syntax of the Build-Profiles field
.
diff --git a/t/tests/fields-build-profiles-general/tags b/t/tests/fields-build-profiles-general/tags
index bcebd07..f4ce41b 100644
--- a/t/tests/fields-build-profiles-general/tags
+++ b/t/tests/fields-build-profiles-general/tags
@@ -1,6 +1,6 @@
E: fields-build-profiles-general source: invalid-profile-name-in-build-profiles-field unknown fields-build-profiles-general-unknown-profile
E: fields-build-profiles-general source: invalid-profile-name-in-source-relation foobar [build-depends: bpfail1 <foobar>]
-E: fields-build-profiles-general source: invalid-restriction-formula-in-build-profiles-field <in.valid> fields-build-profiles-general-wrong-syntax
+E: fields-build-profiles-general source: invalid-restriction-formula-in-build-profiles-field <in<valid> fields-build-profiles-general-wrong-syntax
W: fields-build-profiles-general source: restriction-formula-with-debhelper-without-debhelper-version
W: fields-build-profiles-general source: restriction-formula-with-debhelper-without-debhelper-version
W: fields-build-profiles-general source: restriction-formula-without-versioned-dpkg-dev-dependency
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: