Skip to content

Packaging improvements & upgrade to rebar3.18 #1108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
365be48
nonexistent target ballclean
Dec 11, 2021
5d6985f
determine otp version from erlang:system_info(otp_release)
Dec 14, 2021
2fcb5c3
upgrade rebar3 to 3.18; refactor and repair release assembly, patch 1/2
Dec 10, 2021
f143579
avoid copying .git dirs when preparing rel- targets
hmmr Dec 15, 2021
eb01630
improvements in deb packaging (compliance with current standards, etc)
Dec 13, 2021
67e1c7b
clean up after dropping yokozuna
Dec 13, 2021
70f7327
improvements in rpm packaging
Dec 14, 2021
5d4c402
enable packaging for Amazon Linux 2
Dec 14, 2021
3699ca6
osx package
Apr 14, 2022
bd3ad08
cleaner su in launcher script
Dec 19, 2021
8660b0f
refactor and repair release assembly, patch 2/2
Dec 19, 2021
601483e
rm node_package relic
Feb 4, 2022
5e73f6f
alpine packaging
Apr 14, 2022
ca8a154
launcher without su, just for alpine
Apr 14, 2022
5cab312
deprecate, warn about hyphenated forms of riak-admin
hmmr Mar 26, 2022
e2732a6
pid file for local release is useless
Mar 28, 2022
b6076a2
riak_not_running is actually a template
Mar 28, 2022
fb0cf05
let relx handle pid files (unbroken in rebar3_cuttlefish-0.2.1)
Apr 14, 2022
129d814
rebar3.org recommends starting riak with 'foreground'
Mar 29, 2022
0b229ab
debian/Makefile: don't do make clean when nothing has been built yet
Mar 30, 2022
9ec79d3
deb/Makefile: link _build/default/{libs,plugins} to avoid fetching do…
Mar 30, 2022
25c9d29
move hooks into own dir under rel/files
Mar 31, 2022
7773391
why prepend riak- to PKG_ID?
Mar 31, 2022
81108df
symlnk deps from _build/default/lib/* into tree snapshot in rel/pkg/o…
Mar 31, 2022
a371934
amend prev commit to only symlink libs (cuttlefish plugin fails unles…
Mar 31, 2022
874c583
packaging for freebsd
Feb 19, 2022
524d828
tmp remove rebar.lock while deps are floated
Apr 2, 2022
8728862
with rebar3_cuttlefish unbroken, undo hyphenated command routing
hmmr Apr 6, 2022
ee86dd0
make use of cf_config in riak-chkconfig, again
Apr 11, 2022
3e7397c
simplify launcher script
Apr 15, 2022
0c3ed71
missing items in rpm/BuildRequires
Apr 15, 2022
18c46ac
simplify launcher script fixup
Apr 15, 2022
d709455
no rpcterms in 3.18: use rpc in riak-admin
Apr 15, 2022
e08ccd4
redundant trainling / in pipe_dir in vars.config
Apr 15, 2022
281ebd9
redundant trainling / in pipe_dir (and others) in vars.config
Apr 15, 2022
2092f4a
drop PIPE_DIR
Apr 15, 2022
de3f886
adjust RPC_HOP to new nodetool rpc calling conventions
Apr 19, 2022
4dfd000
better handling of rpc calls in riak-admin
Apr 20, 2022
053cfc3
fix riak-admin wait-for-service loop
Apr 21, 2022
313aba3
fix su workaround for centos7
Apr 21, 2022
f553f91
fix riak-debug for local release
Apr 23, 2022
7180e1b
less artsy rewrite of app_epath
Apr 24, 2022
eba3159
make riak-debug output to predictable location
Apr 24, 2022
31e1ad4
omit riak_diag from riak-debug output
Apr 24, 2022
15dcf8a
avoid silent script termination when run as `riak debug`
Apr 24, 2022
c3e1a42
fix piggy tarball name in fbsdng/Makefile
Apr 25, 2022
fe322ca
fix osx/Makefile wrt intermediate tar rename
Apr 26, 2022
372f7d5
complete a manual revert
Apr 27, 2022
2514486
point to TI-Tokyo/riak_kv, with a fix for osx cuttlefish misbehavior
Apr 27, 2022
18c9d7c
add_path in riak-admin -eval code, for the curious case of osx
Apr 27, 2022
0d95596
fix up 4dfd000350
Apr 29, 2022
9d90773
reference to PIPE_DIR left over after 2092f4a in alpine/riak-nosu
May 6, 2022
5235488
housekeeping
May 16, 2022
c50de74
no need to update deps separately; rebar3 does it automatically
May 17, 2022
e2a285c
another rebar2 carryover spotted, in stage and perfdev targets
May 17, 2022
4c347b6
suppress more lager guerillas
May 24, 2022
d7bb797
take better care of spaces in args passed via rpc
May 24, 2022
fc9960a
separate logger_level defaults for rel and devrel builds
May 24, 2022
39f0ecf
make devrel relocatable, too
Jun 1, 2022
b2a3a5a
speak correct bashese when forwarding args in riak-admin for erl_call
Jun 7, 2022
8394c74
use printf as a safer `echo -n`
Jun 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 31 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ PKG_REVISION ?= $(shell git describe --tags 2>/dev/null)
PKG_BUILD = 1
BASE_DIR = $(shell pwd)
ERLANG_BIN = $(shell dirname $(shell which erl 2>/dev/null) 2>/dev/null)
OTP_VER = $(shell echo $(ERLANG_BIN) | rev | cut -d "/" -f 2 | rev)
OTP_VER = $(shell erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell)
REBAR ?= $(BASE_DIR)/rebar3
OVERLAY_VARS ?=
TEST_IGNORE ?= lager riak basho_bench
TEST_IGNORE ?= riak basho_bench
TEST_DEPS_DIR ?= _build/test/lib
REL_DIR ?= _build/default/rel
DEPS = $(patsubst $(TEST_DEPS_DIR)/%, %, $(wildcard $(TEST_DEPS_DIR)/*))
Expand All @@ -21,21 +21,17 @@ export EXOMETER_PACKAGES

$(if $(ERLANG_BIN),,$(warning "Warning: No Erlang found in your path, this will probably not work"))

.PHONY: rel stagedevrel deps
.PHONY: rel stagedevrel

all: deps compile
all: compile

compile:
$(REBAR) compile

deps:
$(if $(HEAD_REVISION),$(warning "Warning: you have checked out a tag ($(HEAD_REVISION)) and should use the compile target"))
$(REBAR) upgrade

clean: testclean
$(REBAR) clean

distclean: clean devclean relclean ballclean
distclean: clean devclean relclean
@rm -rf _build

##
Expand Down Expand Up @@ -74,20 +70,35 @@ test : testclean eunit test-deps
## Release targets
##
rel: compile
$(REBAR) as rel release
cp -a _build/rel/rel/riak rel/
@$(REBAR) as rel release
# freebsd tar won't write to stdout, so:
@tar -c -f rel.tar --exclude '*/.git/*' -C _build/rel/rel riak && tar -x -f rel.tar -C rel && rm rel.tar

rel-rpm: compile
$(REBAR) as rpm release
cp -a _build/rpm/rel/riak rel/
@$(REBAR) as rpm release
@tar --exclude-vcs -c -C _build/rpm/rel riak | tar -x -C rel

rel-deb: compile
$(REBAR) as deb release
cp -a _build/deb/rel/riak rel/
@$(REBAR) as deb release
@tar --exclude=vcs -c -C _build/deb/rel riak | tar -x -C rel

rel-osx: compile
@$(REBAR) as osx release
@tar --exclude=vcs -c -C _build/osx/rel riak | tar -x -C rel

# this one is to be called from an external make (not from rel/pkg/Makefile)
rel-alpine: compile
@$(REBAR) as alpine release
@(cd _build/alpine/rel/riak/usr/bin && mv riak-nosu riak)
@tar --exclude=vcs -c -C _build/alpine/rel riak | tar -x -C rel

rel-fbsdng: compile
@$(REBAR) as fbsdng release
@tar -c -f rel.tar --exclude '*/.git/*' -C _build/fbsdng/rel riak && tar -x -f rel.tar -C rel && rm rel.tar

relclean:
rm -rf $(REL_DIR)
rm -rf rel/riak
@rm -rf $(REL_DIR)
@rm -rf rel/riak rel/.libs rel/.deps

##
## Developer targets
Expand Down Expand Up @@ -123,7 +134,7 @@ perfdev : all
mkdir -p perfdev
rel/gen_dev $@ rel/vars/perf_vars.config.src rel/vars/perf_vars.config
(cd rel && ../rebar generate target_dir=../perfdev overlay_vars=vars/perf_vars.config)
$(foreach dep,$(wildcard deps/*), rm -rf perfdev/lib/$(shell basename $(dep))* && ln -sf $(abspath $(dep)) perfdev/lib;)
$(foreach dep,$(wildcard _build/default/lib/*), rm -rf perfdev/lib/$(shell basename $(dep))* && ln -sf $(abspath $(dep)) perfdev/lib;)

perf:
perfdev/bin/riak stop || :
Expand All @@ -136,7 +147,7 @@ devclean: clean
rm -rf dev

stage : rel
$(foreach dep,$(wildcard deps/*), rm -rf rel/riak/lib/$(shell basename $(dep))* && ln -sf $(abspath $(dep)) rel/riak/lib;)
$(foreach dep,$(wildcard _build/default/lib/*), rm -rf rel/riak/lib/$(shell basename $(dep))* && ln -sf $(abspath $(dep)) rel/riak/lib;)

##
## Doc targets
Expand Down Expand Up @@ -231,7 +242,7 @@ PKG_ID := "$(REPO_TAG)-OTP$(OTP_VER)"
PKG_VERSION = $(shell echo $(PKG_ID) | sed -e 's/^$(REPO)-//')

package:
mkdir rel/pkg/out/riak-$(PKG_ID)
mkdir -p rel/pkg/out/$(PKG_ID)
git archive --format=tar HEAD | gzip >rel/pkg/out/$(PKG_ID).tar.gz
$(MAKE) -f rel/pkg/Makefile

Expand Down
1 change: 0 additions & 1 deletion apps/riak/src/riak.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
riak,
cuttlefish,
runtime_tools,
lager_syslog,
cluster_info,
riak_kv,
riak_repl,
Expand Down
2 changes: 2 additions & 0 deletions config/vm.args
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-setcookie riak
-name [email protected]
37 changes: 0 additions & 37 deletions pkg.vars.config

This file was deleted.

2 changes: 1 addition & 1 deletion priv/riak.schema
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

%% @doc The severity level of the console log, default is 'info'.
{mapping, "logger.level", "kernel.logger_level", [
{default, info},
{default, {{logger_level}} },
{datatype, {enum, [debug, info, notice, warning, error, critical, alert, emergency, none]}}
]}.

Expand Down
Loading