From 2b092458e61b644e19860c4e28ff3c4564095814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Torrero=20Marijnissen?= Date: Mon, 23 Sep 2019 14:42:28 +0200 Subject: [PATCH] fix library versioning to avoid crash (bsc#1143182, bsc#1132977) --- configure.ac | 10 +++------- wicked.spec.in | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 8ed0e2ad2..137c64ccc 100644 --- a/configure.ac +++ b/configure.ac @@ -9,20 +9,16 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip subdir-objects]) # # Note: We consider libwicked as an internal helper library, # rather than a general purporse library with rock solid ABI. -# The program/package version and the library version do not -# correspond 1:1 with each other, the version is encoded. -# We intentionally break binary compatibility at minor level. +# We intentionally break binary compatibility at rev level. # set -- ${VERSION//./ } MAJ=$(($1)) MIN=$(($2)) REV=$(($3)) -# optional fix/patch level -FIX=0 # Calculate package (soname version) suffix for the spec file. -AC_SUBST(LIBWICKED_PACKAGE_SUFFIX, "-${MAJ}-${MIN}") -AC_SUBST(LIBWICKED_LTLINK_VERSION, "-release ${MAJ} -version-number ${MIN}:${REV}:${FIX}") +AC_SUBST(LIBWICKED_PACKAGE_SUFFIX, "-${MAJ}_${MIN}_${REV}") +AC_SUBST(LIBWICKED_LTLINK_VERSION, "-release ${MAJ}.${MIN}.${REV}") #AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([src/config.c]) diff --git a/wicked.spec.in b/wicked.spec.in index a859706b2..a2ad5bcc3 100644 --- a/wicked.spec.in +++ b/wicked.spec.in @@ -239,7 +239,7 @@ ln -sf %_sysconfdir/init.d/network ${RPM_BUILD_ROOT}%_sbindir/rcnetwork %if %{without wicked_devel} pushd $RPM_BUILD_ROOT rm -rfv \ - .%_libdir/libwicked*.so \ + .%_libdir/libwicked.so \ .%_datadir/pkgconfig/wicked.pc \ .%_mandir/man7/wicked.7* \ .%_includedir/wicked @@ -437,6 +437,6 @@ fi %files -n libwicked@LIBWICKED_PACKAGE_SUFFIX@ %defattr (-,root,root) -%_libdir/libwicked*.so.* +%_libdir/libwicked-*.so* %changelog