From: "Daniel P. Berrange" <berrange@xxxxxxxxxx> The current way libtool versioning is calculated has a timebomb when the package version number changes to 1.0.0, which will cause the library soname to change. Adapt to the latest libvirt macros for libtool versioning, which use an explicit variable LIBVIRT_GLIB_SONUM setting for changing soname. --- configure.ac | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index cef5025..360c13f 100644 --- a/configure.ac +++ b/configure.ac @@ -21,9 +21,46 @@ LIBVIRT_GLIB_MAJOR_VERSION=`echo $VERSION | awk -F. '{print $1}'` LIBVIRT_GLIB_MINOR_VERSION=`echo $VERSION | awk -F. '{print $2}'` LIBVIRT_GLIB_MICRO_VERSION=`echo $VERSION | awk -F. '{print $3}'` LIBVIRT_GLIB_VERSION=$LIBVIRT_GLIB_MAJOR_VERSION.$LIBVIRT_GLIB_MINOR_VERSION.$LIBVIRT_GLIB_MICRO_VERSION$LIBVIRT_GLIB_MICRO_VERSION_SUFFIX -LIBVIRT_GLIB_VERSION_INFO=`expr $LIBVIRT_GLIB_MAJOR_VERSION + $LIBVIRT_GLIB_MINOR_VERSION`:$LIBVIRT_GLIB_MICRO_VERSION:$LIBVIRT_GLIB_MINOR_VERSION LIBVIRT_GLIB_VERSION_NUMBER=`expr $LIBVIRT_GLIB_MAJOR_VERSION \* 1000000 + $LIBVIRT_GLIB_MINOR_VERSION \* 1000 + $LIBVIRT_GLIB_MICRO_VERSION` +# In libtool terminology we need to figure out: +# +# CURRENT +# The most recent interface number that this library implements. +# +# REVISION +# The implementation number of the CURRENT interface. +# +# AGE +# The difference between the newest and oldest interfaces that this +# library implements. +# +# In other words, the library implements all the interface numbers +# in the range from number `CURRENT - AGE' to `CURRENT'. +# +# Libtool assigns the soname version from `CURRENT - AGE', and we +# don't want that to ever change in libvirt. ie it must always be +# zero, to produce libvirt.so.0. +# +# We would, however, like the libvirt-glib version number reflected +# in the so version'd symlinks, and this is based on AGE.REVISION +# eg libvirt-glib.so.0.AGE.REVISION +# +# Assuming we do ever want to break soname version, this can +# toggled. But seriously, don't ever touch this. +LIBVIRT_GLIB_SONUM=0 + +# The following examples show what libtool will do +# +# Input: 0.9.14 -> libvirt-glib.so.0.9.14 +# Input: 1.0.0 -> libvirt-glib.so.0.1000.0 +# Input: 2.5.8 -> libvirt-glib.so.0.2005.8 +# +AGE=`expr $LIBVIRT_GLIB_MAJOR_VERSION '*' 1000 + $LIBVIRT_GLIB_MINOR_VERSION` +REVISION=$LIBVIRT_GLIB_MICRO_VERSION +CURRENT=`expr $LIBVIRT_GLIB_SONUM + $AGE` +LIBVIRT_GLIB_VERSION_INFO=$CURRENT:$REVISION:$AGE + AC_SUBST([LIBVIRT_GLIB_MAJOR_VERSION]) AC_SUBST([LIBVIRT_GLIB_MINOR_VERSION]) AC_SUBST([LIBVIRT_GLIB_MICRO_VERSION]) -- 1.8.1.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list