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

Bug#886096: lintian: Emit warnings for Alioth URLs in packaging (migration to Salsa)



tags 886096 + patch
thanks

Hi Stuart

> [..]

Thanks! Can you check the attached draft patch? Note that I hijacked
te "vcs-deprecated-in-debian-infrastructure" tag instead of adding a
new one as that had 99% overlap..

I'd love to get this applied and uploaded today. :)

  commit ce133079d182f8005e8896da2c9215057304bc89
  Author: Chris Lamb <lamby@debian.org>
  Date:   Sun Mar 18 13:11:21 2018 -0400
  
      Upgrade vcs-deprecated-in-debian-infrastructure to "W:" from "P" due to Alioth becoming read-only from May 1st, as well as additionally checking Vcs-Browser fields hosted on Alioth and updating the tag description with more details. (Closes: #886096)
  
   checks/fields.desc                                 | 31 +++++++++++++++++-----
   checks/fields.pm                                   | 11 ++++----
   debian/changelog                                   |  7 ++++-
   .../debian/debian/control.in                       |  1 +
   .../tags                                           |  3 ++-
   5 files changed, 39 insertions(+), 14 deletions(-)


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-
From ce133079d182f8005e8896da2c9215057304bc89 Mon Sep 17 00:00:00 2001
From: Chris Lamb <lamby@debian.org>
Date: Sun, 18 Mar 2018 13:11:21 -0400
Subject: [PATCH] Upgrade vcs-deprecated-in-debian-infrastructure to "W:" from
 "P" due to Alioth becoming read-only from May 1st, as well as additionally
 checking Vcs-Browser fields hosted on Alioth and updating the tag description
 with more details. (Closes: #886096)

---
 checks/fields.desc                                 | 31 +++++++++++++++++-----
 checks/fields.pm                                   | 11 ++++----
 debian/changelog                                   |  7 ++++-
 .../debian/debian/control.in                       |  1 +
 .../tags                                           |  3 ++-
 5 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/checks/fields.desc b/checks/fields.desc
index 54b6584b5..102183019 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -1386,19 +1386,18 @@ Info:
  the specified VCS field if it is otherwise wrong.
 
 Tag: vcs-deprecated-in-debian-infrastructure
-Severity: pedantic
+Severity: normal
 Certainty: certain
 Info: The specified Vcs-* field points to an area within the *.debian.org
  infrastructure but refers to a version control system that has been
  deprecated.
  .
  After 1st May 2018, Debian will not offer hosting for any version
- control system other than Git.
- .
- Whilst maintainers are free to use other version control systems hosted
- elsewhere, potential contributors are likely to be most familiar with
- Git.
-Ref: https://lists.debian.org/debian-devel-announce/2017/08/msg00008.html
+ control system other than Git and the Alioth service will become
+ read-only in May 2018. Packages should migrate to Git hosting on
+ https://salsa.debian.org.
+Ref: https://lists.debian.org/debian-devel-announce/2017/08/msg00008.html,
+ https://wiki.debian.org/Salsa
 
 Tag: co-maintained-package-with-no-vcs-fields
 Severity: pedantic
@@ -1496,3 +1495,21 @@ Info: This package has a relationship with a mail-transport-agent but
  Please change the dependency to:
  .
   default-mta | pkgname | mail-transport-agent
+
+Tag: vcs-field-uses-deprecated-infrastructure
+Severity: normal
+Certainty: certain
+Info: The specified Vcs-* field contains a URL pointing to the
+ deprecated alioth.debian.org infrastructure. This server will become
+ read-only in May 2018.
+ .
+ Packages should migrate to Git hosting on https://salsa.debian.org.
+ .
+ For further information about salsa.debian.org, please see:
+ .
+  https://wiki.debian.org/Salsa
+ .
+ HTTP redirects from alioth to salsa can be made by requesting that they
+ added to the AliothRewriter project:
+ .
+  https://salsa.debian.org/salsa/AliothRewriter/
diff --git a/checks/fields.pm b/checks/fields.pm
index e80ae24b8..50d41eb7f 100644
--- a/checks/fields.pm
+++ b/checks/fields.pm
@@ -1380,17 +1380,18 @@ sub run {
             if ($vcs eq 'browser') {
                 tag 'vcs-browser-links-to-empty-view', $uri
                   if $uri =~ m%rev=0&sc=0%;
-                next;
+            } else {
+                $seen_vcs{$vcs}++;
             }
-            $seen_vcs{$vcs}++;
-            if ($uri =~ m/\.debian\.org/) {
+            if ($uri =~ m{//([^.]+)\.debian\.org/}) {
                 tag 'vcs-deprecated-in-debian-infrastructure', "vcs-$vcs", $uri
-                  if $vcs ne 'git';
+                  if $1 ne 'salsa';
             } else {
                 tag 'orphaned-package-not-maintained-in-debian-infrastructure',
                   "vcs-$vcs", $uri
                   if $info->field('maintainer', '')
-                  =~ /packages\@qa.debian.org/;
+                  =~ /packages\@qa.debian.org/
+                  and $vcs ne 'browser';
             }
         }
     }
diff --git a/debian/changelog b/debian/changelog
index 1d2beb960..db98696a6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,7 +13,12 @@ lintian (2.5.80) UNRELEASED; urgency=medium
     + [CL] Look under all of /usr/share/doc (not just /usr/share/doc/$pkg)
       when looking for installed examples and update tag description to
       match.  Thanks to Ferenc Wágner for the report.  (Closes: #892905)
-  * checks/fields.pm:
+  * checks/fields.{desc,pm}:
+    + [CL] Upgrade vcs-deprecated-in-debian-infrastructure to "W:" from "P"
+      due to Alioth becoming read-only from May 1st, as well as
+      additionally checking Vcs-Browser fields hosted on Alioth and
+      updating the tag description with more details.  Thanks to Stuart
+      Prescott for his input.  (Closes: #886096)
     + [CL] Only check dependency fields in binary packages for
       mail-transport-agent-dependency-does-not-specify-default-mta etc.
       (Closes: #892550)
diff --git a/t/tests/fields-vcs-deprecated-in-debian-infrastructure/debian/debian/control.in b/t/tests/fields-vcs-deprecated-in-debian-infrastructure/debian/debian/control.in
index 380487d64..662bf8704 100644
--- a/t/tests/fields-vcs-deprecated-in-debian-infrastructure/debian/debian/control.in
+++ b/t/tests/fields-vcs-deprecated-in-debian-infrastructure/debian/debian/control.in
@@ -7,6 +7,7 @@ Build-Depends: {$build_depends}
 Rules-Requires-Root: no
 Homepage: https://lintian.debian.org/
 Vcs-Svn: svn://anonscm.debian.org/foobar/trunk
+Vcs-Browser: https://anonscm.debian.org/git/lintian/lintian.git
 
 Package: {$source}
 Architecture: {$architecture}
diff --git a/t/tests/fields-vcs-deprecated-in-debian-infrastructure/tags b/t/tests/fields-vcs-deprecated-in-debian-infrastructure/tags
index d98d9606b..63cfec1aa 100644
--- a/t/tests/fields-vcs-deprecated-in-debian-infrastructure/tags
+++ b/t/tests/fields-vcs-deprecated-in-debian-infrastructure/tags
@@ -1,2 +1,3 @@
 I: fields-vcs-deprecated-in-debian-infrastructure source: vcs-field-uses-insecure-uri vcs-svn svn://anonscm.debian.org/foobar/trunk
-P: fields-vcs-deprecated-in-debian-infrastructure source: vcs-deprecated-in-debian-infrastructure vcs-svn svn://anonscm.debian.org/foobar/trunk
+W: fields-vcs-deprecated-in-debian-infrastructure source: vcs-deprecated-in-debian-infrastructure vcs-browser https://anonscm.debian.org/git/lintian/lintian.git
+W: fields-vcs-deprecated-in-debian-infrastructure source: vcs-deprecated-in-debian-infrastructure vcs-svn svn://anonscm.debian.org/foobar/trunk
-- 
2.16.2


Reply to: