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

[SCM] Debian package checker branch, master, updated. 2.5.11-59-gbfc5ff7



The following commit has been merged in the master branch:
commit bfc5ff7c2057049c00f616c3bd8511a5083130f6
Author: Bastien ROUCARIÈS <roucaries.bastien@gmail.com>
Date:   Wed Jan 9 23:48:52 2013 +0100

    Add gfdl license text example
    
    Add license text example as false positive. Do not trigger tag.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/checks/cruft b/checks/cruft
index 30f46e1..6f2e45e 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -451,11 +451,20 @@ sub find_cruft {
                                A \s+ copy \s+ of \s+ the \s+ license \s+ is \s+ included/xis) {
                     # GFDL license, assume it is bad unless it
                     # explicitly states it has no "bad sections".
-                    unless ($1 =~m/with \s+ (?:the\s+)? no \s+ Invariant \s+ Sections,?
+                    my $gfdlsections = $1;
+                    unless ($gfdlsections =~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/xis) {
-                        tag 'license-problem-gfdl-invariants', $name;
-                        $licenseproblemhash{'gfdl-invariants'} = 1;
+                        # license gfdl text verbatim is ok
+                        unless ($gfdlsections =~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
+                                        \s+ (?:\@var\{|<var>)? LIST (?:\}|<\/var>)? \s? ,?
+                                        \s+ and \s+ with \s+ the \s+ Back-Cover \s+ Texts \s+ being
+                                        \s+ (?:\@var\{|<var>)? LIST (?:\}|<\/var>)?/xis) {
+                            tag 'license-problem-gfdl-invariants', $name;
+                            $licenseproblemhash{'gfdl-invariants'} = 1;
+                        }
                     }
                 }
             }
diff --git a/t/tests/cruft-gfdl-invariants/debian/src/gfdllicenseexample.html b/t/tests/cruft-gfdl-invariants/debian/src/gfdllicenseexample.html
new file mode 100644
index 0000000..fffca61
--- /dev/null
+++ b/t/tests/cruft-gfdl-invariants/debian/src/gfdllicenseexample.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>
diff --git a/t/tests/cruft-gfdl-invariants/debian/src/gfdllicenseexample.texi b/t/tests/cruft-gfdl-invariants/debian/src/gfdllicenseexample.texi
new file mode 100644
index 0000000..fc52ba9
--- /dev/null
+++ b/t/tests/cruft-gfdl-invariants/debian/src/gfdllicenseexample.texi
@@ -0,0 +1,13 @@
+false positive found in license text:
+@smallexample
+@group
+  Copyright (C)  @var{year}  @var{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}, with the
+  Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}.
+  A copy of the license is included in the section entitled ``GNU
+  Free Documentation License''.
+@end group
+@end smallexample

-- 
Debian package checker


Reply to: