Debian Bug report logs - #1014255
lintian: very-long-line-length-in-source-file should use file/magic to distinguish text from binary files

version graph

Package: lintian; Maintainer for lintian is Debian Lintian Maintainers <[email protected]>; Source for lintian is src:lintian (PTS, buildd, popcon).

Affects: src:gnupg2

Reported by: Matt Barry <[email protected]>

Date: Fri, 1 Jul 2022 05:12:02 UTC

Severity: wishlist

Tags: confirmed

Found in version lintian/2.115.2

Full log


Message #34 received at [email protected] (full text, mbox, reply):

Received: (at 1014156) by bugs.debian.org; 3 Jul 2022 01:38:27 +0000
From [email protected] Sun Jul 03 01:38:27 2022
X-Spam-Checker-Version: SpamAssassin 3.4.2-bugs.debian.org_2005_01_02
	(2018-09-13) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-17.8 required=4.0 tests=BAYES_00,FOURLA,
	FROMDEVELOPER,HAS_BUG_NUMBER,HEADER_FROM_DIFFERENT_DOMAINS,SHIP_ID_INT,
	SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham
	autolearn_force=no version=3.4.2-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 13; hammy, 150; neutral, 329; spammy,
	0. spammytokens: hammytokens:0.000-+--Lintian,
	0.000-+--HFace:sk:iVBORw0, 0.000-+--H*RU:sym2.noone.org,
	0.000-+--H*r:sym2.noone.org, 0.000-+--H*o:Debian
Return-path: <[email protected]>
Received: from sym.noone.org ([2a01:4f8:120:4161::3]:48448 helo=sym2.noone.org)
	by buxtehude.debian.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <[email protected]>)
	id 1o7oZ8-00026O-OP
	for [email protected]; Sun, 03 Jul 2022 01:38:27 +0000
Received: by sym2.noone.org (Postfix, from userid 1000)
	id 4LbBR16hPVzvjfn; Sun,  3 Jul 2022 03:38:21 +0200 (CEST)
Date: Sun, 3 Jul 2022 03:38:21 +0200
From: Axel Beckert <[email protected]>
To: Daniel Kahn Gillmor <[email protected]>, [email protected],
	Matt Barry <[email protected]>,
	Peter B <[email protected]>
Subject: Re: Bug#1014156: lintian: very-long-line-length-in-source-file for
 non-text source files
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[email protected]>
 <[email protected]>
 <[email protected]>
X-Operating-System: Linux 4.9.0-18-amd64
X-Machine: sym2 x86_64
X-Editor: GNU Emacs 25.1.1
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAAAAAC3mUtaAAAABGdBTUEAALGPC/xhBQAAADh0RVh0U29mdHdhcmUAWFYgVmVyc2lvbiAzLjEwYSAgUmV2OiAxMi8yOS85NCAoUE5HIHBhdGNoIDEuMindFS5JAAACGElEQVQ4jXXQMU8UYRDG8f8shNjdDH4AbpfGDjAWlKiJiZ0ajL1aGCvsNCbGaCGG1koLaztaTYz6ATy+gOyehYmF3MxVxgg3FnDsHcTpJr/M+8w7Rf6nCsaVTTDqxbg9hoOXmw83H71+Eyfg4E1d7/Z2fG9rGkZbTQiu+K+3U/C+76lmkvAhJuDndnoAiftou4V84okAGclop4U/jYACZDTxrYWP0gkxVfAm/W//GLZpxIzwIN0Hn8dw0B+IWkZmQmRsj2HfhwokEklHfNCCiQCRgAR7YyhQVRVTCKCzP4Y5zBBE0t0zY3Q8oQaBqqAMlVEcgVQd9706zGirAFium8HXumlMIeMwqQCInju+2+uB6MRENupdpMt8pRlHZyuAW0F+Mb6XSIVqtxjD+iVmVqqystLEzFTGT92YqRaXpNT5eTVjeJhbALPnrTxLUZUKZsgxcNm64hAOYisT/xhF+oKTGU5RegtC3Rt6eEDi/QnIevdTx9Md2EMmYBRmCQR1026FCGQQJJExsRUqgkMGaWSbwYLnoO4T6VgpbQbdELPMBAHWWrhYrcxXnYgAsatPWygkFCBD4K62MAsOTqA6szYRPpsu6e6Y8mPiVrBMNuGIMrgwBUu4p2DgG1Ownu6hpuTv7hScefHAzAC/yRRw5U5pALMbJ4AUALvHSZhxgHPXTsHcdWD1GadAHr9avP+c0wCr7263Df8ASLwXWHWs+KIAAAAHdElNRQfYBQEBODPr
Organization: The Debian Project
User-Agent: NeoMutt/20170113 (1.7.2)
Control: tag -1 + confirmed
Control: clone -1 -2
Control: retitle -2 lintian: very-long-line-length-in-source-file should use file/magic to distinguish text from binary files
Control: submitter -2 Matt Barry <[email protected]>
Control: severity -2 wishlist
Control: clone -1 -3
Control: retitle -2 lintian: very-long-line-length-in-source-file should ignore lines starting with INSERT or SELECT (i.e. commonly long SQL statements)
Control: submitter -2 Peter B <[email protected]>

Hi,

Daniel Kahn Gillmor wrote:
> lintian 2.115.2 complains (in --pedantic) in the following way about
> these non-text files in the gnupg2 sources:

Thanks for this list.

From my point of view while many of these binary files might not be in
the preferred representation (especially for the .gmo files I'd expect
a plain text file to be the source),
very-long-line-length-in-source-file should not be emitted for binary files.

> I'd prefer it if lintian instead just wouldn't flag non-text source
> files with this tag.

Correct. Currently this is handled via a blacklist of common binary
file suffixes.

>  - some of them are GNU message catalogs -- compiled output of .po files
>    that upstream prefers to ship in the tarball for folks building the
>    package without l10n toolchains.  we rebuild them in debian, but i'd
>    still rather ship the upstream tarball if possible.

Yep. Do expect that there will be a future lintian tag for these kind
of files which is meant to be overriden if and only if the build
system rebuilds them at build time.

Matt Barry wrote:
> Looking at the check, it seems there is an exemption for SVG files
> built in;

At least not at the suffix list.

> would it make any sense to search for a text/* mime type
> instead (ala libfile-libmagic-perl)?

Yes, that would probably make more sense than manually curating a list
of suffixes. Also the performance impact should be low as Lintian
seems to run "file" over nearly every file anyways.

That's nevertheless not a short term fix. Cloning this bug report into
a new one to track this separately.

Peter B wrote:
> On 01/07/2022 06:08, Daniel Kahn Gillmor wrote:
> > Package: lintian
> > Version: 2.115.2
> > Severity: minior
> > Control: affects -1 src:gnupg2
> > 
> > lintian 2.115.2 complains (in --pedantic) in the following way about
> > these non-text files in the gnupg2 sources:
> > 
> > P: gnupg2 source: very-long-line-length-in-source-file 1008 > 512
> > [po/eo.gmo:7]

Please refrain from doing fullquotes in the Debian bug tracking system
unless really necessary. Thanks!

> I'm also seeing this with strawberry. Several hits from binary sound
> files in it's test suite.

Thanks for that list as well. One item though caught my eye:

> > P: strawberry source: very-long-line-length-in-source-file 3435 > 512 [dist/macos/strawberry.icns:5678]

The suffix "icns" is already in the blacklist since 2.115.2. With
which version of Lintian did you generate that list?

> > P: strawberry source: very-long-line-length-in-source-file 543 > 512 [CMakeLists.txt:535]
> > P: strawberry source: very-long-line-length-in-source-file 687 > 512 [3rdparty/SPMediaKeyTap/README.md:4]
> > P: strawberry source: very-long-line-length-in-source-file 756 > 512 [3rdparty/SPMediaKeyTap/LICENSE:8]

These are likely a valid cases.

> > P: strawberry source: very-long-line-length-in-source-file 559 > 512 [data/schema/schema-8.sql:587]
> > P: strawberry source: very-long-line-length-in-source-file 566 > 512 [data/schema/schema-11.sql:235]

These are corner cases IMHO. Not really binary files, but also files
where long lines are very common, especially for INSERT and SELECT.

I tend to write code which explicitly ignores lines starting with
INSERT or SELECT for that.

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <[email protected]>, https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 11:47:01 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.