patch-shebangs.sh: fix for macos sandbox#414448
Conversation
|
I ran the tests on aarch64-darwin and they succeeded. I think this is ready to merge |
|
Bisect says c1cc6ff |
|
Thanks for letting me know. I will try to fix it tomorrow. |
- Add test to ensure ability to patch read-only-files (see NixOS#414448 (comment)) - Add test to ensure the timestamp is preserved - Add test to ensure read-only permissions are preserved
|
So I'm pretty sure this broke every single Erlang thing, because they are effectively zip files with a shebang, and going through bash strings ends up corrupting them. We should probably just use a temporary file in /tmp or something. |
Working on a fix now. |
This removes the recently introduced shell based implementation of `sponge` which wasn't capable of managing binary input. Now, a tmpFile under $TMPDIR is created manually and later deleted see: #414448 (comment)
This removes the recently introduced shell based implementation of `sponge` which wasn't capable of managing binary input. Now, a tmpFile under $TMPDIR is created manually and later deleted see: NixOS#414448 (comment)
This was discovered with issues related to pnpm that hard links on some systems, see NixOS#426636. This is a regression introduced by NixOS#414448 and NixOS#423137. When `sed -i` is used on a file with hard links, then the file is seperated and only the file named in the command is changed.
fixes #343576
To test this PR, execute:
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.