Mailinglist Archive: opensuse-factory (914 mails)

< Previous Next >
[opensuse-factory] Shared library policy - multiple providers for a single API/ABI
Hi,

just stumbled over an omission in the shared library packaging policy [1].

The policy gives several examples for SONAMEs and package names when there are
several versions of a library with incompatible API/ABI.

But there is no specification for libraries available in different variants,
i.e. different implementations or optimizations, with compatible ABI.

One such library is openblas, which is available as singlethreaded ("serial"),
multithreaded using pthreads, and multithreaded using openmp. These three
libraries have the same ABI and thus are interchangeable, but unfortunately
each one carries its own SONAME (libopenblas_serial.so.0,
libopenblas_pthreads.so.0, libopenblas_openmp.so.0). Any program/library
linking to libopenblas.so (linker flag -lopenblas) will end up with the
default implementation, which is either openblas_pthreads (on x86*) or
openblas_openmp (else). The library name then is fixed in both the program/
library dynamic linking as well as the rpm dependencies.

Now, it is trivial to set the SONAME for all three implementations to
libopenblas.so.0, but unfortunately rpmlint insist on the package name to be
libopenblas0 in this case, with no possibility to have different package names
for the three variants.

IMHO the policy and rpmlint should be extended to cover these cases.

My RFC:

- if there are multiple ABI compatible variants, all should have the same
SONAME (e.g. libopenblas.so.0)
- the package name starts with a package name according to the current policy,
*suffixed the the variant name* (e.g. libopenblas0_openmp).
- in case of name changes, Provides: for backwards compatibilty must be
specified.

Kind regards,

Stefan


[1] https://en.opensuse.org/
openSUSE:Shared_library_packaging_policy#Package_naming

--
Stefan Brüns / Bergstraße 21 / 52062 Aachen
home: +49 241 53809034 mobile: +49 151 50412019
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >