Skip to content
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

ERL-859: Release script and boot file naming #4082

Open
OTP-Maintainer opened this issue Feb 18, 2019 · 1 comment
Open

ERL-859: Release script and boot file naming #4082

OTP-Maintainer opened this issue Feb 18, 2019 · 1 comment
Labels

Comments

@OTP-Maintainer
Copy link

Original reporter: tsloughter
Affected version: Not Specified
Component: sasl
Migrated from: https://bugs.erlang.org/browse/ERL-859


systools and release_handler have some strict requirements around naming and paths in order to work. I'm opening this to start with a common confusing naming issue I've encountered in order to start with either understanding the decisions better for documentation and rebar3/relx development or for improving systools/release_handler themselves.

So to start there is this behavior:

* `systools:make_script` creates `Name.script` and `Name.boot`. 
* `release_handler` requires that the name be `start.boot`.
* `systools:make_tar` will rename `Name.boot` to `start.boot`.

This becomes particularly confusing when a user using rebar3/relx creates a release with `rebar3 release` and attempts to use `release_handler` on the generated release under `_build/default/rel/Name`.

Instead the user must run `rebar3 tar` to create a target system that is built with `systools:make_tar` which renames to `start.boot` and then can utilize the functionality in `release_handler`.

Usually this is fine since building a tarball deployable artifact is what is the regular step before using release_handler, but it has certainly caused confusion over the years.

The question becomes, why the difference in name at all? Why does `make_script` not simply create `start.boot`?

I was thinking about this again recently because Jose is working on release tasks for mix and he simply has the task rename to `start.boot` and creates a tarball with `erl_tar`.

rebar3/relx can be changed to do the same but I wanted to understand the reasoning and possibly propose making the change in systools.
@OTP-Maintainer
Copy link
Author

siri said:

I think that the main reason for systools to use a different name than start.boot is to make it easier to connect the boot file to it's source .rel file, and to allow multiple .boot files in a system. In many cases that might not be necessary, but for instance in our development release you have start_sasl.boot, start_clean.boot and no_dot_erlang.boot. On installation one of these is copied into start.boot and will then be used when you start your system.

Event the example target system described in [the System Principles document|http://erlang.org/doc/system_principles/create_target.html] is created with two sets of .rel/.script/.boot, and only when the tar file is created the correct set is picked out and the .boot file renamed.

There would of course be several different ways to solve that problem, but I think this is the reason for the current solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant