]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: Allow cephfs and ceph-mds to be build when building on FreeBSD 31011/head
authorWillem Jan Withagen <wjw@digiware.nl>
Fri, 20 Sep 2019 14:02:23 +0000 (16:02 +0200)
committerNathan Cutler <ncutler@suse.com>
Thu, 14 Nov 2019 16:04:16 +0000 (17:04 +0100)
on FreeBSD keyutil absence prevents building KRBD and mount.
But on FreeBSD icephfs, ceph-fuse and ceph-mds do work, so we need
ceph-mds to be build.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
(cherry picked from commit f698f3c3eef4034799005b8816de5d468ef9fe18)

Conflicts:
CMakeLists.txt
- nautilus does not have "if (HAVE_LIBTCMALLOC AND TCMALLOC_VERSION_STRING
  VERSION_LESS 2.6.2)" clause, and c028de2f938bc9b8c0193b9219fb64e1416037cf
  refactored HAVE_GENL out of master
        src/mount/CMakeLists.txt
- CAPNG was introduced in master: omitted the changes

CMakeLists.txt
src/CMakeLists.txt
src/common/CMakeLists.txt

index fb3eac9d09a0ac06b8799697245a4f4ede9e38e8..106dbd231a3e53c44a86fe366c75afeecaa2a5f8 100644 (file)
@@ -222,11 +222,14 @@ if(LINUX)
     find_package(genl REQUIRED)
     set(HAVE_GENL $GENL_FOUND)
   endif()
+  find_package(keyutils REQUIRED)
+  set(HAVE_KEYUTILS ${KEYUTILS_FOUND})
 elseif(FREEBSD)
   set(HAVE_UDEV OFF)
   set(HAVE_LIBAIO OFF)
   set(HAVE_BLKID OFF)
   set(HAVE_GENL OFF)
+  set(HAVE_KEYUTILS OFF)
 else()
   set(HAVE_UDEV OFF)
   message(STATUS "Not using udev")
@@ -323,6 +326,13 @@ option(WITH_KRBD "Kernel Remote block storage is here" ON)
 if(WITH_KRBD AND WITHOUT_RBD)
   message(FATAL_ERROR "Cannot have WITH_KRBD with WITH_RBD.")
 endif()
+if(LINUX)
+  if(WITH_LIBCEPHFS OR WITH_KRBD)
+    # keyutils is only used when talking to the Linux Kernel key store 
+    find_package(keyutils REQUIRED)
+    set(HAVE_KEYUTILS ${KEYUTILS_FOUND})
+  endif()
+endif()
 
 option(WITH_LEVELDB "LevelDB is here" ON)
 if(WITH_LEVELDB)
@@ -389,10 +399,6 @@ else()
   set(EXE_LINKER_USE_PIE ${ENABLE_SHARED})
 endif()
 
-if(WITH_LIBCEPHFS OR WITH_KRBD)
-  find_package(keyutils REQUIRED)
-endif()
-
 find_package(CURL REQUIRED)
 set(CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIRS})
 set(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBRARIES})
index 4895e84df63fc8e75d18491c227b388d65aefc15..4ac08f9d00453b118e5d151f2c6aa3f097f11fea 100644 (file)
@@ -651,7 +651,9 @@ if(WITH_LIBCEPHFS)
   add_executable(ceph-syn ${ceph_syn_srcs})
   target_link_libraries(ceph-syn client global-static ceph-common)
   install(TARGETS ceph-syn DESTINATION bin)
-  add_subdirectory(mount)
+  if(LINUX)
+    add_subdirectory(mount)
+  endif()
 endif(WITH_LIBCEPHFS)
 
 if(WITH_FUSE)
index 8120454b81a220c74e65a9b518cc62d67f42562d..bd9276520dc3d964cdfc765f26055d753d625045 100644 (file)
@@ -177,7 +177,7 @@ target_link_libraries(crc32
 
 add_library(common_utf8 STATIC utf8.c)
 
-if(WITH_LIBCEPHFS OR WITH_KRBD)
+if(HAVE_KEYUTILS)
   set(parse_secret_srcs
     secret.c)
   add_library(parse_secret_objs OBJECT ${parse_secret_srcs})