On 2017-05-29 Nikos Mavrogiannopoulos <[email protected]> wrote:
[...]
> Thanks, I've released 4.12 addressing only that issue. It seems that
> there is already an abi check with abi-compliance-checker as part of
> the release process but unfortunately it doesn't include the so-name
> version matching as part of its tests. I'm open to suggestions for
> that.
Perhaps something like the attached patch would work? It seems to
fullfill the main purpose: Warn about soname bumps, they require a
manual confirmation. (Like editing the test or updating a variable in
configure.ac.)
cu Andreas
--
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'
--- libtasn1-6-4.12.orig/configure.ac
+++ libtasn1-6-4.12/configure.ac
@@ -99,6 +99,8 @@ if test "$gl_gcc_warnings" = yes; then
gl_WARN_ADD([-fdiagnostics-show-option])
fi
+AC_OUTPUT_COMMANDS([chmod +x tests/soname])
+
AC_CONFIG_FILES([
Makefile
doc/Makefile
@@ -112,6 +114,7 @@ AC_CONFIG_FILES([
lib/libtasn1.pc
src/Makefile
tests/Makefile
+ tests/soname
])
AC_OUTPUT
--- libtasn1-6-4.12.orig/tests/Makefile.am
+++ libtasn1-6-4.12/tests/Makefile.am
@@ -22,6 +22,8 @@ AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(to
AM_LDFLAGS = -no-install
LDADD = ../lib/libtasn1.la ../gl/libgnu.la
+DISTCLEANFILES = soname
+
EXTRA_DIST = Test_parser.asn Test_tree.asn Test_tree_asn1_tab.c mscat.asn \
Test_encoding.asn pkix.asn TestIndef.p12 choice.asn coding-decoding2.asn \
TestIndef2.p12 TestIndef3.der TestCertOctetOverflow.der \
@@ -67,7 +69,7 @@ TESTS = Test_parser Test_tree Test_encod
Test_strings Test_choice Test_encdec copynode coding-decoding2 \
strict-der Test_choice_ocsp decoding decoding-invalid-x509 \
ocsp-basic-response octet-string coding-long-oid object-id-decoding \
- spc_pe_image_data decoding-invalid-pkcs7 coding
+ spc_pe_image_data decoding-invalid-pkcs7 coding soname
TESTS_ENVIRONMENT = \
ASN1PARSER=$(srcdir)/Test_parser.asn \
--- /dev/null
+++ libtasn1-6-4.12/tests/soname.in
@@ -0,0 +1,22 @@
+#!/bin/sh
+set -e
+
+build_triplet=@build@
+host_triplet=@host@
+top_builddir=@top_builddir@
+
+if [ "${build_triplet}" != "${host_triplet}" ]; then
+ echo "cross-compiling, not running soname check." 2>&1
+ exit 77
+fi
+if ! echo "${build_triplet}" | grep linux > /dev/null ; then
+ exit 77
+fi
+if ! [ -x "$(command -v objdump)" ]; then
+ echo "objdump not available" 1>&2
+ exit 77
+fi
+
+newsoname=$(objdump -p ${top_builddir}/lib/.libs/libtasn1.so | sed -n '/^ *SONAME /s/^ *SONAME *//p')
+
+[ "${newsoname}" = "libtasn1.so.6" ]