[erlang-questions] with Erlang R21 rebar3 build fails

Tristan Sloughter t@REDACTED
Fri Jun 22 22:48:06 CEST 2018


And this allowed it to then set the mode which would actually succeed even though setting the owner did not.

relx relied on simply copying the file_info from the original file to the copy it makes when including erts in a release. Without this files like `bin/erl` that need to be executable wouldn't be.

My guess is that before 21 it would work for setting the mode and timestamp but not the owner but continue along like everything worked. While today since the owner is set first in `prim_file:write_file_info` and fails it never sets the mode, meaning we also can't simply ignore this failure like was happening before 21.

We will patch rebar3/relx to catch this and attempt to update only the mode for a quick fix, or simply modify `ec_file:copy` in erlware_commons to support an options list of what file info to copy instead of attempting to copy it all requiring rebar3/relx to handle the failure.

Tristan

On Thu, Jun 21, 2018, at 1:41 AM, John Högberg wrote:
> Hi,
> 
> This is caused by fixing a bug in OTP 21; file:write_file_info and
> friends used to report success on owner/group changes regardless of
> whether it worked or not.
> 
> We marked this as an incompatibility in the release notes under OTP-
> 15118.
> 
> Regards,
> John Högberg
> 
> On ons, 2018-06-20 at 19:21 -0400, Fred Hebert wrote:
> > On 06/20, Mark Geib wrote:
> > > 
> > > and rebar3.crashdump is:
> > > 
> > > geibs-MacBook-Pro:json2splunk geib$ cat rebar3.crashdump
> > > Error: {badmatch,{error,eperm}}
> > > [{rlx_prv_overlay,write_template,3,
> > >                  [{file,"/home/tristan/Devel/rebar3/_build/default/
> > > lib/relx/src/rlx_prv_overlay.erl"},
> > >                   {line,498}]},
> > > ...
> > > 
> > > Now switching back to erlang R20 I get a successful build
> > > 
> > > 
> > > I assume since rebar3 is the same exec, that this is a potential
> > > issue with R21.
> > > Any ideas.???
> > > 
> > See http://erlang.org/pipermail/erlang-questions/2018-June/095614.htm
> > l
> > 
> > OTP-21.0 sees the entire file drivers rewritten. The bug you have
> > seems 
> > to have been reported to the OTP team during OTP-21-rc2.
> > 
> > I don't know exactly what happened between OTP-21-rc2 and OTP-21.0,
> > and 
> > if you'd need to run with a rebar3 built specifically on OTP-21.0
> > for 
> > things to work fine.
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED
> > http://erlang.org/mailman/listinfo/erlang-questions
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list