Age | Commit message (Collapse) | Author |
|
|
|
* Attempt at a fix for vm.args usage
* bump sleep time to see if it fixes tests on travis
|
|
--relx-disable-hooks cause start_boot <boot_file> start fail
|
|
|
|
|
|
|
|
|
|
Fix .orig rename commands in bin_windows
1. .orig was being prepended second argument rather than appended to the
first argument
2. Windows' ren command expects the second argument to be just a file
name (not contain drive or path components)
3. Tidy up appending of .orig, place inside double quotes rather than
outside of quotes.
This matches the usage a few lines later:
@if exist "%rel_dir%\%rel_name%.boot" (
Copy rename commands from bin_windows to extended_bin_windows.
|
|
run named erl nodes to auto-set cookie
|
|
|
|
|
|
Let the user provide writable $ROOTDIR/tmp so it can be used
for temporary files
|
|
|
|
|
|
|
|
|
|
A common pitfall when starting up Erlang nodes is to
start them as root and then fail silently when switching
to another user, improve this by providing a helpful error
message when this happens.
|
|
- if the hostname is set in the vm.args file, preserve it
- if it is not set, try to set it from env vars
- if the env vars are not set, leave it blank
|
|
* templates/bin: replace process with erlexec
Similar to templates/extended_bin, use "exec" to avoid leaving an extra
shell process running.
* template/{bin,extended_bin}: set program name
Set the program name to the script name in process lists using the same
method as escripts. The program name can be overriden by setting the
ESCRIPT_NAME environment variable:
# before
msantos 10428 9554 49 10:33 pts/25 00:00:01 /usr/local/lib/erlang/erts-9.2/bin/beam.smp -Bd -- ...
# after
msantos 10054 9554 32 10:33 pts/25 00:00:01 /home/msantos/src/erlang/appname/_build/default/rel/appname/bin/appname -Bd -- ...
# ESCRIPT_NAME="foo"
msantos 11254 9554 32 10:35 pts/25 00:00:01 foo -Bd -- ...
|
|
* support for OTP21's sys.config.src file in releases
* always replace os vars in .src files if found
* support vm_args_src to be consistent with sys_config_src
* add newlines after warning logs
* improve sys and vm src config tests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
On Linux, 'attach' uses named pipes, and 'remote_console' uses -remsh.
The latter is usually deemed better since named pipes require a call to
fsync on every line written.
On Windows, no named pipes are available so attach uses -remsh directly.
Historically, remote_console was added to linux *after* attach, but no
alias was added for it on windows. Since there's a predominance of
tutorials using linux-likes, remote_console is widely documented as the
way to go, and is unavailable on windows.
This is hella confusing.
So to work around that, this patch adds an alias for 'attach' on windows
to be 'remote_console', bridging the gap.
Also the functionality was flat out broken because it would not use a
node hostname when connecting out. Since the latest release added that
functionality, this patch also fixes attach to work in the first place.
|
|
Some tool calls were outdated, and in some cases, relied on non-existing
features there.
|
|
Use either optional compilation or version-safe variants of the string
functions. Prevents warnings when the switch to OTP-21 will happen.
|
|
|
|
both double quotes and a space character
|
|
The runner script that ships with rebar builds HEART_COMMAND and run_erl arguments that preserve additional arguments the user may have passed:
https://github.com/rebar/rebar/blob/master/priv/templates/simplenode.runner#L215-L238
This PR preserves this behavior. In additon, the current code on this line sets $@ but does not do anything with the result:
https://github.com/erlware/relx/blob/master/priv/templates/extended_bin#L481-L482
Investigated in response to this ML thread: http://erlang.org/pipermail/erlang-questions/2017-October/093974.html
|
|
|
|
Add boot_var ERTS_LIB_DIR to relx_get_nodename
|
|
* Extended start script command extensions
Provide a mechanism that allows for the application
to extend the list of commands available to be invoked
from the start script. An application may be able to
define a 'foo' extension that is associated with a 'foo_script'
written and maintained by the applicationr, (this association is
kept in rebar.config), upon invocation of bin/<release_name> foo
the 'foo_script' will then be invoked.
* Add test coverage for extension script
* Ensure extended script usage argument
|
|
|
|
[windows] pass extra arguments from vm.args to service
|
|
vm.args check for name/sname parameter
|
|
- distinction between non-existing and existing but non-readable args_file
- fixed circularity check to include the base vm.args file
|
|
vm.args and referenced args_files will now be checked for:
- non-existing -args_files
- circular dependencies between -args_files
- relative paths in -args_files
- multiple/mixed occurences of -name and -sname parameters
- missing -name or -sname parameters
|
|
|
|
|
|
usage of \s in awk regexp is a gawk extension. OSX comes with a different variant of awk. This fix should make the awk code POSIX-compliant and should work in all variants of awk (tested with gawk --traditional)
|
|
The current version of extended_bin checks if there is a name or sname parameter in vm.args and refuses to start if there is none. However, it is allowed that the vm.args file (more abstract, any -args_file that is given to erl/erlexec etc) itself may contain -args_file parameters (see http://erlang.org/doc/man/erl.html), which may contain the name/sname parameters.
This change will recursively scan the files mentioned in -args_file parameters in vm.args as well as -args_file parameters in the mentioned files etcetc, and return the first occurence of a name/sname parameter.
Two points are worth mentioning, though:
- The name/sname check works only with absolute paths in the args_file parameters. Relative paths are probably a bad idea there, anyway, since it would make any setup rather fragile.
- There is no check for circular dependencies. There was none before, and this change does not add any.
|
|
|
|
|
|
|
|
As mentioned in the (closed) issue #127, the default pipe directory is not multi-user friendly. When running multiple relx-generated releases as different users, the first to be started will create the /tmp/erl_pipes directory, which the ones starting after that cannot create their pipe dirs in. The ticket mentions that this should be fixed by #154, but I cannot see how this is supposed to solve the issue. Right now, the only way I see is to use prefix the start command with env PIPE_DIR=/some/other/dir/, which is quite cumbersome.
This change will work exactly as before when PIPE_DIR is explicitly set. In case PIPE_DIR is not set, however, it will first attempt to create the parent dir /tmp/erl_pipes with mode 1777, which should enable releases being run as other users to create their pipe dirs.
|
|
|