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

Bug#884498: lintian: Pedantic check for source format 1.0 packages



tags 884498 + patch
thanks

Hi,

> lintian: Pedantic check for source format 1.0 packages

Patch attached:

  commit 6fdc4a335dc50e6857ef628899d00842ced21706
  Author: Chris Lamb <lamby@debian.org>
  Date:   Fri Dec 22 10:14:52 2017 +0000
  
      Emit a wishlist ("I:") tag when using "1.0" source format and
        suggest moving to the 3.x series. (Closes: #884498)
  
   checks/debian-source-dir.desc               | 14 ++++++++++++++
   checks/debian-source-dir.pm                 |  3 +++
   debian/changelog                            |  3 +++
   t/tests/cruft-empty-diff/desc               |  4 +++-
   t/tests/cruft-empty-diff/tags               |  1 +
   t/tests/patch-systems-quilt-no-depends/desc |  3 +--
   t/tests/patch-systems-quilt-no-depends/tags |  1 +
   7 files changed, 26 insertions(+), 3 deletions(-)

… but this naturally results in a huge number of testsuite failures as
the test templates use format 1.0 and thus violate the tag. Changing
these templates to use the 3.x series results in other test-specific
issues. Any pointers? :)


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-
>From 6fdc4a335dc50e6857ef628899d00842ced21706 Mon Sep 17 00:00:00 2001
From: Chris Lamb <lamby@debian.org>
Date: Fri, 22 Dec 2017 10:14:52 +0000
Subject: [PATCH] Emit a wishlist ("I:") tag when using "1.0" source format and
 suggest moving to the 3.x series. (Closes: #884498)

---
 checks/debian-source-dir.desc               | 14 ++++++++++++++
 checks/debian-source-dir.pm                 |  3 +++
 debian/changelog                            |  3 +++
 t/tests/cruft-empty-diff/desc               |  4 +++-
 t/tests/cruft-empty-diff/tags               |  1 +
 t/tests/patch-systems-quilt-no-depends/desc |  3 +--
 t/tests/patch-systems-quilt-no-depends/tags |  1 +
 7 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/checks/debian-source-dir.desc b/checks/debian-source-dir.desc
index 512ceb959..4ccd7be9c 100644
--- a/checks/debian-source-dir.desc
+++ b/checks/debian-source-dir.desc
@@ -68,3 +68,17 @@ Tag: source-format
 Severity: classification
 Certainty: certain
 Info: This is the source format declared in the package.
+
+Tag: deprecated-source-format
+Severity: wishlist
+Certainty: certain
+Info: This source package specifies a deprecated or outdated source format
+ in <tt>debian/source/format</tt>.
+ .
+ The newer 3.x series of source formats have a number of advantages
+ including superior compression formats, native patch handling, binary file
+ support, multiple upstream tarballs, etc.
+ .
+ Please move your package to use either the "3.0 (quilt)" or "3.0 (native)"
+ format.
+Ref: dpkg-source(1), https://wiki.debian.org/Projects/DebSrc3.0
diff --git a/checks/debian-source-dir.pm b/checks/debian-source-dir.pm
index 46c1d5d69..027d2ef29 100644
--- a/checks/debian-source-dir.pm
+++ b/checks/debian-source-dir.pm
@@ -30,6 +30,7 @@ use Lintian::Tags qw(tag);
 
 our %KNOWN_FORMATS = map { $_ => 1 }
   ('1.0', '2.0', '3.0 (quilt)', '3.0 (native)', '3.0 (git)', '3.0 (bzr)');
+our %DEPRECATED_FORMATS = map { $_ => 1 } ('1.0');
 
 our $KNOWN_FILES = Lintian::Data->new('debian-source-dir/known-files');
 
@@ -47,6 +48,8 @@ sub run {
         close($fd);
         $format_extra = '';
         tag 'unknown-source-format', $format unless $KNOWN_FORMATS{$format};
+        tag 'deprecated-source-format', $format
+          if $DEPRECATED_FORMATS{$format};
     } else {
         tag 'missing-debian-source-format';
         $format = '1.0';
diff --git a/debian/changelog b/debian/changelog
index 96b31b6c3..a1620ad7c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,9 @@ lintian (2.5.66) UNRELEASED; urgency=medium
 
   XXX: generate tag summary
 
+  * checks/debian-source-dir.{pm,desc}:
+    + [CL] Emit a wishlist ("I:") tag when using "1.0" source format and
+      suggest moving to the 3.x series.  (Closes: #884498)
   * checks/fields.{pm,desc}:
     + [CL] Emit a wishlist warning for packages that mix-and-match more
       than one version control system in Vcs-* headers.  (Closes: #884503)
diff --git a/t/tests/cruft-empty-diff/desc b/t/tests/cruft-empty-diff/desc
index 3a545ef50..58c3e1cde 100644
--- a/t/tests/cruft-empty-diff/desc
+++ b/t/tests/cruft-empty-diff/desc
@@ -2,5 +2,7 @@ Testname: cruft-empty-diff
 Version: 1.0-1
 Type: non-native
 Description: Test an empty Debian diff
-Test-For: empty-debian-diff
+Test-For:
+ deprecated-source-format
+ empty-debian-diff
 References: Debian Bug#498668
diff --git a/t/tests/cruft-empty-diff/tags b/t/tests/cruft-empty-diff/tags
index 290841be1..b76595618 100644
--- a/t/tests/cruft-empty-diff/tags
+++ b/t/tests/cruft-empty-diff/tags
@@ -1 +1,2 @@
+I: cruft-empty-diff source: deprecated-source-format 1.0
 W: cruft-empty-diff source: empty-debian-diff
diff --git a/t/tests/patch-systems-quilt-no-depends/desc b/t/tests/patch-systems-quilt-no-depends/desc
index 515da6a6a..67bc2ed55 100644
--- a/t/tests/patch-systems-quilt-no-depends/desc
+++ b/t/tests/patch-systems-quilt-no-depends/desc
@@ -2,6 +2,5 @@ Testname: patch-systems-quilt-no-depends
 Version: 1.0
 Description: Test for quilt series but no B-D on quilt
 Test-For:
+ deprecated-source-format
  quilt-series-but-no-build-dep
-
-
diff --git a/t/tests/patch-systems-quilt-no-depends/tags b/t/tests/patch-systems-quilt-no-depends/tags
index de15bf4ee..d630c1f0f 100644
--- a/t/tests/patch-systems-quilt-no-depends/tags
+++ b/t/tests/patch-systems-quilt-no-depends/tags
@@ -1 +1,2 @@
+I: patch-systems-quilt-no-depends source: deprecated-source-format 1.0
 W: patch-systems-quilt-no-depends source: quilt-series-but-no-build-dep
-- 
2.15.1


Reply to: