[lintian] 01/01: Suggest maintainers add a debian/upstream/metadata file. (Closes: #833007)
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository lintian.
commit a9f7567b66d2d1133476107dec355fb6e8a80f44
Author: Dylan Aïssi <bob.dybian@gmail.com>
Date: Tue May 2 22:49:36 2017 +0200
Suggest maintainers add a debian/upstream/metadata file. (Closes: #833007)
---
checks/upstream-metadata.desc | 17 +++++++++++++++++
checks/upstream-metadata.pm | 6 +++++-
debian/changelog | 4 ++++
t/templates/tests/pedantic/debian/upstream/metadata | 2 ++
t/tests/upstream-metadata-is-missing/desc | 9 +++++++++
t/tests/upstream-metadata-is-missing/pre_build | 2 ++
t/tests/upstream-metadata-is-missing/tags | 2 ++
7 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/checks/upstream-metadata.desc b/checks/upstream-metadata.desc
index 5f3c2c5..d95da81 100644
--- a/checks/upstream-metadata.desc
+++ b/checks/upstream-metadata.desc
@@ -18,3 +18,20 @@ Certainty: certain
Ref: http://dep.debian.net/deps/dep12/
Info: The DEP 12 metadata file is not well formed. The formatting
need to be adjusted to match the YAML specification.
+
+Tag: upstream-metadata-file-is-missing
+Severity: pedantic
+Certainty: certain
+Experimental: yes
+Ref: http://dep.debian.net/deps/dep12/, https://wiki.debian.org/UpstreamMetadata
+Info: This source package is not Debian-native but it does not have a
+ <tt>debian/upstream/metadata</tt> file.
+ .
+ The Upstream MEtadata GAthered with YAml (UMEGAYA) project is an effort
+ to collect meta-information about upstream projects from any source
+ package. This file is in YAML format and it is used in to feed the data
+ in the UltimateDebianDatabase. For example, it can contains the way the
+ authors want their software be cited in publications and some
+ bibliographic references about the software.
+ .
+ Please add a <tt>debian/upstream/metadata</tt> file.
diff --git a/checks/upstream-metadata.pm b/checks/upstream-metadata.pm
index 5826f36..c9d347b 100644
--- a/checks/upstream-metadata.pm
+++ b/checks/upstream-metadata.pm
@@ -30,7 +30,11 @@ use YAML::XS;
sub run {
my (undef, undef, $info) = @_;
my $yamlfile = $info->index_resolved_path('debian/upstream/metadata');
- return if not $yamlfile;
+
+ if (not $yamlfile) {
+ tag 'upstream-metadata-file-is-missing' unless $info->native;
+ return;
+ }
if ($yamlfile->is_open_ok) {
my $yaml;
diff --git a/debian/changelog b/debian/changelog
index d651854..9fa729b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -28,6 +28,10 @@ lintian (2.5.76) UNRELEASED; urgency=medium
etc. (Closes: #832099)
* checks/scripts.pm:
+ [CL] Prevent some false-positives in udevadm-called-without-guard.
+ * checks/upstream-metadata.{desc,pm}:
+ + [CL] Apply patch from Dylan Aïssi to suggest maintainers add a
+ debian/upstream/metadata file, although downgrade the check to
+ "experimental" level for the time being. (Closes: #833007)
* checks/watch-file.pm:
+ [CL] Use our new $PKGREPACK_REGEX to match and capture the suffix
when looking at potential debian/watch mangling issues.
diff --git a/t/templates/tests/pedantic/debian/upstream/metadata b/t/templates/tests/pedantic/debian/upstream/metadata
new file mode 100644
index 0000000..948ec52
--- /dev/null
+++ b/t/templates/tests/pedantic/debian/upstream/metadata
@@ -0,0 +1,2 @@
+Contact: John Doe
+Name: foo
\ No newline at end of file
diff --git a/t/tests/upstream-metadata-is-missing/desc b/t/tests/upstream-metadata-is-missing/desc
new file mode 100644
index 0000000..20b32b8
--- /dev/null
+++ b/t/tests/upstream-metadata-is-missing/desc
@@ -0,0 +1,9 @@
+Testname: upstream-metadata-is-missing
+Type: non-native
+Version: 1.0-1
+Description: Tests for missing upstream metadata file
+Skeleton: pedantic
+Options: --pedantic -I -E
+Test-For:
+ debian-watch-may-check-gpg-signature
+ upstream-metadata-file-is-missing
diff --git a/t/tests/upstream-metadata-is-missing/pre_build b/t/tests/upstream-metadata-is-missing/pre_build
new file mode 100755
index 0000000..e4e9373
--- /dev/null
+++ b/t/tests/upstream-metadata-is-missing/pre_build
@@ -0,0 +1,2 @@
+#!/bin/sh
+rm -f "$1/debian/upstream/metadata"
diff --git a/t/tests/upstream-metadata-is-missing/tags b/t/tests/upstream-metadata-is-missing/tags
new file mode 100644
index 0000000..3755b89
--- /dev/null
+++ b/t/tests/upstream-metadata-is-missing/tags
@@ -0,0 +1,2 @@
+P: upstream-metadata-is-missing source: debian-watch-does-not-check-gpg-signature
+X: upstream-metadata-is-missing source: upstream-metadata-file-is-missing
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: