[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 01/01: Warn if debian/watch uses deprecated githubredir.debian.net scraper



This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch githubredir
in repository lintian.

commit 75bbb02a367409d5a66be300ef7db09ce0d10e89
Author: Chris Lamb <lamby@debian.org>
Date:   Mon Oct 26 22:04:08 2015 +0000

    Warn if debian/watch uses deprecated githubredir.debian.net scraper
    
    Signed-off-by: Chris Lamb <lamby@debian.org>
---
 checks/watch-file.desc                         | 13 +++++++++++++
 checks/watch-file.pm                           |  4 ++++
 t/tests/watch-file-general/debian/debian/watch |  5 ++++-
 t/tests/watch-file-general/desc                |  1 +
 t/tests/watch-file-general/tags                |  2 ++
 5 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/checks/watch-file.desc b/checks/watch-file.desc
index 1b66da7..1ae2a8a 100644
--- a/checks/watch-file.desc
+++ b/checks/watch-file.desc
@@ -116,6 +116,19 @@ Info: The watch file specifies a SourceForge page or download server
  project and <tt>&lt;tar-name&gt;</tt> with the name of the tarball
  distributed within that project.  Adjust the filename regex as necessary.
 
+Tag: debian-watch-file-uses-deprecated-githubredir
+Severity: important
+Certainty: certain
+Ref: https://lists.debian.org/debian-devel-announce/2014/10/msg00000.html
+Info: The watch file specifies a githubredir.debia.net URL, which is deprecated
+ Instead, use direct links to the tags page:
+ .
+  version=3
+  https://github.com/&lt;user&gt;/&lt;project&gt;/tags .*/(.*)\.tar\.gz
+ .
+ replacing <tt>&lt;user&gt;</tt> and <tt>&lt;project&gt;</tt> with the Github
+ username and project respectfully.
+
 Tag: debian-watch-file-specifies-wrong-upstream-version
 Severity: normal
 Certainty: certain
diff --git a/checks/watch-file.pm b/checks/watch-file.pm
index 46ab633..737c25b 100644
--- a/checks/watch-file.pm
+++ b/checks/watch-file.pm
@@ -122,6 +122,10 @@ sub run {
             if (m,\b\Qhttp://pypi.python.org/\E,) {
                 tag 'debian-watch-file-accesses-pypi-over-http', "line $.";
             }
+            if (m%githubredir\.debian\.net%) {
+                tag 'debian-watch-file-uses-deprecated-githubredir',
+                  "line $.";
+            }
 
             if (
                 m{ (?:https?|ftp)://
diff --git a/t/tests/watch-file-general/debian/debian/watch b/t/tests/watch-file-general/debian/debian/watch
index 71b4717..e322710 100644
--- a/t/tests/watch-file-general/debian/debian/watch
+++ b/t/tests/watch-file-general/debian/debian/watch
@@ -26,4 +26,7 @@ http://pypi.python.org/foo scripts\.([\d.]+)\.tar\.gz debian uupdate
 # Unsupported PyPI URL.
 https://pypi.python.org/packages/source/p/pip/ pip-(\S+)\.tar\.gz
 
-# without any pgpsigurlmangle
\ No newline at end of file
+# Deprecated githubredir
+http://githubredir.debian.net/github/username/project /(.*).tar.gz
+
+# without any pgpsigurlmangle
diff --git a/t/tests/watch-file-general/desc b/t/tests/watch-file-general/desc
index 64d09c9..0e7a20e 100644
--- a/t/tests/watch-file-general/desc
+++ b/t/tests/watch-file-general/desc
@@ -15,5 +15,6 @@ Test-For:
  debian-watch-file-unknown-version
  debian-watch-file-unsupported-pypi-url
  debian-watch-file-uses-deprecated-sf-redirector-method
+ debian-watch-file-uses-deprecated-githubredir
  debian-watch-may-check-gpg-signature
 References: Debian Bug#510398
diff --git a/t/tests/watch-file-general/tags b/t/tests/watch-file-general/tags
index a80f45b..1c54f22 100644
--- a/t/tests/watch-file-general/tags
+++ b/t/tests/watch-file-general/tags
@@ -1,4 +1,5 @@
 E: watch-file-general source: debian-watch-file-unsupported-pypi-url line 27
+E: watch-file-general source: debian-watch-file-uses-deprecated-githubredir line 30
 I: watch-file-general source: debian-watch-file-accesses-pypi-over-http line 24
 I: watch-file-general source: debian-watch-file-should-dversionmangle-not-uversionmangle line 5
 P: watch-file-general source: debian-watch-may-check-gpg-signature
@@ -8,6 +9,7 @@ W: watch-file-general source: debian-watch-file-should-mangle-version line 12
 W: watch-file-general source: debian-watch-file-should-mangle-version line 14
 W: watch-file-general source: debian-watch-file-should-mangle-version line 15
 W: watch-file-general source: debian-watch-file-should-mangle-version line 27
+W: watch-file-general source: debian-watch-file-should-mangle-version line 30
 W: watch-file-general source: debian-watch-file-should-use-sf-redirector line 12
 W: watch-file-general source: debian-watch-file-should-use-sf-redirector line 14
 W: watch-file-general source: debian-watch-file-should-use-sf-redirector line 15

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: