Re: [PATCH designer] Adapt saner libtool versioning scheme from libvirt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 19, 2013 at 01:22:43PM +0200, Christophe Fergeau wrote:
> On Fri, Apr 19, 2013 at 10:56:05AM +0100, Daniel P. Berrange wrote:
> > 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_DESIGNER_SONUM setting for changing soname.
> > ---
> >  configure.ac | 40 +++++++++++++++++++++++++++++++++++++++-
> >  1 file changed, 39 insertions(+), 1 deletion(-)
> > 
> > diff --git a/configure.ac b/configure.ac
> > index c999826..2a55f75 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -19,9 +19,47 @@ LIBVIRT_DESIGNER_MAJOR_VERSION=`echo $VERSION | awk -F. '{print $1}'`
> >  LIBVIRT_DESIGNER_MINOR_VERSION=`echo $VERSION | awk -F. '{print $2}'`
> >  LIBVIRT_DESIGNER_MICRO_VERSION=`echo $VERSION | awk -F. '{print $3}'`
> >  LIBVIRT_DESIGNER_VERSION=$LIBVIRT_DESIGNER_MAJOR_VERSION.$LIBVIRT_DESIGNER_MINOR_VERSION.$LIBVIRT_DESIGNER_MICRO_VERSION$LIBVIRT_DESIGNER_MICRO_VERSION_SUFFIX
> > -LIBVIRT_DESIGNER_VERSION_INFO=`expr $LIBVIRT_DESIGNER_MAJOR_VERSION + $LIBVIRT_DESIGNER_MINOR_VERSION`:$LIBVIRT_DESIGNER_MICRO_VERSION:$LIBVIRT_DESIGNER_MINOR_VERSION
> >  LIBVIRT_DESIGNER_VERSION_NUMBER=`expr $LIBVIRT_DESIGNER_MAJOR_VERSION \* 1000000 + $LIBVIRT_DESIGNER_MINOR_VERSION \* 1000 + $LIBVIRT_DESIGNER_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.
> 
> libvirt-designer, libvirt-designer.so.0 rather than libvirt, libvirt.so.0
> 
> I'm not sure the "CURRENT - AGE" part is 100% accurate, looking at the
> libtool script (searching for $current), some OSes (freebsd, qnx, ..)
> seems to use just $CURRENT (not really important though)
> 
> > +#
> > +# We would, however, like the libvirt-designer version number reflected
> > +# in the so version'd symlinks, and this is based on AGE.REVISION
> > +# eg  libvirt-designer.so.0.AGE.REVISION
> > +#
> > +# Assuming we do ever want to break soname version, this can
> > +# toggled. But seriously, don't touch this, unless we explicitly
> > +# agree to break ABI on the mailing list.
> > +LIBVIRT_DESIGNER_SONUM=0
> 
> Hmm I think I remember Debian packagers complaining when we broke ABI by
> only changing symbol versioning and not changing soname (as I don't think
> symbol versions show up in .deb requires), will we be incrementing this
> every time we break ABI?

Yes, if we intentionally break ABI, then we increment SONUM and
reset all symbol versions to the current package release number.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]