Closed jechol closed 3 years ago
I don't like the extra iteration of all files but I guess there is no way around it. Unless there is a way to set the mode when copying...
Wouldn't we in theory need to revert the status back after that back to what it was? Does keeping the write mode change anything once in a tarball or something?
Not sure what you mean. should be no reason to revert the mode back to read-only.
Wouldn't we in theory need to revert the status back after that back to what it was? Does keeping the write mode change anything once in a tarball or something?
I think it would be okay as long as extracted .beam have read permission. This PR only ensures that .beam are writeable to strip, and doesn't change read permission.
Doesn't it? 0600 is read/write, right? But they have to be readable anyway, why else have them in a release, so not an issue.
Yeah my concern was more about leaving them writeable when they weren't.
@ferd
I assume this issue only happens for Nix. Nix changes file mode for installed package files to read-only. For other environments, packages file mode is untouched(read-write) so that copied beam files are also read-write.
PR is changed to revert file mode after strip. Please review again.
@tsloughter Can you review this again?
Nix Erlang distribution where all installed erlang files are readonly, just copying to release folder causes permission error when trying to strip.
This PR ensures all *.beam files inside release are writeable before trying to to strip.