mirror of
https://github.com/netbirdio/FreeBSD-ports.git
synced 2026-05-22 18:42:42 -07:00
databases/foundationdb-devel: update to 7.1.25
broken on arm64 PR: 266207 Sponsored by: SkunkWerks, GmbH
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
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/
|
||||
@@ -12,17 +11,17 @@ 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
|
||||
@@ -31,8 +30,6 @@ 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}
|
||||
@@ -40,16 +37,27 @@ 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/' \
|
||||
@@ -59,8 +67,8 @@ post-patch:
|
||||
|
||||
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
|
||||
@@ -81,10 +89,10 @@ do-install:
|
||||
${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 <bsd.port.mk>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5,36 +5,36 @@
|
||||
## 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
|
||||
@@ -42,6 +42,6 @@ logdir = %%LOG_DIR%%
|
||||
|
||||
[backup_agent]
|
||||
command = %%PREFIX%%/bin/backup_agent
|
||||
logdir = %%LOG_DIR%%
|
||||
logdir = %%FOUNDATIONDB_LOGDIR%%
|
||||
|
||||
[backup_agent.1]
|
||||
|
||||
@@ -18,13 +18,25 @@
|
||||
|
||||
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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- 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)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- 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
|
||||
|
||||
-22
@@ -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")
|
||||
@@ -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)
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
--- 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()
|
||||
|
||||
################################################################################
|
||||
@@ -23,12 +23,12 @@
|
||||
# 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()
|
||||
|
||||
@@ -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()
|
||||
@@ -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)
|
||||
@@ -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 <sys/prctl.h>
|
||||
+#elif defined(__FreeBSD__)
|
||||
+#include <sys/procctl.h>
|
||||
#endif
|
||||
|
||||
#include <sys/wait.h>
|
||||
@@ -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
|
||||
|
||||
@@ -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 <boost/process.hpp>
|
||||
+#endif
|
||||
+#include <boost/algorithm/string.hpp>
|
||||
+
|
||||
#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 <boost/process.hpp>
|
||||
-#endif
|
||||
-#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include "flow/actorcompiler.h" // This must be the last #include.
|
||||
|
||||
@@ -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 <execinfo.h>
|
||||
#include <signal.h>
|
||||
+#if defined(__linux__)
|
||||
#include <sys/prctl.h>
|
||||
+#elif defined(__FreeBSD__)
|
||||
+#include <sys/procctl.h>
|
||||
+#endif
|
||||
#ifdef ALLOC_INSTRUMENTATION
|
||||
#include <cxxabi.h>
|
||||
#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
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@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
|
||||
|
||||
Reference in New Issue
Block a user