View | Details | Raw Unified | Return to bug 198355 | Differences between
and this patch

Collapse All | Expand All

(-)riak/Makefile (-21 / +30 lines)
Lines 1-42 Link Here
1
# $FreeBSD: head/databases/riak/Makefile 379548 2015-02-21 20:39:33Z robak $
1
# $FreeBSD: head/databases/riak/Makefile 371981 2014-11-01 00:09:15Z bapt $
2
2
3
PORTNAME=	riak
3
PORTNAME=	riak
4
PORTVERSION=	1.4.12
4
PORTVERSION=	2.0.5
5
CATEGORIES=	databases
5
CATEGORIES=	databases
6
MASTER_SITES=	http://s3.amazonaws.com/downloads.basho.com/riak/${PORTVERSION:R}/${PORTVERSION}/ \
6
MASTER_SITES=	http://s3.amazonaws.com/downloads.basho.com/riak/${PORTVERSION:R}/${PORTVERSION}/ \
7
		http://downloads.basho.com.s3.amazonaws.com/riak/${PORTVERSION:R}/${PORTVERSION}/
7
	http://downloads.basho.com.s3.amazonaws.com/riak/${PORTVERSION:R}/${PORTVERSION}/ \
8
8
9
MAINTAINER=	robak@FreeBSD.org
9
MAINTAINER=	robak@FreeBSD.org
10
COMMENT=	Riak is an open source, distributed, noSQL database
10
COMMENT=	Riak is an open source, distributed, noSQL database
11
11
12
LICENSE=	APACHE20
12
LICENSE=	APACHE20
13
13
14
BUILD_DEPENDS=	${LOCALBASE}/lib/erlang15/bin/erlc:${PORTSDIR}/lang/erlang-runtime15
14
BUILD_DEPENDS=	${LOCALBASE}/lib/erlang16/bin/erlc:${PORTSDIR}/lang/erlang-runtime16
15
15
16
USES=		gmake readline
16
USES=		gmake readline
17
USE_RC_SUBR=	riak
17
USE_RC_SUBR=	riak
18
18
USE_GCC=	yes
19
PLIST=		${WRKDIR}/pkg-plist
20
PLIST_SUB+=	GROUPS=${GROUPS} \
21
		RIAK_CONFDIR=${RIAK_CONFDIR} \
22
		RIAK_DBDIR=${RIAK_DBDIR} \
23
		RIAK_HOMEDIR=${RIAK_HOMEDIR} \
24
		RIAK_LIBDIR=${RIAK_LIBDIR} \
25
		RIAK_LOGDIR=${RIAK_LOGDIR} \
26
		USERS=${USERS}
27
19
28
USERS=		riak
20
USERS=		riak
29
GROUPS=		riak
21
GROUPS=		riak
30
22
31
RIAK_CONFDIR?=	${PREFIX}/etc/${PORTNAME}
32
RIAK_LOGDIR?=	/var/log/${PORTNAME}
23
RIAK_LOGDIR?=	/var/log/${PORTNAME}
33
RIAK_DBDIR?=	/var/db/${PORTNAME}
24
RIAK_DBDIR?=	/var/db/${PORTNAME}
34
RIAK_LIBDIR?=	${PREFIX}/lib/${PORTNAME}/lib
35
RIAK_HOMEDIR?=	${PREFIX}/lib/${PORTNAME}
25
RIAK_HOMEDIR?=	${PREFIX}/lib/${PORTNAME}
26
RIAK_LIBDIR?=	${PREFIX}/lib/${PORTNAME}/lib
27
28
PLIST=		${WRKDIR}/pkg-plist
29
PLIST_SUB+=	RIAK_DBDIR=${RIAK_DBDIR} \
30
		RIAK_HOMEDIR=${RIAK_HOMEDIR} \
31
		RIAK_LIBDIR=${RIAK_LIBDIR} \
32
		RIAK_LOGDIR=${RIAK_LOGDIR} \
33
		USERS=${USERS} \
34
		GROUPS=${GROUPS}
36
35
37
ALL_TARGET=	rel
36
ALL_TARGET=	rel
38
MAKE_JOBS_UNSAFE=yes
37
MAKE_JOBS_UNSAFE=yes
39
MAKE_ENV=	PATH=${LOCALBASE}/lib/erlang15/bin:${PATH}
38
MAKE_ENV=	PATH=${LOCALBASE}/lib/erlang16/bin:${PATH}
40
39
41
.include <bsd.port.pre.mk>
40
.include <bsd.port.pre.mk>
42
41
Lines 55-71 Link Here
55
	(cd ${WRKSRC}/rel; ${FIND} ${PORTNAME}/lib -type f \
54
	(cd ${WRKSRC}/rel; ${FIND} ${PORTNAME}/lib -type f \
56
		| ${AWK} '{print length, $$0}' | ${SORT} -rn | ${SED} -e 's/^/lib\//' \
55
		| ${AWK} '{print length, $$0}' | ${SORT} -rn | ${SED} -e 's/^/lib\//' \
57
		| ${AWK} '{print "lib/"$$2 }' >> ${PLIST})
56
		| ${AWK} '{print "lib/"$$2 }' >> ${PLIST})
57
	(cd ${WRKSRC}/rel; ${FIND} ${PORTNAME}/lib -type d -empty \
58
		| ${AWK} '{print length, $$0}' | ${SORT} -rn | ${SED} -e 's/^/lib\//' \
59
		| ${AWK} '{print "@dir lib/"$$2 }' >> ${PLIST})
58
	${ECHO} "@owner" >> ${PLIST}
60
	${ECHO} "@owner" >> ${PLIST}
59
	${ECHO} "@group" >> ${PLIST}
61
	${ECHO} "@group" >> ${PLIST}
60
62
61
do-install:
63
do-install:
62
.for d in ${RIAK_CONFDIR} ${RIAK_LOGDIR} ${RIAK_DBDIR} ${RIAK_LIBDIR} ${RIAK_HOMEDIR}
64
.for d in ${ETCDIR} ${RIAK_LOGDIR} ${RIAK_DBDIR} ${RIAK_LIBDIR} ${RIAK_HOMEDIR}
63
	${MKDIR} ${STAGEDIR}${d}
65
	${MKDIR} ${STAGEDIR}${d}
64
.endfor
66
.endfor
65
	${INSTALL_DATA} ${WRKSRC}/rel/riak/etc/vm.args ${STAGEDIR}${RIAK_CONFDIR}/vm.args.sample
67
	${INSTALL_DATA} ${WRKSRC}/rel/riak/etc/riak.conf ${STAGEDIR}${ETCDIR}/riak.conf.sample
66
	${INSTALL_DATA} ${WRKSRC}/rel/riak/etc/app.config ${STAGEDIR}${RIAK_CONFDIR}/app.config.sample
68
	${INSTALL_DATA} ${WRKSRC}/rel/riak/etc/riak.conf ${STAGEDIR}${ETCDIR}/riak.conf
67
	${INSTALL_DATA} ${WRKSRC}/rel/riak/etc/cert.pem ${STAGEDIR}${RIAK_CONFDIR}/cert.pem.sample
69
	${INSTALL_DATA} ${WRKSRC}/rel/riak/etc/solr-log4j.properties ${STAGEDIR}${ETCDIR}/solr-log4j.properties.sample
68
	${INSTALL_DATA} ${WRKSRC}/rel/riak/etc/key.pem ${STAGEDIR}${RIAK_CONFDIR}/key.pem.sample
70
	${INSTALL_DATA} ${WRKSRC}/rel/riak/etc/solr-log4j.properties ${STAGEDIR}${ETCDIR}/solr-log4j.properties
69
	(cd ${WRKSRC}/rel/riak/lib/ && ${COPYTREE_BIN} . ${STAGEDIR}${RIAK_LIBDIR})
71
	(cd ${WRKSRC}/rel/riak/lib/ && ${COPYTREE_BIN} . ${STAGEDIR}${RIAK_LIBDIR})
70
	(cd ${WRKSRC}/rel/riak/bin/ && ${COPYTREE_BIN} . ${STAGEDIR}${PREFIX}/sbin/)
72
	(cd ${WRKSRC}/rel/riak/bin/ && ${COPYTREE_BIN} . ${STAGEDIR}${PREFIX}/sbin/)
71
	(cd ${WRKSRC}/rel/riak/lib/basho-patches && ${COPYTREE_SHARE} . ${STAGEDIR}${RIAK_LIBDIR}/basho-patches)
73
	(cd ${WRKSRC}/rel/riak/lib/basho-patches && ${COPYTREE_SHARE} . ${STAGEDIR}${RIAK_LIBDIR}/basho-patches)
Lines 75-79 Link Here
75
	${INSTALL_MAN} ${WRKSRC}/doc/man/man1/riak-admin.1.gz ${STAGEDIR}${MANPREFIX}/man/man1/
77
	${INSTALL_MAN} ${WRKSRC}/doc/man/man1/riak-admin.1.gz ${STAGEDIR}${MANPREFIX}/man/man1/
76
	${INSTALL_MAN} ${WRKSRC}/doc/man/man1/riak-debug.1.gz ${STAGEDIR}${MANPREFIX}/man/man1/
78
	${INSTALL_MAN} ${WRKSRC}/doc/man/man1/riak-debug.1.gz ${STAGEDIR}${MANPREFIX}/man/man1/
77
	${INSTALL_MAN} ${WRKSRC}/doc/man/man1/search-cmd.1.gz ${STAGEDIR}${MANPREFIX}/man/man1/
79
	${INSTALL_MAN} ${WRKSRC}/doc/man/man1/search-cmd.1.gz ${STAGEDIR}${MANPREFIX}/man/man1/
80
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/riak/lib/bitcask-1.7.0/priv/bitcask.so
81
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/riak/lib/erlang_js-1.3.0-0-g07467d8/priv/erlang_js_drv.so
82
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/riak/lib/syslog-1.0.2/priv/syslog_drv.so
83
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/riak/lib/canola-2.0.0-0-g9bdfee8/priv/canola-port
84
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/riak/lib/riak_ensemble-2.0.0-1-gd66a102/priv/riak_ensemble.so
85
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/riak/lib/sext-1.1p3-0-g846b9cc/priv/sext.so
86
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/riak/lib/eleveldb-2.0.0-3-g10fcb78/priv/eleveldb.so
78
87
79
.include <bsd.port.post.mk>
88
.include <bsd.port.post.mk>
(-)riak/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (riak-1.4.12.tar.gz) = 2ae63ba183ce457399a21542c75aa6149481c972ebac739a1599e93e81982c91
1
SHA256 (riak-2.0.5.tar.gz) = 390cd596762a7465712b472eb7058314a400068fa1ad567b93530eecdaed8047
2
SIZE (riak-1.4.12.tar.gz) = 13821609
2
SIZE (riak-2.0.5.tar.gz) = 17805547
(-)riak/files/patch-deps-eleveldb-c_src-leveldb-build_detect_platform (-29 lines)
Lines 1-29 Link Here
1
--- deps/eleveldb/c_src/leveldb/build_detect_platform.orig	2014-04-02 12:41:11.174611987 +0000
2
+++ deps/eleveldb/c_src/leveldb/build_detect_platform	2014-04-02 12:42:31.766605994 +0000
3
@@ -134,7 +134,7 @@
4
     true
5
 else
6
     # If -std=c++0x works, use <cstdatomic>.  Otherwise use port_posix.h.
7
-    $CXX $CFLAGS -std=c++0x -x c++ - -o /dev/null 2>/dev/null  <<EOF
8
+    $CXX $CFLAGS -std=c++0x -x c++ - 2>/dev/null  <<EOF
9
       #include <cstdatomic>
10
       int main() {}
11
 EOF
12
@@ -147,7 +147,7 @@
13
 
14
     # Test whether Snappy library is installed
15
     # http://code.google.com/p/snappy/
16
-    $CXX $CFLAGS -x c++ - -o /dev/null 2>/dev/null  <<EOF
17
+    $CXX $CFLAGS -x c++ - 2>/dev/null  <<EOF
18
       #include <snappy.h>
19
       int main() {}
20
 EOF
21
@@ -157,7 +157,7 @@
22
     fi
23
 
24
     # Test whether tcmalloc is available
25
-    $CXX $CFLAGS -x c++ - -o /dev/null -ltcmalloc 2>/dev/null  <<EOF
26
+    $CXX $CFLAGS -x c++ - -ltcmalloc 2>/dev/null  <<EOF
27
       int main() {}
28
 EOF
29
     if [ "$?" = 0 ]; then
(-)riak/files/patch-deps-eleveldb-c_src-leveldb-db-version_set.cc (-36 lines)
Lines 1-36 Link Here
1
--- deps/eleveldb/c_src/leveldb/db/version_set.cc.orig	2014-04-02 12:26:08.746672588 +0000
2
+++ deps/eleveldb/c_src/leveldb/db/version_set.cc	2014-04-02 12:37:06.719627543 +0000
3
@@ -2,10 +2,12 @@
4
 // Use of this source code is governed by a BSD-style license that can be
5
 // found in the LICENSE file. See the AUTHORS file for names of contributors.
6
 
7
+#define __STDC_CONSTANT_MACROS
8
 #include "db/version_set.h"
9
 
10
 #include <algorithm>
11
 #include <stdio.h>
12
+#include <stdint.h>
13
 #include "db/filename.h"
14
 #include "db/log_reader.h"
15
 #include "db/log_writer.h"
16
@@ -53,13 +55,13 @@
17
 
18
 // WARNING: m_OverlappedFiles flags need to match config::kNumOverlapFiles ... until unified
19
 {
20
-    {10485760,  262144000,  57671680,      209715200,                0,     300000000, true},
21
-    {10485760,   82914560,  57671680,      419430400,                0,     209715200, true},
22
-    {10485760,  314572800,  57671680,     1006632960,        200000000,     314572800, false},
23
-    {10485760,  419430400,  57671680,     4094304000ULL,    3355443200ULL,  419430400, false},
24
-    {10485760,  524288000,  57671680,    41943040000ULL,   33554432000ULL,  524288000, false},
25
-    {10485760,  629145600,  57671680,   419430400000ULL,  335544320000ULL,  629145600, false},
26
-    {10485760,  734003200,  57671680,  4194304000000ULL, 3355443200000ULL,  734003200, false}
27
+    {UINT64_C(10485760), UINT64_C(262144000), INT64_C(57671680), UINT64_C(    209715200), UINT64_C(            0), UINT64_C(300000000), true},
28
+    {UINT64_C(10485760), UINT64_C( 82914560), INT64_C(57671680), UINT64_C(    419430400), UINT64_C(            0), UINT64_C(209715200), true},
29
+    {UINT64_C(10485760), UINT64_C(314572800), INT64_C(57671680), UINT64_C(   1006632960), UINT64_C(    200000000), UINT64_C(314572800), false},
30
+    {UINT64_C(10485760), UINT64_C(419430400), INT64_C(57671680), UINT64_C(   4094304000), UINT64_C(   3355443200), UINT64_C(419430400), false},
31
+    {UINT64_C(10485760), UINT64_C(524288000), INT64_C(57671680), UINT64_C(  41943040000), UINT64_C(  33554432000), UINT64_C(524288000), false},
32
+    {UINT64_C(10485760), UINT64_C(629145600), INT64_C(57671680), UINT64_C( 419430400000), UINT64_C( 335544320000), UINT64_C(629145600), false},
33
+    {UINT64_C(10485760), UINT64_C(734003200), INT64_C(57671680), UINT64_C(4194304000000), UINT64_C(3355443200000), UINT64_C(734003200), false}
34
 };
35
 
36
 /// ULL above needed to compile on OSX 10.7.3
(-)riak/files/patch-deps-erlang_js-c_src-patches-js-src-config-FreeBSD.mk.patch (-18 lines)
Lines 1-18 Link Here
1
--- deps/erlang_js/c_src/patches/js-src-config-FreeBSD.mk.patch.orig    2013-01-29 21:13:01.000000000 +0100
2
+++ deps/erlang_js/c_src/patches/js-src-config-FreeBSD.mk.patch 2013-09-12 14:59:29.000000000 +0200
3
@@ -1,6 +1,6 @@
4
 --- c_src.orig/js/src/config/FreeBSD.mk        1969-12-31 19:00:00.000000000 -0500
