When generating a node using rebar generate, rebar always used
code:root_dir() to find the Erlang installation to clone into the node
tree. However, for anyone wishing to build a cross-compiled node, there
was no way to override this. This patch adds a new option to
reltool.config file to allow an alternate root_dir to be specified, for
example:
{root_dir, "/tmp/otp_R14B03_armv7l"}
This assumes that the contents of /tmp/otp_R14B03_armv7l has been
generated using the instructions found in the xcomp directory in your
$ERL_TOP structure. NOTE: you may have to add additional filters to
exclude files not present in the xcomp version, such as the .smp files
if you have disabled that.
app.config has been a long standing erroneous file in rebar. Erlang/OTP
documentation suggests a sys.config file instead. This file is stored in
the releases/VSN directory. This does a few things but most importantly
it ensures your config (contained in the application environment)
survives a hot upgrade. It also has the advantage of allowing the
configuration of the application to be versioned along side the
application code. This patch flips rebar to use sys.config rather than
app.config.
Additionally it makes this flip to vm.args as well, making them
versioned just like sys.config.
This patch also includes runner script changes to support the old
etc/app.config config file location and support for Windows.
Thanks to mokele for the initial work and kick in the pants to make this
finially happen.
The target_dir config in reltool allows you to put your release in
a directory other than in ./NAME, so we should look in the parent
directory of that to find the new and old versions instead of
simply looking in ./
Move untaring and retaring into a temporary path instead of in ./
to prevent name collisions with "releases" and "lib" that might
exist already. Having a subdirectory rel/releases/ can be useful.
get_apps/3 now returns which apps have been added, removed and ugpgraded
in a reasonable way. It should prove more usable should we want to
access any of those lists in future appup related changes.
This commit changes how rebar determines which apps have been
updated, added and removed from a release during appup generation.
Rather than use app files it now determines this from the rel file
in each version of the release. In addition it fixes a bug reported
on the mailing list when generating appups when an application has
been added or removed from either release.
Replace rebar_util:get_cwd/0 by rebar_utils:get_cwd/0. Luckily the
misspelt module name doesn't seem to have caused any harm, since
rebar_app_utils:is_app_dir/0 and rebar_rel_utils:is_rel_dir/0 aren't
called (only their /1 counterparts).