Review Swap with 3 packages

Hans de Goede hdegoede at redhat.com
Thu May 16 07:47:21 UTC 2013


Hi,

On 05/15/2013 05:33 PM, Sandro Mani wrote:
>
> On 15.05.2013 17:24, Christopher Meng wrote:
>> I've noticed it....
>>
>> How to solve it?
>>
> See https://fedoraproject.org/wiki/Packaging:Conflicts#Library_Name_Conflicts

Erm, no the problem here is not a name conflict, but that
the library simple is not being created properly (which
could be a problem with upstream's build system).

Normally a library would have a versioned soname, and filename,
ie, the real lib file would be:

libfoo.so.1.0.1

And then there would be a symlink with the versioned soname:

libfoo.so.1 -> libfoo.so.1.0.1

Which gets used by ld.so during dynamic linking

And an versioned symlink:

libfoo.so -> libfoo.so.1.0.1

Which gets used by ldd for the linking during the build.

The idea here is that if the library API changes, it becomes:
libfoo.so.2.0.0
libfoo.so.2 -> libfoo.so.2.0.0
libfoo.so   -> libfoo.so.2.0.0

And then you can install both versions, so that you can use
both apps linked against the old and new version, but
only one -devel package, as there can be only 1 unversioned
symlink for ldd, so installing both + the -devel for the
newest one would have:

libfoo.so.1.0.1
libfoo.so.1 -> libfoo.so.1.0.1
libfoo.so.2.0.0
libfoo.so.2 -> libfoo.so.2.0.0
libfoo.so   -> libfoo.so.2.0.0

And any newly build binaries would get linked against the
new version, but old binaries will still run.

If upstream simply generates a libfoo.so as the one and
only single file, they are doing it wrong!

This likely also means that they are breaking ABI all the
time, as they clearly have no notion of this. In this
case I would advice to build the library using libtools
-release argument with the package version when linking
(assuming they are using libtool).

So then for a tarbal version of 3.5.1 you would get a:

libfoo-3.5.1.so file with its soname identical to the file

and when upgrading to 3.5.2 it would change to: libfoo-3.5.2.so
and all packages using it will thus break (as the soname is
used for finding the lib when running the binary), and will
need to be rebuild. Which is a good thing in this case, since
the ABI may have changed ...

Regards,

Hans


More information about the devel mailing list