]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
build: let FreeBSD build ceph-fuse 14282/head
authorWillem Jan Withagen <wjw@digiware.nl>
Sun, 2 Apr 2017 00:08:51 +0000 (02:08 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Sun, 2 Apr 2017 19:39:41 +0000 (21:39 +0200)
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
do_freebsd.sh
install-deps.sh
src/CMakeLists.txt

index c0776132935673bfae39484c3cac6da9579202d4..bf9007488f06e31aecf6c44ca7bd3dcc28a4f6f3 100755 (executable)
@@ -12,14 +12,6 @@ fi
 if [ x"$1"x = x"--deps"x ]; then
     sudo ./install-deps.sh
 fi
-if [ -x /usr/bin/getopt ] && [ x"`/usr/bin/getopt -v`"x == x" --"x ]; then
-    echo fix getopt path
-    echo Native FreeBSD getopt is not compatible with the Linux getopt that is
-    echo expected with Ceph.
-    echo Easiest is to rename/remove /usr/bin/getopt.
-    echo     mv /usr/bin/getopt /usr/bin/getopt.freebsd
-    exit 1
-fi
 
 if [ x"$CEPH_DEV"x != xx ]; then
     BUILDOPTS="$BUILDOPTS V=1 VERBOSE=1"
@@ -39,18 +31,24 @@ rm -rf build && ./do_cmake.sh "$*" \
        -D WITH_SYSTEM_BOOST=ON \
        -D WITH_LTTNG=OFF \
        -D WITH_BLKID=OFF \
-       -D WITH_FUSE=OFF \
+       -D WITH_FUSE=ON \
        -D WITH_KRBD=OFF \
        -D WITH_XFS=OFF \
        -D WITH_KVS=OFF \
-       -D WITH_MANPAGE=ON \
        -D CEPH_MAN_DIR=man \
        -D WITH_LIBCEPHFS=OFF \
        -D WITH_CEPHFS=OFF \
        -D WITH_EMBEDDED=OFF \
+       -D WITH_MGR=YES \
        2>&1 | tee cmake.log
 
-cd build
-gmake -j$NPROC $BUILDOPTS
-gmake check 
+echo start building 
+date
+(cd build; gmake -j$NPROC $BUILDOPTS )
+(cd build; gmake -j$NPROC $BUILDOPTS ceph-disk)
+(cd build; gmake -j$NPROC $BUILDOPTS ceph-detect-init)
+
+echo start testing 
+date
+(cd build; ctest -j$NPROC || ctest --rerun-failed --output-on-failure)
 
index 7f190fb51cdef613896622afa4b93d3d5a87d814..e425bf4eadbdc9c6d9cf41ffa4f1de51318321dd 100755 (executable)
@@ -57,6 +57,7 @@ if [ x`uname`x = xFreeBSDx ]; then
         www/py-flask \
         www/fcgi \
         sysutils/flock \
+        sysutils/fusefs-libs \
 
     exit
 else
index 33cfbb8c9a03ca2c0443b0968faa65465bcdbce1..5eabb6515d12ea800b2099ff92ab8d6c0ee1a046 100644 (file)
@@ -24,8 +24,9 @@ set(prefix ${CMAKE_INSTALL_PREFIX})
 add_definitions("-DCEPH_LIBDIR=\"${CMAKE_INSTALL_FULL_LIBDIR}\"")
 add_definitions("-DCEPH_PKGLIBDIR=\"${CMAKE_INSTALL_FULL_PKGLIBDIR}\"")
 add_definitions("-DHAVE_CONFIG_H -D__CEPH__ -D_REENTRANT -D_THREAD_SAFE -D__STDC_FORMAT_MACROS")
+add_definitions("-D_FILE_OFFSET_BITS=64")
 if(LINUX)
-  add_definitions("-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64")
+  add_definitions("-D_GNU_SOURCE")
 endif()
 
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wtype-limits -Wignored-qualifiers -Winit-self")
@@ -912,8 +913,9 @@ if(WITH_LIBCEPHFS OR WITH_KRBD)
   add_library(parse_secret_objs OBJECT ${parse_secret_files})
 endif()
 
+add_subdirectory(client)
+
 if(WITH_LIBCEPHFS)
-  add_subdirectory(client)
   set(libcephfs_srcs libcephfs.cc)
   add_library(cephfs ${CEPH_SHARED} ${libcephfs_srcs})
   target_link_libraries(cephfs LINK_PRIVATE client ceph-common
@@ -949,20 +951,20 @@ if(WITH_LIBCEPHFS)
 
   install(TARGETS ceph-syn DESTINATION bin)
   install(TARGETS mount.ceph DESTINATION ${CMAKE_INSTALL_SBINDIR})
-
-  if(WITH_FUSE)
-    set(ceph_fuse_srcs
-      ceph_fuse.cc
-      client/fuse_ll.cc)
-    add_executable(ceph-fuse ${ceph_fuse_srcs})
-    target_link_libraries(ceph-fuse ${ALLOC_LIBS} ${FUSE_LIBRARIES}
-      client common global-static)
-    set_target_properties(ceph-fuse PROPERTIES COMPILE_FLAGS "-I${FUSE_INCLUDE_DIRS}")
-    install(TARGETS ceph-fuse DESTINATION bin)
-    install(PROGRAMS mount.fuse.ceph DESTINATION ${CMAKE_INSTALL_SBINDIR})
-  endif(WITH_FUSE)
 endif(WITH_LIBCEPHFS)
 
+if(WITH_FUSE)
+  set(ceph_fuse_srcs
+    ceph_fuse.cc
+    client/fuse_ll.cc)
+  add_executable(ceph-fuse ${ceph_fuse_srcs})
+  target_link_libraries(ceph-fuse ${ALLOC_LIBS} ${FUSE_LIBRARIES}
+    client common global-static)
+  set_target_properties(ceph-fuse PROPERTIES COMPILE_FLAGS "-I${FUSE_INCLUDE_DIRS}")
+  install(TARGETS ceph-fuse DESTINATION bin)
+  install(PROGRAMS mount.fuse.ceph DESTINATION ${CMAKE_INSTALL_SBINDIR})
+endif(WITH_FUSE)
+
 add_subdirectory(journal)
 
 if(WITH_RBD)