Skip to content

Commit 99cf1c0

Browse files
hmmrAndrei Zavada
andauthored
fixes for packaging regressions for 3.2.1 (#1124)
* use start (not foreground) in unit files (else pipe files are not created) * update alpine/vars.config * port VMARGS_PATH injection to alpine * reuse fetched deps in when building freebsd package, too * find and export VMARGS_PATH --------- Co-authored-by: Andrei Zavada <[email protected]>
1 parent 10091fd commit 99cf1c0

File tree

6 files changed

+47
-21
lines changed

6 files changed

+47
-21
lines changed

rel/files/riak

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ export RUNNER_LOG_DIR={{platform_log_dir}}
88
mkdir -p $PID_DIR
99
chown riak:riak $PID_DIR
1010

11+
# cuttlefish should be doing this, but it doesn't:
12+
VMARGS_PATH=`ls -1 ${RUNNER_GEN_DIR}/generated.conf/vm.*.args 2>/dev/null | tail -1`
13+
if [ ! -r "$VMARGS_PATH" ]; then
14+
VMARGS_PATH="{{platform_base_dir}}/releases/{{rel_vsn}}/vm.args"
15+
fi
16+
export VMARGS_PATH
17+
1118
# centos7-based distros have a su that contacts pam and prints the "Last logged in" message
1219
if [ "`cat /etc/redhat-release 2>&1`" = "CentOS Stream release 7" ] ||
1320
[ "`cat /etc/system-release 2>&1`" = "Amazon Linux release 2 (Karoo)" ]; then

rel/pkg/alpine/riak-nosu

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ RUNNER_GEN_DIR={{platform_gen_dir}}
44
RELX_RIAK={{platform_bin_dir}}/riak
55
export PID_DIR={{pid_dir}}
66

7+
# cuttlefish should be doing this, but it doesn't:
8+
VMARGS_PATH=`ls -1 ${RUNNER_GEN_DIR}/generated.conf/vm.*.args 2>/dev/null | tail -1`
9+
if [ ! -r "$VMARGS_PATH" ]; then
10+
VMARGS_PATH="{{platform_base_dir}}/releases/{{rel_vsn}}/vm.args"
11+
fi
12+
export VMARGS_PATH
13+
714
mkdir -p $PID_DIR
815

916
case "$1" in

rel/pkg/alpine/vars.config

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,44 @@
33

44
{rel_vsn, "{{release_version}}"}.
55

6-
{platform_base_dir, "/usr/lib/riak"}.
7-
{platform_bin_dir, "/usr/lib/riak/bin"}.
8-
{platform_data_dir, "/var/lib/riak"}.
9-
{platform_etc_dir, "/etc/riak"}.
10-
{platform_lib_dir, "/usr/lib/riak/lib"}.
11-
{platform_log_dir, "/var/log/riak"}.
12-
{platform_gen_dir, "/var/lib/riak/releases"}.
6+
%% Platform-specific installation paths
7+
{platform_bin_dir, "/usr/lib/riak/bin"}.
8+
{platform_data_dir, "/var/lib/riak"}.
9+
{platform_etc_dir, "/etc/riak"}.
10+
{platform_base_dir, "/usr/lib/riak"}.
11+
{platform_lib_dir, "/usr/lib/riak/lib"}.
12+
{platform_log_dir, "/var/log/riak"}.
13+
{platform_gen_dir, "/var/lib/riak"}.
1314
{platform_patch_dir, "/usr/lib/riak/lib/patches"}.
1415

1516
{pid_dir, "/run/riak"}.
1617

17-
{web_ip, "127.0.0.1"}.
18-
{web_port, 8098}.
1918
{cluster_manager_ip, "127.0.0.1"}.
2019
{cluster_manager_port, 9080}.
21-
{handoff_port, 8099}.
22-
{handoff_ip, "0.0.0.0"}.
23-
{pb_ip, "127.0.0.1"}.
24-
{pb_port, 8087}.
20+
21+
{web_ip, "127.0.0.1"}.
22+
{web_port, 8098}.
23+
{handoff_ip, "0.0.0.0"}.
24+
{handoff_port, 8099}.
25+
{pb_ip, "127.0.0.1"}.
26+
{pb_port, 8087}.
27+
2528
{storage_backend, "bitcask"}.
29+
2630
{sasl_error_log, "{{platform_log_dir}}/sasl-error.log"}.
2731
{sasl_log_dir, "{{platform_log_dir}}/sasl"}.
28-
{repl_data_root, "{{platform_data_dir}}/riak_repl/"}.
29-
30-
{console_log_default, file}.
31-
32-
33-
{crash_dump, "{{platform_log_dir}}/erl_crash.dump"}.
32+
{repl_data_root, "{{platform_data_dir}}/riak_repl"}.
33+
{crash_dump, "{{platform_log_dir}}/erl_crash.dump"}.
3434

35+
%%
36+
%% cuttlefish
37+
%%
3538
{cuttlefish, "on"}.
3639
{cuttlefish_conf, "riak.conf"}.
40+
41+
{logger_level, info}.
42+
43+
%%
44+
%% etc/vm.args
45+
%%
46+

rel/pkg/deb/debian/riak.riak.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Description=Riak KV Database
33

44
[Service]
55
User=riak
6-
ExecStart=/usr/sbin/riak foreground
6+
ExecStart=/usr/sbin/riak start
77
ExecStop=/usr/sbin/riak stop
88
Type=simple
99
PIDFile=/run/riak/riak.pid

rel/pkg/fbsdng/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ $(BUILD_STAGE_DIR): buildrel
9797
# * copy the vars.config over for build config
9898
buildrel:
9999
tar -xf $(BASE_DIR)/rel/pkg/out/$(PKG_ID).tar.gz -C $(BASE_DIR)/rel/pkg/out/$(PKG_ID)
100+
cd $(BASE_DIR)/rel/pkg/out/$(PKG_ID); \
101+
(mkdir -p _build/default && cd _build/default && for d in lib; do ln -fs $(BASE_DIR)/_build/default/$$d; done); \
100102
$(MAKE) -C $(BASE_DIR)/rel/pkg/out/$(PKG_ID) rel-fbsdng
101103
rm -rf rel/riak/lib/*/c_src rel/riak/lib/*/src
102104
chmod 0755 rel/riak/bin/* rel/riak/erts-*/bin/*

rel/pkg/rpm/riak.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Description=Riak KV Database
33

44
[Service]
55
User=riak
6-
ExecStart=/usr/sbin/riak foreground
6+
ExecStart=/usr/sbin/riak start
77
ExecStop=/usr/sbin/riak stop
88
Type=simple
99
PIDFile=/run/riak/riak.pid

0 commit comments

Comments
 (0)