cloudfoundry / bosh-cli

BOSH CLI v2+
Apache License 2.0
178 stars 161 forks source link

Isolated environment is hard-coded for building bosh-releases #660

Open joergdw opened 2 weeks ago

joergdw commented 2 weeks ago

The bosh-cli sometimes compiles releases, e.g. for bosh create-env. It therefore requires compilation tools that may need certain environment-variables, e.g. to find dynamically linked libraries and header-files.

installation/pkg/compiler.go:95-108 prohibits the propagation of needed environment-variables that are intended to solve this. One examle is LIBRARY_PATH which is like the (already propagated) LD_LIBRARY_PATH but relevant for compilation-time instead of run-time. But there are quiet some more.

For me it would be sufficient, to switch off the UseIsolatedEnv e.g. via a cli-flag. Then the caller is responsible for providing a correct and clean environment.

rkoster commented 1 week ago

bosh releases should be self-contained and should bring the needed header-files / libraries. For example, the ruby release bring libyaml: https://github.com/cloudfoundry/bosh-package-ruby-release/blob/main/packages/ruby-3.3/packaging#L55