Open pamaury opened 1 month ago
Would this be compatible with air-gapped builds?
I am not entirely sure what your question is @matutem : are you asking if this env var mechanism will work in air-gapped build, or whether this mechanism might break air-gapped build?
Just to add some context (more details in #24802): some OT developers might have to run tests in enviroments where they can't install anything on the system so they either need to install things locally or point to a NFS drive. The particular problem there were libraries such as libusb
. The issue is that although it's possible to override environment variables for bazel test
using --action_env
, this does not work for bazel build
unless use_default_shell
is set to true, but this makes bazel less hermetic. As a workaround, we added use_default_shell
in #24802 but the idea would be to add a custom setting for that and remove use_default_shell
, and this would only be set by developers on their machine if they need to.
Description
In #24802, it was observed that
--action_env
cannot be used to override environment variables for build rules (but it works for test rules). This would be useful forLD_LIBRARY_PATH
to runopentitantool
. A temporary fixed was merged in #24802 but we should come up with a better solution.