FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 04-13-2010, 08:22 PM
Matthias Klumpp
 
Default How does lintian detect embedded-zlib?

Hello!
Cause binaries generated by the FPC (FreePascalCompiler) produce the
Lintian error "embedded-zlib", I cannot upload a new version of a package I
maintain which overrides this error. (It's not allowed to override it at
time)
So I started some research why this error is shown. FPC - generally - does
not link any lib statically, so this ZLib error is bit strange.
How does Lintian detect the embedded zlib in binaries? If it scans for some
patterns, it might be a false positive because FPC itself has a similar
algorithm in its RTL.
Does someone know more about Lintians way of finding embedded ZLibs?
Thanks & kind regards
Matthias Klumpp


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: b0390b261971d57972ee12a124fc4e32@mb8-2.1blu.de">http://lists.debian.org/b0390b261971d57972ee12a124fc4e32@mb8-2.1blu.de
 
Old 04-13-2010, 08:36 PM
David Paleino
 
Default How does lintian detect embedded-zlib?

Hello,

Matthias Klumpp wrote:
> Does someone know more about Lintians way of finding embedded ZLibs?

>From /usr/share/lintian/checks/binaries:

if ($info->field('source') ne 'zlib' and $info->field('source') ne 'klibc'
and $strings =~ /(?:in|de)flate (?:d[ w.-]{1,20}[w.-])/m) {
tag "embedded-zlib", $file;
}

$strings is:

my $strings = slurp_entire_file("strings/$file");

You might want to have a lintian run with --keep-lab, and check whatever
is in strings/, if anything there matches with the regex above.

Kindly,
David

--
. '`. Debian developer | http://wiki.debian.org/DavidPaleino
: :' : Linuxer #334216 --|-- http://www.hanskalabs.net/
`. `'` GPG: 1392B174 ----|----
`- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174



--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: hq2kkf$55o$1@dough.gmane.org">http://lists.debian.org/hq2kkf$55o$1@dough.gmane.org
 
Old 04-13-2010, 08:41 PM
James Vega
 
Default How does lintian detect embedded-zlib?

On Tue, Apr 13, 2010 at 10:22:55PM +0200, Matthias Klumpp wrote:
> Hello!
> Cause binaries generated by the FPC (FreePascalCompiler) produce the
> Lintian error "embedded-zlib", I cannot upload a new version of a package I
> maintain which overrides this error. (It's not allowed to override it at
> time)

You can override this. I do so for plt-scheme.

> So I started some research why this error is shown. FPC - generally - does
> not link any lib statically, so this ZLib error is bit strange.
> How does Lintian detect the embedded zlib in binaries?

From /usr/share/lintian/checks/binaries:

if ($info->field('source') ne 'zlib' and $info->field('source') ne 'klibc'
and $strings =~ /(?:in|de)flate (?:d[ w.-]{1,20}[w.-])/m) {
tag "embedded-zlib", $file;
}

--
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan@debian.org>
 
Old 04-13-2010, 08:58 PM
Russ Allbery
 
Default How does lintian detect embedded-zlib?

James Vega <jamessan@debian.org> writes:
> On Tue, Apr 13, 2010 at 10:22:55PM +0200, Matthias Klumpp wrote:

>> Cause binaries generated by the FPC (FreePascalCompiler) produce the
>> Lintian error "embedded-zlib", I cannot upload a new version of a
>> package I maintain which overrides this error. (It's not allowed to
>> override it at time)

> You can override this. I do so for plt-scheme.

If people have an idea for a better way of doing this test, do let us
know, since we'd prefer to not have people have to override if it can be
avoided. We're trying to match on version strings that are somewhat
peculiar to the zlib implementation, hopefully.

--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87bpdnrrxe.fsf@windlord.stanford.edu">http://lists.debian.org/87bpdnrrxe.fsf@windlord.stanford.edu
 
Old 04-13-2010, 09:00 PM
Russ Allbery
 
Default How does lintian detect embedded-zlib?

Russ Allbery <rra@debian.org> writes:
> James Vega <jamessan@debian.org> writes:
>> On Tue, Apr 13, 2010 at 10:22:55PM +0200, Matthias Klumpp wrote:

>>> Cause binaries generated by the FPC (FreePascalCompiler) produce the
>>> Lintian error "embedded-zlib", I cannot upload a new version of a
>>> package I maintain which overrides this error. (It's not allowed to
>>> override it at time)

>> You can override this. I do so for plt-scheme.

> If people have an idea for a better way of doing this test, do let us
> know, since we'd prefer to not have people have to override if it can be
> avoided. We're trying to match on version strings that are somewhat
> peculiar to the zlib implementation, hopefully.

Oh, never mind, I see. plt-scheme isn't a false positive, just a case
where upstream is embedding the library and the bug and fixes haven't been
worked through yet.

--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 877hobrrtv.fsf@windlord.stanford.edu">http://lists.debian.org/877hobrrtv.fsf@windlord.stanford.edu
 
Old 04-13-2010, 09:49 PM
Matthias Klumpp
 
Default How does lintian detect embedded-zlib?

On Tue, 13 Apr 2010 16:41:20 -0400, James Vega <jamessan@debian.org> wrote:
>> So I started some research why this error is shown. FPC - generally -
>> does
>> not link any lib statically, so this ZLib error is bit strange.
>> How does Lintian detect the embedded zlib in binaries?
>
> From /usr/share/lintian/checks/binaries:
>
> if ($info->field('source') ne 'zlib' and $info->field('source') ne
> 'klibc'
> and $strings =~ /(?:in|de)flate (?:d[ w.-]{1,20}[w.-])/m) {
> tag "embedded-zlib", $file;
> }
Thanks to everyone for this information! The embedded-zlib error which is
overriden in nearly every package which uses FPC seems to be a
false-positive in Lintian.
Russ Albery writes about this:
----------
This is generally a false positive in that this is not the problem that
Lintian is trying to diagnose (although I don't understand why it only
sometimes shows up in builds of easymp3gain). I'm trying to figure out a
good way of having Lintian avoid this problem.

I wonder if we can trigger off of that leading 4 to suppress this tag,
since that seems to be peculiar to the Pascal implementation. I think
I'll give that a try for the next Lintian release.
----------
Which means it will get fixed. (Yipee!)

Regards
Matthias Klumpp


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: f15803754f6a8b8b2706f7de7f506ba2@mb8-2.1blu.de">http://lists.debian.org/f15803754f6a8b8b2706f7de7f506ba2@mb8-2.1blu.de
 
Old 04-14-2010, 10:28 AM
Florian Weimer
 
Default How does lintian detect embedded-zlib?

* Matthias Klumpp:

> Russ Albery writes about this:
> ----------
> This is generally a false positive in that this is not the problem that
> Lintian is trying to diagnose (although I don't understand why it only
> sometimes shows up in builds of easymp3gain). I'm trying to figure out a
> good way of having Lintian avoid this problem.
>
> I wonder if we can trigger off of that leading 4 to suppress this tag,
> since that seems to be peculiar to the Pascal implementation. I think
> I'll give that a try for the next Lintian release.
> ----------

The leading "4" comes from the Pascal length of the string. If you
include this check, you should match against the full string,
verbatim, to avoid false negatives.

Or the FPC folks could alter the copyright notice to indicate that
this is a reimplementation. In a certain sense, this is not even a
false positive because the code appears to be rather literal
translation. There are other ways to detect zlib copies, but those
would detect this one, too.


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87ljcqpbtu.fsf@mid.deneb.enyo.de">http://lists.debian.org/87ljcqpbtu.fsf@mid.deneb.enyo.de
 

Thread Tools




All times are GMT. The time now is 09:04 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org