diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2021-03-16 07:45:29 +0100 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2021-03-16 07:45:29 +0100 |
commit | 2a4304ce9b7806d96defd70bf897048e03096f55 (patch) | |
tree | 9319e91d7fdada6ed427af7234bacaeb9d71deab | |
parent | 07b95f74cd9638fe8ca3510b19202fb55031b330 (diff) | |
download | attr-2a4304ce9b7806d96defd70bf897048e03096f55.tar.gz |
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 2448 down to
250 when the version changed from 2.4.48 to 2.5.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 <kdudka@redhat.com>
-rw-r--r-- | configure.ac | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 268783d..c664335 100644 --- a/configure.ac +++ b/configure.ac @@ -45,7 +45,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_CONFIG_COMMANDS([include/attr], |