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

Bug#575447: [Fwd: Re: Bug#575447: lintian: Please add a warning in a .jar is not in /usr/share/java/]



I see I accidentally failed to send this to the bug report

-------- Original Message --------
Subject: Re: Bug#575447: lintian: Please add a warning in a .jar is not
in /usr/share/java/
Date: Thu, 25 Mar 2010 22:49:05 +0100
From: Niels Thykier <niels@thykier.net>
To: Sylvestre Ledru <sylvestre@debian.org>
References: <[🔎] 4BABCB51.9080301@thykier.net>
<[🔎] 1269550852.5310.262.camel@zlarin>

Sylvestre Ledru wrote:
> Le jeudi 25 mars 2010 à 21:45 +0100, Niels Thykier a écrit :
>> Hi
>>
>> I am not sure I can support this. There has been an interest in allowing
>> a package to install "private" jar files in /usr/share/<pkg>/.
>>
>> Though jar files beneath /usr/lib/ is *usually* a problem (the swt jars
>> are known exceptions). Though I think these are so rare that an override
>> is in order for these. Adding a warning for jars beneath /usr/lib/ will
>> cause a warning explosion in eclipse, but I am okay with that! I suspect
>> quite a few of them can be moved to /usr/share/ and a lintian warning
>> will serve as a good reminder of that.
> I am not sure to follow you. In the first paragraph, you say you do not
> agree and in the second, reading between the lines, I have the feeling
> you think it might be relevant. Am I wrong ?
> 

Hi

I agree with the need for a warning for jars being in weird places, but
I disagree that a jar file beneath "/usr/share/<pkg>/" should trigger a
warning (e.g I am okay with a warning for anywhere but /usr/share/java
and /usr/share/<pkg>/).
  Consider (e.g.) ant uses symlinks from /usr/share/ant/lib/ into
/usr/share/java/, so /usr/share/<pkg> (and beneath) should definitely be
allowed.
  Though there are more valid exceptions: maven has a public
"repository" that packages are encouraged to install their jars in (or
symlinks to them) beneath /usr/share/maven-repo.

The second paragraph was more informational to say that we have rare
cases where /usr/lib/java or /usr/lib/<pkg> is the correct location for
a jar-file (e.g. when storing native pointers in java code).
  Though I believe these to be so rare that it would be acceptable to
force packages legally shipping jars beneath /usr/lib/ to add an override.

That being said. Java Virtual Machines are allowed to ship jar files
beneath /usr/lib/jvm/${dir}/ (${dir} does not equal package name).

Also, I think we should allow a symlink in /usr/lib/ to point to a jar
file in a valid location beneath /usr/share. Java projects usually do
not care about "correct file system layouts" - patching all ~1638 jars
to respect FHS is not just not feasible [1]!

> BTW, I am just asking for a warning, not an error ;)
> 
> Sylvestre
> 

Actually, I think jars beneath /usr/lib/ might be good candidate for an
error (that can be overridden). Java is supposed to be arch:all and thus
so should jar files. Personally I only know one valid exception
(swt.jar)[2].

~Niels

[1] Generated via:
apt-file search .jar | grep -v /usr/share/java | grep -v /usr/lib/jvm |
grep -E .jar\$ | grep -v /usr/share | wc -l

The number may be inflated since I get data from testing and unstable
and some of these may just be symlinks.

[2] Though due to symlinks, this may trigger more than one warning/error.



Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: