Commit 08570275 authored by Chris Lamb's avatar Chris Lamb

Add support for derivative-specific "Changed-By" validation to enforce…

Add support for derivative-specific "Changed-By" validation to enforce additional restrictions on the uploader.
parent e7ecb310
Pipeline #5749 failed with stage
in 0 seconds
......@@ -216,3 +216,12 @@ Info: The version number for this package does not comply with the
Derivative distributions of Debian may enforce additional restrictions
on the version in order to ensure that forked (or packages that are
otherwise modified) are marked as such.
Tag: changed-by-invalid-for-derivative
Severity: serious
Certainty: certain
Info: The Changed-By field does not match the required format for this
Debian derivative.
.
Derivative distributions of Debian may enforce additional restrictions
on such fields.
# Derivative-specific changed-by validation.
#
# Checked in order, any must match.
#
# format: $regex ~~ explanation
. ~~ always matches
......@@ -27,6 +27,10 @@ lintian (2.5.85) UNRELEASED; urgency=medium
+ [CL] Clarify that we should add an extra bit of whitespace for
annotated release tags.
* lib/Lintian/Check.pm:
+ [CL] Add support for derivative-specific "Changed-By" validation to
enforce additional restrictions on the uploader.
* t/tests/{binaries-libc-link,legacy-libbaz}/desc:
+ [CL] Mark currently-failing tests as requiring file (<= 5.33) to
ensure the testsuite passes whilst we wait for a resolution on the
......
......@@ -209,6 +209,20 @@ sub check_maintainer {
if ($name ne 'Debian QA Group');
}
}
# Changed-by specific tests.
if ($field eq 'changed-by') {
my $DERIVATIVE_CHANGED_BY
= Lintian::Data->new('common/derivative-changed-by',
qr/\s*~~\s*/, sub { $_[1]; });
foreach my $re ($DERIVATIVE_CHANGED_BY->all) {
next if $maintainer =~ m/$re/;
my $explanation = $DERIVATIVE_CHANGED_BY->value($re);
tag "$field-invalid-for-derivative", $maintainer,
"($explanation)";
}
}
}
return;
}
......
# Derivative-specific changed-by validation.
#
# Checked in order, any must match.
#
# format: $regex ~~ explanation
\@puri.sm>$ ~~ should use @puri.sm email addresses
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment