From: Dan Mick Date: Wed, 9 May 2018 02:24:17 +0000 (-0700) Subject: Remove embedded 'cephd' code X-Git-Tag: v12.2.8~60^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=902f8479a825f95da57f8889d9833a9c3f6c0252;p=ceph.git Remove embedded 'cephd' code Signed-off-by: Dan Mick (cherry picked from commit 39b2626c7a36b3fef8d97cd276e23dc6f1f197f3) Conflicts: debian/rules doc/dev/macos.rst src/ceph_osd.cc src/cls/CMakeLists.txt src/compressor/CMakeLists.txt src/compressor/brotli/CMakeLists.txt src/compressor/brotli/CompressionPluginBrotli.cc src/compressor/zlib/CMakeLists.txt src/include/config-h.in.cmake src/include/rados/objclass.h src/libcephd/libcephd.cc src/rgw/CMakeLists.txt --- diff --git a/CMakeLists.txt b/CMakeLists.txt index aa90ba65dac3..80d3f7ac34c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -254,13 +254,6 @@ if(WITH_KRBD AND WITHOUT_RBD) message(FATAL_ERROR "Cannot have WITH_KRBD with WITH_RBD.") endif() -# embedded ceph daemon static library -# NOTE: Ceph is mostly LGPL (see COPYING), which means that -# static linking brings with it restrictions. Please be sure -# to look at the LGPL license carefully before linking this library to -# your code. See http://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynamic. -option(WITH_EMBEDDED "build the embedded ceph daemon library" ON) - option(WITH_LEVELDB "LevelDB is here" ON) if(WITH_LEVELDB) if(LEVELDB_PREFIX) diff --git a/README.alpine.md b/README.alpine.md index fb0424a88e76..0fe91088c109 100644 --- a/README.alpine.md +++ b/README.alpine.md @@ -10,7 +10,7 @@ git clone https://github.com/ceph/ceph ### Build ``` -./run-make-check.sh -DWITH_EMBEDDED=OFF -DWITH_SYSTEM_BOOST=ON -DWITH_LTTNG=OFF -DWITH_REENTRANT_STRSIGNAL=ON -DWITH_THREAD_SAFE_RES_QUERY=ON +./run-make-check.sh -DWITH_SYSTEM_BOOST=ON -DWITH_LTTNG=OFF -DWITH_REENTRANT_STRSIGNAL=ON -DWITH_THREAD_SAFE_RES_QUERY=ON ``` ### Packaging @@ -28,7 +28,7 @@ cd ceph/src or -./test/docker-test.sh --os-type alpine --os-version edge -- ./run-make-check.sh -DWITH_EMBEDDED=OFF -DWITH_SYSTEM_BOOST=ON -DWITH_LTTNG=OFF -DWITH_REENTRANT_STRSIGNAL=ON -DWITH_THREAD_SAFE_RES_QUERY=ON +./test/docker-test.sh --os-type alpine --os-version edge -- ./run-make-check.sh -DWITH_SYSTEM_BOOST=ON -DWITH_LTTNG=OFF -DWITH_REENTRANT_STRSIGNAL=ON -DWITH_THREAD_SAFE_RES_QUERY=ON ``` diff --git a/alpine/APKBUILD.in b/alpine/APKBUILD.in index e82dd20a50cf..e987a1e007d5 100644 --- a/alpine/APKBUILD.in +++ b/alpine/APKBUILD.in @@ -142,7 +142,6 @@ build() { -DWITH_PYTHON3=OFF \ -DWITH_LTTNG=OFF \ -DWITH_SYSTEM_BOOST=ON \ - -DWITH_EMBEDDED=OFF \ -DWITH_TESTS=${_with_tests:-OFF} \ || return 1 make -j${JOBS:-2} || return 1 diff --git a/ceph.spec.in b/ceph.spec.in index 2f89a9bc1a13..d51501a3e2a0 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -822,7 +822,6 @@ cmake .. \ -DCMAKE_INSTALL_MANDIR=%{_mandir} \ -DCMAKE_INSTALL_DOCDIR=%{_docdir}/ceph \ -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \ - -DWITH_EMBEDDED=OFF \ -DWITH_MANPAGE=ON \ -DWITH_PYTHON3=ON \ -DWITH_SYSTEMD=ON \ diff --git a/cmake/modules/MergeStaticLibraries.cmake b/cmake/modules/MergeStaticLibraries.cmake deleted file mode 100644 index 92d41567b8c8..000000000000 --- a/cmake/modules/MergeStaticLibraries.cmake +++ /dev/null @@ -1,85 +0,0 @@ -# This function is a helper that will merge static libraries. -# For example, -# -# merge_static_libraries(mylib staticlibX staticlibY) -# -# mylib.a will generate a new static library mylib that is -# a combination of staticlibX and staticlibY -# -function(merge_static_libraries target) - - set(dummy_source ${CMAKE_CURRENT_BINARY_DIR}/${target}_dummy.c) - add_library(${target} STATIC ${dummy_source}) - - # remove duplicates - set(libs ${ARGN}) - list(REMOVE_DUPLICATES libs) - - # validate that all libs are static - foreach(lib ${libs}) - if (NOT TARGET ${lib}) - message(FATAL_ERROR "${lib} not a valid target") - endif() - - get_target_property(libtype ${lib} TYPE) - if(NOT libtype STREQUAL "STATIC_LIBRARY") - message(FATAL_ERROR "${lib} not a static library") - endif() - - # add a dependency on the lib - add_dependencies(${target} ${lib}) - endforeach() - - # Force the merged Make the generated dummy source file depended on all static input - # libs. If input lib changes,the source file is touched - # which causes the desired effect (relink). - add_custom_command( - OUTPUT ${dummy_source} - COMMAND ${CMAKE_COMMAND} -E touch ${dummy_source} - DEPENDS ${libs}) - - # only LINUX is currently supported. OSX's libtool and windows lib.exe - # have native support for merging static libraries, and support for them - # can be easily added if required. - if(LINUX) - # generate a script to merge the static libraries in to the target - # library. see https://sourceware.org/binutils/docs/binutils/ar-scripts.html - set(mri_script "open $=") - foreach(lib ${libs}) - # we use the generator expression TARGET_FILE to get the location - # of the library. this will not be expanded until the script file - # is written below - set(mri_script "${mri_script} addlib $=") - endforeach() - set(mri_script "${mri_script} save=end") - - add_custom_command( - TARGET ${target} POST_BUILD - COMMAND echo ${mri_script} | tr = \\\\n | ${CMAKE_AR} -M) - endif(LINUX) - - message("-- MergeStaticLibraries: ${target}: merged ${libs}") - - # we want to set the target_link_libraries correctly for the new merged - # static library. First we get the list of link libraries for each - # of the libs we are merging - set(link_libs) - foreach(lib ${libs}) - get_property(trans TARGET ${lib} PROPERTY LINK_LIBRARIES) - list(APPEND link_libs ${trans}) - endforeach() - - if (link_libs) - # now remove the duplicates and any of the libraries we already merged - list(REMOVE_DUPLICATES link_libs) - foreach(lib ${libs}) - list(REMOVE_ITEM link_libs ${lib}) - endforeach() - - # set the target link libraries - target_link_libraries(${target} ${link_libs}) - - message("-- MergeStaticLibraries: ${target}: remaining ${link_libs}") - endif() - -endfunction() diff --git a/debian/rules b/debian/rules index 9c63c99c3137..99a3e8e9824c 100755 --- a/debian/rules +++ b/debian/rules @@ -5,7 +5,7 @@ export DESTDIR=$(CURDIR)/debian/tmp export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) -extraopts += -DUSE_CRYPTOPP=OFF -DWITH_OCF=ON -DWITH_LTTNG=ON -DWITH_PYTHON3=ON -DWITH_EMBEDDED=OFF +extraopts += -DUSE_CRYPTOPP=OFF -DWITH_OCF=ON -DWITH_LTTNG=ON -DWITH_PYTHON3=ON extraopts += -DWITH_CEPHFS_JAVA=ON # assumes that ceph is exmpt from multiarch support, so we override the libdir. extraopts += -DCMAKE_INSTALL_LIBDIR=/usr/lib diff --git a/do_freebsd.sh b/do_freebsd.sh index bf9007488f06..946f83e572e5 100755 --- a/do_freebsd.sh +++ b/do_freebsd.sh @@ -38,7 +38,6 @@ rm -rf build && ./do_cmake.sh "$*" \ -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 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3d4baae39d86..80d4b351f5d2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1145,7 +1145,3 @@ if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git") endif() add_subdirectory(script) - -if(WITH_EMBEDDED) - add_subdirectory(libcephd) -endif() diff --git a/src/ceph_mds.cc b/src/ceph_mds.cc index b6cff8348eba..7f68e5b521e5 100644 --- a/src/ceph_mds.cc +++ b/src/ceph_mds.cc @@ -88,11 +88,7 @@ static void handle_mds_signal(int signum) mds->handle_signal(signum); } -#ifdef BUILDING_FOR_EMBEDDED -extern "C" int cephd_mds(int argc, const char **argv) -#else int main(int argc, const char **argv) -#endif { ceph_pthread_setname(pthread_self(), "ceph-mds"); diff --git a/src/ceph_mon.cc b/src/ceph_mon.cc index 41a6ee0eb10a..f3c52012e523 100644 --- a/src/ceph_mon.cc +++ b/src/ceph_mon.cc @@ -181,12 +181,7 @@ static void usage() generic_server_usage(); } -#ifdef BUILDING_FOR_EMBEDDED -void cephd_preload_embedded_plugins(); -extern "C" int cephd_mon(int argc, const char **argv) -#else int main(int argc, const char **argv) -#endif { int err; @@ -505,12 +500,8 @@ int main(int argc, const char **argv) } common_init_finish(g_ceph_context); global_init_chdir(g_ceph_context); -#ifndef BUILDING_FOR_EMBEDDED if (global_init_preload_erasure_code(g_ceph_context) < 0) prefork.exit(1); -#else - cephd_preload_embedded_plugins(); -#endif } MonitorDBStore *store = new MonitorDBStore(g_conf->mon_data); diff --git a/src/ceph_osd.cc b/src/ceph_osd.cc index 1cfda9c1ddf3..b2c845065854 100644 --- a/src/ceph_osd.cc +++ b/src/ceph_osd.cc @@ -96,13 +96,7 @@ static void usage() generic_server_usage(); } -#ifdef BUILDING_FOR_EMBEDDED -void cephd_preload_embedded_plugins(); -void cephd_preload_rados_classes(OSD *osd); -extern "C" int cephd_osd(int argc, const char **argv) -#else int main(int argc, const char **argv) -#endif { vector args; argv_to_vec(argc, argv, args); @@ -262,9 +256,6 @@ int main(int argc, const char **argv) return -ENODEV; } -#ifdef BUILDING_FOR_EMBEDDED - cephd_preload_embedded_plugins(); -#endif if (mkkey) { common_init_finish(g_ceph_context); @@ -594,10 +585,8 @@ flushjournal_out: return -1; global_init_chdir(g_ceph_context); -#ifndef BUILDING_FOR_EMBEDDED if (global_init_preload_erasure_code(g_ceph_context) < 0) return -1; -#endif srand(time(NULL) + getpid()); @@ -638,10 +627,6 @@ flushjournal_out: return 1; } -#ifdef BUILDING_FOR_EMBEDDED - cephd_preload_rados_classes(osd); -#endif - // install signal handlers init_async_signal_handler(); register_async_signal_handler(SIGHUP, sighup_handler); diff --git a/src/cls/CMakeLists.txt b/src/cls/CMakeLists.txt index 1c36c1fd0b5e..e4474c0194de 100644 --- a/src/cls/CMakeLists.txt +++ b/src/cls/CMakeLists.txt @@ -1,7 +1,6 @@ ## Rados object classes set(cls_dir ${CMAKE_INSTALL_LIBDIR}/rados-classes) -set(cls_embedded_srcs) # cls_sdk add_library(cls_sdk SHARED sdk/cls_sdk.cc) @@ -16,7 +15,6 @@ set_target_properties(cls_hello PROPERTIES SOVERSION "1" INSTALL_RPATH "") install(TARGETS cls_hello DESTINATION ${cls_dir}) -list(APPEND cls_embedded_srcs ${cls_hello_srcs}) # cls_numops set(cls_numops_srcs numops/cls_numops.cc) @@ -30,7 +28,6 @@ install(TARGETS cls_numops DESTINATION ${cls_dir}) set(cls_numops_client_srcs numops/cls_numops_client.cc) add_library(cls_numops_client STATIC ${cls_numops_client_srcs}) -list(APPEND cls_embedded_srcs ${cls_numops_srcs} ${cls_numops_client_srcs}) # cls_rbd if (WITH_RBD) @@ -46,7 +43,6 @@ if (WITH_RBD) add_library(cls_rbd_client STATIC ${cls_rbd_client_srcs}) target_link_libraries(cls_rbd_client cls_lock_client) - list(APPEND cls_embedded_srcs ${cls_rbd_srcs} ${cls_rbd_client_srcs}) endif (WITH_RBD) # cls_lock @@ -64,7 +60,6 @@ set(cls_lock_client_srcs lock/cls_lock_ops.cc) add_library(cls_lock_client STATIC ${cls_lock_client_srcs}) -list(APPEND cls_embedded_srcs ${cls_lock_srcs} ${cls_lock_client_srcs}) # cls_refcount set(cls_refcount_srcs @@ -84,7 +79,6 @@ set(cls_refcount_client_srcs refcount/cls_refcount_ops.cc) add_library(cls_refcount_client STATIC ${cls_refcount_client_srcs}) -list(APPEND cls_embedded_srcs ${cls_refcount_srcs} ${cls_refcount_client_srcs}) # cls_version set(cls_version_srcs version/cls_version.cc) @@ -100,7 +94,6 @@ set(cls_version_client_srcs version/cls_version_types.cc) add_library(cls_version_client STATIC ${cls_version_client_srcs}) -list(APPEND cls_embedded_srcs ${cls_version_srcs} ${cls_version_client_srcs}) # cls_log set(cls_log_srcs log/cls_log.cc) @@ -114,7 +107,6 @@ install(TARGETS cls_log DESTINATION ${cls_dir}) set(cls_log_client_srcs log/cls_log_client.cc) add_library(cls_log_client STATIC ${cls_log_client_srcs}) -list(APPEND cls_embedded_srcs ${cls_log_srcs} ${cls_log_client_srcs}) # cls_statelog set(cls_statelog_srcs statelog/cls_statelog.cc) @@ -128,7 +120,6 @@ install(TARGETS cls_statelog DESTINATION ${cls_dir}) set(cls_statelog_client_srcs statelog/cls_statelog_client.cc) add_library(cls_statelog_client STATIC ${cls_statelog_client_srcs}) -list(APPEND cls_embedded_srcs ${cls_statelog_srcs} ${cls_statelog_client_srcs}) # cls_timeindex set(cls_timeindex_srcs timeindex/cls_timeindex.cc) @@ -142,7 +133,6 @@ install(TARGETS cls_timeindex DESTINATION ${cls_dir}) set(cls_timeindex_client_srcs timeindex/cls_timeindex_client.cc) add_library(cls_timeindex_client STATIC ${cls_timeindex_client_srcs}) -list(APPEND cls_embedded_srcs ${cls_timeindex_srcs} ${cls_timeindex_client_srcs}) # cls_replica_log set(cls_replica_log_srcs replica_log/cls_replica_log.cc) @@ -176,7 +166,6 @@ set(cls_user_client_srcs user/cls_user_ops.cc) add_library(cls_user_client STATIC ${cls_user_client_srcs}) -list(APPEND cls_embedded_srcs ${cls_user_srcs} ${cls_user_client_srcs}) # cls_journal set(cls_journal_srcs @@ -194,7 +183,6 @@ set(cls_journal_client_srcs journal/cls_journal_types.cc) add_library(cls_journal_client STATIC ${cls_journal_client_srcs}) -list(APPEND cls_embedded_srcs ${cls_journal_srcs} ${cls_journal_client_srcs}) # cls_rgw if (WITH_RADOSGW) @@ -217,7 +205,6 @@ if (WITH_RADOSGW) rgw/cls_rgw_ops.cc) add_library(cls_rgw_client STATIC ${cls_rgw_client_srcs}) - list(APPEND cls_embedded_srcs ${cls_rgw_srcs} ${cls_rgw_client_srcs}) endif (WITH_RADOSGW) # cls_cephfs @@ -235,7 +222,6 @@ if (WITH_CEPHFS) cephfs/cls_cephfs_client.cc) add_library(cls_cephfs_client STATIC ${cls_cephfs_client_srcs}) - list(APPEND cls_embedded_srcs ${cls_cephfs_srcs} ${cls_cephfs_client_srcs}) endif (WITH_CEPHFS) # cls_lua @@ -256,15 +242,3 @@ set(cls_lua_client_srcs lua/cls_lua_client.cc) add_library(cls_lua_client STATIC ${cls_lua_client_srcs}) -list(APPEND cls_embedded_srcs ${cls_lua_srcs} ${cls_lua_client_srcs}) - -if(WITH_EMBEDDED) - include(MergeStaticLibraries) - list(REMOVE_DUPLICATES cls_embedded_srcs) - add_library(cephd_cls_base STATIC ${cls_embedded_srcs}) - # while not necessary this seems to bring in the lua's include directories - # so that cls_lua srcs build correctly - target_link_libraries(cephd_cls_base liblua) - set_target_properties(cephd_cls_base PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED) - merge_static_libraries(cephd_cls cephd_cls_base liblua) -endif() diff --git a/src/compressor/CMakeLists.txt b/src/compressor/CMakeLists.txt index 8e0e61cdb91f..9574d65574a1 100644 --- a/src/compressor/CMakeLists.txt +++ b/src/compressor/CMakeLists.txt @@ -27,18 +27,3 @@ endif() add_custom_target(compressor_plugins DEPENDS ${ceph_compressor_libs}) - -if(WITH_EMBEDDED) - include(MergeStaticLibraries) - add_library(cephd_compressor_base STATIC ${compressor_srcs}) - set_target_properties(cephd_compressor_base PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED) - set(cephd_compressor_libs - cephd_compressor_base - cephd_compressor_snappy - cephd_compressor_zlib - cephd_compressor_zstd) - if (HAVE_LZ4) - list(APPEND cephd_compressor_libs cephd_compressor_lz4) - endif() - merge_static_libraries(cephd_compressor ${cephd_compressor_libs}) -endif() diff --git a/src/compressor/lz4/CMakeLists.txt b/src/compressor/lz4/CMakeLists.txt index 7a53000e9f74..f5531a04f601 100644 --- a/src/compressor/lz4/CMakeLists.txt +++ b/src/compressor/lz4/CMakeLists.txt @@ -12,8 +12,3 @@ set_target_properties(ceph_lz4 PROPERTIES SOVERSION 2 INSTALL_RPATH "") install(TARGETS ceph_lz4 DESTINATION ${compressor_plugin_dir}) - -if(WITH_EMBEDDED) - add_library(cephd_compressor_lz4 STATIC ${lz4_sources}) - set_target_properties(cephd_compressor_lz4 PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED) -endif() diff --git a/src/compressor/lz4/CompressionPluginLZ4.cc b/src/compressor/lz4/CompressionPluginLZ4.cc index c99e5dcdc8d5..99d018765ba5 100644 --- a/src/compressor/lz4/CompressionPluginLZ4.cc +++ b/src/compressor/lz4/CompressionPluginLZ4.cc @@ -16,8 +16,6 @@ #include "ceph_ver.h" #include "CompressionPluginLZ4.h" -#ifndef BUILDING_FOR_EMBEDDED - // ----------------------------------------------------------------------------- const char *__ceph_plugin_version() @@ -35,5 +33,3 @@ int __ceph_plugin_init(CephContext *cct, return instance->add(type, name, new CompressionPluginLZ4(cct)); } - -#endif // !BUILDING_FOR_EMBEDDED diff --git a/src/compressor/snappy/CMakeLists.txt b/src/compressor/snappy/CMakeLists.txt index 8ce0bd04a300..1cb6d50af606 100644 --- a/src/compressor/snappy/CMakeLists.txt +++ b/src/compressor/snappy/CMakeLists.txt @@ -12,8 +12,3 @@ set_target_properties(ceph_snappy PROPERTIES SOVERSION 2 INSTALL_RPATH "") install(TARGETS ceph_snappy DESTINATION ${compressor_plugin_dir}) - -if(WITH_EMBEDDED) - add_library(cephd_compressor_snappy STATIC ${snappy_sources}) - set_target_properties(cephd_compressor_snappy PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED) -endif() diff --git a/src/compressor/snappy/CompressionPluginSnappy.cc b/src/compressor/snappy/CompressionPluginSnappy.cc index 6d67c41c746d..44d77ccbb6f3 100644 --- a/src/compressor/snappy/CompressionPluginSnappy.cc +++ b/src/compressor/snappy/CompressionPluginSnappy.cc @@ -18,8 +18,6 @@ #include "ceph_ver.h" #include "CompressionPluginSnappy.h" -#ifndef BUILDING_FOR_EMBEDDED - // ----------------------------------------------------------------------------- const char *__ceph_plugin_version() @@ -37,5 +35,3 @@ int __ceph_plugin_init(CephContext *cct, return instance->add(type, name, new CompressionPluginSnappy(cct)); } - -#endif // !BUILDING_FOR_EMBEDDED diff --git a/src/compressor/zlib/CMakeLists.txt b/src/compressor/zlib/CMakeLists.txt index 1b3bc259a351..037416c3d7fc 100644 --- a/src/compressor/zlib/CMakeLists.txt +++ b/src/compressor/zlib/CMakeLists.txt @@ -46,9 +46,3 @@ set_target_properties(ceph_zlib PROPERTIES SOVERSION 2 INSTALL_RPATH "") install(TARGETS ceph_zlib DESTINATION ${compressor_plugin_dir}) - -if(WITH_EMBEDDED) - add_library(cephd_compressor_zlib STATIC ${zlib_sources}) - target_include_directories(cephd_compressor_zlib PRIVATE "${CMAKE_SOURCE_DIR}/src/isa-l/include") - set_target_properties(cephd_compressor_zlib PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED) -endif() diff --git a/src/compressor/zlib/CompressionPluginZlib.cc b/src/compressor/zlib/CompressionPluginZlib.cc index 26969f8377a2..3602ea4a8f75 100644 --- a/src/compressor/zlib/CompressionPluginZlib.cc +++ b/src/compressor/zlib/CompressionPluginZlib.cc @@ -18,7 +18,6 @@ #include "ceph_ver.h" #include "CompressionPluginZlib.h" -#ifndef BUILDING_FOR_EMBEDDED // ----------------------------------------------------------------------------- const char *__ceph_plugin_version() @@ -36,5 +35,3 @@ int __ceph_plugin_init(CephContext *cct, return instance->add(type, name, new CompressionPluginZlib(cct)); } - -#endif // !BUILDING_FOR_EMBEDDED diff --git a/src/compressor/zstd/CMakeLists.txt b/src/compressor/zstd/CMakeLists.txt index d9d2b6e560d3..448d610cd0a2 100644 --- a/src/compressor/zstd/CMakeLists.txt +++ b/src/compressor/zstd/CMakeLists.txt @@ -37,8 +37,3 @@ add_dependencies(ceph_zstd ${CMAKE_SOURCE_DIR}/src/ceph_ver.h) target_link_libraries(ceph_zstd zstd) set_target_properties(ceph_zstd PROPERTIES VERSION 2.0.0 SOVERSION 2) install(TARGETS ceph_zstd DESTINATION ${compressor_plugin_dir}) - -if(WITH_EMBEDDED) - add_library(cephd_compressor_zstd STATIC ${zstd_sources}) - set_target_properties(cephd_compressor_zstd PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED) -endif() diff --git a/src/compressor/zstd/CompressionPluginZstd.cc b/src/compressor/zstd/CompressionPluginZstd.cc index 321b3dd96f62..d9007b788a4d 100644 --- a/src/compressor/zstd/CompressionPluginZstd.cc +++ b/src/compressor/zstd/CompressionPluginZstd.cc @@ -16,8 +16,6 @@ #include "ceph_ver.h" #include "CompressionPluginZstd.h" -#ifndef BUILDING_FOR_EMBEDDED - // ----------------------------------------------------------------------------- const char *__ceph_plugin_version() @@ -35,5 +33,3 @@ int __ceph_plugin_init(CephContext *cct, return instance->add(type, name, new CompressionPluginZstd(cct)); } - -#endif // !BUILDING_FOR_EMBEDDED diff --git a/src/erasure-code/CMakeLists.txt b/src/erasure-code/CMakeLists.txt index 450ec716973e..1b4870403a36 100644 --- a/src/erasure-code/CMakeLists.txt +++ b/src/erasure-code/CMakeLists.txt @@ -24,7 +24,6 @@ add_subdirectory(shec) if (HAVE_BETTER_YASM_ELF64) add_subdirectory(isa) set(EC_ISA_LIB ec_isa) - set(EC_ISA_EMBEDDED_LIB cephd_ec_isa) endif (HAVE_BETTER_YASM_ELF64) add_library(erasure_code STATIC ErasureCodePlugin.cc) @@ -38,10 +37,3 @@ add_custom_target(erasure_code_plugins DEPENDS ec_lrc ec_jerasure ec_shec) - -if(WITH_EMBEDDED) - include(MergeStaticLibraries) - add_library(cephd_ec_base STATIC $) - set_target_properties(cephd_ec_base PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED) - merge_static_libraries(cephd_ec cephd_ec_base ${EC_ISA_EMBEDDED_LIB} cephd_ec_jerasure cephd_ec_lrc cephd_ec_shec) -endif() diff --git a/src/erasure-code/isa/CMakeLists.txt b/src/erasure-code/isa/CMakeLists.txt index e0a511e0a8e4..6fcbb48894af 100644 --- a/src/erasure-code/isa/CMakeLists.txt +++ b/src/erasure-code/isa/CMakeLists.txt @@ -66,8 +66,3 @@ target_link_libraries(ec_isa ${EXTRALIBS}) set_target_properties(ec_isa PROPERTIES INSTALL_RPATH "") install(TARGETS ec_isa DESTINATION ${erasure_plugin_dir}) - -if(WITH_EMBEDDED) - add_library(cephd_ec_isa STATIC ${isa_srcs}) - set_target_properties(cephd_ec_isa PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED) -endif() diff --git a/src/erasure-code/isa/ErasureCodePluginIsa.cc b/src/erasure-code/isa/ErasureCodePluginIsa.cc index 0641f457d49f..5eda591bac59 100644 --- a/src/erasure-code/isa/ErasureCodePluginIsa.cc +++ b/src/erasure-code/isa/ErasureCodePluginIsa.cc @@ -65,8 +65,6 @@ int ErasureCodePluginIsa::factory(const std::string &directory, return 0; } -#ifndef BUILDING_FOR_EMBEDDED - // ----------------------------------------------------------------------------- const char *__erasure_code_version() @@ -82,5 +80,3 @@ int __erasure_code_init(char *plugin_name, char *directory) return instance.add(plugin_name, new ErasureCodePluginIsa()); } - -#endif diff --git a/src/erasure-code/jerasure/CMakeLists.txt b/src/erasure-code/jerasure/CMakeLists.txt index 7f752806cda7..cf2c6e0fbf7a 100644 --- a/src/erasure-code/jerasure/CMakeLists.txt +++ b/src/erasure-code/jerasure/CMakeLists.txt @@ -102,11 +102,3 @@ foreach(flavor ${jerasure_legacy_flavors}) install(TARGETS ${plugin_name} DESTINATION ${erasure_plugin_dir}) add_dependencies(ec_jerasure ${plugin_name}) endforeach() - -if(WITH_EMBEDDED) - add_library(cephd_ec_jerasure STATIC - $ - $ - ${jerasure_utils_src}) - set_target_properties(cephd_ec_jerasure PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED) -endif() diff --git a/src/erasure-code/jerasure/ErasureCodePluginJerasure.cc b/src/erasure-code/jerasure/ErasureCodePluginJerasure.cc index 38f403826e76..966c765565d9 100644 --- a/src/erasure-code/jerasure/ErasureCodePluginJerasure.cc +++ b/src/erasure-code/jerasure/ErasureCodePluginJerasure.cc @@ -71,8 +71,6 @@ int ErasureCodePluginJerasure::factory(const std::string& directory, return 0; } -#ifndef BUILDING_FOR_EMBEDDED - const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; } int __erasure_code_init(char *plugin_name, char *directory) @@ -85,5 +83,3 @@ int __erasure_code_init(char *plugin_name, char *directory) } return instance.add(plugin_name, new ErasureCodePluginJerasure()); } - -#endif \ No newline at end of file diff --git a/src/erasure-code/lrc/CMakeLists.txt b/src/erasure-code/lrc/CMakeLists.txt index c25fc695f2fa..5d2eaeceffdc 100644 --- a/src/erasure-code/lrc/CMakeLists.txt +++ b/src/erasure-code/lrc/CMakeLists.txt @@ -14,8 +14,3 @@ set_target_properties(ec_lrc PROPERTIES INSTALL_RPATH "") target_link_libraries(ec_lrc json_spirit) install(TARGETS ec_lrc DESTINATION ${erasure_plugin_dir}) - -if(WITH_EMBEDDED) - add_library(cephd_ec_lrc STATIC ${lrc_srcs}) - set_target_properties(cephd_ec_lrc PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED) -endif() diff --git a/src/erasure-code/lrc/ErasureCodePluginLrc.cc b/src/erasure-code/lrc/ErasureCodePluginLrc.cc index b5699cd74b2f..1731148ba6e3 100644 --- a/src/erasure-code/lrc/ErasureCodePluginLrc.cc +++ b/src/erasure-code/lrc/ErasureCodePluginLrc.cc @@ -39,8 +39,6 @@ int ErasureCodePluginLrc::factory(const std::string &directory, return 0; }; -#ifndef BUILDING_FOR_EMBEDDED - const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; } int __erasure_code_init(char *plugin_name, char *directory) @@ -48,5 +46,3 @@ int __erasure_code_init(char *plugin_name, char *directory) ErasureCodePluginRegistry &instance = ErasureCodePluginRegistry::instance(); return instance.add(plugin_name, new ErasureCodePluginLrc()); } - -#endif diff --git a/src/erasure-code/shec/CMakeLists.txt b/src/erasure-code/shec/CMakeLists.txt index d5f8e15ada4a..1793b127ecd5 100644 --- a/src/erasure-code/shec/CMakeLists.txt +++ b/src/erasure-code/shec/CMakeLists.txt @@ -33,9 +33,3 @@ foreach(flavor ${jerasure_legacy_flavors}) install(TARGETS ${plugin_name} DESTINATION ${erasure_plugin_dir}) add_dependencies(ec_shec ${plugin_name}) endforeach() - -if(WITH_EMBEDDED) - # note we rely on the fact this will always be statically linked with jerasure - add_library(cephd_ec_shec STATIC ${shec_utils_srcs}) - set_target_properties(cephd_ec_shec PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED) -endif() diff --git a/src/erasure-code/shec/ErasureCodePluginShec.cc b/src/erasure-code/shec/ErasureCodePluginShec.cc index eb967f8d4637..b0ecf3f02b1c 100644 --- a/src/erasure-code/shec/ErasureCodePluginShec.cc +++ b/src/erasure-code/shec/ErasureCodePluginShec.cc @@ -68,8 +68,6 @@ int ErasureCodePluginShec::factory(const std::string &directory, return 0; } -#ifndef BUILDING_FOR_EMBEDDED - const char *__erasure_code_version() { return CEPH_GIT_NICE_VER; } int __erasure_code_init(char *plugin_name, char *directory = (char *)"") @@ -82,5 +80,3 @@ int __erasure_code_init(char *plugin_name, char *directory = (char *)"") } return instance.add(plugin_name, new ErasureCodePluginShec()); } - -#endif \ No newline at end of file diff --git a/src/include/cephd/libcephd.h b/src/include/cephd/libcephd.h deleted file mode 100644 index 0ec6bb7694b1..000000000000 --- a/src/include/cephd/libcephd.h +++ /dev/null @@ -1,108 +0,0 @@ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#define LIBCEPHD_VER_MAJOR 0 -#define LIBCEPHD_VER_MINOR 1 -#define LIBCEPHD_VER_PATCH 0 - -#define LIBCEPHFD_VERSION(maj, min, extra) ((maj << 16) + (min << 8) + extra) -#define LIBCEPHFD_VERSION_CODE LIBCEPHD_VERSION(LIBCEPHD_VER_MAJOR, LIBCEPHD_VER_MINOR, LIBCEPHD_VER_PATCH) - -#define CEPH_LIBCEPHD_API __attribute__ ((visibility ("default"))) - -/** - * Get the API version of libcephd. We use semantic versioning - * for the API: - * - * - incrementing major is for backwards-incompatible changes - * - incrementing minor is for backwards-compatible changes - * - incrementing extra is for bug fixes - * - * @param pmajor where to store the major version number - * @param pminor where to store the minor version number - * @param ppatch where to store the patch version number - */ -CEPH_LIBCEPHD_API void cephd_version(int *pmajor, int *pminor, int *ppatch); - -/** - * Gets the runtime version of ceph. - * - * @param pmajor where to store the major version number - * @param pminor where to store the minor version number - * @param ppatch where to store the patch version number - */ -CEPH_LIBCEPHD_API const char *ceph_version(int *pmajor, int *pminor, int *ppatch); - -/** - * Generates a new cluster id (fsid) and returns a hexadecimal string. - * - * @param context where to the store the handle - * @param buf where to write the fsid - * @param len the size of buf in bytes (should be at least 37) - * @returns 0 on success, negative error code on failure - * @returns -ERANGE if the buffer is too short to contain the key - */ -CEPH_LIBCEPHD_API int cephd_generate_fsid(char *buf, size_t len); - -/** - * Generates a new secret key and returns a base64 encoded string. - * - * @param context where to the store the handle - * @param buf where to write the fsid - * @param len the size of buf in bytes - * @returns 0 on success, negative error code on failure - * @returns -ERANGE if the buffer is too short to contain the key - */ -CEPH_LIBCEPHD_API int cephd_generate_secret_key(char *buf, size_t len); - -/** - * Runs ceph-mon passing in command line args - * - * @param argc number of parameters - * @param argv array of string arguments - * @returns 0 on success, negative error code on failure - */ -CEPH_LIBCEPHD_API int cephd_run_mon(int argc, const char **argv); - -/** - * Runs ceph-osd passing in command line args - * - * @param argc number of parameters - * @param argv array of string arguments - * @returns 0 on success, negative error code on failure - */ -CEPH_LIBCEPHD_API int cephd_run_osd(int argc, const char **argv); - -/** - * Runs ceph-mds passing in command line args - * - * @param argc number of parameters - * @param argv array of string arguments - * @returns 0 on success, negative error code on failure - */ -CEPH_LIBCEPHD_API int cephd_run_mds(int argc, const char **argv); - -/** - * Runs ceph-rgw passing in command line args - * - * @param argc number of parameters - * @param argv array of string arguments - * @returns 0 on success, negative error code on failure - */ -CEPH_LIBCEPHD_API int cephd_run_rgw(int argc, const char **argv); - -/** - * Runs radosgw-admin passing in command line args - * - * @param argc number of parameters - * @param argv array of string arguments - * @returns 0 on success, negative error code on failure - */ -CEPH_LIBCEPHD_API int cephd_run_rgw_admin(int argc, const char **argv); - -#ifdef __cplusplus -} -#endif diff --git a/src/include/config-h.in.cmake b/src/include/config-h.in.cmake index 0b6b5248842f..19f1d0a5fe40 100644 --- a/src/include/config-h.in.cmake +++ b/src/include/config-h.in.cmake @@ -136,9 +136,6 @@ /* ibverbs experimental conditional compilation */ #cmakedefine HAVE_IBV_EXP -/* define if embedded enabled */ -#cmakedefine WITH_EMBEDDED - /* define if cephfs enabled */ #cmakedefine WITH_CEPHFS diff --git a/src/include/rados/objclass.h b/src/include/rados/objclass.h index ea07dfc790ae..e61ce8163eb4 100644 --- a/src/include/rados/objclass.h +++ b/src/include/rados/objclass.h @@ -11,7 +11,6 @@ extern "C" { #endif -#ifndef BUILDING_FOR_EMBEDDED #define CLS_VER(maj,min) \ int __cls_ver__## maj ## _ ##min = 0; \ int __cls_ver_maj = maj; \ @@ -22,12 +21,6 @@ int __cls_name__## name = 0; \ const char *__cls_name = #name; #define CLS_INIT(name) \ void CEPH_CLS_API __cls_init() -#else -#define CLS_VER(maj,min) -#define CLS_NAME(name) -#define CLS_INIT(name) \ -void CEPH_CLS_API name##_cls_init() -#endif #define CLS_METHOD_RD 0x1 /// method executes read operations #define CLS_METHOD_WR 0x2 /// method executes write operations diff --git a/src/key_value_store/CMakeLists.txt b/src/key_value_store/CMakeLists.txt index 2c65614479f1..0b17ede1ddcf 100644 --- a/src/key_value_store/CMakeLists.txt +++ b/src/key_value_store/CMakeLists.txt @@ -5,8 +5,3 @@ set_target_properties(cls_kvs PROPERTIES SOVERSION "1" INSTALL_RPATH "") install(TARGETS cls_kvs DESTINATION ${CMAKE_INSTALL_LIBDIR}/rados-classes) - -if(WITH_EMBEDDED) - add_library(cephd_cls_kvs STATIC ${kvs_srcs}) - set_target_properties(cephd_cls_kvs PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED) -endif() diff --git a/src/libcephd/CMakeLists.txt b/src/libcephd/CMakeLists.txt deleted file mode 100644 index 223184fafecc..000000000000 --- a/src/libcephd/CMakeLists.txt +++ /dev/null @@ -1,51 +0,0 @@ -include(MergeStaticLibraries) - -add_library(cephd_base STATIC - libcephd.cc - ../ceph_mon.cc - ../ceph_osd.cc - ../ceph_mds.cc) - -set_target_properties(cephd_base PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED) - -set(merge_libs - cephd_base - cephd_compressor - cephd_ec - cephd_cls - cephd_cls_kvs - cephd_rados - common - common_utf8 - erasure_code - global - json_spirit - kv - mds - mon - os - osd - osdc) - -if(NOT WITH_SYSTEM_ROCKSDB) - list(APPEND merge_libs ${ROCKSDB_LIBRARIES}) -endif(NOT WITH_SYSTEM_ROCKSDB) - -if(WITH_RADOSGW) - list(APPEND merge_libs cephd_rgw) -endif(WITH_RADOSGW) - -if(WITH_RBD) - list(APPEND merge_libs cephd_rbd) -endif(WITH_RBD) - -if(HAVE_ARMV8_CRC) - list(APPEND merge_libs common_crc_aarch64) -endif(HAVE_ARMV8_CRC) - -merge_static_libraries(cephd ${merge_libs}) - -# TODO: install these libraries and add them to rpm and deb packages -#install(TARGETS cephd DESTINATION ${CMAKE_INSTALL_LIBDIR}) -#install(FILES ../include/cephd/libcephd.h -# DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cephd) diff --git a/src/libcephd/libcephd.cc b/src/libcephd/libcephd.cc deleted file mode 100644 index 71b0767f03c5..000000000000 --- a/src/libcephd/libcephd.cc +++ /dev/null @@ -1,262 +0,0 @@ -#include "acconfig.h" -#include "auth/Auth.h" -#include "auth/Crypto.h" -#include "auth/KeyRing.h" -#include "common/ceph_argparse.h" -#include "common/version.h" -#include "common/PluginRegistry.h" -#include "compressor/snappy/CompressionPluginSnappy.h" -#include "compressor/zlib/CompressionPluginZlib.h" -#include "compressor/zstd/CompressionPluginZstd.h" -#include "erasure-code/ErasureCodePlugin.h" -#if __x86_64__ && defined(HAVE_BETTER_YASM_ELF64) -#include "erasure-code/isa/ErasureCodePluginIsa.h" -#endif -#include "erasure-code/jerasure/ErasureCodePluginJerasure.h" -#include "erasure-code/jerasure/jerasure_init.h" -#include "erasure-code/lrc/ErasureCodePluginLrc.h" -#include "erasure-code/shec/ErasureCodePluginShec.h" -#include "include/cephd/libcephd.h" -#include "global/global_context.h" -#include "global/global_init.h" -#include "objclass/objclass.h" -#include "osd/OSD.h" -#include "osd/ClassHandler.h" - -// forward declarations of RADOS class init functions -CLS_INIT(cephfs); -CLS_INIT(hello); -CLS_INIT(journal); -CLS_INIT(kvs); -CLS_INIT(lock); -CLS_INIT(log); -CLS_INIT(lua); -CLS_INIT(numops); -CLS_INIT(rbd); -CLS_INIT(refcount); -CLS_INIT(replica_log); -CLS_INIT(rgw); -CLS_INIT(statelog); -CLS_INIT(timeindex); -CLS_INIT(user); -CLS_INIT(version); - -extern "C" void cephd_version(int *pmajor, int *pminor, int *ppatch) -{ - if (pmajor) - *pmajor = LIBCEPHD_VER_MAJOR; - if (pminor) - *pminor = LIBCEPHD_VER_MINOR; - if (ppatch) - *ppatch = LIBCEPHD_VER_PATCH; -} - -extern "C" const char *ceph_version(int *pmajor, int *pminor, int *ppatch) -{ - int major, minor, patch; - const char *v = ceph_version_to_str(); - - int n = sscanf(v, "%d.%d.%d", &major, &minor, &patch); - if (pmajor) - *pmajor = (n >= 1) ? major : 0; - if (pminor) - *pminor = (n >= 2) ? minor : 0; - if (ppatch) - *ppatch = (n >= 3) ? patch : 0; - return v; -} - -extern "C" int cephd_generate_fsid(char *buf, size_t len) -{ - if (len < sizeof("b06ad912-70d7-4263-a5ff-011462a5929a")) { - return -ERANGE; - } - - uuid_d fsid; - fsid.generate_random(); - fsid.print(buf); - - return 0; -} - -extern "C" int cephd_generate_secret_key(char *buf, size_t len) -{ - CephInitParameters iparams(CEPH_ENTITY_TYPE_MON); - CephContext *cct = common_preinit(iparams, CODE_ENVIRONMENT_LIBRARY, 0); - cct->_conf->apply_changes(NULL); - cct->init_crypto(); - - CryptoKey key; - key.create(cct, CEPH_CRYPTO_AES); - - cct->put(); - - string keystr; - key.encode_base64(keystr); - if (keystr.length() >= len) { - return -ERANGE; - } - strcpy(buf, keystr.c_str()); - return keystr.length(); -} - -// load the embedded plugins. This is safe to call multiple -// times in the same process -void cephd_preload_embedded_plugins() -{ - int r; - - // load erasure coding plugins - { - ErasureCodePlugin* plugin; - ErasureCodePluginRegistry& reg = ErasureCodePluginRegistry::instance(); - Mutex::Locker l(reg.lock); - reg.disable_dlclose = true; - - // initialize jerasure (and gf-complete) - int w[] = { 4, 8, 16, 32 }; - r = jerasure_init(4, w); - assert(r == 0); - - plugin = new ErasureCodePluginJerasure(); - r = reg.add("jerasure", plugin); - if (r == -EEXIST) { - delete plugin; - } - assert(r == 0); - - plugin = new ErasureCodePluginLrc(); - r = reg.add("lrc", plugin); - if (r == -EEXIST) { - delete plugin; - } - assert(r == 0); - - plugin = new ErasureCodePluginShec(); - r = reg.add("shec", plugin); - if (r == -EEXIST) { - delete plugin; - } - assert(r == 0); - -#if __x86_64__ && defined(HAVE_BETTER_YASM_ELF64) - plugin = new ErasureCodePluginIsa(); - r = reg.add("isa", plugin); - if (r == -EEXIST) { - delete plugin; - } - assert(r == 0); -#endif - } - - // now load the compression plugins - { - Plugin *plugin; - PluginRegistry *reg = g_ceph_context->get_plugin_registry(); - Mutex::Locker l(reg->lock); - reg->disable_dlclose = true; - - plugin = new CompressionPluginSnappy(g_ceph_context); - r = reg->add("compressor", "snappy", plugin); - if (r == -EEXIST) { - delete plugin; - } - assert(r == 0); - - plugin = new CompressionPluginZlib(g_ceph_context); - r = reg->add("compressor", "zlib", plugin); - if (r == -EEXIST) { - delete plugin; - } - assert(r == 0); - - plugin = new CompressionPluginZstd(g_ceph_context); - r = reg->add("compressor", "zstd", plugin); - if (r == -EEXIST) { - delete plugin; - } - assert(r == 0); - } -} - -void cephd_preload_rados_classes(OSD *osd) -{ - // intialize RADOS classes - { - ClassHandler *class_handler = osd->class_handler; - Mutex::Locker l(class_handler->mutex); - -#ifdef WITH_CEPHFS - class_handler->add_embedded_class("cephfs"); - cephfs_cls_init(); -#endif - class_handler->add_embedded_class("hello"); - hello_cls_init(); - class_handler->add_embedded_class("journal"); - journal_cls_init(); -#ifdef WITH_KVS - class_handler->add_embedded_class("kvs"); - kvs_cls_init(); -#endif - class_handler->add_embedded_class("lock"); - lock_cls_init(); - class_handler->add_embedded_class("log"); - log_cls_init(); - class_handler->add_embedded_class("lua"); - lua_cls_init(); - class_handler->add_embedded_class("numops"); - numops_cls_init(); -#ifdef WITH_RBD - class_handler->add_embedded_class("rbd"); - rbd_cls_init(); -#endif - class_handler->add_embedded_class("refcount"); - refcount_cls_init(); - class_handler->add_embedded_class("replica_log"); - replica_log_cls_init(); -#ifdef WITH_RADOSGW - class_handler->add_embedded_class("rgw"); - rgw_cls_init(); -#endif - class_handler->add_embedded_class("statelog"); - statelog_cls_init(); - class_handler->add_embedded_class("timeindex"); - timeindex_cls_init(); - class_handler->add_embedded_class("user"); - user_cls_init(); - class_handler->add_embedded_class("version"); - version_cls_init(); - } -} - -extern "C" int cephd_mon(int argc, const char **argv); -extern "C" int cephd_osd(int argc, const char **argv); -extern "C" int cephd_mds(int argc, const char **argv); -extern "C" int cephd_rgw(int argc, const char **argv); -extern "C" int cephd_rgw_admin(int argc, const char **argv); - -int cephd_run_mon(int argc, const char **argv) -{ - return cephd_mon(argc, argv); -} - -int cephd_run_osd(int argc, const char **argv) -{ - return cephd_osd(argc, argv); -} - -int cephd_run_mds(int argc, const char **argv) -{ - return cephd_mds(argc, argv); -} - - -int cephd_run_rgw(int argc, const char **argv) -{ - return cephd_rgw(argc, argv); -} - -int cephd_run_rgw_admin(int argc, const char **argv) -{ - return cephd_rgw_admin(argc, argv); -} diff --git a/src/librados/CMakeLists.txt b/src/librados/CMakeLists.txt index d8b48256e94a..e9e402400d68 100644 --- a/src/librados/CMakeLists.txt +++ b/src/librados/CMakeLists.txt @@ -35,11 +35,6 @@ else(ENABLE_SHARED) endif(ENABLE_SHARED) install(TARGETS librados DESTINATION ${CMAKE_INSTALL_LIBDIR}) -if(WITH_EMBEDDED) - add_library(cephd_rados STATIC - $ - $) -endif() if(WITH_LTTNG AND WITH_EVENTTRACE) add_dependencies(librados_api_obj eventtrace_tp) endif() diff --git a/src/librbd/CMakeLists.txt b/src/librbd/CMakeLists.txt index 1b04ec91ab81..072eaed491fe 100644 --- a/src/librbd/CMakeLists.txt +++ b/src/librbd/CMakeLists.txt @@ -139,8 +139,3 @@ if(ENABLE_SHARED) LINK_FLAGS "-Wl,--exclude-libs,ALL") endif(ENABLE_SHARED) install(TARGETS librbd DESTINATION ${CMAKE_INSTALL_LIBDIR}) - -if(WITH_EMBEDDED) - add_library(cephd_rbd_base STATIC librbd.cc ${CMAKE_SOURCE_DIR}/src/common/ContextCompletion.cc) - merge_static_libraries(cephd_rbd cephd_rbd_base rbd_internal rbd_types journal) -endif() diff --git a/src/rgw/CMakeLists.txt b/src/rgw/CMakeLists.txt index b3aa4e38ada8..ff2d2d8a1204 100644 --- a/src/rgw/CMakeLists.txt +++ b/src/rgw/CMakeLists.txt @@ -257,16 +257,3 @@ target_link_libraries(rgw LINK_PRIVATE set_target_properties(rgw PROPERTIES OUTPUT_NAME rgw VERSION 2.0.0 SOVERSION 2) install(TARGETS rgw DESTINATION ${CMAKE_INSTALL_LIBDIR}) - -if(WITH_EMBEDDED) - include(MergeStaticLibraries) - add_library(cephd_rgw_base STATIC rgw_main.cc ${radosgw_admin_srcs}) - if(WITH_RADOSGW_FCGI_FRONTEND) - target_include_directories(cephd_rgw_base PUBLIC ${FCGI_INCLUDE_DIR}) - endif() - set_target_properties(cephd_rgw_base PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED) - merge_static_libraries(cephd_rgw cephd_rgw_base rgw_a radosgw_a) - if(WITH_RADOSGW_FCGI_FRONTEND) - target_link_libraries(cephd_rgw ${FCGI_LIBRARY}) - endif() -endif() diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 350875984125..6353802a1b87 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -2498,11 +2498,7 @@ int create_new_bucket_instance(RGWRados *store, } -#ifdef BUILDING_FOR_EMBEDDED -extern "C" int cephd_rgw_admin(int argc, const char **argv) -#else int main(int argc, const char **argv) -#endif { vector args; argv_to_vec(argc, (const char **)argv, args); diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index ad5848924dbe..8f4b6a917b02 100644 --- a/src/rgw/rgw_main.cc +++ b/src/rgw/rgw_main.cc @@ -184,11 +184,7 @@ static RGWRESTMgr *rest_filter(RGWRados *store, int dialect, RGWRESTMgr *orig) /* * start up the RADOS connection and then handle HTTP messages as they come in */ -#ifdef BUILDING_FOR_EMBEDDED -extern "C" int cephd_rgw(int argc, const char **argv) -#else int main(int argc, const char **argv) -#endif { // dout() messages will be sent to stderr, but FCGX wants messages on stdout // Redirect stderr to stdout. diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index aad733c9a4f5..66e24b8bc96d 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -32,9 +32,6 @@ add_subdirectory(erasure-code) add_subdirectory(filestore) add_subdirectory(fs) add_subdirectory(journal) -if(WITH_EMBEDDED) - add_subdirectory(libcephd) -endif(WITH_EMBEDDED) add_subdirectory(libcephfs) add_subdirectory(librados) add_subdirectory(librados_test_stub) diff --git a/src/test/libcephd/CMakeLists.txt b/src/test/libcephd/CMakeLists.txt deleted file mode 100644 index a12e8ea40c84..000000000000 --- a/src/test/libcephd/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -# cephdtest -set(cephdtest_srcs - test.cc) -add_library(cephdtest STATIC ${cephdtest_srcs}) -set_target_properties(cephdtest PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}) - -#Enable spdk -if(HAVE_SPDK) -link_directories("${CMAKE_SOURCE_DIR}/src/spdk/build/lib/") -endif(HAVE_SPDK) - -# ceph_test_cephd_api_misc -add_executable(ceph_test_cephd_api_misc - misc.cc - ) -set_target_properties(ceph_test_cephd_api_misc PROPERTIES COMPILE_FLAGS - ${UNITTEST_CXX_FLAGS}) -target_link_libraries(ceph_test_cephd_api_misc - cephd global ${UNITTEST_LIBS} cephdtest z snappy ceph_zstd) - -install(TARGETS - ceph_test_cephd_api_misc - DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/src/test/libcephd/misc.cc b/src/test/libcephd/misc.cc deleted file mode 100644 index 274699d6ecc7..000000000000 --- a/src/test/libcephd/misc.cc +++ /dev/null @@ -1,7 +0,0 @@ -#include "gtest/gtest.h" -#include "include/cephd/libcephd.h" - -TEST(LibCephdMiscVersion, Version) { - int major, minor, extra; - cephd_version(&major, &minor, &extra); -} diff --git a/src/test/libcephd/test.cc b/src/test/libcephd/test.cc deleted file mode 100644 index aa90d10e9ab5..000000000000 --- a/src/test/libcephd/test.cc +++ /dev/null @@ -1,2 +0,0 @@ -void doNothing() { -}