Index: head/databases/Makefile =================================================================== --- head/databases/Makefile +++ head/databases/Makefile @@ -77,6 +77,7 @@ SUBDIR += firebird25-server SUBDIR += fortytwo-bdb SUBDIR += foundationdb + SUBDIR += foundationdb-devel SUBDIR += fpc-dblib SUBDIR += fpc-fpindexer SUBDIR += fpc-gdbm Index: head/databases/foundationdb-devel/Makefile =================================================================== --- head/databases/foundationdb-devel/Makefile +++ head/databases/foundationdb-devel/Makefile @@ -0,0 +1,72 @@ +# $FreeBSD$ + +PORTNAME= foundationdb-devel +DISTVERSION= 7.0.0 +CATEGORIES= databases + +MAINTAINER= dch@FreeBSD.org +COMMENT= Distributed, transactional key-value store + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= bash:shells/bash +LIB_DEPENDS= libboost_system.so:devel/boost-libs \ + libeio.so:devel/libeio + +USES= compiler:c++17-lang cmake mono:build python:build shebangfix ssl +USE_GITHUB= yes +GH_ACCOUNT= wolfspider +GH_PROJECT= foundationdb +GH_TAGNAME= bc56b13 + +USE_RC_SUBR= foundationdb + +SHEBANG_FILES= build/csprojtom4.py build/link-wrapper.sh build/vcxprojtom4.py \ + bindings/c/generate_asm.py + +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} + +do-install: + # commands on first line, dev tools on next two +.for f in fdbbackup fdbcli fdbmonitor fdbserver \ + actor_flamegraph fdb_c_performance_test fdb_c_ryw_benchmark \ + fdb_c_txn_size_test fdb_flow_tester mako + ${INSTALL_PROGRAM} ${WRKDIR}/.build/bin/${f} ${STAGEDIR}${PREFIX}/bin/ +.endfor + # confirm with upstream if these are actually needed +.for s in backup_agent dr_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 libthirdparty.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 + ${INSTALL_DATA} ${WRKDIR}/foundationdb.conf \ + ${STAGEDIR}${PREFIX}/etc/foundationdb/foundationdb.conf.sample + +.include Index: head/databases/foundationdb-devel/distinfo =================================================================== --- head/databases/foundationdb-devel/distinfo +++ head/databases/foundationdb-devel/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1579515168 +SHA256 (wolfspider-foundationdb-7.0.0-bc56b13_GH0.tar.gz) = 70b380a3fa8d4eea94a03ef1874cdd39bd9c705d9a1c902bab758004557343b0 +SIZE (wolfspider-foundationdb-7.0.0-bc56b13_GH0.tar.gz) = 5049549 Index: head/databases/foundationdb-devel/files/foundationdb.conf.in =================================================================== --- head/databases/foundationdb-devel/files/foundationdb.conf.in +++ head/databases/foundationdb-devel/files/foundationdb.conf.in @@ -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 = %%DB_USER%% +group = %%DB_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 + +## 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%% +# 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%%/bin/backup_agent +logdir = %%LOG_DIR%% + +[backup_agent.1] Index: head/databases/foundationdb-devel/files/foundationdb.in =================================================================== --- head/databases/foundationdb-devel/files/foundationdb.in +++ head/databases/foundationdb-devel/files/foundationdb.in @@ -0,0 +1,33 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# 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_config="%%PREFIX%%/etc/foundationdb/foundationdb.conf"} + +command_args="--conffile ${foundationdb_config} --lockfile ${pidfile} --daemonize" +run_rc_command $1 Index: head/databases/foundationdb-devel/pkg-descr =================================================================== --- head/databases/foundationdb-devel/pkg-descr +++ head/databases/foundationdb-devel/pkg-descr @@ -0,0 +1,16 @@ +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. + +WWW: https://www.foundationdb.org/ Index: head/databases/foundationdb-devel/pkg-plist =================================================================== --- head/databases/foundationdb-devel/pkg-plist +++ head/databases/foundationdb-devel/pkg-plist @@ -0,0 +1,27 @@ +@dir(%%DB_USER%%,%%DB_GROUP%%,) %%DB_DIR%% +@dir(%%DB_USER%%,%%DB_GROUP%%,) %%LOG_DIR%% +@sample etc/foundationdb/foundationdb.conf.sample +bin/actor_flamegraph +bin/backup_agent +bin/dr_agent +bin/fdb_c_performance_test +bin/fdb_c_ryw_benchmark +bin/fdb_c_txn_size_test +bin/fdb_flow_tester +bin/fdbbackup +bin/fdbcli +bin/fdbmonitor +bin/fdbr +bin/fdbrestore +bin/fdbserver +bin/mako +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 +lib/libthirdparty.a