Bug#692616: [lintian] patch
Package: lintian
Version: 2.5.10.2
control: tags -1 patch
A patch
--
Dr-Ing Bastien ROUCARIÈS uUniversité de Cergy/SATIE ENS Cachan
From 1652ca48021dd76cdcca785243f3de0ef9db1be0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Tue, 11 Dec 2012 11:55:24 +0100
Subject: [PATCH] Add json checking
---
checks/cruft | 13 +++++++++++++
checks/cruft.desc | 8 ++++++++
2 files changed, 21 insertions(+)
diff --git a/checks/cruft b/checks/cruft
index efd9b7a..f3249d9 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -406,6 +406,19 @@ sub find_cruft {
}
close F;
}
+
+ # test license problem is source file (only text file)
+ my $b = basename $name;
+ if(-T $b) {
+ open(my $F, '<', $b) or fail "can't open $name: $!";
+ while(my $line = <$F>) {
+ # json evil license
+ if($line =~ m/Software\s+shall\s+be\s+used\s+for\s+Good\s*,?\s*not\s+Evil/i) {
+ tag 'license-problem-json-evil', $name;
+ }
+ }
+ close $F or fail "can not close opened file $name: $!"
+ }
}
1;
diff --git a/checks/cruft.desc b/checks/cruft.desc
index 3c8d31d..b176347 100644
--- a/checks/cruft.desc
+++ b/checks/cruft.desc
@@ -478,3 +478,11 @@ Info: The given control file uses <tt>CRLF</tt> as line terminator
<tt>CR</tt> character in the file:
.
<tt>sed -i 's/\r//g' path/to/file</tt>
+
+Tag: license-problem-json-evil
+Severity: serious
+Certainty: possible
+Info: The given source file is copyrighted under the non free
+ license of json and the infamous clause:
+ The Software shall be used for Good, not Evil.
+Ref: http://wiki.debian.org/qa.debian.org/jsonevil
--
1.7.10.4
Reply to: