Permalink
Browse files

Sync packaging changes from riak/master into 1.0

  • Loading branch information...
Jared Morrow
Jared Morrow committed Dec 23, 2011
1 parent 2586588 commit c7245c7f8557c0b45c9e37ed64a39f57d1ed2e1f
View
@@ -292,6 +292,11 @@ strategies, and more, please visit our wiki at http://wiki.basho.com/.
- Basho engineers will review your pull-request, suggest changes,
and merge it when it's ready.
+** How to Report a Bug
+
+ - The Basho Bug Tracker: [[https://issues.basho.com]]
+ - Read More at: [[http://wiki.basho.com/How-to-Report-a-Bug.html]]
+
** Testing
To make sure your patch works, be sure to run the test suite in each
modified sub-project, and dialyzer from the top-level project to
View
@@ -3,7 +3,7 @@ Section: net
Priority: extra
Maintainer: Jared Morrow <jared@basho.com>
Build-Depends: debhelper (>= 7)
-Standards-Version: 3.8.3
+Standards-Version: 3.9.2
Homepage: http://basho.com/
Package: riak
View
@@ -5,6 +5,8 @@
set -e
+# install startup script
+update-rc.d riak defaults >/dev/null
# create riak group
if ! getent group riak >/dev/null; then
@@ -14,7 +16,7 @@ fi
# create raiak user
if ! getent passwd riak >/dev/null; then
adduser --ingroup riak --home /var/lib/riak --disabled-password \
- --system --shell /bin/bash --no-create-home \
+ --system --shell /bin/false --no-create-home \
--gecos "Riak Data Store" riak
fi
View
@@ -21,6 +21,10 @@
case "$1" in
purge)
rm -f /etc/default/riak
+
+ # ensure we remove the rc.d scripts installed by postinst
+ update-rc.d riak remove >/dev/null
+
if [ -d /var/lib/riak ]; then
rm -r /var/lib/riak
fi
@@ -57,7 +61,7 @@ case "$1" in
;;
*)
- echo "postrm called with unknown argument \`$1'" >&2
+ echo "postrm called with unknown argument \`$1\`" >&2
exit 1
;;
esac
View
@@ -55,6 +55,8 @@ install: build
debian/$(package)/etc/riak/vm.args
install -m755 debian/debian_riak_init debian/$(package)/etc/init.d/riak
+ dh_shlibdeps
+
binary-indep: install
# We have nothing to do by default.
@@ -3,7 +3,7 @@
# Riak Distributed Data Store
#
# chkconfig: 2345 80 30
-# description: Riak is a distrubuted data store.
+# description: Riak is a distributed data store.
# processname: beam
# config: /etc/riak/app.config
# config: /etc/riak/vm.args
@@ -16,7 +16,12 @@
[ -x /usr/sbin/riak ] || exit 0
[ -d /etc/riak ] || exit 0
[ -d /var/lib/riak ] || exit 0
-[ -d /var/run/riak ] || exit 0
+
+# Create /var/run/riak if necessary (/var/run may be in a tmpfs filesystem).
+if [ ! -d /var/run/riak ]; then
+ mkdir -p /var/run/riak
+ chown riak:riak /var/run/riak
+fi
RETVAL=0
@@ -27,66 +32,74 @@ DAEMON=/usr/sbin/$NAME
start() {
- #Check if Riak is running
- RETVAL=`$DAEMON ping`
- [ "$RETVAL" = "pong" ] && echo "Riak is already running" && return 1
+ #Check if Riak is running
+ RETVAL=`su - riak -c "$DAEMON ping"`
+ [ "$RETVAL" = "pong" ] && echo "Riak is already running" && return 1
- # Start daemons.
- echo -n $"Starting Riak: "
- su - riak -c "$DAEMON start" && success || failure $"$NAME start"
- RETVAL=$?
- [ $RETVAL -eq 0 ]
- echo
- return $RETVAL
+ # Start daemons.
+ echo -n $"Starting Riak: "
+ su - riak -c "$DAEMON start" && success || failure $"$NAME start"
+ RETVAL=$?
+ [ $RETVAL -eq 0 ]
+ echo
+ return $RETVAL
}
stop() {
- # Stop daemon.
- echo -n $"Stopping Riak: "
- RETVAL=`su - riak -c "$DAEMON ping"`
- [ "$RETVAL" = "pong" ] && su - riak -c "$DAEMON stop 2>/dev/null 1>&2"
- sleep 2
- RETVAL=`pidof beam.smp`
- [ "$RETVAL" = "" ] && success && echo && return 0 || failure $"$NAME stop"
- sleep 10
- RETVAL=`pidof beam.smp`
- [ "$RETVAL" = "" ] && success && echo && return 0 || failure $"$NAME failed to stop"
- echo
- return 1
-
+ # Stop daemon.
+ echo -n $"Stopping Riak: "
+ RETVAL=`su - riak -c "$DAEMON ping"`
+ [ "$RETVAL" = "pong" ] && su - riak -c "$DAEMON stop 2>/dev/null 1>&2"
+ sleep 2
+ RETVAL=`pidof beam.smp`
+ [ "$RETVAL" = "" ] && success && echo && return 0 || failure $"$NAME stop"
+ sleep 10
+ RETVAL=`pidof beam.smp`
+ [ "$RETVAL" = "" ] && success && echo && return 0 || failure $"$NAME failed to stop"
+ echo
+ return 1
}
reload() {
- # Restart the VM without exiting the process
- echo -n $"Reloading Riak: "
- RETVAL=`su - riak -c "$DAEMON ping"`
- [ "$RETVAL" = "pong" ] && su - riak -c "$DAEMON restart 2>/dev/null 1>&2" \
+ # Restart the VM without exiting the process
+ echo -n $"Reloading Riak: "
+ RETVAL=`su - riak -c "$DAEMON ping"`
+ [ "$RETVAL" = "pong" ] && su - riak -c "$DAEMON restart 2>/dev/null 1>&2" \
&& success && echo && return 0 || failure $"$NAME restart"
- echo
- return $RETVAL
+ echo
+ return $RETVAL
}
+status() {
+ RETVAL=`su - riak -c "$DAEMON ping"`
+ [ "$RETVAL" = "pong" ] && echo $"$NAME is running..." && return 0
+ echo $"$NAME is stopped"
+ return 3
+}
# See how we were called.
case "$1" in
start)
- start
- ;;
+ start
+ ;;
stop)
- stop
+ stop
;;
restart)
- stop
+ stop
start
;;
reload)
reload
;;
+ status)
+ status
+ ;;
ping)
- su - riak -c "$DAEMON ping" || exit $?
+ su - riak -c "$DAEMON ping" || exit $?
;;
*)
- echo $"Usage: $0 {start|stop|reload|restart|ping}"
+ echo $"Usage: $0 {start|stop|reload|restart|ping}"
exit 1
esac
View
@@ -1,5 +1,5 @@
-%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
-%% ex: ts=4 sw=4 et
+%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ft=erlang ts=4 sw=4 et
[
%% Riak Core config
{riak_core, [
View
@@ -1,6 +1,7 @@
#!/usr/bin/env escript
-%% -*- erlang -*-
%%! -args_file {{platform_data_dir}}/ssl_distribution.args_file
+%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ft=erlang ts=4 sw=4 et
%% -------------------------------------------------------------------
%%
%% nodetool: Helper Script for interacting with live nodes
@@ -36,7 +37,7 @@ main(Args) ->
%% See if the node is currently running -- if it's not, we'll bail
case {net_kernel:hidden_connect_node(TargetNode), net_adm:ping(TargetNode)} of
- {true, pong} ->
+ {true, pong} ->
ok;
{_, pang} ->
io:format("Node ~p not responding to pings.\n", [TargetNode]),
@@ -89,7 +90,7 @@ main(Args) ->
io:format("Usage: nodetool {ping|stop|restart|reboot|chkconfig}\n")
end,
net_kernel:stop().
-
+
process_args([], Acc, TargetNode) ->
{lists:reverse(Acc), TargetNode};
process_args(["-setcookie", Cookie | Rest], Acc, TargetNode) ->
View
@@ -1,5 +1,5 @@
-%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
-%% ex: ts=4 sw=4 et
+%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ft=erlang ts=4 sw=4 et
{sys, [
{lib_dirs, ["../deps", "../deps/riak_search/apps"]},
{rel, "riak", "1.0.2",
View
@@ -1,5 +1,5 @@
-%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
-%% ex: ts=4 sw=4 et
+%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ft=erlang ts=4 sw=4 et
%% Platform-specific installation paths
{platform_bin_dir, "./bin"}.
@@ -1,5 +1,5 @@
-%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
-%% ex: ts=4 sw=4 et
+%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ft=erlang ts=4 sw=4 et
%% Platform-specific installation paths
{platform_bin_dir, "./bin"}.
@@ -1,5 +1,5 @@
-%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
-%% ex: ts=4 sw=4 et
+%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ft=erlang ts=4 sw=4 et
%% Platform-specific installation paths
{platform_bin_dir, "./bin"}.
@@ -1,5 +1,5 @@
-%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
-%% ex: ts=4 sw=4 et
+%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ft=erlang ts=4 sw=4 et
%% Platform-specific installation paths
{platform_bin_dir, "./bin"}.
@@ -1,5 +1,5 @@
-%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
-%% ex: ts=4 sw=4 et
+%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ft=erlang ts=4 sw=4 et
%% Platform-specific installation paths
{platform_bin_dir, "./bin"}.

0 comments on commit c7245c7

Please sign in to comment.