[libvirt] [PATCH] Fix timebomb in LIBVIRT_VERSION_INFO calculation

Eric Blake eblake at redhat.com
Fri Aug 10 18:26:35 UTC 2012


On 08/10/2012 11:51 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> The way LIBVIRT_VERSION_INFO is calculated has a timebomb that
> will cause us to accidentally break soname when we change the
> major version number to a non-zero value !
> 
> Given CURRENT:REVISION:AGE, libtool will generate
> 
>    libvirt.so.($CURRENT-$AGE).$AGE.$REVISION
> 
> We set CURRENT to be MAJOR+MINOR and AGE to $MINOR, so as
> soon as MAJOR changes to non-zero, we get libvirt.so.1
> as the soname, eg  1.3.9 would create libvirt.so.1.3.9
> Looks natural but is not ABI compatible with libvirt.so.0.x.y
> 
> The fix is to set CURRENT to always be exactly the same
> as AGE. We want to have the major version reflected in
> the so symlinks though. So then we set AGE to MAJOR*1000+MINOR
> eg, so 1.3.9 would create libvirt.so.0.1003.9 and libvirt
> 2.51.3 would create libvirt.so.0.2051.3

ACK - existing releases will still use the same schema under either
formulation, while the new formulation is future-extensible to a new major.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120810/5aec1527/attachment-0001.sig>


More information about the libvir-list mailing list