5
 +++ c_src/js/src/config/FreeBSD.mk     2011-03-30 20:12:51.000000000 -0400
6
-@@ -0,0 +1,99 @@
7
+@@ -0,0 +1,100 @@
8
 +# -*- Mode: makefile -*-
9
 +#
10
 +# ***** BEGIN LICENSE BLOCK *****
11
@@ -46,6 +46,7 @@
12
 +
13
 +CC ?= gcc
14
 +CCC ?= g++
15
++LD = $(CC)
16
 +CFLAGS +=  -Wall -Wno-format
17
 +OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R
18
 +
(-)riak/files/patch-deps-node_package-priv-base-env.sh (-27 lines)
Lines 1-27 Link Here
1
--- deps/node_package/priv/base/env.sh.orig	2013-09-13 10:22:32.000000000 +0200
2
+++ deps/node_package/priv/base/env.sh	2013-09-13 10:27:16.000000000 +0200
3
@@ -100,7 +100,7 @@
4
 # read/write/delete .pid files during startup/shutdown
5
 create_pid_dir() {
6
     # Validate RUNNER_USER is set and they have permissions to write to /var/run
7
-    # Don't continue if we've already sudo'd to RUNNER_USER
8
+    # Don't continue if we've already su'd to RUNNER_USER
9
     if ([ "$RUNNER_USER" ] && [ "x$WHOAMI" != "x$RUNNER_USER" ]); then
10
         if [ -w $RUN_DIR ]; then
11
             mkdir -p $PID_DIR
12
@@ -161,12 +161,12 @@
13
     # Validate that the user running the script is the owner of the
14
     # RUN_DIR.
15
     if ([ "$RUNNER_USER" ] && [ "x$WHOAMI" != "x$RUNNER_USER" ]); then
16
-        type sudo > /dev/null 2>&1
17
+        type su > /dev/null 2>&1
18
         if [ "$?" -ne 0 ]; then
19
-            echoerr "sudo doesn't appear to be installed and your EUID isn't $RUNNER_USER" 1>&2
20
+            echoerr "su doesn't appear to be installed and your EUID isn't $RUNNER_USER" 1>&2
21
             exit 1
22
         fi
23
-        exec sudo -H -u $RUNNER_USER -i $RUNNER_SCRIPT_DIR/$RUNNER_SCRIPT $@
24
+	exec su - $RUNNER_USER -c "$RUNNER_SCRIPT_DIR/$RUNNER_SCRIPT $@"
25
     fi
26
 }
27
(-)riak/files/patch-deps_erlang__js_c__src_patches_js-src-config-FreeBSD.mk.patch (+27 lines)
Line 0 Link Here
1
--- deps/erlang_js/c_src/patches/js-src-config-FreeBSD.mk.patch.orig    2015-02-26 16:11:58 UTC
2
+++ deps/erlang_js/c_src/patches/js-src-config-FreeBSD.mk.patch
3
@@ -1,6 +1,6 @@
4
 --- c_src.orig/js/src/config/FreeBSD.mk        1969-12-31 19:00:00.000000000 -0500
5
 +++ c_src/js/src/config/FreeBSD.mk     2011-03-30 20:12:51.000000000 -0400
6
-@@ -0,0 +1,99 @@
7
+@@ -0,0 +1,100 @@
8
 +# -*- Mode: makefile -*-
9
 +#
10
 +# ***** BEGIN LICENSE BLOCK *****
11
@@ -46,6 +46,7 @@
12
 +
13
 +CC ?= gcc
14
 +CCC ?= g++
15
++LD = $(CC)
16
 +CFLAGS +=  -Wall -Wno-format
17
 +OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R
18
 +
19
@@ -63,7 +64,7 @@
20
 +OS_CFLAGS+= -DX86_LINUX
21
 +
22
 +ifeq (gcc, $(CC))
23
-+# if using gcc on x86, check version for opt bug 
24
++# if using gcc on x86, check version for opt bug
25
 +# (http://bugzilla.mozilla.org/show_bug.cgi?id=24892)
26
 +GCC_VERSION := $(shell gcc -v 2>&1 | grep version | awk '{ print $$3 }')
27
 +GCC_LIST:=$(sort 2.91.66 $(GCC_VERSION) )
(-)riak/files/patch-rebar.config (+10 lines)
Line 0 Link Here
1
--- rebar.config.orig	2015-03-10 18:52:12 UTC
2
+++ rebar.config
3
@@ -21,7 +21,6 @@
4
         {riak_search, ".*", {git, "git://github.com/basho/riak_search.git", {branch, "2.0"}}},
5
         {riak_control, ".*", {git, "git://github.com/basho/riak_control.git", {branch, "2.0"}}},
6
         {riaknostic, ".*", {git, "git://github.com/basho/riaknostic.git", {tag, "2.0.0"}}},
7
-        {yokozuna, ".*", {git, "git://github.com/basho/yokozuna.git", {branch, "2.0"}}},
8
         {riak_auth_mods, ".*", {git, "git://github.com/basho/riak_auth_mods.git", {branch, "2.0"}}},
9
         {rebar_lock_deps_plugin, ".*", {git, "git://github.com/seth/rebar_lock_deps_plugin.git", {branch, "master"}}}
10
        ]}.
(-)riak/files/patch-rel-reltool.config (-16 lines)
Lines 1-16 Link Here
1
--- rel/reltool.config.orig	2013-09-17 20:53:23.000000000 +0200
2
+++ rel/reltool.config	2013-09-17 20:55:40.000000000 +0200
3
@@ -37,8 +37,12 @@
4
        {boot_rel, "riak"},
5
        {profile, embedded},
6
        {excl_sys_filters, ["^bin/.*",
7
-                           "^erts.*/bin/(dialyzer|typer)"]},
8
+                           "^erts.*/bin/(dialyzer|typer)",
9
+                           "^erts.*/bin/(dialyzer|typer)",
10
+                           "^erts.*/doc",
11
+                           "^erts.*/man"]},
12
        {excl_archive_filters, [".*"]},
13
+       {app, mnesia, [{incl_app_filters, ["ebin/*"]}]},
14
        {app, cluster_info, [{incl_cond, include}]},
15
        {app, erlang_js, [{incl_cond, include}]},
16
        {app, ebloom, []},
(-)riak/files/patch-rel-vars.config (-41 lines)
Lines 1-41 Link Here
1
--- rel/vars.config.orig	2013-08-29 20:13:02.000000000 +0200
2
+++ rel/vars.config	2013-09-11 23:04:34.000000000 +0200
3
@@ -2,11 +2,12 @@
4
 %% ex: ft=erlang ts=4 sw=4 et
5
 
6
 %% Platform-specific installation paths
7
-{platform_bin_dir,  "./bin"}.
8
-{platform_data_dir, "./data"}.
9
-{platform_etc_dir,  "./etc"}.
10
-{platform_lib_dir,  "./lib"}.
11
-{platform_log_dir,  "./log"}.
12
+{platform_bin_dir,  "%%PREFIX%%/sbin"}.
13
+{platform_data_dir, "/var/db/riak"}.
14
+{platform_etc_dir,  "%%PREFIX%%/etc/riak"}.
15
+{platform_base_dir,  "%%PREFIX%%/lib/riak"}.
16
+{platform_lib_dir,  "%%PREFIX%%/lib/riak/lib"}.
17
+{platform_log_dir,  "/var/log/riak"}.
18
 
19
 %%
20
 %% etc/app.config
21
@@ -47,12 +48,12 @@
22
 %%
23
 %% bin/riak
24
 %%
25
-{runner_script_dir,  "$(cd ${0%/*} && pwd)"}.
26
-{runner_base_dir,    "{{runner_script_dir}}/.."}.
27
-{runner_etc_dir,     "$RUNNER_BASE_DIR/etc"}.
28
-{runner_log_dir,     "$RUNNER_BASE_DIR/log"}.
29
-{runner_lib_dir,     "$RUNNER_BASE_DIR/lib"}.
30
-{runner_patch_dir,   "$RUNNER_BASE_DIR/lib/basho-patches"}.
31
-{pipe_dir,           "/tmp/$RUNNER_BASE_DIR/"}.
32
-{runner_user,        ""}.
33
+{runner_script_dir,  "{{platform_bin_dir}}"}.
34
+{runner_base_dir,    "{{platform_base_dir}}"}.
35
+{runner_etc_dir,     "{{platform_etc_dir}}"}.
36
+{runner_log_dir,     "{{platform_log_dir}}"}.
37
+{runner_lib_dir,     "{{platform_lib_dir}}"}.
38
+{runner_patch_dir,   "{{platform_lib_dir}}/basho-patches"}.
39
+{pipe_dir,           "/tmp/riak"}.
40
+{runner_user,        "riak"}.
41
 {runner_wait_process, "riak_core_node_watcher"}.
(-)riak/files/patch-rel_reltool.config (+18 lines)
Line 0 Link Here
1
--- rel/reltool.config.orig	2015-03-10 19:09:11 UTC
2
+++ rel/reltool.config
3
@@ -25,7 +25,6 @@
4
          riak_kv,
5
          riak_search,
6
          riak_api,
7
-         yokozuna,
8
          cluster_info,
9
          riak_control,
10
          exometer_core,
11
@@ -57,7 +56,6 @@
12
        {app, riak_pipe, [{incl_cond, include}]},
13
        {app, riak_kv, [{incl_cond, include}]},
14
        {app, riak_search, [{incl_cond, include}]},
15
-       {app, yokozuna, [{incl_cond, include}]},
16
        {app, eper, [{incl_cond, include}]},
17
        {app, sasl, [{incl_cond, include}]},
18
        {app, syslog, [{incl_cond, include}]},
(-)riak/files/patch-rel_vars.config (+43 lines)
Line 0 Link Here
1
--- rel/vars.config.orig	2015-02-23 19:56:05 UTC
2
+++ rel/vars.config
3
@@ -2,11 +2,12 @@
4
 %% ex: ft=erlang ts=4 sw=4 et
5
 
6
 %% Platform-specific installation paths
7
-{platform_bin_dir,  "./bin"}.
8
-{platform_data_dir, "./data"}.
9
-{platform_etc_dir,  "./etc"}.
10
-{platform_lib_dir,  "./lib"}.
11
-{platform_log_dir,  "./log"}.
12
+{platform_base_dir, "/usr/local/lib/riak"}.
13
+{platform_bin_dir,  "/usr/local/sbin"}.
14
+{platform_etc_dir,  "/usr/local/etc/riak"}.
15
+{platform_lib_dir,  "/usr/local/lib/riak/lib"}.
16
+{platform_data_dir, "/var/db/riak"}.
17
+{platform_log_dir,  "/var/log/riak"}.
18
 
19
 %%
20
 %% etc/app.config
21
@@ -40,14 +41,14 @@
22
 %%
23
 %% bin/riak
24
 %%
25
-{runner_script_dir,  "\`cd \\`dirname $0\\` && /bin/pwd\`"}.
26
-{runner_base_dir,    "{{runner_script_dir}}/.."}.
27
-{runner_etc_dir,     "$RUNNER_BASE_DIR/etc"}.
28
-{runner_log_dir,     "$RUNNER_BASE_DIR/log"}.
29
-{runner_lib_dir,     "$RUNNER_BASE_DIR/lib"}.
30
-{runner_patch_dir,   "$RUNNER_BASE_DIR/lib/basho-patches"}.
31
-{pipe_dir,           "/tmp/$RUNNER_BASE_DIR/"}.
32
-{runner_user,        ""}.
33
+{runner_script_dir,  "{{platform_bin_dir}}"}.
34
+{runner_base_dir,    "{{platform_base_dir}}"}.
35
+{runner_etc_dir,     "{{platform_etc_dir}}"}.
36
+{runner_log_dir,     "{{platform_log_dir}}"}.
37
+{runner_lib_dir,     "{{platform_lib_dir}}"}.
38
+{runner_patch_dir,   "{{platform_lib_dir}}/basho-patches"}.
39
+{pipe_dir,           "/tmp/riak"}.
40
+{runner_user,        "riak"}.
41
 {runner_wait_process, "riak_core_node_watcher"}.
42
 {runner_ulimit_warn, 65536}.
43
 
(-)riak/files/riak.in (-70 / +13 lines)
Lines 1-84 Link Here
1
#!/bin/sh
1
#!/bin/sh                                                                                                               
2
# $FreeBSD: head/databases/riak/files/riak.in 357522 2014-06-11 18:44:31Z trociny $
3
2
3
# $FreeBSD$
4
#
4
# PROVIDE: riak
5
# PROVIDE: riak
5
# REQUIRE: LOGIN cleanvar
6
# REQUIRE: LOGIN
6
# KEYWORD: shutdown
7
# KEYWORD: shutdown
7
8
#
8
#
9
# Add the following lines to /etc/rc.conf to enable riak:
9
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
10
# riak_enable (bool):		Set to "NO" by default.
10
# to enable this service:
11
#				Set it to "YES" to enable riak on boot.
12
#
11
#
12
# riak_enable (bool):   Set to NO by default.
13
#                       Set it to YES to enable riak
13
14
14
. /etc/rc.subr
15
. /etc/rc.subr
15
16
16
name="riak"
17
name=riak
17
rcvar=riak_enable
18
rcvar=riak_enable
18
19
19
pidfile=/var/run/riak/riak.pid
20
21
start_cmd="riak_start"
22
stop_cmd="riak_stop"
23
restart_cdm="riak_restart"
24
status_cmd="riak_status"
25
command="%%PREFIX%%/sbin/riak"
26
27
load_rc_config $name
20
load_rc_config $name
28
21
29
# Read rc.d config and set defaults
22
command=%%PREFIX%%/lib/riak/erts-5.10.4/bin/beam.smp
30
load_rc_config "$name"
23
pidfile="/var/run/${name}/${name}.pid"
31
: ${riak_enable="NO"}
24
start_cmd="%%PREFIX%%/sbin/${name} start"
32
25
stop_cmd="%%PREFIX%%/sbin/${name} stop"
33
riak_start()
34
{
35
	echo "Starting Riak."
36
	%%PREFIX%%/sbin/riak start
37
	return 0
38
}
39
40
riak_stop()
41
{
42
	echo "Stopping Riak processes"
43
	%%PREFIX%%/sbin/riak stop
44
	killall -9 epmd
45
	return 0
46
}
47
48
riak_restart()
49
{
50
	riak_stop
51
	riak_start
52
	return 0
53
}
54
55
riak_status()
56
{
57
	if riak_running; then
58
		echo "Riak is running."
59
		return 0
60
	else
61
		echo "Riak is not running"
62
		return 1
63
	fi
64
}
65
66
riak_running()
67
{
68
	local pid result ps
69
	pid=`%%PREFIX%%/sbin/riak getpid`
70
	result=`echo $?`
71
	if [ "$result" == 0 ]; then
72
		ps=`ps -waux | grep ${pid} | grep riak`
73
		result=`echo $?`
74
		if [ "$result" ]; then
75
			return 0
76
		else
77
			return 1
78
		fi
79
	else
80
		return 1
81
	fi
82
}
83
26
84
run_rc_command "$1"
27
run_rc_command "$1"
(-)riak/pkg-plist (-5 / +4 lines)
Lines 6-16 Link Here
6
man/man1/riak-debug.1.gz
6
man/man1/riak-debug.1.gz
7
man/man1/riak.1.gz
7
man/man1/riak.1.gz
8
man/man1/search-cmd.1.gz
8
man/man1/search-cmd.1.gz
9
@sample %%ETCDIR%%/vm.args.sample
9
%%ETCDIR%%/riak.conf
10
@sample %%ETCDIR%%/app.config.sample
10
%%ETCDIR%%/riak.conf.sample
11
@sample %%ETCDIR%%/cert.pem.sample
11
%%ETCDIR%%/solr-log4j.properties
12
@sample %%ETCDIR%%/key.pem.sample
12
%%ETCDIR%%/solr-log4j.properties.sample
13
@dir %%RIAK_CONFDIR%%
14
@owner %%USERS%%
13
@owner %%USERS%%
15
@group %%GROUPS%%
14
@group %%GROUPS%%
16
@dir %%RIAK_DBDIR%%
15
@dir %%RIAK_DBDIR%%

Return to bug 198355