Closed massemanet closed 7 years ago
do you get the same error if you specify {include_erts, false}
?
no, that works.
but I do have some more info. brew (a Darwin package manager) installs the OTP files read-only. when relx copies the .app files (because include_erts), it preserves the file permissions. So when relx tries to overwrite its own copies of the .app files, it fails because the files are read-only.
I have same problem. When I try to run rebar3 as prod tar
then it fails on
$ rebar3 report "rebar3 as prod tar"
Rebar3 report
version 3.3.4
generated at 2017-01-28T18:57:21+00:00
=================
Please submit this along with your issue at https://github.com/erlang/rebar3/issues (and feel free to edit out private information, if any)
-----------------
Task: rebar3
Entered as:
rebar3 as prod tar
-----------------
Operating System: x86_64-apple-darwin13.4.0
ERTS: Erlang/OTP 19 [erts-8.1] [source] [64-bit] [smp:8:8] [async-threads:0] [hipe] [kernel-poll:false] [dtrace]
Root Directory: /usr/local/Cellar/erlang/19.1/lib/erlang
Library directory: /usr/local/Cellar/erlang/19.1/lib/erlang/lib
$ cat rebar3.crashdump
Error: function_clause
[{relx,format_error,
[{error,eacces}],
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/relx.erl"},
{line,220}]},
{relx,report_error,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/relx.erl"},
{line,336}]},
{rebar_relx,do,4,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_relx.erl"},
{line,38}]},
{rebar_core,do,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_core.erl"},
{line,153}]},
{rebar_prv_do,do_tasks,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_prv_do.erl"},
{line,57}]},
{rebar_core,do,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_core.erl"},
{line,153}]},
{rebar3,main,1,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar3.erl"},
{line,66}]},
{init,start_em,1,[]}]
@massemanet @jaromirmuller can you please try out #565? it should fix the issue
I tried https://github.com/erlware/relx/pull/565; solves my problem.
Having said that, I find the behavior of ec_file:copy/3 (used in rlx_prv_assembler:copy_dir) baffling. It tries to set the file owner to its original value. Why is that ever a good idea? And how is it supposed to work if I run relx as a normal user, but the original file is owned by root (like on a debian machine)?
OTP 18.3 installed with brew.