[getdns-users] [PATCH] Fix libversion numbering
Willem Toorop
willem at nlnetlabs.nl
Tue May 12 16:54:15 CEST 2015
Hi Daniel and others interested in .so versioning.
I have to admit that my initial willingness to blindly agree has been
tempered somewhat when I was notified of the fact that the .so version
actually does increment on FreeBSD.
Op 30-04-15 om 12:00 schreef Willem Toorop:
>> This is worked around in 0.1.8 by another change to GETDNS_LIBVERSION,
>> but the change isn't correct either, since interfaces have been added
>> again (in partcular, the GETDNS_TRANSPORT_TLS_* constants have been
>> added, which affects the API at least, for tools trying to compile
>> against the newer version).
It affects the API, but not the ABI. Since .so versions are really
about the ABI, I am now fairly reluctant to increase current when only
constants are added. I believe the addition of a constant is considered
a source code change in the context of libtool and only the revision
needs to be updated.
So based on the exposed symbols in the .so, I've done the following
adaptation to configure.ac.
diff --git a/configure.ac b/configure.ac
index 6e321ee..b1efccd 100755
--- a/configure.ac
+++ b/configure.ac
@@ -56,10 +56,11 @@ GETDNS_COMPILATION_COMMENT="AC_PACKAGE_STRING
configured on $CURRENT_DATE for th
# getdns-0.1.4 had libversion 0:0:0
# getdns-0.1.5 had libversion 1:0:0
# getdns-0.1.6 had libversion 1:1:0
-# getdns-0.1.7 had libversion 1:2:1 (but should have had 2:2:1)
-# getdns-0.1.8 had libversion 1:3:0 (but should have had 3:3:2)
+# getdns-0.1.7 had libversion 1:2:1 (but should have had 2:0:1)
+# getdns-0.1.8 had libversion 1:3:0 (but should have had 2:1:1)
+# getdns-0.1.9 will have libversion 2:2:1
#
-GETDNS_LIBVERSION=3:3:2
+GETDNS_LIBVERSION=2:2:1
AC_SUBST(GETDNS_COMPILATION_COMMENT)
AC_SUBST(GETDNS_LIBVERSION)
-- Willem
>>
>> Note that the commentary in configure.ac about how to update
>> libversion is correct up to a point, but then breaks things badly.
>> This patch removes that as well.
>>
>> Here is the canonical reference for how to update libversion:
>>
>> https://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
>> ---
>> configure.ac | 10 +++-------
>> 1 file changed, 3 insertions(+), 7 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index 6e98e01..6e321ee 100755
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -52,18 +52,14 @@ GETDNS_COMPILATION_COMMENT="AC_PACKAGE_STRING configured on $CURRENT_DATE for th
>> # if any interfaces have been added since the last public release then increment age
>> # if any interfaces have been removed or changed since the last public release then
>> # set age to 0
>> -# if api unchanged: no changes
>> -# if api broken: current++ ; revision = 0; age = 0
>> -# if programs compiled against existing library work and link with new
>> -# version of library with new binary api: revision++; age++
>> #
>> # getdns-0.1.4 had libversion 0:0:0
>> # getdns-0.1.5 had libversion 1:0:0
>> # getdns-0.1.6 had libversion 1:1:0
>> -# getdns-0.1.7 had libversion 1:2:1
>> -# getdns-0.1.8 will have libversion 1:3:0
>> +# getdns-0.1.7 had libversion 1:2:1 (but should have had 2:2:1)
>> +# getdns-0.1.8 had libversion 1:3:0 (but should have had 3:3:2)
>> #
>> -GETDNS_LIBVERSION=1:3:0
>> +GETDNS_LIBVERSION=3:3:2
>>
>> AC_SUBST(GETDNS_COMPILATION_COMMENT)
>> AC_SUBST(GETDNS_LIBVERSION)
>>
>
> _______________________________________________
> Users mailing list
> Users at getdnsapi.net
> http://getdnsapi.net/mailman/listinfo/users
>
More information about the Users
mailing list