Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sandbox shell configurable #2003

Open
nanonyme opened this issue Mar 23, 2025 · 2 comments
Open

Make sandbox shell configurable #2003

nanonyme opened this issue Mar 23, 2025 · 2 comments

Comments

@nanonyme
Copy link
Contributor

Currently sandbox shell is hardcoded to be /bin/sh. This is problematic since it can wildly vary how it works. If system has bash as primary shell, which is common, then /bin/sh will be a very much extended version of POSIX shell so many scripts written with it will not be compatible with eg dash. On the other hand, it is also not full bash. Many projects like freedesktop-sdk expect to be able to write bash syntax in command so it would really be ideal that sandbox grows a variable shell with default value set to /bin/sh for backwards compatibility. When set to eg /bin/dash or /bin/bash, then that entrypoint will be used inside build sandbox.

@nanonyme
Copy link
Contributor Author

sh is hardcoded here

["sh", "-c", "-e", self.script], flags=self.flags, cwd=first.cwd, env=first.env

@nanonyme
Copy link
Contributor Author

I am not proposing using SHELL variable for this. It would be a surprising change since users might be setting something there assuming it takes effect on interactive shell but not build shell. For some reason BuildStream is setting that by default. At least make is actively ignoring on Linux SHELL environment variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant