Package: lintian
Version: 2.5.4
Severity: normal
Tags: patch

After discussing the issue within the FTP Team, we came to the
conclusion that packages using waf build-system [0] in its current,
compressed form do not ship all sources in their prefered form of
modification [1].

A workaround has been described already [2], we think implementing a
lintian check for this will help us to reduce the number of waf binaries
in the archive.

Attached patch is a tentative to implement it. I used a quite high
severity because I plan to propose the new tag for the lintian
auto-reject list, if accepted.

Thanks,
Luca
diff --git a/checks/cruft b/checks/cruft
index 6fd9d39..e81e580 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -149,7 +149,9 @@ for my $file (keys(%$file_info)) {
         tag 'source-contains-prebuilt-binary', $file;
     } elsif ($file_info->{$file} =~ m/\b(?:PE(?:32|64)|COFF executable)\b/) {
         tag 'source-contains-prebuilt-windows-binary', $file;
-    }
+    } elsif ($file_info->{$file} =~ m/data/ and $file =~ /\bwaf/) {
+        tag 'source-contains-waf-binary', $file;
+    } 
 }
 
 for my $file (@EOL_TERMINATORS_FILES) {
diff --git a/checks/cruft.desc b/checks/cruft.desc
index 2093f72..3e8a958 100644
--- a/checks/cruft.desc
+++ b/checks/cruft.desc
@@ -429,6 +429,20 @@ Info: The source tarball contains a prebuilt binary for Microsoft Windows.
  the upstream distribution instead.  If not, you may want to ask upstream
  to provide source-only tarballs.
 
+Tag: source-contains-waf-binary
+Severity: important
+Certainty: certain
+Info: The source tarball contains a waf binary. This file is a Python
+ script with an embedded bzip2 archive, which is uncompressed and unpacked
+ at runtime.
+ .
+ Although corresponding sources can be easily extracted, FTP Team does not
+ consider waf binary as the preferred form of modification; it should be
+ provided unpacked instead, or completely removed, if possible.
+ .
+ You might want to follow these guidelines to obtain an unpacked waf:
+ http://wiki.debian.org/UnpackWaf
+
 Tag: tar-errors-from-source
 Severity: normal
 Certainty: wild-guess

Reply via email to