nix icon indicating copy to clipboard operation
nix copied to clipboard

install.in: fails to run the installer with `noexec`

Open suntropez opened this issue 1 year ago • 2 comments

Platform

  • [X] Linux:
  • [ ] macOS
  • [ ] WSL

Additional information

Just had some CI runners fail with permission denied. I don't have the environment available for inspection but I imagine it is due to /tmp being mounted with noexec.

Output

sh: 117: /tmp/nix-binary-tarball-unpack.YjS3fl3CIT/unpack/nix-2.22.1-x86_64-linux/install: Permission denied

Suggestions

Accept a --tmpdir or maybe just invoking the installer with sh would do it?

Priorities

Add :+1: to issues you find important.

suntropez avatar May 22 '24 15:05 suntropez

The relevant part of the installer uses mktemp, which should listen to TMPDIR.

https://github.com/NixOS/nix/blob/bd7a0746361d42a121b2cef1571bda4f7c370c16/scripts/install.in#L15

I do like the idea of using sh to not require non-noexec though.

max-privatevoid avatar May 22 '24 19:05 max-privatevoid

.. which should listen to TMPDIR.

Oh! Nice!

As far as I'm concerned that settles the issue for me. I don't mind if the issue is closed or kept open.

suntropez avatar May 23 '24 10:05 suntropez