-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Backporting fixes to 1.14.0 #3353
Conversation
Now that Cargo requires OpenSSL >= 1.0.1 transitively through the `openssl-sys` 0.9 release the dynamic libraries for OpenSSL are no longer located on OSX by default. This means that the support necessary for libssh2 needs to be statically linked rather than dynamically linked. Closes rust-lang#3303
After rust-lang#3311 we're now correctly trying to link OpenSSL statically on OSX. Unfortunately though this is failing to complete on the builders. Turns out the way we install OpenSSL through Homebrew create "universal archives" which is essentially an archive with both i686 and x86_64 object files, but separated. The linker takes care of this just fine but rustc currently chokes on it, unable to include the library statically into the compiler. To work around this we prepare our own mini install of OpenSSL by copying relevant bits into a local directory (like we do on Linux). As part of this we use the `lipo` tool, which is used to manage these fat archives, to disassemble the archive and only extract the relevant architecture. This should make a pre-installation step which both extracts the information and configures Cargo to use it. This should also fix the errors we're seeing on Travis I believe.
We can't rely on frobbing mtimes, need to actually just wait a whole second.
I'm seeing a bunch of weird illegal instructions on OSX nightlies for Cargo. My guess is that they're all related to OpenSSL linking. Right now we're linking from Homebrew but I have a sneaking suspicion that it compiles with `-march=native` rather than what we'd like as a portable binary. To work around this compile OpenSSL ourselves and link it that way. Note that I believe this won't bring in the certificate trust store of OpenSSL on OSX (or at least not the right one from the keychain). We shouldn't need that, however, as OpenSSL is just used as the cryptographic primitives in libssh2 and Cargo itself. So in that sense we shouldn't need it for actually SSL at all.
Follow the same strategy as the compiler for now in basically every respect: * Add new `--release-channel` configure option, defaulting to `dev` * Remove old `--enable-nightly` * Add `--enable-build-openssl` as an orthogonal option * Hook up Travis/AppVeyor to stable/beta/master branches to do the right channel builds.
* Pass `--quiet` to all tests to have some quieter output * Skip builds on branches other than `auto-cargo` as it's already checked * Check the right env var for repo branches on appveyor * Only run a few builds on PRs
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
@bors: r+ |
📌 Commit 6eb113a has been approved by |
⌛ Testing commit 6eb113a with merge f91900c... |
💔 Test failed - status-travis |
This updates libgit2/libssh2 bindings to fix initialization races in OpenSSL. This should fix some of the spurious segfaults we've been seeing on Travis OSX.
This commit includes alexcrichton/git2-rs@a8f4a7faa which switches the order of initialization of libgit2. That commit ensures that the relevant env vars which a statically linked OpenSSL needs to function are set before libgit2 is initialized to ensure that libgit2 uses them. This was regressed accidentally in alexcrichton/git2-rs@071902aa when initialization was tweaked. Closes rust-lang#3340
Need to optionally chop off the `deps` folder if it's there to get to the location we're expecting.
@bors: r+ |
📌 Commit 1bb340e has been approved by |
@bors: r+ |
📌 Commit adf9312 has been approved by |
⌛ Testing commit adf9312 with merge 2ada218... |
💔 Test failed - status-appveyor |
@bors: retry |
⌛ Testing commit adf9312 with merge 6423f34... |
💔 Test failed - status-travis |
adf9312
to
ea380cf
Compare
@bors: r+ |
📌 Commit ea380cf has been approved by |
💔 Test failed - status-travis |
Stable cargos don't need to be compatible with nightlies
@bors: r+ |
📌 Commit 977f263 has been approved by |
@bors: p=1 |
Backporting fixes to 1.14.0 This is a backport of the following PRs to fix the actual issue, rust-lang/rust#37969. * #3311 - first attempt to fix OpenSSL linkage on OSX * #3315 - second attempt to fix linkage * #3325 - fix a flaky test causing lots of CI problems * #3332 - actual fix for OpenSSL linkage on OSX * #3345 - first PR for automation changes * #3350 - second PR for automation changes * #3326 - update git2 to support netbsd * #3331 - update git2 to fix segfaults in tests * #3342 - update git2 to fix cert paths
☀️ Test successful - status-appveyor, status-travis |
This is a backport of the following PRs to fix the actual issue, rust-lang/rust#37969.