mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-29 19:30:11 +00:00
beamPackages.mixReleaseSetupHook: restore postFixup behavior and maintain perms
By moving to preFixup we exposed a bug where permissions, critically execute bit, were not maintained. This caused our logic to do the initial stripping of erlang store paths. Restore the original behavior by running these as postFixup, and also fix the bug by maintaining perms if we do indeed strip here.
This commit is contained in:
@@ -54,6 +54,7 @@ mixReleaseRemoveErlangReferences() {
|
||||
# use bbe to substitute strings in binary files, because using substituteInPlace
|
||||
# on binaries will raise errors
|
||||
bbe -e "s|${erlang}/lib/erlang|$out|" -o "$file".tmp "$file"
|
||||
chmod --reference="$file" "$file".tmp
|
||||
rm -f "$file"
|
||||
mv "$file".tmp "$file"
|
||||
done
|
||||
@@ -75,11 +76,11 @@ mixReleaseStripDebugHook() {
|
||||
}
|
||||
|
||||
if [ -z "${dontMixReleaseFixup-}" ]; then
|
||||
preFixupHooks+=(mixReleaseFixupHook)
|
||||
postFixupHooks+=(mixReleaseFixupHook)
|
||||
fi
|
||||
|
||||
if [ -n "${removeCookie-1}" ]; then
|
||||
preFixupHooks+=(mixReleaseRemoveCookieHook)
|
||||
postFixupHooks+=(mixReleaseRemoveCookieHook)
|
||||
fi
|
||||
|
||||
if [ -n "${stripDebug-}" ]; then
|
||||
|
||||
Reference in New Issue
Block a user