Commit d5d248a8 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Fixed plugin not loading because of unexpected flexisip API version

parent e28a5d26
Pipeline #2134 passed with stages
in 39 minutes and 18 seconds
...@@ -43,7 +43,7 @@ flexisip-config.h ...@@ -43,7 +43,7 @@ flexisip-config.h
ltmain.sh ltmain.sh
scripts/flexisip.conf.sample scripts/flexisip.conf.sample
stamp-h1 stamp-h1
/src/flexisip_gitversion.h /include/flexisip/flexisip-version.h
/src/test/expr /src/test/expr
src/libhack.a src/libhack.a
build-debian/ build-debian/
......
...@@ -174,6 +174,7 @@ rm -rf $RPM_BUILD_ROOT ...@@ -174,6 +174,7 @@ rm -rf $RPM_BUILD_ROOT
%{_datarootdir}/* %{_datarootdir}/*
%dir %{_includedir}/flexisip %dir %{_includedir}/flexisip
%{_includedir}/flexisip/*.hh %{_includedir}/flexisip/*.hh
%{_includedir}/flexisip/*.h
%{_localstatedir}/* %{_localstatedir}/*
%if @ENABLE_PRESENCE@ %if @ENABLE_PRESENCE@
......
...@@ -28,6 +28,7 @@ set(HEADER_FILES ...@@ -28,6 +28,7 @@ set(HEADER_FILES
eventlogs.hh eventlogs.hh
expressionparser.hh expressionparser.hh
flexisip-exception.hh flexisip-exception.hh
flexisip-version.h
forkbasiccontext.hh forkbasiccontext.hh
forkcallcontext.hh forkcallcontext.hh
forkcontext.hh forkcontext.hh
...@@ -42,6 +43,12 @@ set(HEADER_FILES ...@@ -42,6 +43,12 @@ set(HEADER_FILES
transaction.hh transaction.hh
) )
find_package(Git)
add_custom_target(flexisip-git-version
COMMAND ${CMAKE_COMMAND} -DGIT_EXECUTABLE=${GIT_EXECUTABLE} -DFLEXISIP_VERSION=${FLEXISIP_VERSION} -DWORK_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DOUTPUT_DIR=${CMAKE_CURRENT_LIST_DIR}/flexisip -P ${CMAKE_CURRENT_SOURCE_DIR}/gitversion.cmake
BYPRODUCTS "${CMAKE_CURRENT_LIST_DIR}/flexisip/flexisip-version.h"
)
set(FLEXISIP_HEADER_FILES ) set(FLEXISIP_HEADER_FILES )
foreach(HEADER_FILE ${HEADER_FILES}) foreach(HEADER_FILE ${HEADER_FILES})
list(APPEND FLEXISIP_HEADER_FILES "${CMAKE_CURRENT_LIST_DIR}/flexisip/${HEADER_FILE}") list(APPEND FLEXISIP_HEADER_FILES "${CMAKE_CURRENT_LIST_DIR}/flexisip/${HEADER_FILE}")
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#pragma once #pragma once
#include <flexisip/module.hh> #include <flexisip/module.hh>
#include <flexisip/flexisip-version.h>
#ifndef FLEXISIP_GIT_VERSION #ifndef FLEXISIP_GIT_VERSION
#define FLEXISIP_GIT_VERSION "undefined" #define FLEXISIP_GIT_VERSION "undefined"
......
...@@ -45,10 +45,10 @@ if(GIT_DESCRIBE) ...@@ -45,10 +45,10 @@ if(GIT_DESCRIBE)
message(FATAL_ERROR "FLEXISIP_VERSION and git tag differ. Please put them identical.") message(FATAL_ERROR "FLEXISIP_VERSION and git tag differ. Please put them identical.")
endif() endif()
set(GIT_VERSION "${GIT_DESCRIBE}") set(GIT_VERSION "${GIT_DESCRIBE}")
configure_file("${WORK_DIR}/gitversion.h.in" "${OUTPUT_DIR}/flexisip_gitversion.h" @ONLY) configure_file("${WORK_DIR}/gitversion.h.in" "${OUTPUT_DIR}/flexisip-version.h" @ONLY)
elseif(GIT_REVISION) elseif(GIT_REVISION)
set(GIT_VERSION "${FLEXISIP_VERSION}_${GIT_REVISION}") set(GIT_VERSION "${FLEXISIP_VERSION}_${GIT_REVISION}")
configure_file("${WORK_DIR}/gitversion.h.in" "${OUTPUT_DIR}/flexisip_gitversion.h" @ONLY) configure_file("${WORK_DIR}/gitversion.h.in" "${OUTPUT_DIR}/flexisip-version.h" @ONLY)
elseif(NOT EXISTS "${OUTPUT_DIR}/flexisip_gitversion.h") elseif(NOT EXISTS "${OUTPUT_DIR}/flexisip-version.h")
file(WRITE "${OUTPUT_DIR}/flexisip_gitversion.h" "") file(WRITE "${OUTPUT_DIR}/flexisip-version.h" "")
endif() endif()
...@@ -110,12 +110,6 @@ set(FLEXISIP_SOURCES ...@@ -110,12 +110,6 @@ set(FLEXISIP_SOURCES
utils/threadpool.cc utils/threadpool.cc
) )
find_package(Git)
add_custom_target(flexisip-git-version
COMMAND ${CMAKE_COMMAND} -DGIT_EXECUTABLE=${GIT_EXECUTABLE} -DFLEXISIP_VERSION=${FLEXISIP_VERSION} -DWORK_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/gitversion.cmake
BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/flexisip_gitversion.h"
)
list(APPEND FLEXISIP_INCLUDES ${FLEXISIP_HEADER_DIR} ${BCTOOLBOX_INCLUDE_DIRS} ${BELR_INCLUDE_DIRS}) list(APPEND FLEXISIP_INCLUDES ${FLEXISIP_HEADER_DIR} ${BCTOOLBOX_INCLUDE_DIRS} ${BELR_INCLUDE_DIRS})
if(LIBXSD_FOUND) if(LIBXSD_FOUND)
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
#define VERSION "DEVEL" #define VERSION "DEVEL"
#endif // VERSION #endif // VERSION
#include "flexisip_gitversion.h" #include <flexisip/flexisip-version.h>
#ifndef FLEXISIP_GIT_VERSION #ifndef FLEXISIP_GIT_VERSION
#define FLEXISIP_GIT_VERSION "undefined" #define FLEXISIP_GIT_VERSION "undefined"
#endif #endif
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <sofia-sip/sip_header.h> #include <sofia-sip/sip_header.h>
#include <sofia-sip/sip_status.h> #include <sofia-sip/sip_status.h>
#include "flexisip_gitversion.h"
#include <flexisip/plugin.hh> #include <flexisip/plugin.hh>
#include "module-external-authentication.hh" #include "module-external-authentication.hh"
......
...@@ -27,7 +27,6 @@ extern "C" { ...@@ -27,7 +27,6 @@ extern "C" {
#include <flexisip/agent.hh> #include <flexisip/agent.hh>
#include "module-auth.hh" #include "module-auth.hh"
#include "flexisip_gitversion.h"
#include <flexisip/plugin.hh> #include <flexisip/plugin.hh>
// ============================================================================= // =============================================================================
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include <unordered_map> #include <unordered_map>
#include "plugin-loader.hh" #include "plugin-loader.hh"
#include "flexisip_gitversion.h" #include <flexisip/flexisip-version.h>
#include <flexisip/plugin.hh> #include <flexisip/plugin.hh>
// ============================================================================= // =============================================================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment