bitwalker / distillery

Simplify deployments in Elixir with OTP releases!
MIT License
2.97k stars 398 forks source link

[OpenBSD] Cannot find -name or -sname #617

Closed siegfried closed 5 years ago

siegfried commented 5 years ago

Steps to reproduce

Release any project and run its command with Distillery 2.0.12 on OpenBSD 6.4. It exits with a vm.args needs to have either -name or -sname parameter.

Verbose Logs

Paste the output of the release command you ran with the --verbose flag below in the summary tags (this helps keep the issue easy to navigate):

``` # MIX_ENV=prod mix release --env prod --verbose ==> Loading configuration.. ==> Assembling release.. ==> Building release my_project:0.1.1 using environment prod ==> Discovered applications: > stdlib-3.3 | | from: /usr/local/lib/erlang19/lib/stdlib-3.3 | applications: | :kernel | includes: none |_____ > iex-1.7.3 | | from: /usr/local/lib/elixir/bin/../lib/iex | applications: | :kernel | :stdlib | :elixir | includes: none |_____ > logger-1.7.3 | | from: /usr/local/lib/elixir/bin/../lib/logger | applications: | :kernel | :stdlib | :elixir | includes: none |_____ > kernel-5.2 | | from: /usr/local/lib/erlang19/lib/kernel-5.2 | applications: none | includes: none |_____ > crypto-3.7.3 | | from: /usr/local/lib/erlang19/lib/crypto-3.7.3 | applications: | :kernel | :stdlib | includes: none |_____ > sasl-3.0.3 | | from: /usr/local/lib/erlang19/lib/sasl-3.0.3 | applications: | :kernel | :stdlib | includes: none |_____ > runtime_tools-1.11.1 | | from: /usr/local/lib/erlang19/lib/runtime_tools-1.11.1 | applications: | :kernel | :stdlib | includes: none |_____ > compiler-7.0.4 | | from: /usr/local/lib/erlang19/lib/compiler-7.0.4 | applications: | :kernel | :stdlib | includes: none |_____ > my_project-0.1.1 | | from: _build/prod/lib/my_project | applications: | :kernel | :stdlib | :elixir | :crypto | :logger | includes: none |_____ > artificery-0.2.6 | | from: _build/prod/lib/artificery | applications: | :kernel | :stdlib | :elixir | includes: none |_____ > distillery-2.0.12 | | from: _build/prod/lib/distillery | applications: | :kernel | :stdlib | :elixir | :runtime_tools | :artificery | includes: none |_____ > mix-1.7.3 | | from: /usr/local/lib/elixir/bin/../lib/mix | applications: | :kernel | :stdlib | :elixir | includes: none |_____ > elixir-1.7.3 | | from: /usr/local/lib/elixir/bin/../lib/elixir | applications: | :kernel | :stdlib | :compiler | includes: none |_____ ==> Running validation checks.. > Mix.Releases.Checks.Erts * PASS > Mix.Releases.Checks.Cookie * PASS > Mix.Releases.Checks.LoadedOrphanedApps * PASS ==> Generated overlay vars: release_name=:my_project release_version="0.1.1" is_upgrade=false upgrade_from=:latest dev_mode=false include_erts=true include_src=false include_system_libs=true erl_opts="" run_erl_env="" erts_vsn="8.3" output_dir="_build/prod/rel/my_project" ==> Copying applications to _build/prod/rel/my_project ==> Generating start_erl.data ==> Generating vm.args from rel/vm.args ==> Generating sys.config from config/config.exs ==> Including ERTS 8.3 from /usr/local/lib/erlang19/erts-8.3 ==> Generating boot scripts ==> Generating RELEASES ==> Applying overlays ==> Applying mkdir overlay dst: releases/0.1.1/hooks ==> Applying mkdir overlay dst: releases/0.1.1/hooks/pre_configure.d ==> Applying mkdir overlay dst: releases/0.1.1/hooks/post_configure.d ==> Applying mkdir overlay dst: releases/0.1.1/hooks/pre_start.d ==> Applying mkdir overlay dst: releases/0.1.1/hooks/post_start.d ==> Applying mkdir overlay dst: releases/0.1.1/hooks/pre_stop.d ==> Applying mkdir overlay dst: releases/0.1.1/hooks/post_stop.d ==> Applying mkdir overlay dst: releases/0.1.1/hooks/pre_upgrade.d ==> Applying mkdir overlay dst: releases/0.1.1/hooks/post_upgrade.d ==> Applying copy overlay src: _build/prod/lib/distillery/priv/libexec dst: releases/0.1.1/libexec ==> Applying mkdir overlay dst: releases/0.1.1/commands ==> Packaging release.. ==> Archiving my_project-0.1.1 ==> Writing archive to /root/my_project/_build/prod/rel/my_project/releases/0.1.1/my_project.tar.gz ==> Updating archive.. ==> Including system libs from current Erlang installation ==> Saving archive.. ==> Archive saved! Release successfully built! To start the release you have built, you can use one of the following tasks: # start a shell, like 'iex -S mix' > _build/prod/rel/my_project/bin/my_project console # start in the foreground, like 'mix run --no-halt' > _build/prod/rel/my_project/bin/my_project foreground # start in the background, must be stopped with the 'stop' command > _build/prod/rel/my_project/bin/my_project start If you started a release elsewhere, and wish to connect to it: # connects a local shell to the running node > _build/prod/rel/my_project/bin/my_project remote_console # connects directly to the running node's console > _build/prod/rel/my_project/bin/my_project attach For a complete listing of commands and their use: > _build/prod/rel/my_project/bin/my_project help # _build/prod/rel/my_project/bin/my_project console tput: not enough arguments (3) for capability `setaf' tput: not enough arguments (3) for capability `setaf' tput: not enough arguments (3) for capability `setaf' tput: not enough arguments (3) for capability `setaf' vm.args needs to have either -name or -sname parameter. ```

Description of issue

siegfried commented 5 years ago

I've found the root cause and create a PR for it. Please have a look. My previous PR was to fix a tar command. We really need to be careful of the commands in macOS, I guess.