new port: databases/arangodb32
ArangoDB is a production ready highly available Multi-Model NoSQL database PR: 223240 Submitted by: dev@dudu.ro Differential Revision: https://reviews.freebsd.org/D12793
This commit is contained in:
parent
f361130744
commit
82bff85051
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=454616
15 changed files with 5097 additions and 2 deletions
2
GIDs
2
GIDs
|
@ -835,7 +835,7 @@ vuls:*:888:
|
|||
# free: 891
|
||||
# free: 892
|
||||
# free: 893
|
||||
# free: 894
|
||||
arangodb:*:894:
|
||||
snmptt:*:895:
|
||||
istat:*:896:
|
||||
znc:*:897:
|
||||
|
|
2
UIDs
2
UIDs
|
@ -841,7 +841,7 @@ vuls:*:888:888::0:0:VULnerability Scanner:/var/db/vuls:/usr/sbin/nologin
|
|||
# free: 891
|
||||
# free: 892
|
||||
# free: 893
|
||||
# free: 894
|
||||
arangodb:*:894:894::0:0:ArangoDB pseudo-user:/var/db/arangodb:/usr/sbin/nologin
|
||||
snmptt:*:895:895::0:0:SNMPTT User:/var/spool/snmptt:/usr/sbin/nologin
|
||||
istat:*:896:896::0:0:istatserver user:/nonexistent:/usr/sbin/nologin
|
||||
znc:*:897:897::0:0:ZNC User:/nonexistent:/usr/sbin/nologin
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
SUBDIR += apq-mysql
|
||||
SUBDIR += apq-odbc
|
||||
SUBDIR += apq-pgsql
|
||||
SUBDIR += arangodb32
|
||||
SUBDIR += ateam_mysql_ldap_auth
|
||||
SUBDIR += autobackupmysql
|
||||
SUBDIR += bbdb
|
||||
|
|
41
databases/arangodb32/Makefile
Normal file
41
databases/arangodb32/Makefile
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Created by: Vlad Galu <galu@packetdam.com>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= arangodb
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 3.2.8
|
||||
CATEGORIES= databases net
|
||||
PKGNAMESUFFIX= 32
|
||||
|
||||
MAINTAINER= galu@packetdam.com
|
||||
COMMENT= ArangoDB is a distributed NoSQL database with multiple data models
|
||||
|
||||
LICENSE= APACHE20
|
||||
|
||||
USES= gmake ssl cmake:outsource,noninja python:2.7
|
||||
USE_GITHUB= yes
|
||||
|
||||
CMAKE_ARGS= -DUSE_JEMALLOC:BOOL=off \
|
||||
-DUSE_BACKTRACE:BOOL=on \
|
||||
-DBASE_LD_FLAGS:STRING="-L${BUILD_WRKSRC}/3rdParty/V8/v5.7.492.77/x64.release/obj.target/src -L${BUILD_WRKSRC}/3rdParty/V8/v5.7.492.77/x64.release/obj.target/third_party/icu -L${LOCALBASE}/lib -L/usr/lib"
|
||||
|
||||
USERS= arangodb
|
||||
GROUPS= arangodb
|
||||
USE_RC_SUBR= arangod
|
||||
|
||||
post-install:
|
||||
.for section in 1 8
|
||||
${MV} ${STAGEDIR}${PREFIX}/share/man/man${section}/* ${STAGEDIR}${PREFIX}/man/man${section}/
|
||||
${RMDIR} ${STAGEDIR}${PREFIX}/share/man/man${section}
|
||||
.endfor
|
||||
${RMDIR} ${STAGEDIR}${PREFIX}/share/man
|
||||
${REINPLACE_CMD} -e 's|/usr/local/var/lib/arangodb3|/var/db/arangodb|g' ${STAGEDIR}${PREFIX}/etc/arangodb/*.conf
|
||||
${REINPLACE_CMD} -e 's|/usr/local/var/log/arangodb3|/var/log/arangodb|g' ${STAGEDIR}${PREFIX}/etc/arangodb/arangod.conf
|
||||
${FIND} ${STAGEDIR}${PREFIX}/etc/arangodb/ -type f -name *.conf -exec ${MV} {} {}.sample \;
|
||||
${RMDIR} ${STAGEDIR}${PREFIX}/var/lib/arangodb
|
||||
${RMDIR} ${STAGEDIR}${PREFIX}/var/lib/arangodb-apps
|
||||
${RMDIR} ${STAGEDIR}${PREFIX}/var/lib
|
||||
${RMDIR} ${STAGEDIR}${PREFIX}/var/log/arangodb
|
||||
${RMDIR} ${STAGEDIR}${PREFIX}/var/log
|
||||
${RMDIR} ${STAGEDIR}${PREFIX}/var
|
||||
.include <bsd.port.mk>
|
3
databases/arangodb32/distinfo
Normal file
3
databases/arangodb32/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1511171687
|
||||
SHA256 (arangodb-arangodb-v3.2.8_GH0.tar.gz) = 100e903711f07219e988fb7ae7f59b5eecd39f15b04eb6b8a91eb529a75a6d2b
|
||||
SIZE (arangodb-arangodb-v3.2.8_GH0.tar.gz) = 144173495
|
85
databases/arangodb32/files/arangod.in
Normal file
85
databases/arangodb32/files/arangod.in
Normal file
|
@ -0,0 +1,85 @@
|
|||
#!/bin/sh
|
||||
|
||||
# PROVIDE: arangod
|
||||
# REQUIRE: NETWORK ldconfig
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
||||
# to enable this service:
|
||||
#
|
||||
# arangod_enable (bool): Set to "NO" by default.
|
||||
# Set it to "YES" to enable arangod.
|
||||
# arangod_limits (bool): Set to "NO" by default.
|
||||
# Set it to yes to run `limits -e -U arangodb`
|
||||
# just before arangod starts.
|
||||
# arangod_dbpath (str): Default to "/var/db/arangodb"
|
||||
# Base database directory.
|
||||
# arangod_logpath (str): Default to "/var/log/arangodb"
|
||||
# Base logging directory
|
||||
# arangod_apppath (str): Default to "/var/db/arangodb-apps"
|
||||
# Base apps directory
|
||||
# arangod_flags (str): Custom additional arguments to be passed to arangod.
|
||||
# Default to "".
|
||||
# arangod_config (str): Default to "%%PREFIX%%/etc/arangodb/arangod.conf"
|
||||
# Path to config file
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="arangod"
|
||||
rcvar=arangod_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${arangod_enable="NO"}
|
||||
: ${arangod_limits="NO"}
|
||||
: ${arangod_dbpath="/var/db/arangodb"}
|
||||
: ${arangod_logpath="/var/log/arangodb"}
|
||||
: ${arangod_apppath="/var/db/arangodb-apps"}
|
||||
: ${arangod_flags=""}
|
||||
: ${arangod_user="arangodb"}
|
||||
: ${arangod_group="arangodb"}
|
||||
: ${arangod_config="%%PREFIX%%/etc/arangodb/arangod.conf"}
|
||||
|
||||
pidfile="${arangod_dbpath}/arangod.lock"
|
||||
command=%%PREFIX%%/sbin/${name}
|
||||
command_args="--configuration $arangod_config --database.directory $arangod_dbpath --log.output ${arangod_logpath}/arangod.log --javascript.app-path ${arangod_apppath} --daemon --pid-file ${pidfile} >/dev/null 2>/dev/null"
|
||||
start_precmd="${name}_prestart"
|
||||
|
||||
arangod_create_dbpath()
|
||||
{
|
||||
mkdir ${arangod_dbpath} >/dev/null 2>/dev/null
|
||||
[ $? -eq 0 ] && chown -R ${arangod_user}:${arangod_group} ${arangod_dbpath}
|
||||
}
|
||||
|
||||
arangod_create_logpath()
|
||||
{
|
||||
mkdir ${arangod_logpath} >/dev/null 2>/dev/null
|
||||
[ $? -eq 0 ] && chown -R ${arangod_user}:${arangod_group} ${arangod_logpath}
|
||||
}
|
||||
|
||||
arangod_create_apppath()
|
||||
{
|
||||
mkdir ${arangod_apppath} >/dev/null 2>/dev/null
|
||||
[ $? -eq 0 ] && chown -R ${arangod_user}:${arangod_group} ${arangod_apppath}
|
||||
}
|
||||
|
||||
arangod_prestart()
|
||||
{
|
||||
if [ ! -d ${arangod_dbpath} ]; then
|
||||
arangod_create_dbpath || return 1
|
||||
fi
|
||||
if [ ! -d ${arangod_logpath} ]; then
|
||||
arangod_create_logpath || return 1
|
||||
fi
|
||||
if [ ! -d ${arangod_apppath} ]; then
|
||||
arangod_create_apppath || return 1
|
||||
fi
|
||||
if checkyesno arangod_limits; then
|
||||
eval `/usr/bin/limits -e -U ${arangod_user}` 2>/dev/null
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
47
databases/arangodb32/files/patch-CMakeLists.txt
Normal file
47
databases/arangodb32/files/patch-CMakeLists.txt
Normal file
|
@ -0,0 +1,47 @@
|
|||
--- CMakeLists.txt.orig 2017-11-15 11:23:07 UTC
|
||||
+++ CMakeLists.txt
|
||||
@@ -38,9 +38,9 @@ if (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||
endif ()
|
||||
|
||||
if (WIN32)
|
||||
- project(arangodb3 CXX C)
|
||||
+ project(arangodb CXX C)
|
||||
else ()
|
||||
- project(arangodb3 CXX C ASM)
|
||||
+ project(arangodb CXX C ASM)
|
||||
endif ()
|
||||
|
||||
# required for clang completion in editors
|
||||
@@ -364,7 +364,7 @@ if (CMAKE_COMPILER_IS_GNUCC OR APPLE)
|
||||
endif ()
|
||||
|
||||
if (CMAKE_COMPILER_IS_CLANG)
|
||||
- if (APPLE)
|
||||
+ if (APPLE OR FREEBSD)
|
||||
set(BASE_CXX_FLAGS "${BASE_CXX_FLAGS} -stdlib=libc++")
|
||||
add_definitions("-Wno-deprecated-declarations")
|
||||
else ()
|
||||
@@ -498,7 +498,11 @@ if (USE_BACKTRACE)
|
||||
if (MSVC)
|
||||
set(BT_LIBS "Dbghelp" CACHE path "Debug Helper libraries")
|
||||
else ()
|
||||
- set(BT_LIBS "" CACHE path "Debug Helper libraries")
|
||||
+ if (FREEBSD)
|
||||
+ set(BT_LIBS execinfo)
|
||||
+ else ()
|
||||
+ set(BT_LIBS "" CACHE path "Debug Helper libraries")
|
||||
+ endif ()
|
||||
endif ()
|
||||
|
||||
add_definitions("-DARANGODB_ENABLE_BACKTRACE=1")
|
||||
@@ -573,7 +577,9 @@ endif ()
|
||||
################################################################################
|
||||
|
||||
if (NOT WINDOWS)
|
||||
- set(SYS_LIBS ${SYS_LIBS} resolv)
|
||||
+ if (NOT FREEBSD)
|
||||
+ set(SYS_LIBS ${SYS_LIBS} resolv)
|
||||
+ endif ()
|
||||
|
||||
if (NOT DARWIN)
|
||||
set(SYS_LIBS ${SYS_LIBS} rt)
|
11
databases/arangodb32/files/patch-arangod_Agency_Store.cpp
Normal file
11
databases/arangodb32/files/patch-arangod_Agency_Store.cpp
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- arangod/Agency/Store.cpp.orig 2017-11-15 11:23:07 UTC
|
||||
+++ arangod/Agency/Store.cpp
|
||||
@@ -601,7 +601,7 @@ void Store::dumpToBuilder(Builder& build
|
||||
auto ts = std::chrono::duration_cast<std::chrono::seconds>(
|
||||
i.first.time_since_epoch())
|
||||
.count();
|
||||
- builder.add(i.second, VPackValue(ts));
|
||||
+ builder.add(i.second, VPackValue((int64_t)ts));
|
||||
}
|
||||
}
|
||||
{
|
|
@ -0,0 +1,11 @@
|
|||
--- arangod/RestHandler/RestAuthHandler.cpp.orig 2017-11-15 11:23:07 UTC
|
||||
+++ arangod/RestHandler/RestAuthHandler.cpp
|
||||
@@ -59,7 +59,7 @@ std::string RestAuthHandler::generateJwt
|
||||
VPackObjectBuilder p(&bodyBuilder);
|
||||
bodyBuilder.add("preferred_username", VPackValue(username));
|
||||
bodyBuilder.add("iss", VPackValue("arangodb"));
|
||||
- bodyBuilder.add("exp", VPackValue(exp.count()));
|
||||
+ bodyBuilder.add("exp", VPackValue((int64_t)exp.count()));
|
||||
}
|
||||
return authentication->authInfo()->generateJwt(bodyBuilder);
|
||||
}
|
11
databases/arangodb32/files/patch-cmake_ArangoDBInstall.cmake
Normal file
11
databases/arangodb32/files/patch-cmake_ArangoDBInstall.cmake
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- cmake/ArangoDBInstall.cmake.orig 2017-11-16 20:17:40 UTC
|
||||
+++ cmake/ArangoDBInstall.cmake
|
||||
@@ -100,7 +100,7 @@ endif ()
|
||||
|
||||
install(
|
||||
DIRECTORY
|
||||
- ${PROJECT_BINARY_DIR}/var/log/arangodb3
|
||||
+ ${PROJECT_BINARY_DIR}/var/log/arangodb
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_LOCALSTATEDIR}/log
|
||||
)
|
|
@ -0,0 +1,52 @@
|
|||
--- lib/Basics/process-utils.cpp.orig 2017-11-15 11:23:07 UTC
|
||||
+++ lib/Basics/process-utils.cpp
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "process-utils.h"
|
||||
|
||||
-#if defined(TRI_HAVE_MACOS_MEM_STATS)
|
||||
+#if defined(TRI_HAVE_MACOS_MEM_STATS) || defined (__FreeBSD__)
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
@@ -581,6 +581,7 @@ TRI_process_info_t TRI_ProcessInfoSelf()
|
||||
}
|
||||
|
||||
#else
|
||||
+#ifdef _WIN32
|
||||
/// --------------------------------------------
|
||||
/// transform a file time to timestamp
|
||||
/// Particularities:
|
||||
@@ -673,6 +674,7 @@ TRI_process_info_t TRI_ProcessInfoSelf()
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief returns information about the process
|
||||
@@ -1254,7 +1256,7 @@ bool TRI_ContinueExternalProcess(TRI_ext
|
||||
/// @brief gets the physical memory
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
-#if defined(TRI_HAVE_MACOS_MEM_STATS)
|
||||
+#if defined(TRI_HAVE_MACOS_MEM_STATS) || defined(__FreeBSD__)
|
||||
|
||||
static uint64_t GetPhysicalMemory() {
|
||||
int mib[2];
|
||||
@@ -1297,6 +1299,7 @@ static uint64_t GetPhysicalMemory() {
|
||||
|
||||
#else
|
||||
|
||||
+#ifdef _WIN32
|
||||
static uint64_t GetPhysicalMemory() {
|
||||
PROCESS_MEMORY_COUNTERS pmc;
|
||||
memset(&result, 0, sizeof(result));
|
||||
@@ -1307,6 +1310,7 @@ static uint64_t GetPhysicalMemory() {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
+#endif // _WIN32
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
15
databases/arangodb32/files/patch-lib_Basics_socket-utils.h
Normal file
15
databases/arangodb32/files/patch-lib_Basics_socket-utils.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
--- lib/Basics/socket-utils.h.orig 2017-11-15 11:23:07 UTC
|
||||
+++ lib/Basics/socket-utils.h
|
||||
@@ -31,6 +31,12 @@
|
||||
#include <WS2tcpip.h>
|
||||
#endif
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/socket.h>
|
||||
+#include <netinet/in.h>
|
||||
+#endif
|
||||
+
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief socket types
|
||||
////////////////////////////////////////////////////////////////////////////////
|
|
@ -0,0 +1,11 @@
|
|||
--- lib/Logger/LogAppenderSyslog.cpp.orig 2017-11-15 11:23:07 UTC
|
||||
+++ lib/Logger/LogAppenderSyslog.cpp
|
||||
@@ -64,7 +64,7 @@ LogAppenderSyslog::LogAppenderSyslog(std
|
||||
if ('0' <= facility[0] && facility[0] <= '9') {
|
||||
value = StringUtils::int32(facility);
|
||||
} else {
|
||||
- CODE* ptr = reinterpret_cast<CODE*>(TRI_facilitynames);
|
||||
+ const CODE* ptr = reinterpret_cast<const CODE*>(TRI_facilitynames);
|
||||
|
||||
while (ptr->c_name != 0) {
|
||||
if (strcmp(ptr->c_name, facility.c_str()) == 0) {
|
5
databases/arangodb32/pkg-descr
Normal file
5
databases/arangodb32/pkg-descr
Normal file
|
@ -0,0 +1,5 @@
|
|||
ArangoDB is a native multi-model database with flexible data models for
|
||||
documents, graphs, and key-values. Build high performance applications
|
||||
using a convenient SQL-like query language or JavaScript extensions
|
||||
|
||||
WWW: https://www.arangodb.com
|
4802
databases/arangodb32/pkg-plist
Normal file
4802
databases/arangodb32/pkg-plist
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue