Skip to content

Commit

Permalink
databases/foundationdb*: split, update to 7.1.59 & 7.3.41
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dwagin authored and dch committed May 23, 2024
1 parent cd8b929 commit 3dc4928
Show file tree
Hide file tree
Showing 53 changed files with 805 additions and 214 deletions.
2 changes: 2 additions & 0 deletions MOVED
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 1 addition & 1 deletion UIDs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion databases/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion databases/erlfdb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
98 changes: 0 additions & 98 deletions databases/foundationdb/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions databases/foundationdb/distinfo

This file was deleted.

11 changes: 0 additions & 11 deletions databases/foundationdb/files/patch-cmake_CompileBoost.cmake

This file was deleted.

24 changes: 0 additions & 24 deletions databases/foundationdb/files/patch-cmake_GetMsgpack.cmake

This file was deleted.

11 changes: 0 additions & 11 deletions databases/foundationdb/files/patch-fdbmonitor_CMakeLists.txt

This file was deleted.

14 changes: 0 additions & 14 deletions databases/foundationdb/pkg-descr

This file was deleted.

28 changes: 0 additions & 28 deletions databases/foundationdb/pkg-plist

This file was deleted.

11 changes: 11 additions & 0 deletions databases/foundationdb71-client/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
PORTNAME= foundationdb
PORTREVISION= 0

COMMENT= FoundationDB client

MASTERDIR= ${.CURDIR}/../foundationdb71-server

_CLIENT_ONLY= yes
_COMPONENT= client

.include "${MASTERDIR}/Makefile"
103 changes: 103 additions & 0 deletions databases/foundationdb71-server/Makefile
Original file line number Diff line number Diff line change
@@ -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>
3 changes: 3 additions & 0 deletions databases/foundationdb71-server/distinfo
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading

0 comments on commit 3dc4928

Please sign in to comment.