[lintian] 01/01: Exclude files under /usr/share/cargo/registry/ from a few checks
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 081f5c77d4abbab51036b174c344838b26135e1b
Author: Josh Triplett <josh@joshtriplett.org>
Date: Wed Nov 23 03:48:50 2016 -0800
Exclude files under /usr/share/cargo/registry/ from a few checks
That directory contains unmodified upstream sources.
(Closes: #845201)
Signed-off-by: Niels Thykier <niels@thykier.net>
---
checks/files.pm | 5 ++++-
checks/scripts.pm | 4 ++++
debian/changelog | 4 ++++
t/tests/files-package-contains-foo/debian/debian/rules | 8 ++++++++
4 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/checks/files.pm b/checks/files.pm
index b19b3bf..50b6381 100644
--- a/checks/files.pm
+++ b/checks/files.pm
@@ -1218,6 +1218,8 @@ sub run {
and not $fname =~ m,^usr/share/man/(?:[^/]+/)?man\d/,o
# liblicense (again)
and not $fname =~ m,^usr/share/pyshared-data/,o
+ # Rust crate unmodified upstream sources
+ and not $fname =~ m,^usr/share/cargo/registry/,o
# Some GNOME/GTK software uses these to show the "license
# header".
and not $fname =~ m,
@@ -1365,7 +1367,8 @@ sub run {
}
# ---------------- vcs control files
- if ($fname =~ m,$VCS_FILES_OR_ALL,) {
+ if ( $fname =~ m,$VCS_FILES_OR_ALL,
+ and $fname !~ m,^usr/share/cargo/registry/,) {
tag 'package-contains-vcs-control-file', $file;
}
diff --git a/checks/scripts.pm b/checks/scripts.pm
index 65db226..c33d7c9 100644
--- a/checks/scripts.pm
+++ b/checks/scripts.pm
@@ -298,6 +298,10 @@ sub run {
&& !$is_absolute
&& $in_examples);
+ # Skip upstream source code shipped in /usr/share/cargo/registry/
+ next
+ if $filename =~ m,^usr/share/cargo/registry/,;
+
if ($interpreter eq '') {
script_tag('script-without-interpreter', $filename);
next;
diff --git a/debian/changelog b/debian/changelog
index 56a27e2..b429928 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -27,6 +27,10 @@ lintian (2.5.50) UNRELEASED; urgency=medium
for deliberately empty packages. If your package receives
an "empty-binary-package" tag, please replace the use of
"virtual package".
+ * checks/{files,scripts}.pm:
+ + [NT] Apply patch from Josh Triplett to exclude files under
+ /usr/share/cargo/registry/ from a few checks as that directory
+ contains unmodified upstream sources. (Closes: #845201)
* checks/manpages.pm:
+ [JW, NT] Fix false negative manpage-named-after-build-path
for packages built by sbuild. (Closes: #801760)
diff --git a/t/tests/files-package-contains-foo/debian/debian/rules b/t/tests/files-package-contains-foo/debian/debian/rules
index e90d722..a29fc66 100644
--- a/t/tests/files-package-contains-foo/debian/debian/rules
+++ b/t/tests/files-package-contains-foo/debian/debian/rules
@@ -49,3 +49,11 @@ override_dh_install:
mkdir -p $(SHARE)/cmake-3.1/Modules
touch $(SHARE)/cmake-3.1/FindFoo.cmake
touch $(SHARE)/cmake-3.1/Modules/FindVar.cmake
+
+ # Ignored Cargo sources
+ mkdir -p $(SHARE)/cargo/registry/crate-1.0.0
+ touch $(SHARE)/cargo/registry/crate-1.0.0/.gitignore
+ touch $(SHARE)/cargo/registry/crate-1.0.0/LICENSE
+ echo '#!/bin/sh' > $(SHARE)/cargo/registry/crate-1.0.0/test.sh
+ echo '#!/usr/bin/python' > $(SHARE)/cargo/registry/crate-1.0.0/test.py
+ chmod a+x $(SHARE)/cargo/registry/crate-1.0.0/test.py
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: