From owner-svn-ports-all@FreeBSD.ORG Fri Sep 27 12:04:45 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DDB6C690; Fri, 27 Sep 2013 12:04:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BBB2226FE; Fri, 27 Sep 2013 12:04:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8RC4jvO054087; Fri, 27 Sep 2013 12:04:45 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8RC4g59054070; Fri, 27 Sep 2013 12:04:42 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201309271204.r8RC4g59054070@svn.freebsd.org> From: Bryan Drewery Date: Fri, 27 Sep 2013 12:04:42 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r328458 - in head: . databases databases/riak databases/riak/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2013 12:04:45 -0000 Author: bdrewery Date: Fri Sep 27 12:04:42 2013 New Revision: 328458 URL: http://svnweb.freebsd.org/changeset/ports/328458 Log: - Add new port databases/riak - Did not convert to staging as it fails to build when enabled currently Riak is a distributed database designed for maximum availability: so long as your client can reach one server, it should be able to write data. In most failure scenarios the data you want to read should be available, albeit possibly stale. WWW: http://basho.com/riak/ PR: ports/182317 Submitted by: Bartek Rutkowski Added: head/databases/riak/ head/databases/riak/Makefile (contents, props changed) head/databases/riak/distinfo (contents, props changed) head/databases/riak/files/ head/databases/riak/files/patch-deps-eleveldb-c_src-leveldb-build_detect_platform (contents, props changed) head/databases/riak/files/patch-deps-eleveldb-c_src-leveldb-db-version_set.cc (contents, props changed) head/databases/riak/files/patch-deps-erlang_js-c_src-patches-js-src-config-FreeBSD.mk.patch (contents, props changed) head/databases/riak/files/patch-deps-node_package-priv-base-env.sh (contents, props changed) head/databases/riak/files/patch-rel-reltool.config (contents, props changed) head/databases/riak/files/patch-rel-vars.config (contents, props changed) head/databases/riak/files/riak.in (contents, props changed) head/databases/riak/pkg-descr (contents, props changed) head/databases/riak/pkg-plist (contents, props changed) Modified: head/GIDs head/UIDs head/databases/Makefile Modified: head/GIDs ============================================================================== --- head/GIDs Fri Sep 27 11:38:48 2013 (r328457) +++ head/GIDs Fri Sep 27 12:04:42 2013 (r328458) @@ -188,6 +188,7 @@ _pkcs11:*:602:_pkcs11 freeswitch:*:610: monkeysphere:*:641: aox:*:666: +riak:*:667: bnetd:*:700: bopm:*:717: openxpki:*:777: Modified: head/UIDs ============================================================================== --- head/UIDs Fri Sep 27 11:38:48 2013 (r328457) +++ head/UIDs Fri Sep 27 12:04:42 2013 (r328458) @@ -196,6 +196,7 @@ freeswitch:*:610:610::0:0:Freeswitch use _pla:*:636:80::0:0:phpLDAPAdmin Owner:/nonexistent:/usr/sbin/nologin monkeysphere:*:641:641::0:0:Monkeysphere User:/var/monkeysphere:/usr/local/bin/bash aox:*:666:666::0:0:Archiveopteryx user:/nonexistent:/usr/sbin/nologin +riak:*:667:667::0:0:Riak user:/usr/local/lib/riak:/bin/sh bnetd:*:700:700::0:0:Bnetd user:/nonexistent:/usr/sbin/nologin bopm:*:717:717::0:0:Blitzed Open Proxy Monitor:/nonexistent:/bin/sh openxpki:*:777:777::0:0:OpenXPKI Owner:/nonexistent:/usr/sbin/nologin Modified: head/databases/Makefile ============================================================================== --- head/databases/Makefile Fri Sep 27 11:38:48 2013 (r328457) +++ head/databases/Makefile Fri Sep 27 12:04:42 2013 (r328458) @@ -806,6 +806,7 @@ SUBDIR += redigo SUBDIR += redis SUBDIR += redis-devel + SUBDIR += riak SUBDIR += rrdman SUBDIR += rrdmerge SUBDIR += rrdtool Added: head/databases/riak/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/riak/Makefile Fri Sep 27 12:04:42 2013 (r328458) @@ -0,0 +1,99 @@ +# $FreeBSD$ + +PORTNAME= riak +PORTVERSION= 1.4.2 +CATEGORIES= databases +MASTER_SITES= http://s3.amazonaws.com/downloads.basho.com/riak/${PORTVERSION:R}/${PORTVERSION}/ \ + http://downloads.basho.com.s3.amazonaws.com/riak/${PORTVERSION:R}/${PORTVERSION}/ + +MAINTAINER= ports@robakdesign.com +COMMENT= Riak is an open source, distributed database + +BUILD_DEPENDS= ${LOCALBASE}/lib/erlang15/bin/erlc:${PORTSDIR}/lang/erlang-runtime15 + +USES= gmake +USE_RC_SUBR= riak + +PLIST= ${WRKDIR}/pkg-plist +PLIST_SUB+= RIAK_LOGDIR=${RIAK_LOGDIR} \ + RIAK_DBDIR=${RIAK_DBDIR} \ + RIAK_CONFDIR=${RIAK_CONFDIR} \ + RIAK_HOMEDIR=${RIAK_HOMEDIR} + +USERS= riak +GROUPS= riak + +RIAK_CONFDIR?= ${PREFIX}/etc/${PORTNAME} +RIAK_LOGDIR?= /var/log/${PORTNAME} +RIAK_DBDIR?= /var/db/${PORTNAME} +RIAK_LIBDIR?= ${PREFIX}/lib/${PORTNAME}/lib +RIAK_HOMEDIR?= ${PREFIX}/lib/${PORTNAME} + +MAN1= riak.1 riak-admin.1 riak-debug.1 search-cmd.1 +MANCOMPRESSED= yes + +ALL_TARGET= rel +MAKE_JOBS_UNSAFE=yes +MAKE_ENV= PATH=${LOCALBASE}/lib/erlang15/bin:${PATH} +NO_STAGE= yes + +pre-install: + ${RM} -f ${PLIST} + ${CAT} ${PKGDIR}/pkg-plist >> ${PLIST} + cd ${WRKSRC}/rel/${PORTNAME}; ${FIND} releases -type f \ + | ${AWK} '{print length, $$0}' | ${SORT} -rn | ${SED} -e 's/^/lib\//' \ + | ${AWK} '{print "lib/riak/"$$2 }' >> ${PLIST} + cd ${WRKSRC}/rel/${PORTNAME}; ${FIND} erts-* -type f \ + | ${AWK} '{print length, $$0}' | ${SORT} -rn \ + | ${AWK} '{print "lib/riak/"$$2 }' >> ${PLIST} + cd ${WRKSRC}/rel; ${FIND} ${PORTNAME}/lib -type f \ + | ${AWK} '{print length, $$0}' | ${SORT} -rn | ${SED} -e 's/^/lib\//' \ + | ${AWK} '{print "lib/"$$2 }' >> ${PLIST} + cd ${WRKSRC}/rel/${PORTNAME}; ${FIND} releases -type d \ + | ${AWK} '{print length, $$0}' | ${SORT} -rn | ${SED} -e 's/^/lib\//' \ + | ${AWK} '{print "lib/riak/"$$2 }' | ${SED} -e "s/^/@dirrm\ /" >> ${PLIST} + cd ${WRKSRC}/rel/${PORTNAME}; ${FIND} erts-* -type d \ + | ${AWK} '{print length, $$0}' | ${SORT} -rn | ${SED} -e 's/^/lib\//' \ + | ${AWK} '{print "lib/riak/"$$2 }' | ${SED} -e "s/^/@dirrm\ /" >> ${PLIST} + cd ${WRKSRC}/rel; ${FIND} ${PORTNAME}/lib -type d \ + | ${AWK} '{print length, $$0}' | ${SORT} -rn | ${SED} -e 's/^/lib\//' \ + | ${AWK} '{print "lib/"$$2 }' | ${SED} -e "s/^/@dirrm\ /" >> ${PLIST} + ${ECHO} "@dirrm lib/riak" >> ${PLIST} + ${ECHO} "@cwd /" >> ${PLIST} + ${ECHO} "@dirrmtry %%RIAK_DBDIR%%" >> ${PLIST} + ${ECHO} "@dirrmtry %%RIAK_LOGDIR%%" >> ${PLIST} + +do-install: +.for d in ${RIAK_CONFDIR} ${RIAK_LOGDIR} ${RIAK_DBDIR} ${RIAK_LIBDIR} ${RIAK_HOMEDIR} + [ -d ${d} ] || ${MKDIR} ${d} && ${CHOWN} ${USERS}:${GROUPS} ${d} +.endfor + ${INSTALL_DATA} ${WRKSRC}/rel/riak/etc/vm.args ${RIAK_CONFDIR}/vm.args.sample + ${INSTALL_DATA} ${WRKSRC}/rel/riak/etc/app.config ${RIAK_CONFDIR}/app.config.sample + ${INSTALL_DATA} ${WRKSRC}/rel/riak/etc/cert.pem ${RIAK_CONFDIR}/cert.pem.sample + ${INSTALL_DATA} ${WRKSRC}/rel/riak/etc/key.pem ${RIAK_CONFDIR}/key.pem.sample + (cd ${WRKSRC}/rel/riak/lib/ && ${COPYTREE_BIN} . ${RIAK_LIBDIR}) + (cd ${WRKSRC}/rel/riak/bin/ && ${COPYTREE_BIN} . ${PREFIX}/sbin/) + (cd ${WRKSRC}/rel/riak/lib/basho-patches && ${COPYTREE_SHARE} . ${RIAK_LIBDIR}/basho-patches) + (cd ${WRKSRC}/rel/riak/releases && ${COPYTREE_SHARE} . ${RIAK_HOMEDIR}/releases) + ${CP} -R ${WRKSRC}/rel/riak/erts-* ${RIAK_HOMEDIR} + ${CHOWN} -R ${USERS}:${GROUPS} ${PREFIX}/lib/${PORTNAME} + ${INSTALL_MAN} ${WRKSRC}/doc/man/man1/riak.1.gz ${MANPREFIX}/man/man1/ + ${INSTALL_MAN} ${WRKSRC}/doc/man/man1/riak-admin.1.gz ${MANPREFIX}/man/man1/ + ${INSTALL_MAN} ${WRKSRC}/doc/man/man1/riak-debug.1.gz ${MANPREFIX}/man/man1/ + ${INSTALL_MAN} ${WRKSRC}/doc/man/man1/search-cmd.1.gz ${MANPREFIX}/man/man1/ + +post-install: + @if [ ! -f ${RIAK_CONFDIR}/vm.args ]; then \ + ${CP} -p ${RIAK_CONFDIR}/vm.args.sample ${RIAK_CONFDIR}/vm.args; \ + fi + @if [ ! -f ${RIAK_CONFDIR}/app.config ]; then \ + ${CP} -p ${RIAK_CONFDIR}/app.config.sample ${RIAK_CONFDIR}/app.config; \ + fi + @if [ ! -f ${RIAK_CONFDIR}/cert.pem ]; then \ + ${CP} -p ${RIAK_CONFDIR}/cert.pem.sample ${RIAK_CONFDIR}/cert.pem; \ + fi + @if [ ! -f ${RIAK_CONFDIR}/key.pem ]; then \ + ${CP} -p ${RIAK_CONFDIR}/key.pem.sample ${RIAK_CONFDIR}/key.pem; \ + fi + +.include Added: head/databases/riak/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/riak/distinfo Fri Sep 27 12:04:42 2013 (r328458) @@ -0,0 +1,2 @@ +SHA256 (riak-1.4.2.tar.gz) = 6a1fdcfc1f3f0357eeb377ead6638db4187379e3b40121cef16b517e03c6fd11 +SIZE (riak-1.4.2.tar.gz) = 13738074 Added: head/databases/riak/files/patch-deps-eleveldb-c_src-leveldb-build_detect_platform ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/riak/files/patch-deps-eleveldb-c_src-leveldb-build_detect_platform Fri Sep 27 12:04:42 2013 (r328458) @@ -0,0 +1,31 @@ +Don't remove /dev/null on 8.x (see kern/139014) +-bdrewery 09/27/2013 +--- deps/eleveldb/c_src/leveldb/build_detect_platform.orig 2013-09-27 06:53:42.527133646 -0500 ++++ deps/eleveldb/c_src/leveldb/build_detect_platform 2013-09-27 06:54:01.360134865 -0500 +@@ -134,7 +134,7 @@ + true + else + # If -std=c++0x works, use . Otherwise use port_posix.h. +- $CXX $CFLAGS -std=c++0x -x c++ - -o /dev/null 2>/dev/null </dev/null < + int main() {} + EOF +@@ -147,7 +147,7 @@ + + # Test whether Snappy library is installed + # http://code.google.com/p/snappy/ +- $CXX $CFLAGS -x c++ - -o /dev/null 2>/dev/null </dev/null < + int main() {} + EOF +@@ -157,7 +157,7 @@ + fi + + # Test whether tcmalloc is available +- $CXX $CFLAGS -x c++ - -o /dev/null -ltcmalloc 2>/dev/null </dev/null < + #include ++#include + #include "db/filename.h" + #include "db/log_reader.h" + #include "db/log_writer.h" +@@ -53,13 +55,13 @@ + + // WARNING: m_OverlappedFiles flags need to match config::kNumOverlapFiles ... until unified + { +- {10485760, 262144000, 57671680, 209715200, 0, 300000000, true}, +- {10485760, 82914560, 57671680, 419430400, 0, 209715200, true}, +- {10485760, 104371840, 57671680, 1006632960, 200000000, 314572800, false}, +- {10485760, 125829120, 57671680, 4094304000, 3355443200, 419430400, false}, +- {10485760, 147286400, 57671680, 41943040000, 33554432000, 524288000, false}, +- {10485760, 188743680, 57671680, 419430400000, 335544320000, 629145600, false}, +- {10485760, 220200960, 57671680, 4194304000000, 3355443200000, 734003200, false} ++ {UINT64_C(10485760), UINT64_C(262144000), INT64_C(57671680), UINT64_C( 209715200), UINT64_C( 0), UINT64_C(300000000), true}, ++ {UINT64_C(10485760), UINT64_C( 82914560), INT64_C(57671680), UINT64_C( 419430400), UINT64_C( 0), UINT64_C(209715200), true}, ++ {UINT64_C(10485760), UINT64_C(104371840), INT64_C(57671680), UINT64_C( 1006632960), UINT64_C( 200000000), UINT64_C(314572800), false}, ++ {UINT64_C(10485760), UINT64_C(125829120), INT64_C(57671680), UINT64_C( 4094304000), UINT64_C( 3355443200), UINT64_C(419430400), false}, ++ {UINT64_C(10485760), UINT64_C(147286400), INT64_C(57671680), UINT64_C( 41943040000), UINT64_C( 33554432000), UINT64_C(524288000), false}, ++ {UINT64_C(10485760), UINT64_C(188743680), INT64_C(57671680), UINT64_C( 419430400000), UINT64_C( 335544320000), UINT64_C(629145600), false}, ++ {UINT64_C(10485760), UINT64_C(220200960), INT64_C(57671680), UINT64_C(4194304000000), UINT64_C(3355443200000), UINT64_C(734003200), false} + }; Added: head/databases/riak/files/patch-deps-erlang_js-c_src-patches-js-src-config-FreeBSD.mk.patch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/riak/files/patch-deps-erlang_js-c_src-patches-js-src-config-FreeBSD.mk.patch Fri Sep 27 12:04:42 2013 (r328458) @@ -0,0 +1,18 @@ +--- deps/erlang_js/c_src/patches/js-src-config-FreeBSD.mk.patch.orig 2013-01-29 21:13:01.000000000 +0100 ++++ deps/erlang_js/c_src/patches/js-src-config-FreeBSD.mk.patch 2013-09-12 14:59:29.000000000 +0200 +@@ -1,6 +1,6 @@ + --- c_src.orig/js/src/config/FreeBSD.mk 1969-12-31 19:00:00.000000000 -0500 + +++ c_src/js/src/config/FreeBSD.mk 2011-03-30 20:12:51.000000000 -0400 +-@@ -0,0 +1,99 @@ ++@@ -0,0 +1,100 @@ + +# -*- Mode: makefile -*- + +# + +# ***** BEGIN LICENSE BLOCK ***** +@@ -46,6 +46,7 @@ + + + +CC ?= gcc + +CCC ?= g++ +++LD = $(CC) + +CFLAGS += -Wall -Wno-format + +OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R + + Added: head/databases/riak/files/patch-deps-node_package-priv-base-env.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/riak/files/patch-deps-node_package-priv-base-env.sh Fri Sep 27 12:04:42 2013 (r328458) @@ -0,0 +1,27 @@ +--- deps/node_package/priv/base/env.sh.orig 2013-09-13 10:22:32.000000000 +0200 ++++ deps/node_package/priv/base/env.sh 2013-09-13 10:27:16.000000000 +0200 +@@ -100,7 +100,7 @@ + # read/write/delete .pid files during startup/shutdown + create_pid_dir() { + # Validate RUNNER_USER is set and they have permissions to write to /var/run +- # Don't continue if we've already sudo'd to RUNNER_USER ++ # Don't continue if we've already su'd to RUNNER_USER + if ([ "$RUNNER_USER" ] && [ "x$WHOAMI" != "x$RUNNER_USER" ]); then + if [ -w $RUN_DIR ]; then + mkdir -p $PID_DIR +@@ -161,12 +161,12 @@ + # Validate that the user running the script is the owner of the + # RUN_DIR. + if ([ "$RUNNER_USER" ] && [ "x$WHOAMI" != "x$RUNNER_USER" ]); then +- type sudo > /dev/null 2>&1 ++ type su > /dev/null 2>&1 + if [ "$?" -ne 0 ]; then +- echoerr "sudo doesn't appear to be installed and your EUID isn't $RUNNER_USER" 1>&2 ++ echoerr "su doesn't appear to be installed and your EUID isn't $RUNNER_USER" 1>&2 + exit 1 + fi +- exec sudo -H -u $RUNNER_USER -i $RUNNER_SCRIPT_DIR/$RUNNER_SCRIPT $@ ++ exec su - $RUNNER_USER -c "$RUNNER_SCRIPT_DIR/$RUNNER_SCRIPT $@" + fi + } + Added: head/databases/riak/files/patch-rel-reltool.config ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/riak/files/patch-rel-reltool.config Fri Sep 27 12:04:42 2013 (r328458) @@ -0,0 +1,16 @@ +--- rel/reltool.config.orig 2013-09-17 20:53:23.000000000 +0200 ++++ rel/reltool.config 2013-09-17 20:55:40.000000000 +0200 +@@ -37,8 +37,12 @@ + {boot_rel, "riak"}, + {profile, embedded}, + {excl_sys_filters, ["^bin/.*", +- "^erts.*/bin/(dialyzer|typer)"]}, ++ "^erts.*/bin/(dialyzer|typer)", ++ "^erts.*/bin/(dialyzer|typer)", ++ "^erts.*/doc", ++ "^erts.*/man"]}, + {excl_archive_filters, [".*"]}, ++ {app, mnesia, [{incl_app_filters, ["ebin/*"]}]}, + {app, cluster_info, [{incl_cond, include}]}, + {app, erlang_js, [{incl_cond, include}]}, + {app, ebloom, []}, Added: head/databases/riak/files/patch-rel-vars.config ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/riak/files/patch-rel-vars.config Fri Sep 27 12:04:42 2013 (r328458) @@ -0,0 +1,41 @@ +--- rel/vars.config.orig 2013-08-29 20:13:02.000000000 +0200 ++++ rel/vars.config 2013-09-11 23:04:34.000000000 +0200 +@@ -2,11 +2,12 @@ + %% ex: ft=erlang ts=4 sw=4 et + + %% Platform-specific installation paths +-{platform_bin_dir, "./bin"}. +-{platform_data_dir, "./data"}. +-{platform_etc_dir, "./etc"}. +-{platform_lib_dir, "./lib"}. +-{platform_log_dir, "./log"}. ++{platform_bin_dir, "/usr/local/sbin"}. ++{platform_data_dir, "/var/db/riak"}. ++{platform_etc_dir, "/usr/local/etc/riak"}. ++{platform_base_dir, "/usr/local/lib/riak"}. ++{platform_lib_dir, "/usr/local/lib/riak/lib"}. ++{platform_log_dir, "/var/log/riak"}. + + %% + %% etc/app.config +@@ -47,12 +48,12 @@ + %% + %% bin/riak + %% +-{runner_script_dir, "$(cd ${0%/*} && pwd)"}. +-{runner_base_dir, "{{runner_script_dir}}/.."}. +-{runner_etc_dir, "$RUNNER_BASE_DIR/etc"}. +-{runner_log_dir, "$RUNNER_BASE_DIR/log"}. +-{runner_lib_dir, "$RUNNER_BASE_DIR/lib"}. +-{runner_patch_dir, "$RUNNER_BASE_DIR/lib/basho-patches"}. +-{pipe_dir, "/tmp/$RUNNER_BASE_DIR/"}. +-{runner_user, ""}. ++{runner_script_dir, "{{platform_bin_dir}}"}. ++{runner_base_dir, "{{platform_base_dir}}"}. ++{runner_etc_dir, "{{platform_etc_dir}}"}. ++{runner_log_dir, "{{platform_log_dir}}"}. ++{runner_lib_dir, "{{platform_lib_dir}}"}. ++{runner_patch_dir, "{{platform_lib_dir}}/basho-patches"}. ++{pipe_dir, "/tmp/riak"}. ++{runner_user, "riak"}. + {runner_wait_process, "riak_core_node_watcher"}. Added: head/databases/riak/files/riak.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/riak/files/riak.in Fri Sep 27 12:04:42 2013 (r328458) @@ -0,0 +1,84 @@ +#!/bin/sh +# $FreeBSD$ + +# PROVIDE: riak +# REQUIRE: LOGIN cleanvar +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable riak: +# riak_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable riak on boot. +# + +. /etc/rc.subr + +name="riak" +rcvar=riak_enable + +pidfile=/var/run/riak/riak.pid + +start_cmd="riak_start" +stop_cmd="riak_stop" +restart_cdm="riak_restart" +status_cmd="riak_status" +command="/usr/local/sbin/riak" + +load_rc_config $name + +# Read rc.d config and set defaults +load_rc_config "$name" +: ${riak_enable="NO"} + +riak_start() +{ + echo "Starting Riak." + /usr/local/sbin/riak start + return 0 +} + +riak_stop() +{ + echo "Stopping Riak processes" + /usr/local/sbin/riak stop + killall -9 epmd + return 0 +} + +riak_restart() +{ + riak_stop + riak_start + return 0 +} + +riak_status() +{ + if riak_running; then + echo "Riak is running." + return 0 + else + echo "Riak is not running" + return 1 + fi +} + +riak_running() +{ + local pid result ps + pid=`/usr/local/sbin/riak getpid` + result=`echo $?` + if [ "$result" == 0 ]; then + ps=`ps -waux | grep ${pid} | grep riak` + result=`echo $?` + if [ "$result" ]; then + return 0 + else + return 1 + fi + else + return 1 + fi +} + +run_rc_command "$1" Added: head/databases/riak/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/riak/pkg-descr Fri Sep 27 12:04:42 2013 (r328458) @@ -0,0 +1,6 @@ +Riak is a distributed database designed for maximum availability: +so long as your client can reach one server, it should be able to +write data. In most failure scenarios the data you want to read +should be available, albeit possibly stale. + +WWW: http://basho.com/riak/ Added: head/databases/riak/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/riak/pkg-plist Fri Sep 27 12:04:42 2013 (r328458) @@ -0,0 +1,23 @@ +sbin/riak +sbin/riak-admin +sbin/riak-debug +sbin/search-cmd +@exec mkdir -p %%RIAK_CONFDIR%% +@exec mkdir -p %%RIAK_LOGDIR%% +@exec mkdir -p %%RIAK_DBDIR%% +@exec mkdir -p %%RIAK_HOMEDIR%% +@exec mkdir -p %%RIAK_LIBDIR%% +@unexec if cmp -s %D/%%ETCDIR%%/vm.args.sample %D/%%ETCDIR%%/vm.args; then rm -f %D/%%ETCDIR%%/vm.args; fi +%%ETCDIR%%/vm.args.sample +@exec if [ ! -f %D/%%ETCDIR%%/vm.args ] ; then cp -p %D/%F %B/vm.args; fi +@unexec if cmp -s %D/%%ETCDIR%%/app.config.sample %D/%%ETCDIR%%/app.config; then rm -f %D/%%ETCDIR%%/app.config; fi +%%ETCDIR%%/app.config.sample +@exec if [ ! -f %D/%%ETCDIR%%/app.config ] ; then cp -p %D/%F %B/app.config; fi +@unexec if cmp -s %D/%%ETCDIR%%/cert.pem.sample %D/%%ETCDIR%%/cert.pem; then rm -f %D/%%ETCDIR%%/cert.pem; fi +%%ETCDIR%%/cert.pem.sample +@exec if [ ! -f %D/%%ETCDIR%%/cert.pem ] ; then cp -p %D/%F %B/cert.pem; fi +@unexec if cmp -s %D/%%ETCDIR%%/key.pem.sample %D/%%ETCDIR%%/key.pem; then rm -f %D/%%ETCDIR%%/key.pem; fi +%%ETCDIR%%/key.pem.sample +@exec if [ ! -f %D/%%ETCDIR%%/key.pem ] ; then cp -p %D/%F %B/key.pem; fi +@dirrmtry %%ETCDIR%% +@unexec if [ -f %%RIAK_HOMEDIR%%/.erlang.cookie ] ; then rm -f %%RIAK_HOMEDIR%%/.erlang.cookie ; fi