Commit 23af0529 authored by Ondřej Surý's avatar Ondřej Surý

Use -release instead of -version-info for internal library SONAMEs

The BIND 9 libraries are considered to be internal only and hence the
API and ABI changes a lot.  Keeping track of the API/ABI changes takes
time and it's a complicated matter as the safest way to make everything
stable would be to bump any library in the dependency chain as in theory
if libns links with libdns, and a binary links with both, and we bump
the libdns SOVERSION, but not the libns SOVERSION, the old libns might
be loaded by binary pulling old libdns together with new libdns loaded
by the binary.  The situation gets even more complicated with loading
the plugins that have been compiled with few versions old BIND 9
libraries and then dynamically loaded into the named.

We are picking the safest option possible and usable for internal
libraries - instead of using -version-info that has only a weak link to
BIND 9 version number, we are using -release libtool option that will
embed the corresponding BIND 9 version number into the library name.

That means that instead of libisc.so.1608 (as an example) the library
will now be named libisc-9.16.10.so.
parent e7b7c12a
Pipeline #61058 failed with stages
in 18 minutes and 11 seconds
# generated automatically by aclocal 1.16.2 -*- Autoconf -*-
# generated automatically by aclocal 1.16.3 -*- Autoconf -*-
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
......
This diff is collapsed.
......@@ -2398,30 +2398,9 @@ BIND9_CONFIGARGS="`echo $BIND9_CONFIGARGS | sed 's/^ //'`"
BIND9_CONFIGARGS="CONFIGARGS=${BIND9_CONFIGARGS}"
AC_SUBST(BIND9_CONFIGARGS)
AC_SUBST_FILE(LIBISC_API)
LIBISC_API="$srcdir/lib/isc/api"
AC_SUBST_FILE(LIBISCCC_API)
LIBISCCC_API="$srcdir/lib/isccc/api"
AC_SUBST_FILE(LIBISCCFG_API)
LIBISCCFG_API="$srcdir/lib/isccfg/api"
AC_SUBST_FILE(LIBDNS_API)
LIBDNS_API="$srcdir/lib/dns/api"
AC_SUBST_FILE(LIBDNS_MAPAPI)
LIBDNS_MAPAPI="$srcdir/lib/dns/mapapi"
AC_SUBST_FILE(LIBBIND9_API)
LIBBIND9_API="$srcdir/lib/bind9/api"
AC_SUBST_FILE(LIBIRS_API)
LIBIRS_API="$srcdir/lib/irs/api"
AC_SUBST_FILE(LIBNS_API)
LIBNS_API="$srcdir/lib/ns/api"
#
# Configure any DLZ drivers.
#
......
......@@ -13,8 +13,6 @@ top_srcdir = @top_srcdir@
VERSION=@BIND9_VERSION@
@LIBBIND9_API@
@BIND9_MAKE_INCLUDES@
CINCLUDES = -I. ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISC_INCLUDES} \
......@@ -50,9 +48,6 @@ TARGETS = timestamp
version.@O@: version.c
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
-DVERSION=\"${VERSION}\" \
-DLIBINTERFACE=${LIBINTERFACE} \
-DLIBREVISION=${LIBREVISION} \
-DLIBAGE=${LIBAGE} \
-c ${srcdir}/version.c
libbind9.@SA@: ${OBJS}
......@@ -62,7 +57,7 @@ libbind9.@SA@: ${OBJS}
libbind9.la: ${OBJS} ${ISCCFGDEPLIBS} ${ISCDEPLIBS} ${DNSDEPLIBS}
${LIBTOOL_MODE_LINK} \
${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libbind9.la -rpath ${libdir} \
-version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \
-release "${VERSION}" \
${OBJS} ${NSLIBS} ${DNSLIBS} ${ISCCFGLIBS} ${ISCLIBS} \
@DNS_CRYPTO_LIBS@ ${LIBS}
......
# LIBINTERFACE ranges
# 9.6: 50-59, 110-119
# 9.7: 60-79
# 9.8: 80-89, 120-129
# 9.9: 90-109, 170-179
# 9.9-sub: 130-139, 150-159, 200-209
# 9.10: 140-149, 190-199
# 9.10-sub: 180-189
# 9.11: 160-169,1100-1199
# 9.12: 1200-1299
# 9.13/9.14: 1300-1499
# 9.15/9.16: 1500-1699
LIBINTERFACE = 1600
LIBREVISION = 6
LIBAGE = 0
......@@ -14,7 +14,3 @@
#include <bind9/version.h>
const char bind9_version[] = VERSION;
const unsigned int bind9_libinterface = LIBINTERFACE;
const unsigned int bind9_librevision = LIBREVISION;
const unsigned int bind9_libage = LIBAGE;
......@@ -14,7 +14,3 @@
#include <bind9/version.h>
LIBBIND9_EXTERNAL_DATA const char bind9_version[] = VERSION;
LIBBIND9_EXTERNAL_DATA const unsigned int bind9_libinterface = LIBINTERFACE;
LIBBIND9_EXTERNAL_DATA const unsigned int bind9_librevision = LIBREVISION;
LIBBIND9_EXTERNAL_DATA const unsigned int bind9_libage = LIBAGE;
......@@ -20,8 +20,6 @@ VERSION=@BIND9_VERSION@
@LIBDNS_MAPAPI@
@LIBDNS_API@
@BIND9_MAKE_INCLUDES@
USE_ISC_SPNEGO = @USE_ISC_SPNEGO@
......@@ -137,9 +135,6 @@ version.@O@: version.c
-DVERSION=\"${VERSION}\" \
-DMAJOR=\"${MAJOR}\" \
-DMAPAPI=\"${MAPAPI}\" \
-DLIBINTERFACE=${LIBINTERFACE} \
-DLIBREVISION=${LIBREVISION} \
-DLIBAGE=${LIBAGE} \
-c ${srcdir}/version.c
libdns.@SA@: ${OBJS}
......@@ -149,7 +144,7 @@ libdns.@SA@: ${OBJS}
libdns.la: ${OBJS}
${LIBTOOL_MODE_LINK} \
${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libdns.la -rpath ${libdir} \
-version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \
-release "${VERSION}" \
${OBJS} ${ISCLIBS} @DNS_CRYPTO_LIBS@ ${LIBS}
include: gen
......
# LIBINTERFACE ranges
# 9.6: 50-59, 110-119
# 9.7: 60-79
# 9.8: 80-89, 120-129
# 9.9: 90-109, 170-179
# 9.9-sub: 130-139, 150-159, 200-209
# 9.10: 140-149, 190-199
# 9.10-sub: 180-189
# 9.11: 160-169,1100-1199
# 9.12: 1200-1299
# 9.13/9.14: 1300-1499
# 9.15/9.16: 1500-1699
LIBINTERFACE = 1610
LIBREVISION = 0
LIBAGE = 0
......@@ -16,7 +16,3 @@
const char dns_version[] = VERSION;
const char dns_major[] = MAJOR;
const char dns_mapapi[] = MAPAPI;
const unsigned int dns_libinterface = LIBINTERFACE;
const unsigned int dns_librevision = LIBREVISION;
const unsigned int dns_libage = LIBAGE;
......@@ -16,7 +16,3 @@
LIBDNS_EXTERNAL_DATA const char dns_version[] = VERSION;
LIBDNS_EXTERNAL_DATA const char dns_major[] = MAJOR;
LIBDNS_EXTERNAL_DATA const char dns_mapapi[] = MAPAPI;
LIBDNS_EXTERNAL_DATA const unsigned int dns_libinterface = LIBINTERFACE;
LIBDNS_EXTERNAL_DATA const unsigned int dns_librevision = LIBREVISION;
LIBDNS_EXTERNAL_DATA const unsigned int dns_libage = LIBAGE;
......@@ -13,8 +13,6 @@ top_srcdir = @top_srcdir@
VERSION=@BIND9_VERSION@
@LIBIRS_API@
@BIND9_MAKE_INCLUDES@
CINCLUDES = -I. -I./include -I${srcdir}/include \
......@@ -60,9 +58,6 @@ TARGETS = timestamp
version.@O@: version.c
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
-DVERSION=\"${VERSION}\" \
-DLIBINTERFACE=${LIBINTERFACE} \
-DLIBREVISION=${LIBREVISION} \
-DLIBAGE=${LIBAGE} \
-c ${srcdir}/version.c
libirs.@SA@: ${OBJS} version.@O@
......@@ -72,7 +67,7 @@ libirs.@SA@: ${OBJS} version.@O@
libirs.la: ${OBJS} version.@O@
${LIBTOOL_MODE_LINK} \
${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libirs.la -rpath ${libdir} \
-version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \
-release "${VERSION}" \
${OBJS} version.@O@ ${ISCLIBS} ${DNSLIBS} ${ISCCFGLIBS} ${LIBS}
timestamp: libirs.@A@
......
# LIBINTERFACE ranges
# 9.6: 50-59, 110-119
# 9.7: 60-79
# 9.8: 80-89, 120-129
# 9.9: 90-109, 170-179
# 9.9-sub: 130-139, 150-159, 200-209
# 9.10: 140-149, 190-199
# 9.10-sub: 180-189
# 9.11: 160-169,1100-1199
# 9.12: 1200-1299
# 9.13/9.14: 1300-1499
# 9.15/9.16: 1500-1699
LIBINTERFACE = 1601
LIBREVISION = 0
LIBAGE = 0
......@@ -14,7 +14,3 @@
#include <irs/version.h>
const char irs_version[] = VERSION;
const unsigned int irs_libinterface = LIBINTERFACE;
const unsigned int irs_librevision = LIBREVISION;
const unsigned int irs_libage = LIBAGE;
......@@ -14,7 +14,3 @@
#include <irs/version.h>
LIBIRS_EXTERNAL_DATA const char irs_version[] = VERSION;
LIBIRS_EXTERNAL_DATA const unsigned int irs_libinterface = LIBINTERFACE;
LIBIRS_EXTERNAL_DATA const unsigned int irs_librevision = LIBREVISION;
LIBIRS_EXTERNAL_DATA const unsigned int irs_libage = LIBAGE;
......@@ -13,8 +13,6 @@ top_srcdir = @top_srcdir@
VERSION=@BIND9_VERSION@
@LIBISC_API@
@BIND9_MAKE_INCLUDES@
CINCLUDES = -I${srcdir}/unix/include \
......@@ -97,9 +95,6 @@ TESTDIRS = @UNITTESTS@
version.@O@: version.c
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
-DVERSION=\"${VERSION}\" \
-DLIBINTERFACE=${LIBINTERFACE} \
-DLIBREVISION=${LIBREVISION} \
-DLIBAGE=${LIBAGE} \
-c ${srcdir}/version.c
libisc.@SA@: ${OBJS} ${SYMTBLOBJS}
......@@ -113,13 +108,13 @@ libisc-nosymtbl.@SA@: ${OBJS}
libisc.la: ${OBJS} ${SYMTBLOBJS}
${LIBTOOL_MODE_LINK} \
${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libisc.la -rpath ${libdir} \
-version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \
-release "${VERSION}" \
${OBJS} ${SYMTBLOBJS} ${LIBS}
libisc-nosymtbl.la: ${OBJS}
${LIBTOOL_MODE_LINK} \
${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libisc-nosymtbl.la -rpath ${libdir} \
-version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \
-release "${VERSION}" \
${OBJS} ${LIBS}
timestamp: libisc.@A@ libisc-nosymtbl.@A@
......
# LIBINTERFACE ranges
# 9.6: 50-59, 110-119
# 9.7: 60-79
# 9.8: 80-89, 120-129
# 9.9: 90-109, 170-179
# 9.9-sub: 130-139, 150-159, 200-209
# 9.10: 140-149, 190-199
# 9.10-sub: 180-189
# 9.11: 160-169,1100-1199
# 9.12: 1200-1299
# 9.13/9.14: 1300-1499
# 9.15/9.16: 1500-1699
LIBINTERFACE = 1608
LIBREVISION = 1
LIBAGE = 0
......@@ -14,7 +14,3 @@
#include <isc/version.h>
const char isc_version[] = VERSION;
const unsigned int isc_libinterface = LIBINTERFACE;
const unsigned int isc_librevision = LIBREVISION;
const unsigned int isc_libage = LIBAGE;
......@@ -14,7 +14,3 @@
#include <isc/version.h>
LIBISC_EXTERNAL_DATA const char isc_version[] = VERSION;
LIBISC_EXTERNAL_DATA const unsigned int isc_libinterface = LIBINTERFACE;
LIBISC_EXTERNAL_DATA const unsigned int isc_librevision = LIBREVISION;
LIBISC_EXTERNAL_DATA const unsigned int isc_libage = LIBAGE;
......@@ -13,8 +13,6 @@ top_srcdir = @top_srcdir@
VERSION=@BIND9_VERSION@
@LIBISCCC_API@
@BIND9_MAKE_INCLUDES@
CINCLUDES = -I. ${DNS_INCLUDES} ${ISC_INCLUDES} \
......@@ -51,9 +49,6 @@ TESTDIRS = @UNITTESTS@
version.@O@: version.c
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
-DVERSION=\"${VERSION}\" \
-DLIBINTERFACE=${LIBINTERFACE} \
-DLIBREVISION=${LIBREVISION} \
-DLIBAGE=${LIBAGE} \
-c ${srcdir}/version.c
libisccc.@SA@: ${OBJS}
......@@ -63,7 +58,7 @@ libisccc.@SA@: ${OBJS}
libisccc.la: ${OBJS}
${LIBTOOL_MODE_LINK} \
${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libisccc.la -rpath ${libdir} \
-version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \
-release "${VERSION}" \
${OBJS} ${ISCLIBS} ${LIBS}
timestamp: libisccc.@A@
......
# LIBINTERFACE ranges
# 9.6: 50-59, 110-119
# 9.7: 60-79
# 9.8: 80-89, 120-129
# 9.9: 90-109, 170-179
# 9.9-sub: 130-139, 150-159, 200-209
# 9.10: 140-149, 190-199
# 9.10-sub: 180-189
# 9.11: 160-169,1100-1199
# 9.12: 1200-1299
# 9.13/9.14: 1300-1499
# 9.15/9.16: 1500-1699
LIBINTERFACE = 1600
LIBREVISION = 2
LIBAGE = 0
......@@ -14,7 +14,3 @@
#include <isccc/version.h>
const char isccc_version[] = VERSION;
const unsigned int isccc_libinterface = LIBINTERFACE;
const unsigned int isccc_librevision = LIBREVISION;
const unsigned int isccc_libage = LIBAGE;
......@@ -14,7 +14,3 @@
#include <isccc/version.h>
LIBISCCC_EXTERNAL_DATA const char isccc_version[] = VERSION;
LIBISCCC_EXTERNAL_DATA const unsigned int isccc_libinterface = LIBINTERFACE;
LIBISCCC_EXTERNAL_DATA const unsigned int isccc_librevision = LIBREVISION;
LIBISCCC_EXTERNAL_DATA const unsigned int isccc_libage = LIBAGE;
......@@ -13,8 +13,6 @@ top_srcdir = @top_srcdir@
VERSION=@BIND9_VERSION@
@LIBISCCFG_API@
@BIND9_MAKE_INCLUDES@
CINCLUDES = -I. ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES}
......@@ -49,9 +47,6 @@ TARGETS = timestamp
version.@O@: version.c
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
-DVERSION=\"${VERSION}\" \
-DLIBINTERFACE=${LIBINTERFACE} \
-DLIBREVISION=${LIBREVISION} \
-DLIBAGE=${LIBAGE} \
-c ${srcdir}/version.c
libisccfg.@SA@: ${OBJS}
......@@ -61,7 +56,7 @@ libisccfg.@SA@: ${OBJS}
libisccfg.la: ${OBJS}
${LIBTOOL_MODE_LINK} \
${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libisccfg.la -rpath ${libdir} \
-version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \
-release "${VERSION}" \
${OBJS} ${DNSLIBS} ${ISCLIBS} ${LIBS}
timestamp: libisccfg.@A@
......
# LIBINTERFACE ranges
# 9.6: 50-59, 110-119
# 9.7: 60-79
# 9.8: 80-89, 120-129
# 9.9: 90-109, 170-179
# 9.9-sub: 130-139, 150-159, 200-209
# 9.10: 140-149, 190-199
# 9.10-sub: 180-189
# 9.11: 160-169,1100-1199
# 9.12: 1200-1299
# 9.13/9.14: 1300-1499
# 9.15/9.16: 1500-1699
LIBINTERFACE = 1602
LIBREVISION = 0
LIBAGE = 0
......@@ -14,7 +14,3 @@
#include <isccfg/version.h>
const char cfg_version[] = VERSION;
const unsigned int cfg_libinterface = LIBINTERFACE;
const unsigned int cfg_librevision = LIBREVISION;
const unsigned int cfg_libage = LIBAGE;
......@@ -14,7 +14,3 @@
#include <isccfg/version.h>
LIBISCCFG_EXTERNAL_DATA const char cfg_version[] = VERSION;
LIBISCCFG_EXTERNAL_DATA const unsigned int cfg_libinterface = LIBINTERFACE;
LIBISCCFG_EXTERNAL_DATA const unsigned int cfg_librevision = LIBREVISION;
LIBISCCFG_EXTERNAL_DATA const unsigned int cfg_libage = LIBAGE;
......@@ -14,8 +14,6 @@ top_srcdir = @top_srcdir@
VERSION=@BIND9_VERSION@
@BIND9_MAJOR@
@LIBNS_API@
@BIND9_MAKE_INCLUDES@
USE_ISC_SPNEGO = @USE_ISC_SPNEGO@
......@@ -62,9 +60,6 @@ version.@O@: version.c
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
-DVERSION=\"${VERSION}\" \
-DMAJOR=\"${MAJOR}\" \
-DLIBINTERFACE=${LIBINTERFACE} \
-DLIBREVISION=${LIBREVISION} \
-DLIBAGE=${LIBAGE} \
-c ${srcdir}/version.c
libns.@SA@: ${OBJS}
......@@ -74,7 +69,7 @@ libns.@SA@: ${OBJS}
libns.la: ${OBJS}
${LIBTOOL_MODE_LINK} \
${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libns.la -rpath ${libdir} \
-version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \
-release "${VERSION}" \
${OBJS} ${ISCLIBS} ${DNSLIBS} @DNS_CRYPTO_LIBS@ ${LIBS}
timestamp: libns.@A@
......
# LIBINTERFACE ranges
# 9.6: 50-59, 110-119
# 9.7: 60-79
# 9.8: 80-89, 120-129
# 9.9: 90-109, 170-179
# 9.9-sub: 130-139, 150-159, 200-209
# 9.10: 140-149, 190-199
# 9.10-sub: 180-189
# 9.11: 160-169,1100-1199
# 9.12: 1200-1299
# 9.13/9.14: 1300-1499
# 9.15/9.16: 1500-1699
LIBINTERFACE = 1606
LIBREVISION = 1
LIBAGE = 0
......@@ -14,7 +14,3 @@
#include <ns/version.h>
const char ns_version[] = VERSION;
const unsigned int ns_libinterface = LIBINTERFACE;
const unsigned int ns_librevision = LIBREVISION;
const unsigned int ns_libage = LIBAGE;
......@@ -18,7 +18,3 @@
LIBNS_EXTERNAL_DATA const char ns_version[] = VERSION;
LIBNS_EXTERNAL_DATA const char ns_major[] = MAJOR;
LIBNS_EXTERNAL_DATA const char ns_mapapi[] = MAPAPI;
LIBNS_EXTERNAL_DATA const unsigned int ns_libinterface = LIBINTERFACE;
LIBNS_EXTERNAL_DATA const unsigned int ns_librevision = LIBREVISION;
LIBNS_EXTERNAL_DATA const unsigned int ns_libage = LIBAGE;
......@@ -2476,9 +2476,7 @@ sub makeversion {
"isccc" => "LIBISCCC_EXPORTS",
"isccfg" => "LIBISCCFG_EXPORTS",
"ns" => "LIBNS_EXPORTS");
my @VersionNames = ("LIBINTERFACE", "LIBREVISION", "LIBAGE");
my $Version;
my %ApiVersions;
my $Mapapi;
my $versionfile = "versions.h";
my $versionpath = "..\\$versionfile";
......@@ -2554,30 +2552,6 @@ sub makeversion {
"#define MAJOR \"$Versions{'MAJORVER'}.$Versions{'MINORVER'}\"\n\n";
print O "#define MAPAPI \"$Mapapi\"\n\n";
my $dir;
my $apifile;
foreach $dir (@dirlist) {
$apifile = "..\\lib\\$dir\\api";
open A, $apifile || die $!;
while (<A>) {
chomp;
($data) = split(/\#/);
if ($data) {
($name, $value) = split(/=/, $data);
$name =~ s/\s+//;
$value =~ s/\s+//;
$ApiVersions{$name} = $value;
}
}
close A;
print O "\n#ifdef $LibMacros{$dir}\n";
foreach $name (@VersionNames) {
print O "#define $name\t$ApiVersions{$name}\n";
}
print O "#endif\n\n";
}
print O "#endif /* VERSIONS_H */\n";
close O;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment