1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-29 05:38:00 +00:00

databases/foundationdb*: split, update to 7.1.59 & 7.3.41

Update FoundationDB to both main supported versions, and also split
between server and client builds for convenience.

PR:		277262
Reviewed by:	dch
Sponsored by:	SkunkWerks, GmbH
This commit is contained in:
Dmitry Wagin 2024-05-23 22:14:48 +00:00 committed by Dave Cottlehuber
parent cd8b929f5d
commit 3dc4928b6c
53 changed files with 805 additions and 214 deletions

2
MOVED
View File

@ -3253,3 +3253,5 @@ sysutils/vector||2024-05-15|Has expired: Unmaintained in tree and broken for mon
irc/sic||2024-05-15|Has expired: Last upstream release was in 2001 and no upstream WWW
devel/tarpaulin|devel/cargo-tarpaulin|2024-05-19|Rename port and package to reflect that this is a Cargo plugin
sysutils/uutils-coreutils|sysutils/rust-coreutils|2024-05-21|Remove duplicate
databases/foundationdb|databases/foundationdb71-server|2024-05-23|Reintegrated into databases/foundationdb71-server

2
UIDs
View File

@ -176,7 +176,7 @@ _hfm:*:227:227::0:0:hfm daemon:/nonexistent:/usr/sbin/nologin
osrm:*:228:228::0:0:osrm:/nonexistent:/usr/sbin/nologin
# free: 229, GID used
carbon:*:230:230::0:0:osrm:/nonexistent:/usr/sbin/nologin
foundationdb:*:231:231::0:0:foundationdb:/nonexistent:/usr/sbin/nologin
foundationdb:*:231:231::0:0:FoundationDB user:/nonexistent:/usr/sbin/nologin
archiva:*:232:232::0:0:Archiva Daemon User:/usr/local/archiva:/bin/sh
_ntp:*:233:233::0:0:NTP Daemon:/var/empty:/usr/sbin/nologin
kafka:*:234:234::0:0:Apache Kafka user:/nonexistent:/usr/sbin/nologin

View File

@ -69,7 +69,10 @@
SUBDIR += firebird40-client
SUBDIR += firebird40-server
SUBDIR += fortytwo-bdb
SUBDIR += foundationdb
SUBDIR += foundationdb71-client
SUBDIR += foundationdb71-server
SUBDIR += foundationdb73-client
SUBDIR += foundationdb73-server
SUBDIR += frece
SUBDIR += freetds
SUBDIR += freetds-devel

View File

@ -9,7 +9,7 @@ WWW= https://github.com/apache/couchdb-erlfdb
LICENSE= APACHE20
LIB_DEPENDS= libfdb_c.so:databases/foundationdb
LIB_DEPENDS= libfdb_c.so:databases/foundationdb71-client
USES= erlang:rebar3,enc
USE_GITHUB= yes

View File

@ -1,98 +0,0 @@
PORTNAME= foundationdb
DISTVERSION= 7.1.29
CATEGORIES= databases
# PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/pull/
MAINTAINER= dmitry.wagin@ya.ru
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/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++20-lang mono:build python:build shebangfix \
ssl
USE_GITHUB= yes
GH_ACCOUNT= apple
GH_PROJECT= foundationdb
USE_LDCONFIG= yes
USE_RC_SUBR= 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
SUB_FILES= foundationdb.conf
SUB_LIST= ${SUB_FDB}
USERS= foundationdb
GROUPS= foundationdb
PLIST_SUB= ${SUB_FDB}
FOUNDATIONDB_DBDIR?= /var/db/foundationdb
FOUNDATIONDB_ETCDIR?= ${PREFIX}/etc/foundationdb
FOUNDATIONDB_GROUP?= foundationdb
FOUNDATIONDB_LOGDIR?= /var/log/foundationdb
FOUNDATIONDB_USER?= foundationdb
SUB_FDB= FOUNDATIONDB_DBDIR=${FOUNDATIONDB_DBDIR} \
FOUNDATIONDB_ETCDIR=${FOUNDATIONDB_ETCDIR} \
FOUNDATIONDB_GROUP=${FOUNDATIONDB_GROUP} \
FOUNDATIONDB_LOGDIR=${FOUNDATIONDB_LOGDIR} \
FOUNDATIONDB_USER=${FOUNDATIONDB_USER}
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
${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}/bindings/c/foundationdb/fdb_c_types.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}${FOUNDATIONDB_ETCDIR}
${MKDIR} ${STAGEDIR}${FOUNDATIONDB_DBDIR}
${MKDIR} ${STAGEDIR}${FOUNDATIONDB_LOGDIR}
${INSTALL_DATA} ${WRKDIR}/foundationdb.conf \
${STAGEDIR}${FOUNDATIONDB_ETCDIR}/foundationdb.conf.sample
.include <bsd.port.mk>

View File

@ -1,3 +0,0 @@
TIMESTAMP = 1679567621
SHA256 (apple-foundationdb-7.1.29_GH0.tar.gz) = ad608ddb781eea3ef4607ab9abb41282ca93383814d8149346bf3440cc9f46d5
SIZE (apple-foundationdb-7.1.29_GH0.tar.gz) = 11676677

View File

@ -1,11 +0,0 @@
--- 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.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)

View File

@ -1,24 +0,0 @@
--- 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-cxx 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()

View File

@ -1,11 +0,0 @@
--- 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)

View File

@ -1,14 +0,0 @@
A massively distributed, transactional key-value store, extensible by
design, with unparalleled reliability and performance.
FoundationDB is multi-model, meaning you can store many types of data in a
single database. All data is safely stored, distributed, and replicated
in the Key-Value Store component. It is easy to install, grow, and
manage, with a distributed architecture that gracefully scales out, and
handles faults while acting like a single ACID database. FoundationDB
provides amazing performance on commodity hardware, allowing you to
support very heavy loads at low cost. It has been running in production
for years and been hardened with lessons learned in some of the world's
largest database deployments. Backing FoundationDB up is an unmatched
testing system based on a deterministic simulation engine that ensures
optimal reliability of operations.

View File

@ -1,28 +0,0 @@
@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_types.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

View File

@ -0,0 +1,11 @@
PORTNAME= foundationdb
PORTREVISION= 0
COMMENT= FoundationDB client
MASTERDIR= ${.CURDIR}/../foundationdb71-server
_CLIENT_ONLY= yes
_COMPONENT= client
.include "${MASTERDIR}/Makefile"

View File

@ -0,0 +1,103 @@
PORTNAME?= foundationdb
DISTVERSION= 7.1.59
PORTREVISION?= 0
CATEGORIES?= databases
PKGNAMESUFFIX?= ${DISTVERSION:C/([0-9]+)\.([0-9]+).*/\1\2/}-${_COMPONENT}
MAINTAINER?= dmitry.wagin@ya.ru
COMMENT?= FoundationDB is a large-scale distributed database
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= bash:shells/bash \
msgpack-cxx>0:devel/msgpack-cxx \
toml11>0:devel/toml11
LIB_DEPENDS= libboost_system.so:devel/boost-libs \
libeio.so:devel/libeio
USES= cmake compiler:c++20-lang llvm:max=16 mono:build python:build \
shebangfix ssl
USE_GITHUB= yes
GH_ACCOUNT= apple
GH_PROJECT= foundationdb
USE_LDCONFIG= yes
.if !defined(_CLIENT_ONLY)
_SERVER_ONLY= yes
_COMPONENT= server
USE_RC_SUBR= foundationdb
RUN_DEPENDS+= fdbcli:databases/${PORTNAME}${DISTVERSION:C/([0-9]+)\.([0-9]+).*/\1\2/}-client
SUB_FILES+= foundationdb.conf
.endif
SHEBANG_FILES= bindings/c/generate_asm.py
CMAKE_ARGS= -DOPENSSL_ROOT_DIR=${OPENSSLLIB}
CMAKE_OFF= BUILD_DOCUMENTATION BUILD_GO_BINDING BUILD_JAVA_BINDING \
BUILD_PYTHON_BINDING BUILD_RUBY_BINDING DISABLE_TLS \
SSD_ROCKSDB_EXPERIMENTAL USE_DTRACE USE_JEMALLOC
MAKE_ENV= MONO_REGISTRY_PATH=/tmp/registry
CONFLICTS+= ${PORTNAME}*-${_COMPONENT}*
SUB_LIST= ${SUB_FDB}
USERS= ${FOUNDATIONDB_USER}
GROUPS= ${FOUNDATIONDB_GROUP}
PLIST= ${PKGDIR}/pkg-plist-${_COMPONENT}
PLIST_SUB= ${SUB_FDB}
FOUNDATIONDB_USER?= foundationdb
FOUNDATIONDB_GROUP?= foundationdb
FOUNDATIONDB_DBDIR?= /var/db/foundationdb
FOUNDATIONDB_LOGDIR?= /var/log/foundationdb
SUB_FDB= FOUNDATIONDB_USER=${FOUNDATIONDB_USER} \
FOUNDATIONDB_GROUP=${FOUNDATIONDB_GROUP} \
FOUNDATIONDB_DBDIR=${FOUNDATIONDB_DBDIR} \
FOUNDATIONDB_LOGDIR=${FOUNDATIONDB_LOGDIR}
do-install:
@${MKDIR} ${STAGEDIR}${ETCDIR}
.if defined(_SERVER_ONLY)
${MKDIR} ${STAGEDIR}${FOUNDATIONDB_DBDIR}
${MKDIR} ${STAGEDIR}${FOUNDATIONDB_LOGDIR}
${INSTALL_DATA} ${WRKDIR}/foundationdb.conf ${STAGEDIR}${ETCDIR}/foundationdb.conf.sample
. for f in fdbserver fdbmonitor
${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/${f} ${STAGEDIR}${PREFIX}/sbin/
. endfor
.endif # _SERVER_ONLY
.if defined(_CLIENT_ONLY)
${MKDIR} ${STAGEDIR}${PREFIX}/include/foundationdb
${MKDIR} ${STAGEDIR}${PREFIX}/lib/foundationdb/backup_agent
${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/fdbcli ${STAGEDIR}${PREFIX}/bin/
. for l in libfdb_c.so
${INSTALL_LIB} ${WRKDIR}/.build/lib/${l} ${STAGEDIR}/${PREFIX}/lib/
. endfor
. for i in fdb_c.h fdb_c_internal.h fdb_c_types.h
${INSTALL_DATA} ${WRKSRC}/bindings/c/foundationdb/${i} \
${STAGEDIR}/${PREFIX}/include/foundationdb/
. endfor
. for i in fdb_c_options.g.h
${INSTALL_DATA} ${WRKDIR}/.build/bindings/c/foundationdb/${i} \
${STAGEDIR}/${PREFIX}/include/foundationdb/
. endfor
${INSTALL_DATA} ${WRKSRC}/fdbclient/vexillographer/fdb.options \
${STAGEDIR}/${PREFIX}/include/foundationdb/
${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/fdbbackup \
${STAGEDIR}${PREFIX}/lib/foundationdb/backup_agent/backup_agent
. for s in fdbbackup fdbrestore fdbdr dr_agent
${RLN} ${STAGEDIR}${PREFIX}/lib/foundationdb/backup_agent/backup_agent \
${STAGEDIR}${PREFIX}/bin/${s}
. endfor
.endif # _CLIENT_ONLY
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1711226264
SHA256 (apple-foundationdb-7.1.59_GH0.tar.gz) = 8a5b7756b96969505ea94a9c6f6852b1ee1730f75672dc887616b92cc7cd64f1
SIZE (apple-foundationdb-7.1.59_GH0.tar.gz) = 11728251

View File

@ -14,13 +14,13 @@ restart-delay = 60
# initial-restart-delay = 0
# restart-backoff = 60
# restart-delay-reset-interval = 60
cluster-file = %%FOUNDATIONDB_ETCDIR%%/fdb.cluster
cluster-file = %%ETCDIR%%/fdb.cluster
# delete-envvars =
# kill-on-configuration-change = true
## Default parameters for individual fdbserver processes
[fdbserver]
command = %%PREFIX%%/bin/fdbserver
command = %%PREFIX%%/sbin/fdbserver
public-address = auto:$ID
listen-address = public
datadir = %%FOUNDATIONDB_DBDIR%%/data/$ID
@ -41,7 +41,7 @@ logdir = %%FOUNDATIONDB_LOGDIR%%
[fdbserver.4500]
[backup_agent]
command = %%PREFIX%%/bin/backup_agent
command = %%PREFIX%%/lib/foundationdb/backup_agent/backup_agent
logdir = %%FOUNDATIONDB_LOGDIR%%
[backup_agent.1]

View File

@ -29,7 +29,7 @@ load_rc_config "$name"
start_precmd="foundationdb_start_precmd"
pidfile="/var/run/fdbmonitor.pid"
command=%%PREFIX%%/bin/fdbmonitor
command=%%PREFIX%%/sbin/fdbmonitor
command_args="--conffile ${foundationdb_config} --lockfile ${pidfile} --daemonize"
foundationdb_start_precmd()

View File

@ -1,15 +1,12 @@
--- CMakeLists.txt.orig 2022-09-19 11:42:41 UTC
--- CMakeLists.txt.orig 2024-01-17 13:58:04 UTC
+++ CMakeLists.txt
@@ -183,9 +183,13 @@ add_subdirectory(fdbbackup)
add_subdirectory(fdbservice)
@@ -184,8 +184,10 @@ else()
endif()
add_subdirectory(fdbbackup)
-add_subdirectory(contrib)
+if(WITH_CONTRIB)
+ add_subdirectory(contrib)
+endif()
add_subdirectory(tests)
add_subdirectory(contrib)
-add_subdirectory(tests)
-add_subdirectory(flowbench EXCLUDE_FROM_ALL)
+#add_subdirectory(tests)
+if(WITH_FLOWBENCH)
+ add_subdirectory(flowbench EXCLUDE_FROM_ALL)
+endif()

View File

@ -0,0 +1,10 @@
--- bindings/CMakeLists.txt.orig 2024-01-17 13:58:04 UTC
+++ bindings/CMakeLists.txt
@@ -15,6 +15,6 @@ endif()
if(WITH_RUBY_BINDING)
add_subdirectory(ruby)
endif()
-if(NOT WIN32 AND NOT OPEN_FOR_IDE)
+if(FALSE)
package_bindingtester()
endif()

View File

@ -1,11 +1,11 @@
--- bindings/c/CMakeLists.txt.orig 2022-09-19 11:42:41 UTC
--- bindings/c/CMakeLists.txt.orig 2024-01-17 13:58:04 UTC
+++ bindings/c/CMakeLists.txt
@@ -78,7 +78,7 @@ endif()
@@ -78,7 +78,7 @@ if(WIN32)
endif()
# The tests don't build on windows
-if(NOT WIN32)
+if(NOT WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+if(FALSE)
set(MAKO_SRCS
test/mako/mako.c
test/mako/mako.h

View File

@ -0,0 +1,20 @@
--- cmake/CompileBoost.cmake.orig 2024-01-17 13:58:04 UTC
+++ cmake/CompileBoost.cmake
@@ -85,7 +85,7 @@ if(USE_SANITIZER)
endif()
# since boost 1.72 boost installs cmake configs. We will enforce config mode
-set(Boost_USE_STATIC_LIBS ON)
+set(Boost_USE_STATIC_LIBS OFF)
# Clang and Gcc will have different name mangling to std::call_once, etc.
if (UNIX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang$")
@@ -113,7 +113,7 @@ if(WIN32)
return()
endif()
-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)

View File

@ -1,4 +1,4 @@
--- cmake/FDBComponents.cmake.orig 2023-03-14 19:59:33 UTC
--- cmake/FDBComponents.cmake.orig 2024-01-17 13:58:04 UTC
+++ cmake/FDBComponents.cmake
@@ -24,7 +24,7 @@ set(DISABLE_TLS OFF CACHE BOOL "Don't try to find Open
if(DISABLE_TLS)
@ -9,25 +9,23 @@
if(WIN32)
set(OPENSSL_MSVC_STATIC_RT ON)
endif()
@@ -201,6 +201,13 @@ else()
@@ -202,6 +202,12 @@ else()
endif()
################################################################################
+# misc optional components
+################################################################################
+
+set(WITH_CONTRIB ON)
+set(WITH_FLOWBENCH OFF)
+
+################################################################################
# Coroutine implementation
################################################################################
@@ -245,6 +252,8 @@ function(print_components)
@@ -246,6 +252,7 @@ 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}")

View File

@ -0,0 +1,17 @@
--- cmake/GetMsgpack.cmake.orig 2023-09-26 04:25:05 UTC
+++ cmake/GetMsgpack.cmake
@@ -1,9 +1,13 @@
find_package(msgpack 3.3.0 EXACT QUIET CONFIG)
+find_package(msgpackc-cxx 4.0.0...<6 QUIET CONFIG)
+find_package(msgpack-cxx 6 QUIET CONFIG)
add_library(msgpack INTERFACE)
-if(msgpack_FOUND)
+if(msgpack_FOUND OR msgpackc-cxx_FOUND)
target_link_libraries(msgpack INTERFACE msgpackc-cxx)
+elseif(msgpack-cxx_FOUND)
+ target_link_libraries(msgpack INTERFACE msgpack-cxx)
else()
include(ExternalProject)
ExternalProject_add(msgpackProject

View File

@ -0,0 +1,8 @@
--- fdbmonitor/CMakeLists.txt.orig 2024-01-17 13:58:04 UTC
+++ fdbmonitor/CMakeLists.txt
@@ -60,4 +60,4 @@ 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)
+add_dependencies(generate_profile fdbmonitor fdbserver fdbcli)

View File

@ -1,4 +1,4 @@
--- fdbserver/fdbserver.actor.cpp.orig 2022-09-19 11:42:41 UTC
--- fdbserver/fdbserver.actor.cpp.orig 2024-01-17 13:58:04 UTC
+++ fdbserver/fdbserver.actor.cpp
@@ -84,7 +84,11 @@
#if defined(__linux__) || defined(__FreeBSD__)
@ -12,7 +12,7 @@
#ifdef ALLOC_INSTRUMENTATION
#include <cxxabi.h>
#endif
@@ -2225,9 +2229,14 @@ int main(int argc, char* argv[]) {
@@ -2238,9 +2242,14 @@ int main(int argc, char* argv[]) {
f = result;
} else if (role == ServerRole::FlowProcess) {
TraceEvent(SevDebug, "StartingFlowProcess").detail("From", "fdbserver");

View File

@ -0,0 +1,8 @@
FoundationDB is a distributed database designed to handle large volumes of
structured data across clusters of commodity servers. It organizes data as an
ordered key-value store and employs ACID transactions for all operations. It is
especially well-suited for read/write workloads but also has excellent
performance for write-intensive workloads. Users interact with the database
using API language binding.
To learn more about FoundationDB, visit https://www.foundationdb.org

View File

@ -0,0 +1,13 @@
bin/dr_agent
bin/fdbbackup
bin/fdbcli
bin/fdbdr
bin/fdbrestore
include/foundationdb/fdb_c.h
include/foundationdb/fdb_c_internal.h
include/foundationdb/fdb_c_options.g.h
include/foundationdb/fdb_c_types.h
include/foundationdb/fdb.options
lib/foundationdb/backup_agent/backup_agent
lib/libfdb_c.so
@dir(%%FOUNDATIONDB_USER%%,%%FOUNDATIONDB_GROUP%%,755) %%ETCDIR%%

View File

@ -0,0 +1,6 @@
sbin/fdbmonitor
sbin/fdbserver
@sample %%ETCDIR%%/foundationdb.conf.sample
@dir(%%FOUNDATIONDB_USER%%,%%FOUNDATIONDB_GROUP%%,755) %%ETCDIR%%
@dir(%%FOUNDATIONDB_USER%%,%%FOUNDATIONDB_GROUP%%,755) %%FOUNDATIONDB_DBDIR%%
@dir(%%FOUNDATIONDB_USER%%,%%FOUNDATIONDB_GROUP%%,755) %%FOUNDATIONDB_LOGDIR%%

View File

@ -0,0 +1,11 @@
PORTNAME= foundationdb
PORTREVISION= 0
COMMENT= FoundationDB client
MASTERDIR= ${.CURDIR}/../foundationdb73-server
_CLIENT_ONLY= yes
_COMPONENT= client
.include "${MASTERDIR}/Makefile"

View File

@ -0,0 +1,108 @@
PORTNAME?= foundationdb
DISTVERSION= 7.3.41
PORTREVISION?= 0
CATEGORIES?= databases
PKGNAMESUFFIX?= ${DISTVERSION:C/([0-9]+)\.([0-9]+).*/\1\2/}-${_COMPONENT}
MAINTAINER?= dmitry.wagin@ya.ru
COMMENT?= FoundationDB is a large-scale distributed database
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= bash:shells/bash \
msgpack-cxx>0:devel/msgpack-cxx \
toml11>0:devel/toml11
LIB_DEPENDS= libboost_system.so:devel/boost-libs \
libeio.so:devel/libeio \
libfmt.so:devel/libfmt
USES= cmake compiler:c++20-lang llvm:max=16 mono:build python:build \
shebangfix ssl
USE_GITHUB= yes
GH_ACCOUNT= apple
GH_PROJECT= foundationdb
USE_LDCONFIG= yes
.if !defined(_CLIENT_ONLY)
_SERVER_ONLY= yes
_COMPONENT= server
USE_RC_SUBR= foundationdb
RUN_DEPENDS+= fdbcli:databases/${PORTNAME}${DISTVERSION:C/([0-9]+)\.([0-9]+).*/\1\2/}-client
SUB_FILES+= foundationdb.conf
.endif
SHEBANG_FILES= bindings/c/generate_asm.py
CMAKE_ARGS= -DOPENSSL_ROOT_DIR=${OPENSSLLIB}
CMAKE_OFF= BUILD_DOCUMENTATION BUILD_GO_BINDING BUILD_JAVA_BINDING \
BUILD_PYTHON_BINDING BUILD_RUBY_BINDING DISABLE_TLS \
SSD_ROCKSDB_EXPERIMENTAL USE_DTRACE USE_JEMALLOC
MAKE_ENV= MONO_REGISTRY_PATH=/tmp/registry
CONFLICTS+= ${PORTNAME}*-${_COMPONENT}*
SUB_LIST= ${SUB_FDB}
USERS= ${FOUNDATIONDB_USER}
GROUPS= ${FOUNDATIONDB_GROUP}
PLIST= ${PKGDIR}/pkg-plist-${_COMPONENT}
PLIST_SUB= ${SUB_FDB}
FOUNDATIONDB_USER?= foundationdb
FOUNDATIONDB_GROUP?= foundationdb
FOUNDATIONDB_DBDIR?= /var/db/foundationdb
FOUNDATIONDB_LOGDIR?= /var/log/foundationdb
SUB_FDB= FOUNDATIONDB_USER=${FOUNDATIONDB_USER} \
FOUNDATIONDB_GROUP=${FOUNDATIONDB_GROUP} \
FOUNDATIONDB_DBDIR=${FOUNDATIONDB_DBDIR} \
FOUNDATIONDB_LOGDIR=${FOUNDATIONDB_LOGDIR}
do-install:
@${MKDIR} ${STAGEDIR}${ETCDIR}
.if defined(_SERVER_ONLY)
${MKDIR} ${STAGEDIR}${FOUNDATIONDB_DBDIR}
${MKDIR} ${STAGEDIR}${FOUNDATIONDB_LOGDIR}
${INSTALL_DATA} ${WRKDIR}/foundationdb.conf \
${STAGEDIR}${ETCDIR}/foundationdb.conf.sample
. for f in fdbserver fdbmonitor
${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/${f} \
${STAGEDIR}${PREFIX}/sbin/
. endfor
.endif # _SERVER_ONLY
.if defined(_CLIENT_ONLY)
${MKDIR} ${STAGEDIR}${PREFIX}/include/foundationdb
${MKDIR} ${STAGEDIR}${PREFIX}/lib/foundationdb/backup_agent
${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/fdbcli \
${STAGEDIR}${PREFIX}/bin/
. for l in libfdb_c.so libfdb_c_shim.so
${INSTALL_LIB} ${WRKDIR}/.build/lib/${l} \
${STAGEDIR}/${PREFIX}/lib/
. endfor
. for i in fdb_c.h fdb_c_internal.h fdb_c_shim.h fdb_c_types.h
${INSTALL_DATA} ${WRKSRC}/bindings/c/foundationdb/${i} \
${STAGEDIR}/${PREFIX}/include/foundationdb/
. endfor
. for i in fdb_c_apiversion.g.h fdb_c_options.g.h
${INSTALL_DATA} ${WRKDIR}/.build/bindings/c/foundationdb/${i} \
${STAGEDIR}/${PREFIX}/include/foundationdb/
. endfor
${INSTALL_DATA} ${WRKSRC}/fdbclient/vexillographer/fdb.options \
${STAGEDIR}/${PREFIX}/include/foundationdb/
${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/fdbbackup \
${STAGEDIR}${PREFIX}/lib/foundationdb/backup_agent/backup_agent
. for s in fdbbackup fdbrestore fdbdr dr_agent
${RLN} ${STAGEDIR}${PREFIX}/lib/foundationdb/backup_agent/backup_agent \
${STAGEDIR}${PREFIX}/bin/${s}
. endfor
.endif # _CLIENT_ONLY
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1715420283
SHA256 (apple-foundationdb-7.3.41_GH0.tar.gz) = 208d917c6701b229b3bb141a57b97f466facd8996f9f51bd2c5204d868b96d24
SIZE (apple-foundationdb-7.3.41_GH0.tar.gz) = 13095814

View File

@ -0,0 +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 = %%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 = %%ETCDIR%%/fdb.cluster
# delete-envvars =
# kill-on-configuration-change = true
## Default parameters for individual fdbserver processes
[fdbserver]
command = %%PREFIX%%/sbin/fdbserver
public-address = auto:$ID
listen-address = public
datadir = %%FOUNDATIONDB_DBDIR%%/data/$ID
logdir = %%FOUNDATIONDB_LOGDIR%%
# logsize = 10MiB
# maxlogssize = 100MiB
# machine-id =
# datacenter-id =
# class =
# memory = 8GiB
# 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%%/lib/foundationdb/backup_agent/backup_agent
logdir = %%FOUNDATIONDB_LOGDIR%%
[backup_agent.1]

View File

@ -0,0 +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"
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%%/sbin/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

View File

@ -0,0 +1,15 @@
--- CMakeLists.txt.orig 2024-01-09 21:06:41 UTC
+++ CMakeLists.txt
@@ -193,8 +193,10 @@ else()
endif()
add_subdirectory(fdbbackup)
add_subdirectory(metacluster)
-add_subdirectory(tests)
-add_subdirectory(flowbench EXCLUDE_FROM_ALL)
+#add_subdirectory(tests)
+if(WITH_FLOWBENCH)
+ add_subdirectory(flowbench EXCLUDE_FROM_ALL)
+endif()
if(WITH_PYTHON AND WITH_C_BINDING)
add_subdirectory(bindings)
endif()

View File

@ -0,0 +1,11 @@
--- bindings/CMakeLists.txt.orig 2024-01-09 21:06:41 UTC
+++ bindings/CMakeLists.txt
@@ -15,7 +15,7 @@ endif()
if(WITH_RUBY_BINDING)
add_subdirectory(ruby)
endif()
-if(NOT WIN32 AND NOT OPEN_FOR_IDE)
+if(FALSE)
package_bindingtester()
package_bindingtester2()
endif()

View File

@ -0,0 +1,64 @@
--- bindings/c/CMakeLists.txt.orig 2024-01-09 21:06:41 UTC
+++ bindings/c/CMakeLists.txt
@@ -100,7 +100,7 @@ if(WIN32)
endif()
# The tests don't build on windows
-if(NOT WIN32)
+if(FALSE)
set(MAKO_SRCS
test/mako/admin_server.hpp
test/mako/admin_server.cpp
@@ -212,7 +212,7 @@ if(NOT WIN32)
target_include_directories(fdb_c_api_tester_impl PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/foundationdb/ ${CMAKE_SOURCE_DIR}/flow/include ${CMAKE_BINARY_DIR}/flow/include)
target_link_libraries(fdb_c_api_tester_impl PRIVATE fdb_cpp toml11_target Threads::Threads fmt::fmt boost_target)
- if(NOT APPLE)
+ if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_link_libraries(fdb_c_api_tester_impl PRIVATE stdc++fs)
endif()
target_link_libraries(fdb_c_api_tester_impl PRIVATE SimpleOpt)
@@ -439,6 +439,11 @@ elseif(NOT WIN32 AND NOT APPLE) # Linux Only
${SHIM_LIB_OUTPUT_DIR}/libfdb_c.so.tramp.S)
set(IMPLIBSO_SRC_DIR ${CMAKE_SOURCE_DIR}/contrib/Implib.so)
+
+ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
+ set(CMAKE_SYSTEM_PROCESSOR "x86_64")
+ endif()
+
set(IMPLIBSO_SRC
${IMPLIBSO_SRC_DIR}/implib-gen.py
${IMPLIBSO_SRC_DIR}/arch/common/init.cpp.tpl
@@ -464,31 +469,6 @@ elseif(NOT WIN32 AND NOT APPLE) # Linux Only
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/foundationdb>)
-
- add_executable(fdb_c_shim_unit_tests)
- target_link_libraries(fdb_c_shim_unit_tests PRIVATE fdb_c_shim fdb_c_unit_tests_impl)
-
- add_executable(fdb_c_shim_api_tester)
- target_link_libraries(fdb_c_shim_api_tester PRIVATE fdb_c_shim fdb_c_api_tester_impl)
-
- add_executable(fdb_c_shim_lib_tester test/shim_lib_tester.cpp)
- target_link_libraries(fdb_c_shim_lib_tester PRIVATE fdb_c_shim SimpleOpt fdb_cpp Threads::Threads)
- target_include_directories(fdb_c_shim_lib_tester PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/foundationdb/ ${CMAKE_SOURCE_DIR}/flow/include)
-
- set(SHIM_LIB_TEST_EXTRA_OPTIONS "")
- if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR USE_SANITIZER)
- list(APPEND SHIM_LIB_TEST_EXTRA_OPTIONS --disable-prev-version-tests)
- endif()
-
- add_python_venv_test(NAME fdb_c_shim_library_tests
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/test/fdb_c_shim_tests.py
- --build-dir ${CMAKE_BINARY_DIR}
- --unit-tests-bin $<TARGET_FILE:fdb_c_shim_unit_tests>
- --api-tester-bin $<TARGET_FILE:fdb_c_shim_api_tester>
- --shim-lib-tester-bin $<TARGET_FILE:fdb_c_shim_lib_tester>
- --api-test-dir ${CMAKE_SOURCE_DIR}/bindings/c/test/apitester/tests
- ${SHIM_LIB_TEST_EXTRA_OPTIONS}
- )
endif() # End Linux only

View File

@ -0,0 +1,11 @@
--- bindings/c/test/apitester/TesterWorkload.cpp.orig 2023-11-07 15:13:56 UTC
+++ bindings/c/test/apitester/TesterWorkload.cpp
@@ -172,7 +172,7 @@ void WorkloadBase::error(const std::string& msg) {
fmt::print(stderr, "[{}] ERROR: {}\n", workloadId, msg);
numErrors++;
if (numErrors > maxErrors && !failed) {
- fmt::print(stderr, "[{}] ERROR: Stopping workload after {} errors\n", workloadId, numErrors);
+ fmt::print(stderr, "[{}] ERROR: Stopping workload after {} errors\n", workloadId, numErrors.load());
failed = true;
}
}

View File

@ -0,0 +1,11 @@
--- bindings/c/test/mako/mako.cpp.orig 2023-11-07 15:13:56 UTC
+++ bindings/c/test/mako/mako.cpp
@@ -2378,7 +2378,7 @@ int statsProcessMain(Arguments const& args,
fmt::fprintf(fp, "\"txntrace\": %d,", args.txntrace);
fmt::fprintf(fp, "\"txntagging\": %d,", args.txntagging);
fmt::fprintf(fp, "\"txntagging_prefix\": \"%s\",", args.txntagging_prefix);
- fmt::fprintf(fp, "\"streaming_mode\": %d,", args.streaming_mode);
+ fmt::fprintf(fp, "\"streaming_mode\": %d,", static_cast<int>(args.streaming_mode));
fmt::fprintf(fp, "\"disable_ryw\": %d,", args.disable_ryw);
fmt::fprintf(fp, "\"transaction_timeout_db\": %d,", args.transaction_timeout_db);
fmt::fprintf(fp, "\"transaction_timeout_tx\": %d,", args.transaction_timeout_tx);

View File

@ -0,0 +1,20 @@
--- cmake/CompileBoost.cmake.orig 2023-06-01 02:57:35 UTC
+++ cmake/CompileBoost.cmake
@@ -123,7 +123,7 @@ if(USE_SANITIZER)
endif()
# since boost 1.72 boost installs cmake configs. We will enforce config mode
-set(Boost_USE_STATIC_LIBS ON)
+set(Boost_USE_STATIC_LIBS OFF)
# Clang and Gcc will have different name mangling to std::call_once, etc.
if (UNIX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang$")
@@ -151,7 +151,7 @@ if(WIN32)
return()
endif()
-find_package(Boost 1.78.0 EXACT QUIET COMPONENTS context filesystem iostreams serialization system CONFIG PATHS ${BOOST_HINT_PATHS})
+find_package(Boost 1.78.0 COMPONENTS context filesystem iostreams serialization system CONFIG PATHS ${BOOST_HINT_PATHS})
set(FORCE_BOOST_BUILD OFF CACHE BOOL "Forces cmake to build boost and ignores any installed boost")
# The precompiled boost silently broke in CI. While investigating, I considered extending

View File

@ -0,0 +1,32 @@
--- cmake/FDBComponents.cmake.orig 2024-01-09 21:06:41 UTC
+++ cmake/FDBComponents.cmake
@@ -24,7 +24,7 @@ set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
# Statically link OpenSSL to FDB, see
# https://cmake.org/cmake/help/v3.24/module/FindOpenSSL.html
# Without the flags, OpenSSL is dynamically linked.
-set(OPENSSL_USE_STATIC_LIBS TRUE)
+set(OPENSSL_USE_STATIC_LIBS FALSE)
if (WIN32)
set(OPENSSL_MSVC_STATIC_RT ON)
endif()
@@ -193,6 +193,12 @@ else()
endif()
################################################################################
+# misc optional components
+################################################################################
+
+set(WITH_FLOWBENCH OFF)
+
+################################################################################
# Coroutine implementation
################################################################################
@@ -236,6 +242,7 @@ 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 with FlowBench: ${WITH_FLOWBENCH}")
message(STATUS "Build with RocksDB: ${WITH_ROCKSDB_EXPERIMENTAL}")
message(STATUS "Build with AWS SDK: ${WITH_AWS_BACKUP}")
message(STATUS "=========================================")

View File

@ -0,0 +1,17 @@
--- cmake/GetMsgpack.cmake.orig 2023-09-26 04:25:05 UTC
+++ cmake/GetMsgpack.cmake
@@ -1,9 +1,13 @@
find_package(msgpack 3.3.0 EXACT QUIET CONFIG)
+find_package(msgpackc-cxx 4.0.0...<6 QUIET CONFIG)
+find_package(msgpack-cxx 6 QUIET CONFIG)
add_library(msgpack INTERFACE)
-if(msgpack_FOUND)
+if(msgpack_FOUND OR msgpackc-cxx_FOUND)
target_link_libraries(msgpack INTERFACE msgpackc-cxx)
+elseif(msgpack-cxx_FOUND)
+ target_link_libraries(msgpack INTERFACE msgpack-cxx)
else()
include(ExternalProject)
ExternalProject_add(msgpackProject

View File

@ -0,0 +1,11 @@
--- fdbcli/CMakeLists.txt.orig 2024-01-09 21:06:41 UTC
+++ fdbcli/CMakeLists.txt
@@ -25,7 +25,7 @@ if(NOT OPEN_FOR_IDE)
endif()
endif()
-if (NOT WIN32 AND NOT OPEN_FOR_IDE)
+if(FALSE)
add_dependencies(fdbcli external_client)
add_fdbclient_test(

View File

@ -0,0 +1,11 @@
--- fdbclient/SpecialKeySpace.actor.cpp.orig 2023-11-07 15:13:56 UTC
+++ fdbclient/SpecialKeySpace.actor.cpp
@@ -2996,7 +2996,7 @@ ACTOR Future<Void> validateSpecialSubrangeRead(ReadYou
// Test
RangeResult testResult = wait(ryw->getRange(testBegin, testEnd, limits, Snapshot::True, reverse));
if (testResult != expectedResult) {
- fmt::print("Reverse: {}\n", reverse);
+ fmt::print("Reverse: {}\n", static_cast<bool>(reverse));
fmt::print("Original range: [{}, {})\n", begin.toString(), end.toString());
fmt::print("Original result:\n");
for (const auto& kr : result) {

View File

@ -0,0 +1,8 @@
--- fdbmonitor/CMakeLists.txt.orig 2024-01-09 21:06:41 UTC
+++ fdbmonitor/CMakeLists.txt
@@ -62,4 +62,4 @@ 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)
+add_dependencies(generate_profile fdbmonitor fdbserver fdbcli)

View File

@ -0,0 +1,44 @@
--- fdbmonitor/fdbmonitor.cpp.orig 2024-01-09 21:06: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>
@@ -758,7 +760,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 */
dup2(cmd->pipes[0][1], fileno(stdout));
@@ -787,14 +792,16 @@ 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
if (delay)

View File

@ -0,0 +1,33 @@
--- fdbserver/BlobWorker.actor.cpp.orig 2023-11-07 15:13:56 UTC
+++ fdbserver/BlobWorker.actor.cpp
@@ -585,8 +585,8 @@ ACTOR Future<Void> updateGranuleSplitState(Transaction
fmt::print("Updating granule {0} split state from {1} {2} -> {3}\n",
currentGranuleID.toString(),
parentGranuleID.toString(),
- currentState,
- newState);
+ static_cast<int>(currentState),
+ static_cast<int>(newState));
}
Key myStateKey = blobGranuleSplitKeyFor(parentGranuleID, currentGranuleID);
@@ -631,8 +631,8 @@ ACTOR Future<Void> updateGranuleSplitState(Transaction
fmt::print("Ignoring granule {0} split state from {1} {2} -> {3}\n",
currentGranuleID.toString(),
parentGranuleID.toString(),
- currentState,
- newState);
+ static_cast<int>(currentState),
+ static_cast<int>(newState));
}
return Void();
@@ -5422,7 +5422,7 @@ ACTOR Future<Void> blobWorkerCore(BlobWorkerInterface
assignReq.keyRange.end.printable(),
assignReq.managerEpoch,
assignReq.managerSeqno,
- assignReq.type);
+ static_cast<int>(assignReq.type));
}
if (self->managerEpochOk(assignReq.managerEpoch)) {

View File

@ -0,0 +1,20 @@
--- fdbserver/storageserver.actor.cpp.orig 2024-01-09 21:06:41 UTC
+++ fdbserver/storageserver.actor.cpp
@@ -3615,7 +3615,7 @@ ACTOR Future<std::pair<ChangeFeedStreamReply, bool>> g
req.rangeID.printable().substr(0, 6),
req.id.toString().substr(0, 8),
foundVersion ? "key" : "version",
- DEBUG_CF_MISSING_VERSION,
+ static_cast<int64_t>(DEBUG_CF_MISSING_VERSION),
req.range.begin.printable(),
req.range.end.printable(),
req.begin,
@@ -3635,7 +3635,7 @@ ACTOR Future<std::pair<ChangeFeedStreamReply, bool>> g
data->thisServerID.toString().substr(0, 4),
req.rangeID.printable().substr(0, 6),
req.id.toString().substr(0, 8),
- DEBUG_CF_MISSING_VERSION,
+ static_cast<int64_t>(DEBUG_CF_MISSING_VERSION),
req.range.begin.printable(),
req.range.end.printable(),
req.begin,

View File

@ -0,0 +1,11 @@
--- flow/MkCertCli.cpp.orig 2023-11-07 15:13:56 UTC
+++ flow/MkCertCli.cpp
@@ -216,7 +216,7 @@ int main(int argc, char** argv) {
fmt::print(stderr, "ERROR: unknown option '{}'\n", args.OptionText());
return FDB_EXIT_ERROR;
default:
- fmt::print(stderr, "ERROR: unknown error {} with option '{}'\n", err, args.OptionText());
+ fmt::print(stderr, "ERROR: unknown error {} with option '{}'\n", static_cast<int>(err), args.OptionText());
return FDB_EXIT_ERROR;
}
} else {

View File

@ -0,0 +1,21 @@
--- flow/Platform.actor.cpp.orig 2023-09-26 04:25:05 UTC
+++ flow/Platform.actor.cpp
@@ -1979,6 +1979,9 @@ std::string epochsToGMTString(double epochs) {
}
std::vector<std::string> getEnvironmentKnobOptions() {
+#if defined(__FreeBSD__)
+ extern char** environ;
+#endif
constexpr const size_t ENVKNOB_PREFIX_LEN = sizeof(ENVIRONMENT_KNOB_OPTION_PREFIX) - 1;
std::vector<std::string> knobOptions;
#if defined(_WIN32)
@@ -1994,7 +1997,7 @@ std::vector<std::string> getEnvironmentKnobOptions() {
}
#else
char** e = nullptr;
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
e = environ;
#elif defined(__APPLE__)
e = *_NSGetEnviron();

View File

@ -0,0 +1,8 @@
FoundationDB is a distributed database designed to handle large volumes of
structured data across clusters of commodity servers. It organizes data as an
ordered key-value store and employs ACID transactions for all operations. It is
especially well-suited for read/write workloads but also has excellent
performance for write-intensive workloads. Users interact with the database
using API language binding.
To learn more about FoundationDB, visit https://www.foundationdb.org

View File

@ -0,0 +1,16 @@
bin/dr_agent
bin/fdbbackup
bin/fdbcli
bin/fdbdr
bin/fdbrestore
include/foundationdb/fdb_c.h
include/foundationdb/fdb_c_apiversion.g.h
include/foundationdb/fdb_c_internal.h
include/foundationdb/fdb_c_options.g.h
include/foundationdb/fdb_c_shim.h
include/foundationdb/fdb_c_types.h
include/foundationdb/fdb.options
lib/foundationdb/backup_agent/backup_agent
lib/libfdb_c.so
lib/libfdb_c_shim.so
@dir(%%FOUNDATIONDB_USER%%,%%FOUNDATIONDB_GROUP%%,755) %%ETCDIR%%

View File

@ -0,0 +1,6 @@
sbin/fdbmonitor
sbin/fdbserver
@sample %%ETCDIR%%/foundationdb.conf.sample
@dir(%%FOUNDATIONDB_USER%%,%%FOUNDATIONDB_GROUP%%,755) %%ETCDIR%%
@dir(%%FOUNDATIONDB_USER%%,%%FOUNDATIONDB_GROUP%%,755) %%FOUNDATIONDB_DBDIR%%
@dir(%%FOUNDATIONDB_USER%%,%%FOUNDATIONDB_GROUP%%,755) %%FOUNDATIONDB_LOGDIR%%