Bug#890356: lintian.d.o: maintainer reports (particular "full" ones) grows without bounds in size

2018-02-13 Thread Russ Allbery
Niels Thykier  writes:

> The maintainer reports (notably the "full" reports) quickly grows in
> size (disk space used) and without any bounds.  At the moment, the
> lintian.d.o has a complete size usage of ~1GB - half of that is "full
> reports" - the second runner up is the uncompressed lintian.log (at
> 250MB), which will disappear soon.

I use my maintainer full report all the time.

I think a lot of the explosion has been the inclusion of the purely
informational tags in the maintainer reports, which I think are fairly
useless and add a ton of space because even entirely Lintian-clean
packages have several of them.  Maybe just suppress those from the
maintainer report and see what things look like then?

-- 
Russ Allbery (r...@debian.org)   



Bug#890361: lintian: handling of new source override location possibly buggy

2018-02-13 Thread Thorsten Glaser
Hi Chris,

>I think you're right. Here's one patch - can you quickly test it works
>for you?

sorry, I don’t even have a testcase. I only noticed it during
looking at the source, trying to figure out whether a symlink
in the new position was good enough.

>  +last if $file;

But this is probably it, yes.

>… but, just for giggles, here's another silly one:

That looks also good ;-)

>Compat level 5 (!).

Well, 5 was the standard/minimum for a long time,
and I don’t use the newer features anyway (not those
visible to the user; those in the background, such
as using gzip’s -n option, are, of course, used),
so I’d just use compat 5 and get whatever version
the target distro had with whatever of its fixes.

>(What's wrong with the  debhelper versions in
>backports, out of interest?)

I try to keep backports dependencies out if possible.

I also maintain, in my own (public) repo and in the
private one of my employer, backports much far back
than oldoldstable, for those who are still running
such systems or chroots someplace. This started out
with back to etch (but, back then, lenny was stable,
so it was not that much of a, well, stretch (no pun
intended)), but eventually we discovered a sarge sy‐
stem somewhere at the workplace, so I targetted that
with a handful of packages until we could upgrade it
(it’s long gone, thankfully, but it’s no effort to
keep what I already *have* working in the old versions,
working in those; though I don’t create new backports
to such old versions). It’s also a portability exercise…

bye,
//mirabilos
-- 
13:22⎜«neurodamage» mira, what's up man? I have a CVS question for you in #cvs
13:22⎜«neurodamage» since you're so good w. it │ «neurodamage:#cvs» i love you
17:14⎜ Thanks big help you are :-)mira|nwt: ty again
18:36⎜«ThunderChicken:#cvs» mirabilos FTW!  23:03⎜«mithraic:#cvs» aaah. thanks



Processed: Re: Bug#890361: lintian: handling of new source override location possibly buggy

2018-02-13 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> tags 890361 + patch
Bug #890361 [lintian] lintian: handling of new source override location 
possibly buggy
Added tag(s) patch.
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
890361: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890361
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#890361: lintian: handling of new source override location possibly buggy

2018-02-13 Thread Chris Lamb
tags 890361 + patch
thanks

Hey Thorsten!

> I’m fairly sure the code around lines 56-62 of
> /usr/share/lintian/collection/override-file
> does NOT prefer the first (cf. line 44ff.)
> but the last override file found.

I think you're right. Here's one patch - can you quickly test it works
for you?

  diff --git a/collection/override-file b/collection/override-file
  index 04c43fc6d..70ad1fb35 100755
  --- a/collection/override-file
  +++ b/collection/override-file
  @@ -59,6 +59,7 @@ sub collect {
   } elsif (-f "$override.gz") {
   $file = "$override.gz";
   }
  +last if $file;
   }
   

… but, just for giggles, here's another silly one:

  diff --git a/collection/override-file b/collection/override-file
  index 04c43fc6d..b6bad50a5 100755
  --- a/collection/override-file
  +++ b/collection/override-file
  @@ -41,14 +41,14 @@ sub collect {
   unlink("$dir/override");
   }
   
  -# Pick the first of these files that exists.  Prefer
  +# Pick the last of these files that exists.  Prefer
   # source/lintian-overrides to source.lintian-overrides for source
   # packages.
   my (@overrides, $file);
   if ($type eq 'source') {
   @overrides = (
  -"$dir/unpacked/debian/source/lintian-overrides",
   "$dir/unpacked/debian/source.lintian-overrides"
  +"$dir/unpacked/debian/source/lintian-overrides",
   );
   } else {
   @overrides = ("$dir/unpacked/usr/share/lintian/overrides/$pkg");


> I’m a tad annoyed at such incompatible changes,
> but also (not scope of this bugreport) having to
> jump to the latest debhelper version when 5 is
> enough for me.

Compat level 5 (!).  (What's wrong with the  debhelper versions in
backports, out of interest?)


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#890361: lintian: handling of new source override location possibly buggy

2018-02-13 Thread Thorsten Glaser
Package: lintian
Version: 2.5.74
Severity: minor

I’m fairly sure the code around lines 56-62 of
/usr/share/lintian/collection/override-file
does NOT prefer the first (cf. line 44ff.)
but the last override file found.

I think there’s a break missing in lines 58 and 60.
(Or, well, the Perl equivalent; I don’t speak Perl.)

It’s also a bit unfortunate that, if I have both
(one being a symlink to the other), I still have¹
to override that the old location is used. I prefer
my packages backportable with ease, which is why
I’m a tad annoyed at such incompatible changes,
but also (not scope of this bugreport) having to
jump to the latest debhelper version when 5 is
enough for me.

① live example: git clone \
https://evolvis.org/anonscm/git/alioth/jupp.git
  (dump http transport, so may take a minute)

-- System Information:
Debian Release: buster/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'buildd-unstable'), (500, 'unstable')
Architecture: x32 (x86_64)
Foreign Architectures: i386, amd64

Kernel: Linux 4.14.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=C, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/lksh
Init: sysvinit (via /sbin/init)

Versions of packages lintian depends on:
ii  binutils  2.30-4
ii  bzip2 1.0.6-8.1
ii  diffstat  1.61-1
ii  dpkg  1.19.0.5
ii  file  1:5.32-1
ii  gettext   0.19.8.1-4
ii  intltool-debian   0.35.0+20060710.4
ii  libapt-pkg-perl   0.1.33
ii  libarchive-zip-perl   1.60-1
ii  libclass-accessor-perl0.51-1
ii  libclone-perl 0.39-1
ii  libdigest-sha-perl6.01-1
ii  libdpkg-perl  1.19.0.5
ii  libemail-valid-perl   1.202-1
ii  libfile-basedir-perl  0.07-1
ii  libipc-run-perl   0.96-1
ii  liblist-moreutils-perl0.416-1+b3
ii  libparse-debianchangelog-perl 1.2.0-12
ii  libperl5.26 [libdigest-sha-perl]  5.26.1-4+b1
ii  libtext-levenshtein-perl  0.13-1
ii  libtimedate-perl  2.3000-2
ii  liburi-perl   1.73-1
ii  libxml-simple-perl2.24-1
ii  libyaml-libyaml-perl  0.69+repack-1
ii  man-db2.8.1-1
ii  patchutils0.3.4-2
ii  perl  5.26.1-4+b1
ii  t1utils   1.41-2
ii  xz-utils  5.2.2-1.3

Versions of packages lintian recommends:
pn  libperlio-gzip-perl  

Versions of packages lintian suggests:
pn  binutils-multiarch 
ii  dpkg-dev   1.19.0.5
ii  libhtml-parser-perl3.72-3+b2
pn  libtext-template-perl  

-- no debconf information


Processed: Re: lintian could warn when using dh --parallel in compat level >= 10

2018-02-13 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> tags 890358 + pending
Bug #890358 [lintian] lintian could warn when using dh --parallel in compat 
level >= 10
Added tag(s) pending.
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
890358: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890358
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#890358: lintian could warn when using dh --parallel in compat level >= 10

2018-02-13 Thread Chris Lamb
tags 890358 + pending
thanks

Good idea. Fixed in Git, pending upload:

  
https://anonscm.debian.org/git/lintian/lintian.git/commit/?id=6a98ddc78b2e8a1822cfc48ebb5385ff61ccb7e7


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



