diff --git a/databases/foundationdb-devel/Makefile b/databases/foundationdb-devel/Makefile index 7e256e33a608..83dcb62a3d8a 100644 --- a/databases/foundationdb-devel/Makefile +++ b/databases/foundationdb-devel/Makefile @@ -1,90 +1,98 @@ PORTNAME= foundationdb-devel -DISTVERSION= 7.0.0 -PORTREVISION= 2 +DISTVERSION= 7.1.25 CATEGORIES= databases # PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/pull/ MAINTAINER= dch@FreeBSD.org COMMENT= Distributed, transactional key-value store WWW= https://www.foundationdb.org/ LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE +BROKEN_aarch64= invalid asm rdtsc ONLY_FOR_ARCHS= aarch64 amd64 ONLY_FOR_ARCHS_REASON= not yet ported to anything else -BUILD_DEPENDS= ${LOCALBASE}/include/doctest/doctest.h:devel/doctest \ +BUILD_DEPENDS= ${LOCALBASE}/include/msgpack.hpp:devel/msgpack-cxx \ ${LOCALBASE}/include/toml.hpp:devel/toml11 \ bash:shells/bash \ git:devel/git LIB_DEPENDS= libboost_system.so:devel/boost-libs \ libeio.so:devel/libeio - USES= cmake compiler:c++17-lang mono:build python:build shebangfix \ ssl USE_GITHUB= yes GH_ACCOUNT= apple GH_PROJECT= foundationdb USE_LDCONFIG= yes USE_RC_SUBR= foundationdb -CONFLICTS_INSTALL= foundationdb - SHEBANG_FILES= bindings/c/generate_asm.py CMAKE_ARGS= -DOPENSSL_ROOT_DIR=${OPENSSLLIB} CMAKE_OFF= DISABLE_TLS USE_DTRACE USE_JEMALLOC WITH_CONTRIB WITH_FLOWBENCH MAKE_ENV= MONO_REGISTRY_PATH=/tmp/registry +CONFLICTS_INSTALL= foundationdb + +FOUNDATIONDB_USER?= foundationdb +FOUNDATIONDB_GROUP?= foundationdb +FOUNDATIONDB_ETCDIR?= ${PREFIX}/etc/foundationdb +FOUNDATIONDB_DBDIR?= /var/db/foundationdb +FOUNDATIONDB_LOGDIR?= /var/log/foundationdb + +SUB_FDB= FOUNDATIONDB_DBDIR=${FOUNDATIONDB_DBDIR} \ + FOUNDATIONDB_ETCDIR=${FOUNDATIONDB_ETCDIR} \ + FOUNDATIONDB_GROUP=${FOUNDATIONDB_GROUP} \ + FOUNDATIONDB_LOGDIR=${FOUNDATIONDB_LOGDIR} \ + FOUNDATIONDB_USER=${FOUNDATIONDB_USER} + +SUB_FILES= foundationdb.conf +SUB_LIST= ${SUB_FDB} + USERS= foundationdb GROUPS= foundationdb -DBDIR?= /var/db/foundationdb -LOGDIR?= /var/log/foundationdb -SUB_FDB= DB_USER=${USERS} DB_GROUP=${GROUPS} DB_DIR=${DBDIR} \ - LOG_DIR=${LOGDIR} -SUB_FILES+= foundationdb.conf -SUB_LIST+= ${SUB_FDB} -PLIST_SUB+= ${SUB_FDB} +PLIST_SUB= ${SUB_FDB} post-patch: ${REINPLACE_CMD} 's/OPENSSL_USE_STATIC_LIBS TRUE/OPENSSL_USE_STATIC_LIBS FALSE/' \ ${WRKSRC}/cmake/FDBComponents.cmake ${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|' \ ${WRKSRC}/bindings/c/test/unit/third_party/CMakeLists.txt do-install: # commands on first line, dev tools on next two -.for f in fdbbackup fdbcli fdbmonitor fdbserver \ - actor_flamegraph fdb_flow_tester fdbconvert fdbdecode tutorial +.for f in fdbbackup fdbcli fdbmonitor fdbserver actor_flamegraph fdb_flow_tester \ + fdbconvert fdbdecode tutorial ${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/${f} ${STAGEDIR}${PREFIX}/bin/ .endfor .for s in backup_agent dr_agent fastrestore_agent fdbr fdbrestore ${RLN} ${STAGEDIR}${PREFIX}/bin/fdbbackup ${STAGEDIR}${PREFIX}/bin/${s} .endfor # exposed libraries - confirm with upstream .for l in libfdb_c.so libfdb_flow.a libfdb_sqlite.a libfdbclient.a libfdbrpc.a \ libflow.a ${STRIP_CMD} ${WRKDIR}/.build/lib/${l} ${INSTALL_DATA} ${WRKDIR}/.build/lib/${l} ${STAGEDIR}/${PREFIX}/lib/ .endfor # exposed headers - confirm with upstream ${MKDIR} ${STAGEDIR}${PREFIX}/include/foundationdb ${INSTALL_DATA} ${WRKSRC}/bindings/c/foundationdb/fdb_c.h \ ${STAGEDIR}/${PREFIX}/include/foundationdb/ ${INSTALL_DATA} ${WRKSRC}/fdbclient/vexillographer/fdb.options \ ${STAGEDIR}/${PREFIX}/include/foundationdb/ ${INSTALL_DATA} ${WRKDIR}/.build/bindings/c/foundationdb/fdb_c_options.g.h \ ${STAGEDIR}/${PREFIX}/include/foundationdb/ # runtime related - ${MKDIR} ${STAGEDIR}${DBDIR} \ - ${STAGEDIR}${LOGDIR} \ - ${STAGEDIR}${PREFIX}/etc/foundationdb + ${MKDIR} ${STAGEDIR}${FOUNDATIONDB_ETCDIR} + ${MKDIR} ${STAGEDIR}${FOUNDATIONDB_DBDIR} + ${MKDIR} ${STAGEDIR}${FOUNDATIONDB_LOGDIR} ${INSTALL_DATA} ${WRKDIR}/foundationdb.conf \ - ${STAGEDIR}${PREFIX}/etc/foundationdb/foundationdb.conf.sample + ${STAGEDIR}${FOUNDATIONDB_ETCDIR}/foundationdb.conf.sample .include diff --git a/databases/foundationdb-devel/distinfo b/databases/foundationdb-devel/distinfo index d6b0c7b9492a..902fdaf207b6 100644 --- a/databases/foundationdb-devel/distinfo +++ b/databases/foundationdb-devel/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1640764452 -SHA256 (apple-foundationdb-7.0.0_GH0.tar.gz) = 9a5ef672e32b6976b04a20c013b28c4aeeb7d35456afdefbc552707d52bc31ca -SIZE (apple-foundationdb-7.0.0_GH0.tar.gz) = 10875992 +TIMESTAMP = 1668350492 +SHA256 (apple-foundationdb-7.1.25_GH0.tar.gz) = 0c4679afb982932dfa37cbb7544eee4c8efc2409864af55743345c153407cb2c +SIZE (apple-foundationdb-7.1.25_GH0.tar.gz) = 11657831 diff --git a/databases/foundationdb-devel/files/foundationdb.conf.in b/databases/foundationdb-devel/files/foundationdb.conf.in index 5b47e46f2185..6fae1a863cb5 100644 --- a/databases/foundationdb-devel/files/foundationdb.conf.in +++ b/databases/foundationdb-devel/files/foundationdb.conf.in @@ -1,47 +1,47 @@ ## foundationdb.conf ## ## Configuration file for FoundationDB server processes ## Full documentation is available at ## https://apple.github.io/foundationdb/configuration.html#the-configuration-file [fdbmonitor] -user = %%DB_USER%% -group = %%DB_GROUP%% +user = %%FOUNDATIONDB_USER%% +group = %%FOUNDATIONDB_GROUP%% [general] -restart_delay = 60 -## by default, restart_backoff = restart_delay_reset_interval = restart_delay -# initial_restart_delay = 0 -# restart_backoff = 60 -# restart_delay_reset_interval = 60 -cluster_file = %%PREFIX%%/etc/foundationdb/fdb.cluster -# delete_envvars = -# kill_on_configuration_change = true +restart-delay = 60 +## by default, restart-backoff = restart-delay-reset-interval = restart-delay +# initial-restart-delay = 0 +# restart-backoff = 60 +# restart-delay-reset-interval = 60 +cluster-file = %%FOUNDATIONDB_ETCDIR%%/fdb.cluster +# delete-envvars = +# kill-on-configuration-change = true ## Default parameters for individual fdbserver processes [fdbserver] command = %%PREFIX%%/bin/fdbserver -public_address = auto:$ID -listen_address = public -datadir = %%DB_DIR%%/data/$ID -logdir = %%LOG_DIR%% +public-address = auto:$ID +listen-address = public +datadir = %%FOUNDATIONDB_DBDIR%%/data/$ID +logdir = %%FOUNDATIONDB_LOGDIR%% # logsize = 10MiB # maxlogssize = 100MiB -# machine_id = -# datacenter_id = -# class = +# machine-id = +# datacenter-id = +# class = # memory = 8GiB -# storage_memory = 1GiB -# cache_memory = 2GiB -# metrics_cluster = -# metrics_prefix = +# storage-memory = 1GiB +# cache-memory = 2GiB +# metrics-cluster = +# metrics-prefix = ## An individual fdbserver process with id 4500 ## Parameters set here override defaults from the [fdbserver] section [fdbserver.4500] [backup_agent] command = %%PREFIX%%/bin/backup_agent -logdir = %%LOG_DIR%% +logdir = %%FOUNDATIONDB_LOGDIR%% [backup_agent.1] diff --git a/databases/foundationdb-devel/files/foundationdb.in b/databases/foundationdb-devel/files/foundationdb.in index 1bcd503816f8..84e0a036a8ae 100644 --- a/databases/foundationdb-devel/files/foundationdb.in +++ b/databases/foundationdb-devel/files/foundationdb.in @@ -1,30 +1,42 @@ #!/bin/sh # PROVIDE: foundationdb # REQUIRE: LOGIN # BEFORE: securelevel # KEYWORD: shutdown # Add the following line to /etc/rc.conf to enable `foundationdb': # #foundationdb_enable="YES" # # Define config file here to run with different config file: # #foundationdb_config="xxxxx" # . /etc/rc.subr name="foundationdb" rcvar="${name}_enable" -foundationdb_enable=${foundationdb_enable:-"NO"} -command=%%PREFIX%%/bin/fdbmonitor -pidfile="/var/run/fdbmonitor.pid" load_rc_config "$name" + : ${foundationdb_enable="NO"} +: ${foundationdb_user="%%FOUNDATIONDB_USER%%"} +: ${foundationdb_group="%%FOUNDATIONDB_GROUP%%"} : ${foundationdb_config="%%PREFIX%%/etc/foundationdb/foundationdb.conf"} +start_precmd="foundationdb_start_precmd" + +pidfile="/var/run/fdbmonitor.pid" +command=%%PREFIX%%/bin/fdbmonitor command_args="--conffile ${foundationdb_config} --lockfile ${pidfile} --daemonize" + +foundationdb_start_precmd() +{ + if [ ! -e "${pidfile}" ]; then + install -m 0600 -o "${foundationdb_user}" -g "${foundationdb_group}" /dev/null "${pidfile}" + fi +} + run_rc_command $1 diff --git a/databases/foundationdb-devel/files/patch-CMakeLists.txt b/databases/foundationdb-devel/files/patch-CMakeLists.txt index c39b3c3eb46e..78d6244a990c 100644 --- a/databases/foundationdb-devel/files/patch-CMakeLists.txt +++ b/databases/foundationdb-devel/files/patch-CMakeLists.txt @@ -1,18 +1,18 @@ ---- CMakeLists.txt.orig 2021-12-29 09:04:08 UTC +--- CMakeLists.txt.orig 2022-09-19 11:42:41 UTC +++ CMakeLists.txt -@@ -172,9 +172,13 @@ else() +@@ -183,9 +183,13 @@ add_subdirectory(fdbbackup) add_subdirectory(fdbservice) endif() add_subdirectory(fdbbackup) -add_subdirectory(contrib) +if(WITH_CONTRIB) + add_subdirectory(contrib) +endif() add_subdirectory(tests) -add_subdirectory(flowbench EXCLUDE_FROM_ALL) +if(WITH_FLOWBENCH) + add_subdirectory(flowbench EXCLUDE_FROM_ALL) +endif() if(WITH_PYTHON AND WITH_C_BINDING) add_subdirectory(bindings) endif() diff --git a/databases/foundationdb-devel/files/patch-bindings_c_CMakeLists.txt b/databases/foundationdb-devel/files/patch-bindings_c_CMakeLists.txt index c05798bb5aaa..7c58fb132630 100644 --- a/databases/foundationdb-devel/files/patch-bindings_c_CMakeLists.txt +++ b/databases/foundationdb-devel/files/patch-bindings_c_CMakeLists.txt @@ -1,11 +1,11 @@ ---- bindings/c/CMakeLists.txt.orig 2021-12-29 13:15:46 UTC +--- bindings/c/CMakeLists.txt.orig 2022-09-19 11:42:41 UTC +++ bindings/c/CMakeLists.txt -@@ -65,7 +65,7 @@ if(WIN32) +@@ -78,7 +78,7 @@ endif() endif() # The tests don't build on windows -if(NOT WIN32) +if(NOT WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") set(MAKO_SRCS test/mako/mako.c test/mako/mako.h diff --git a/databases/foundationdb-devel/files/patch-bindings_c_test_unit_third__party_CMakeLists.txt b/databases/foundationdb-devel/files/patch-bindings_c_test_unit_third__party_CMakeLists.txt deleted file mode 100644 index 23838e3972e5..000000000000 --- a/databases/foundationdb-devel/files/patch-bindings_c_test_unit_third__party_CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ ---- bindings/c/test/unit/third_party/CMakeLists.txt.orig 2021-12-07 03:03:34 UTC -+++ bindings/c/test/unit/third_party/CMakeLists.txt -@@ -1,18 +1 @@ --# Download doctest repo. --include(ExternalProject) --find_package(Git REQUIRED) -- --ExternalProject_Add( -- doctest -- PREFIX ${CMAKE_BINARY_DIR}/doctest -- GIT_REPOSITORY https://github.com/onqtam/doctest.git -- GIT_TAG 1c8da00c978c19e00a434b2b1f854fcffc9fba35 # v2.4.0 -- TIMEOUT 10 -- CONFIGURE_COMMAND "" -- BUILD_COMMAND "" -- INSTALL_COMMAND "" -- LOG_DOWNLOAD ON --) -- --ExternalProject_Get_Property(doctest source_dir) --set(DOCTEST_INCLUDE_DIR ${source_dir}/doctest CACHE INTERNAL "Path to include folder for doctest") -+set(DOCTEST_INCLUDE_DIR %%LOCALBASE%%/include/doctest CACHE INTERNAL "Path to include folder for doctest") diff --git a/databases/foundationdb-devel/files/patch-cmake_CompileBoost.cmake b/databases/foundationdb-devel/files/patch-cmake_CompileBoost.cmake index de9f48861488..c72e610786f0 100644 --- a/databases/foundationdb-devel/files/patch-cmake_CompileBoost.cmake +++ b/databases/foundationdb-devel/files/patch-cmake_CompileBoost.cmake @@ -1,11 +1,11 @@ ---- cmake/CompileBoost.cmake.orig 2022-04-19 01:08:48 UTC +--- cmake/CompileBoost.cmake.orig 2022-09-19 11:42:41 UTC +++ cmake/CompileBoost.cmake @@ -113,7 +113,7 @@ endif() return() endif() --find_package(Boost 1.72.0 EXACT QUIET COMPONENTS context CONFIG PATHS ${BOOST_HINT_PATHS}) -+find_package(Boost 1.72.0 COMPONENTS context CONFIG PATHS ${BOOST_HINT_PATHS}) +-find_package(Boost 1.78.0 EXACT QUIET COMPONENTS context CONFIG PATHS ${BOOST_HINT_PATHS}) ++find_package(Boost 1.78.0 COMPONENTS context CONFIG PATHS ${BOOST_HINT_PATHS}) set(FORCE_BOOST_BUILD OFF CACHE BOOL "Forces cmake to build boost and ignores any installed boost") if(Boost_FOUND AND NOT FORCE_BOOST_BUILD) diff --git a/databases/foundationdb-devel/files/patch-cmake_FDBComponents.cmake b/databases/foundationdb-devel/files/patch-cmake_FDBComponents.cmake index e4b75371774d..556fe68a9257 100644 --- a/databases/foundationdb-devel/files/patch-cmake_FDBComponents.cmake +++ b/databases/foundationdb-devel/files/patch-cmake_FDBComponents.cmake @@ -1,34 +1,34 @@ ---- cmake/FDBComponents.cmake.orig 2021-12-07 03:03:34 UTC +--- cmake/FDBComponents.cmake.orig 2022-09-19 11:42:41 UTC +++ cmake/FDBComponents.cmake -@@ -24,7 +24,7 @@ set(DISABLE_TLS OFF CACHE BOOL "Don't try to find Open +@@ -24,7 +24,7 @@ else() if(DISABLE_TLS) set(WITH_TLS OFF) else() - set(OPENSSL_USE_STATIC_LIBS TRUE) + set(OPENSSL_USE_STATIC_LIBS FALSE) - find_package(OpenSSL) - if(OPENSSL_FOUND) - set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) -@@ -203,6 +203,13 @@ else() + if(WIN32) + set(OPENSSL_MSVC_STATIC_RT ON) + endif() +@@ -198,6 +198,13 @@ endif() endif() ################################################################################ +# misc optional components +################################################################################ + +set(WITH_CONTRIB ON) +set(WITH_FLOWBENCH OFF) + +################################################################################ # Coroutine implementation ################################################################################ -@@ -236,6 +243,8 @@ function(print_components) +@@ -242,6 +249,8 @@ function(print_components) message(STATUS "Build Documentation (make html): ${WITH_DOCUMENTATION}") message(STATUS "Build Python sdist (make package): ${WITH_PYTHON_BINDING}") message(STATUS "Configure CTest (depends on Python): ${WITH_PYTHON}") + message(STATUS "Build contrib: ${WITH_CONTRIB}") + message(STATUS "Build with FlowBench: ${WITH_FLOWBENCH}") message(STATUS "Build with RocksDB: ${WITH_ROCKSDB_EXPERIMENTAL}") + message(STATUS "Build with AWS SDK: ${WITH_AWS_BACKUP}") message(STATUS "=========================================") - endfunction() diff --git a/databases/foundationdb-devel/files/patch-cmake_GetMsgpack.cmake b/databases/foundationdb-devel/files/patch-cmake_GetMsgpack.cmake new file mode 100644 index 000000000000..dee8066686d4 --- /dev/null +++ b/databases/foundationdb-devel/files/patch-cmake_GetMsgpack.cmake @@ -0,0 +1,24 @@ +--- cmake/GetMsgpack.cmake.orig 2022-09-19 11:42:41 UTC ++++ cmake/GetMsgpack.cmake +@@ -1,20 +1,7 @@ +-find_package(msgpack 3.3.0 EXACT QUIET CONFIG) ++find_package(msgpack REQUIRED QUIET CONFIG) + + add_library(msgpack INTERFACE) + + if(msgpack_FOUND) + target_link_libraries(msgpack INTERFACE msgpackc-cxx) +-else() +- include(ExternalProject) +- ExternalProject_add(msgpackProject +- URL "https://github.com/msgpack/msgpack-c/releases/download/cpp-3.3.0/msgpack-3.3.0.tar.gz" +- URL_HASH SHA256=6e114d12a5ddb8cb11f669f83f32246e484a8addd0ce93f274996f1941c1f07b +- CONFIGURE_COMMAND "" +- BUILD_COMMAND "" +- INSTALL_COMMAND "" +- ) +- +- ExternalProject_Get_property(msgpackProject SOURCE_DIR) +- target_include_directories(msgpack SYSTEM INTERFACE "${SOURCE_DIR}/include") +- add_dependencies(msgpack msgpackProject) + endif() diff --git a/databases/foundationdb-devel/files/patch-fdbmonitor_CMakeLists.txt b/databases/foundationdb-devel/files/patch-fdbmonitor_CMakeLists.txt new file mode 100644 index 000000000000..2b5912204a6a --- /dev/null +++ b/databases/foundationdb-devel/files/patch-fdbmonitor_CMakeLists.txt @@ -0,0 +1,11 @@ +--- fdbmonitor/CMakeLists.txt.orig 2022-09-19 11:42:41 UTC ++++ fdbmonitor/CMakeLists.txt +@@ -56,8 +56,3 @@ endif() + configure_file(${CMAKE_SOURCE_DIR}/contrib/generate_profile.sh + ${CMAKE_BINARY_DIR}/contrib/generate_profile.sh) + endif() +- +-add_custom_target(generate_profile +- COMMAND ${CMAKE_BINARY_DIR}/contrib/generate_profile.sh ${CMAKE_BINARY_DIR}) +- +-add_dependencies(generate_profile fdbmonitor fdbserver mako fdbcli) diff --git a/databases/foundationdb-devel/files/patch-fdbmonitor_fdbmonitor.cpp b/databases/foundationdb-devel/files/patch-fdbmonitor_fdbmonitor.cpp new file mode 100644 index 000000000000..862461539f53 --- /dev/null +++ b/databases/foundationdb-devel/files/patch-fdbmonitor_fdbmonitor.cpp @@ -0,0 +1,42 @@ +--- fdbmonitor/fdbmonitor.cpp.orig 2022-09-19 11:42:41 UTC ++++ fdbmonitor/fdbmonitor.cpp +@@ -27,6 +27,8 @@ + + #ifdef __linux__ + #include ++#elif defined(__FreeBSD__) ++#include + #endif + + #include +@@ -751,6 +753,10 @@ void start_process(Command* cmd, ProcessID id, uid_t u + signal(SIGHUP, SIG_DFL); + signal(SIGINT, SIG_DFL); + signal(SIGTERM, SIG_DFL); ++#ifdef __linux__ ++ signal(SIGCHLD, SIG_DFL); ++#endif ++ sigprocmask(SIG_SETMASK, mask, nullptr); + + /* All output in this block should be to stdout (for SevInfo messages) or stderr (for SevError messages) */ + /* Using log_msg() or log_err() from the child will cause the logs to be written incorrectly */ +@@ -780,13 +786,15 @@ void start_process(Command* cmd, ProcessID id, uid_t u + } + + #ifdef __linux__ +- signal(SIGCHLD, SIG_DFL); +- +- sigprocmask(SIG_SETMASK, mask, nullptr); +- + /* death of our parent raises SIGHUP */ + prctl(PR_SET_PDEATHSIG, SIGHUP); + if (getppid() == 1) /* parent already died before prctl */ ++ exit(0); ++#elif defined(__FreeBSD__) ++ /* death of our parent raises SIGHUP */ ++ const int sig = SIGHUP; ++ procctl(P_PID, 0, PROC_PDEATHSIG_CTL, (void*)&sig); ++ if (getppid() == 1) /* parent already died before procctl */ + exit(0); + #endif + diff --git a/databases/foundationdb-devel/files/patch-fdbserver_FDBExecHelper.actor.cpp b/databases/foundationdb-devel/files/patch-fdbserver_FDBExecHelper.actor.cpp new file mode 100644 index 000000000000..4950f7fd5e8b --- /dev/null +++ b/databases/foundationdb-devel/files/patch-fdbserver_FDBExecHelper.actor.cpp @@ -0,0 +1,32 @@ +--- fdbserver/FDBExecHelper.actor.cpp.orig 2022-09-19 11:42:41 UTC ++++ fdbserver/FDBExecHelper.actor.cpp +@@ -18,6 +18,14 @@ + * limitations under the License. + */ + ++#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__INTEL_COMPILER) ++#define BOOST_SYSTEM_NO_LIB ++#define BOOST_DATE_TIME_NO_LIB ++#define BOOST_REGEX_NO_LIB ++#include ++#endif ++#include ++ + #include "flow/TLSConfig.actor.h" + #include "flow/Trace.h" + #include "flow/Platform.h" +@@ -33,14 +41,6 @@ + #include "fdbserver/FDBExecHelper.actor.h" + #include "fdbserver/Knobs.h" + #include "fdbserver/RemoteIKeyValueStore.actor.h" +- +-#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__INTEL_COMPILER) +-#define BOOST_SYSTEM_NO_LIB +-#define BOOST_DATE_TIME_NO_LIB +-#define BOOST_REGEX_NO_LIB +-#include +-#endif +-#include + + #include "flow/actorcompiler.h" // This must be the last #include. + diff --git a/databases/foundationdb-devel/files/patch-fdbserver_fdbserver.actor.cpp b/databases/foundationdb-devel/files/patch-fdbserver_fdbserver.actor.cpp new file mode 100644 index 000000000000..1720825f36ac --- /dev/null +++ b/databases/foundationdb-devel/files/patch-fdbserver_fdbserver.actor.cpp @@ -0,0 +1,30 @@ +--- fdbserver/fdbserver.actor.cpp.orig 2022-09-19 11:42:41 UTC ++++ fdbserver/fdbserver.actor.cpp +@@ -84,7 +84,11 @@ + #if defined(__linux__) || defined(__FreeBSD__) + #include + #include ++#if defined(__linux__) + #include ++#elif defined(__FreeBSD__) ++#include ++#endif + #ifdef ALLOC_INSTRUMENTATION + #include + #endif +@@ -2225,9 +2229,14 @@ int main(int argc, char* argv[]) { + f = result; + } else if (role == ServerRole::FlowProcess) { + TraceEvent(SevDebug, "StartingFlowProcess").detail("From", "fdbserver"); +-#if defined(__linux__) || defined(__FreeBSD__) ++#if defined(__linux__) + prctl(PR_SET_PDEATHSIG, SIGTERM); + if (getppid() == 1) /* parent already died before prctl */ ++ flushAndExit(FDB_EXIT_SUCCESS); ++#elif defined(__FreeBSD__) ++ const int sig = SIGTERM; ++ procctl(P_PID, 0, PROC_PDEATHSIG_CTL, (void*)&sig); ++ if (getppid() == 1) /* parent already died before procctl */ + flushAndExit(FDB_EXIT_SUCCESS); + #endif + diff --git a/databases/foundationdb-devel/pkg-plist b/databases/foundationdb-devel/pkg-plist index 6a089bd26277..453f6054fc15 100644 --- a/databases/foundationdb-devel/pkg-plist +++ b/databases/foundationdb-devel/pkg-plist @@ -1,26 +1,27 @@ -@dir(%%DB_USER%%,%%DB_GROUP%%,) %%DB_DIR%% -@dir(%%DB_USER%%,%%DB_GROUP%%,) %%LOG_DIR%% -@sample etc/foundationdb/foundationdb.conf.sample +@dir(%%FOUNDATIONDB_USER%%,%%FOUNDATIONDB_GROUP%%,755) %%FOUNDATIONDB_ETCDIR%% +@dir(%%FOUNDATIONDB_USER%%,%%FOUNDATIONDB_GROUP%%,755) %%FOUNDATIONDB_DBDIR%% +@dir(%%FOUNDATIONDB_USER%%,%%FOUNDATIONDB_GROUP%%,755) %%FOUNDATIONDB_LOGDIR%% +@sample %%FOUNDATIONDB_ETCDIR%%/foundationdb.conf.sample bin/actor_flamegraph bin/backup_agent bin/dr_agent bin/fastrestore_agent bin/fdb_flow_tester bin/fdbbackup bin/fdbcli bin/fdbconvert bin/fdbdecode bin/fdbmonitor bin/fdbr bin/fdbrestore bin/fdbserver bin/tutorial include/foundationdb/fdb.options include/foundationdb/fdb_c.h include/foundationdb/fdb_c_options.g.h lib/libfdb_c.so lib/libfdb_flow.a lib/libfdb_sqlite.a lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a