Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package bctoolbox for openSUSE:Factory checked in at 2021-10-18 22:03:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/bctoolbox (Old) and /work/SRC/openSUSE:Factory/.bctoolbox.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bctoolbox" Mon Oct 18 22:03:26 2021 rev:25 rq:925344 version:5.0.35 Changes: -------- --- /work/SRC/openSUSE:Factory/bctoolbox/bctoolbox.changes 2021-08-02 12:04:38.965661398 +0200 +++ /work/SRC/openSUSE:Factory/.bctoolbox.new.1890/bctoolbox.changes 2021-10-18 22:03:29.094149682 +0200 @@ -1,0 +2,6 @@ +Fri Oct 15 05:40:53 UTC 2021 - Paolo Stivanin <i...@paolostivanin.com> + +- Update to 5.0.35: + * no changelog + +------------------------------------------------------------------- Old: ---- bctoolbox-5.0.3.tar.gz New: ---- bctoolbox-5.0.35.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bctoolbox.spec ++++++ --- /var/tmp/diff_new_pack.8PPLxf/_old 2021-10-18 22:03:29.654150087 +0200 +++ /var/tmp/diff_new_pack.8PPLxf/_new 2021-10-18 22:03:29.658150089 +0200 @@ -18,7 +18,7 @@ %define sover 1 Name: bctoolbox -Version: 5.0.3 +Version: 5.0.35 Release: 0 Summary: Utility library for software from Belledonne Communications License: GPL-2.0-or-later ++++++ bctoolbox-5.0.3.tar.gz -> bctoolbox-5.0.35.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.0.3/CMakeLists.txt new/bctoolbox-5.0.35/CMakeLists.txt --- old/bctoolbox-5.0.3/CMakeLists.txt 2021-07-29 14:06:35.000000000 +0200 +++ new/bctoolbox-5.0.35/CMakeLists.txt 2021-09-24 17:05:38.000000000 +0200 @@ -1,6 +1,6 @@ ############################################################################ # CMakeLists.txt -# Copyright (C) 2010-2019 Belledonne Communications, Grenoble France +# Copyright (C) 2010-2021 Belledonne Communications, Grenoble France # ############################################################################ # @@ -20,8 +20,9 @@ # ############################################################################ -cmake_minimum_required(VERSION 3.2) -set(CMAKE_MACOSX_RPATH ON) # Before cmake 3.0.0, MACOSX_RPATH was not set to ON by default - however this is no good reason to not enable it by default +# CMake 3.13 required for new Flexisip build process. +# See [CMP077](https://cmake.org/cmake/help/v3.13/policy/CMP0077.html). +cmake_minimum_required(VERSION 3.13) project(bctoolbox VERSION 5.0.0) @@ -43,6 +44,10 @@ option(ENABLE_TESTS "Enable compilation of tests" ON) option(ENABLE_PACKAGE_SOURCE "Create 'package_source' target for source archive making (CMake >= 3.11)" OFF) +# Hidden non-cache options: +# * DISABLE_BC_PACKAGE_SEARCH: skip find_package() for every BC package (bctoolbox, ortp, etc.) + + set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_EXTENSIONS NO) @@ -108,17 +113,23 @@ set(LIBS_PRIVATE "${LIBS_PRIVATE} -L${polarssl_library_path} -lpolarssl") endif() -if(ENABLE_TESTS_COMPONENT) - find_package(BcUnit CONFIG REQUIRED) - cmake_push_check_state(RESET) - list(APPEND CMAKE_REQUIRED_INCLUDES ${BCUNIT_INCLUDE_DIRS}) - list(APPEND CMAKE_REQUIRED_LIBRARIES ${BCUNIT_LIBRARIES}) - check_symbol_exists("CU_get_suite" "BCUnit/BCUnit.h" HAVE_CU_GET_SUITE) - check_symbol_exists("CU_curses_run_tests" "BCUnit/BCUnit.h" HAVE_CU_CURSES) - check_symbol_exists("CU_set_trace_handler" "BCUnit/Util.h" HAVE_CU_SET_TRACE_HANDLER) - cmake_pop_check_state() - set(TESTER_REQUIRES_PRIVATE "bcunit") -endif() +if (ENABLE_TESTS_COMPONENT) + if (NOT DISABLE_BC_PACKAGE_SEARCH) + find_package(BcUnit CONFIG REQUIRED) + cmake_push_check_state(RESET) + list(APPEND CMAKE_REQUIRED_INCLUDES ${BCUNIT_INCLUDE_DIRS}) + list(APPEND CMAKE_REQUIRED_LIBRARIES ${BCUNIT_LIBRARIES}) + check_symbol_exists("CU_get_suite" "BCUnit/BCUnit.h" HAVE_CU_GET_SUITE) + check_symbol_exists("CU_curses_run_tests" "BCUnit/BCUnit.h" HAVE_CU_CURSES) + check_symbol_exists("CU_set_trace_handler" "BCUnit/Util.h" HAVE_CU_SET_TRACE_HANDLER) + cmake_pop_check_state() + set(TESTER_REQUIRES_PRIVATE "bcunit") + else () + set(HAVE_CU_GET_SUITE ON) + set(HAVE_CU_SET_TRACE_HANDLER ON) + set(TESTER_REQUIRES_PRIVATE "bcunit") + endif () +endif () configure_file(${CMAKE_CURRENT_SOURCE_DIR}/bctoolbox.pc.in ${CMAKE_CURRENT_BINARY_DIR}/bctoolbox.pc) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bctoolbox.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.0.3/cmake/BcToolboxCMakeUtils.cmake new/bctoolbox-5.0.35/cmake/BcToolboxCMakeUtils.cmake --- old/bctoolbox-5.0.3/cmake/BcToolboxCMakeUtils.cmake 2021-07-29 14:06:35.000000000 +0200 +++ new/bctoolbox-5.0.35/cmake/BcToolboxCMakeUtils.cmake 2021-09-24 17:05:38.000000000 +0200 @@ -1,6 +1,6 @@ ############################################################################ # BcToolboxCMakeUtils.cmake -# Copyright (C) 2010-2019 Belledonne Communications, Grenoble France +# Copyright (C) 2010-2021 Belledonne Communications, Grenoble France # ############################################################################ # @@ -130,22 +130,6 @@ endif() endmacro() -function(bc_parse_full_version version major minor patch) - if ("${version}" MATCHES "^(0|[1-9][0-9]*)[.](0|[1-9][0-9]*)[.](0|[1-9][0-9]*)(-[.0-9A-Za-z-]+)?([+][.0-9A-Za-z-]+)?$") - set(${major} "${CMAKE_MATCH_1}" PARENT_SCOPE) - set(${minor} "${CMAKE_MATCH_2}" PARENT_SCOPE) - set(${patch} "${CMAKE_MATCH_3}" PARENT_SCOPE) - if (ARGC GREATER 4) - set(${ARGV4} "${CMAKE_MATCH_4}" PARENT_SCOPE) - endif() - if (ARGC GREATER 5) - set(${ARGV5} "${CMAKE_MATCH_5}" PARENT_SCOPE) - endif() - else() - message(FATAL_ERROR "invalid full version '${version}'") - endif() -endfunction() - function(bc_compute_full_version OUTPUT_VERSION) find_program(GIT_EXECUTABLE git NAMES Git CMAKE_FIND_ROOT_PATH_BOTH) if(GIT_EXECUTABLE) @@ -196,7 +180,7 @@ set(short_project_version "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}") if(NOT (short_project_version VERSION_EQUAL short_git_version)) message(FATAL_ERROR - "project and git version are not compatible (project: '${PROJECT_VERSION}', git: '${full_version}'): " + "project and git version are not compatible (project: '${PROJECT_VERSION}', git: '${full_version}', at: '${CMAKE_CURRENT_SOURCE_DIR}'): " "major and minor version are not equal !" ) endif() @@ -227,6 +211,67 @@ endif() endfunction() +# Allows to get the distinct parts of a full version number. +# Parameters: +# * version [input] : the full version number as string. +# * major [output] : the major version. +# * minor [output] : the minor version. +# * patch [output] : the patch version. +# * branch [output,optional] : aggregation of the branch name (alpha, beta, etc.) and the commit increment since the last tag. +# The whole is prefixed by '-' and the result is empty for releases. +# * hash [output,optional] : the commit hash prefixed by '+' or empty for releases. +# +# Example: +# '5.2.1-alpha.145+e62e126' -> major : 5 +# minor : 2 +# patch : 1 +# branch : '-alpha.145' +# hash : '+e62e126' +# +# '5.2.1' -> major : 5 +# minor : 2 +# patch : 1 +# branch : <empty> +# hash : <empty> +function(bc_parse_full_version version major minor patch) + if ("${version}" MATCHES "^(0|[1-9][0-9]*)[.](0|[1-9][0-9]*)[.](0|[1-9][0-9]*)(-[.0-9A-Za-z-]+)?([+][.0-9A-Za-z-]+)?$") + set(${major} "${CMAKE_MATCH_1}" PARENT_SCOPE) + set(${minor} "${CMAKE_MATCH_2}" PARENT_SCOPE) + set(${patch} "${CMAKE_MATCH_3}" PARENT_SCOPE) + if (ARGC GREATER 4) + set(${ARGV4} "${CMAKE_MATCH_4}" PARENT_SCOPE) + endif() + if (ARGC GREATER 5) + set(${ARGV5} "${CMAKE_MATCH_5}" PARENT_SCOPE) + endif() + else() + message(FATAL_ERROR "invalid full version '${version}'") + endif() +endfunction() + +# Translate the full semantic version into version numbers suitable for GNU/Linux packages (RPM/DEB) +# Parameters: +# * full_version_in [input] : the full version which has been computed by bc_compute_full_version(). +# * package_version_out [output] : the name of a variable where to store the resulting package version number. +# * package_release_out [output] : the name of a variable where to store the resulting package release number. +# +# Exemple: +# '5.2.1-alpha.145+e62e126' -> version : '5.2.1' +# release : '0.alpha.145+e62e126' +# +# '5.2.1' -> version : '5.2.1' +# release : '1' +function(bc_compute_linux_package_version full_version_in package_version_out package_release_out) + bc_parse_full_version("${full_version_in}" version_major version_minor version_patch identifiers metadata) + set(${package_version_out} "${version_major}.${version_minor}.${version_patch}" PARENT_SCOPE) + if (NOT identifiers) + set(${package_release_out} 1 PARENT_SCOPE) + else() + string(SUBSTRING "${identifiers}" 1 -1 identifiers) + set(${package_release_out} "0.${identifiers}${metadata}" PARENT_SCOPE) + endif() +endfunction() + function(bc_make_package_source_target) set(basename "") string(TOLOWER "${CMAKE_PROJECT_NAME}" basename) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.0.3/include/bctoolbox/logging.h new/bctoolbox-5.0.35/include/bctoolbox/logging.h --- old/bctoolbox-5.0.3/include/bctoolbox/logging.h 2021-07-29 14:06:35.000000000 +0200 +++ new/bctoolbox-5.0.35/include/bctoolbox/logging.h 2021-09-24 17:05:38.000000000 +0200 @@ -258,6 +258,7 @@ #include <string> #include <iostream> #include <sstream> +#include <iomanip> #if !defined(_WIN32) && !defined(__QNX__) #include <syslog.h> @@ -305,37 +306,62 @@ #include <ostream> -class pumpstream : public std::ostringstream { +class pumpstream { public: - /*contructor used to disable logging*/ - pumpstream():mDomain(""),mLevel(BCTBX_LOG_DEBUG),mTraceEnabled(false){} - pumpstream(const char *domain, BctbxLogLevel level) : mDomain(domain ? domain : ""), mLevel(level),mTraceEnabled(true) {} + /* This constructor assumes that "domain" remains valid, which is a reasonable assumption because the pumpstream + * is used through macros (below) where the usage is within single line of code. */ + pumpstream(const char *domain, BctbxLogLevel level) : mDomain(domain), mLevel(level){ +#ifndef BCTBX_DEBUG_MODE + /* If debug mode is not enabled, the pumpstream shall do nothing if level requested is BCTBX_LOG_DEBUG. + * bctbx_log_level_enabled() does not even need to be called. */ + if (level == BCTBX_LOG_DEBUG) { + mIslogLevelEnabled = false; + return; + } +#endif + mIslogLevelEnabled = bctbx_log_level_enabled(domain, mLevel); + } + ~pumpstream() { - const char *domain = mDomain.empty() ? NULL : mDomain.c_str(); - if (mTraceEnabled && bctbx_log_level_enabled(domain, mLevel)) - bctbx_log(domain, mLevel, "%s", str().c_str()); + if (mIslogLevelEnabled) + bctbx_log(mDomain, mLevel, "%s", mOstringstream.str().c_str()); } + template <typename _Tp> friend pumpstream& operator<<(pumpstream& __os, _Tp&& __x); + template <typename _Tp> friend pumpstream& operator<<(pumpstream&& __os, _Tp&& __x); + friend pumpstream& operator<<(pumpstream& __os, std::ostream& (*pf)(std::ostream&)); + private: - const std::string mDomain; + std::ostringstream mOstringstream{}; + bool mIslogLevelEnabled = false; + const char* mDomain; const BctbxLogLevel mLevel; - const bool mTraceEnabled; }; +inline pumpstream& operator<<(pumpstream& pumpStream, std::ostream& (*pf)(std::ostream&)) { + if(pumpStream.mIslogLevelEnabled) { + pumpStream.mOstringstream << pf; + } + return pumpStream; +} -template <typename _Tp> inline pumpstream &operator<<(pumpstream &&__os, const _Tp &__x) { - (static_cast<std::ostringstream &>(__os)) << __x; - return __os; +template <typename T> inline pumpstream& operator<<(pumpstream& pumpStream, T&& x) { + if(pumpStream.mIslogLevelEnabled) { + pumpStream.mOstringstream << std::forward<T>(x); + } + return pumpStream; +} + +template <typename T> inline pumpstream& operator<<(pumpstream&& pumpStream, T&& x) { + if(pumpStream.mIslogLevelEnabled) { + pumpStream.mOstringstream << std::forward<T>(x); + } + return pumpStream; } #define BCTBX_SLOG(domain, thelevel) pumpstream(domain, thelevel) -#ifndef BCTBX_DEBUG_MODE #define BCTBX_SLOGD BCTBX_SLOG(BCTBX_LOG_DOMAIN, BCTBX_LOG_DEBUG) -#else -#define BCTBX_SLOGD pumpstream() -#endif - #define BCTBX_SLOGI BCTBX_SLOG(BCTBX_LOG_DOMAIN, BCTBX_LOG_MESSAGE) #define BCTBX_SLOGW BCTBX_SLOG(BCTBX_LOG_DOMAIN, BCTBX_LOG_WARNING) #define BCTBX_SLOGE BCTBX_SLOG(BCTBX_LOG_DOMAIN, BCTBX_LOG_ERROR) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.0.3/src/CMakeLists.txt new/bctoolbox-5.0.35/src/CMakeLists.txt --- old/bctoolbox-5.0.3/src/CMakeLists.txt 2021-07-29 14:06:35.000000000 +0200 +++ new/bctoolbox-5.0.35/src/CMakeLists.txt 2021-09-24 17:05:38.000000000 +0200 @@ -134,7 +134,7 @@ set_target_properties(bctoolbox PROPERTIES FRAMEWORK TRUE MACOSX_FRAMEWORK_IDENTIFIER org.linphone.bctoolbox - MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_SOURCE_DIR}/build/osx/Info.plist.in" + MACOSX_FRAMEWORK_INFO_PLIST "${PROJECT_SOURCE_DIR}/build/osx/Info.plist.in" PUBLIC_HEADER "${BCTOOLBOX_HEADER_FILES}" ) endif() @@ -215,7 +215,7 @@ set_target_properties(bctoolbox-ios PROPERTIES FRAMEWORK TRUE MACOSX_FRAMEWORK_IDENTIFIER org.linphone.bctoolbox-ios - MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_SOURCE_DIR}/build/osx/Info.plist.in" + MACOSX_FRAMEWORK_INFO_PLIST "${PROJECT_SOURCE_DIR}/build/osx/Info.plist.in" LINK_FLAGS "-framework UIKit -framework Foundation -framework CoreFoundation" ) endif() @@ -261,7 +261,7 @@ set_target_properties(bctoolbox-tester PROPERTIES FRAMEWORK TRUE MACOSX_FRAMEWORK_IDENTIFIER com.belledonne-communications.bctoolbox-tester - MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_SOURCE_DIR}/build/osx/Info.plist.in" + MACOSX_FRAMEWORK_INFO_PLIST "${PROJECT_SOURCE_DIR}/build/osx/Info.plist.in" PUBLIC_HEADER "${BCTOOLBOX_HEADER_FILES}" ) endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.0.3/src/tester.c new/bctoolbox-5.0.35/src/tester.c --- old/bctoolbox-5.0.3/src/tester.c 2021-07-29 14:06:35.000000000 +0200 +++ new/bctoolbox-5.0.35/src/tester.c 2021-09-24 17:05:38.000000000 +0200 @@ -987,8 +987,8 @@ CU_automated_enable_junit_xml(TRUE); /* this requires 3.0.1 because previous versions crash automated.c */ if (run_in_parallel != 0) { - //Sub-process started by parent in bc_tester_run_parallel if (suite_name) { + //Sub-process started by parent in bc_tester_run_parallel CU_automated_enable_partial_junit(TRUE); xml_file_name = get_junit_xml_file_name(suite_name, NULL); CU_set_output_filename(xml_file_name); @@ -1013,7 +1013,7 @@ CU_automated_run_tests(); bctbx_free(xml_file_name); } - return CU_get_number_of_tests_failed() != 0; + goto end; } #ifndef HAVE_CU_GET_SUITE @@ -1066,6 +1066,7 @@ CU_run_all_tests(); } } +end: #ifdef __linux__ bc_tester_printf(bc_printf_verbosity_info, "Still %i kilobytes allocated when all tests are finished.", mallinfo().uordblks / 1024); @@ -1073,6 +1074,7 @@ if (run_in_parallel){ // We are a child process, return the number of test failed. int failed_tests = CU_get_number_of_tests_failed(); + bc_tester_printf(bc_printf_verbosity_info, "Suite %s finished with %i failed tests.", suite_name, failed_tests); if (failed_tests >= 255) { bc_tester_printf(bc_printf_verbosity_error, "The number of tests exceeded 255, the maximum value for an exit status !"); failed_tests = 255;