Environment variables not properly propagated in the sandbox environment
Summary
When setting environment variable LD_LIBRARY_PATH to an element, this variable is not used.
Steps to reproduce
This element fails:
kind: manual
depends:
- filename: base.bst
junction: freedesktop-sdk.bst
type: build
environment:
LD_LIBRARY_PATH: /foo/bar
config:
build-commands:
- |
[ "${LD_LIBRARY_PATH}" = /foo/bar ]
What is the current bug behavior?
The build of the element fails.
What is the expected correct behavior?
The build of the element does not fail.
Relevant logs and/or screenshots
Possible fixes
The current way environment variables are used is to call Bubblewrap with it instead of telling it to use that environment for the command run by Bubblewrap.
There might be other, consequence for this approach. For instance if the local installation of Bubblewrap requires some environment variable to be set to run correctly, this will not be the case. Bubblewrap will be run with the environment for the element.
Here is what need to be fixed:
- Use
--settenvand--unsetenvin Bubblewrap command line to set environment. - Use user environment to call Bubblewrap.
Other relevant information
- BuildStream version affected: /milestone %BuildStream_v1.2
Edited by Tristan Van Berkom