diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2021-03-16 07:27:32 +0100 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2021-03-16 07:40:58 +0100 |
commit | 83d1eddd100de4cbf6908d2154b8122ab7093a02 (patch) | |
tree | 8d2b01b43174d752626bfa0be69b2b1228b46d9b | |
parent | 3ba70ac91d2662e4c4401743e3d32a4913419716 (diff) | |
download | acl-83d1eddd100de4cbf6908d2154b8122ab7093a02.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 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 <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 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 |