Re: JNI shared objects in %{_prefix}/lib

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

 



On Thu, Oct 7, 2021 at 11:08 AM Mat Booth <fedora@xxxxxxxxxxxxxx> wrote:
>
> On Thu, 7 Oct 2021 at 07:34, Mikolaj Izdebski <mizdebsk@xxxxxxxxxx> wrote:
> >
> > Hello,
> >
> > I want to propose updating Java Packaging Guidelines [1] to allow
> > installation of JNI shared objects in %{_prefix}/lib/%{name} or in
> > %{_libdir}/%{name}, according to packager preference.
> >
> > %{_libdir} expands to either /usr/lib or /usr/lib64 (depending on
> > system architecture), while %{_prefix}/lib always expands to /usr/lib.
> > To see what %{_libdir} expands to on each platform, you can run: grep
> > %_libdir -r /usr/lib/rpm/platform/
> >
> > Currently Java Packaging Guidelines require all packages to install
> > JNI shared objects in %{_libdir}/%{name}, which causes issues for
> > noarch packages that want to refer to such shared objects. For example
> > Maven needs to install a symlink to libjansi.so. Since Maven is a
> > noarch package, the symlink must technically point to one fixed
> > location, but libjansi.so ought to be installed in different locations
> > on different architectures. Moving libjansi.so to one location across
> > all architectures solves this problem. An alternative solution
> > involves usage of a ghost symlink manipulated by scriplets, which in
> > my opinion is an inferior solution.
> >
> > Java has been granted multilib exemption by FESCo [2], therefore I
> > would like to allow installation of JNI shared objects in
> > %{_prefix}/lib/%{name} or %{_libdir}/%{name}.
> >
> > Does anyone have any objections or feedback before I go with this
> > request to FPC?
> >
> > [1] https://docs.fedoraproject.org/en-US/packaging-guidelines/Java/
> > [2] https://pagure.io/fesco/issue/961
>
> Could it not be argued that JNI objects should *always* be in
> %{_prefix}/lib because Java itself is not multilib-aware?.

Indeed, myself I would always put them in %{_prefix}/lib in most (if
not all) cases, but there may be reasons for putting them in
%{_libdir}, for example when JNI code is only part of otherwise
multilib-aware package and you want to avoid file conflicts.

--
Mikolaj

>
> --
> Mat Booth
> http://fedoraproject.org/get-fedora
>
_______________________________________________
java-devel mailing list -- java-devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to java-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Red Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux