%{_bindir}/radosgw-token
%{_bindir}/radosgw-es
%{_bindir}/radosgw-object-expirer
+%{_libdir}/libradosgw.so*
%{_mandir}/man8/radosgw.8*
%dir %{_localstatedir}/lib/ceph/radosgw
%{_unitdir}/ceph-radosgw@.service
%{_unitdir}/ceph-radosgw.target
%post radosgw
+/sbin/ldconfig
%if 0%{?suse_version}
if [ $1 -eq 1 ] ; then
/usr/bin/systemctl preset ceph-radosgw@\*.service ceph-radosgw.target >/dev/null 2>&1 || :
%endif
%postun radosgw
+/sbin/ldconfig
%if 0%{?suse_version}
DISABLE_RESTART_ON_UPDATE="yes"
%service_del_postun ceph-radosgw@\*.service ceph-radosgw.target
rgw_dmclock_async_scheduler.cc)
endif()
-add_library(radosgw_a STATIC ${radosgw_srcs}
+add_library(radosgw SHARED ${radosgw_srcs} ${rgw_a_srcs} rgw_main.cc
$<TARGET_OBJECTS:civetweb_common_objs>)
-add_library(rgw_schedulers STATIC ${rgw_schedulers_srcs})
-target_link_libraries(rgw_schedulers
- PUBLIC dmclock::dmclock)
-target_link_libraries(radosgw_a
+
+add_dependencies(radosgw civetweb_h)
+
+target_compile_definitions(radosgw PUBLIC "-DCLS_CLIENT_HIDE_IOCTX")
+target_include_directories(radosgw PUBLIC "${CMAKE_SOURCE_DIR}/src/dmclock/support/src")
+target_include_directories(radosgw SYSTEM PUBLIC "../rapidjson/include")
+
+target_link_libraries(radosgw
PRIVATE ${rgw_libs} rgw_schedulers
- PUBLIC dmclock::dmclock)
+ PUBLIC dmclock::dmclock
+)
if(WITH_RADOSGW_BEAST_FRONTEND AND WITH_RADOSGW_BEAST_OPENSSL)
+target_link_libraries(radosgw
# used by rgw_asio_frontend.cc
- target_link_libraries(radosgw_a PRIVATE OpenSSL::SSL)
+ PRIVATE OpenSSL::SSL)
endif()
+set_target_properties(radosgw PROPERTIES OUTPUT_NAME radosgw VERSION 2.0.0
+ SOVERSION 2)
+install(TARGETS radosgw DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+add_library(rgw_schedulers STATIC ${rgw_schedulers_srcs})
+target_link_libraries(rgw_schedulers
+ PUBLIC dmclock::dmclock)
-add_executable(radosgw rgw_main.cc)
-target_link_libraries(radosgw radosgw_a librados
+add_executable(radosgwd radosgw.cc)
+target_link_libraries(radosgwd radosgw librados
cls_rgw_client cls_otp_client cls_lock_client cls_refcount_client
cls_log_client cls_timeindex_client
cls_version_client cls_user_client
${FCGI_LIBRARY} ${LIB_RESOLV}
${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${BLKID_LIBRARIES}
${ALLOC_LIBS})
-install(TARGETS radosgw DESTINATION bin)
+set_target_properties(radosgwd PROPERTIES OUTPUT_NAME radosgw)
+install(TARGETS radosgwd DESTINATION bin)
set(radosgw_admin_srcs
rgw_admin.cc
--- /dev/null
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab ft=cpp
+//
+
+extern int radosgw_Main(int, const char **);
+
+/*
+ * start up the RADOS connection and then handle HTTP messages as they come in
+ */
+int main(int argc, char **argv)
+{
+ return radosgw_Main(argc, const_cast<const char **>(argv));
+}
/*
* start up the RADOS connection and then handle HTTP messages as they come in
*/
-int main(int argc, const char **argv)
+int radosgw_Main(int argc, const char **argv)
{
// dout() messages will be sent to stderr, but FCGX wants messages on stdout
// Redirect stderr to stdout.
return 0;
}
+
+extern "C" {
+
+int radosgw_main(int argc, const char** argv)
+{
+ return radosgw_Main(argc, argv);
+}
+
+} /* extern "C" */
+