On 10/7/21 16:14, Mikolaj Izdebski wrote:
On Thu, Oct 7, 2021 at 10:01 AM Didik Supriadi
<didiksupriadi41(a)fedoraproject.org> wrote:
> Well, I feel like this should be allowed in any case? I think most Devs
> only add Class-Path manifest attribute when they need those particular
> JAR to run their codes.
>
> Or are there any cases beffore that this is not allowed?
I don't know the reason for disallowing Class-Path. This rule existed
before I became a Fedora packager (year 2012). But I remember some
people used to have a strong opinion against Class-Path in Fedora
packages.
$ rpmlint -I class-path-in-manifest
class-path-in-manifest:
The META-INF/MANIFEST.MF file in the jar contains a hardcoded Class-Path.
These entries do not work with older Java versions and even if they do work,
they are inflexible and usually cause nasty surprises.
Ah, I think the "hardcoded" part is the reason why.
So.. it should be alright if Class-Path is determined with, for example,
`build-classpath`, right?
--
Mikolaj
> On 10/7/21 13:45, Mikolaj Izdebski wrote:
>> Hello,
>>
>> I would like to propose allowing Class-Path attribute in JAR
>> manifests, at least in some cases.
>>
>> Currently Java Packaging Guidelines [1] forbids Class-Path attributes
>> in JAR manifests. However there are certain cases when Class-Path can
>> be very useful. One such example I find it useful for is executable
>> JARs that can be symlinked from %{_libexecdir} and ran without a need
>> for wrapper shell scripts. Such JAR files are marked as executable and
>> start with a shebang line, which is treated as leading garbage and
>> therefore ignored by JAR/ZIP readers. When such JARs have dependencies
>> it's useful to be able to refer to them via Class-Path manifest
>> attribute.
>>
>> What do you think about allowing Class-Path manifest attribute? Can it
>> be allowed in any case, or in some cases only?
>>
>> [
1]https://docs.fedoraproject.org/en-US/packaging-guidelines/Java/
>> _______________________________________________
>> java-devel mailing list --java-devel(a)lists.fedoraproject.org
>> To unsubscribe send an email tojava-devel-leave(a)lists.fedoraproject.org
>> Fedora Code of
Conduct:https://docs.fedoraproject.org/en-US/project/code-of-conduct/
>> List
Guidelines:https://fedoraproject.org/wiki/Mailing_list_guidelines
>> List
Archives:https://lists.fedoraproject.org/archives/list/java-devel@lists.f...
>> Do not reply to spam on the list, report
it:https://pagure.io/fedora-infrastructure
> --
> Regards,
> Didik Supriadi (he/him)
>
https://getfedora.org
> _______________________________________________
> java-devel mailing list --java-devel(a)lists.fedoraproject.org
> To unsubscribe send an email tojava-devel-leave(a)lists.fedoraproject.org
> Fedora Code of
Conduct:https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List
Guidelines:https://fedoraproject.org/wiki/Mailing_list_guidelines
> List
Archives:https://lists.fedoraproject.org/archives/list/java-devel@lists.f...
> Do not reply to spam on the list, report it:https://pagure.io/fedora-infrastructure
--
Regards,
Didik Supriadi (he/him)
https://getfedora.org