From 8029c3653d3f569e146811af85a643559415c76f Mon Sep 17 00:00:00 2001 From: Michael Truog Date: Wed, 19 Dec 2018 18:31:52 -0800 Subject: reltool: Add load_dot_erlang rel option This adds a rel tuple to the reltool release specific configuration format as {rel, Name, Vsn, RelApps, Opts} to support the use of {rel, Name, Vsn, RelApps, [{load_dot_erlang, false}]} for preventing the insertion of {apply,{c,erlangrc,[]}} into the release script file and the release boot file. This change makes it possible to prevent releases generated with reltool from attempting to load a ${HOME}/.erlang file which is desirable for production deployment of Erlang, to have greater control of what BEAM evaluates. The ${HOME}/.erlang file lacks visibility and its location on the filesystem separate from where the release lives means it can be misused in a way that lacks visibility. --- lib/reltool/doc/src/reltool.xml | 2 ++ lib/reltool/doc/src/reltool_examples.xml | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/reltool/doc') diff --git a/lib/reltool/doc/src/reltool.xml b/lib/reltool/doc/src/reltool.xml index 5afbad0ba8..136ec2ed69 100644 --- a/lib/reltool/doc/src/reltool.xml +++ b/lib/reltool/doc/src/reltool.xml @@ -503,6 +503,7 @@ sys() = {root_dir, root_dir()} | {incl_cond, incl_cond()} | {boot_rel, boot_rel()} | {rel, rel_name(), rel_vsn(), [rel_app()]} + | {rel, rel_name(), rel_vsn(), [rel_app()], [rel_opt()]} | {relocatable, relocatable()} | {app_file, app_file()} | {debug_info, debug_info()} @@ -534,6 +535,7 @@ rel_app() = app_name() | {app_name(), app_type()} | {app_name(), [incl_app()]} | {app_name(), app_type(), [incl_app()]} +rel_opt() = {load_dot_erlang, boolean()} app_name() = atom() app_type() = permanent | transient | temporary | load | none app_vsn() = string() diff --git a/lib/reltool/doc/src/reltool_examples.xml b/lib/reltool/doc/src/reltool_examples.xml index f9a6fcf342..3888b643a2 100644 --- a/lib/reltool/doc/src/reltool_examples.xml +++ b/lib/reltool/doc/src/reltool_examples.xml @@ -313,9 +313,12 @@ Erlang/OTP 20 [erts-10.0] [source-c13b302] [64-bit] [smp:4:4] [ds:4:4:10] [async [hipe] [kernel-poll:false] Eshell V10.0 (abort with ^G) 1> -1> {ok, Server} = reltool:start_server([{config, {sys, [{boot_rel, "NAME"}, - {rel, "NAME", "VSN", - [sasl]}]}}]). +1> {ok, Server} = reltool:start_server([{config, + {sys, + [{boot_rel, "NAME"}, + {rel, "NAME", "VSN", + [sasl], + [{load_dot_erlang, false}]}]}}]). {ok,<0.1288.0>} 2> 2> reltool:get_config(Server). -- cgit v1.2.3