[erlang-questions] rebar3 tar and endless loop

Dmitry Kolesnikov dmkolesnikov@REDACTED
Wed Nov 8 09:44:45 CET 2017


Hello,

The private folder of applications are automatically added to the release. 
There are not need to add an overlay. You can move your root /priv folder under you application x.

Best Regards,
Dmitry


> On 8 Nov 2017, at 0.25, Alexander Petrovsky <askjuise@REDACTED> wrote:
> 
> Hi!
> 
> I try to prepare erlang release, with follow config:
> 
> {relx, [
>     {release, {x, "0.0.1"},
>          [x,
>           sasl]},
>     {overlay, [
>          {copy, "priv/*", "priv/"}
>     ...
> ./rebar3 release
> 
> But, relx doesn't support wildcard. I'm try the follow config:
> 
>     ...
>          {copy, "priv/", "priv/"}
>     ...
> ./rebar3 release
> 
> Unfortunately, the result will be priv/priv. But when I do:
> 
>     ...
>          {copy, "priv/", "./"}
>     ...
> ./rebar3 release
> 
> Everything goes without problems. But, when I'm try to make tarball from that here problems come: the ./rebar3 tar goes to endless loop continuously add x-0.0.1.tar.gz to himself. 
> 
> The ./rebar3 tar keep archive tar.gz file in the same directory with generated erlang release files. So, when rebar3 sees mappings like {copy, "priv/", "./"} it's transforms them into something like
> 
> [{"./",           "/Users/juise/Documents/x/_build/default/rel/x"},
>  {"log/sasl", "/Users/juise/Documents/x/_build/default/rel/x/log/sasl"}]
> 
> which cause endless loop.
> 
> I see multiple solutions:
> - ./rebar3 tar must archive all files in release directory, and not pay attention to overlay directive;
> - relx should ignore mappings like {"./", "/Users/juise/Documents/x/_build/default/rel/x"};
> - erl_tar should explicitly ignore result archive and don't add to himself.
> 
> -- 
> Петровский Александр / Alexander Petrovsky,
> 
> Skype: askjuise
> Phone: +7 931 9877991
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171108/ff19bda6/attachment.htm>


More information about the erlang-questions mailing list