FS#73998 - [busybox] is built with standalone shell
Attached to Project:
Community Packages
Opened by Thomas Dy (stoichyu) - Tuesday, 01 March 2022, 08:46 GMT
Last edited by George Rawlinson (rawlinsong) - Tuesday, 31 May 2022, 03:30 GMT
Opened by Thomas Dy (stoichyu) - Tuesday, 01 March 2022, 08:46 GMT
Last edited by George Rawlinson (rawlinsong) - Tuesday, 31 May 2022, 03:30 GMT
|
Details
Description:
community/busybox is built with standalone shell (CONFIG_FEATURE_SH_STANDALONE) which means that when using it as a shell, it will prioritize built-in busybox commands over PATH. This causes problems when used as /bin/sh in nix as build scripts do not expect to be provided with busybox versions of common build tools. I'm not sure if the option was a conscious decision, it seems to have been set that way from the very first PKGBUILD in the repo. If we believe this is necessary, can we have a separate busybox-nix with the option turned off for use with nix? Steps to reproduce: 1. Run `busybox sh` 2. Run `cp --version` and you get busybox cp, not the one in /usr/bin |
This task depends upon
Closed by George Rawlinson (rawlinsong)
Tuesday, 31 May 2022, 03:30 GMT
Reason for closing: Implemented
Additional comments about closing: Added nix-busybox.
Tuesday, 31 May 2022, 03:30 GMT
Reason for closing: Implemented
Additional comments about closing: Added nix-busybox.
sandbox-paths = /bin/sh=/path/to/static/busybox
to nix.conf
* https://github.com/NixOS/nix/pull/6568
* https://github.com/MinaProtocol/mina/issues/11071
A last resort would be either to disable sandboxing in Nix, or creating nix-busybox package (install busybox to /usr/lib/nix), but I don't like either option.
We'll see what upstream come back with.