The packaging guidelines indicate that shared libraries should have sonames, and if not provided by upstream, packager should use a low number soname such as 0.x.y to enable easy bumping of the soname should upstream later add one. This assumes semantic versioning. If upstream does not use semantic versioning, is it reasonable to use whatever versioning scheme they use? One alternative is libtool versioning[1,2]. What to do if the versioning scheme is unclear? In particular is versioning such as: libSDL-1.2.so.0 -> libSDL-1.2.so.1.2.68 libserf-1.so.0 -> libserf-1.so.1.3.9 libutempter.so.0 -> libutempter.so.1.2.1 reasonable or should these all be libSDL-1.2.so.1 -> libSDL-1.2.so.1.2.68 libserf-1.so.1 -> libserf-1.so.1.3.9 libutempter.so.1 -> libutempter.so.1.2.1
These issues have arisen when reviewing [3]
1) https://autotools.info/libtool/version.html 2) https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.htm... 3) https://bugzilla.redhat.com/show_bug.cgi?id=2241062
V Thu, Nov 09, 2023 at 04:38:25PM +0300, Benson Muite napsal(a):
The packaging guidelines indicate that shared libraries should have sonames, and if not provided by upstream, packager should use a low number soname such as 0.x.y to enable easy bumping of the soname should upstream later add one. This assumes semantic versioning. If upstream does not use semantic versioning, is it reasonable to use whatever versioning scheme they use? One alternative is libtool versioning[1,2]. What to do if the versioning scheme is unclear? In particular is versioning such as: libSDL-1.2.so.0 -> libSDL-1.2.so.1.2.68 libserf-1.so.0 -> libserf-1.so.1.3.9 libutempter.so.0 -> libutempter.so.1.2.1 reasonable or should these all be libSDL-1.2.so.1 -> libSDL-1.2.so.1.2.68 libserf-1.so.1 -> libserf-1.so.1.3.9 libutempter.so.1 -> libutempter.so.1.2.1
As far as I know the 3-component version schema as used by libtool is irrelevant for glibc dynamic linker, hence for Fedora. The reason is that what matters for Fedora are only two files:
libSDL.so -- used at build time libSDL-1.2.so.0 -- used at run time
Whether these files are regular files or symlinks and where the symlinks point does not matter.
What matters is that a soname stored inside the first one (scanelf --soname /usr/lib64/libSDL.so) matches the later file name.
So for Fedora it's only a matter of aesthetics.
-- Petr
packaging@lists.fedoraproject.org