From: E. Scott Daniels Date: Thu, 19 Mar 2020 03:50:57 +0000 (-0400) Subject: Fix problem with RPM install X-Git-Tag: 3.6.1^0 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=0949fab82cf3a6b6ff52ed3936984fb0fa486430;p=ric-plt%2Flib%2Frmr.git Fix problem with RPM install The additon of the health check supplemental application was causing the RPM install to fail because of a misconception that a library in the package wasn't already installed. This change attempts to address this by hard linking the RMR library (.a) into the supplemental applicaiton such that RPM won't assume a depenendency. Signed-off-by: E. Scott Daniels Change-Id: If9b70bed14a7994c517dc514c7963488301c8206 --- diff --git a/CHANGES_CORE.txt b/CHANGES_CORE.txt index ba701f4..33e2670 100644 --- a/CHANGES_CORE.txt +++ b/CHANGES_CORE.txt @@ -5,6 +5,9 @@ # API and build change and fix summaries. Doc correctsions # and/or changes are not mentioned here; see the commit messages. +2020 March 19; version 3.6.1 + Fix problem with RPM package install + 2020 March 18; version 3.6.0 Add message types to support traffic steering diff --git a/CMakeLists.txt b/CMakeLists.txt index d57ddbc..141fb18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,7 @@ cmake_minimum_required( VERSION 3.5 ) set( major_version "3" ) # should be automatically populated from git tag later, but until CI process sets a tag we use this set( minor_version "6" ) -set( patch_level "0" ) +set( patch_level "1" ) set( install_root "${CMAKE_INSTALL_PREFIX}" ) set( install_inc "include/rmr" ) @@ -276,15 +276,15 @@ set_target_properties( rmr_si_shared SOVERSION ${major_version} VERSION ${major_version}.${minor_version}.${patch_level} ) -# we only build/export the static archive (.a) if generating a dev package -if( DEV_PKG ) - add_library( rmr_si_static STATIC "$;$" ) - set_target_properties( rmr_si_static - PROPERTIES - OUTPUT_NAME "rmr_si" - SOVERSION ${major_version} - VERSION ${major_version}.${minor_version}.${patch_level} ) -endif() +# even if not generating a development package we still need to generate the .a so that health check +# can link against it to avoid RPM install issues. +# +add_library( rmr_si_static STATIC "$;$" ) +set_target_properties( rmr_si_static + PROPERTIES + OUTPUT_NAME "rmr_si" + SOVERSION ${major_version} + VERSION ${major_version}.${minor_version}.${patch_level} ) # if externals need to be built, then we must force them to be built first by depending on them if( need_ext ) @@ -365,6 +365,9 @@ IF( EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake" ) set( CPACK_DEBIAN_PACKAGE_NAME ${deb_pkg_name} ) set( CPACK_RPM_PACKAGE_NAME ${rpm_pkg_name} ) + # auto dependency checking makes the RPM install fail, see NOTES + set( CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION="/usr/local /usr/local/bin /usr/local/lib" ) + set( CPACK_set_DESTDIR "on" ) set( CPACK_PACKAGING_INSTALL_PREFIX "${install_root}" ) set( CPACK_GENERATOR "${pkg_list}" ) diff --git a/src/rmr/common/CMakeLists.txt b/src/rmr/common/CMakeLists.txt index 35833bf..7b9ebf3 100644 --- a/src/rmr/common/CMakeLists.txt +++ b/src/rmr/common/CMakeLists.txt @@ -38,6 +38,6 @@ if( DEV_PKG ) include/rmr_symtab.h include/rmr_logging.h include/RIC_message_types.h - DESTINATION ${install_root}/${install_inc} + DESTINATION ${install_inc} ) endif() diff --git a/src/support/CMakeLists.txt b/src/support/CMakeLists.txt index 0147234..f3124f5 100644 --- a/src/support/CMakeLists.txt +++ b/src/support/CMakeLists.txt @@ -19,7 +19,8 @@ # build support tools and setup for their install add_executable( health_ck health_ck.c ) -target_link_libraries( health_ck rmr_si_shared;pthread;m ) +add_dependencies( health_ck rmr_si_static ) +target_link_libraries( health_ck rmr_si_static;pthread;m ) include_directories( ${CMAKE_SOURCE_DIR}/src/rmr/common/include ) @@ -28,7 +29,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/rmr/common/include ) if( NOT DEV_PKG ) install( TARGETS health_ck - DESTINATION ${install_root}/bin + DESTINATION bin ) endif()