- Update to 1.6.5

- Added tarantool user and group
This commit is contained in:
Veniamin Gvozdikov 2015-07-07 16:59:55 +00:00
parent b2fa1c69a6
commit ba372be09b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=391515
11 changed files with 81 additions and 234 deletions

1
GIDs
View File

@ -317,6 +317,7 @@ hive:*:992:
kannel:*:993:
rcynic:*:994:
rpkirtr:*:995:
tarantool:*:996:
ebnetd:*:999:
nogroup:*:65533:
nobody:*:65534:

1
UIDs
View File

@ -326,5 +326,6 @@ hive:*:992:992::0:0:Apache Hive user:/nonexistent:/usr/sbin/nologin
kannel:*:993:993::0:0:Kannel User:/nonexistent:/usr/sbin/nologin
rcynic:*:994:994::0:0:RPKI validation system:/nonexistent:/usr/sbin/nologin
rpkirtr:*:995:995::0:0:RPKI router server:/nonexistent:/usr/sbin/nologin
tarantool:*:996:996::0:0:Tarantool Daemon:/nonexistent:/usr/sbin/nologin
ebnetd:*:999:999::0:0:EBNETD:/nonexistent:/usr/sbin/nologin
nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin

View File

@ -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,36 +12,43 @@ 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
USERS= tarantool
GROUPS= tarantool
SUB_LIST+= PORTNAME=${PORTNAME} \
TT_USER=${USERS} \
TT_DATADIR=${TT_DATADIR} \
TT_LOGDIR=${TT_LOGDIR} \
TT_RUNDIR=${TT_RUNDIR}
PLIST_SUB+= TT_USER=${USERS} \
TT_GROUP=${GROUPS} \
TT_LOGDIR=${TT_LOGDIR} \
TT_DATADIR=${TT_DATADIR} \
TT_RUNDIR=${TT_RUNDIR}
OPTIONS_DEFINE= DEBUG
DEBUG_DESC= Enable debug
MYSQL_DESC= Install MySQL plugin
PGSQL_DESC= Install PostgreSQL plugin
OPTIONS_DEFAULT=CLIENT MYSQL
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MCLIENT}
CMAKE_ARGS+= -DENABLE_CLIENT=true
PLIST_SUB+= CLIENT=""
.else
PLIST_SUB+= CLIENT="@comment "
.endif
.if ${PORT_OPTIONS:MDEBUG}
CMAKE_BUILD_TYPE= RelWithDebugInfo
CMAKE_ARGS+= -DENABLE_BACKTRACE=ON
@ -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 "
.if ${OSVERSION} < 1000000
IGNORE= does not support FreeBSD versions < 10.0
.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 "
.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>

View File

@ -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

View File

@ -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()

View File

@ -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"

View File

@ -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 */

View File

@ -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 */

View File

@ -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"
#
#
#########################################################

View File

@ -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
echo "tarantool: Starting instances"
for inst in ${INSTANCES}
do
${TDAEMON} ${TCTL} start $(basename ${inst} .lua)
done
}
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
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"

View File

@ -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%%