You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 16, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 16, 2024. It is now read-only.
Use environment variables to specify OpenSSL location on OS X #479
OpenSSL is a key-only homebrew crate, and doing brew link --force openssl means we
may end up linking against the insecure,
deprecated system OpenSSL while using the headers from Homebrew's openssl.
Instead, we need to explicitly pass the full include/lib paths to the compiler on our OS X builders, which is most easily done via environment variables.
Parts:
Update Salt code to no longer call brew link --force openssl
Update Buildbot configuration to pass correct values for the OPENSSL_INCLUDE_DIR and OPENSSL_LIB_DIR environment variables
Run some command (TODO: which one?) to unlink openssl on our OS X builders
@santagada Can you give me example output for "$(brew --prefix)"? Does this output vary (over time, with openssl package version, randomly, with homebrew updates)? How this varies will inform how we get the right environment variables, due to the property that the Buildbot configuration is executed on the Buildbot master (a Linux machine), not the actual builder. E.g., we may lock down the OpenSSL version and template the string, or we may dynamically get the version, or just wait for the move to NSS/ring/crypto-library-of-your-choice-here.
I think it is pretty stable, for the general user docs I would leave the command there but for salt we can fix it to /usr/local/opt/openssl and just know that if in the future all builds on osx always fails on linking openssl is because of a more from homebrew.
@santagada Due to how Buildbot works, it's much easier to set static environment variables than dynamic ones (i.e. those that shell out, which is the "$(brew --prefix openssl)" part). Is the output of that command always /usr/local/opt/openssl, or does it change based on the openssl version?
OK, from IRC it sounds like the output of that command should always be /usr/local/opt/openssl, so we can hardcode the environment variable values for now. @santagada, you were interested in this so I'll assign this to you.
Files to change:
servo-build-dependencies/init.sls: Remove the salt state which runs brew link --force openssl
buildbot/master/files/config/environments.py: Add the new environment variables to the build_macEnvironment.
Tests:
No tests needed (aside from getting a successful build).
We also need to somehow "unlink" openssl on our existing builders, so if you know a command for that we can run it by hand.
@santagada I actually have taken care of this in #483, as part of upgrading Homebrew to 1.0.0. Feel free to work on another issue, and thanks again for your initial report and PR to make our OpenSSL usage via Homebrew better!
Activity
santagada commentedon Sep 14, 2016
I think it is pretty stable, for the general user docs I would leave the command there but for salt we can fix it to /usr/local/opt/openssl and just know that if in the future all builds on osx always fails on linking openssl is because of a more from homebrew.
aneeshusa commentedon Sep 14, 2016
@santagada Due to how Buildbot works, it's much easier to set static environment variables than dynamic ones (i.e. those that shell out, which is the
"$(brew --prefix openssl)"part). Is the output of that command always/usr/local/opt/openssl, or does it change based on the openssl version?aneeshusa commentedon Sep 14, 2016
OK, from IRC it sounds like the output of that command should always be
/usr/local/opt/openssl, so we can hardcode the environment variable values for now. @santagada, you were interested in this so I'll assign this to you.Files to change:
servo-build-dependencies/init.sls: Remove the salt state which runsbrew link --force opensslbuildbot/master/files/config/environments.py: Add the new environment variables to thebuild_macEnvironment.Tests:
We also need to somehow "unlink" openssl on our existing builders, so if you know a command for that we can run it by hand.
aneeshusa commentedon Sep 24, 2016
@santagada I actually have taken care of this in #483, as part of upgrading Homebrew to 1.0.0. Feel free to work on another issue, and thanks again for your initial report and PR to make our OpenSSL usage via Homebrew better!
Auto merge of #483 - aneeshusa:add-homebrew-state, r=edunham,
santagada commentedon Sep 27, 2016
I'm on vacation, sorry for not unassining myself, and thanks for fixing this