-
Notifications
You must be signed in to change notification settings - Fork 50
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
Use system MbedTLS #66
Conversation
@@ -31,12 +31,28 @@ else | |||
srcsha = "8f25b6f156ae5081e91bcc58b02455926d9324035fe5f7028a6bb5bc0139a757" | |||
end | |||
|
|||
# Use the version of MbedTLS that ships with Julia .5 and later | |||
|
|||
julia_bin = Base.julia_cmd().exec[1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just use JULIA_HOME
, that's what this is derived from anyway - the representation of Cmd
might change which could break this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Current coverage is 70.25% (diff: 100%)@@ master #66 diff @@
==========================================
Files 10 10
Lines 390 390
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 276 274 -2
- Misses 114 116 +2
Partials 0 0
|
Travis is showing this error, even though things work locally for me. Confused ATM on what's going on.
|
CustomPathBinaries is probably not widely tested with local paths. I'm not too familiar with where in BinDeps that code is. |
Alright. Realistically speaking, I'm probably not going to look into On Mon, Aug 15, 2016 at 6:47 AM Tony Kelman notifications@github.com
|
# Use the version of MbedTLS that ships with Julia .5 and later | ||
|
||
provides(Binaries, | ||
joinpath(dirname(JULIA_HOME), "..", "lib", "julia"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of either dirname
or ".."
are redundant, JULIA_HOME
is already the bin
directory. On Windows this should be just JULIA_HOME
.
# For Unix | ||
provides(Binaries, | ||
joinpath(JULIA_HOME, "..", "lib", "julia"), | ||
mbed_all) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
os = :Unix
etc
On Travis, it looks like MbedTLS is still being build from source on Linux and from Homebrew on OS X, even though the final file paths in |
I do see "mbedtls (>= 2.2)" at Julia's README.md, while 2.2 is no longer listed as the supported version. I made this #67 issue before seeing this one. You think Julia will better track security updates or just want to avoid duplicates? I did wander [for cURL], is that at least possible? Maybe better to track security updates (or not..)? [It's also a possibility that security updates for 0.4 might get neglected..] |
The versions of Julia without a bundled MbedTLS are failing on Travis: "LoadError: Provider BinDeps.Binaries failed to satisfy dependency libmbedtls". |
My impression was that it should also check several providers in a priority order and fall back to other options, but that might be broken? |
So that's one question, and the other is why the linux nightly is still building MbedTLS from source, and why Homebrew is still downloading an MbedTLS on the OS X nightly, even though in the latter two cases the final paths in |
|
||
if is_unix() | ||
provides(Binaries, | ||
joinpath(JULIA_HOME, "..", "lib", "julia"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, this really should not be necessary. These libraries should be picked up automatically by the RPATH that is embedded in all Julia builds to find things like sys.so
. Also, this will break if someone is running Julia with relative paths to libraries that aren't ../lib/julia
, such as the Debian package where it's ../lib/x86_64-linux-gnu/julia
, etc....
If you don't provide this path, do things break?
Can you embed a |
With julia-provided shared library, do we really need BinDeps anymore? Is that just to provide fallbacks? I'm wondering if we can't just simplify the whole process here and say |
Does that actually work right now?
|
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.5.0 (2016-09-19 18:14 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-apple-darwin13.4.0
julia> data = Libc.malloc(32)
Ptr{Void} @0x00007f8aea45d330
julia> ccall((:mbedtls_pk_init, "libmbedcrypto"), Void, (Ptr{Void},), data)
julia> I mean, 0.5-only I would imagine, but we could bump the Julia minimum. |
What do you think, @tkelman ? Any reason not to do this? |
I'm in favor of using the julia-bundled libraries as much as we can, with the caveat that of course we always want to shrink Base as much as possible, so MbedTLS may go away some time in the future. @quinnj to make sure that it's picking up the right
|
Implemented in #81 |
No description provided.