[lintian] 02/02: Warn when specifying --parallel to dh(1) in compat levels >= 10. Thanks to Nicolas Braud-Santoni for the idea. (Closes: #890358)

2018-02-13 Thread Chris Lamb
This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit 6a98ddc78b2e8a1822cfc48ebb5385ff61ccb7e7
Author: Chris Lamb 
Date:   Tue Feb 13 22:01:02 2018 +

Warn when specifying --parallel to dh(1) in compat levels >= 10. Thanks to 
Nicolas Braud-Santoni for the idea. (Closes: #890358)
---
 checks/debhelper.desc  | 10 ++
 checks/debhelper.pm|  6 ++
 debian/changelog   |  4 +++-
 t/tests/debhelper-dh-unnecessary-arguments/debian/debian/rules |  4 
 t/tests/debhelper-dh-unnecessary-arguments/desc|  5 +
 t/tests/debhelper-dh-unnecessary-arguments/tags|  1 +
 6 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/checks/debhelper.desc b/checks/debhelper.desc
index 8bcf09e..26f17b8 100644
--- a/checks/debhelper.desc
+++ b/checks/debhelper.desc
@@ -420,3 +420,13 @@ Info: The debian/rules file for this package has 
an
  .
  Please replace these with calls to dh_installsystemd.
 Ref: debhelper(7)
+
+Tag: debian-rules-uses-unnecessary-dh-argument
+Severity: minor
+Certainty: certain
+Info: The debian/rules file passes the specified argument to
+ dh $@ but it is enabled by default from this debhelper
+ compatibility level onwards.
+ .
+ Please remove the argument from the call to dh(1).
+Ref: debhelper(7), dh(1)
diff --git a/checks/debhelper.pm b/checks/debhelper.pm
index d5d17bc..b462c0a 100644
--- a/checks/debhelper.pm
+++ b/checks/debhelper.pm
@@ -64,6 +64,7 @@ sub run {
 
 my ($bdepends_noarch, $bdepends, %build_systems, $uses_autotools_dev_dh);
 my $seen_dh = 0;
+my $seen_dh_parallel = 0;
 my $seen_python_helper = 0;
 my $seen_python3_helper = 0;
 my %overrides;
@@ -134,6 +135,7 @@ sub run {
 delete($build_systems{'debhelper'});
 $seen_dh = 1;
 $seencommand = 1;
+$seen_dh_parallel = 1 if m/--parallel/;
 $needbuilddepends = 1;
 $needtomodifyscripts = 1;
 while (m/\s--with(?:=|\s+)(['"]?)(\S+)\1/go) {
@@ -331,6 +333,10 @@ sub run {
   if $line and $level >= 11;
 }
 
+tag 'debian-rules-uses-unnecessary-dh-argument', 'dh ... --parallel',
+  "(line $.)"
+  if $seen_dh_parallel and $level >= 10;
+
 # Check the files in the debian directory for various debhelper-related
 # things.
 for my $file ($droot->children) {
diff --git a/debian/changelog b/debian/changelog
index 973887f..5efa227 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,7 +5,9 @@ lintian (2.5.75) UNRELEASED; urgency=medium
   * checks/changelog-file.desc:
 + [CL] When checking latest-debian-changelog-entry-without-new-version
   ignore any change of epoch.  (Closes: #889991)
-  * checks/debhelper.desc:
+  * checks/debhelper.{desc,pm}:
++ [CL] Warn when specifying --parallel to dh(1) in compat levels >= 10.
+  Thanks to Nicolas Braud-Santoni for the idea.  (Closes: #890358)
 + [CL] Add a missing verb to the long description of the
   dh-quilt-addon-but-quilt-source-format tag.
   * checks/files.pm:
diff --git a/t/tests/debhelper-dh-unnecessary-arguments/debian/debian/rules 
b/t/tests/debhelper-dh-unnecessary-arguments/debian/debian/rules
new file mode 100755
index 000..ce2eb52
--- /dev/null
+++ b/t/tests/debhelper-dh-unnecessary-arguments/debian/debian/rules
@@ -0,0 +1,4 @@
+#!/usr/bin/make -f
+
+%:
+   dh $@ --parallel
diff --git a/t/tests/debhelper-dh-unnecessary-arguments/desc 
b/t/tests/debhelper-dh-unnecessary-arguments/desc
new file mode 100644
index 000..fda7fe5
--- /dev/null
+++ b/t/tests/debhelper-dh-unnecessary-arguments/desc
@@ -0,0 +1,5 @@
+Testname: debhelper-dh-unnecessary-arguments
+Version: 1.0
+Description: Check for packages using --parallel
+Test-For:
+ debian-rules-uses-unnecessary-dh-argument
diff --git a/t/tests/debhelper-dh-unnecessary-arguments/tags 
b/t/tests/debhelper-dh-unnecessary-arguments/tags
new file mode 100644
index 000..4708a5c
--- /dev/null
+++ b/t/tests/debhelper-dh-unnecessary-arguments/tags
@@ -0,0 +1 @@
+W: debhelper-dh-unnecessary-arguments source: 
debian-rules-uses-unnecessary-dh-argument dh ... --parallel (line 13)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/lintian/lintian.git



[lintian] 01/02: Add a missing verb to the long description of the dh-quilt-addon-but-quilt-source-format tag.

2018-02-13 Thread Chris Lamb
This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit d1aa345e0b594a1a7fa6aa06c26803244d506ffa
Author: Chris Lamb 
Date:   Tue Feb 13 21:46:20 2018 +

Add a missing verb to the long description of the 
dh-quilt-addon-but-quilt-source-format tag.
---
 checks/debhelper.desc | 2 +-
 debian/changelog  | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/checks/debhelper.desc b/checks/debhelper.desc
index 915c5df..8bcf09e 100644
--- a/checks/debhelper.desc
+++ b/checks/debhelper.desc
@@ -401,7 +401,7 @@ Ref: #878528
 Tag: dh-quilt-addon-but-quilt-source-format
 Severity: normal
 Certainty: certain
-Info: The package (for example) dh $@ --with quilt in
+Info: The package uses (for example) dh $@ --with quilt in
  debian/rules but is already using the 3.0 (quilt)
  source format via the debian/source/format file.
  .
diff --git a/debian/changelog b/debian/changelog
index 1e7021c..973887f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,9 @@ lintian (2.5.75) UNRELEASED; urgency=medium
   * checks/changelog-file.desc:
 + [CL] When checking latest-debian-changelog-entry-without-new-version
   ignore any change of epoch.  (Closes: #889991)
+  * checks/debhelper.desc:
++ [CL] Add a missing verb to the long description of the
+  dh-quilt-addon-but-quilt-source-format tag.
   * checks/files.pm:
 + [CL] Tidy logic for detecting allowed rel="" values in 
   HTML tags.

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/lintian/lintian.git



[lintian] branch master updated (ed8885c -> 6a98ddc)

2018-02-13 Thread Chris Lamb
This is an automated email from the git hooks/post-receive script.

lamby pushed a change to branch master
in repository lintian.

  from  ed8885c   reporting: Tweak handling of unprocessable groups
   new  d1aa345   Add a missing verb to the long description of the 
dh-quilt-addon-but-quilt-source-format tag.
   new  6a98ddc   Warn when specifying --parallel to dh(1) in compat levels 
>= 10. Thanks to Nicolas Braud-Santoni for the idea. (Closes: #890358)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 checks/debhelper.desc| 12 +++-
 checks/debhelper.pm  |  6 ++
 debian/changelog |  5 +
 .../debian/debian/rules  |  3 +--
 t/tests/debhelper-dh-unnecessary-arguments/desc  |  5 +
 t/tests/debhelper-dh-unnecessary-arguments/tags  |  1 +
 6 files changed, 29 insertions(+), 3 deletions(-)
 copy t/tests/{files-python-module-has-overly-generic-name => 
debhelper-dh-unnecessary-arguments}/debian/debian/rules (56%)
 mode change 100644 => 100755
 create mode 100644 t/tests/debhelper-dh-unnecessary-arguments/desc
 create mode 100644 t/tests/debhelper-dh-unnecessary-arguments/tags

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/lintian/lintian.git



Bug#890358: lintian could warn when using dh --parallel in compat level >= 10

2018-02-13 Thread Nicolas Braud-Santoni
Package: lintian
Version: 2.5.73
Severity: wishlist

Hi,

When using debhelper in compatibility mode 10 or higher,
the --parallel option is enabled by default.

Please consider making lintian warn about redundant use of --parallel.


Best,

  nicoo


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (900, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.14.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set 
to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages lintian depends on:
ii  binutils  2.29.1-13
ii  bzip2 1.0.6-8.1
ii  diffstat  1.61-1+b1
ii  dpkg  1.19.0.5
ii  file  1:5.32-1
ii  gettext   0.19.8.1-4
ii  intltool-debian   0.35.0+20060710.4
ii  libapt-pkg-perl   0.1.33
ii  libarchive-zip-perl   1.60-1
ii  libclass-accessor-perl0.51-1
ii  libclone-perl 0.39-1
ii  libdpkg-perl  1.19.0.5
ii  libemail-valid-perl   1.202-1
ii  libfile-basedir-perl  0.07-1
ii  libipc-run-perl   0.96-1
ii  liblist-moreutils-perl0.416-1+b3
ii  libparse-debianchangelog-perl 1.2.0-12
ii  libperl5.26 [libdigest-sha-perl]  5.26.1-4
ii  libtext-levenshtein-perl  0.13-1
ii  libtimedate-perl  2.3000-2
ii  liburi-perl   1.73-1
ii  libxml-simple-perl2.24-1
ii  libyaml-libyaml-perl  0.69+repack-1
ii  man-db2.7.6.1-4
ii  patchutils0.3.4-2
ii  perl  5.26.1-4
ii  t1utils   1.41-2
ii  xz-utils  5.2.2-1.3

Versions of packages lintian recommends:
pn  libperlio-gzip-perl  

Versions of packages lintian suggests:
pn  binutils-multiarch 
ii  dpkg-dev   1.19.0.5
ii  libhtml-parser-perl3.72-3+b2
ii  libtext-template-perl  1.47-1

-- no debconf information


signature.asc
Description: PGP signature


[lintian] branch master updated (88a1b4d -> ed8885c)

2018-02-13 Thread Niels Thykier
This is an automated email from the git hooks/post-receive script.

nthykier pushed a change to branch master
in repository lintian.

  from  88a1b4d   Emit a pendatic warning for packages with repacked 
upstream tarballs that lack a Files-Excluded or Comment header in 
debian/copyright.
   new  ed8885c   reporting: Tweak handling of unprocessable groups

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 commands/reporting-lintian-harness.pm | 12 ++--
 commands/reporting-sync-state.pm  |  5 +++--
 lib/Lintian/Util.pm   |  8 ++--
 reporting/templates/maintainer.tmpl   |  2 +-
 4 files changed, 20 insertions(+), 7 deletions(-)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/lintian/lintian.git



Bug#890356: lintian.d.o: maintainer reports (particular "full" ones) grows without bounds in size

2018-02-13 Thread Niels Thykier
Package: lintian
Version: 2.5.73
Severity: normal

Hi,

The maintainer reports (notably the "full" reports) quickly grows in
size (disk space used) and without any bounds.  At the moment, the
lintian.d.o has a complete size usage of ~1GB - half of that is "full
reports" - the second runner up is the uncompressed lintian.log (at
250MB), which will disappear soon.

Individual reports have exploded and the top 10 ranges from ~7.5 to
30MB in raw HTML size[1].  These pages are so painful to low that it
feels like the browser is about to croak on the load/pressure.  I
doubt anyone is reading these reports (I certainly would not at that
scale).

I think we need some better way to deal with these reports.  My best
idea to date is to extract the package reports into a separate report
page and just link to them from the maintainer pages.  However, that
will make the maintainer pages rather useless/boring on their own (but
at least they would probably be "loadable").

Thanks,
~Niels

[1]
$ ls -hlarS reports-directory/www/full | tail
-rw-r--r-- 1 lintian lintian  7.3M Feb 13 04:20 
python-modules-t...@lists.alioth.debian.org.html
-rw-r--r-- 1 lintian lintian  9.7M Feb 13 04:20 
pkg-haskell-maintain...@lists.alioth.debian.org.html
-rw-r--r-- 1 lintian lintian   11M Feb 13 04:20 debian-...@lists.debian.org.html
-rw-r--r-- 1 lintian lintian   12M Feb 13 04:20 
pkg-perl-maintain...@lists.alioth.debian.org.html
-rw-r--r-- 1 lintian lintian   14M Feb 13 04:21 d...@debian.org.html
-rw-r--r-- 1 lintian lintian   17M Feb 13 04:22 than...@debian.org.html
-rw-r--r-- 1 lintian lintian   18M Feb 13 04:21 calcu...@rezozer.net.html
-rw-r--r-- 1 lintian lintian   18M Feb 13 04:21 julien.pu...@laposte.net.html
-rw-r--r-- 1 lintian lintian   18M Feb 13 04:22 infini...@debian.org.html
-rw-r--r-- 1 lintian lintian   30M Feb 13 04:20 
debian-science-maintain...@lists.alioth.debian.org.html



[lintian] 01/01: reporting: Tweak handling of unprocessable groups

2018-02-13 Thread Niels Thykier
This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit ed8885ce4aa0e08194ea69014924c85adda112aa
Author: Niels Thykier 
Date:   Tue Feb 13 20:46:34 2018 +

reporting: Tweak handling of unprocessable groups

Make "last-error-by" survive new versions so that we can use it to
tell if a package had issues with the previous version (until
reprocessed).  This enables us to:

  1) ensure that the report is still considered "truncated"
  2) write a separate page for list of packages that recently
 had issues.

Item 1) is done as a part of this patch.

Signed-off-by: Niels Thykier 
---
 commands/reporting-lintian-harness.pm | 12 ++--
 commands/reporting-sync-state.pm  |  5 +++--
 lib/Lintian/Util.pm   |  8 ++--
 reporting/templates/maintainer.tmpl   |  2 +-
 4 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/commands/reporting-lintian-harness.pm 
b/commands/reporting-lintian-harness.pm
index e2538da..e824c56 100644
--- a/commands/reporting-lintian-harness.pm
+++ b/commands/reporting-lintian-harness.pm
@@ -426,8 +426,16 @@ sub process_worklist {
 next if not exists($state->{'groups'}{$group_id});
 $group_data = $state->{'groups'}{$group_id};
 if ($errors{$group_id}) {
-++$group_data->{'processing-errors'};
-# Set the "last-processed-by" flag so we can clear the
+if (not exists($group_data->{'last-error-by'})
+or $group_data->{'last-error-by'} ne $LINTIAN_VERSION) {
+# If it is a new lintian version then (re)set the counter
+# to 1.  Case also triggers for the very first issue.
+$group_data->{'processing-errors'} = 1;
+} else {
+# Repeated error with the same version
+++$group_data->{'processing-errors'};
+}
+# Set the "last-error-by" flag so we can clear the
 # error if there is a new version of lintian.
 $group_data->{'last-error-by'} = $LINTIAN_VERSION;
 } else {
diff --git a/commands/reporting-sync-state.pm b/commands/reporting-sync-state.pm
index 9e9cbce..80741ad 100644
--- a/commands/reporting-sync-state.pm
+++ b/commands/reporting-sync-state.pm
@@ -308,9 +308,10 @@ sub cleanup_group_state {
 or $group_data->{'last-error-by'} ne $OPT{'desired-version'})
   ) {
 log_debug(
-"Clearing error flag for ${group_id}: New version of lintian");
+"Clearing error-counter for ${group_id}: New version of lintian");
 delete($group_data->{'processing-errors'});
-delete($group_data->{'last-error-by'});
+# Leave "last-error-by" as we can use that to tell if the previous
+# version triggered errors.
 }
 
 if (not %{$members}) {
diff --git a/lib/Lintian/Util.pm b/lib/Lintian/Util.pm
index f2eafd0..4f4deeb 100644
--- a/lib/Lintian/Util.pm
+++ b/lib/Lintian/Util.pm
@@ -1725,8 +1725,12 @@ sub find_backlog {
 my $last_version = '0';
 my $group_data = $state->{'groups'}{$group_id};
 my $is_out_of_date;
-if (exists($group_data->{'processing-errors'})
-and $group_data->{'processing-errors'} > 2) {
+# Does this group repeatedly fail with the current version
+# of lintian?
+if (exists($group_data->{'processing-errors'})
+and $group_data->{'processing-errors'} > 2
+and exists($group_data->{'last-error-by'})
+and $group_data->{'last-error-by'} ne $lintian_version) {
 # To avoid possible "starvation", we will give lower priority
 # to packages that repeatedly fail.  They will be retried as
 # the backlog is cleared.
diff --git a/reporting/templates/maintainer.tmpl 
b/reporting/templates/maintainer.tmpl
index 3e58c5b..ee9cb3f 100644
--- a/reporting/templates/maintainer.tmpl
+++ b/reporting/templates/maintainer.tmpl
@@ -109,7 +109,7 @@
 my $last_processed_by = $state->{'last-processed-by'} // 
'N/A';
 $status = 'outdated' if 
(exists($state->{'out-of-date'}));
 $status = 'incomplete report; 
an error occurred during the last check'
-  if exists($state->{'processing-errors'}) and 
$state->{'processing-errors'};
+  if exists($state->{'last-error-by'}) and 
$state->{'last-error-by'};
 $OUT .= qq(  \n);
 $OUT .= qq(   );
 $OUT .= "$source ($version$component)";

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/lintian/lintian.git



Re: Intend to remove lintian.log from lintian.d.o (please migrate to the .gz variant)

2018-02-13 Thread Pierre-Elliott Bécue
Le samedi 03 février 2018 à 10:17:00+, Niels Thykier a écrit :
> Hi,
> 
> I have been looking at optimizing the disk usage of the generated
> lintian.d.o website.  This optimization is (among other) to reduce the
> upload time for deploying a new version of the website.   My initial
> tweak have removed 20% of the disk size[1].
> 
> However, we are now at the point where the "uncompressed" lintian.log
> accounts for 25% of the entire website.  There is a gz-compressed
> variant, which has been around for years and is roughly 1:20 in size
> compared to the uncompressed one.
> 
> Please migrate any usage of "https://lintian.debian.org/lintian.log; to
> "https://lintian.debian.org/lintian.log.gz; (and update the code to
> decompress as necessary).
> 
> I intend to remove the uncompressed variant in 14 days from now, if I do
> not hear a compelling reason for deferring it.
> 
> Thanks,
> ~Niels
> 
> [1]
> https://anonscm.debian.org/git/lintian/lintian.git/commit/?id=19cee7dbe7c52e408810429e2da3e702951760e8
> 
> Ad-hoc deployed to lindsay, so you can see it in action at:
>   https://lintian.debian.org/tags/unstripped-static-library.html
> 
> (Went from ~12-14M to  < 150Kb)

The distro-tracker doesn't seem to depend on this file. So everything's fine
with this part of the internet.

Cheers,

-- 
Pierre-Elliott Bécue
GPG: 9AE0 4D98 6400 E3B6 7528  F493 0D44 2664 1949 74E2


signature.asc
Description: PGP signature


[lintian] branch master updated (213777e -> 88a1b4d)

2018-02-13 Thread Chris Lamb
This is an automated email from the git hooks/post-receive script.

lamby pushed a change to branch master
in repository lintian.

  from  213777e   Check for maintainer scripts that call udevadm without a 
guard as it can fail within a chroot. (Closes: #890224)
   new  88a1b4d   Emit a pendatic warning for packages with repacked 
upstream tarballs that lack a Files-Excluded or Comment header in 
debian/copyright.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 checks/source-copyright.desc  | 11 +++
 checks/source-copyright.pm|  3 +++
 debian/changelog  |  4 
 .../debian/debian/copyright   |  1 +
 .../source-copyright-missing-repack-explanation-unrel/desc|  8 
 .../source-copyright-missing-repack-explanation-unrel/tags|  1 +
 .../debian/debian/copyright   |  0
 t/tests/source-copyright-missing-repack-explanation/desc  |  8 
 t/tests/source-copyright-missing-repack-explanation/tags  |  2 ++
 9 files changed, 38 insertions(+)
 copy t/tests/{source-copyright-missing-non-free-explanation => 
source-copyright-missing-repack-explanation-unrel}/debian/debian/copyright (97%)
 create mode 100644 
t/tests/source-copyright-missing-repack-explanation-unrel/desc
 create mode 100644 
t/tests/source-copyright-missing-repack-explanation-unrel/tags
 copy t/tests/{source-copyright-missing-non-free-explanation => 
source-copyright-missing-repack-explanation}/debian/debian/copyright (100%)
 create mode 100644 t/tests/source-copyright-missing-repack-explanation/desc
 create mode 100644 t/tests/source-copyright-missing-repack-explanation/tags

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/lintian/lintian.git



[lintian] 01/01: Emit a pendatic warning for packages with repacked upstream tarballs that lack a Files-Excluded or Comment header in debian/copyright.

2018-02-13 Thread Chris Lamb
This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit 88a1b4dff503bd9afd1e34e152b644d74db67735
Author: Chris Lamb 
Date:   Tue Feb 13 17:00:42 2018 +

Emit a pendatic warning for packages with repacked upstream tarballs that 
lack a Files-Excluded or Comment header in debian/copyright.
---
 checks/source-copyright.desc   | 11 ++
 checks/source-copyright.pm |  3 +++
 debian/changelog   |  4 
 .../debian/debian/copyright| 24 ++
 .../desc   |  8 
 .../tags   |  1 +
 .../debian/debian/copyright| 23 +
 .../desc   |  8 
 .../tags   |  2 ++
 9 files changed, 84 insertions(+)

diff --git a/checks/source-copyright.desc b/checks/source-copyright.desc
index c4039e8..0881e7e 100644
--- a/checks/source-copyright.desc
+++ b/checks/source-copyright.desc
@@ -401,3 +401,14 @@ Info: The specified package is in the contrib or non-free 
archive
  Please add a brief comment why this package cannot be part of the
  main Debian distribution.
 Ref: policy 12.5
+
+Tag: missing-explanation-for-repacked-upstream-tarball
+Severity: pedantic
+Certainty: possible
+Info: The version of this package contains dfsg, ds,
+ or debian which normally indicates that the upstream source
+ has been repackaged, but there is no "Comment" or "Files-Excluded"
+ header in its copyright file which explains the reason why.
+ .
+ Please add a comment why this tarball was repacked or add a suitable
+ "Files-Excluded" header.
diff --git a/checks/source-copyright.pm b/checks/source-copyright.pm
index 04619c4..47409e9 100644
--- a/checks/source-copyright.pm
+++ b/checks/source-copyright.pm
@@ -283,6 +283,9 @@ sub _parse_dep5 {
 tag 'missing-explanation-for-contrib-or-non-free-package'
   if $info->source_field('section', '') =~ m{^(contrib|non-free)(/.+)?$}
   and none { defined $first_para->{$_} } qw(comment disclaimer);
+tag 'missing-explanation-for-repacked-upstream-tarball'
+  if $info->field('version', '') =~ m{(?:dfsg|debian|ds|repack)}
+  and none { defined $first_para->{$_} } qw(comment files-excluded);
 
 my (undef, $full_license_header, undef,@short_licenses_header)
   =parse_license($first_para->{'license'}, 1);
diff --git a/debian/changelog b/debian/changelog
index aa5a74b..1e7021c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -28,6 +28,10 @@ lintian (2.5.75) UNRELEASED; urgency=medium
   * checks/scripts.{desc,pm}:
 + [CL] Check for maintainer scripts that call udevadm without a guard
   as it can fail within a chroot.  (Closes: #890224)
+  * checks/source-copyright.{desc,pm}:
++ [CL] Emit a pendatic warning for packages with repacked upstream
+  tarballs that lack a Files-Excluded or Comment header in
+  debian/copyright.
 
   * commands/reporting-html-reports.html:
 + [NT] Minimize generated SVG files if scour is installed and
diff --git 
a/t/tests/source-copyright-missing-repack-explanation-unrel/debian/debian/copyright
 
b/t/tests/source-copyright-missing-repack-explanation-unrel/debian/debian/copyright
new file mode 100644
index 000..6a3aeb6
--- /dev/null
+++ 
b/t/tests/source-copyright-missing-repack-explanation-unrel/debian/debian/copyright
@@ -0,0 +1,24 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Lintian
+Upstream-Contact: 
+Source: http://lintian.debian.org
+Files-Excluded: dummy
+
+Files: *
+Copyright: 2009, Russ Allbery 
+License: GPL-2+
+ This program is free software; you may redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ .
+ This is distributed in the hope that it will be useful, but without
+ any warranty; without even the implied warranty of merchantability or
+ fitness for a particular purpose. See the GNU General Public License
+ for more details.
+ .
+ A copy of the GNU General Public License version 2 is available as
+ /usr/share/common-licenses/GPL-2 in the Debian GNU/Linux distribution
+ or at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+ You can also obtain it by writing to the Free Software Foundation, Inc.,
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/t/tests/source-copyright-missing-repack-explanation-unrel/desc 
b/t/tests/source-copyright-missing-repack-explanation-unrel/desc
new file mode 100644
index 000..d6abaef
--- /dev/null
+++ b/t/tests/source-copyright-missing-repack-explanation-unrel/desc
@@ -0,0 +1,8 

[lintian] 01/01: Check for maintainer scripts that call udevadm without a guard as it can fail within a chroot. (Closes: #890224)

2018-02-13 Thread Chris Lamb
This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit 213777e48ba1ee4f1945bdb9eebefc74458df472
Author: Chris Lamb 
Date:   Tue Feb 13 16:37:02 2018 +

Check for maintainer scripts that call udevadm without a guard as it can 
fail within a chroot. (Closes: #890224)
---
 checks/scripts.desc  | 14 ++
 checks/scripts.pm| 16 +---
 debian/changelog |  3 +++
 .../debian/debian/postinst   | 20 
 .../debian/debian/preinst| 18 ++
 t/tests/scripts-udevadm-called-without-guard/desc|  5 +
 t/tests/scripts-udevadm-called-without-guard/tags|  2 ++
 7 files changed, 75 insertions(+), 3 deletions(-)

diff --git a/checks/scripts.desc b/checks/scripts.desc
index b244bbb..eba0c8e 100644
--- a/checks/scripts.desc
+++ b/checks/scripts.desc
@@ -838,3 +838,17 @@ Info: The maintainer script appears to call chmod 
or
   - Use runuser(1) to perform any initialization work as the
 user you were previously chowning to.
 Ref: #889060, #889488, runuser(1)
+
+Tag: udevadm-called-without-guard
+Severity: normal
+Certainty: possible
+Info: The specified maintainer script uses set -e but seems to
+ call udevadm(8) without a conditional guard.
+ .
+ udevadm can exist but be non-functional (such as inside a
+ chroot) and thus can result in package installation or upgrade failure
+ if the call fails.
+ .
+ Please guard the return code of the call via wrapping it in a suitable
+ if construct or by appending || true.
+Ref: #890224, udevadm(8)
diff --git a/checks/scripts.pm b/checks/scripts.pm
index af08ad1..7021610 100644
--- a/checks/scripts.pm
+++ b/checks/scripts.pm
@@ -641,9 +641,13 @@ sub run {
 # now scan the file contents themselves
 my $fd = $path->open;
 
-my ($saw_init, $saw_invoke, $saw_debconf,
-$saw_bange, $saw_sete, $has_code,
-$saw_statoverride_list, $saw_statoverride_add);
+my (
+$saw_init, $saw_invoke,
+$saw_debconf,$saw_bange,
+$saw_sete, $has_code,
+$saw_statoverride_list, $saw_statoverride_add,
+$saw_udevadm_guard
+);
 my %warned;
 my $cat_string = '';
 
@@ -711,6 +715,12 @@ sub run {
 $seen_helper_cmds{$cmd}{$file} = 1;
 }
 
+if (m,$LEADIN(?:/bin/)?udevadm\s, and $saw_sete) {
+$saw_udevadm_guard = 1 if m/\bif\s+/g;
+tag 'udevadm-called-without-guard', "$file:$."
+  unless $saw_udevadm_guard or m/\|\|/;
+}
+
 if (m,[^\w](?:(?:/var)?/tmp|\$TMPDIR)/[^)\]}\s],
 and not m/\bmks?temp\b/
 and not m/\btempfile\b/
diff --git a/debian/changelog b/debian/changelog
index 1c499f8..aa5a74b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -25,6 +25,9 @@ lintian (2.5.75) UNRELEASED; urgency=medium
 + [CL] Underline that maintainers do not need to override the
   new-package-should-not-package-python2-module tag but rather leave a
   comment in debian/changelog.
+  * checks/scripts.{desc,pm}:
++ [CL] Check for maintainer scripts that call udevadm without a guard
+  as it can fail within a chroot.  (Closes: #890224)
 
   * commands/reporting-html-reports.html:
 + [NT] Minimize generated SVG files if scour is installed and
diff --git 
a/t/tests/scripts-udevadm-called-without-guard/debian/debian/postinst 
b/t/tests/scripts-udevadm-called-without-guard/debian/debian/postinst
new file mode 100644
index 000..ee508c4
--- /dev/null
+++ b/t/tests/scripts-udevadm-called-without-guard/debian/debian/postinst
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+set -e
+
+#DEBHELPER#
+
+udevadm positive
+
+udevadm false-positive || true
+udevadm false-positive || echo "Warning message"
+
+if udevadm false-positive
+then
+   udevadm false-positive
+fi
+
+# We don't actually catch this one as our test is too naive
+udevadm positive
+
+exit 0
diff --git a/t/tests/scripts-udevadm-called-without-guard/debian/debian/preinst 
b/t/tests/scripts-udevadm-called-without-guard/debian/debian/preinst
new file mode 100644
index 000..70e0741
--- /dev/null
+++ b/t/tests/scripts-udevadm-called-without-guard/debian/debian/preinst
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+#DEBHELPER#
+
+udevadm positive
+
+udevadm false-positive || true
+udevadm false-positive || echo "Warning message"
+
+if udevadm false-positive
+then
+   udevadm false-positive
+fi
+
+# We don't actually catch this one as our test is too naive
+udevadm positive
+
+exit 0
diff --git a/t/tests/scripts-udevadm-called-without-guard/desc 
b/t/tests/scripts-udevadm-called-without-guard/desc
new file mode 100644
index 000..61c7c4a
--- /dev/null
+++ 

[lintian] branch master updated (2b4ca9b -> 213777e)

2018-02-13 Thread Chris Lamb
This is an automated email from the git hooks/post-receive script.

lamby pushed a change to branch master
in repository lintian.

  from  2b4ca9b   Allow rel="canonical" in  HTML tags; they are used 
by search engines (etc.) and do not cause internet access. (Closes: #762753)
   new  213777e   Check for maintainer scripts that call udevadm without a 
guard as it can fail within a chroot. (Closes: #890224)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 checks/scripts.desc  | 14 ++
 checks/scripts.pm| 16 +---
 debian/changelog |  3 +++
 .../debian/debian/postinst   | 20 
 .../debian/debian/preinst| 18 ++
 t/tests/scripts-udevadm-called-without-guard/desc|  5 +
 t/tests/scripts-udevadm-called-without-guard/tags|  2 ++
 7 files changed, 75 insertions(+), 3 deletions(-)
 create mode 100644 
t/tests/scripts-udevadm-called-without-guard/debian/debian/postinst
 create mode 100644 
t/tests/scripts-udevadm-called-without-guard/debian/debian/preinst
 create mode 100644 t/tests/scripts-udevadm-called-without-guard/desc
 create mode 100644 t/tests/scripts-udevadm-called-without-guard/tags

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/lintian/lintian.git



Processed: Re: lintian: privacy-breach-generic false positives on ?

2018-02-13 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> tags 762753 + pending
Bug #762753 [lintian] lintian: privacy-breach-generic false positives on http://example.com;> ?
Added tag(s) pending.
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
762753: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762753
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#762753: lintian: privacy-breach-generic false positives on ?

2018-02-13 Thread Chris Lamb
tags 762753 + pending
thanks

Fixed in Git, pending upload:

  
https://anonscm.debian.org/git/lintian/lintian.git/commit/?id=2b4ca9b4daf2bb886ef8094108a63e0f8a414a22


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



[lintian] branch master updated (6902623 -> 2b4ca9b)

2018-02-13 Thread Chris Lamb
This is an automated email from the git hooks/post-receive script.

lamby pushed a change to branch master
in repository lintian.

  from  6902623   Improve various parts of the long description for 
init.d-script-should-always-start-service.
   new  39adcde   checks/files.pm: Tidy logic for detecting allowed rel="" 
values in  HTML tags.
   new  2b4ca9b   Allow rel="canonical" in  HTML tags; they are used 
by search engines (etc.) and do not cause internet access. (Closes: #762753)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 checks/files.pm   | 19 ---
 debian/changelog  |  6 ++
 .../src/privacy-breach-generic/link-canonical.xml |  2 ++
 t/tests/files-privacybreach/tags  |  2 --
 4 files changed, 16 insertions(+), 13 deletions(-)
 create mode 100644 
t/tests/files-privacybreach/debian/src/privacy-breach-generic/link-canonical.xml

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/lintian/lintian.git



[lintian] 02/02: Allow rel="canonical" in HTML tags; they are used by search engines (etc.) and do not cause internet access. (Closes: #762753)

2018-02-13 Thread Chris Lamb
This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit 2b4ca9b4daf2bb886ef8094108a63e0f8a414a22
Author: Chris Lamb 
Date:   Tue Feb 13 14:37:25 2018 +

Allow rel="canonical" in  HTML tags; they are used by search engines 
(etc.) and do not cause internet access. (Closes: #762753)
---
 checks/files.pm| 1 +
 debian/changelog   | 3 +++
 .../debian/src/privacy-breach-generic/link-canonical.xml   | 2 ++
 t/tests/files-privacybreach/tags   | 2 --
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/checks/files.pm b/checks/files.pm
index e4480c1..8f2ee62 100644
--- a/checks/files.pm
+++ b/checks/files.pm
@@ -2053,6 +2053,7 @@ sub _check_tag_url_privacy_breach {
 if (defined($relcontent)) {
 my %allowed = (
 'bookmark'  => 1, # #746656
+'canonical' => 1, # #762753
 'generator-home'=> 1, # texinfo
 'schema.dct'=> 1, # #736992
 );
diff --git a/debian/changelog b/debian/changelog
index 711b25f..1c499f8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,9 @@ lintian (2.5.75) UNRELEASED; urgency=medium
   * checks/files.pm:
 + [CL] Tidy logic for detecting allowed rel="" values in 
   HTML tags.
++ [CL] Allow rel="canonical" in  HTML tags; they are used by
+  search engines (etc.) and do not cause internet access.
+  (Closes: #762753)
   * checks/init.desc:
 + [CL] Improve various parts of the long description for
   init.d-script-should-always-start-service.
diff --git 
a/t/tests/files-privacybreach/debian/src/privacy-breach-generic/link-canonical.xml
 
b/t/tests/files-privacybreach/debian/src/privacy-breach-generic/link-canonical.xml
new file mode 100644
index 000..620ebc3
--- /dev/null
+++ 
b/t/tests/files-privacybreach/debian/src/privacy-breach-generic/link-canonical.xml
@@ -0,0 +1,2 @@
+
+http://example.com;>
diff --git a/t/tests/files-privacybreach/tags b/t/tests/files-privacybreach/tags
index cfcf319..eaedc9e 100644
--- a/t/tests/files-privacybreach/tags
+++ b/t/tests/files-privacybreach/tags
@@ -77,5 +77,3 @@ W: files-privacybreach: privacy-breach-generic 
usr/share/files-privacy-breach/pr
 W: files-privacybreach: privacy-breach-generic 
usr/share/files-privacy-breach/privacy-breach-generic/typekit.html 

[lintian] 01/02: checks/files.pm: Tidy logic for detecting allowed rel="" values in HTML tags.

2018-02-13 Thread Chris Lamb
This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit 39adcde0f416bec92f99800f2c623b9e62886ecb
Author: Chris Lamb 
Date:   Tue Feb 13 14:35:33 2018 +

checks/files.pm: Tidy logic for detecting allowed rel="" values in  
HTML tags.
---
 checks/files.pm  | 18 +++---
 debian/changelog |  3 +++
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/checks/files.pm b/checks/files.pm
index a6e8edd..e4480c1 100644
--- a/checks/files.pm
+++ b/checks/files.pm
@@ -2051,17 +2051,13 @@ sub _check_tag_url_privacy_breach {
   >,xismog;
 my $relcontent = $1;
 if (defined($relcontent)) {
-if ($relcontent eq 'schema.dct') {
-# see #736992
-return;
-} elsif  ($relcontent eq 'bookmark') {
-# see #746656
-return;
-} elsif ($relcontent eq 'generator-home') {
-# generator-home is used by texinfo
-return;
-# reparse for alternate (css alternate is loaded)
-} elsif ($relcontent eq 'alternate') {
+my %allowed = (
+'bookmark'  => 1, # #746656
+'generator-home'=> 1, # texinfo
+'schema.dct'=> 1, # #736992
+);
+return if ($allowed{$relcontent});
+if ($relcontent eq 'alternate') {
 my $type = $fulltag;
 $type =~ m,]+)? \s+
diff --git a/debian/changelog b/debian/changelog
index f8b47e5..711b25f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,9 @@ lintian (2.5.75) UNRELEASED; urgency=medium
   * checks/changelog-file.desc:
 + [CL] When checking latest-debian-changelog-entry-without-new-version
   ignore any change of epoch.  (Closes: #889991)
+  * checks/files.pm:
++ [CL] Tidy logic for detecting allowed rel="" values in 
+  HTML tags.
   * checks/init.desc:
 + [CL] Improve various parts of the long description for
   init.d-script-should-always-start-service.

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/lintian/lintian.git



Processed: Re: moreinfo

2018-02-13 Thread Debian Bug Tracking System
Processing control commands:

> tag -1 - moreinfo
Bug #762753 [lintian] lintian: privacy-breach-generic false positives on http://example.com;> ?
Removed tag(s) moreinfo.

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



Bug#762753: moreinfo

2018-02-13 Thread Raphael Hertzog
Control: tag -1 - moreinfo

On Mon, 27 Oct 2014, Bastien ROUCARIES wrote:
> Do you have some normative element about this tag?

It's not hard to find:
https://en.wikipedia.org/wiki/Canonical_link_element
https://tools.ietf.org/html/rfc6596

And I agree that this is false positive that should be fixed.

I use this field in debian-handbook to help search engines understand
taht the copy hosted on debian.org is the same as the one
on debian-handbook.info (the canonical location) and there's
no reason to forbid this.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: https://www.freexian.com/services/debian-lts.html
Learn to master Debian: https://debian-handbook.info/get/