From 83d1eddd100de4cbf6908d2154b8122ab7093a02 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Tue, 16 Mar 2021 07:27:32 +0100 Subject: Fix libtool library versioning regression LT_REVISION was computed from PACKAGE_VERSION by stripping the dots from PACKAGE_VERSION. This caused LT_REVISION to change from 2253 down to 230 when the version changed from 2.2.53 to 2.3.0. This broke ldconfig versioning and caused the library symlinks to break after a package update. https://bugzilla.redhat.com/1938459#c9 Reported by: Kamil Dudka --- configure.ac | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index cf41cab..2f09c57 100644 --- a/configure.ac +++ b/configure.ac @@ -43,7 +43,12 @@ AS_IF([test "x$enable_debug" = "xyes"], [CPPFLAGS="$CPPFLAGS -DNDEBUG"]) dnl Automatically increment the revision for every release. -LT_REVISION=$(echo "${PACKAGE_VERSION}" | tr -d .) +set -- $(IFS=.; echo ${PACKAGE_VERSION}) +if test $# -ne 3 -o ${#1} -gt 1 -o ${#2} -gt 1 -o ${#3} -gt 2; then + echo "This PACKAGE_VERSION breaks LT_REVISION" >&2 + exit 1 +fi +LT_REVISION=$(printf "%d%d%02d" "$1" "$2" "$3") AC_SUBST(LT_REVISION) AC_PACKAGE_NEED_ATTR_ERROR_H -- cgit v1.2.1