Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure the erl file is writable before copying dyn_erl to it #903

Merged
merged 1 commit into from
Jan 18, 2022

Conversation

tsloughter
Copy link
Member

It was discovered that in some installs, like on MacOS, that the
erl file is not writable and would result in copying dyn_erl to
erl to fail silently. This patch adds the writable perm to the
file and will error if that or the copying fail.

Resolves aeternity/aeternity#3789

It was discovered that in some installs, like on MacOS, that the
erl file is not writable and would result in copying dyn_erl to
erl to fail silently. This patch adds the writable perm to the
file and will error if that or the copying fail.
@ferd ferd merged commit d2add7c into erlware:main Jan 18, 2022
ferd added a commit to erlang/rebar3 that referenced this pull request Jun 18, 2022
- [Use `erlexec` directly in relx helper functions](erlware/relx#902)
- [Make rlx_util:parse_vsn parse integer versions](erlware/relx#913)
- [fix awk script check_name() in extended_bin](erlware/relx#915)
- [avoid crash when overlay is malformed](erlware/relx#916)
- [keep attributes when stripping beams](erlware/relx#906)
- [Fix {include_erts,true} in Windows releases](erlware/relx#914)
- [ensure the erl file is writable before copying dyn_erl to it](erlware/relx#903)
- Various tests added
ferd added a commit to erlang/rebar3 that referenced this pull request Jun 18, 2022
New features:

- [Add --offline option and REBAR_OFFLINE environment variable](#2643)
- [Add support for project-local plugins](#2697)
- [Add eunit --test flag](#2684)

Experimental features for which we promise no backwards compatibility in
the near future:

- [Experimental vendoring provider](#2689)
  - [Support plugins in experimental vendor provider](#2702)

Other changes:

- [Support OTP 23..25 inclusively](#2706)
- [Bump Relx to 4.7.0](#2718)
  - [Use `erlexec` directly in relx helper functions](erlware/relx#902)
  - [Make rlx_util:parse_vsn parse integer versions](erlware/relx#913)
  - [fix awk script check_name() in extended_bin](erlware/relx#915)
  - [avoid crash when overlay is malformed](erlware/relx#916)
  - [keep attributes when stripping beams](erlware/relx#906)
  - [Fix {include_erts,true} in Windows releases](erlware/relx#914)
  - [ensure the erl file is writable before copying dyn_erl to it](erlware/relx#903)
  - Various tests added
- [Properly carry overlay_vars settings for files in relx](#2711)
- [Track mib compilation artifacts](#2709)
- [Attempt to find apps in git subdirs (sparse checkouts)](#2687)
- [Do not discard parameters --system_libs and --include-erts when duplicate values exist](#2695)
- [Use default `depth` parameter for SSL](#2690)
- [Fix global cache config overriding](#2683)
- [Error out on unknown templates in 'new' command](#2676)
- [Fix a typo](#2674)
- [Bump certifi to 2.9.0](#2673)
- [add a debug message in internal dependency fetching code](#2672)
- [Use SPDX id for license in template and test](#2668)
- [Use default branch for git and git_subdir resources with no revision](#2663)

Signed-off-by: Fred Hebert <[email protected]>
@eproxus
Copy link
Contributor

eproxus commented Aug 31, 2022

I think this change broke our rebar3_grisp plug-in because it makes a release from an Erlang build which doesn't have a dyn_erl file in it (cross-compiled to ARM and stripped of unnecessary files). This implementation assumes the file dyn_erl will always exist for any Erlang build (which may or may not be true):

===> Copying ~/grisp/grisp_demo/_build/grisp/rel/grisp_demo/erts-12.3.2.1/bin/dyn_erl to ~/grisp/grisp_demo/_build/grisp/rel/grisp_demo/erts-12.3.2.1/bin/erl failed with reason: no such file or directory

Would it be acceptable with a PR fix that only overwrites erl with dyn_erl if dyn_erl actually exists?

@tsloughter
Copy link
Member Author

@eproxus yes, definitely. I believe I only did that because we only support OTP versions that have dyn_erl, but since there aren't we shouldn't assume it.

@eproxus
Copy link
Contributor

eproxus commented Sep 1, 2022

@tsloughter See #926

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken bin/aeternity commands on macOS
3 participants