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

Bug#708881: marked as done ([lintian] Fix false positive of gfdl detection)



Your message dated Thu, 30 May 2013 07:33:16 +0000
with message-id <E1UhxMK-0000NG-LY@franck.debian.org>
and subject line Bug#708881: fixed in lintian 2.5.13
has caused the Debian Bug report #708881,
regarding [lintian] Fix false positive of gfdl detection
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
708881: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=708881
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: lintian
Version: 2.5.12
Severity: normal
Tags: patch

These 13 patches fixe false positive of gfdl detection.

Please review and apply.

Bastien
From 99255be67a6cb912c5520846016c3149a6dc8c44 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Sun, 19 May 2013 11:23:47 +0200
Subject: [PATCH 11/13] Add variant for dict-fold package

dict-fold use a variant syntax that is ok for gfdl with no invariants.

Allow it.
---
 checks/cruft                                                |   11 ++++++++---
 .../cruft-gfdl-invariants/debian/src/variantdictfold.txt    |    7 +++++++
 2 files changed, 15 insertions(+), 3 deletions(-)
 create mode 100644 t/tests/cruft-gfdl-invariants/debian/src/variantdictfold.txt

diff --git a/checks/cruft b/checks/cruft
index a2c00e8..032fbe0 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -488,11 +488,16 @@ sub find_cruft {
                         # GFDL license, assume it is bad unless it
                         # explicitly states it has no "bad sections".
                         given($+{gfdlsections}) {
-                            when(m/(?:the$s+)? no $s+ Invariant $s+ Sections?,?
-                                    $s+ (?:with$s+)? (?:the$s+)? no $s+ Front-Cover $s+ Texts?,? $s+ (?:and$s+)?
-                                        (?:with$s+)? (?:the$s+)? no $s+ Back-Cover $s+ Texts?/xiso) {
+                            when(m/no $s+ Invariant $s+ Sections?,?
+                                   $s+ (?:with$s+)? (?:the$s+)? no $s+ Front-Cover $s+ Texts?,? $s+ (?:and$s+)?
+                                       (?:with$s+)? (?:the$s+)? no $s+ Back-Cover $s+ Texts?/xiso) {
                                 # no invariant
                             }
+                            when(m/no $s+ Invariant $s+ Sections?,?
+                                      $s+ (?:no$s+)? Front-? $s+ or 
+                                      $s+ (?:no$s+)? Back-Cover $s+ Texts?/xiso) {
+                                # no invariant variant (dict-foldoc)
+                            }
                             when(m/with $s+ the $s+ Invariant $s+ Sections $s+ being
                                         $s+ (?:\@var\{|<var>)? LIST $s+ THEIR $s+TITLES (?:\}|<\/var>)? $s* ,?
                                         $s+ with $s+ the $s+ Front-Cover $s+ Texts $s+ being
diff --git a/t/tests/cruft-gfdl-invariants/debian/src/variantdictfold.txt b/t/tests/cruft-gfdl-invariants/debian/src/variantdictfold.txt
new file mode 100644
index 0000000..f9d9615
--- /dev/null
+++ b/t/tests/cruft-gfdl-invariants/debian/src/variantdictfold.txt
@@ -0,0 +1,7 @@
+This is ok
+	Permission is granted to copy, distribute and/or modify this
+	document under the terms of the GNU Free Documentation
+	License, Version 1.1 or any later version published by the
+	Free Software Foundation; with no Invariant Sections, Front-
+	or Back-Cover Texts.  A copy of the license is included in the
+	section entitled "{GNU Free Documentation License}".
\ No newline at end of file
-- 
1.7.10.4

From 1c12fa735982620f9c7499b880e6151b60af8145 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Sat, 18 May 2013 16:59:52 +0200
Subject: [PATCH 01/13] Be more liberal for zero is plural case for matching
 gfdl

For non native english speaker zero could be singular. Avoid to
trip lintian in the case of this grammar mistake.
---
 checks/cruft |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/checks/cruft b/checks/cruft
index b003ecb..2c0e52d 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -488,9 +488,9 @@ sub find_cruft {
                         # GFDL license, assume it is bad unless it
                         # explicitly states it has no "bad sections".
                         given($+{gfdlsections}) {
-                            when(m/with $s+ (?:the$s+)? no $s+ Invariant $s+ Sections,?
-                                        $s+ (?:with$s+)? (?:the$s+)? no $s+ Front-Cover $s+ Texts,? $s+ and
-                                        $s+ (?:with$s+)? (?:the$s+)? no $s+ Back-Cover $s+ Texts/xiso) {
+                            when(m/with $s+ (?:the$s+)? no $s+ Invariant $s+ Sections?,?
+                                        $s+ (?:with$s+)? (?:the$s+)? no $s+ Front-Cover $s+ Texts?,? $s+ and
+                                        $s+ (?:with$s+)? (?:the$s+)? no $s+ Back-Cover $s+ Texts?/xiso) {
                                 # no invariant
                             }
                             when(m/with $s+ the $s+ Invariant $s+ Sections $s+ being
-- 
1.7.10.4

From 540ea63142b9c8ce6982597ee08410a6a93b7151 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Sat, 18 May 2013 17:50:11 +0200
Subject: [PATCH 02/13] Allow patch symbols as space for gfdl detection

Allow (\n\+|\n-|\n!|\n<|\n>) aka patch marker for gdfl detection
---
 checks/cruft |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/checks/cruft b/checks/cruft
index 2c0e52d..fd34265 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -484,7 +484,7 @@ sub find_cruft {
                          A \s+ copy \s+ of \s+ the \s+ license \s+ is \s+ included/xis) {
                     if (!exists $licenseproblemhash{'gfdl-invariants'}) {
                         # local space
-                        my $s = '(?:\s|\@c|%)';
+                        my $s = '(?:\s|\@c|%|\n\+|\n-|\n!|\n<|\n>)';
                         # GFDL license, assume it is bad unless it
                         # explicitly states it has no "bad sections".
                         given($+{gfdlsections}) {
-- 
1.7.10.4

From cf75490af2fe3d55d766859254d1fe61684f8e66 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Sat, 18 May 2013 17:55:04 +0200
Subject: [PATCH 03/13] Allow <br/> as space for gfdl license check

<br/> is a space allow it.
---
 checks/cruft |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/checks/cruft b/checks/cruft
index fd34265..cf77f5b 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -484,7 +484,7 @@ sub find_cruft {
                          A \s+ copy \s+ of \s+ the \s+ license \s+ is \s+ included/xis) {
                     if (!exists $licenseproblemhash{'gfdl-invariants'}) {
                         # local space
-                        my $s = '(?:\s|\@c|%|\n\+|\n-|\n!|\n<|\n>)';
+                        my $s = '(?:\s|\@c|%|\n\+|\n-|\n!|\n<|\n>|<br/>)';
                         # GFDL license, assume it is bad unless it
                         # explicitly states it has no "bad sections".
                         given($+{gfdlsections}) {
-- 
1.7.10.4

From a8c9e03281080a10169c687b9205fbf3440bddbd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Sun, 19 May 2013 09:53:04 +0200
Subject: [PATCH 05/13] Add exemple of html file with br (false positive)

---
 .../debian/src/gfdllicenseexamplesbr.html                 |   13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 t/tests/cruft-gfdl-invariants/debian/src/gfdllicenseexamplesbr.html

diff --git a/t/tests/cruft-gfdl-invariants/debian/src/gfdllicenseexamplesbr.html b/t/tests/cruft-gfdl-invariants/debian/src/gfdllicenseexamplesbr.html
new file mode 100644
index 0000000..fffca61
--- /dev/null
+++ b/t/tests/cruft-gfdl-invariants/debian/src/gfdllicenseexamplesbr.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+false positive found in license text:
+<pre>
+Copyright (C)  year  your name.
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3
+or any later version published by the Free Software Foundation;
+with the Invariant Sections being <var>list their titles</var>, with
+the Front-Cover Texts being <var>list</var>, and with the Back-Cover Texts
+being <var>list</var>.
+A copy of the license is included in the section entitled ``GNU Free Documentation License''.
+</html>
-- 
1.7.10.4

From e291dc24849f4ec113fc78683fdf27784f1d97da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Sun, 19 May 2013 09:48:46 +0200
Subject: [PATCH 04/13] Add test cases for patch of gfdl

Add some test case for gfdl patches
---
 .../cruft-gfdl-invariants/debian/src/patch-R.diff    |    7 +++++++
 .../cruft-gfdl-invariants/debian/src/patch-c0.diff   |   18 ++++++++++++++++++
 .../cruft-gfdl-invariants/debian/src/patch-u.diff    |    9 +++++++++
 .../cruft-gfdl-invariants/debian/src/patch-uR.diff   |    9 +++++++++
 t/tests/cruft-gfdl-invariants/debian/src/patch.diff  |    7 +++++++
 5 files changed, 50 insertions(+)
 create mode 100644 t/tests/cruft-gfdl-invariants/debian/src/patch-R.diff
 create mode 100644 t/tests/cruft-gfdl-invariants/debian/src/patch-c0.diff
 create mode 100644 t/tests/cruft-gfdl-invariants/debian/src/patch-u.diff
 create mode 100644 t/tests/cruft-gfdl-invariants/debian/src/patch-uR.diff
 create mode 100644 t/tests/cruft-gfdl-invariants/debian/src/patch.diff

diff --git a/t/tests/cruft-gfdl-invariants/debian/src/patch-R.diff b/t/tests/cruft-gfdl-invariants/debian/src/patch-R.diff
new file mode 100644
index 0000000..73e379b
--- /dev/null
+++ b/t/tests/cruft-gfdl-invariants/debian/src/patch-R.diff
@@ -0,0 +1,7 @@
+1,6d0
+< Permission is granted to copy, distribute and/or modify this
+< document under the terms of the GNU Free Documentation License,
+< version 1.3 or any later version published by the Free Software
+< Foundation; with no Invariant Sections, no Front-Cover Texts and
+< no Back-Cover Texts.  A copy of the license is included in the
+< section entitled "GNU Free Documentation License".
diff --git a/t/tests/cruft-gfdl-invariants/debian/src/patch-c0.diff b/t/tests/cruft-gfdl-invariants/debian/src/patch-c0.diff
new file mode 100644
index 0000000..600653e
--- /dev/null
+++ b/t/tests/cruft-gfdl-invariants/debian/src/patch-c0.diff
@@ -0,0 +1,18 @@
+*** make-stds.texi	2013-02-17 21:44:05.485250349 +0100
+--- normal.texi	2012-12-20 21:23:22.829397718 +0100
+***************
+*** 1,7 ****
+! @c Permission is granted to copy, distribute and/or modify this document
+! @c under the terms of the GNU Free Documentation License, Version 1.1
+! @c or any later version published by the Free Software Foundation;
+! @c with no Invariant Sections, with no
+! @c Front-Cover Texts, and with no Back-Cover Texts.
+! @c A copy of the license is included in the section entitled ``GNU
+! @c Free Documentation License''.
+--- 1,6 ----
+! Permission is granted to copy, distribute and/or modify this
+! document under the terms of the GNU Free Documentation License,
+! version 1.3 or any later version published by the Free Software
+! Foundation; with no Invariant Sections, no Front-Cover Texts and
+! no Back-Cover Texts.  A copy of the license is included in the
+! section entitled "GNU Free Documentation License".
diff --git a/t/tests/cruft-gfdl-invariants/debian/src/patch-u.diff b/t/tests/cruft-gfdl-invariants/debian/src/patch-u.diff
new file mode 100644
index 0000000..db6e4f9
--- /dev/null
+++ b/t/tests/cruft-gfdl-invariants/debian/src/patch-u.diff
@@ -0,0 +1,9 @@
+--- /dev/null	2013-05-15 23:18:30.206386135 +0200
++++ normal.texi	2012-12-20 21:23:22.829397718 +0100
+@@ -0,0 +1,6 @@
++Permission is granted to copy, distribute and/or modify this
++document under the terms of the GNU Free Documentation License,
++version 1.3 or any later version published by the Free Software
++Foundation; with no Invariant Sections, no Front-Cover Texts and
++no Back-Cover Texts.  A copy of the license is included in the
++section entitled "GNU Free Documentation License".
diff --git a/t/tests/cruft-gfdl-invariants/debian/src/patch-uR.diff b/t/tests/cruft-gfdl-invariants/debian/src/patch-uR.diff
new file mode 100644
index 0000000..347adff
--- /dev/null
+++ b/t/tests/cruft-gfdl-invariants/debian/src/patch-uR.diff
@@ -0,0 +1,9 @@
+--- normal.texi	2012-12-20 21:23:22.829397718 +0100
++++ /dev/null	2013-05-15 23:18:30.206386135 +0200
+@@ -1,6 +0,0 @@
+-Permission is granted to copy, distribute and/or modify this
+-document under the terms of the GNU Free Documentation License,
+-version 1.3 or any later version published by the Free Software
+-Foundation; with no Invariant Sections, no Front-Cover Texts and
+-no Back-Cover Texts.  A copy of the license is included in the
+-section entitled "GNU Free Documentation License".
diff --git a/t/tests/cruft-gfdl-invariants/debian/src/patch.diff b/t/tests/cruft-gfdl-invariants/debian/src/patch.diff
new file mode 100644
index 0000000..f64bfaf
--- /dev/null
+++ b/t/tests/cruft-gfdl-invariants/debian/src/patch.diff
@@ -0,0 +1,7 @@
+0a1,6
+> Permission is granted to copy, distribute and/or modify this
+> document under the terms of the GNU Free Documentation License,
+> version 1.3 or any later version published by the Free Software
+> Foundation; with no Invariant Sections, no Front-Cover Texts and
+> no Back-Cover Texts.  A copy of the license is included in the
+> section entitled "GNU Free Documentation License".
-- 
1.7.10.4

From cd9b50883c1b9e78b5e008377e8c2e486caf03f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Sun, 19 May 2013 09:54:37 +0200
Subject: [PATCH 06/13] Zero is normally plural check also for singular
 mistake

In french and latin lanquage zero (or none) is singular. Check for translation mistake
---
 t/tests/cruft-gfdl-invariants/debian/src/zeroisnotplural.texi |    6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 t/tests/cruft-gfdl-invariants/debian/src/zeroisnotplural.texi

diff --git a/t/tests/cruft-gfdl-invariants/debian/src/zeroisnotplural.texi b/t/tests/cruft-gfdl-invariants/debian/src/zeroisnotplural.texi
new file mode 100644
index 0000000..8782eed
--- /dev/null
+++ b/t/tests/cruft-gfdl-invariants/debian/src/zeroisnotplural.texi
@@ -0,0 +1,6 @@
+Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License,
+version 1.3 or any later version published by the Free Software
+Foundation; with no Invariant Section, no Front-Cover Text and
+no Back-Cover Text.  A copy of the license is included in the
+section entitled "GNU Free Documentation License".
-- 
1.7.10.4

From fec33214c68e7eb7c4c27c6df4ff56381c35870c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Sun, 19 May 2013 10:03:10 +0200
Subject: [PATCH 07/13] Be more liberal about <br/>

Allow also <br /> and avoid some false positive.
---
 checks/cruft                                                        |    2 +-
 t/tests/cruft-gfdl-invariants/debian/src/gfdllicenseexamplesbr.html |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/checks/cruft b/checks/cruft
index cf77f5b..54bb923 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -484,7 +484,7 @@ sub find_cruft {
                          A \s+ copy \s+ of \s+ the \s+ license \s+ is \s+ included/xis) {
                     if (!exists $licenseproblemhash{'gfdl-invariants'}) {
                         # local space
-                        my $s = '(?:\s|\@c|%|\n\+|\n-|\n!|\n<|\n>|<br/>)';
+                        my $s = '(?:\s|\@c|%|\n\+|\n-|\n!|\n<|\n>|<br\s?/>)';
                         # GFDL license, assume it is bad unless it
                         # explicitly states it has no "bad sections".
                         given($+{gfdlsections}) {
diff --git a/t/tests/cruft-gfdl-invariants/debian/src/gfdllicenseexamplesbr.html b/t/tests/cruft-gfdl-invariants/debian/src/gfdllicenseexamplesbr.html
index fffca61..46cbd2f 100644
--- a/t/tests/cruft-gfdl-invariants/debian/src/gfdllicenseexamplesbr.html
+++ b/t/tests/cruft-gfdl-invariants/debian/src/gfdllicenseexamplesbr.html
@@ -6,7 +6,7 @@ Copyright (C)  year  your name.
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3
 or any later version published by the Free Software Foundation;
-with the Invariant Sections being <var>list their titles</var>, with
+with the<br/> Invariant Sections<br /> being <var>list their titles</var>, with
 the Front-Cover Texts being <var>list</var>, and with the Back-Cover Texts
 being <var>list</var>.
 A copy of the license is included in the section entitled ``GNU Free Documentation License''.
-- 
1.7.10.4

From 2b6303000afe48461b067a5892b8b0c38ff0fb3c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Sun, 19 May 2013 10:40:15 +0200
Subject: [PATCH 08/13] Be more liberal about gfdl on linking words

And, with etc on the no invariants section could be ommited by upstream.
---
 checks/cruft                                               |    6 +++---
 t/tests/cruft-gfdl-invariants/debian/src/normalbkchem.texi |    6 ++++++
 2 files changed, 9 insertions(+), 3 deletions(-)
 create mode 100644 t/tests/cruft-gfdl-invariants/debian/src/normalbkchem.texi

diff --git a/checks/cruft b/checks/cruft
index 54bb923..9e37ef5 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -488,9 +488,9 @@ sub find_cruft {
                         # GFDL license, assume it is bad unless it
                         # explicitly states it has no "bad sections".
                         given($+{gfdlsections}) {
-                            when(m/with $s+ (?:the$s+)? no $s+ Invariant $s+ Sections?,?
-                                        $s+ (?:with$s+)? (?:the$s+)? no $s+ Front-Cover $s+ Texts?,? $s+ and
-                                        $s+ (?:with$s+)? (?:the$s+)? no $s+ Back-Cover $s+ Texts?/xiso) {
+                            when(m/(?:the$s+)? no $s+ Invariant $s+ Sections?,?
+                                    $s+ (?:with$s+)? (?:the$s+)? no $s+ Front-Cover $s+ Texts?,? $s+ (?:and$s+)?
+                                        (?:with$s+)? (?:the$s+)? no $s+ Back-Cover $s+ Texts?/xiso) {
                                 # no invariant
                             }
                             when(m/with $s+ the $s+ Invariant $s+ Sections $s+ being
diff --git a/t/tests/cruft-gfdl-invariants/debian/src/normalbkchem.texi b/t/tests/cruft-gfdl-invariants/debian/src/normalbkchem.texi
new file mode 100644
index 0000000..dd888e2
--- /dev/null
+++ b/t/tests/cruft-gfdl-invariants/debian/src/normalbkchem.texi
@@ -0,0 +1,6 @@
+Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License,
+version 1.3 or any later version published by the Free Software
+Foundation; no Invariant Sections, no Front-Cover Texts,
+no Back-Cover Texts.  A copy of the license is included in the
+section entitled "GNU Free Documentation License".
-- 
1.7.10.4

From e441e02505df8e6d71f2abf70eb0c60d537d4d88 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Sun, 19 May 2013 10:48:17 +0200
Subject: [PATCH 09/13] Allow man comments for gfdl invariants

Fix a false positive problem by allowing man comments
---
 checks/cruft                                                  |    2 +-
 t/tests/cruft-gfdl-invariants/debian/src/normalmancomment.txt |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 t/tests/cruft-gfdl-invariants/debian/src/normalmancomment.txt

diff --git a/checks/cruft b/checks/cruft
index 9e37ef5..8d2d40c 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -484,7 +484,7 @@ sub find_cruft {
                          A \s+ copy \s+ of \s+ the \s+ license \s+ is \s+ included/xis) {
                     if (!exists $licenseproblemhash{'gfdl-invariants'}) {
                         # local space
-                        my $s = '(?:\s|\@c|%|\n\+|\n-|\n!|\n<|\n>|<br\s?/>)';
+                        my $s = '(?:\s|\@c|%|\n\+|\n-|\n!|\n<|\n>|<br\s?/>|\n\.\\\")';
                         # GFDL license, assume it is bad unless it
                         # explicitly states it has no "bad sections".
                         given($+{gfdlsections}) {
diff --git a/t/tests/cruft-gfdl-invariants/debian/src/normalmancomment.txt b/t/tests/cruft-gfdl-invariants/debian/src/normalmancomment.txt
new file mode 100644
index 0000000..8d0f3a4
--- /dev/null
+++ b/t/tests/cruft-gfdl-invariants/debian/src/normalmancomment.txt
@@ -0,0 +1,6 @@
+.\" manual page for blaze, a command wrapper for BlazeBlogger
+.\"
+.\" Permission is granted to copy, distribute and/or modify this document
+.\" under the terms of the GNU Free Documentation License, Version 1.3 or
+.\" any later version published by the Free Software Foundation;  with no
+.\" Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
-- 
1.7.10.4

From 54bae908a76cd273d12032e556f57fb8c38ff97a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Sun, 19 May 2013 11:06:38 +0200
Subject: [PATCH 10/13] Allow C comments continuation

* is sometimes used for alignment of C comments. Allow it.
---
 checks/cruft                                      |    2 +-
 t/tests/cruft-gfdl-invariants/debian/src/normal.c |   13 +++++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 t/tests/cruft-gfdl-invariants/debian/src/normal.c

diff --git a/checks/cruft b/checks/cruft
index 8d2d40c..a2c00e8 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -484,7 +484,7 @@ sub find_cruft {
                          A \s+ copy \s+ of \s+ the \s+ license \s+ is \s+ included/xis) {
                     if (!exists $licenseproblemhash{'gfdl-invariants'}) {
                         # local space
-                        my $s = '(?:\s|\@c|%|\n\+|\n-|\n!|\n<|\n>|<br\s?/>|\n\.\\\")';
+                        my $s = '(?:\s|\@c|%|\n\+|\n-|\n!|\n<|\n>|<br\s?/>|\n\.\\\"|\*)';
                         # GFDL license, assume it is bad unless it
                         # explicitly states it has no "bad sections".
                         given($+{gfdlsections}) {
diff --git a/t/tests/cruft-gfdl-invariants/debian/src/normal.c b/t/tests/cruft-gfdl-invariants/debian/src/normal.c
new file mode 100644
index 0000000..a58e927
--- /dev/null
+++ b/t/tests/cruft-gfdl-invariants/debian/src/normal.c
@@ -0,0 +1,13 @@
+ /*****************************************************************************/
+/** \mainpage Cal3D API Reference
+  * <center>
+  *   <p>
+  *     Permission is granted to copy, distribute and/or modify this document
+  *     under the terms of the GNU Free Documentation License, Version 1.1 or
+  *     any later version published by the Free Software Foundation;
+  *     with no Invariant Sections, no Front-Cover Texts and
+  *     no Back-Cover Texts;
+  *     A copy of the license is included in the section entitled
+  *     \link license "GNU Free Documentation License" \endlink .
+  * </center>
+  *****************************************************************************/
-- 
1.7.10.4

From d5bd28c3d986b16aed6cfc646542f0e2e55e07db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Sun, 19 May 2013 11:49:32 +0200
Subject: [PATCH 12/13] Fix a false positive for the gfdl check in case of GNU
 with under <span> tags

diveintopython trigger false positive due to convoluted license. The solution is better matching
of the license by allowing some HTML tags durings scanning of license text.
---
 checks/cruft                                               |    2 +-
 .../cruft-gfdl-invariants/debian/src/diveintopythonok.html |   12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 t/tests/cruft-gfdl-invariants/debian/src/diveintopythonok.html

diff --git a/checks/cruft b/checks/cruft
index 032fbe0..4dec077 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -480,7 +480,7 @@ sub find_cruft {
                 # if the "redeeming" part is in the next block.
                 #
                 # See cruft-gfdl-fp-sliding-win for the test case
-                when(m/GNU \s+ Free \s+ Documentation \s+ License (?'gfdlsections'.{0,1024})
+                when(m/GNU (?:\s+|\s*<\/span>\s*)? Free \s+ Documentation \s+ License (?'gfdlsections'.{0,1024})
                          A \s+ copy \s+ of \s+ the \s+ license \s+ is \s+ included/xis) {
                     if (!exists $licenseproblemhash{'gfdl-invariants'}) {
                         # local space
diff --git a/t/tests/cruft-gfdl-invariants/debian/src/diveintopythonok.html b/t/tests/cruft-gfdl-invariants/debian/src/diveintopythonok.html
new file mode 100644
index 0000000..f5c0999
--- /dev/null
+++ b/t/tests/cruft-gfdl-invariants/debian/src/diveintopythonok.html
@@ -0,0 +1,12 @@
+<html>
+<!--- This is a old false positive -->
+<body>
+                  <div class="legalnotice">
+                     <p>Permission is granted to copy, distribute, and/or modify this document under the terms of the <span class="acronym">GNU</span> Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant
+                        Sections, no Front-Cover Texts, and no Back-Cover Texts.  A copy of the license is included in <a href="../appendix/fdl.html" title="Appendix&nbsp;G.&nbsp;GNU Free Documentation License">Appendix&nbsp;G, <i>GNU Free Documentation License</i></a>.
+                     </p>
+                     <p>The example programs in this book are free software; you can redistribute and/or modify them under the terms of the <span class="application">Python</span> license as published by the <span class="application">Python</span> Software Foundation. A copy of the license is included in <a href="../appendix/license.html" title="Appendix&nbsp;H.&nbsp;Python license">Appendix&nbsp;H, <i>Python license</i></a>.
+                     </p>
+                  </div>
+</body>
+</html>
\ No newline at end of file
-- 
1.7.10.4

From 27caec388d27a23c04b2ba63b0953f4efe30401c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Sun, 19 May 2013 12:46:32 +0200
Subject: [PATCH 13/13] Fix false positive for detection of gfdl license
 problem

If text is embeded in C string we have false positive.
Fix it.
---
 checks/cruft                                           |    2 +-
 t/tests/cruft-gfdl-invariants/debian/src/findutilsok.c |   15 +++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)
 create mode 100644 t/tests/cruft-gfdl-invariants/debian/src/findutilsok.c

diff --git a/checks/cruft b/checks/cruft
index 4dec077..8117a1f 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -484,7 +484,7 @@ sub find_cruft {
                          A \s+ copy \s+ of \s+ the \s+ license \s+ is \s+ included/xis) {
                     if (!exists $licenseproblemhash{'gfdl-invariants'}) {
                         # local space
-                        my $s = '(?:\s|\@c|%|\n\+|\n-|\n!|\n<|\n>|<br\s?/>|\n\.\\\"|\*)';
+                        my $s = '(?:\s|\@c|%|\n\+|\n-|\n!|\n<|\n>|<br\s?/>|\n\.\\\"|\*|\"|,\")';
                         # GFDL license, assume it is bad unless it
                         # explicitly states it has no "bad sections".
                         given($+{gfdlsections}) {
diff --git a/t/tests/cruft-gfdl-invariants/debian/src/findutilsok.c b/t/tests/cruft-gfdl-invariants/debian/src/findutilsok.c
new file mode 100644
index 0000000..23aa0af
--- /dev/null
+++ b/t/tests/cruft-gfdl-invariants/debian/src/findutilsok.c
@@ -0,0 +1,15 @@
+/* false positive from findutils */
+  static const char *copy_para[]=
+    {
+      "Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006,"
+      ,"2007, 2009, 2010, 2011 Free Software Foundation, Inc."
+      ,""
+      ,"Permission is granted to copy, distribute and/or modify this document"
+      ,"under the terms of the GNU Free Documentation License, Version 1.3 or"
+      ,"any later version published by the Free Software Foundation; with no"
+      ,"Invariant Sections, with no Front-Cover Texts, and with no Back-Cover"
+      ,"Texts.  A copy of the license is included in the ``GNU Free"
+      ,"Documentation License'' file as part of this distribution."
+      ""
+      ,NULL
+    };
-- 
1.7.10.4


--- End Message ---
--- Begin Message ---
Source: lintian
Source-Version: 2.5.13

We believe that the bug you reported is fixed in the latest version of
lintian, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 708881@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Niels Thykier <niels@thykier.net> (supplier of updated lintian package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 30 May 2013 08:53:02 +0200
Source: lintian
Binary: lintian
Architecture: source all
Version: 2.5.13
Distribution: unstable
Urgency: low
Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
Changed-By: Niels Thykier <niels@thykier.net>
Description: 
 lintian    - Debian package checker
Closes: 670092 697164 705170 705197 705441 705835 706166 706241 706242 706827 707400 707742 708178 708755 708881 708943 708957 709041 709121 709379 709415 709455 709615 709886 710086
Changes: 
 lintian (2.5.13) unstable; urgency=low
 .
   Upload to unstable.
 .
   * Summary of tag changes:
     + Added:
       - conffile-is-not-in-package
       - debconf-translation-using-general-list
       - dh_pysupport-is-obsolete
       - init.d-script-call-internal-API
     + Removed:
       - debhelper-maintscript-needs-versioned-build-depends
       - debhelper-script-needs-versioned-build-depends
       - missing-pre-dependency-on-multiarch-support
 .
   * checks/*:
     + [NT] Use Lintian::Path objects as arguments to unpacked
       and control where these objects are available.
   * checks/binaries:
     + [RA] Do not complain about kernel modules with no shared
       library dependency information.  Patch from Guillem Jover.
       (Closes: #706242)
     + [NT] Demote the certainty of hardening-no-fortify-functions
       to "wild-guess".  (Closes: #709415)
   * checks/changes:
     + [NT] Recognise "<dist>-backports-sloppy" as a valid
       distribution.  Thanks to Romain Francoise for the
       report and the patch.  (Closes: #705170)
   * checks/conffiles:
     + [NT] Strip whitespace from conffiles similar to how dpkg
       does it.
     + [NT] When emitting duplicate-conffile, avoid repeating
       other tags related to that conffile.  The exception to
       this is relative-conffile where the original file might
       not have triggered that tag.
     + [NT] Test that all paths listed in the "conffiles" control
       file is actually in the package being tested.
   * checks/cruft{,.desc}:
     + [JW] Correct the name of the architecture listed in
       description of the tag outdated-autotools-helper-file.
       (Closes: #706166)
     + [NT] Flag all absolute symlinks in source packages as
       "unsafe".  (Closes: #697164)
     + [NT] Fix false-positive source-contains-unsafe-symlink
       for symlinks ascending one or more levels without escaping
       the package root.  Thanks to Michael Schutte for the
       report and the patch.  (Closes: #707742)
     + [NT] Add a series of patches from Bastien Roucariès to
       reduce the number of false positives and negatives in the
       GDFL related checks.  (Closes: #708957, #708881, #709379,
       #709886)
   * checks/debhelper{,.desc}:
     + [NT] Retire some tags that are no longer relevant in the
       Jessie development cycle.
     + [NT] Apply patch from Luca Falavigna to detect uses of the
       deprecated tool, dh_pysupport.  (Closes: #709615)
   * checks/description:
     + [NT] Skip extended-description-is-probably-too-short
       for -dbg packages.  Thanks to Paul Wise for the suggestion.
       (Closes: #705441)
   * checks/fields.desc:
     + [NT] Clarify that the "canonical URI" for Vcs fields is
       based on an announcement from the Alioth admins.  Thanks
       to Torquil Sørensen for the report.  (Closes: #705835)
     + [NT] Clarify in the tag description of some tags related
       to "Vcs-*" fields that the tags are based on a data list
       (and is not a result of a HTTP request while checking the
       package).
   * checks/files{,.desc}:
     + [JW,NT] Drop missing-pre-dependency-on-multiarch-support
       now that multiarch-support is in stable.  (Closes: #709121)
     + [JW] Fix typo in a tag description.  (Closes: #709455)
     + [NT] Change the "ancient-file" cut-off date to 1975 from
       1984.  Thanks to Ole Streicher and Ansgar Burchardt for the
       report.  (Closes: #710086)
   * checks/group-checks.desc:
     + [NT] Add missing semi-colon in tag description.  Thanks to
       Andrey Rahmatullin for the report.  (Closes: #706827)
   * checks/init.d{,.desc}:
     + [NT] Add missing import of utility function that could cause
       Lintian to crash in some cases.
     + [NT] Add check for uses of /lib/init in maintainer scripts.
       Thanks to Josh Triplett for the report and to Bastien
       Roucariès for the patch.  (Closes: #670092)
   * checks/menu-format:
     + [NT] Fix use of uninitialized variable when menu file uses a
       section of "/".  (Closes: #708755)
   * checks/po-debconf{,.desc}:
     + [NT] Remove tests for commands that are provided by
       Lintian's dependencies.
     + [RA] Add new check for a Language-Team field in a translation
       pointing to the debian-i18n mailing list.  Based on work by
       victory.  (Closes: #705197)
   * checks/rules:
     + [NT] Remove check for "dpkg-dev (>= 1.16.1~)" build-dependency,
       since this is trivially satisfied in Wheezy and Jessie.
 .
   * collection/*-helper:
     + [NT] Move all collection helpers to helpers/coll.
   * collection/debfiles:
     + [NT] Replace makeshift "is_ancestor_of" check with the
       one from L::Util.
   * collection/java-info:
     + [NT] Update a regex to cope with file(1) now calling JAR files
       for "Java Jar file" rather than "Zip archive".
       (Closes: #707400)
 .
   * data/changes-file/known-dists:
     + [NT] Add jessie and remove lenny.
   * data/debhelper/dh_{addons,commands}-manual:
     + [NT] Remove entries/versions that are no longer relevant.
   * data/fields/perl-provides:
     + [NT] Refresh against sid.  (Closes: #708178)
   * data/spelling/corrections:
     + [NT] Add correction for unnecessarily.  Thanks to Guillem
       Jover for the suggestion.  (Closes: #706241)
 .
   * debian/control:
     + [NT] Remove irrelevant (versioned) dependencies that are now
       trivially satisfied in stable.
     + [NT] Recommend libautodie-perl (>= 2.18) and libperlio-gzip-perl
       as these can greatly effect performance of Lintian.
   * debian/lintian.install:
     + [NT] Install "helpers" as /usr/share/lintian/helpers
   * debian/{postinst,prerm}:
     + [NT] Remove unused maintainer scripts now that stable's
       libc-bin provides a C.UTF-8.
   * debian/triggers:
     + [NT] Remove unused trigger now that stable's libc-bin
       provides a C.UTF-8.
 .
   * doc/tutorial/**/*.pod:
     + [NT] Fix a number of spelling mistakes in the POD.
   * doc/tutorial/Lintian/Tutorial/WritingChecks.pod:
     + [NT] Add a section about how to avoid some common ways
       of introducing security issues.
 .
   * frontend/lintian:
     + [NT] Ignore LINTIAN_ROOT/locale and /var/lib/lintian/locale.
     + [NT] Export LINTIAN_INCLUDE_DIRS and LINTIAN_HELPERS_DIR to
       subprocesses.  These are ":"-separated lists of dirs used by
       Lintian.  The first being a list of raw include dirs and the
       second being a list of helpers dirs in these include dirs.
     + [NT] Fix a bug where the exit code from lintian would
       sometimes be an undocumented value (>= 3).
 .
   * helpers/coll:
     + [NT] New directory containing some helpers that used to be in
       directly collection.
 .
   * lib/*:
     + [NT] Fix a number of spelling mistakes in the POD.
   * lib/Lintian/Collect/{Package,Binary}.pm:
     + [NT] Accept Lintian::Path objects to unpacked and control.
   * lib/Lintian/Collect/Source.pm:
     + [NT] Provide a "source" specific is_non_free method that reads
       the "Section"-field from d/control instead of the .dsc.  This
       fixes false-positives "problematic licenses" for non-free
       packages.  Thanks to Bastien Roucariès for the report.
       (Closes: #709041)
   * lib/Lintian/Path.pm:
     + [NT] Rename link_resolved to link_normalized.
   * lib/Lintian/Unpacker.pm:
     + [NT] On platform that support it, change the "name" of the
       process running the collection.  This makes it easier to
       see what collections are currently being run (like in the
       versions prior to 2.5.12).  For platforms, where it is
       not possible to change the name of a running process, the
       unpack jobs will simply be named "lintian" like its parent.
   * lib/Lintian/Util.pm:
     + [NT] Fix a race condition in touch_file.
     + [NT] Add sanity check in perm2oct for bad permission
       strings and throw errors when they are seen (instead
       of returning 0).
     + [NT] Require that the input file is present for
       read_dpkg_control and get_deb_control.
     + [NT] In copy_dir, pass --reflink=auto to cp.
     + [NT] Replace resolve_pkg_path with to normalize_pkg_path.
       The latter has slightly different return values in some
       cases.
     + [NT] Avoid the LOCPATH dance to find the path to an UTF-8
       locale now that stable's libc-bin provides C.UTF-8 for us.
     + [NT] Add new function, locate_helper_tool, to find helper
       tools.
 .
   * private/refresh-perl-provides:
     + [NT] Apply patch from Niko Tyni to improve Lintian's
       data file about Perl modules provided by perl-base.
 .
   * profiles/debian/extra-apache2.profile:
     + [NT] Removed, merged into debian/main.profile.
   * profiles/debian/ftp-master-auto-reject.profile:
     + [NT] Include md5sums-mismatch and non-standard-toplevel-dir
       as an overridable tag.
   * profiles/debian/main.profile:
     + [NT] Include the apache2 check.  Thanks to Arno Töll for
       the report.  (Closes: #708943)
 .
   * reporting/harness:
     + [NT] Stop exporting ENV variables that lintian no longer
       cares about.
 .
   * vendors/ubuntu/main/data/changes-file/known-dists:
     + [NT] Add "saucy" as known Ubuntu distribution.  Thanks to
       Iain Lane for the report.
Checksums-Sha1: 
 9957a28b49fa938d185cf9ecfaf39979b68a4a3b 2524 lintian_2.5.13.dsc
 2cc3eefe538af49ee56c75628dd75b85f56c45fb 1218930 lintian_2.5.13.tar.gz
 b3609f81c5bcff4751b4a0810eb4e0c9b49f3cdb 768798 lintian_2.5.13_all.deb
Checksums-Sha256: 
 f9f4b9adb76b26540e8dc31e47707a07006742d0fa86bae20efd3b9c3f8a4fd7 2524 lintian_2.5.13.dsc
 68f3a5b5351acc68b2891c6bfd84d092161c2ee047eab2b4b0894ad995452071 1218930 lintian_2.5.13.tar.gz
 1b16956a4e0b10563ded87b9e82da73e013b88aadbe51e21ffca04cf93ddce4d 768798 lintian_2.5.13_all.deb
Files: 
 fe126afed540f5532c82bf90266815a1 2524 devel optional lintian_2.5.13.dsc
 39d74abe4ddd2bc741ec74ab299fe4fc 1218930 devel optional lintian_2.5.13.tar.gz
 d3dc3cad82baaaa35a66157e5e184f17 768798 devel optional lintian_2.5.13_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJRpv7OAAoJEAVLu599gGRCSK0QAKCoKTTxc7+9cw2rF0e5JSOG
yeXEzzKPzcFe4uB8MJzi1NxDHacf3suzskldTSiNEN96MBr3UKbINtf8Rg3DvRYa
iSA4iC12m+8ijOV0/XPB9gEJshrbvcnSVAEpF9sMzBG92IRQzc8gjhCarz7WbVQs
3SOpKXTbvb1ZesSdtjECTjtCgRecfuirlsM6cT7Dkq7RHN4ZOAx20cAzWwj/A8M7
4T3xLAuCCO4VwJEmd0yxHAw2/ea3UaSOdmuwgj9K6WxhuJXqXjbCYsnSgrdTLn1E
pFbY+5tyioN7kCN1+AwqxF0lc0YGJYFUUkZKPCZR+kzKdznhic4QlgSS56Hymbc4
445VucK93oo22Ekru612DKjuje3mddL2f6aU5Ow3TQ5GqAtWfcchSUYwMMOiFpPR
xwT2K2JsZlj9MFnM4m3B1EmdfzfdHaxQK3aoSlZ5bLFPO9X88FdqptyWSUMVz+fy
Jj7ayzgB9onPptcz7beonE+4R9CuCIGQtk6qs2fb54atuS8lhgSPSvnfWgh7v8Ym
2MPkaUn0DfxksPP6X2bhaCBjszX5Dyrbdij+3xo938WdoYiTDXOBptWO2TiXUPs9
uwX3N7Asc+Ud1ztmx3iQXKV/hMygVjoexEZOJVeB1mF4rSM0WPgESnE7NRoJGmJV
CCf48D3Mw42k85rn+Eyr
=mh8A
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: