Bug#721252: [PATCH 2/3] Silent false positive in po file of gtk-doc

2013-09-01 Thread Bastien ROUCARIÈS
Gtk-doc use some _:link-1 for no invariant section. Silent this false 
positive.
---
 checks/cruft.pm|   14 +
 .../debian/src/oldfalsepositive/gtk-doc.po |   21 
 2 files changed, 35 insertions(+)
 create mode 100644 
t/tests/cruft-gfdl-invariants/debian/src/oldfalsepositive/gtk-doc.po

diff --git a/checks/cruft.pm b/checks/cruft.pm
index aeee3ea..d9fd2f6 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -618,6 +618,20 @@ sub find_cruft {
 tag 'license-problem-gfdl-invariants',$name;
 $licenseproblemhash{'gfdl-invariants'} = 1;
 }
+} elsif (
+$gfdlsections =~ m{
+\A with \s+ the \s* _: \s* link-\d+ \s* / \s*
+being \s+ list \s+ their \s+ titles \s*,? \s*
+with \s+ the \s* _: \s* link-\d+ \s* / \s*
+being \s+ list \s*,\s*
+(?:and\s+)? with \s+ the \s* _:\s* link-\d+ \s* 
/ \s*
+being \s+ list}xiso
+) {
+# fix a false positive in .po file
+unless ($name =~ m/\.po$/) {
+tag 'license-problem-gfdl-invariants',$name;
+$licenseproblemhash{'gfdl-invariants'} = 1;
+}
 } else {
 tag 'license-problem-gfdl-invariants', $name, 
\$gfdlsections\;
 $licenseproblemhash{'gfdl-invariants'} = 1;
diff --git 
a/t/tests/cruft-gfdl-invariants/debian/src/oldfalsepositive/gtk-doc.po 
b/t/tests/cruft-gfdl-invariants/debian/src/oldfalsepositive/gtk-doc.po
new file mode 100644
index 000..2f6f58d
--- /dev/null
+++ b/t/tests/cruft-gfdl-invariants/debian/src/oldfalsepositive/gtk-doc.po
@@ -0,0 +1,21 @@
+#: C/fdl-appendix.xml:79(sect1/para)
+msgid 
+A _:quote-1/ is a named appendix or a front-matter section of the _:
+link-2/ that deals exclusively with the relationship of the publishers or 
+authors of the Document to the Document's overall subject (or to related 
+matters) and contains nothing that could fall directly within that overall 
+subject. (For example, if the Document is in part a textbook of mathematics, 
+a Secondary Section may not explain any mathematics.) The relationship could 
+be a matter of historical connection with the subject or with related 
+matters, or of legal, commercial, philosophical, ethical or political 
+position regarding them.
+msgstr 
+Une _:quote-1/ désigne une annexe au _:link-2/, ou toute information 
+indiquant les rapports entre l'auteur ou l'éditeur et le sujet (ou tout 
+autre sujet connexe) du Document, sans toutefois être en rapport direct avec 
+le sujet lui-même (par exemple, si le Document est un manuel de 
+mathématiques, une Section secondaire ne traitera d'aucune notion 
+mathématique). Cette section peut contenir des informations relatives à 
+l'historique du Document, des sources documentaires, des dispositions 
+légales, commerciales, philosophiques, ou des positions éthiques ou 
+politiques susceptibles de concerner le sujet traité.
-- 
1.7.10.4


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1378029548-9794-2-git-send-email-roucaries.bast...@gmail.com



Bug#721252: [PATCH 3/3] Check gfdl harder

2013-09-01 Thread Bastien ROUCARIÈS
Remove included in the the sentence the copy is included, in order to check 
harder gfdl file.
---
 checks/cruft.pm |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/checks/cruft.pm b/checks/cruft.pm
index d9fd2f6..09827c8 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -506,7 +506,7 @@ sub find_cruft {
 index($block, 'license')  -1
  $block =~ m/gnu (?:\s+|\s*\/span\s*|\s*\}\s+)? free \s+
  documentation \s+ license (?'rawgfdlsections'.{0,1024}?)
- a \s+ copy \s+ of \s+ the \s+ license \s+ is \s+ 
included/xsm
+ a \s+ copy \s+ of \s+ the \s+ license \s+ is/xsm
   ) {
 if (!exists $licenseproblemhash{'gfdl-invariants'}) {
 my $rawgfdlsections = $+{rawgfdlsections};
-- 
1.7.10.4


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1378029548-9794-3-git-send-email-roucaries.bast...@gmail.com



Bug#721252: [PATCH 1/3] Clean up gfdl detection

2013-09-01 Thread Bastien ROUCARIÈS
Instead of using a variable for space like expression, tranform every space 
like expression to space.

This is a net win of about 5% on execution time
---
 checks/cruft.pm |  112 +++
 1 file changed, 55 insertions(+), 57 deletions(-)

diff --git a/checks/cruft.pm b/checks/cruft.pm
index ac2a9fc..aeee3ea 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -505,101 +505,99 @@ sub find_cruft {
 if (
 index($block, 'license')  -1
  $block =~ m/gnu (?:\s+|\s*\/span\s*|\s*\}\s+)? free \s+
- documentation \s+ license (?'gfdlsections'.{0,1024}?)
+ documentation \s+ license (?'rawgfdlsections'.{0,1024}?)
  a \s+ copy \s+ of \s+ the \s+ license \s+ is \s+ 
included/xsm
   ) {
 if (!exists $licenseproblemhash{'gfdl-invariants'}) {
-my $gfdlsections = $+{gfdlsections};
-# local space
-my $s = qr{(?:
-  \s  |  # regular space(s)
+my $rawgfdlsections = $+{rawgfdlsections};
+my $gfdlsections = $rawgfdlsections;
+
+# delete some tag consider as space
+# order from more specific to less specific
+$gfdlsections =~ s{(?:
+  ^[-\+!]   |  # diff/patch lines
+  ^\.\\\ |  # man comments
   \@c(?:omment)?  |  # Tex info comment
-  [%\*\\|\\] |  # String, C-style comment/javadoc 
indent, quotes for strings, pipe and antislash in some txt
   \\s*,  |  # String array (e.g. 
line1,\nline2)
   ,\s*\  |  # String array (e.g. line1\n 
,line2), seen in findutils
-  \\n |  # Verbatim \n in string array
-  \n[-\+!]  |  # diff/patch lines
-  \n\.\\\|  # man comments
   br\s*/?   |  # (X)HTML line breaks
-  /?link.*? |  # xml link
-  /?a.*?|  # a link
-  /?p.*?|  # html paragraph
+  /?link[^]*?  |  # xml link
+  /?a[^]*? |  # a link
+  /?p[^]*? |  # html paragraph
   \(\*note.*?::\) |  # info file note
-)}xsmo;
+  \\n |  # Verbatim \n in string array
+  \s*[,\.;]\s*\Z  |  # final punctuation
+  \A\s*[,\.;]\s*  |  # punctuation at the beginning
+  [%\*\\|\\]# String, C-style comment/javadoc 
indent, quotes for strings, pipe and antislash in some txt
+)}{ }gxms;
+
+# delete double spacing now
+$gfdlsections =~ s{\s+}{ }gsm;
+$gfdlsections =~ s{\A\s+}{}gsm;
+$gfdlsections =~ s{\s+\Z}{}gsm;
+
+$gfdlsections =~ s/
+\A \s* version \s+ \d+(?:\.\d+)? \s+
+(?:or \s+ any \s+ later \s+ version \s+)?
+published \s+ by \s+ the \s+ Free \s+ Software \s+ 
Foundation \s*
+(?: [,\.;] \s*)?
+//xism;
+
 # GFDL license, assume it is bad unless it
 # explicitly states it has no bad sections.
 if (
 $gfdlsections =~ m/
-no $s* Invariant $s+ Sections? $s* ,?
-   $s+ (?:with$s+)? (?:the$s+)? no $s+ 
Front(?:\\?-)?$s*Cover $s+ (?:Texts?)? $s* ,? $s+ (?:and$s+)?
-   (?:with$s+)? (?:the$s+)? no $s+ 
Back(?:\\?-)?$s*Cover/xiso
+no \s* Invariant \s+ Sections? \s* ,?
+   \s+ (?:with\s+)? (?:the\s+)? no \s+ 
Front(?:\s*\\?-)?\s*Cover (?:\s+Texts?)? \s* ,? \s+ (?:and\s+)?
+   (?:with\s+)? (?:the\s+)? no \s+ 
Back(?:\s*\\?-)?\s*Cover/xiso
   ) {
 # no invariant
 } elsif (
 $gfdlsections =~ m/
-no $s+ Invariant $s+ Sections?,?
-   $s+ (?:no$s+)? Front(?:[\\]?-)? $s+ or
-   $s+ (?:no$s+)? Back(?:[\\]?-)?$s*Cover $s+ 
Texts?/xiso
+no \s+ Invariant \s+ Sections?,?
+   \s+ (?:no\s+)? Front(?:\s*[\\]?-)? \s+ or
+   \s+ (?:no\s+)? Back(?:\s*[\\]?-)?\s*Cover \s+ 
Texts?/xiso
   ) {
 # no invariant variant (dict-foldoc)
 } elsif (
-  

Processed: Re: Bug#721252: False positive: license-problem-gfdl-invariants for translation files in gtk-doc

2013-09-01 Thread Debian Bug Tracking System
Processing control commands:

 tags -1 + patch
Bug #721252 [lintian] False positive: license-problem-gfdl-invariants for 
translation files in gtk-doc
Added tag(s) patch.

-- 
721252: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=721252
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


--
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/handler.s.b721252.137802963023417.transcr...@bugs.debian.org



Bug#721252: False positive: license-problem-gfdl-invariants for translation files in gtk-doc

2013-09-01 Thread Bastien ROUCARIES
control: tags -1 + patch


On Fri, Aug 30, 2013 at 8:38 PM, Bastien ROUCARIES
roucaries.bast...@gmail.com wrote:
 Checking gtk-doc 1.19-1 with lintian, I get the following lintian errors
 E: gtk-doc source: license-problem-gfdl-invariants help/manual/de/de.po
 E: gtk-doc source: license-problem-gfdl-invariants help/manual/el/el.po
 E: gtk-doc source: license-problem-gfdl-invariants help/manual/es/es.po
 E: gtk-doc source: license-problem-gfdl-invariants help/manual/fr/fr.po
 E: gtk-doc source: license-problem-gfdl-invariants help/manual/zh_CN/zh_CN.po

 Will get a glimpse in a few days.

 Bastien

 The string GFDL is mentioned in those translation and it seems lintian
 get's confused by the surrounding context (or lack thereof)

 Yes, it is due to a citetitle tag that should be add to $s.



 -- System Information:
 Debian Release: jessie/sid
   APT prefers unstable
   APT policy: (500, 'unstable'), (500, 'stable'), (200, 'experimental')
 Architecture: amd64 (x86_64)
 Foreign Architectures: i386

 Kernel: Linux 3.10-2-amd64 (SMP w/4 CPU cores)
 Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
 Shell: /bin/sh linked to /bin/dash

 Versions of packages lintian depends on:
 ii  binutils   2.23.52.20130828-1
 ii  bzip2  1.0.6-5
 ii  diffstat   1.55-3
 ii  file   1:5.14-2
 ii  gettext0.18.3.1-1
 ii  hardening-includes 2.3
 ii  intltool-debian0.35.0+20060710.1
 ii  libapt-pkg-perl0.1.29
 ii  libarchive-zip-perl1.30-7
 ii  libclass-accessor-perl 0.34-1
 ii  libclone-perl  0.34-1
 ii  libdigest-sha-perl 5.85-1
 ii  libdpkg-perl   1.17.1
 ii  libemail-valid-perl0.190-1
 ii  libfile-basedir-perl   0.03-1
 ii  libipc-run-perl0.92-1
 ii  liblist-moreutils-perl 0.33-1+b1
 ii  libparse-debianchangelog-perl  1.2.0-1
 ii  libtext-levenshtein-perl   0.06~01-2
 ii  libtimedate-perl   1.2000-1
 ii  liburi-perl1.60-1
 ii  man-db 2.6.5-2
 ii  patchutils 0.3.2-2
 ii  perl [libdigest-sha-perl]  5.14.2-21
 ii  t1utils1.37-2

 Versions of packages lintian recommends:
 ii  libautodie-perl 2.20-1
 ii  libperlio-gzip-perl 0.18-1+b2
 ii  perl-modules [libautodie-perl]  5.14.2-21

 Versions of packages lintian suggests:
 pn  binutils-multiarch none
 ii  dpkg-dev   1.17.1
 ii  libhtml-parser-perl3.71-1
 ii  libtext-template-perl  1.45-2
 ii  xz-utils   5.1.1alpha+20120614-2

 -- no debconf information



-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/cae2spaabrs9r8uvtrxgtsz_ved1qw51njqhmxayooz_mjyr...@mail.gmail.com



Bug#612610: [lintian] may be time now

2013-09-01 Thread Raphael Hertzog
Hi,

On Thu, 29 Aug 2013, Bastien ROUCARIES wrote:
  Is there a consolidated list of concerns about 3.0 (quilt) somewhere?
 
 Not to my best knowledge.

The only technical concern that I'm aware of is that it doesn't work for
the workflow of debia...@lists.debian.org, they like to use quilt to
maintain long-lived patches and use the .diff.gz to collate upstream
patches that they apply with git cherry-pick. The advantage being that
they don't have to maintain those cherry-picked patches explicitly, they
go away automatically when they package the next upstream release.

Their workflow is entirely git based, they have the upstream history
in their repository.

Apart from that the other objections are not really actionnable, they
are more in the domain of personal preference and/or dislike of quilt
in general.

You will always have people who dislike the format, and even
some in the technical committe (thinking of Ian Jackson here).

  Would it be possible to not display the tag in case the package fits in
  one of the cases where we know that 3.0 (quilt) is considered unsuitable
  by many?
 
 If the case could be computably detected yes. But we need to know the case
 where it is unsuitable.

FWIW, there's already a missing-debian-source-format info tag which plays
somewhat the role of the reminder that they need to opt-in in 3.0
(quilt).

You can get in touch with people who opted explicitly to put 1.0 in
debian/source/format to know their reasons...

http://lintian.debian.org/tags/missing-debian-source-format.html

Have a look at the long description, the message is rather explicit. :-)

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Discover the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130901183432.ga28...@x230-buxy.home.ouaza.com