pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
riak: various patches:
Module Name: pkgsrc-wip
Committed By: Jonathan Perkin <jperkin%joyent.com@localhost>
Pushed By: jperkin
Date: Fri Oct 2 12:51:04 2015 +0100
Changeset: 6c3183af2ebcb3150ef586d42e8ca0b45143712f
Modified Files:
riak/distinfo
riak/patches/patch-rel__vars.config
riak14/Makefile
Added Files:
riak/patches/patch-deps_node__package_priv_base_runner
Log Message:
riak: various patches:
- Support alternative git location.
- Bump file descriptors.
- Mention SMF.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=6c3183af2ebcb3150ef586d42e8ca0b45143712f
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
riak/distinfo | 3 +-
.../patch-deps_node__package_priv_base_runner | 60 ++++++++++++++++++++++
riak/patches/patch-rel__vars.config | 8 +--
riak14/Makefile | 4 ++
4 files changed, 71 insertions(+), 4 deletions(-)
diffs:
diff --git a/riak/distinfo b/riak/distinfo
index 97ab2b8e27..d417581691 100644
--- a/riak/distinfo
+++ b/riak/distinfo
@@ -21,5 +21,6 @@ SHA1 (patch-deps_cuttlefish_rebar.config) = 23a0b960b88277a9370eefe5a284b7aa8bd7
SHA1 (patch-deps_eleveldb_c__src_build__deps.sh) = 8878a0e99d89f084b0cf8860743f4a39a996c47f
SHA1 (patch-deps_eleveldb_c__src_eleveldb.cc) = 2e21a560c3f990ff9ac7dd604de00404644e7a5a
SHA1 (patch-deps_node__package_priv_base_env.sh) = ee305e631180a50a1192a10e5dd4bf185c2e96c8
+SHA1 (patch-deps_node__package_priv_base_runner) = 0fa3cdbab932ba7033f56bb4260f56208ecb4741
SHA1 (patch-deps_yokozuna_tools_grab-solr.sh) = d90115d3522238cd6a6774ff221fad009d17ebbb
-SHA1 (patch-rel__vars.config) = 1cde95447a50300bd10994d6eb6628914a8ac97b
+SHA1 (patch-rel__vars.config) = fe328bb4c6202ba7d36c092663622c56cbda1a7f
diff --git a/riak/patches/patch-deps_node__package_priv_base_runner b/riak/patches/patch-deps_node__package_priv_base_runner
new file mode 100644
index 0000000000..9aa4aea94e
--- /dev/null
+++ b/riak/patches/patch-deps_node__package_priv_base_runner
@@ -0,0 +1,60 @@
+$NetBSD$
+
+Warn against non-SMF usage, increase file descriptors.
+
+--- deps/node_package/priv/base/runner.orig 2014-10-14 17:01:01.000000000 +0000
++++ deps/node_package/priv/base/runner
+@@ -170,11 +170,22 @@ bootstrapd() {
+ }
+
+ do_start() {
++ if [ "${SMF_METHOD}" != "start" ]; then
++ echo "***"
++ echo "Warning: please use 'svcadm enable $SCRIPT' instead"
++ echo "***"
++ fi
++
+ # Make sure there is not already a node running
+ node_down_check
+
+- # Warn the user if ulimit is too low
+- check_ulimit
++ # Make sure we have access to enough file descriptors
++ ULIMIT_S=$(prctl -n process.max-file-descriptor -t basic -P $$ | awk '/max-file-descriptor/ { print $3 }')
++ ULIMIT_H=$(prctl -n process.max-file-descriptor -t priv -P $$ | awk '/max-file-descriptor/ { print $3 }')
++ if [ ${ULIMIT_S} -lt ${ULIMIT_H} ]; then
++ echo "Trying to raise the file descriptor limit to maximum allowed."
++ prctl -n process.max-file-descriptor -t basic -v ${ULIMIT_H} $$ || true
++ fi
+
+ # Make sure log directory exists
+ mkdir -p $RUNNER_LOG_DIR
+@@ -222,6 +233,12 @@ do_start() {
+ }
+
+ do_stop() {
++ if [ "${SMF_METHOD}" != "stop" ]; then
++ echo "***"
++ echo "Warning: please use 'svcadm disable $SCRIPT' instead"
++ echo "***"
++ fi
++
+ get_pid
+ ES=$?
+ if [ "$ES" -ne 0 ] || [ -z $PID ]; then
+@@ -324,8 +341,13 @@ case "$1" in
+ exit $ES
+ fi
+
+- # Warn the user if ulimit -n is less than the defined threshold
+- check_ulimit
++ # Make sure we have access to enough file descriptors
++ ULIMIT_S=$(prctl -n process.max-file-descriptor -t basic -P $$ | awk '/max-file-descriptor/ { print $3 }')
++ ULIMIT_H=$(prctl -n process.max-file-descriptor -t priv -P $$ | awk '/max-file-descriptor/ { print $3 }')
++ if [ ${ULIMIT_S} -lt ${ULIMIT_H} ]; then
++ echo "Trying to raise the file descriptor limit to maximum allowed."
++ prctl -n process.max-file-descriptor -t basic -v ${ULIMIT_H} $$ || true
++ fi
+
+ # Make sure log directory exists
+ mkdir -p $RUNNER_LOG_DIR
diff --git a/riak/patches/patch-rel__vars.config b/riak/patches/patch-rel__vars.config
index 35e18cdacd..a17ab3c483 100644
--- a/riak/patches/patch-rel__vars.config
+++ b/riak/patches/patch-rel__vars.config
@@ -22,7 +22,7 @@ Provide pkgsrc-compatible default locations.
%%
%% etc/app.config
-@@ -14,9 +15,10 @@
+@@ -14,10 +14,11 @@
{web_ip, "127.0.0.1"}.
{web_port, 8098}.
{handoff_port, 8099}.
@@ -30,11 +30,13 @@ Provide pkgsrc-compatible default locations.
+{handoff_ip, "127.0.0.1"}.
{pb_ip, "127.0.0.1"}.
{pb_port, 8087}.
+-{storage_backend, "bitcask"}.
+{ring_creation_size, 256}.
- {storage_backend, "bitcask"}.
++{storage_backend, "leveldb"}.
{sasl_error_log, "{{platform_log_dir}}/sasl-error.log"}.
{sasl_log_dir, "{{platform_log_dir}}/sasl"}.
-@@ -41,16 +43,17 @@
+
+@@ -41,16 +42,17 @@
%%
%% bin/riak
%%
diff --git a/riak14/Makefile b/riak14/Makefile
index 3e4fcb8a74..afbe5afd0c 100644
--- a/riak14/Makefile
+++ b/riak14/Makefile
@@ -107,6 +107,10 @@ post-extract:
${CHMOD} -R u=rwX,g=rX,o=rX ${WRKSRC}
${CHOWN} -R ${ROOT_USER}:${ROOT_GROUP} ${WRKSRC}
+post-build:
+ ${PATCH} -p0 ${WRKSRC}/rel/riak/bin/riak \
+ ${WRKSRC}/deps/node_package/priv/templates/smartos/runner.patch
+
do-install:
${RM} -f ${WRKSRC}/rel/riak/lib/runtime_tools-${VERSION.runtime_tools}/priv/obj/dtrace_user.o
${MKDIR} ${WRKSRC}/deps/node_package/priv/templates/pkgsrc
Home |
Main Index |
Thread Index |
Old Index