Hello community, here is the log from the commit of package libArcus for openSUSE:Factory checked in at 2019-06-14 20:42:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libArcus (Old) and /work/SRC/openSUSE:Factory/.libArcus.new.4811 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libArcus" Fri Jun 14 20:42:44 2019 rev:6 rq:709915 version:4.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/libArcus/libArcus.changes 2019-01-24 14:11:18.767507935 +0100 +++ /work/SRC/openSUSE:Factory/.libArcus.new.4811/libArcus.changes 2019-06-14 20:42:46.754354305 +0200 @@ -1,0 +2,6 @@ +Thu Jun 13 06:58:41 UTC 2019 - Adrian Schröter <adr...@suse.de> + +- update to version 4.1.0 + * https://ultimaker.com/en/products/ultimaker-cura-software/release-notes + +------------------------------------------------------------------- Old: ---- libArcus-3.6.0.obscpio New: ---- libArcus-4.1.0.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libArcus.spec ++++++ --- /var/tmp/diff_new_pack.pPQNEY/_old 2019-06-14 20:42:47.402353206 +0200 +++ /var/tmp/diff_new_pack.pPQNEY/_new 2019-06-14 20:42:47.402353206 +0200 @@ -18,7 +18,7 @@ %define sover 3 Name: libArcus -Version: 3.6.0 +Version: 4.1.0 Release: 0 Summary: 3D printer control software License: LGPL-3.0-only @@ -34,8 +34,6 @@ Communication library between internal components for Ultimaker software %package -n %name%{sover} -Provides: %{name}-lulzbot%{sover} -Obsoletes: %{name}-lulzbot%{sover} < 3.6.0 Summary: 3D printer control software Group: System/Libraries @@ -76,7 +74,7 @@ %files -n %name%{sover} %license LICENSE %doc README.md -%{python3_sitearch}/Arcus.so +%{python3_sitelib}/Arcus.so %{_libdir}/libArcus.so.* %changelog ++++++ _service ++++++ --- /var/tmp/diff_new_pack.pPQNEY/_old 2019-06-14 20:42:47.430353159 +0200 +++ /var/tmp/diff_new_pack.pPQNEY/_new 2019-06-14 20:42:47.434353152 +0200 @@ -2,8 +2,8 @@ <service name="obs_scm" mode="disabled"> <param name="url">https://github.com/Ultimaker/libArcus</param> <param name="scm">git</param> - <param name="revision">3.6.0</param> - <param name="version">3.6.0</param> + <param name="revision">4.1.0</param> + <param name="version">4.1.0</param> <param name="submodules">disable</param> </service> <service mode="disabled" name="set_version" /> ++++++ libArcus-3.6.0.obscpio -> libArcus-4.1.0.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libArcus-3.6.0/.gitlab-ci.yml new/libArcus-4.1.0/.gitlab-ci.yml --- old/libArcus-3.6.0/.gitlab-ci.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/libArcus-4.1.0/.gitlab-ci.yml 2019-04-10 09:00:57.000000000 +0200 @@ -0,0 +1,12 @@ +image: registry.gitlab.com/ultimaker/cura/cura-build-environment:centos7 + +stages: + - build + +build-and-test: + stage: build + script: + - docker/build.sh + artifacts: + paths: + - build/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libArcus-3.6.0/CMakeLists.txt new/libArcus-4.1.0/CMakeLists.txt --- old/libArcus-3.6.0/CMakeLists.txt 2018-10-25 15:41:00.000000000 +0200 +++ new/libArcus-4.1.0/CMakeLists.txt 2019-04-10 09:00:57.000000000 +0200 @@ -1,5 +1,5 @@ project(arcus) -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.6) include(GNUInstallDirs) include(CMakePackageConfigHelpers) @@ -21,26 +21,29 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) #Required if a patch to libArcus needs to be made via templates. if(BUILD_PYTHON) - set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) + list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) + + # FIXME: Remove the code for CMake <3.12 once we have switched over completely. + # FindPython3 is a new module since CMake 3.12. It deprecates FindPythonInterp and FindPythonLibs. + if(${CMAKE_VERSION} VERSION_LESS 3.12) + # Use FindPythonInterp and FindPythonLibs for CMake <3.12 + find_package(PythonInterp 3.4 REQUIRED) + find_package(PythonLibs 3.4 REQUIRED) + else() + # Use FindPython3 for CMake >=3.12 + find_package(Python3 3.4 REQUIRED COMPONENTS Interpreter Development) + endif() + find_package(SIP REQUIRED) if(NOT DEFINED LIB_SUFFIX) set(LIB_SUFFIX "") endif() - if(EXISTS /etc/debian_version) - # Running on a debian-based system, which requires special handling for python modules. - set(PYTHON_SITE_PACKAGES_DIR lib${LIB_SUFFIX}/python3/dist-packages CACHE STRING "Directory to install Python bindings to") - else() - set(PYTHON_SITE_PACKAGES_DIR lib${LIB_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages CACHE STRING "Directory to install Python bindings to") - endif() - include_directories(python/ src/ ${SIP_INCLUDE_DIR} ${PYTHON_INCLUDE_DIR}) -endif() -if(NOT ${CMAKE_VERSION} VERSION_LESS 3.1) - set(CMAKE_CXX_STANDARD 11) -else() - set(CMAKE_CXX_FLAGS "-std=c++11") + include_directories(python/ src/ ${SIP_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS}) endif() +set(CMAKE_CXX_STANDARD 11) + if(APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libArcus-3.6.0/Jenkinsfile new/libArcus-4.1.0/Jenkinsfile --- old/libArcus-3.6.0/Jenkinsfile 2018-10-25 15:41:00.000000000 +0200 +++ new/libArcus-4.1.0/Jenkinsfile 2019-04-10 09:00:57.000000000 +0200 @@ -19,6 +19,18 @@ // Disable building of Python bindings on Windows for now, // since it requires MSVC to build properly. extra_cmake_options = "-DBUILD_PYTHON=OFF" + + // Building example requires dynamic linking, while with MingGW + // on Windows in the build environment doesn't have dynamic protobuf + // library, so we can't do dynamic linking. + extra_cmake_options = "${extra_cmake_options} -DBUILD_EXAMPLES=OFF" + extra_cmake_options = "${extra_cmake_options} -DBUILD_STATIC=ON" + + // The CI is using MinGW as the CMake target, but the MinGW protobuf + // libraries are installed in "lib-mingw" instead of the default "lib" + // directory. We need to specify to use "lib-mingw" specifically so + // the linking process can use the correct library. + extra_cmake_options = "${extra_cmake_options} -DPROTOBUF_LIBRARY=\"${env.CURA_ENVIRONMENT_PATH}/${branch}/inst/lib-mingw/libprotobuf.a\"" } cmake '..', "-DCMAKE_PREFIX_PATH=\"${env.CURA_ENVIRONMENT_PATH}/${branch}\" -DCMAKE_BUILD_TYPE=Release ${extra_cmake_options}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libArcus-3.6.0/cmake/FindSIP.cmake new/libArcus-4.1.0/cmake/FindSIP.cmake --- old/libArcus-3.6.0/cmake/FindSIP.cmake 2018-10-25 15:41:00.000000000 +0200 +++ new/libArcus-4.1.0/cmake/FindSIP.cmake 2019-04-10 09:00:57.000000000 +0200 @@ -8,11 +8,11 @@ # # This file defines the following variables: # -# SIP_VERSION_STR - The version of SIP found as a human readable string. +# SIP_VERSION - SIP version. # -# SIP_BINARY_PATH - Path and filename of the SIP command line executable. +# SIP_EXECUTABLE - Path to the SIP executable. # -# SIP_INCLUDE_DIR - Directory holding the SIP C++ header file. +# SIP_INCLUDE_DIRS - The SIP include directories. # # Copyright (c) 2007, Simon Edwards <si...@simonzone.com> @@ -24,36 +24,61 @@ set(CMAKE_FIND_FRAMEWORK LAST) endif() -find_package(PythonInterp 3.4.0 REQUIRED) -find_package(PythonLibs 3.4.0 REQUIRED) +# FIXME: Remove the code for CMake <3.12 once we have switched over completely. +# FindPython3 is a new module since CMake 3.12. It deprecates FindPythonInterp and FindPythonLibs. +if(${CMAKE_VERSION} VERSION_LESS 3.12) + # Use FindPythonInterp and FindPythonLibs for CMake <3.12 + find_package(PythonInterp 3.4 REQUIRED) + find_package(PythonLibs 3.4 REQUIRED) + + # Define variables that are available in FindPython3, so there's no need to branch off in the later part. + set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE}) + set(Python3_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS}) + set(Python3_LIBRARIES ${PYTHON_LIBRARIES}) + + execute_process( + COMMAND ${Python3_EXECUTABLE} -c + "import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=False))" + RESULT_VARIABLE _process_status + OUTPUT_VARIABLE _process_output + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if(${_process_status} EQUAL 0) + string(STRIP ${_process_output} Python3_SITELIB) + else() + message(FATAL_ERROR "Failed to get Python3_SITELIB. Error: ${_process_output}") + endif() +else() + # Use FindPython3 for CMake >=3.12 + find_package(Python3 3.4 REQUIRED COMPONENTS Interpreter Development) +endif() -get_filename_component(PYTHON_BINARY_PATH ${PYTHON_EXECUTABLE} DIRECTORY) +get_filename_component(_python_binary_path ${Python3_EXECUTABLE} DIRECTORY) -find_program(SIP_BINARY_PATH sip - HINTS ${CMAKE_INSTALL_PREFIX}/bin ${PYTHON_BINARY_PATH} ${PYTHON_BINARY_PATH}/site-packages/PyQt5 +find_program(SIP_EXECUTABLE sip + HINTS ${CMAKE_PREFIX_PATH}/bin ${CMAKE_INSTALL_PATH}/bin ${_python_binary_path} ${Python3_SITELIB}/PyQt5 ) -find_path(SIP_INCLUDE_DIR sip.h - HINTS ${CMAKE_INSTALL_PREFIX}/include ${PYTHON_INCLUDE_DIRS} ${PYTHON_BINARY_PATH}/site-packages/PyQt5 +find_path(SIP_INCLUDE_DIRS sip.h + HINTS ${CMAKE_PREFIX_PATH}/include ${CMAKE_INSTALL_PATH}/include ${Python3_INCLUDE_DIRS} ${Python3_SITELIB}/PyQt5 ) execute_process( - COMMAND ${PYTHON_EXECUTABLE} -c "import sip; print(sip.SIP_VERSION_STR)" + COMMAND ${Python3_EXECUTABLE} -c "import sip; print(sip.SIP_VERSION_STR)" RESULT_VARIABLE _process_status OUTPUT_VARIABLE _process_output OUTPUT_STRIP_TRAILING_WHITESPACE ) if(${_process_status} EQUAL 0) - string(STRIP ${_process_output} SIP_VERSION_STR) + string(STRIP ${_process_output} SIP_VERSION) endif() include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Sip REQUIRED_VARS SIP_BINARY_PATH SIP_INCLUDE_DIR VERSION_VAR SIP_VERSION_STR) +find_package_handle_standard_args(SIP REQUIRED_VARS SIP_EXECUTABLE SIP_INCLUDE_DIRS VERSION_VAR SIP_VERSION) -if(Sip_FOUND) +if(SIP_FOUND) include(${CMAKE_CURRENT_LIST_DIR}/SIPMacros.cmake) endif() -mark_as_advanced(SIP_BINARY_PATH SIP_INCLUDE_DIR SIP_VERSION_STR) - +mark_as_advanced(SIP_EXECUTABLE SIP_INCLUDE_DIRS SIP_VERSION) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libArcus-3.6.0/cmake/SIPMacros.cmake new/libArcus-4.1.0/cmake/SIPMacros.cmake --- old/libArcus-3.6.0/cmake/SIPMacros.cmake 2018-10-25 15:41:00.000000000 +0200 +++ new/libArcus-4.1.0/cmake/SIPMacros.cmake 2019-04-10 09:00:57.000000000 +0200 @@ -19,7 +19,7 @@ # The behaviour of the ADD_SIP_PYTHON_MODULE macro can be controlled by a # number of variables: # -# SIP_INCLUDES - List of directories which SIP will scan through when looking +# SIP_INCLUDE_DIRS - List of directories which SIP will scan through when looking # for included .sip files. (Corresponds to the -I option for SIP.) # # SIP_TAGS - List of tags to define when running SIP. (Corresponds to the -t @@ -35,7 +35,7 @@ # SIP_EXTRA_OPTIONS - Extra command line options which should be passed on to # SIP. -SET(SIP_INCLUDES) +SET(SIP_INCLUDE_DIRS) SET(SIP_TAGS) SET(SIP_CONCAT_PARTS 8) SET(SIP_DISABLE_FEATURES) @@ -102,7 +102,7 @@ OUTPUT ${_sip_output_files} COMMAND ${CMAKE_COMMAND} -E echo ${message} COMMAND ${CMAKE_COMMAND} -E touch ${_sip_output_files} - COMMAND ${SIP_BINARY_PATH} ${_sip_tags} ${_sip_x} ${SIP_EXTRA_OPTIONS} -j ${SIP_CONCAT_PARTS} -c ${CMAKE_CURRENT_BINARY_DIR}/${_module_path} ${_sip_includes} ${_abs_module_sip} + COMMAND ${SIP_EXECUTABLE} ${_sip_tags} ${_sip_x} ${SIP_EXTRA_OPTIONS} -j ${SIP_CONCAT_PARTS} -c ${CMAKE_CURRENT_BINARY_DIR}/${_module_path} ${_sip_includes} ${_abs_module_sip} DEPENDS ${_abs_module_sip} ${SIP_EXTRA_FILES_DEPEND} ) # not sure if type MODULE could be uses anywhere, limit to cygwin for now @@ -112,7 +112,7 @@ ADD_LIBRARY(${_logical_name} SHARED ${_sip_output_files} ${SIP_EXTRA_SOURCE_FILES}) ENDIF (CYGWIN OR APPLE) IF (NOT APPLE) - TARGET_LINK_LIBRARIES(${_logical_name} ${PYTHON_LIBRARIES}) + TARGET_LINK_LIBRARIES(${_logical_name} ${Python3_LIBRARIES}) ENDIF (NOT APPLE) TARGET_LINK_LIBRARIES(${_logical_name} ${EXTRA_LINK_LIBRARIES}) IF (APPLE) @@ -121,10 +121,9 @@ SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES PREFIX "" OUTPUT_NAME ${_child_module_name}) IF (WIN32) - SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES SUFFIX ".pyd" IMPORT_PREFIX "_") + SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES SUFFIX ".pyd" IMPORT_PREFIX "_") ENDIF (WIN32) - INSTALL(TARGETS ${_logical_name} DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/${_parent_module_path}") + INSTALL(TARGETS ${_logical_name} DESTINATION "${Python3_SITELIB}/${_parent_module_path}") ENDMACRO(ADD_SIP_PYTHON_MODULE) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libArcus-3.6.0/docker/build.sh new/libArcus-4.1.0/docker/build.sh --- old/libArcus-3.6.0/docker/build.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/libArcus-4.1.0/docker/build.sh 2019-04-10 09:00:57.000000000 +0200 @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +set -e + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +PROJECT_DIR="$( cd "${SCRIPT_DIR}/.." && pwd )" + +# Make sure that environment variables are set properly +source /opt/rh/devtoolset-7/enable +export PATH="${CURA_BUILD_ENV_PATH}/bin:${PATH}" +export PKG_CONFIG_PATH="${CURA_BUILD_ENV_PATH}/lib/pkgconfig:${PKG_CONFIG_PATH}" + +cd "${PROJECT_DIR}" + +mkdir build +cd build +cmake3 \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_PREFIX_PATH="${CURA_BUILD_ENV_PATH}" \ + -DBUILD_TESTS=ON \ + .. +make +ctest3 --output-on-failure -T Test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libArcus-3.6.0/src/Socket.cpp new/libArcus-4.1.0/src/Socket.cpp --- old/libArcus-3.6.0/src/Socket.cpp 2018-10-25 15:41:00.000000000 +0200 +++ new/libArcus-4.1.0/src/Socket.cpp 2019-04-10 09:00:57.000000000 +0200 @@ -181,6 +181,8 @@ if(d->state == SocketState::Closed || d->state == SocketState::Error) { // Silently ignore this, as calling close on an already closed socket should be fine. + d->state = SocketState::Closed; + d->message_received_condition_variable.notify_all(); return; } @@ -211,6 +213,9 @@ delete d->thread; d->thread = nullptr; } + // Notify all in case of closing because the waiting threads need to know + // that this socket has been closed and they should not wait any more. + d->message_received_condition_variable.notify_all(); } void Socket::sendMessage(MessagePtr message) @@ -225,7 +230,7 @@ d->sendQueue.push_back(message); } -MessagePtr Socket::takeNextMessage(bool blocking) +MessagePtr Socket::takeNextMessage() { std::unique_lock<std::mutex> lk(d->receiveQueueMutexBlock); @@ -240,19 +245,23 @@ } } - // If receive queue if empty and this is a non-blocking call, return nullptr immediately. - if (!blocking) - { - return nullptr; - } - // For a blocking call, wait until the receive queue available signal gets triggered and fetch the first message // in the receive queue. // Note that wait causes the current thread to block until the condition variable is notified or a spurious wakeup // occurs, optionally looping until some predicate is satisfied. See https://en.cppreference.com/w/cpp/thread/condition_variable/wait d->message_received_condition_variable.wait(lk); + + // Only continue to fetch the next message if the socket is still operating normally. + bool continue_to_take_next = d->state != SocketState::Closed && d->state != SocketState::Error; + lk.unlock(); - return takeNextMessage(blocking); + + MessagePtr result; // null by default + if (continue_to_take_next) + { + result = takeNextMessage(); + } + return result; } MessagePtr Arcus::Socket::createMessage(const std::string& type) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libArcus-3.6.0/src/Socket.h new/libArcus-4.1.0/src/Socket.h --- old/libArcus-3.6.0/src/Socket.h 2018-10-25 15:41:00.000000000 +0200 +++ new/libArcus-4.1.0/src/Socket.h 2019-04-10 09:00:57.000000000 +0200 @@ -132,10 +132,8 @@ /** * Remove and return the next pending message from the queue with condition blocking. - * - * \param blocking If true, this function call will block until there is an available message. */ - virtual MessagePtr takeNextMessage(bool blocking = false); + virtual MessagePtr takeNextMessage(); /** * Create an instance of a Message class. ++++++ libArcus.obsinfo ++++++ --- /var/tmp/diff_new_pack.pPQNEY/_old 2019-06-14 20:42:47.582352901 +0200 +++ /var/tmp/diff_new_pack.pPQNEY/_new 2019-06-14 20:42:47.582352901 +0200 @@ -1,5 +1,5 @@ name: libArcus -version: 3.6.0 -mtime: 1540474860 -commit: 41b8ed7ad40c99a543e39ad696c890b05655978e +version: 4.1.0 +mtime: 1554879657 +commit: e15df8325ade416655857c19552f05ed7e61b396