Skip to content

Update dependencies for OpenSSL 1.1.0 compatibility #3272

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

Merged
merged 3 commits into from
Nov 15, 2016

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Nov 8, 2016

The primary targets here are openssl and openssl-sys crates 0.9,
bringing support for OpenSSL 1.1.0. This requires updating the curl
and git2 related dependencies as well.

A small change is required in cargo itself for the new Hasher API.
Results from the hasher are simply unwrapped for now, matching the
Windows behavior that already panics on error.

@rust-highfive
Copy link

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

I've been passively trying to do this but the git2 behavior changed linking to libcurl enough that it's been difficult to find time to fix all the tests. It looks like the Travis builds may also be failing?

@cuviper
Copy link
Member Author

cuviper commented Nov 9, 2016

Sorry, simply missing the new OPENSSL_DIR was the main problem for Travis. Linux is all green now, but OSX still failed, and I don't have the means to debug that myself.

What are the git2/libcurl problems you're referring to?

Anyway, I've opened the PR to maintainer pushes if you'd like to add anything, however passively. :)

Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm ok, I'll try poking around.

A major change in libgit2 is that it attempts to use libcurl by default now, which isn't always what we might want. I've been wrangling with the various options there, though.

@@ -25,6 +25,7 @@ matrix:
MACOSX_DEPLOYMENT_TARGET=10.7
os: osx
before_install:
- export OPENSSL_DIR=`brew --prefix openssl`
- export OPENSSL_INCLUDE_DIR=`brew --prefix openssl`/include
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these env vars can be removed now

@@ -26,12 +26,12 @@ env_logger = "0.3"
filetime = "0.1"
flate2 = "0.2"
fs2 = "0.2"
git2 = "0.4"
git2-curl = "0.5"
git2 = "0.5"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah FWIW I had to end up yanking the 0.5 release that had support for openssl 1.1, so this'll need to be updated to 0.6 now

@@ -251,10 +251,12 @@ target/openssl/$(1).stamp: target/openssl/openssl-$$(OPENSSL_VERS).tar.gz \

# variables read by various build scripts to find openssl
cargo-$(1): export OPENSSL_STATIC := 1
cargo-$(1): export OPENSSL_DIR := $$(OPENSSL_INSTALL_$(1))
cargo-$(1): export OPENSSL_ROOT_DIR := $$(OPENSSL_INSTALL_$(1))
cargo-$(1): export OPENSSL_LIB_DIR := $$(OPENSSL_INSTALL_$(1))/lib
cargo-$(1): export OPENSSL_INCLUDE_DIR := $$(OPENSSL_INSTALL_$(1))/include
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lib/include here I believe can be removed

@alexcrichton alexcrichton assigned alexcrichton and unassigned brson Nov 9, 2016
@alexcrichton
Copy link
Member

Ok, pushed a number of updates and fixes, the remaining errors seem easy to deal with, just need to figure them out.

@cuviper
Copy link
Member Author

cuviper commented Nov 10, 2016

The AppVeyor failure couldn't remove a build directory -- possibly spurious?

The OSX failure got a signal 4, SIGILL? -- don't know what to think about that.

@alexcrichton
Copy link
Member

Ah yeah AppVeyor looks spurious, didn't realize that OSX was signal 4... Odd! I'll poke around locally.

@alexcrichton
Copy link
Member

Looks like a legit segfault in libgit2, going to try to fix

@alexcrichton
Copy link
Member

I've submitted a PR to fix the fault in libgit2

@alexcrichton
Copy link
Member

Ok, fix merged upstream in libgit2, and libgit2-sys is updated. Pushed and let's see what CI think.

@alexcrichton
Copy link
Member

@bors: r+

Alright, let's see if it lands!

@bors
Copy link
Contributor

bors commented Nov 11, 2016

📌 Commit 803ab53 has been approved by alexcrichton

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Nov 11, 2016

📌 Commit 68fc813 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Nov 11, 2016

⌛ Testing commit 68fc813 with merge ac9adc0...

@sfackler
Copy link
Member

FYI, you'll need to upgrade to rust-openssl 0.9.1 to fix a bug that broke EOF detection in OpenSSL 1.1.0c if you're using SslStream.

@bors
Copy link
Contributor

bors commented Nov 11, 2016

💔 Test failed - cargo-cross-linux

@alexcrichton
Copy link
Member

@bors: retry

@sfackler oh we're not actually using that at all yet in Cargo, just the openssl-sys crate to link to OpenSSL itself. Cargo only very lightly uses OpenSSL to do a bit of hashing, but other than that the openssl crate itself isn't used.

@cuviper
Copy link
Member Author

cuviper commented Nov 11, 2016

Not even in the transitive dependencies? The version here is chosen for everyone, after all...

@alexcrichton
Copy link
Member

Yep, as the author of most of them, I can tell you the openssl crate basically isn't used.

@cuviper
Copy link
Member Author

cuviper commented Nov 11, 2016

Heh, fair enough.

@bors
Copy link
Contributor

bors commented Nov 11, 2016

⌛ Testing commit 68fc813 with merge c4711c6...

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Nov 14, 2016

📌 Commit 0eed456 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Nov 14, 2016

⌛ Testing commit 0eed456 with merge 35bd5f8...

@bors
Copy link
Contributor

bors commented Nov 14, 2016

💔 Test failed - cargo-cross-linux

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Nov 14, 2016

📌 Commit 77f5cff has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Nov 14, 2016

⌛ Testing commit 77f5cff with merge 1b19f25...

@bors
Copy link
Contributor

bors commented Nov 14, 2016

💔 Test failed - cargo-cross-linux

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Nov 14, 2016

📌 Commit 5fa52dc has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Nov 14, 2016

⌛ Testing commit 5fa52dc with merge 5c53c9c...

@bors
Copy link
Contributor

bors commented Nov 14, 2016

💔 Test failed - cargo-cross-linux

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Nov 14, 2016

📌 Commit 15acaa9 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Nov 14, 2016

⌛ Testing commit 15acaa9 with merge 9f1beaf...

bors added a commit that referenced this pull request Nov 14, 2016
Update dependencies for OpenSSL 1.1.0 compatibility

The primary targets here are openssl and openssl-sys crates 0.9,
bringing support for OpenSSL 1.1.0.  This requires updating the curl
and git2 related dependencies as well.

A small change is required in cargo itself for the new Hasher API.
Results from the hasher are simply unwrapped for now, matching the
Windows behavior that already panics on error.
@bors
Copy link
Contributor

bors commented Nov 15, 2016

☀️ Test successful - cargo-cross-linux, cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-gnu-32, cargo-win-gnu-64, cargo-win-msvc-32, cargo-win-msvc-64
Approved by: alexcrichton
Pushing 9f1beaf to master...

@bors bors merged commit 15acaa9 into rust-lang:master Nov 15, 2016
@cuviper
Copy link
Member Author

cuviper commented Nov 15, 2016

@alexcrichton Thanks for hammering that through!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants