]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.spec, cmake, debian: use thrift 0.13+ from distro pkg
authorDeepika Upadhyay <dupadhya@redhat.com>
Wed, 21 Jul 2021 15:18:02 +0000 (20:48 +0530)
committerDeepika Upadhyay <dupadhya@redhat.com>
Thu, 22 Jul 2021 05:29:45 +0000 (10:59 +0530)
the change to build and ship libthift was added when we didn't have 0.13.0
version shipped via distro pkgs, now that centos 8 and F34 supports req.
version, we do not need to build and ship it with jaeger library.

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
ceph.spec.in
cmake/modules/BuildJaeger.cmake
cmake/modules/Buildthrift.cmake [deleted file]
debian/control
src/CMakeLists.txt

index 0c096ea350102ad0522a977ed5225a838004698d..c62599a8a4116e1e11048d42f8746a5893ec1a63 100644 (file)
@@ -269,6 +269,7 @@ BuildRequires:  libzbd-devel
 %if 0%{with jaeger}
 BuildRequires:  bison
 BuildRequires:  flex
+BuildRequires:  thrift-devel >= 0.13.0
 %if 0%{?fedora} || 0%{?rhel}
 BuildRequires:  json-devel
 %endif
@@ -1064,7 +1065,6 @@ Group:            System/Libraries
 %endif
 Provides:      libjaegertracing.so.0()(64bit)
 Provides:      libopentracing.so.1()(64bit)
-Provides:      libthrift.so.0.13.0()(64bit)
 %description -n libjaeger
 This package contains libraries needed to provide distributed
 tracing for Ceph.
@@ -2294,7 +2294,6 @@ fi
 %if %{with jaeger}
 %files -n libjaeger
 %{_libdir}/libopentracing.so.*
-%{_libdir}/libthrift.so.*
 %{_libdir}/libjaegertracing.so.*
 %post -n libjaeger -p /sbin/ldconfig
 %postun -n libjaeger -p /sbin/ldconfig
index 76b9e6989e2b7501b950c455f6dc8ba1b8a07cde..826b58fd4dd2198be425930003f48fd2dc89b839 100644 (file)
@@ -1,10 +1,9 @@
 # This module builds Jaeger after it's dependencies are installed and discovered
 # opentracing: is built using cmake/modules/Buildopentracing.cmake
-# Thrift: build using cmake/modules/Buildthrift.cmake
+# Thrift: found using cmake/modules/Findthrift.cmake (not by default)
 # yaml-cpp, nlhomann-json: are installed locally and then discovered using
 # Find<package>.cmake
-# Boost Libraries used for building thrift are build and provided by
-# cmake/modules/BuildBoost.cmake
+# Boost Libraries: uses ceph build boost cmake/modules/BuildBoost.cmake
 
 function(build_jaeger)
   set(Jaeger_SOURCE_DIR "${CMAKE_SOURCE_DIR}/src/jaegertracing/jaeger-client-cpp")
diff --git a/cmake/modules/Buildthrift.cmake b/cmake/modules/Buildthrift.cmake
deleted file mode 100644 (file)
index 6d9579a..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-function(build_thrift)
-  set(thrift_SOURCE_DIR "${CMAKE_SOURCE_DIR}/src/jaegertracing/thrift")
-  set(thrift_BINARY_DIR "${CMAKE_BINARY_DIR}/external/thrift")
-
-  set(thrift_CMAKE_ARGS  -DCMAKE_BUILD_TYPE=Release
-                        -DCMAKE_POSITION_INDEPENDENT_CODE=ON
-                        -DBUILD_JAVA=OFF
-                        -DBUILD_PYTHON=OFF
-                        -DBUILD_TESTING=OFF
-                        -DBUILD_TUTORIALS=OFF
-                        -DBUILD_C_GLIB=OFF
-                        -DBUILD_HASKELL=OFF
-                        -DWITH_LIBEVENT=OFF
-                        -DWITH_ZLIB=OFF
-                        -DBoost_INCLUDE_DIRS=${CMAKE_BINARY_DIR}/boost/include
-                        -DCMAKE_INSTALL_PREFIX="${CMAKE_BINARY_DIR}/boost;${CMAKE_BINARY_DIR}/boost/include;${CMAKE_BINARY_DIR}/external"
-                        -DCMAKE_FIND_ROOT_PATH="${CMAKE_BINARY_DIR}/boost;${CMAKE_BINARY_DIR}/boost/include;${CMAKE_BINARY_DIR}/external"
-                        -DCMAKE_INSTALL_RPATH=${CMAKE_BINARY_DIR}/external/lib
-                        -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE
-                        -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/external
-                        -DCMAKE_INSTALL_LIBDIR=${CMAKE_BINARY_DIR}/external/lib)
-
-  if(WITH_SYSTEM_BOOST)
-    message(STATUS "thrift will be using system boost")
-    set(dependencies "")
-    list(APPEND thrift_CMAKE_ARGS -DBOOST_ROOT=/opt/ceph)
-    list(APPEND thrift_CMAKE_ARGS -DCMAKE_FIND_ROOT_PATH=/opt/ceph)
-  else()
-    message(STATUS "thrift will be using external build boost")
-    set(dependencies Boost)
-    list(APPEND thrift_CMAKE_ARGS  -DCMAKE_FIND_ROOT_PATH=${CMAKE_BINARY_DIR}/boost)
-    list(APPEND thrift_CMAKE_ARGS  -DCMAKE_PREFIX_PATH=${CMAKE_BINARY_DIR}/external)
-  endif()
-
-  if(CMAKE_MAKE_PROGRAM MATCHES "make")
-    # try to inherit command line arguments passed by parent "make" job
-    set(make_cmd $(MAKE) thrift)
-  else()
-    set(make_cmd ${CMAKE_COMMAND} --build <BINARY_DIR> --target thrift)
-  endif()
-  set(install_cmd ${CMAKE_MAKE_PROGRAM} install)
-
-  include(ExternalProject)
-  ExternalProject_Add(thrift
-    SOURCE_DIR ${thrift_SOURCE_DIR}
-    PREFIX "${CMAKE_BINARY_DIR}/external/thrift"
-    CMAKE_ARGS ${thrift_CMAKE_ARGS}
-    BINARY_DIR ${thrift_BINARY_DIR}
-    BUILD_COMMAND ${make_cmd}
-    INSTALL_COMMAND ${install_cmd}
-    DEPENDS ${dependencies}
-    BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/external/lib/libthrift.so
-    )
-endfunction()
index a364b7c56116873aed82b65056c1c67d48647f28..2495ce7494dd4190d68cf6531fbacfe495ce6780 100644 (file)
@@ -69,6 +69,7 @@ Build-Depends: automake,
                librabbitmq-dev,
                librdkafka-dev,
                luarocks,
+               libthrift-dev (>= 0.13.0) <pkg.ceph.jaeger>,
                libyaml-cpp-dev (>= 0.6) <pkg.ceph.crimson> <pkg.ceph.jaeger>,
                libzstd-dev <pkg.ceph.check>,
                libxmlsec1 <pkg.ceph.check>,
index 22cc4e1b8b5199bc4937245dba5509d738aa834f..9d51c2e70a688fa826e3b8e98d38307b9d75246a 100644 (file)
@@ -425,11 +425,11 @@ add_library(common-objs OBJECT ${libcommon_files})
 add_dependencies(common-objs legacy-option-headers)
 
 if(WITH_JAEGER)
-  include(BuildJaeger)
+  find_package(thrift 0.13.0)
   find_package(yaml-cpp 0.6.0 REQUIRED)
+  include(BuildJaeger)
   list(APPEND jaeger_base
   opentracing::libopentracing
-  thrift::libthrift
   jaegertracing::libjaegertracing)
   target_link_libraries(jaeger-base INTERFACE
   yaml-cpp::yaml-cpp