aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authorvg <vg@FreeBSD.org>2015-07-08 00:59:55 +0800
committervg <vg@FreeBSD.org>2015-07-08 00:59:55 +0800
commitba54969ee1f28c039c5c3a76d0525bf93259859e (patch)
treed4ce5a358715248e7673582ddf66a15591a93287 /databases
parente9a9ff6d07aeaf222a17a4f0942518e5f8e2023b (diff)
downloadfreebsd-ports-gnome-ba54969ee1f28c039c5c3a76d0525bf93259859e.tar.gz
freebsd-ports-gnome-ba54969ee1f28c039c5c3a76d0525bf93259859e.tar.zst
freebsd-ports-gnome-ba54969ee1f28c039c5c3a76d0525bf93259859e.zip
- Update to 1.6.5
- Added tarantool user and group
Diffstat (limited to 'databases')
-rw-r--r--databases/tarantool/Makefile82
-rw-r--r--databases/tarantool/distinfo4
-rw-r--r--databases/tarantool/files/patch-test_CMakeLists.txt18
-rw-r--r--databases/tarantool/files/patch-test_share_tarantool_tgz.cfg22
-rw-r--r--databases/tarantool/files/patch-third__party_libeio_ecb.h18
-rw-r--r--databases/tarantool/files/patch-third_party__libev_ev.c31
-rw-r--r--databases/tarantool/files/pkg-message.in11
-rw-r--r--databases/tarantool/files/tarantool.in56
-rw-r--r--databases/tarantool/pkg-plist73
9 files changed, 80 insertions, 235 deletions
diff --git a/databases/tarantool/Makefile b/databases/tarantool/Makefile
index 46b9799e76c9..00be795150c4 100644
--- a/databases/tarantool/Makefile
+++ b/databases/tarantool/Makefile
@@ -2,10 +2,9 @@
# $FreeBSD$
PORTNAME= tarantool
-PORTVERSION= 1.5.3
-PORTREVISION= 1
+PORTVERSION= 1.6.5
CATEGORIES= databases
-MASTER_SITES= http://tarantool.org/dist/
+MASTER_SITES= http://tarantool.org/dist/master/
DISTNAME= ${PORTNAME}-${PORTVERSION}-${TR_REV}-src
MAINTAINER= vg@FreeBSD.org
@@ -13,35 +12,42 @@ COMMENT= High performance key/value storage server
LICENSE= BSD2CLAUSE
-TR_REV= 102-g2857a4e
+TR_REV= 238-g74f3d65
MAKE_JOBS_UNSAFE=yes
-USES= cmake compiler:c++11-lang gettext gmake iconv perl5 readline
+USES= cmake compiler:c++11-lang gmake perl5 readline
+USE_GCC= 4.9+ # clang bug PR/201270
USE_LDCONFIG= yes
USE_RC_SUBR= ${PORTNAME}
SUB_FILES= pkg-message
+
+TT_DATADIR?= /var/db/tarantool
+TT_RUNDIR?= /var/run/tarantool
+TT_LOGDIR?= /var/log/tarantool
+
CMAKE_ARGS= -DCMAKE_INSTALL_MANDIR=man \
-DCMAKE_INSTALL_SYSCONFDIR=${ETCDIR} \
- -DCMAKE_LOCALSTATE_DIR=${DATADIR}
+ -DCMAKE_LOCALSTATE_DIR=${DATADIR} \
+ -DTARANTOOL_DATADIR="${TT_DATADIR}"
-OPTIONS_DEFINE= CLIENT DEBUG
-OPTIONS_GROUP= PLUGINS
-OPTIONS_GROUP_PLUGINS= MYSQL PGSQL
-PLUGINS_DESC= Plugins list
-CLIENT_DESC= Enable client
-DEBUG_DESC= Enable debug
-MYSQL_DESC= Install MySQL plugin
-PGSQL_DESC= Install PostgreSQL plugin
+USERS= tarantool
+GROUPS= tarantool
-OPTIONS_DEFAULT=CLIENT MYSQL
+SUB_LIST+= PORTNAME=${PORTNAME} \
+ TT_USER=${USERS} \
+ TT_DATADIR=${TT_DATADIR} \
+ TT_LOGDIR=${TT_LOGDIR} \
+ TT_RUNDIR=${TT_RUNDIR}
-.include <bsd.port.options.mk>
+PLIST_SUB+= TT_USER=${USERS} \
+ TT_GROUP=${GROUPS} \
+ TT_LOGDIR=${TT_LOGDIR} \
+ TT_DATADIR=${TT_DATADIR} \
+ TT_RUNDIR=${TT_RUNDIR}
-.if ${PORT_OPTIONS:MCLIENT}
-CMAKE_ARGS+= -DENABLE_CLIENT=true
-PLIST_SUB+= CLIENT=""
-.else
-PLIST_SUB+= CLIENT="@comment "
-.endif
+OPTIONS_DEFINE= DEBUG
+DEBUG_DESC= Enable debug
+
+.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDEBUG}
CMAKE_BUILD_TYPE= RelWithDebugInfo
@@ -51,32 +57,14 @@ CMAKE_BUILD_TYPE= Rel
CMAKE_ARGS+= -DENABLE_BACKTRACE=OFF
.endif
-.if ${PORT_OPTIONS:MMYSQL}
-CMAKE_ARGS+= -DWITH_MYSQL=ON
-PLIST_SUB+= MYSQL=""
-USE_MYSQL= yes
-.else
-CMAKE_ARGS+= -DWITH_MYSQL=OFF
-PLIST_SUB+= MYSQL="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MPGSQL}
-CMAKE_ARGS+= -DWITH_POSTGRESQL=ON
-PLIST_SUB+= PGSQL=""
-USES+= pgsql
-.else
-CMAKE_ARGS+= -DWITH_POSTGRESQL=OFF
-PLIST_SUB+= PGSQL="@comment "
+.if ${OSVERSION} < 1000000
+IGNORE= does not support FreeBSD versions < 10.0
.endif
-.if ${PORT_OPTIONS:MMYSQL} || ${PORT_OPTIONS:MPGSQL}
-PLIST_SUB+= PLUGINS=""
-.else
-PLIST_SUB+= PLUGINS="@comment "
-.endif
-
-.if ${OSVERSION} < 900000
-BROKEN= Does not build on FreeBSD < 9.0
-.endif
+post-install:
+ ${MKDIR} ${STAGEDIR}${TT_LOGDIR} \
+ ${STAGEDIR}${TT_DATADIR} \
+ ${STAGEDIR}${TT_RUNDIR} \
+ ${STAGEDIR}${ETCDIR}/instances.enabled
.include <bsd.port.mk>
diff --git a/databases/tarantool/distinfo b/databases/tarantool/distinfo
index ee7a19b21292..b167e3eff8b7 100644
--- a/databases/tarantool/distinfo
+++ b/databases/tarantool/distinfo
@@ -1,2 +1,2 @@
-SHA256 (tarantool-1.5.3-102-g2857a4e-src.tar.gz) = 288f22f01d0f0c295902380c6a57531237cc4732b6b124e6344da89b89ee77c3
-SIZE (tarantool-1.5.3-102-g2857a4e-src.tar.gz) = 2928105
+SHA256 (tarantool-1.6.5-238-g74f3d65-src.tar.gz) = 7d2c2248953e92e3db9556d045f4ab0e74815332a27a21ff51be021956a0cd4b
+SIZE (tarantool-1.6.5-238-g74f3d65-src.tar.gz) = 3678846
diff --git a/databases/tarantool/files/patch-test_CMakeLists.txt b/databases/tarantool/files/patch-test_CMakeLists.txt
deleted file mode 100644
index 13dfc9b14b51..000000000000
--- a/databases/tarantool/files/patch-test_CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
---- test/CMakeLists.txt.orig 2013-11-22 15:05:16.000000000 +0400
-+++ test/CMakeLists.txt 2013-11-22 19:07:51.591802946 +0400
-@@ -16,7 +16,7 @@
- macro(install_cfg type_cfg dest)
- install (FILES ${CMAKE_SOURCE_DIR}/test/share/tarantool_${type_cfg}.cfg
- DESTINATION ${dest}
-- RENAME "tarantool.cfg")
-+ RENAME "tarantool.cfg.sample")
- endmacro(install_cfg)
-
- if (ENABLE_RPM)
-@@ -31,5 +31,5 @@
- endif()
-
- install (FILES ${CMAKE_SOURCE_DIR}/test/box/00000000000000000001.snap
-- DESTINATION "${CMAKE_LOCALSTATE_DIR}/lib/tarantool")
-+ DESTINATION "${CMAKE_LOCALSTATE_DIR}")
- endif()
diff --git a/databases/tarantool/files/patch-test_share_tarantool_tgz.cfg b/databases/tarantool/files/patch-test_share_tarantool_tgz.cfg
deleted file mode 100644
index ba05e300c8f7..000000000000
--- a/databases/tarantool/files/patch-test_share_tarantool_tgz.cfg
+++ /dev/null
@@ -1,22 +0,0 @@
---- test/share/tarantool_tgz.cfg.orig 2013-11-22 20:37:20.623185968 +0400
-+++ test/share/tarantool_tgz.cfg 2013-11-22 20:38:47.452245623 +0400
-@@ -11,11 +11,11 @@
- #
- # Store the pid in this file. Relative to
- # startup dir.
--pid_file = "box.pid"
-+pid_file = "/var/run/tarantool.pid"
-
- #
- # Pipe all the logs to the console
--#logger=""
-+logger="cat - >> /var/log/tarantool.log"
-
- #
- # Read only and read-write port.
-@@ -46,4 +46,4 @@
-
- #
- # working directory (daemon will chdir(2) to it)
--work_dir = "var/lib/tarantool"
-+work_dir = "/var/db/tarantool"
diff --git a/databases/tarantool/files/patch-third__party_libeio_ecb.h b/databases/tarantool/files/patch-third__party_libeio_ecb.h
deleted file mode 100644
index bb4b523c7bfc..000000000000
--- a/databases/tarantool/files/patch-third__party_libeio_ecb.h
+++ /dev/null
@@ -1,18 +0,0 @@
---- third_party/libeio/ecb.h.orig 2014-02-19 14:08:58 UTC
-+++ third_party/libeio/ecb.h
-@@ -468,12 +468,12 @@ ecb_inline uint64_t ecb_rotr64 (uint64_t
- }
- #endif
-
--#if ECB_GCC_VERSION(4,5)
-+#if ECB_GCC_VERSION(4,5) || defined __clang__
- #define ecb_unreachable() __builtin_unreachable ()
- #else
- /* this seems to work fine, but gcc always emits a warning for it :/ */
-- ecb_inline void ecb_unreachable (void) ecb_noreturn;
-- ecb_inline void ecb_unreachable (void) { }
-+ ecb_inline ecb_noreturn void ecb_unreachable (void);
-+ ecb_inline ecb_noreturn void ecb_unreachable (void) { }
- #endif
-
- /* try to tell the compiler that some condition is definitely true */
diff --git a/databases/tarantool/files/patch-third_party__libev_ev.c b/databases/tarantool/files/patch-third_party__libev_ev.c
deleted file mode 100644
index 9ac1e2cc2244..000000000000
--- a/databases/tarantool/files/patch-third_party__libev_ev.c
+++ /dev/null
@@ -1,31 +0,0 @@
---- third_party/libev/ev.c.orig 2014-02-19 14:08:58 UTC
-+++ third_party/libev/ev.c
-@@ -928,12 +928,12 @@ ecb_inline uint64_t ecb_rotr64 (uint64_t
- }
- #endif
-
--#if ECB_GCC_VERSION(4,5)
-+#if ECB_GCC_VERSION(4,5) || defined __clang__
- #define ecb_unreachable() __builtin_unreachable ()
- #else
- /* this seems to work fine, but gcc always emits a warning for it :/ */
-- ecb_inline void ecb_unreachable (void) ecb_noreturn;
-- ecb_inline void ecb_unreachable (void) { }
-+ ecb_inline ecb_noreturn void ecb_unreachable (void);
-+ ecb_inline ecb_noreturn void ecb_unreachable (void) { }
- #endif
-
- /* try to tell the compiler that some condition is definitely true */
-@@ -2226,10 +2226,12 @@ ev_recommended_backends (void) EV_THROW
- unsigned int flags = ev_supported_backends ();
-
- #ifndef __NetBSD__
-+#ifndef __FreeBSD__
- /* kqueue is borked on everything but netbsd apparently */
- /* it usually doesn't work correctly on anything but sockets and pipes */
- flags &= ~EVBACKEND_KQUEUE;
- #endif
-+#endif
- #ifdef __APPLE__
- /* only select works correctly on that "unix-certified" platform */
- flags &= ~EVBACKEND_KQUEUE; /* horribly broken, even for sockets */
diff --git a/databases/tarantool/files/pkg-message.in b/databases/tarantool/files/pkg-message.in
index 360ac5048b51..1d5a808cd5b0 100644
--- a/databases/tarantool/files/pkg-message.in
+++ b/databases/tarantool/files/pkg-message.in
@@ -3,19 +3,12 @@
#
# After install you'll need:
#
-# Edit/copy example config:
-# %%ETCDIR%%/tarantool.cfg.sample to
-# %%ETCDIR%%/tarantool.cfg
-#
# Configuration at /etc/rc.conf:
#
# * Enable tarantool on startup:
# tarantool_enable="YES"
-# * Change config (Default %%ETCDIR%%/tarantool.cfg):
-# tarantool_config="%%ETCDIR%%/tarantool.cfg"
-# * Path to storage, depended by option work_dir at:
-# %%ETCDIR%%/tarantool.cfg
-# tarantool_data="/var/db/tarantool"
+# * Path to storage instances:
+# tarantool_instances="%%ETCDIR%%/instances.enabled"
#
#
#########################################################
diff --git a/databases/tarantool/files/tarantool.in b/databases/tarantool/files/tarantool.in
index 12500db02a18..98ea8dd888d3 100644
--- a/databases/tarantool/files/tarantool.in
+++ b/databases/tarantool/files/tarantool.in
@@ -7,8 +7,7 @@
# KEYWORD: shutdown
#
# tarantool_enable="YES"
-# tarantool_config=""
-# tarantool_data="/var/db/tarantool"
+# tarantool_instances=""
#
. /etc/rc.subr
@@ -19,35 +18,38 @@ rcvar=tarantool_enable
load_rc_config "$name"
tarantool_enable=${tarantool_enable:-"NO"}
-tarantool_config=${tarantool_config:-"%%ETCDIR%%/$name.cfg"}
-tarantool_data=${tarantool_data:-"/var/db/tarantool"}
+tarantool_instances=${tarantool_instances:-"%%ETCDIR%%/instances.enabled"}
-command="%%PREFIX%%/bin/tarantool_box"
-command_args="--config=${tarantool_config} --background"
-pidfile="/var/run/$name.pid"
+start_cmd="${name}_start"
+stop_cmd="${name}_stop"
+restart_cmd="${name}_restart"
-start_precmd="${name}_prestart"
+INSTANCES=$(find ${tarantool_instances} -type f -name '*.lua')
+TDAEMON=%%PREFIX%%/bin/tarantool
+TCTL=%%PREFIX%%/bin/tarantoolctl
-tarantool_prestart()
+tarantool_start()
{
- if ! [ -d ${tarantool_data} ]
- then
- eval mkdir -p ${tarantool_data}
- fi
-
- if ! [ -f "${tarantool_data}/00000000000000000001.snap" ]
- then
- if ! [ -f ${tarantool_config} ]
- then
- echo "===> Install default config file."
- eval cp "%%ETCDIR%%/tarantool.cfg.sample" ${tarantool_config}
- echo "===> Install default snapshot."
- eval cp "%%DATADIR%%/00000000000000000001.snap" ${tarantool_data}
- else
- echo "===> Init tarantool storage by ${tarantool_config}"
- eval ${command} --config=${tarantool_config} --init-storage
- fi
- fi
+ echo "tarantool: Starting instances"
+ for inst in ${INSTANCES}
+ do
+ ${TDAEMON} ${TCTL} start $(basename ${inst} .lua)
+ done
+}
+
+tarantool_stop()
+{
+ echo "tarantool: Stopping instances"
+ for inst in ${INSTANCES}
+ do
+ ${TDAEMON} ${TCTL} stop $(basename ${inst} .lua)
+ done
+}
+
+tarantool_restart()
+{
+ tarantool_stop
+ tarantool_start
}
run_rc_command "$1"
diff --git a/databases/tarantool/pkg-plist b/databases/tarantool/pkg-plist
index 496335960e31..fd3258d46fd1 100644
--- a/databases/tarantool/pkg-plist
+++ b/databases/tarantool/pkg-plist
@@ -1,67 +1,18 @@
-bin/tarancheck
-bin/tarantar
-bin/tarantool_box
-%%CLIENT%%bin/tarantool
-%%ETCDIR%%/tarantool.cfg.sample
-include/tarantool/config.h
+bin/tarantool
+bin/tarantoolctl
+%%ETCDIR%%/default/tarantool
include/tarantool/lauxlib.h
include/tarantool/lua.h
include/tarantool/lua.hpp
include/tarantool/luaconf.h
include/tarantool/luajit.h
include/tarantool/lualib.h
-include/tarantool/tnt.h
-include/tarantool/tnt_buf.h
-include/tarantool/tnt_call.h
-include/tarantool/tnt_delete.h
-include/tarantool/tnt_dir.h
-include/tarantool/tnt_enc.h
-include/tarantool/tnt_insert.h
-include/tarantool/tnt_io.h
-include/tarantool/tnt_iob.h
-include/tarantool/tnt_iter.h
-include/tarantool/tnt_lex.h
-include/tarantool/tnt_log.h
-include/tarantool/tnt_mem.h
-include/tarantool/tnt_net.h
-include/tarantool/tnt_opt.h
-include/tarantool/tnt_ping.h
-include/tarantool/tnt_proto.h
-include/tarantool/tnt_queue.h
-include/tarantool/tnt_reply.h
-include/tarantool/tnt_request.h
-include/tarantool/tnt_rpl.h
-include/tarantool/tnt_select.h
-include/tarantool/tnt_snapshot.h
-include/tarantool/tnt_sql.h
-include/tarantool/tnt_stream.h
-include/tarantool/tnt_tuple.h
-include/tarantool/tnt_update.h
-include/tarantool/tnt_utf8.h
-include/tarantool/tnt_xlog.h
-lib/libtarantool.a
-lib/libtarantool.so
-lib/libtarantool.so.1
-lib/libtarantool.so.1.1
-lib/libtarantoolnet.a
-lib/libtarantoolnet.so
-lib/libtarantoolnet.so.1
-lib/libtarantoolnet.so.1.1
-lib/libtarantoolrpl.a
-lib/libtarantoolrpl.so
-lib/libtarantoolrpl.so.1
-lib/libtarantoolrpl.so.1.1
-lib/libtarantoolsql.a
-lib/libtarantoolsql.so
-lib/libtarantoolsql.so.1
-lib/libtarantoolsql.so.1.1
-lib/tarantool/box/sophia.so
-%%MYSQL%%lib/tarantool/box/net/mysql.so
-%%PGSQL%%lib/tarantool/box/net/pg.so
-%%CLIENT%%man/man1/tarantool.1.gz
-man/man1/tarantool_box.1.gz
-%%DOCSDIR%%/README.md
-%%DOCSDIR%%/box-protocol.txt
-%%DOCSDIR%%/LICENSE
-%%DATADIR%%/00000000000000000001.snap
-%%DATADIR%%/box/net/sql.lua
+include/tarantool/tarantool.h
+man/man1/tarantool.1.gz
+man/man1/tarantoolctl.1.gz
+%%PORTDOCS%%%%DOCSDIR%%/LICENSE
+%%PORTDOCS%%%%DOCSDIR%%/README.md
+@dir %%ETCDIR%%/instances.enabled
+@dir(%%TT_USER%%,%%TT_GROUP%%,) %%TT_DATADIR%%
+@dir(%%TT_USER%%,%%TT_GROUP%%,) %%TT_LOGDIR%%
+@dir(%%TT_USER%%,%%TT_GROUP%%,) %%TT_RUNDIR%%