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

Re: Is the Debian dependency system broken? (wget vs libgnutls-deb0-28)

Vincent Bernat <bernat@debian.org> writes:

> In libbsd, I see that you started with LIBBSD_0.0. Does this mean libbsd
> has always used symbol versioning? Otherwise, the start point would be
> to use the previous SONAME (computed from the previous -version-info),
> right?

There are a lot of really complex things you can do with versioning and
cases where that version number is meaningful, but for the vast majority
of libraries, I recommend not worrying about it and just always using some
simple transform of the SONAME as the version for all symbols in the
library.  When you bump the SONAME, bump all the symbol versions.  When
you introduce a new symbol, use the SONAME as the symbol version.

This is not strictly correct in that the symbol version doesn't correspond
to a specific API (you're adding new symbols with the same symbol version
as old symbols), but most of the functionality you lose is just meaningful
error messages when running new binaries against too-old versions of the
shared library.  And it's way simpler to implement.

I've used the "fully correct" symbol versioning on some projects and found
that I was generally incrementing the symbol version on just about
everything when I changed SONAMEs anyway, and could have saved a lot of
maintenance overhead by just using this approach.  I wasn't getting much
benefit from being more precise.

Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>

Reply to: